/* ============================================================
   Smart QR Café — Staff Portals Shared CSS
   Manager (blue) · Admin (violet) · Waiter (emerald)
   ============================================================ */

/* ── Layout Shell ─────────────────────────────────────────── */
body.staff-portal {
  background: var(--m-bg);
  color: var(--m-text);
  min-height: 100vh;
  display: flex;
}
body.admin-portal  { background: var(--a-bg); color: var(--a-text); }
body.waiter-portal { background: var(--w-bg); color: var(--w-text); }

/* Sidebar + Content wrapper */
.layout { display: flex; min-height: 100vh; width: 100%; }

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--m-bg2);
  border-right: 1px solid var(--m-border);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 700;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
}
.admin-portal  .sidebar { background: var(--a-bg2); border-color: var(--a-border); }
.waiter-portal .sidebar { background: var(--w-bg2); border-color: var(--w-border); }

/* Sidebar hidden on mobile */
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.5); }
}

/* Sidebar logo */
.sidebar-logo {
  padding: 20px 20px 16px;
  display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid var(--m-border);
}
.admin-portal .sidebar-logo { border-color: var(--a-border); }
.sidebar-logo-icon {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #fff; flex-shrink: 0;
}
.staff-portal  .sidebar-logo-icon { background: linear-gradient(135deg, var(--m-primary), var(--m-primary-d)); }
.admin-portal  .sidebar-logo-icon { background: linear-gradient(135deg, var(--a-primary), var(--a-primary-d)); }
.waiter-portal .sidebar-logo-icon { background: linear-gradient(135deg, var(--w-primary), var(--w-primary-d)); }
.sidebar-logo-text h2 { font-size: 15px; font-weight: 800; line-height: 1.2; }
.sidebar-logo-text span { font-size: 11px; color: var(--m-muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* Nav items */
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-section-title {
  font-size: 10px; font-weight: 700; letter-spacing: 1px;
  color: var(--m-muted); text-transform: uppercase;
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  color: var(--m-muted); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: var(--transition); margin-bottom: 2px;
  border: none; background: none; width: 100%; text-align: left;
}
.nav-item i { font-size: 20px; flex-shrink: 0; }
.nav-item:hover { background: rgba(255,255,255,0.05); color: var(--m-text); }
.nav-item.active {
  background: rgba(59,130,246,0.15); color: var(--m-primary); font-weight: 600;
}
.admin-portal  .nav-item.active { background: rgba(124,58,237,0.15); color: var(--a-primary); }
.waiter-portal .nav-item.active { background: rgba(16,185,129,0.15); color: var(--w-primary); }
.nav-item .nav-badge {
  margin-left: auto; background: var(--red); color: #fff;
  font-size: 10px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 99px; display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* Sidebar footer (user info + logout) */
.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--m-border);
}
.admin-portal .sidebar-footer { border-color: var(--a-border); }
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
}
.avatar-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 800; flex-shrink: 0;
  color: #fff;
}
.staff-portal  .avatar-circle { background: var(--m-primary); }
.admin-portal  .avatar-circle { background: var(--a-primary); }
.waiter-portal .avatar-circle { background: var(--w-primary); }
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-info strong { font-size: 13px; font-weight: 700; display: block; }
.sidebar-user-info span  { font-size: 11px; color: var(--m-muted); text-transform: capitalize; }
.logout-btn {
  background: none; border: none; color: var(--m-muted);
  font-size: 20px; cursor: pointer; padding: 4px;
  transition: color 0.15s;
}
.logout-btn:hover { color: var(--red); }

/* ── Overlay (mobile sidebar) ─────────────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.6); z-index: 699;
}
.sidebar-overlay.active { display: block; }

/* ── Main Content ─────────────────────────────────────────── */
.main-content {
  flex: 1; margin-left: 240px;
  display: flex; flex-direction: column; min-height: 100vh;
}
@media (max-width: 1023px) { .main-content { margin-left: 0; } }

