/* =============================================
   CED Meal Express — Main Stylesheet
   Mobile-First | White Background | Elegant
   ============================================= */

/* CED Meal Express - SaaS Design System - Arial Font */

/* ── CSS Variables ── */
:root {
  --primary:       #1a6b3a;
  --primary-light: #28a05a;
  --primary-pale:  #e8f5ee;
  --accent:        #e8a020;
  --accent-light:  #fff3d6;
  --danger:        #dc3545;
  --danger-pale:   #fdecea;
  --success:       #198754;
  --success-pale:  #d1f0de;
  --text:          #1a1a2e;
  --text-muted:    #6b7280;
  --border:        #e8ecf0;
  --bg:            #ffffff;
  --bg-soft:       #f8fafc;
  --shadow-sm:     0 1px 4px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,.09), 0 1px 4px rgba(0,0,0,.05);
  --shadow-lg:     0 12px 40px rgba(0,0,0,.13), 0 4px 16px rgba(0,0,0,.07);
  --radius:        14px;
  --radius-sm:     8px;
  --radius-lg:     20px;
  --font-head:     Arial, Helvetica, sans-serif;
  --font-body:     Arial, Helvetica, sans-serif;
  --nav-h:         64px;
  --bottom-nav-h:  70px;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-tap-highlight-color: transparent; }
body {
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  letter-spacing: .01em;
}
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-body); }
input, select, textarea {
  font-family: var(--font-body);
  font-size: 15px;
  outline: none;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  background: var(--bg);
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
  -webkit-appearance: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,58,.12);
}
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; }
textarea { resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }

/* ═══════════════════════════════════════
   AUTH PAGE
═══════════════════════════════════════ */
.auth-body {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(26,107,58,.18) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 20%, rgba(14,165,233,.12) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 85%, rgba(232,160,32,.12) 0%, transparent 45%),
    linear-gradient(160deg, #0f2818 0%, #1a3a26 40%, #0d3321 100%);
  min-height: 100vh;
}

.auth-wrap {
  max-width: 420px;
  margin: 0 auto;
  padding: 40px 20px 40px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.auth-logo {
  text-align: center;
  padding: 32px 0 24px;
}
/* Round Logo */
.logo-round-wrap {
  display: inline-block;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 12px;
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 7px var(--primary),
    0 8px 32px rgba(26,107,58,.25);
  animation: floatIcon 3.5s ease-in-out infinite;
  position: relative;
}
.logo-round-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255,255,255,.12) 0%, transparent 60%);
  pointer-events: none;
}
.logo-round-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 15%;
  display: block;
  border-radius: 50%;
}
@keyframes floatIcon {
  0%,100% { transform: translateY(0) rotate(0deg); }
  40%      { transform: translateY(-7px) rotate(-2deg); }
  60%      { transform: translateY(-5px) rotate(2deg); }
}

/* Top bar mini logo */
.top-logo-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 15%;
  border: 2px solid var(--primary);
  vertical-align: middle;
  margin-right: 5px;
  box-shadow: 0 2px 8px rgba(26,107,58,.2);
  display: inline-block;
}
.logo-title {
  font-family: var(--font-head);
  font-size: 28px;
  color: #fff;
  letter-spacing: -.3px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.logo-sub {
  color: rgba(255,255,255,.65);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 400;
}

/* Tabs — Glass */
.auth-tabs {
  display: flex;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  padding: 4px;
  gap: 2px;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.12);
}
.tab-btn {
  flex: 1;
  padding: 10px 6px;
  border-radius: calc(var(--radius) - 4px);
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.65);
  background: transparent;
  transition: all .2s;
}
.tab-btn.active {
  background: rgba(255,255,255,.18);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 2px 10px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.2);
}

/* Tab Panes */
.tab-pane { display: none; animation: fadeIn .25s ease; }
.tab-pane.active { display: block; }
@keyframes fadeIn { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } }

/* Auth Card — Glassmorphism */
.auth-card {
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  box-shadow: 0 8px 32px rgba(0,0,0,.28), inset 0 1px 0 rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.18);
}


/* Admin Access Button */
.admin-access-wrap {
  margin-top: 20px;
  padding-bottom: 16px;
}
.admin-access-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.admin-access-divider::before,
.admin-access-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.admin-access-divider span {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  white-space: nowrap;
}
.btn-admin-access {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  box-shadow: var(--shadow-sm);
}
.btn-admin-access:hover {
  border-color: var(--primary);
  background: var(--primary-pale);
  box-shadow: 0 4px 16px rgba(26,107,58,.12);
  transform: translateY(-1px);
}
.btn-admin-access:active { transform: translateY(0); }
.baa-icon {
  font-size: 26px;
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--primary) 0%, #0d4d28 100%);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 3px 10px rgba(26,107,58,.25);
}
.baa-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.baa-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.baa-sub {
  font-size: 12px;
  color: var(--text-muted);
}
.baa-arrow {
  font-size: 22px;
  color: var(--text-muted);
  line-height: 1;
  font-weight: 300;
}
.btn-admin-access:hover .baa-arrow { color: var(--primary); }
.btn-admin-access:hover .baa-title { color: var(--primary); }

/* Not Registered Notice — Glass */
.no-account-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: rgba(255,255,255,.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: 13px;
  color: rgba(255,255,255,.8);
  margin-bottom: 12px;
  line-height: 1.45;
}
.na-icon { font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.no-account-notice strong { color: #7ef7a8; }

/* ═══════════════════════════════════════
   FORMS
═══════════════════════════════════════ */
.form-group {
  margin-bottom: 14px;
}
.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 6px;
}
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.pin-wrap { position: relative; }
.pin-wrap input { padding-right: 46px; }
.eye-btn {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: transparent;
  font-size: 16px;
  line-height: 1;
  padding: 4px;
  color: var(--text-muted);
}

.form-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.form-card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}
.form-card-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

/* Meal checkboxes */
.meal-checkbox-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.meal-check input[type="checkbox"] { display: none; }
.meal-check-box {
  display: block;
  padding: 8px 14px;
  border-radius: 40px;
  border: 2px solid var(--border);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
}
.meal-check input:checked + .meal-check-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ═══════════════════════════════════════
   BUTTONS
