/* ==========================================================================
   Pizza & Bistro - Admin & Business Dashboard Styles
   ========================================================================== */

:root {
  --dash-sidebar-bg: #0f172a;
  --dash-sidebar-hover: #1e293b;
  --dash-sidebar-active: rgba(255, 75, 43, 0.15);
  --dash-sidebar-text: #94a3b8;
  --dash-sidebar-text-active: #ffffff;
  --dash-sidebar-border: #1e293b;
  --dash-primary: #ff4b2b;
  --dash-primary-hover: #e03a1a;
  --dash-primary-gradient: linear-gradient(135deg, #ff4b2b 0%, #ff6b3d 100%);
  --dash-bg-main: #f8fafc;
  --dash-card-bg: #ffffff;
  --dash-border: #e2e8f0;
  --dash-text-dark: #0f172a;
  --dash-text-muted: #64748b;
  --dash-success: #10b981;
  --dash-warning: #f59e0b;
  --dash-danger: #ef4444;
  --dash-info: #3b82f6;
  --dash-radius: 14px;
  --dash-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --dash-shadow-md: 0 4px 16px -2px rgba(0, 0, 0, 0.06);
  --dash-shadow-lg: 0 10px 25px -4px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.dashboard-body,
.dashboard-container {
  display: flex;
  min-height: 100vh;
  background-color: var(--dash-bg-main);
  color: var(--dash-text-dark);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}

/* ==========================================
   Left Sidebar (Top to Bottom Sections)
   ========================================== */
.dash-sidebar {
  width: 275px;
  background: var(--dash-sidebar-bg);
  border-right: 1px solid var(--dash-sidebar-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 100;
  flex-shrink: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-sidebar-header {
  padding: 24px 20px 20px 20px;
  border-bottom: 1px solid var(--dash-sidebar-border);
}

.dash-brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.dash-sidebar-close-btn {
  display: none;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #ffffff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  margin-left: auto;
  transition: background 0.15s ease;
}

.dash-sidebar-close-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.dash-brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--dash-primary-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(255, 75, 43, 0.35);
  flex-shrink: 0;
}

.dash-brand-img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.dash-brand-text h2 {
  font-size: 17px;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.dash-brand-text .dash-badge-admin {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #ff8a65;
  background: rgba(255, 75, 43, 0.15);
  border: 1px solid rgba(255, 75, 43, 0.3);
  padding: 2px 7px;
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 3px;
}

/* Sidebar Navigation Items (Top to Bottom) */
.dash-sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
}

.dash-nav-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  padding: 12px 12px 6px 12px;
}

.dash-nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--dash-sidebar-text);
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.18s ease;
  position: relative;
}

.dash-nav-btn:hover {
  background: var(--dash-sidebar-hover);
  color: #ffffff;
  transform: translateX(3px);
}

.dash-nav-btn.active {
  background: var(--dash-sidebar-active);
  color: var(--dash-sidebar-text-active);
  border-color: rgba(255, 75, 43, 0.3);
  font-weight: 700;
}

.dash-nav-btn.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 4px;
  background: var(--dash-primary);
  border-radius: 0 4px 4px 0;
  box-shadow: 0 0 10px rgba(255, 75, 43, 0.8);
}

.dash-nav-icon {
  font-size: 18px;
  width: 24px;
  display: inline-flex;
  justify-content: center;
  flex-shrink: 0;
}

.dash-nav-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
  background: #334155;
  color: #cbd5e1;
}

.dash-nav-badge.alert {
  background: rgba(239, 68, 68, 0.2);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

/* Sidebar Footer */
.dash-sidebar-footer {
  padding: 16px 14px 20px 14px;
  border-top: 1px solid var(--dash-sidebar-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dash-btn-return-pos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--dash-primary-gradient);
  color: #ffffff;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 75, 43, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-btn-return-pos:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 75, 43, 0.45);
}

.dash-user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.dash-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.dash-user-info {
  flex: 1;
  line-height: 1.2;
}

.dash-user-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
}

.dash-user-status {
  font-size: 11px;
  color: #10b981;
}

.dash-btn-logout-small {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
}

.dash-btn-logout-small:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* ==========================================
   Right Main Content Workspace
   ========================================== */
.dash-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  height: 100vh;
}

/* Sticky Header Bar */
.dash-topbar {
  background: #ffffff;
  border-bottom: 1px solid var(--dash-border);
  padding: 16px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.dash-topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 280px;
  flex: 1 1 auto;
}