/* ── Top Bar ──────────────────────────────────────────────── */
.topbar {
  height: 64px; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(15,23,42,0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--m-border);
  position: sticky; top: 0; z-index: 600;
}
.admin-portal  .topbar { background: rgba(13,13,26,0.95); border-color: var(--a-border); }
.waiter-portal .topbar { background: rgba(10,31,26,0.95); border-color: var(--w-border); }
.topbar-left { display: flex; align-items: center; gap: 12px; }
.hamburger-btn {
  display: none; background: none; border: none;
  color: var(--m-text); font-size: 24px; cursor: pointer; padding: 4px;
}
@media (max-width: 1023px) { .hamburger-btn { display: flex; } }
.topbar-title { font-size: 18px; font-weight: 800; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.topbar-date { font-size: 12px; color: var(--m-muted); }

/* ── Page Wrapper ─────────────────────────────────────────── */
.page-wrapper { padding: 24px; flex: 1; }
@media (max-width: 640px) { .page-wrapper { padding: 16px; } }

/* ── Stat Cards ───────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px; margin-bottom: 24px;
}
@media (min-width: 768px)  { .stat-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .stat-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-card {
  background: var(--m-bg2); border: 1px solid var(--m-border);
  border-radius: var(--radius); padding: 20px;
  transition: transform 0.2s, box-shadow 0.2s;
  animation: fade-in 0.4s ease both;
}
.admin-portal  .stat-card { background: var(--a-bg2); border-color: var(--a-border); }
.waiter-portal .stat-card { background: var(--w-bg2); border-color: var(--w-border); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}
.stat-icon.blue   { background: rgba(59,130,246,0.15); color: #3B82F6; }
.stat-icon.green  { background: rgba(16,185,129,0.15); color: #10B981; }
.stat-icon.amber  { background: rgba(245,158,11,0.15); color: #F59E0B; }
.stat-icon.red    { background: rgba(239,68,68,0.15);  color: #EF4444; }
.stat-icon.purple { background: rgba(139,92,246,0.15); color: #8B5CF6; }

.stat-value {
  font-size: 26px; font-weight: 900; line-height: 1;
  margin-bottom: 4px; font-variant-numeric: tabular-nums;
}
.stat-label { font-size: 12px; color: var(--m-muted); font-weight: 500; }
.admin-portal  .stat-label { color: var(--a-muted); }
.waiter-portal .stat-label { color: var(--w-muted); }

/* ── Panel / Card ─────────────────────────────────────────── */
.panel {
  background: var(--m-bg2); border: 1px solid var(--m-border);
  border-radius: var(--radius); overflow: hidden;
  margin-bottom: 20px;
}
.admin-portal  .panel { background: var(--a-bg2); border-color: var(--a-border); }
.waiter-portal .panel { background: var(--w-bg2); border-color: var(--w-border); }

.panel-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--m-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
}
.admin-portal  .panel-header { border-color: var(--a-border); }
.waiter-portal .panel-header { border-color: var(--w-border); }
.panel-title {
  font-size: 15px; font-weight: 700;
  display: flex; align-items: center; gap: 8px;
}
.panel-title i { font-size: 18px; color: var(--m-primary); }
.admin-portal  .panel-title i { color: var(--a-primary); }
.waiter-portal .panel-title i { color: var(--w-primary); }
.panel-body { padding: 20px; }