═══════════════════════════════════════ */
.btn-primary, .btn-secondary, .btn-ghost, .btn-success, .btn-danger {
  display: block;
  width: 100%;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  text-align: center;
  transition: all .2s;
  cursor: pointer;
}
.btn-primary  { background: var(--primary); color: #fff; }
.btn-primary:hover  { background: var(--primary-light); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,107,58,.3); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary{ background: var(--bg-soft); color: var(--primary); border: 1.5px solid var(--primary); }
.btn-secondary:hover{ background: var(--primary-pale); }
.btn-ghost    { background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); }
.btn-ghost:hover { border-color: var(--text-muted); }
.btn-success  { background: var(--success); color: #fff; }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-danger:hover  { background: #b02a37; }
.btn-success:hover { background: #157347; }

.btn-sm {
  width: auto;
  display: inline-block;
  padding: 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-sm);
}

button:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.loading-spinner::after {
  content: '';
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════
   ALERTS
═══════════════════════════════════════ */
.alert-box {
  display: none;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  margin-bottom: 12px;
  line-height: 1.45;
}
.alert-box.show { display: block; }
.alert-success { background: var(--success-pale); color: #155724; border-left: 3px solid var(--success); }
.alert-error   { background: var(--danger-pale);  color: #721c24; border-left: 3px solid var(--danger); }

/* ═══════════════════════════════════════
   TOP BAR
═══════════════════════════════════════ */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  height: var(--nav-h);
  box-shadow: 0 1px 12px rgba(0,0,0,.07);
}
.top-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 18px;
  max-width: 600px;
  margin: 0 auto;
}
.top-logo {
  font-family: var(--font-head);
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 4px;
}
.top-user {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  max-width: 130px;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.back-btn {
  font-size: 14px;
  color: var(--primary);
  font-weight: 600;
  padding: 4px 0;
}

/* ═══════════════════════════════════════
   PAGE WRAP
═══════════════════════════════════════ */
.page-wrap {
  max-width: 600px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--bottom-nav-h) + 24px);
}

/* Background layer so the glass card has colour to blur through */
.summary-card-bg {
  background:
    radial-gradient(ellipse at 20% 20%, #1a3a5c 0%, transparent 55%),
    radial-gradient(ellipse at 80% 80%, #2d1a4a 0%, transparent 55%),
    radial-gradient(ellipse at 60% 10%, #0f3d2a 0%, transparent 45%),
    linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border-radius: 28px;
  padding: 3px;
  margin-bottom: 14px;
  box-shadow:
    0 30px 80px rgba(0,0,0,.35),
    0 8px 24px rgba(0,0,0,.2);
}
.summary-card-bg .summary-card {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════
   SUMMARY CARD — Gray Glassmorphism 3D
═══════════════════════════════════════ */
.summary-card {
  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,.18) 0%,
      rgba(200,210,220,.12) 40%,
      rgba(150,165,180,.08) 100%
    );
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border-radius: 24px;
  padding: 22px;
  margin-bottom: 14px;
  color: #fff;

  /* 3D depth */
  border: 1.5px solid rgba(255,255,255,.28);
  box-shadow:
    0 2px 0   rgba(255,255,255,.35),       /* top highlight */
    0 8px 32px rgba(0,0,0,.28),             /* mid shadow     */
    0 24px 60px rgba(0,0,0,.22),            /* deep shadow    */
    0 1px 0 rgba(255,255,255,.5) inset,     /* inner top rim  */
    0 -1px 0 rgba(0,0,0,.15) inset;        /* inner bottom   */

  transform: perspective(900px) rotateX(1.2deg);
  transform-origin: center top;
  transition: transform .35s ease, box-shadow .35s ease;
  position: relative;
  overflow: hidden;
}
.summary-card:hover {
  transform: perspective(900px) rotateX(0deg) translateY(-3px);
  box-shadow:
    0 2px 0 rgba(255,255,255,.35),
    0 12px 40px rgba(0,0,0,.32),
    0 32px 80px rgba(0,0,0,.26),
    0 1px 0 rgba(255,255,255,.5) inset,
    0 -1px 0 rgba(0,0,0,.15) inset;
}

/* Glass sheen sweep — top-left diagonal */
.summary-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(255,255,255,.22) 0%,
    rgba(255,255,255,.06) 30%,
    transparent 60%
  );
  pointer-events: none;
  border-radius: inherit;
  z-index: 0;
}

/* Floating orb (subtle, desaturated) */
.summary-card::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.10) 0%, transparent 70%);
  pointer-events: none;
  animation: orbFloat1 7s ease-in-out infinite;
  z-index: 0;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-14px,10px) scale(1.07); }
}

.summary-month-row {
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

/* Month selector — dark glass pill */
.month-select {
  background: rgba(255,255,255,.92);
  border: 2px solid rgba(255,255,255,.95);
  color: #1e293b;
  border-radius: 10px;
  padding: 8px 34px 8px 14px;
  font-size: 14px;
  font-weight: 800;
  width: auto;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='7'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%231e293b' stroke-width='2' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  box-shadow: 0 4px 16px rgba(0,0,0,.18), 0 1px 4px rgba(0,0,0,.1);
  transition: all .2s;
  cursor: pointer;
}
.month-select:hover {
  background-color: #f8fafc;
  border-color: #fff;
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
  transform: translateY(-1px);
}
.month-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(255,255,255,.45), 0 4px 16px rgba(0,0,0,.18);
}
.month-select option { color: #1e293b; background: #fff; }

/* ── Meal count cells ── */
.summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
  position: relative;
  z-index: 2;
}
.summary-cell {
  background: rgba(255,255,255,.13);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 16px;
  padding: 16px 10px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: all .25s ease;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.3),
    0 4px 16px rgba(0,0,0,.15);
}
.summary-cell:hover {
  background: rgba(255,255,255,.22);
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.35),
    0 8px 28px rgba(0,0,0,.22);
}
.sc-icon  { font-size: 22px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
.sc-count {
  font-size: 28px;
  font-weight: 900;
  font-family: var(--font-head);
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.3);
}
.sc-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: rgba(255,255,255,.7);
}
.sc-price {
  font-size: 12px;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  margin-top: 2px;
}


/* Footer — glass pills */
.summary-footer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  position: relative;
  z-index: 2;
}
.sf-item {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 14px;
  padding: 13px 10px 10px;
  text-align: center;
  transition: all .22s ease;
  border: 1.5px solid transparent;
}
.sf-item:hover { transform: translateY(-2px); filter: brightness(1.08); }
.sf-item span   { display: block; font-size: 9.5px; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 5px; font-weight: 800; opacity: .85; white-space: nowrap; }
.sf-item strong { display: block; font-size: 16px; font-weight: 900; }