.dash-mobile-menu-btn {
  display: none;
  background: none;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  font-size: 18px;
  padding: 6px 10px;
  cursor: pointer;
}

.dash-page-title {
  min-width: 0;
}

.dash-page-title h1 {
  font-size: 21px;
  font-weight: 800;
  color: var(--dash-text-dark);
  letter-spacing: -0.3px;
  line-height: 1.25;
}

.dash-page-title p {
  font-size: 13px;
  color: var(--dash-text-muted);
  margin-top: 2px;
  line-height: 1.3;
}

.dash-topbar-right {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-pill-time {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #f1f5f9;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

.dash-btn-refresh {
  background: #ffffff;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  padding: 7px 13px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dash-text-dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.dash-btn-refresh:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

/* ==========================================
   Dashboard Content Sections
   ========================================== */
.dash-content-area {
  padding: 28px;
  flex: 1;
}

.dash-section-pane {
  display: none;
  animation: fadeInPane 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.dash-section-pane.active {
  display: block;
}

@keyframes fadeInPane {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* KPI Cards Grid */
.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}

.dash-kpi-card {
  background: var(--dash-card-bg);
  border-radius: var(--dash-radius);
  padding: 20px;
  border: 1px solid var(--dash-border);
  box-shadow: var(--dash-shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

.dash-kpi-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--dash-shadow-md);
}

.dash-kpi-info {
  line-height: 1.3;
}

.dash-kpi-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dash-kpi-value {
  font-size: 26px;
  font-weight: 900;
  color: var(--dash-text-dark);
  margin: 6px 0 4px 0;
  letter-spacing: -0.5px;
}

.dash-kpi-subtitle {
  font-size: 12px;
  color: var(--dash-text-muted);
}

.dash-kpi-icon-wrap {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.dash-kpi-card.sales .dash-kpi-icon-wrap {
  background: rgba(255, 75, 43, 0.1);
  color: var(--dash-primary);
}

.dash-kpi-card.orders .dash-kpi-icon-wrap {
  background: rgba(16, 185, 129, 0.1);
  color: var(--dash-success);
}

.dash-kpi-card.items .dash-kpi-icon-wrap {
  background: rgba(59, 130, 246, 0.1);
  color: var(--dash-info);
}

.dash-kpi-card.avg .dash-kpi-icon-wrap {
  background: rgba(245, 158, 11, 0.1);
  color: var(--dash-warning);
}

.dash-kpi-card.stock .dash-kpi-icon-wrap {
  background: rgba(239, 68, 68, 0.1);
  color: var(--dash-danger);
}

/* Card Sections & Containers */
.dash-card {
  background: var(--dash-card-bg);
  border-radius: var(--dash-radius);
  border: 1px solid var(--dash-border);
  box-shadow: var(--dash-shadow-sm);
  margin-bottom: 24px;
  overflow: hidden;
}

.dash-card-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--dash-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
}

.dash-card-header-left h3 {
  font-size: 17px;
  font-weight: 800;
  color: var(--dash-text-dark);
}

.dash-card-header-left p {
  font-size: 13px;
  color: var(--dash-text-muted);
}

.dash-card-body {
  padding: 24px;
}

/* Tables */
.dash-table-wrap {
  overflow-x: auto;
}

.dash-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.dash-table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 12px 16px;
  border-bottom: 1px solid var(--dash-border);
  white-space: nowrap;
}

.dash-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--dash-text-dark);
  vertical-align: middle;
  white-space: nowrap;
}

.dash-table tr:hover td {
  background-color: #f8fafc;
}

.dash-table-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--dash-border);
}

/* Status Badges */
.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  white-space: nowrap;
}

.dash-badge.in-stock {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}

.dash-badge.low-stock {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.dash-badge.out-of-stock {
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}

.dash-badge.unlimited {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* Search and Filters Bar */
.dash-filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.dash-search-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  padding: 8px 14px;
  width: 320px;
  max-width: 100%;
}

.dash-search-input input {
  border: none;
  outline: none;
  font-size: 14px;
  width: 100%;
  color: var(--dash-text-dark);
}

.dash-chips-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dash-filter-chip {
  background: #ffffff;
  border: 1px solid var(--dash-border);
  border-radius: 9999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-filter-chip:hover,
.dash-filter-chip.active {
  background: var(--dash-primary);
  color: #ffffff;
  border-color: var(--dash-primary);
}

/* Quick Stock Input */
.dash-stock-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-stock-input {
  width: 70px;
  padding: 6px 8px;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.dash-stock-btn {
  background: #0f172a;
  color: #ffffff;
  border: none;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.dash-stock-btn:hover {
  background: var(--dash-primary);
}

/* Two Column Layout */
.dash-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Analytics Cards */
.dash-stat-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}

.dash-stat-row:last-child {
  border-bottom: none;
}

.dash-stat-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: #475569;
}

.dash-stat-value {
  font-size: 15px;
  font-weight: 800;
  color: var(--dash-text-dark);
}

/* Best Sellers Ranking */
.dash-rank-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #f1f5f9;
}

.dash-rank-item:last-child {
  border-bottom: none;
}

.dash-rank-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
}