/* ── Data Table ───────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.data-table th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--m-muted);
  border-bottom: 1px solid var(--m-border);
  white-space: nowrap;
}
.admin-portal  .data-table th { color: var(--a-muted); border-color: var(--a-border); }
.waiter-portal .data-table th { color: var(--w-muted); border-color: var(--w-border); }
.data-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--m-border);
  vertical-align: middle;
}
.admin-portal  .data-table td { border-color: var(--a-border); }
.waiter-portal .data-table td { border-color: var(--w-border); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .td-mono { font-family: monospace; font-size: 13px; }
.data-table .td-muted { color: var(--m-muted); font-size: 13px; }

/* ── Forms (Staff Portals) ────────────────────────────────── */
.staff-form .form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 640px) { .staff-form .form-grid-2 { grid-template-columns: 1fr; } }
.staff-form .form-group { margin-bottom: 16px; }
.staff-form label {
  display: block; font-size: 12px; font-weight: 700;
  color: var(--m-muted); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.3px;
}
.admin-portal .staff-form label { color: var(--a-muted); }
.staff-form input,
.staff-form select,
.staff-form textarea {
  width: 100%; background: var(--m-bg3);
  border: 1px solid var(--m-border); border-radius: var(--radius-sm);
  padding: 11px 14px; color: var(--m-text);
  font-size: 14px; font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.admin-portal .staff-form input,
.admin-portal .staff-form select,
.admin-portal .staff-form textarea {
  background: var(--a-bg3); border-color: var(--a-border); color: var(--a-text);
}
.staff-form input:focus,
.staff-form select:focus,
.staff-form textarea:focus {
  outline: none; border-color: var(--m-primary);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.admin-portal .staff-form input:focus,
.admin-portal .staff-form select:focus {
  border-color: var(--a-primary);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}
.staff-form select { appearance: none; cursor: pointer; }
.staff-form textarea { resize: vertical; min-height: 90px; }
.staff-form .form-hint { font-size: 11px; color: var(--m-muted); margin-top: 4px; }
.staff-form .form-error { font-size: 12px; color: var(--red); margin-top: 4px; display: flex; align-items: center; gap: 4px; }

/* Toggle Switch */
.toggle-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}
.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;   /* ← prevents collapsing into label */
  display: inline-block;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  padding: 0;
}
.toggle-track {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: var(--m-bg3);
  transition: background 0.2s, border-color 0.2s;
  border: 1px solid var(--m-border);
}
.toggle-switch input:checked ~ .toggle-track { background: var(--m-primary); border-color: var(--m-primary); }
.admin-portal .toggle-switch input:checked ~ .toggle-track { background: var(--a-primary); border-color: var(--a-primary); }
.toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
  pointer-events: none;  /* ← clicks pass through to the input */
  z-index: 1;
}
.toggle-switch input:checked ~ .toggle-thumb { transform: translateX(20px); }
.toggle-label {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
}

/* ── Staff Buttons ────────────────────────────────────────── */
.btn-staff {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; font-family: inherit;
  cursor: pointer; border: none; transition: var(--transition);
  white-space: nowrap;
}
.btn-staff-primary {
  background: var(--m-primary); color: #fff;
}
.btn-staff-primary:hover { background: var(--m-primary-d); }
.admin-portal .btn-staff-primary { background: var(--a-primary); }
.admin-portal .btn-staff-primary:hover { background: var(--a-primary-d); }
.waiter-portal .btn-staff-primary { background: var(--w-primary); }
.waiter-portal .btn-staff-primary:hover { background: var(--w-primary-d); }