/* 1 — Current Month's Bill → Sky Blue */
.sf-total {
  background: linear-gradient(135deg, rgba(14,165,233,.35) 0%, rgba(56,189,248,.2) 100%);
  border-color: rgba(125,211,252,.4);
  box-shadow: 0 0 18px rgba(14,165,233,.2), inset 0 1px 0 rgba(255,255,255,.15);
}
.sf-total span   { color: #bae6fd; }
.sf-total strong { color: #e0f2fe; text-shadow: 0 2px 10px rgba(14,165,233,.5); }

/* 2 — Recurring Bill → Amber */
.sf-recurring {
  background: linear-gradient(135deg, rgba(245,158,11,.35) 0%, rgba(251,191,36,.2) 100%);
  border-color: rgba(252,211,77,.4);
  box-shadow: 0 0 18px rgba(245,158,11,.2), inset 0 1px 0 rgba(255,255,255,.12);
}
.sf-recurring span   { color: #fde68a; }
.sf-recurring strong { color: #fef3c7; text-shadow: 0 2px 10px rgba(245,158,11,.5); }

/* 3 — Last Paid Bill → Emerald Green */
.sf-paid {
  background: linear-gradient(135deg, rgba(16,185,129,.35) 0%, rgba(52,211,153,.2) 100%);
  border-color: rgba(110,231,183,.4);
  box-shadow: 0 0 18px rgba(16,185,129,.2), inset 0 1px 0 rgba(255,255,255,.12);
}
.sf-paid span   { color: #a7f3d0; }
.sf-paid strong { color: #d1fae5; text-shadow: 0 2px 10px rgba(16,185,129,.5); }

/* 4 — Total Pending → Red (always red; brighter when > 0) */
.sf-pending {
  background: linear-gradient(135deg, rgba(239,68,68,.30) 0%, rgba(220,38,38,.18) 100%);
  border-color: rgba(252,165,165,.35);
  box-shadow: 0 0 18px rgba(239,68,68,.18), inset 0 1px 0 rgba(255,255,255,.1);
}
.sf-pending.pending-due {
  background: linear-gradient(135deg, rgba(239,68,68,.55) 0%, rgba(185,28,28,.4) 100%);
  border-color: rgba(252,165,165,.6);
  box-shadow: 0 0 24px rgba(239,68,68,.35), inset 0 1px 0 rgba(255,200,200,.2);
}
.sf-pending span   { color: #fca5a5; }
.sf-pending strong { color: #fee2e2; text-shadow: 0 2px 10px rgba(239,68,68,.6); }

/* Micro sub-note inside Total Pending */
.sf-pending-note {
  display: block;
  font-size: 9px;
  color: rgba(254,226,226,.6);
  margin-top: 4px;
  font-weight: 600;
  letter-spacing: .03em;
}


/* ═══════════════════════════════════════
   FILTER CARD
═══════════════════════════════════════ */
.filter-card {
  background: var(--bg-soft);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  border: 1px solid var(--border);
}
.filter-title { font-size: 14px; font-weight: 600; margin-bottom: 12px; color: var(--text-muted); }
.filter-form { display: flex; flex-direction: column; gap: 10px; }
.filter-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ═══════════════════════════════════════
   SECTION TITLES
═══════════════════════════════════════ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0 10px;
}
.section-title h3 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.section-count {
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 20px;
}

/* ═══════════════════════════════════════
   DAY CARDS & MEAL CHIPS
═══════════════════════════════════════ */
.day-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .15s;
}
.day-card:active { transform: scale(.99); }
.day-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.day-date  { font-size: 13px; font-weight: 600; color: var(--text); }
.day-count { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.meal-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.meal-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.meal-breakfast { background: #fff8e7; color: #b45309; }
.meal-lunch     { background: #e8f5e9; color: #15803d; }
.meal-dinner    { background: #f0f0ff; color: #4338ca; }

/* ═══════════════════════════════════════
   BOTTOM NAV — Glass
═══════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottom-nav-h);
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-top: 1px solid rgba(255,255,255,.5);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 200;
  box-shadow: 0 -4px 30px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.8);
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  flex: 1;
  padding: 8px 4px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 500;
  transition: color .15s;
  text-decoration: none;
}
.bnav-item.active { color: var(--primary); }
.bnav-icon  { font-size: 22px; }
.bnav-label { font-size: 10px; font-weight: 600; letter-spacing: .02em; }

.bnav-scan { position: relative; flex: 0 0 72px; margin-top: -22px; }
.bnav-scan-btn {
  width: 62px; height: 62px;
  background: linear-gradient(135deg, var(--primary) 0%, #0d4d28 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  box-shadow: 0 4px 16px rgba(26,107,58,.4);
  transition: transform .2s, box-shadow .2s;
  border: 3px solid #fff;
}
.bnav-scan:hover .bnav-scan-btn,
.bnav-scan.active .bnav-scan-btn {
  transform: scale(1.08);
  box-shadow: 0 6px 24px rgba(26,107,58,.5);
}

/* ── Glyph Logout Button ──────────────────── */
.bnav-logout {
  flex: 0 0 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 6px 0 4px;
  cursor: pointer;
  text-decoration: none;
  background: transparent;
  border: none;
  position: relative;
  margin-top: -10px;
}
.bnav-logout-glyph {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  transition: transform .2s ease;
}
.bnav-logout:hover .bnav-logout-glyph { transform: scale(1.07); }
.bnav-logout:active .bnav-logout-glyph { transform: scale(.96); }

/* LOGOUT text badge */
.bnav-logout-badge {
  background: #fff;
  color: #b00020;
  border: 2.5px solid #c8001c;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .12em;
  padding: 3px 7px;
  line-height: 1;
  display: block;
  margin-bottom: -6px;
  position: relative;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(176,0,32,.25);
}

/* Red circle with door-arrow icon */
.bnav-logout-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 40% 30%, #ff2244 0%, #c8001c 55%, #8b0014 100%);
  box-shadow:
    0 0 0 3px rgba(200,0,28,.2),
    0 4px 16px rgba(176,0,32,.45),
    inset 0 2px 0 rgba(255,120,140,.35),
    inset 0 -2px 4px rgba(0,0,0,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow .2s, background .2s;
  position: relative;
  z-index: 1;
}
.bnav-logout:hover .bnav-logout-circle {
  background: radial-gradient(ellipse at 40% 30%, #ff4466 0%, #e0001e 55%, #9b0016 100%);
  box-shadow:
    0 0 0 3px rgba(200,0,28,.3),
    0 6px 22px rgba(176,0,32,.6),
    inset 0 2px 0 rgba(255,120,140,.4),
    inset 0 -2px 4px rgba(0,0,0,.3);
}
/* SVG icon inside circle */
.bnav-logout-icon {
  width: 24px;
  height: 24px;
  color: #fff;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,.4));
}

/* ═══════════════════════════════════════
   SCANNER PAGE
═══════════════════════════════════════ */
.scanner-body { background: #0d1117; }
.scanner-body .top-bar { background: #161b22; border-color: #30363d; }
.scanner-body .top-logo { color: #4ade80; }
.scanner-body .top-user { color: #8b949e; }
.scanner-body .back-btn { color: #4ade80; }

.scanner-wrap {
  max-width: 480px;
  margin: 0 auto;
  padding: 16px 16px calc(var(--bottom-nav-h) + 24px);
}

/* Meal Time Card */
.meal-time-card {
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  transition: all .3s;
}
.meal-time-card.active-meal {
  background: linear-gradient(135deg, #0d3321 0%, #092b1c 100%);
  border: 1px solid #1a6b3a;
}
.meal-time-card.no-meal {
  background: #1a1a2e;
  border: 1px solid #2d2d4e;
}
.mtc-icon { font-size: 36px; }
.mtc-info { flex: 1; }
.mtc-type { display: block; color: #e5e7eb; font-weight: 600; font-size: 16px; }
.mtc-time { display: block; color: #9ca3af; font-size: 13px; margin-top: 2px; }
.mtc-status { font-size: 12px; }
.dot-green, .dot-red {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  margin-right: 5px;
}
.dot-green { background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: pulse 2s infinite; }
.dot-red   { background: #f87171; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.4} }

/* QR Scanner Container */
.qr-scanner-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.qr-scanner-frame {
  position: relative;
  width: 280px; height: 280px;
  border-radius: 20px;
  overflow: hidden;
}
#reader { width: 280px !important; height: 280px !important; }
#reader video { object-fit: cover !important; border-radius: 16px; }
#reader img, #reader > div > div:first-child { display: none !important; }

/* Corner Brackets */
.scan-corners { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.corner {
  position: absolute;
  width: 28px; height: 28px;
  border-color: #4ade80;
  border-style: solid;
}
.corner.tl { top: 10px; left: 10px; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.corner.tr { top: 10px; right: 10px; border-width: 3px 3px 0 0; border-radius: 0 4px 0 0; }
.corner.bl { bottom: 10px; left: 10px; border-width: 0 0 3px 3px; border-radius: 0 0 0 4px; }
.corner.br { bottom: 10px; right: 10px; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

/* Scan Line */
.scan-line {
  position: absolute;
  left: 14px; right: 14px;
  height: 2px;
  background: linear-gradient(90deg, transparent, #4ade80, transparent);
  border-radius: 2px;
  z-index: 11;
  animation: scanMove 2s ease-in-out infinite;
  box-shadow: 0 0 10px #4ade80, 0 0 20px rgba(74,222,128,.4);
}
@keyframes scanMove {
  0%   { top: 20px; }
  50%  { top: calc(100% - 22px); }
  100% { top: 20px; }
}

.scan-hint {
  color: #6b7280;
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
}
.cam-error {
  color: #f87171;
  font-size: 14px;
  text-align: center;
  padding: 40px 20px;
  line-height: 1.6;
}

/* Scan Result Overlay */
.scan-result-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 24px;
  backdrop-filter: blur(6px);
}
.scan-result-card {
  background: #fff;
  border-radius: 24px;
  padding: 36px 28px;
  text-align: center;
  max-width: 340px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.result-success { border-top: 5px solid var(--success); }
.result-error   { border-top: 5px solid var(--danger); }
.src-icon  { font-size: 64px; display: block; margin-bottom: 16px; }
.src-title { font-family: var(--font-head); font-size: 22px; margin-bottom: 10px; color: var(--text); }
.src-msg   { color: var(--text-muted); font-size: 14px; white-space: pre-line; margin-bottom: 24px; line-height: 1.6; }
@keyframes popIn {
  0%   { transform: scale(.6); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════
   LEAVE PAGE
═══════════════════════════════════════ */
.info-banner {
  background: var(--accent-light);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: #92400e;
  margin-bottom: 14px;
  border: 1px solid #fcd34d;
}
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.status-pending  { background: #fff3cd; color: #856404; }
.status-approved { background: var(--success-pale); color: var(--success); }
.status-rejected { background: var(--danger-pale); color: var(--danger); }
.leave-reason {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 6px;
  font-style: italic;
}
.leave-actions { display: flex; gap: 8px; margin-top: 10px; }

/* ═══════════════════════════════════════
   ADMIN STYLES
═══════════════════════════════════════ */
.admin-body {
  background:
    radial-gradient(ellipse at 0% 0%, rgba(26,107,58,.07) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 100%, rgba(14,165,233,.05) 0%, transparent 50%),
    #f4f6f9;
}

/* ═══════════════════════════════════════
   ADMIN HEADER — Photo Background + Frosted Nav
═══════════════════════════════════════ */
.admin-header {
  position: relative;
  z-index: 100;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,.15);
}

/* Full-bleed food photo background */
.admin-header-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.admin-header-bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  display: block;
  filter: brightness(.75) saturate(1.2);
  transform: scale(1.05);
  transition: transform 10s ease;
}
.admin-header:hover .admin-header-bg-img {
  transform: scale(1.0);
}
.admin-header-bg-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0,0,0,.55) 0%,
    rgba(0,0,0,.25) 55%,
    rgba(0,0,0,.6) 100%
  );
}

/* ── Frosted glass topbar ── */
.admin-topbar {
  position: relative;
  z-index: 10;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 2px 12px rgba(0,0,0,.1);
}
.admin-topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  gap: 12px;
}

/* Logo */
.admin-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.admin-logo-img {
  width: 34px !important;
  height: 34px !important;
  border: 2.5px solid var(--primary) !important;
  box-shadow: 0 2px 10px rgba(26,107,58,.25) !important;
}
.admin-logo-text {
  font-size: 17px;
  font-weight: 800;
  color: #111 !important;
  letter-spacing: -.3px;
  white-space: nowrap;
}

/* Hero text over the photo */
.admin-header-hero {
  position: relative;
  z-index: 5;
  padding: 20px 0 22px;
}
.admin-header-hero-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.admin-hero-title {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  line-height: 1.1;
  text-shadow: 0 2px 16px rgba(0,0,0,.5);
  letter-spacing: -.4px;
  margin: 0;
}
.admin-hero-sub {
  font-size: 13px;
  color: rgba(255,255,255,.82);
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0,0,0,.4);
  margin: 0;
}
.admin-meal-banner-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.3);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 20px;
  width: fit-content;
}
/* ── Nav links ── */
.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: nowrap;
}
.alink {
  padding: 7px 11px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
  color: #222 !important;
  transition: all .15s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}
.alink:hover { background: rgba(26,107,58,.1); color: var(--primary) !important; }
.alink.active {
  background: var(--primary);
  color: #fff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(26,107,58,.25);
}
.alink.active:hover { background: var(--primary-light); }
.alink-out { color: var(--danger) !important; }
.alink-out:hover { background: rgba(220,38,38,.08) !important; color: var(--danger) !important; }


.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.admin-page-title {
  font-family: var(--font-head);
  font-size: 26px;
  color: var(--text);
  margin-bottom: 4px;
}
.admin-page-sub {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}
.admin-page-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-page-hd .admin-page-title { margin: 0; }

/* Stats Grid — Glassmorphism */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: rgba(255,255,255,.75);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 4px 24px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  transition: transform .2s, box-shadow .2s;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, rgba(26,107,58,.3), transparent);
  border-radius: 2px 2px 0 0;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,.12), inset 0 1px 0 rgba(255,255,255,.9); }
.stat-card.stat-green {
  border-left: 4px solid var(--primary);
  background: linear-gradient(135deg, rgba(232,245,238,.9) 0%, rgba(255,255,255,.85) 100%);
}
.stat-icon { font-size: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.15)); }
.stat-val  { font-size: 30px; font-weight: 800; font-family: var(--font-head); color: var(--text); letter-spacing: -.5px; }
.stat-label{ font-size: 11.5px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }

/* Quick Actions */
.quick-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.qa-btn {
  padding: 10px 18px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: all .15s;
  display: inline-block;
}
.qa-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-pale); }

/* Admin Section */
.admin-section { margin-bottom: 32px; }

/* Table */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.admin-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--bg);
  font-size: 14px;
  min-width: 480px;
}
.admin-table th {
  padding: 12px 14px;
  background: var(--bg-soft);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg-soft); }
.table-total-row td { background: var(--bg-soft) !important; font-weight: 700; font-size: 15px; }

/* User Card */
.user-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.uc-main  { display: flex; align-items: center; gap: 14px; flex: 1; min-width: 0; }
.uc-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary) 0%, #0d4d28 100%);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px;
  flex-shrink: 0;
}
.uc-avatar.small { width: 34px; height: 34px; font-size: 14px; }
.uc-info  { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.uc-name  { font-weight: 600; font-size: 15px; }
.uc-phone { font-size: 12px; color: var(--text-muted); }
.uc-joined{ font-size: 11px; color: #9ca3af; }
.uc-actions { display: flex; gap: 6px; flex-wrap: wrap; }

/* Bill Card */
.bill-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
.bill-card.bill-pending { border-left: 3px solid var(--accent); }
.bill-card.bill-clear   { border-left: 3px solid var(--success); }
.bill-user    { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bill-amounts { display: flex; gap: 12px; font-size: 13px; flex-wrap: wrap; }
.bill-amounts span { color: var(--text-muted); }
.bill-amounts strong { display: inline; }
.bill-actions { display: flex; align-items: center; }

/* Text helpers */
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

/* Search Bar */
.search-bar-wrap { margin-bottom: 14px; }
.search-form { display: flex; gap: 8px; }
.search-input { flex: 1; }

/* Collapsible Panel */
.collapsible-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.collapsible-panel.open { max-height: 600px; }

/* UID Badge */
.uid-badge {
  display: inline-block;
  background: var(--primary-pale);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 5px;
  letter-spacing: .05em;
  font-family: 'Courier New', monospace;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
  opacity: .5;
}
.empty-state p { font-size: 14px; }

/* Info Card */
.info-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 14px;
}
.info-card-title { font-size: 16px; font-weight: 600; margin-bottom: 14px; }

.admin-header .top-logo-img {
  width: 34px;
  height: 34px;
}
.time-windows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.tw-item { display: flex; align-items: center; gap: 12px; }
.tw-icon { font-size: 24px; }
.tw-details { display: flex; flex-direction: column; }
.tw-name { font-weight: 600; font-size: 14px; }
.tw-time { font-size: 13px; color: var(--text-muted); }
.tw-note {
  font-size: 12.5px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 10px 12px;
  border-radius: 8px;
  line-height: 1.6;
}
.tw-note code {
  background: var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11px;
}

/* QR Display */
.qr-display-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  gap: 10px;
}
.qr-token-text { font-size: 12px; color: var(--text-muted); }
.qr-token-text code { background: var(--bg-soft); padding: 2px 7px; border-radius: 5px; }

/* Price Input */
.price-input-wrap { text-align: center; }
.price-input-wrap input { text-align: center; font-size: 22px; font-weight: 700; }

/* Report Header */
.report-header-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.report-header-card h3 { font-size: 18px; margin-bottom: 4px; font-family: var(--font-head); }
.report-header-card p  { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }
.price-ref-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--bg-soft);
  padding: 8px 12px;
  border-radius: 8px;
}


/* ═══════════════════════════════════════
   ADMIN LOGIN MODAL (Bottom Sheet)
═══════════════════════════════════════ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal-overlay.open {
  display: flex;
}
.modal-sheet {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 480px;
  padding: 12px 24px 40px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.22);
  animation: sheetSlideUp .35s cubic-bezier(.32,1.2,.64,1) forwards;
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-logo {
  text-align: center;
  margin-bottom: 22px;
}
.modal-lock-icon {
  font-size: 40px;
  width: 72px; height: 72px;
  background: linear-gradient(135deg, var(--primary) 0%, #0d4d28 100%);
  border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 6px 20px rgba(26,107,58,.3);
}
.modal-title {
  font-family: var(--font-head);
  font-size: 22px;
  color: var(--text);
  margin-bottom: 4px;
}
.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
}
.modal-body { display: flex; flex-direction: column; gap: 0; }


/* ═══════════════════════════════════════
   FACE CAPTURE & RECOGNITION
═══════════════════════════════════════ */

/* Status Bar */
.face-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-soft);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
}
.scanner-body .face-status-bar {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.1);
  color: #d1d5db;
}
.fc-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  transition: background .3s;
}
.dot-green  { background: #4ade80; box-shadow: 0 0 8px #4ade80; animation: pulse 1.8s infinite; }
.dot-yellow { background: #fbbf24; box-shadow: 0 0 6px #fbbf24; }
.dot-red    { background: #f87171; }
.dot-blue   { background: #60a5fa; box-shadow: 0 0 6px #60a5fa; animation: pulse 1.8s infinite; }

/* Camera Container */
.face-cam-container {
  position: relative;
  width: 100%;
  max-width: 340px;
  height: 340px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  background: #1a1a2e;
  box-shadow: 0 8px 32px rgba(0,0,0,.3);
  flex-shrink: 0;
}
.face-cam-container video {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transform: scaleX(-1); /* Mirror front cam */
}
.face-cam-container canvas {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  transform: scaleX(-1);
}

/* Circle Guide */
.face-circle-guide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.face-circle-guide::before {
  content: '';
  width: 62%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 3px solid rgba(255,255,255,.4);
  transition: border-color .25s, box-shadow .25s;
}
.guide-default::before { border-color: rgba(255,255,255,.35); }
.guide-yellow::before  {
  border-color: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251,191,36,.2), inset 0 0 20px rgba(251,191,36,.08);
  animation: guidePulse 1s ease-in-out infinite;
}
.guide-green::before   {
  border-color: #4ade80;
  box-shadow: 0 0 0 6px rgba(74,222,128,.25), inset 0 0 24px rgba(74,222,128,.1);
  animation: guidePulse .6s ease-in-out infinite;
}
.guide-red::before     {
  border-color: #f87171;
  box-shadow: 0 0 0 4px rgba(248,113,113,.2);
}
@keyframes guidePulse {
  0%,100% { transform: scale(1); }
  50%      { transform: scale(1.025); }
}

/* Corner brackets inside circle area */
.fc-corner {
  position: absolute;
  width: 22px; height: 22px;
  border-color: rgba(255,255,255,.7);
  border-style: solid;
}
.fc-tl { top: 18%; left: 18%; border-width: 2.5px 0 0 2.5px; border-radius: 3px 0 0 0; }
.fc-tr { top: 18%; right: 18%; border-width: 2.5px 2.5px 0 0; border-radius: 0 3px 0 0; }
.fc-bl { bottom: 18%; left: 18%; border-width: 0 0 2.5px 2.5px; border-radius: 0 0 0 3px; }
.fc-br { bottom: 18%; right: 18%; border-width: 0 2.5px 2.5px 0; border-radius: 0 0 3px 0; }

/* Hint text inside camera */
.face-hint {
  position: absolute;
  bottom: 14px; left: 0; right: 0;
  text-align: center;
  color: rgba(255,255,255,.85);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  text-shadow: 0 1px 6px rgba(0,0,0,.6);
}

/* Captured preview overlay */
.fc-preview-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  border-radius: 20px;
  transform: scaleX(-1);
}
.fc-captured-badge {
  position: absolute;
  bottom: 14px; left: 50%; transform: translateX(-50%);
  background: rgba(74,222,128,.92);
  color: #fff;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

/* Face Progress Bar */
.face-progress-wrap {
  margin: 10px auto 0;
  max-width: 360px;
  text-align: center;
}
.face-progress-wrap span {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--primary);
}
.scanner-body .face-progress-wrap span { color: #4ade80; }
.face-progress-bar {
  height: 6px;
  background: var(--primary);
  border-radius: 3px;
  width: 0%;
  transition: width .15s ease;
  box-shadow: 0 0 8px rgba(26,107,58,.4);
}
.scanner-body .face-progress-bar { background: #4ade80; box-shadow: 0 0 10px rgba(74,222,128,.4); }


/* Scanner setup notice */
.scan-notice {
  background: rgba(251,191,36,.12);
  border: 1.5px solid rgba(251,191,36,.4);
  border-radius: var(--radius-sm);
  color: #fbbf24;
  font-size: 13px;
  line-height: 1.6;
  padding: 14px 16px;
  margin-bottom: 12px;
  text-align: center;
}

/* Flip Camera Button */
.flip-cam-btn {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  background: rgba(0,0,0,.5);
  border-radius: 50%;
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  z-index: 20;
  transition: background .2s, transform .3s;
  border: 1.5px solid rgba(255,255,255,.2);
  backdrop-filter: blur(4px);
}
.flip-cam-btn:hover { background: rgba(0,0,0,.75); transform: rotate(180deg); }
.flip-cam-btn:active { transform: rotate(180deg) scale(.9); }

/* Face Scan Container (user scanner page) */
.face-scan-container {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.scan-cam { max-width: 340px; }
.scan-tip {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin-top: 16px;
  line-height: 1.6;
}
.scanner-body .scan-tip { color: #4b5563; }

/* ═══ WIZARD MODAL (Add User) ═══ */

.fw-drag-handle {
  width: 44px; height: 5px;
  background: var(--border);
  border-radius: 3px;
  margin: 10px auto 0;
}

.fw-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 9999;
  align-items: flex-end; justify-content: center;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.fw-overlay.open {
  display: flex;
}
.fw-sheet {
  background: var(--bg);
  border-radius: 24px 24px 0 0;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 -8px 40px rgba(0,0,0,.25);
  animation: sheetSlideUp .35s cubic-bezier(.32,1.2,.64,1) forwards;
}
@keyframes sheetSlideUp {
  from { transform: translateY(60px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.fw-header {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 2px solid var(--primary-pale);
  gap: 12px;
  position: sticky; top: 0;
  background: var(--bg);
  z-index: 10;
  border-radius: 24px 24px 0 0;
}
.fw-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  font-size: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all .15s;
  color: var(--text-muted);
  line-height: 1;
}
.fw-close:hover { background: var(--danger-pale); color: var(--danger); border-color: var(--danger); }
.fw-title {
  flex: 1;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-head);
  color: var(--text);
}
.fw-steps { display: flex; align-items: center; gap: 6px; }
.fw-step {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--border);
  color: var(--text-muted);
  font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  transition: all .25s;
  border: 2px solid transparent;
}
.fw-step.active {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(26,107,58,.2);
}
.fw-step-line {
  width: 28px; height: 2px;
  background: linear-gradient(90deg, var(--primary-pale), var(--border));
  border-radius: 2px;
}
.fw-body {
  padding: 18px 20px 28px;
}

.fw-face-actions {
  display: flex; flex-direction: column; gap: 8px;
  margin-top: 14px;
}

/* Face Capture Wrap */
.face-capture-wrap { display: flex; flex-direction: column; gap: 12px; }

/* User card face thumb */
.uc-face-thumb {
  width: 44px; height: 44px;
  border-radius: 50%;
  object-fit: cover;
  transform: scaleX(-1); /* un-mirror stored photo */
  border: 2px solid var(--primary);
  flex-shrink: 0;
}
.face-enrolled { color: var(--success); font-size: 11px; font-weight: 600; }
.face-missing  { color: var(--accent);  font-size: 11px; font-weight: 600; }

/* Responsive: Mobile admin */
@media (max-width: 600px) {
  .admin-header-inner { padding: 0 12px; height: auto; padding: 10px 12px; }
  .admin-nav-links { gap: 2px; }
  .alink { padding: 5px 8px; font-size: 12px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row-2 { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .bill-amounts { flex-direction: column; gap: 4px; }
  .search-form { flex-direction: column; }
  .quick-actions { gap: 8px; }
}

@media (max-width: 380px) {
  .summary-grid { gap: 0; }
  .sc-count { font-size: 20px; }
  .sc-icon  { font-size: 16px; }
  .sf-item strong { font-size: 13px; }
}

/* ═══════════════════════════════════════════════════════
   SAAS DESIGN SYSTEM EXTENSIONS
   CED Meal Express v2 — Arial · Clean · Professional
═══════════════════════════════════════════════════════ */

/* ── SaaS Cards — Glassmorphism ─────────────── */
.saas-card {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.55);
  box-shadow: 0 4px 24px rgba(0,0,0,.07), inset 0 1px 0 rgba(255,255,255,.9);
  padding: 22px 22px 24px;
  margin-bottom: 16px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.saas-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(0,0,0,.1), inset 0 1px 0 rgba(255,255,255,.9);
}
.saas-card-hd { margin-bottom: 18px; }
.saas-card-hd h3 {
  font-size: 16px;
  font-weight: 700;
  color: #1a2232;
  margin-bottom: 4px;
}
.saas-card-hd p {
  font-size: 13px;
  color: #7a8696;
  margin: 0;
}

/* ── SaaS Buttons ──────────────────────────── */
.saas-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: Arial, sans-serif;
  cursor: pointer;
  transition: all .18s ease;
  border: none;
  white-space: nowrap;
  letter-spacing: .01em;
}
.saas-btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 2px 8px rgba(26,107,58,.25);
}
.saas-btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 4px 16px rgba(26,107,58,.35);
  transform: translateY(-1px);
}
.saas-btn-primary:active { transform: translateY(0); }
.saas-btn-success {
  background: #198754;
  color: #fff;
  box-shadow: 0 2px 8px rgba(25,135,84,.2);
}
.saas-btn-success:hover { background: #157347; transform: translateY(-1px); }
.saas-btn-ghost {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
}
.saas-btn-ghost:hover { border-color: var(--text-muted); color: var(--text); background: var(--bg-soft); }
.saas-btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 6px; }
.saas-btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }
.font-bold { font-weight: 700; }
.text-muted { color: var(--text-muted); }

/* ── Admin Navbar Redesign ─────────────────── */
.admin-header {
  background: #1a2232;
  border-bottom: none;
  box-shadow: 0 2px 16px rgba(0,0,0,.18);
}
.admin-logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.admin-header .top-logo {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  font-family: Arial, sans-serif;
}
.admin-header .top-logo-img {
  border-color: rgba(255,255,255,.3);
}
.admin-header-inner {
  height: 58px;
}
.alink {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.7);
  transition: all .15s ease;
}
.alink:hover { background: rgba(255,255,255,.1); color: #fff; }
.alink.active { background: var(--primary); color: #fff; }
.alink-icon { font-size: 14px; }
.alink-out { color: rgba(255,100,100,.8) !important; }
.alink-out:hover { background: rgba(220,53,69,.2) !important; color: #f87171 !important; }
.nav-hamburger {
  display: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  padding: 4px 8px;
  border-radius: 6px;
}
.nav-hamburger:hover { background: rgba(255,255,255,.1); }

/* ── Calc Tabs ─────────────────────────────── */
.calc-tabs {
  display: flex;
  gap: 4px;
  background: #f4f6f9;
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.calc-tab {
  flex: 1;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: Arial, sans-serif;
  color: #7a8696;
  background: transparent;
  transition: all .2s ease;
  white-space: nowrap;
}
.calc-tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.09);
}
.calc-tab:hover:not(.active) { background: rgba(255,255,255,.6); color: var(--text); }

.calc-pane { display: none; animation: fadeIn .22s ease; }
.calc-pane.active { display: block; }

/* ── Bill Preview ──────────────────────────── */
.bill-preview-card {
  background: linear-gradient(135deg, #f0f9f4 0%, #fafffe 100%);
  border: 1px solid #b6dfca;
  border-radius: 10px;
  padding: 16px 18px;
  margin: 12px 0;
}
.bp-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 0;
  font-size: 14px;
  color: #4a5568;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.bp-row:last-child { border-bottom: none; }
.bp-row strong { font-size: 15px; }
.bp-due { padding-top: 10px; margin-top: 4px; border-top: 2px solid #b6dfca !important; }
.bp-due span, .bp-due strong { font-size: 16px; font-weight: 700; }

/* ── Payment Type Radio ────────────────────── */
.pay-type-row { display: flex; gap: 10px; flex-wrap: wrap; }
.pay-type-opt input[type="radio"] { display: none; }
.pto-box {
  display: block;
  padding: 10px 18px;
  border-radius: 8px;
  border: 2px solid var(--border);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .18s ease;
  white-space: nowrap;
}
.pay-type-opt input:checked + .pto-box {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 2px 10px rgba(26,107,58,.25);
}

/* ── Attendance Mode Radio ─────────────────── */
.mode-radio-group { display: flex; gap: 10px; flex-wrap: wrap; }
.mode-radio input[type="radio"] { display: none; }
.mro-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 12px 18px;
  border-radius: 10px;
  border: 2px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s ease;
  min-width: 90px;
  text-align: center;
}
.mro-box small { font-size: 10px; font-weight: 400; color: var(--text-muted); }
.mode-radio input:checked + .mro-box {
  border-color: var(--primary);
  background: var(--primary-pale);
  color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26,107,58,.12);
}
.mode-radio input:checked + .mro-box small { color: var(--primary); }

/* ── Table row highlight for due ──────────── */
.row-due td { background: #fff9f0 !important; }
.row-due:hover td { background: #fff3e0 !important; }

/* ── Label hint ────────────────────────────── */
.label-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-muted);
  text-transform: none;
  letter-spacing: 0;
}

/* ── Admin body soft gray ──────────────────── */
.admin-body {
  background: #f4f6f9;
}
.admin-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px 60px;
}

/* ── Stats card SaaS upgrade — Glass ─────── */
.stat-card {
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.6);
  padding: 22px;
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
}
.stat-val {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -.5px;
}
.stat-label {
  font-size: 11.5px;
  color: #7a8696;
  letter-spacing: .06em;
}

/* ── Quick Actions upgrade ─────────────────── */
.qa-btn {
  background: #fff;
  border: 1px solid #e5e9ee;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  padding: 10px 18px;
  box-shadow: 0 1px 4px rgba(0,0,0,.05);
  transition: all .18s ease;
}
.qa-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-pale);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(26,107,58,.12);
}