.dash-rank-num.gold {
  background: #fef3c7;
  color: #d97706;
}

.dash-rank-num.silver {
  background: #f1f5f9;
  color: #64748b;
}

.dash-rank-num.bronze {
  background: #ffedd5;
  color: #c2410c;
}

.dash-rank-info {
  flex: 1;
}

.dash-rank-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--dash-text-dark);
}

.dash-rank-sub {
  font-size: 12px;
  color: var(--dash-text-muted);
}

.dash-rank-bar-wrap {
  width: 120px;
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.dash-rank-bar-fill {
  height: 100%;
  background: var(--dash-primary-gradient);
  border-radius: 9999px;
}

.dash-rank-orders-badge {
  min-width: 90px;
  text-align: right;
  font-weight: 800;
  font-size: 14px;
  color: var(--dash-text-dark);
}

/* Settings Form */
.dash-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.dash-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-form-group.full-width {
  grid-column: 1 / -1;
}

.dash-form-group label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.dash-form-input {
  padding: 10px 14px;
  border: 1px solid var(--dash-border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--dash-text-dark);
  outline: none;
  transition: border-color 0.2s ease;
}

.dash-form-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px rgba(255, 75, 43, 0.12);
}

.dash-btn-save {
  padding: 12px 24px;
  background: var(--dash-primary-gradient);
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 75, 43, 0.3);
  transition: transform 0.2s ease;
}

.dash-btn-save:hover {
  transform: translateY(-2px);
}

/* Logo Setting Box in Dashboard */
.dash-logo-box {
  display: flex;
  align-items: center;
  gap: 18px;
  background: #f8fafc;
  border: 1.5px dashed var(--dash-border);
  padding: 16px 18px;
  border-radius: 12px;
}

.dash-logo-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #ffffff;
  border: 2.5px solid var(--dash-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(255, 75, 43, 0.2);
  cursor: pointer;
  transition: all 0.2s ease;
}

.dash-logo-avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 18px rgba(255, 75, 43, 0.35);
}

.dash-logo-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-logo-placeholder-text {
  font-size: 11px;
  color: var(--dash-text-muted);
  text-align: center;
  line-height: 1.25;
}

.dash-logo-actions {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-logo-btns-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.dash-btn-upload {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-text-dark);
  cursor: pointer;
  transition: all 0.15s;
}

.dash-btn-upload:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.dash-btn-action {
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid var(--dash-primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--dash-primary);
  cursor: pointer;
  transition: all 0.15s;
}

.dash-btn-action:hover {
  background: #fff5f2;
}

.dash-btn-danger-outline {
  padding: 7px 14px;
  background: #ffffff;
  border: 1px solid #ef4444;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  cursor: pointer;
  transition: all 0.15s;
}

.dash-btn-danger-outline:hover {
  background: #fef2f2;
}

.dash-hint-text {
  font-size: 12px;
  color: #64748b;
  line-height: 1.35;
}

.dash-form-select {
  cursor: pointer;
  background-color: #ffffff;
}

/* System Danger Zone Card */
.dash-settings-danger-card {
  margin-top: 24px;
  padding: 18px 20px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.dash-danger-header h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #1e293b;
}

.dash-danger-header p {
  margin: 3px 0 0 0;
  font-size: 12px;
  color: #64748b;
}

.dash-danger-actions {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.dash-btn-tool {
  padding: 8px 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s;
}

.dash-btn-tool:hover {
  background: #f1f5f9;
  border-color: #94a3b8;
}

.dash-btn-tool.danger {
  color: #ef4444;
  border-color: #fca5a5;
}

.dash-btn-tool.danger:hover {
  background: #fef2f2;
  border-color: #ef4444;
}

/* Cropper Modal Window in Dashboard */
.dash-crop-window {
  max-width: 440px;
  width: 95%;
  border-radius: 16px;
  overflow: hidden;
  background: #ffffff;
}

.dash-crop-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: #f8fafc;
}