.btn-staff-ghost {
  background: transparent; color: var(--m-muted);
  border: 1px solid var(--m-border);
}
.btn-staff-ghost:hover { border-color: var(--m-primary); color: var(--m-text); }
.btn-staff-danger { background: rgba(239,68,68,0.12); color: #EF4444; border: 1px solid rgba(239,68,68,0.25); }
.btn-staff-danger:hover { background: rgba(239,68,68,0.2); }
.btn-staff-success { background: rgba(16,185,129,0.12); color: #10B981; border: 1px solid rgba(16,185,129,0.25); }
.btn-staff-success:hover { background: rgba(16,185,129,0.2); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-icon { padding: 8px; width: 36px; height: 36px; justify-content: center; }

/* ── Login Page ───────────────────────────────────────────── */
body.login-page {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  padding: 24px;
  background: var(--m-bg);
}
.admin-portal.login-page  { background: var(--a-bg); }
.waiter-portal.login-page { background: var(--w-bg); }
.login-card {
  width: 100%; max-width: 420px;
  background: var(--m-bg2); border: 1px solid var(--m-border);
  border-radius: var(--radius-xl); padding: 36px;
  animation: fade-in 0.4s ease;
}
.admin-portal  .login-card { background: var(--a-bg2); border-color: var(--a-border); }
.waiter-portal .login-card { background: var(--w-bg2); border-color: var(--w-border); }
.login-logo {
  display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
}
.login-logo-icon {
  width: 52px; height: 52px; border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; color: #fff;
}
.staff-portal  .login-logo-icon { background: linear-gradient(135deg,var(--m-primary),var(--m-primary-d)); }
.admin-portal  .login-logo-icon { background: linear-gradient(135deg,var(--a-primary),var(--a-primary-d)); }
.waiter-portal .login-logo-icon { background: linear-gradient(135deg,var(--w-primary),var(--w-primary-d)); }
.login-logo h1 { font-size: 20px; font-weight: 800; line-height: 1.2; }
.login-logo h1 small { display: block; font-size: 13px; font-weight: 400; color: var(--m-muted); }
.alert-error {
  background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25);
  color: #FCA5A5; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-warning {
  background: rgba(245,158,11,0.1); border: 1px solid rgba(245,158,11,0.25);
  color: #FDE68A; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.alert-success {
  background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25);
  color: #6EE7B7; border-radius: var(--radius-sm);
  padding: 12px 14px; font-size: 13px; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* ── Waiter Mobile Bottom Nav ─────────────────────────────── */
.waiter-bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 700;
  background: var(--w-bg2); border-top: 1px solid var(--w-border);
  display: flex;
  padding-bottom: env(safe-area-inset-bottom);
}
.waiter-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 10px 4px 8px; gap: 4px;
  color: var(--w-muted); font-size: 10px; font-weight: 600;
  text-decoration: none; transition: color 0.15s;
  border: none; background: none; cursor: pointer; font-family: inherit;
}
.waiter-nav-item i { font-size: 24px; }
.waiter-nav-item.active { color: var(--w-primary); }
body.waiter-portal .page-wrapper { padding-bottom: 90px; }

/* ── Search / Filter Bar ──────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px; align-items: center;
}
.search-input-wrap { position: relative; flex: 1; min-width: 180px; }
.search-input-wrap i {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  font-size: 18px; color: var(--m-muted);
}
.search-input {
  width: 100%; background: var(--m-bg2);
  border: 1px solid var(--m-border); border-radius: var(--radius-sm);
  padding: 10px 14px 10px 40px; color: var(--m-text);
  font-size: 14px; font-family: inherit;
}
.admin-portal .search-input { background: var(--a-bg2); border-color: var(--a-border); color: var(--a-text); }
.search-input:focus { outline: none; border-color: var(--m-primary); }
.admin-portal .search-input:focus { border-color: var(--a-primary); }
.filter-select {
  background: var(--m-bg2); border: 1px solid var(--m-border);
  border-radius: var(--radius-sm); padding: 10px 14px;
  color: var(--m-text); font-family: inherit; font-size: 13px;
  cursor: pointer;
}
.admin-portal .filter-select { background: var(--a-bg2); border-color: var(--a-border); color: var(--a-text); }
.filter-select:focus { outline: none; border-color: var(--m-primary); }

/* ── Pagination ───────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 4px;
  justify-content: center; padding: 16px;
}
.page-btn {
  min-width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--m-border); background: var(--m-bg2); color: var(--m-muted);
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--m-primary); color: var(--m-primary); }
.page-btn.active { background: var(--m-primary); border-color: var(--m-primary); color: #fff; }
.admin-portal .page-btn.active { background: var(--a-primary); border-color: var(--a-primary); }

/* ── Order Card (Waiter mobile) ───────────────────────────── */
.order-card {
  background: var(--w-bg2); border: 1px solid var(--w-border);
  border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; animation: fade-in 0.3s ease both;
  transition: border-color 0.2s;
}
.order-card:hover { border-color: rgba(16,185,129,0.3); }
.order-card-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.order-card-id { font-size: 13px; font-weight: 700; font-family: monospace; color: var(--w-primary); }
.order-card-time { font-size: 11px; color: var(--w-muted); }
.order-card-table { font-size: 18px; font-weight: 800; margin-bottom: 6px; }
.order-card-items { font-size: 13px; color: var(--w-muted); margin-bottom: 12px; }
.order-card-footer { display: flex; justify-content: space-between; align-items: center; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-value { font-size: 20px; }
  .stat-card  { padding: 14px; }
  .panel-body { padding: 14px; }
  .data-table th, .data-table td { padding: 10px 12px; }
  .filter-bar { flex-direction: column; }
  .search-input-wrap { min-width: 100%; }
}