/* ── Mobile nav hamburger ──────────────────── */
@media (max-width: 760px) {
  .nav-hamburger { display: flex; }
  .admin-nav-links {
    display: none;
    position: absolute;
    top: 62px; left: 0; right: 0;
    background: rgba(255,255,255,.97);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--border);
    flex-direction: column;
    padding: 8px 12px 16px;
    z-index: 200;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    gap: 2px;
  }
  .admin-nav-links.open { display: flex; }
  .alink { width: 100%; border-radius: 8px; padding: 11px 14px; font-size: 14px; color: #111 !important; }
  .admin-topbar-inner { position: relative; flex-wrap: nowrap; padding: 0 16px; }
  .admin-logo-text { font-size: 15px; }
  .calc-tab { font-size: 12px; padding: 8px 10px; }
  .mode-radio-group { gap: 8px; }
  .mro-box { min-width: 80px; padding: 10px 12px; font-size: 13px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .admin-header-hero { padding: 14px 0 16px; }
  .admin-hero-title { font-size: 18px; }
  .admin-hero-sub { font-size: 12px; }
  .admin-meal-banner-tag { font-size: 9.5px; }
}

/* ── Smooth all transitions site-wide ─────── */
*, *::before, *::after {
  transition-timing-function: ease;
}
a, button, .day-card, .user-card, .stat-card, .bill-card, .saas-card, input, select, textarea {
  transition-duration: .18s;
}

/* ═══════════════════════════════════════
   ENHANCED LOGOUT BUTTON — Admin Header
═══════════════════════════════════════ */
.alink-out {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  padding: 7px 16px !important;
  background: linear-gradient(135deg, #ff4d4d 0%, #c0392b 100%) !important;
  color: #fff !important;
  border-radius: 8px !important;
  font-weight: 700 !important;
  font-size: 13px !important;
  letter-spacing: .02em;
  border: none;
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(192,57,43,.35), 0 1px 3px rgba(0,0,0,.15);
  transition: all .22s cubic-bezier(.34,1.56,.64,1) !important;
}
.alink-out::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
  transform: skewX(-15deg);
  transition: left .5s ease;
}
.alink-out:hover::before {
  left: 160%;
}
.alink-out:hover {
  background: linear-gradient(135deg, #ff3333 0%, #a93226 100%) !important;
  transform: translateY(-2px) scale(1.03) !important;
  box-shadow: 0 6px 20px rgba(192,57,43,.5), 0 2px 8px rgba(0,0,0,.2) !important;
  color: #fff !important;
}
.alink-out:active {
  transform: translateY(0) scale(.98) !important;
  box-shadow: 0 2px 8px rgba(192,57,43,.3) !important;
}
.alink-out .alink-icon {
  font-size: 15px;
  transition: transform .22s ease;
  display: inline-block;
}
.alink-out:hover .alink-icon {
  transform: translateX(3px) rotate(-5deg);
}

/* ── Bottom Nav Logout Item ── */
.bnav-logout {
  position: relative;
}
.bnav-logout .bnav-icon {
  position: relative;
  font-size: 22px;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.bnav-logout:hover .bnav-icon {
  transform: scale(1.2) rotate(-8deg);
}
.bnav-logout .bnav-label {
  color: #ef4444 !important;
  font-weight: 700 !important;
}
.bnav-logout:hover {
  color: #ef4444 !important;
}
.bnav-logout .bnav-pulse {
  position: absolute;
  top: 6px; right: calc(50% - 14px);
  width: 7px; height: 7px;
  background: #ef4444;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(239,68,68,.6);
  animation: logoutPulse 2.2s ease-in-out infinite;
}
@keyframes logoutPulse {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* ═══════════════════════════════════════
   LOGOUT CONFIRMATION MODAL
═══════════════════════════════════════ */
.logout-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.logout-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}
.logout-modal {
  background: #fff;
  border-radius: 24px;
  padding: 0;
  max-width: 340px;
  width: 100%;
  box-shadow:
    0 30px 80px rgba(0,0,0,.3),
    0 8px 24px rgba(0,0,0,.15),
    inset 0 1px 0 rgba(255,255,255,.9);
  overflow: hidden;
  transform: scale(.85) translateY(20px);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
}
.logout-modal-overlay.open .logout-modal {
  transform: scale(1) translateY(0);
}
.logout-modal-top {
  background: linear-gradient(135deg, #fff1f0 0%, #ffe4e4 100%);
  padding: 32px 28px 24px;
  text-align: center;
  border-bottom: 1px solid #fecaca;
  position: relative;
  overflow: hidden;
}
.logout-modal-top::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(239,68,68,.12) 0%, transparent 70%);
}
.logout-modal-icon {
  font-size: 52px;
  display: block;
  margin-bottom: 10px;
  animation: logoutIconBounce .6s cubic-bezier(.34,1.56,.64,1) both;
  filter: drop-shadow(0 4px 12px rgba(239,68,68,.3));
}
@keyframes logoutIconBounce {
  0%  { transform: scale(0) rotate(-15deg); opacity: 0; }
  100%{ transform: scale(1) rotate(0);      opacity: 1; }
}
.logout-modal-overlay.open .logout-modal-icon {
  animation: logoutIconBounce .6s cubic-bezier(.34,1.56,.64,1) .1s both;
}
.logout-modal-title {
  font-size: 20px;
  font-weight: 800;
  color: #1a1a2e;
  margin-bottom: 6px;
  font-family: var(--font-head);
}
.logout-modal-sub {
  font-size: 13.5px;
  color: #6b7280;
  line-height: 1.5;
}
.logout-modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-logout-confirm {
  width: 100%;
  padding: 14px 20px;
  background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 16px rgba(239,68,68,.4);
  transition: all .2s cubic-bezier(.34,1.56,.64,1);
  position: relative;
  overflow: hidden;
}
.btn-logout-confirm::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 60%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.2), transparent);
  transform: skewX(-15deg);
  transition: left .5s ease;
}
.btn-logout-confirm:hover::before { left: 160%; }
.btn-logout-confirm:hover {
  background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(239,68,68,.5);
}
.btn-logout-confirm:active { transform: translateY(0); }
.btn-logout-cancel {
  width: 100%;
  padding: 13px 20px;
  background: var(--bg-soft);
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-logout-cancel:hover {
  background: var(--primary-pale);
  color: var(--primary);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Shake animation for accidental clicks */
@keyframes logoutShake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.logout-modal.shake { animation: logoutShake .4s ease; }

/* ═══════════════════════════════════════════
   HAPPY DINING — Full-Screen Success Splash
═══════════════════════════════════════════ */
.happy-dining-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5, 20, 10, .88);
  backdrop-filter: blur(18px) saturate(160%);
  -webkit-backdrop-filter: blur(18px) saturate(160%);
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s ease;
}
.happy-dining-overlay.hd-visible {
  opacity: 1;
  pointer-events: all;
}