.crop-stage-container {
  width: 260px;
  height: 260px;
  background: #0f172a;
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  touch-action: none;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

.crop-circle-frame {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
  border: 2.5px solid #ff4b2b;
  box-shadow: 0 0 0 9999px rgba(15, 23, 42, 0.72);
  cursor: grab;
  z-index: 2;
}

.crop-circle-frame:active {
  cursor: grabbing;
}

#dash-crop-stage-img {
  position: absolute;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
  transform-origin: 0 0;
  max-width: none;
  max-height: none;
}

.crop-circle-ring {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 1px dashed rgba(255, 255, 255, 0.5);
  pointer-events: none;
  z-index: 3;
}

.crop-instructions-bar {
  font-size: 12px;
  color: #64748b;
  text-align: center;
}

.crop-control-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.crop-zoom-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.crop-zoom-row input[type="range"] {
  flex: 1;
  accent-color: var(--dash-primary);
  height: 6px;
  cursor: pointer;
}

.btn-zoom-step {
  background: #ffffff;
  border: 1px solid var(--dash-border);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: var(--dash-text-dark);
  transition: all 0.15s;
}

.btn-zoom-step:hover {
  background: #fff5f2;
  color: var(--dash-primary);
  border-color: var(--dash-primary);
}

.crop-quick-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-crop-tool {
  background: #ffffff;
  border: 1px solid var(--dash-border);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-crop-tool:hover {
  background: #f1f5f9;
  color: var(--dash-text-dark);
  border-color: #94a3b8;
}

/* Receipt Modal Preview */
.dash-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.dash-modal-card {
  background: #ffffff;
  border-radius: 16px;
  width: 420px;
  max-width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--dash-shadow-lg);
  overflow: hidden;
}

.dash-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--dash-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-modal-body {
  padding: 20px;
  overflow-y: auto;
}

.dash-modal-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--dash-border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Toast */
.dash-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--dash-shadow-lg);
  z-index: 1000;
  display: none;
  align-items: center;
  gap: 8px;
}

/* ==========================================================================
   Responsive Design for All Devices (Desktops, Tablets, Mobile Phones)
   ========================================================================== */

/* Large Tablets & Small Laptops (<= 1200px) */
@media (max-width: 1200px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 14px;
  }
}

/* Medium Tablets & Two-Col Break (<= 992px) */
@media (max-width: 992px) {
  .dash-two-col,
  .dash-form-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/* Tablets (<= 900px) - Drawer Sidebar Transition */
@media (max-width: 900px) {
  .dash-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 285px;
    max-width: 85vw;
    z-index: 200;
    transform: translateX(-100%);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .dash-sidebar.open {
    transform: translateX(0);
  }

  .dash-sidebar-close-btn {
    display: inline-flex;
  }

  .dash-mobile-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    background: #f8fafc;
    border: 1px solid var(--dash-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
  }

  .dash-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(3px);
    z-index: 190;
  }

  .dash-sidebar-backdrop.open {
    display: block;
  }

  .dash-topbar {
    padding: 12px 18px;
  }

  .dash-page-title h1 {
    font-size: 18px;
  }

  .dash-content-area {
    padding: 18px 16px;
  }
}

/* Small Tablets & Large Phones (<= 768px) */
@media (max-width: 768px) {
  .dash-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
  }

  .dash-kpi-card {
    padding: 14px 14px;
    border-radius: 12px;
  }

  .dash-kpi-title {
    font-size: 11px;
    letter-spacing: 0.3px;
  }

  .dash-kpi-value {
    font-size: 20px;
    margin: 4px 0 2px;
  }

  .dash-kpi-subtitle {
    font-size: 11px;
  }

  .dash-kpi-icon-wrap {
    width: 34px;
    height: 34px;
    font-size: 16px;
    border-radius: 8px;
  }

  .dash-card {
    border-radius: 12px;
    margin-bottom: 16px;
  }

  .dash-card-header {
    padding: 14px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dash-card-header-left h3 {
    font-size: 15px;
  }

  .dash-card-header-left p {
    font-size: 12px;
  }

  .dash-card-header > button,
  .dash-card-header > .dash-stock-btn,
  .dash-card-header > .dash-search-input {
    width: 100% !important;
  }

  .dash-card-body {
    padding: 14px 16px;
  }

  .dash-filter-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    margin-bottom: 14px;
  }

  .dash-search-input {
    width: 100% !important;
    padding: 8px 12px;
  }

  .dash-chips-filter {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-chips-filter::-webkit-scrollbar {
    display: none;
  }

  .dash-filter-chip {
    flex-shrink: 0;
    padding: 6px 12px;
    font-size: 12px;
  }

  .dash-rank-bar-wrap {
    width: 80px;
  }
}