@media (min-width: 768px) {
  .stat-grid { grid-template-columns: repeat(3,1fr); }
}

@media (min-width: 1280px) {
  .stat-grid { grid-template-columns: repeat(4,1fr); }
  .panel-body { padding: 24px; }
}

/* ── Admin/Manager border fix ─────────────────────────────── */
.admin-portal  .filter-select:focus { border-color: var(--a-primary); }
.admin-portal  .page-btn:hover  { border-color: var(--a-primary); color: var(--a-primary); }
.admin-portal  .btn-staff-ghost { border-color: var(--a-border); color: var(--a-muted); }
.admin-portal  .btn-staff-ghost:hover { border-color: var(--a-primary); color: var(--a-text); }
.admin-portal  .toggle-switch input:checked ~ .toggle-track { background: var(--a-primary); border-color: var(--a-primary); }
.admin-portal  .toggle-switch input:checked ~ .toggle-thumb { transform: translateX(20px); }
.waiter-portal .toggle-switch input:checked ~ .toggle-track { background: var(--w-primary); border-color: var(--w-primary); }
.admin-portal .data-table .td-muted { color: var(--a-muted); }
.staff-form code { font-family: monospace; font-size: 12px; background: rgba(255,255,255,0.08); padding: 2px 6px; border-radius: 4px; }

/* ── Coupon Code Display ──────────────────────────────────── */
.coupon-code-display {
  font-family: 'Courier New', monospace;
  font-size: 14px; font-weight: 800;
  background: rgba(124,58,237,0.1);
  border: 1px dashed rgba(124,58,237,0.3);
  color: #C4B5FD; padding: 5px 12px;
  border-radius: 8px; letter-spacing: 1.5px;
  display: inline-block;
}

/* ── Animated pulse dot (active status badge) ──────────────── */
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.7); }
}

/* ── Confirm Dialog Modal ─────────────────────────────────── */
#confirm-overlay {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,0.75);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
#confirm-overlay.active { display: flex; animation: fade-in 0.2s ease; }
#confirm-dialog {
  background: var(--m-bg2); border: 1px solid var(--m-border);
  border-radius: var(--radius-lg); padding: 28px;
  max-width: 420px; width: 100%;
  animation: pop-in 0.25s cubic-bezier(0.34,1.56,0.64,1);
}
.admin-portal  #confirm-dialog { background: var(--a-bg2); border-color: var(--a-border); }
.waiter-portal #confirm-dialog { background: var(--w-bg2); border-color: var(--w-border); }
#confirm-dialog h3  { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
#confirm-dialog p   { font-size: 14px; color: var(--m-muted); margin-bottom: 24px; line-height: 1.6; }
.admin-portal  #confirm-dialog p { color: var(--a-muted); }
#confirm-dialog .confirm-btns { display: flex; gap: 10px; }
#confirm-dialog .confirm-btns .btn-staff { flex: 1; justify-content: center; }