/* Radial burst ring behind card */
.hd-burst {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 50%,
      rgba(74,222,128,.18) 0%,
      rgba(16,185,129,.08) 40%,
      transparent 70%);
  animation: hdPulse 2s ease-in-out infinite;
}
@keyframes hdPulse {
  0%,100% { transform: scale(1);   opacity: .8; }
  50%      { transform: scale(1.12); opacity: 1; }
}

/* Card */
.hd-card {
  position: relative;
  z-index: 2;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(30px) saturate(200%);
  -webkit-backdrop-filter: blur(30px) saturate(200%);
  border: 1.5px solid rgba(255,255,255,.18);
  border-radius: 28px;
  padding: 40px 32px 36px;
  text-align: center;
  max-width: 340px;
  width: 90%;
  box-shadow:
    0 2px 0 rgba(255,255,255,.2),
    0 16px 60px rgba(0,0,0,.4),
    inset 0 1px 0 rgba(255,255,255,.22);
  animation: hdSlideUp .55s cubic-bezier(.34,1.56,.64,1) forwards;
}
@keyframes hdSlideUp {
  from { transform: translateY(40px) scale(.92); opacity: 0; }
  to   { transform: translateY(0)    scale(1);   opacity: 1; }
}

/* Floating food emojis row */
.hd-emojis {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.hd-em {
  font-size: 26px;
  display: inline-block;
  animation: hdBounce .6s ease-in-out var(--d, 0s) infinite alternate;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.3));
}
@keyframes hdBounce {
  from { transform: translateY(0)   rotate(-5deg); }
  to   { transform: translateY(-8px) rotate(5deg); }
}