/* Smartphones & Mobile Devices (<= 640px) - Fixes squished header & awkward wrapping */
@media (max-width: 640px) {
  .dash-topbar {
    padding: 10px 14px;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .dash-topbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
  }

  .dash-mobile-menu-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    font-size: 17px;
    border-radius: 8px;
  }

  .dash-page-title {
    flex: 1;
    min-width: 0;
  }

  .dash-page-title h1 {
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0;
    word-break: break-word;
    color: var(--dash-text-dark);
  }

  .dash-page-title p {
    display: none; /* Hide verbose subtitle to preserve mobile vertical screen space */
  }

  /* Actions Row below the Title on Mobile */
  .dash-topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dash-topbar-right::-webkit-scrollbar {
    display: none;
  }

  .dash-pill-time {
    display: none; /* Date/time pill is hidden from mobile action row */
  }

  .dash-btn-refresh {
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Best Sellers List Card on Mobile */
  .dash-rank-item {
    gap: 10px;
    padding: 10px 0;
  }

  .dash-rank-num {
    width: 24px;
    height: 24px;
    font-size: 11px;
    flex-shrink: 0;
  }

  .dash-table-thumb {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    flex-shrink: 0;
  }

  .dash-rank-title {
    font-size: 13.5px;
  }

  .dash-rank-sub {
    font-size: 11px;
  }

  .dash-rank-bar-wrap {
    display: none; /* Hide progress bar on phones so name & orders badge have spacious layout */
  }

  .dash-rank-orders-badge {
    min-width: auto;
    font-size: 11.5px;
    background: #fff7ed;
    color: #ea580c;
    padding: 3px 8px;
    border-radius: 12px;
    border: 1px solid #ffedd5;
    white-space: nowrap;
    flex-shrink: 0;
  }

  /* Tables horizontal scroll */
  .dash-table-wrap {
    border-radius: 8px;
    border: 1px solid var(--dash-border);
    -webkit-overflow-scrolling: touch;
  }

  .dash-table th,
  .dash-table td {
    padding: 10px 10px;
    font-size: 12px;
  }

  .dash-table td strong {
    font-size: 12px;
  }

  /* Settings Form */
  .dash-form-input {
    font-size: 14px;
    padding: 10px 12px;
  }

  .dash-btn-save {
    width: 100%;
    padding: 12px;
    font-size: 14px;
  }

  /* Receipt Modal on Mobile */
  .dash-modal-card {
    width: 95%;
    max-height: 85vh;
    border-radius: 14px;
  }

  .dash-modal-header,
  .dash-modal-body,
  .dash-modal-footer {
    padding: 12px 14px;
  }
}

/* Extra Small Phones (<= 380px) */
@media (max-width: 380px) {
  .dash-kpi-grid {
    grid-template-columns: 1fr;
  }

  .dash-content-area {
    padding: 10px 8px;
  }

  .dash-topbar {
    padding: 8px 10px;
  }

  .dash-page-title h1 {
    font-size: 14px;
  }

  .dash-btn-refresh {
    padding: 5px 9px;
    font-size: 11px;
  }
}

/* ==========================================================================
   NEW FEATURES: Date Filter, Visual Charts, Expenses & Z-Report
   ========================================================================== */

/* Date Range Filter Pills in Topbar */
.dash-date-filter {
  display: inline-flex;
  align-items: center;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
  padding: 3px;
  gap: 3px;
}

.dash-date-pill {
  background: transparent;
  border: none;
  border-radius: 9999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.dash-date-pill:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.7);
}