/* ── Live Order Board Card (Manager Dashboard) ────────────── */
.order-board-card {
  background: var(--m-bg2); border: 1px solid var(--m-border);
  border-radius: var(--radius); padding: 14px;
  transition: var(--transition); cursor: pointer;
}
.order-board-card:hover { border-color: rgba(59,130,246,0.4); transform: translateY(-1px); }
.order-board-card.urgent { border-color: rgba(239,68,68,0.4); }
.order-board-card .order-num { font-family: monospace; font-size: 12px; color: var(--m-primary); font-weight: 700; }
.order-board-card .table-lbl { font-size: 16px; font-weight: 800; margin: 4px 0; }
.order-board-card .item-list { font-size: 12px; color: var(--m-muted); margin-bottom: 10px; line-height: 1.6; }
.order-board-card .card-footer { display: flex; align-items: center; justify-content: space-between; gap: 6px; }

/* ── Revenue Bar (Dashboard chart) ───────────────────────── */
.rev-bar-wrap { display: flex; align-items: flex-end; gap: 8px; height: 160px; }
.rev-bar-col  { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.rev-bar      { width: 100%; border-radius: 6px 6px 0 0; min-height: 6px; transition: height 0.5s ease; }
.rev-bar-lbl  { font-size: 10px; color: var(--m-muted); }

/* ── Table Card (Tables Manager) ─────────────────────────── */
.table-qr-card:hover {
  border-color: rgba(59,130,246,0.35) !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.table-qr-card { transition: all 0.2s ease; }

/* ── Admin Page Grid (2-column layouts) ───────────────────── */
@media (max-width: 1023px) {
  [style*="grid-template-columns:1fr 380px"],
  [style*="grid-template-columns:1fr 360px"],
  [style*="grid-template-columns:1fr 340px"],
  [style*="grid-template-columns:1fr 320px"],
  [style*="grid-template-columns:2fr 1fr"],
  [style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* ── Status Progress Steps ────────────────────────────────── */
.status-stepper { display: flex; align-items: center; gap: 0; }
.status-step {
  display: flex; align-items: center; gap: 0;
  flex: 1; position: relative;
}
.status-step-dot {
  width: 28px; height: 28px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; flex-shrink: 0;
  border: 2px solid var(--m-border);
  background: var(--m-bg3); color: var(--m-muted);
  position: relative; z-index: 1;
}
.status-step.done   .status-step-dot { background: var(--green);       border-color: var(--green);     color: #fff; }
.status-step.active .status-step-dot { background: var(--m-primary);   border-color: var(--m-primary); color: #fff;
  box-shadow: 0 0 0 4px rgba(59,130,246,0.2); }
.status-step-line {
  flex: 1; height: 2px; background: var(--m-border);
}
.status-step.done .status-step-line { background: var(--green); }

/* ── Badge colors extra ───────────────────────────────────── */
.badge-amber { background: rgba(245,158,11,0.15); color: #FDE68A; }
.badge-red   { background: rgba(239,68,68,0.15);  color: #FCA5A5; }
.badge-teal  { background: rgba(20,184,166,0.15); color: #5EEAD4; }

/* ── print-only helpers ───────────────────────────────────── */
@media print {
  .sidebar, .topbar, .topbar, .waiter-bottom-nav,
  .filter-bar, .btn-staff, .pagination { display: none !important; }
  .main-content { margin-left: 0 !important; }
  body { background: #fff !important; color: #000 !important; }
  .data-table th, .data-table td { border-color: #ccc !important; color: #000 !important; }
  .panel { border-color: #ccc !important; background: #fff !important; }
}

/* ── Misc micro-interactions ─────────────────────────────── */
.btn-staff:active { transform: scale(0.97); }
.stat-card:active { transform: scale(0.99); }
input[type="file"]::-webkit-file-upload-button {
  background: var(--m-primary); color: #fff; border: none;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 12px;
}