/* Big checkmark */
.hd-check {
  font-size: 54px;
  line-height: 1;
  margin-bottom: 12px;
  animation: hdPop .5s cubic-bezier(.34,1.56,.64,1) .15s both;
  filter: drop-shadow(0 0 20px rgba(74,222,128,.6));
}
@keyframes hdPop {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg);  opacity: 1; }
}

/* Title */
.hd-title {
  font-size: 34px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -.5px;
  margin: 0 0 8px;
  text-shadow: 0 4px 20px rgba(74,222,128,.5);
  animation: hdFadeUp .5s ease .3s both;
}
@keyframes hdFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Sub label */
.hd-sub {
  font-size: 15px;
  color: rgba(255,255,255,.75);
  font-weight: 600;
  margin: 0 0 28px;
  animation: hdFadeUp .5s ease .4s both;
}

/* Countdown ring row */
.hd-redirect {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  animation: hdFadeUp .5s ease .5s both;
}
.hd-progress-ring {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
}
.hd-ring-bg {
  fill: none;
  stroke: rgba(255,255,255,.12);
  stroke-width: 4;
}
.hd-ring-fill {
  fill: none;
  stroke: #4ade80;
  stroke-width: 4;
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: 27px 27px;
  transition: stroke-dashoffset 1s linear;
  filter: drop-shadow(0 0 6px rgba(74,222,128,.7));
}
.hd-countdown {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  color: #4ade80;
}
.hd-redirect-txt {
  font-size: 13px;
  color: rgba(255,255,255,.6);
  font-weight: 600;
  text-align: left;
  line-height: 1.4;
}