.dash-date-pill.active {
  background: #ffffff;
  color: #ff4b2b;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

/* Export & Z-Report Buttons */
.dash-btn-export {
  color: #059669 !important;
  border-color: #10b981 !important;
  background: #ecfdf5 !important;
}
.dash-btn-export:hover {
  background: #10b981 !important;
  color: #ffffff !important;
}

.dash-btn-zreport {
  color: #2563eb !important;
  border-color: #3b82f6 !important;
  background: #eff6ff !important;
}
.dash-btn-zreport:hover {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* Charts Grid */
.dash-charts-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

@media (max-width: 1024px) {
  .dash-charts-grid {
    grid-template-columns: 1fr;
  }
}

.dash-trend-badge {
  background: rgba(255, 75, 43, 0.1);
  color: #ff4b2b;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 75, 43, 0.2);
}

/* 7-Day Bar Chart Styling */
.dash-chart-bars-wrap {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  height: 200px;
  padding: 20px 10px 10px 10px;
  border-bottom: 2px solid #e2e8f0;
  position: relative;
}

.dash-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  justify-content: flex-end;
  position: relative;
  cursor: pointer;
}

.dash-bar-fill-wrap {
  width: 100%;
  max-width: 38px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  background: rgba(241, 245, 249, 0.7);
  border-radius: 8px 8px 0 0;
  overflow: visible;
  position: relative;
}

.dash-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, #ff6b3d 0%, #ff4b2b 100%);
  border-radius: 8px 8px 0 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s ease;
  min-height: 4px;
  position: relative;
}

.dash-bar-col:hover .dash-bar-fill {
  background: linear-gradient(180deg, #ff8259 0%, #e03a1a 100%);
  transform: scaleY(1.03);
}

.dash-bar-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #0f172a;
  color: #ffffff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.dash-bar-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-width: 4px;
  border-style: solid;
  border-color: #0f172a transparent transparent transparent;
}

.dash-bar-col:hover .dash-bar-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(-2px);
}

.dash-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  margin-top: 8px;
  text-align: center;
}

.dash-bar-sublabel {
  font-size: 10px;
  color: #94a3b8;
}

/* Category Progress Bars */
.dash-cat-distribution {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dash-cat-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dash-cat-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.dash-cat-name {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #1e293b;
}

.dash-cat-amount {
  color: #64748b;
  font-weight: 700;
}

.dash-progress-track {
  width: 100%;
  height: 8px;
  background: #f1f5f9;
  border-radius: 9999px;
  overflow: hidden;
}

.dash-progress-fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* 3-Column KPI for Expenses & Profit */
.dash-kpi-3col {
  grid-template-columns: repeat(3, 1fr) !important;
  margin-bottom: 24px;
}

@media (max-width: 900px) {
  .dash-kpi-3col {
    grid-template-columns: 1fr !important;
  }
}

.dash-kpi-card.danger {
  border-left: 4px solid var(--dash-danger);
}
.dash-kpi-card.danger .dash-kpi-icon-wrap {
  background: rgba(239, 68, 68, 0.1);
  color: var(--dash-danger);
}

.dash-kpi-card.success {
  border-left: 4px solid var(--dash-success);
}
.dash-kpi-card.success .dash-kpi-icon-wrap {
  background: rgba(16, 185, 129, 0.1);
  color: var(--dash-success);
}

.dash-btn-add-exp {
  background: var(--dash-primary-gradient) !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 4px 12px rgba(255, 75, 43, 0.25) !important;
}
.dash-btn-add-exp:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(255, 75, 43, 0.35) !important;
}