/* ── View Details Button ─────────────────── */
.btn-view-details {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 14px;
  padding: 11px 18px;
  background: rgba(255,255,255,.13);
  border: 1.5px solid rgba(255,255,255,.28);
  border-radius: 12px;
  color: #fff;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: all .22s ease;
  backdrop-filter: blur(10px);
  position: relative;
  z-index: 2;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
  font-family: var(--font);
}
.btn-view-details:hover {
  background: rgba(255,255,255,.22);
  border-color: rgba(255,255,255,.45);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-view-details:active { transform: translateY(0); }
.vd-icon { font-size: 16px; }
.vd-arrow {
  margin-left: auto;
  font-size: 15px;
  opacity: .7;
  transition: transform .2s;
}
.btn-view-details:hover .vd-arrow { transform: translate(2px,-2px); opacity: 1; }

/* ═══════════════════════════════════════════
   DETAIL DRAWER — slide-up bottom sheet
═══════════════════════════════════════════ */
.detail-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 8000;
  background: rgba(5,10,18,.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  display: flex;
  align-items: flex-end;
}
.detail-drawer-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.detail-drawer {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  max-height: 92vh;
  background: #fff;
  border-radius: 24px 24px 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -8px 40px rgba(0,0,0,.22);
  transform: translateY(100%);
  transition: transform .38s cubic-bezier(.32,1.02,.6,1);
  overflow: hidden;
}
.detail-drawer-overlay.open .detail-drawer { transform: translateY(0); }

/* Handle */
.dd-handle {
  width: 40px; height: 4px;
  background: #d1d5db;
  border-radius: 99px;
  margin: 10px auto 0;
  flex-shrink: 0;
}

/* Drawer Header */
.dd-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px 12px;
  border-bottom: 1px solid #f0f0f0;
  flex-shrink: 0;
}
.dd-header-left { display: flex; align-items: center; gap: 12px; }
.dd-header-icon { font-size: 26px; }
.dd-title   { font-size: 16px; font-weight: 800; color: #111; }
.dd-subtitle { font-size: 12px; color: #6b7280; font-weight: 500; margin-top: 1px; }
.dd-close {
  width: 32px; height: 32px; border-radius: 50%;
  background: #f3f4f6; border: none; font-size: 15px; color: #6b7280;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .18s; flex-shrink: 0;
}
.dd-close:hover { background: #fee2e2; color: #dc2626; }

/* Summary Strip */
.dd-summary-strip {
  display: flex; align-items: center; justify-content: space-around;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border-bottom: 1px solid #d1fae5;
  flex-shrink: 0;
}
.dd-strip-item { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1; }
.dd-strip-icon { font-size: 18px; }
.dd-strip-item strong { font-size: 13px; font-weight: 800; color: #065f46; }
.dd-strip-item small  { font-size: 9.5px; color: #6b7280; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.dd-strip-divider { width: 1px; height: 32px; background: #d1fae5; }

/* Scrollable body */
.dd-body { flex: 1; overflow-y: auto; padding: 12px 16px 8px; scroll-behavior: smooth; }
.dd-body::-webkit-scrollbar { width: 4px; }
.dd-body::-webkit-scrollbar-thumb { background: #e5e7eb; border-radius: 99px; }

/* Empty */
.dd-empty { text-align: center; padding: 40px 20px; color: #9ca3af; }
.dd-empty span { font-size: 40px; display: block; margin-bottom: 10px; }
.dd-empty p { font-size: 14px; font-weight: 500; }

/* Day block */
.dd-day-block {
  margin-bottom: 12px;
  border: 1px solid #f3f4f6; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.05); transition: box-shadow .2s;
}
.dd-day-block:hover { box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.dd-day-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #f9fafb, #f3f4f6);
  border-bottom: 1px solid #f0f0f0;
}
.dd-day-left { display: flex; align-items: center; gap: 10px; }
.dd-day-num {
  width: 38px; height: 38px; background: var(--primary); color: #fff;
  border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 900; box-shadow: 0 2px 8px rgba(26,107,58,.3); flex-shrink: 0;
}
.dd-day-info  { display: flex; flex-direction: column; gap: 1px; }
.dd-day-name  { font-size: 13px; font-weight: 700; color: #111; }
.dd-day-month { font-size: 11px; color: #6b7280; font-weight: 500; }
.dd-day-right { text-align: right; }
.dd-day-cost  { display: block; font-size: 14px; font-weight: 800; color: #065f46; }
.dd-day-meals { display: block; font-size: 10.5px; color: #9ca3af; font-weight: 500; }

/* Meal rows */
.dd-meal-rows { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 6px; }
.dd-meal-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border-radius: 9px;
  background: #fafafa; border: 1px solid #f3f4f6;
}
.dd-meal-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; flex-shrink: 0; }
.dd-chip-b { background: #fef3c7; color: #92400e; }
.dd-chip-l { background: #dbeafe; color: #1e40af; }
.dd-chip-d { background: #ede9fe; color: #5b21b6; }
.dd-meal-time  { font-size: 11.5px; color: #6b7280; font-weight: 500; flex: 1; }
.dd-meal-price { font-size: 13px; font-weight: 800; color: #111; flex-shrink: 0; }

/* Footer */
.dd-footer {
  border-top: 1.5px solid #f0f0f0; padding: 12px 20px 24px;
  background: #fafafa; flex-shrink: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.dd-footer-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #374151; }
.dd-footer-row span   { font-weight: 500; }
.dd-footer-row strong { font-weight: 700; color: #111; }
.dd-footer-total { margin-top: 4px; padding-top: 10px; border-top: 1px dashed #e5e7eb; font-size: 14.5px; }
.dd-footer-total span { font-weight: 800; color: #111; }
.dd-pending-amt { color: #dc2626 !important; }