/* Expense Category Badges */
.dash-exp-badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.dash-exp-badge.raw { background: #fee2e2; color: #991b1b; }
.dash-exp-badge.pkg { background: #fef3c7; color: #92400e; }
.dash-exp-badge.util { background: #e0f2fe; color: #075985; }
.dash-exp-badge.wage { background: #f3e8ff; color: #6b21a8; }
.dash-exp-badge.maint { background: #f1f5f9; color: #334155; }
.dash-exp-badge.other { background: #e2e8f0; color: #475569; }

/* Delete Expense Button */
.btn-del-expense {
  background: none;
  border: 1px solid #fee2e2;
  color: #ef4444;
  border-radius: 6px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.15s ease;
}
.btn-del-expense:hover {
  background: #ef4444;
  color: #ffffff;
}

/* Z-Report Printable Sheet Styling */
.zreport-paper {
  font-family: "Courier New", Courier, monospace;
  background: #ffffff;
  color: #000000;
  padding: 16px;
  line-height: 1.4;
  font-size: 13px;
  border: 1px dashed #cbd5e1;
}

.zreport-header {
  text-align: center;
  border-bottom: 2px dashed #000000;
  padding-bottom: 10px;
  margin-bottom: 12px;
}

.zreport-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.zreport-divider {
  border-top: 1px dashed #64748b;
  margin: 10px 0;
}

.zreport-total-row {
  display: flex;
  justify-content: space-between;
  font-weight: 800;
  font-size: 15px;
  border-top: 2px dashed #000;
  border-bottom: 2px dashed #000;
  padding: 6px 0;
  margin: 10px 0;
}

/* ==========================================================================
   PRINTER MANAGEMENT & ESC-POS CONFIGURATION (MATCHING SCREENSHOTS)
   ========================================================================== */
.dash-printer-top-bar {
  background: linear-gradient(135deg, #6200ee 0%, #7c3aed 100%);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: var(--dash-radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 16px rgba(124, 58, 237, 0.25);
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 12px;
}

.dash-printer-top-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-printer-back-arrow {
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.15);
  transition: background 0.15s ease;
  line-height: 1;
}

.dash-printer-back-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.dash-printer-top-left h2 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.5px;
  margin: 0;
  color: #ffffff;
}

.dash-printer-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dash-printer-status-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-btn-printer-help-toggle {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.dash-btn-printer-help-toggle:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Help Box Banner */
.dash-printer-help-box {
  background: #ede9fe;
  border: 1px solid #c4b5fd;
  border-radius: 12px;
  padding: 18px 22px;
  margin-bottom: 22px;
  color: #4c1d95;
}

.dash-printer-help-box h4 {
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.dash-printer-help-box ul {
  margin-left: 20px;
  font-size: 13px;
  line-height: 1.6;
}

/* Printers List */
.dash-printers-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.dash-printer-item-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.dash-printer-item-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.dash-printer-item-card.is-active-printer {
  border: 2px solid #7c3aed;
  background: #faf5ff;
}

.dash-printer-item-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1;
  min-width: 0;
}

.dash-printer-icon-avatar {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
  color: #334155;
}

.dash-printer-item-card.is-active-printer .dash-printer-icon-avatar {
  background: #ede9fe;
  color: #7c3aed;
}

.dash-printer-item-meta {
  min-width: 0;
}

.dash-printer-item-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.dash-printer-badge-default {
  font-size: 10.5px;
  font-weight: 700;
  background: #7c3aed;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 9999px;
  text-transform: uppercase;
}

.dash-printer-badge-auto {
  font-size: 10.5px;
  font-weight: 700;
  background: #10b981;
  color: #ffffff;
  padding: 2px 8px;
  border-radius: 9999px;
}

.dash-printer-item-sub {
  font-size: 12px;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dash-printer-item-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.dash-btn-printer-action {
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dash-btn-printer-action:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.dash-btn-printer-action.primary {
  background: #7c3aed;
  border-color: #7c3aed;
  color: #ffffff;
}

.dash-btn-printer-action.primary:hover {
  background: #6d28d9;
}

.dash-btn-printer-action.test {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}

.dash-btn-printer-action.test:hover {
  background: #059669;
}

.dash-btn-printer-action.danger {
  color: #ef4444;
  border-color: #fca5a5;
  background: #fff;
}

.dash-btn-printer-action.danger:hover {
  background: #fef2f2;
}

/* Bottom Add Printer Button */
.dash-printer-bottom-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.dash-btn-add-printer-green {
  background: #22c55e;
  color: #ffffff;
  border: none;
  font-size: 14px;
  font-weight: 800;
  padding: 13px 26px;
  border-radius: 9999px;
  box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.dash-btn-add-printer-green:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.5);
}

/* Stage 2: Printer Type Selection Grid (Matching Screenshot 2) */
.dash-printer-subhead {
  margin-bottom: 20px;
}

.dash-printer-subhead h3 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
}

.dash-printer-subhead p {
  font-size: 13px;
  color: #64748b;
  margin-top: 2px;
}

.dash-printer-types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dash-printer-type-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.dash-printer-type-card:hover {
  border-color: #7c3aed;
  box-shadow: 0 8px 24px rgba(124, 58, 237, 0.15);
  transform: translateY(-3px);
}

.type-card-icon {
  font-size: 36px;
  margin-bottom: 12px;
}

.type-card-name {
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}

.type-card-sub {
  font-size: 12px;
  color: #64748b;
  line-height: 1.4;
}

/* Stage 3: Printer Configuration Form (Matching Screenshot 3) */
.dash-config-header {
  background: linear-gradient(135deg, #6200ee 0%, #7c3aed 100%);
  color: #ffffff;
  padding: 16px 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-config-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.dash-config-type-icon {
  font-size: 22px;
}

.dash-config-name-input {
  background: transparent;
  border: none;
  border-bottom: 1.5px dashed rgba(255, 255, 255, 0.6);
  color: #ffffff;
  font-size: 17px;
  font-weight: 800;
  padding: 4px 6px;
  outline: none;
  min-width: 200px;
  max-width: 320px;
}

.dash-config-name-input:focus {
  border-bottom-style: solid;
  border-bottom-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.dash-config-edit-icon {
  font-size: 14px;
  opacity: 0.8;
}

.dash-btn-icon-danger {
  background: rgba(239, 68, 68, 0.2);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  transition: all 0.15s ease;
}

.dash-btn-icon-danger:hover {
  background: #ef4444;
}

.dash-config-body {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.dash-config-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dash-config-group.highlight-box {
  background: #faf5ff;
  border: 1.5px solid #d8b4fe;
  border-radius: 12px;
  padding: 16px 20px;
}

.dash-config-label {
  font-size: 13px;
  font-weight: 800;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* Segmented Buttons (Matching User Screenshot 3) */
.dash-segmented-toggle {
  display: flex;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 4px;
  gap: 4px;
}

.dash-segment-btn {
  flex: 1;
  padding: 14px 16px;
  border: none;
  background: transparent;
  color: #475569;
  font-size: 13.5px;
  font-weight: 800;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.dash-segment-btn:hover {
  color: #0f172a;
}

.dash-segment-btn.active {
  background: #6200ee;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(98, 0, 238, 0.3);
}

.dash-segment-btn.active .dash-seg-icon {
  filter: brightness(0) invert(1);
}

.dash-mode-bullets {
  background: #f8fafc;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 12.5px;
  color: #475569;
  line-height: 1.6;
  margin-top: 4px;
  border-left: 3px solid #6200ee;
}

/* Toggle Switch */
.dash-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dash-toggle-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}

.dash-toggle-desc {
  font-size: 12px;
  color: #64748b;
  margin-top: 2px;
}

.dash-switch {
  position: relative;
  display: inline-block;
  width: 48px;
  height: 26px;
  flex-shrink: 0;
}

.dash-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.dash-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 34px;
}

.dash-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.dash-switch input:checked + .dash-slider {
  background-color: #10b981;
}

.dash-switch input:checked + .dash-slider:before {
  transform: translateX(22px);
}

.dash-chk-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  margin-bottom: 6px;
}

.dash-btn-action-purple {
  background: #7c3aed;
  color: #ffffff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease;
}

.dash-btn-action-purple:hover {
  background: #6d28d9;
}

/* Footer Green Buttons (Matching Screenshot 3) */
.dash-config-footer-buttons {
  display: flex;
  gap: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-top: none;
  border-radius: 0 0 12px 12px;
  padding: 0 24px 24px 24px;
}

.dash-btn-green-action {
  flex: 1;
  background: #22c55e;
  color: #ffffff;
  border: none;
  padding: 14px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(34, 197, 94, 0.3);
  transition: all 0.15s ease;
  text-align: center;
}

.dash-btn-green-action:hover {
  background: #16a34a;
  transform: translateY(-2px);
  box-shadow: 0 5px 14px rgba(34, 197, 94, 0.4);
}

/* ==========================================================================
   PRINT SPECIFICATION - Thermal Receipt Printer (@media print)
   ========================================================================== */
.print-only {
  position: fixed !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  z-index: -9999 !important;
}

@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .dash-sidebar,
  .dash-main-wrap,
  .dash-modal-overlay,
  .dash-toast,
  .custom-confirm-overlay {
    display: none !important;
  }

  .print-only {
    position: static !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    height: auto !important;
    overflow: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: auto !important;
    display: block !important;
  }

  #print-area {
    display: flex !important;
    justify-content: center !important;
    width: 100% !important;
  }

  .thermal-receipt-printable {
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 2mm !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Bengali", Helvetica, Arial, sans-serif !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    color: #000000 !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .thermal-receipt-printable * {
    color: #000000 !important;
    box-sizing: border-box !important;
  }

  .receipt-logo-wrap {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    margin-bottom: 6px !important;
    text-align: center !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .receipt-circle-logo {
    width: 22mm !important;
    height: 22mm !important;
    border-radius: 50% !important;
    overflow: hidden !important;
    border: 1.5px solid #000000 !important;
    margin: 0 auto !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  .receipt-circle-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    visibility: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
}


