/* =============================================================
   MCC EMS — Application Stylesheet
   v1.0
   ============================================================= */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
  /* Brand */
  --mcc-navy:        #0B1F5C;
  --mcc-navy-dark:   #061240;
  --mcc-navy-50:     #E8EBF5;
  --mcc-sky:         #3FB8F0;
  --mcc-sky-50:      #E6F4FD;
  --mcc-sky-700:     #1480BF;

  /* Neutrals */
  --ink-900:         #1C1C1A;
  --ink-700:         #2C2C2A;
  --ink-500:         #5F5E5A;
  --ink-300:         #888780;
  --ink-200:         #B4B2A9;
  --ink-100:         #D3D1C7;
  --ink-50:          #EEEEEC;

  /* Surfaces */
  --bg-page:         #F4F6FA;
  --bg-card:         #FFFFFF;
  --bg-tint:         #F8FAFD;

  /* Semantic */
  --ok-600:          #0F6E56;
  --ok-50:           #E1F5EE;
  --ok-border:       #9FE1CB;
  --warn-600:        #BA7517;
  --warn-50:         #FAEEDA;
  --err-600:         #A32D2D;
  --err-50:          #FCEBEB;
  --err-border:      #F09595;

  /* Type */
  --font-sans:       "Plus Jakarta Sans", "Hind Siliguri", system-ui, -apple-system, sans-serif;
  --font-bn:         "Hind Siliguri", "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono:       "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  /* Radii */
  --r-sm:  8px;
  --r-md:  12px;
  --r-lg:  16px;
  --r-xl:  22px;
  --r-full: 999px;

  /* Spacing scale */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
}

/* ─── Reset ─────────────────────────────────────────────── */
*,*::before,*::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink-900);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--mcc-sky-700); text-decoration: none; }
a:hover { text-decoration: underline; }
:lang(bn), .lang-bn { font-family: var(--font-bn); }

/* ─── Auth Layout ──────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(63,184,240,0.10), transparent 70%),
    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(11,31,92,0.06), transparent 70%),
    var(--bg-page);
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--bg-card);
  border-radius: var(--r-xl);
  border: 0.5px solid var(--ink-100);
  padding: var(--s-8) var(--s-6) var(--s-6);
}

@media (min-width: 640px) {
  .auth-card { padding: var(--s-10) var(--s-8) var(--s-8); }
}

/* ─── Brand Header ─────────────────────────────────────── */
.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: var(--s-6);
}
.brand-logo {
  display: block;
  height: 76px;
  width: auto;
  max-width: 100%;
  margin: 0 auto var(--s-3);
}
.brand-logo--sm { height: 60px; }
.brand-name {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 1px;
  color: var(--mcc-navy);
  margin: 0;
}
.brand-tag {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--ink-300);
  margin-top: 2px;
  text-transform: uppercase;
}

/* ─── Typography ───────────────────────────────────────── */
h1.auth-title {
  font-size: 22px;
  font-weight: 500;
  margin: 0 0 var(--s-1);
  color: var(--ink-900);
  letter-spacing: -0.2px;
}
.auth-subtitle {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0 0 var(--s-6);
}

/* ─── Forms ────────────────────────────────────────────── */
.field { margin-bottom: var(--s-4); }
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: var(--s-2);
  letter-spacing: 0.4px;
  text-transform: uppercase;
}
.input {
  width: 100%;
  height: 46px;
  padding: 0 var(--s-3);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-md);
  background: var(--bg-card);
  color: var(--ink-900);
  font-size: 15px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus {
  border-color: var(--mcc-sky);
  box-shadow: 0 0 0 3px rgba(63,184,240,0.18);
}
.input::placeholder { color: var(--ink-200); }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 42px; }
.input-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--ink-300);
  width: 28px;
  height: 28px;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.input-toggle:hover { background: var(--bg-tint); color: var(--ink-500); }

.row-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: var(--s-2) 0 var(--s-5);
  font-size: 13px;
}
.check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  color: var(--ink-700);
  cursor: pointer;
}
.check input {
  width: 16px;
  height: 16px;
  accent-color: var(--mcc-navy);
  cursor: pointer;
}

/* ─── Buttons ──────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  height: 50px;
  padding: 0 var(--s-4);
  background: var(--mcc-navy);
  color: #fff;
  border: none;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: background .15s ease, transform .05s ease;
}
.btn:hover  { background: var(--mcc-navy-dark); }
.btn:active { transform: scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-arrow { font-size: 18px; line-height: 1; }

.btn-ghost {
  background: transparent;
  color: var(--mcc-navy);
  border: 1px solid var(--ink-100);
}
.btn-ghost:hover { background: var(--bg-tint); }

/* ─── Alerts ───────────────────────────────────────────── */
.alert {
  display: flex;
  gap: var(--s-2);
  padding: var(--s-3) var(--s-4);
  border-radius: var(--r-md);
  font-size: 13px;
  line-height: 1.5;
  margin-bottom: var(--s-4);
  border-left: 3px solid;
}
.alert-error   { background: var(--err-50);  color: var(--err-600);  border-left-color: var(--err-600); }
.alert-success { background: var(--ok-50);   color: var(--ok-600);   border-left-color: var(--ok-600); }
.alert-warn    { background: var(--warn-50); color: var(--warn-600); border-left-color: var(--warn-600); }
.alert-info    { background: var(--mcc-sky-50); color: var(--mcc-sky-700); border-left-color: var(--mcc-sky); }

/* ─── Language Toggle ─────────────────────────────────── */
.lang-row {
  display: flex;
  justify-content: center;
  gap: var(--s-1);
  margin: var(--s-5) 0 var(--s-2);
}
.lang-pill {
  font-size: 12px;
  padding: 5px 16px;
  border-radius: var(--r-full);
  color: var(--ink-500);
  background: transparent;
  border: none;
  letter-spacing: 0.5px;
}
.lang-pill.active {
  background: var(--mcc-navy-50);
  color: var(--mcc-navy);
  font-weight: 500;
}
.lang-pill:hover:not(.active) { background: var(--bg-tint); color: var(--ink-700); }

/* ─── Footer ───────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  font-size: 10px;
  color: var(--ink-300);
  margin-top: var(--s-3);
  padding-top: var(--s-3);
  border-top: 0.5px solid var(--ink-50);
  letter-spacing: 0.3px;
}

/* ─── Setup-specific ──────────────────────────────────── */
.setup-checklist {
  background: var(--bg-tint);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
  font-size: 13px;
  color: var(--ink-700);
}
.setup-checklist ul { margin: 0; padding-left: var(--s-5); }
.setup-checklist li { margin-bottom: var(--s-1); }
.setup-checklist .ok  { color: var(--ok-600); font-weight: 500; }
.setup-checklist .bad { color: var(--err-600); font-weight: 500; }

/* ─── Home (placeholder) ──────────────────────────────── */
.home-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--s-4);
}
.home-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-xl);
  padding: var(--s-8) var(--s-6);
  text-align: center;
}
.home-greet {
  font-size: 24px;
  font-weight: 500;
  margin: var(--s-4) 0 var(--s-1);
  color: var(--ink-900);
}
.home-sub {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0 0 var(--s-6);
}
.home-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
  text-align: left;
}
.home-meta-cell {
  background: var(--bg-tint);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
}
.home-meta-label {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-300);
  font-weight: 500;
}
.home-meta-value {
  font-size: 14px;
  color: var(--ink-900);
  margin-top: 2px;
  font-weight: 500;
  word-break: break-word;
}
.role-pill {
  display: inline-block;
  background: var(--mcc-navy-50);
  color: var(--mcc-navy);
  padding: 3px 10px;
  font-size: 11px;
  border-radius: var(--r-full);
  font-weight: 500;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.home-logout-form { margin: 0; }

/* ─── Utility ──────────────────────────────────────────── */
.text-center { text-align: center; }
.mt-2 { margin-top: var(--s-2); }
.mt-4 { margin-top: var(--s-4); }
.mb-4 { margin-bottom: var(--s-4); }

/* =============================================================
   PHASE 1B — Dashboard, Check-in, App Layout
   ============================================================= */

/* ─── App body & layout ─────────────────────────────────────── */
body.app-body {
  background: var(--bg-page);
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: 68px; /* bottom nav space */
}
.app-main { display: block; }

.page {
  max-width: 560px;
  margin: 0 auto;
  padding: var(--s-4);
}
.page-no-top { padding-top: 0; }

/* ─── Top app header ────────────────────────────────────────── */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-3) var(--s-4) var(--s-2);
  max-width: 560px;
  margin: 0 auto;
  background: var(--bg-page);
}
.header-left { display: flex; align-items: center; gap: var(--s-2); }
.header-logo { height: 32px; width: auto; display: block; }
.header-brand { line-height: 1.15; }
.header-brand-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--mcc-navy);
  letter-spacing: 0.3px;
}
.header-brand-emp {
  font-size: 10px;
  color: var(--ink-300);
  letter-spacing: 0.5px;
  font-family: var(--font-mono);
}
.header-right { display: flex; align-items: center; gap: var(--s-2); }
.header-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-700);
  font-size: 18px;
  text-decoration: none;
}
.header-icon:hover { background: var(--bg-tint); }
.header-avatar {
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  background: var(--mcc-navy);
  color: #FFF;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

/* Sub-page header (Check-in etc.) */
.app-header-sub { padding: var(--s-3) var(--s-4); }
.header-back {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-900);
  text-decoration: none;
  font-size: 18px;
}
.header-back:hover { background: var(--bg-tint); }
.header-sub-title {
  font-size: 15px;
  font-weight: 500;
  color: var(--ink-900);
}
.header-sub-time {
  font-size: 12px;
  color: var(--ink-500);
  font-weight: 500;
  min-width: 60px;
  text-align: right;
}

/* ─── Bottom nav ────────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  background: var(--bg-card);
  border-top: 0.5px solid var(--ink-100);
  padding: 6px 0 max(6px, env(safe-area-inset-bottom));
  z-index: 50;
}
.bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  color: var(--ink-300);
  text-decoration: none;
  padding: 4px 14px;
  min-width: 56px;
}
.bnav-item i { font-size: 22px; }
.bnav-item.active { color: var(--mcc-navy); font-weight: 500; }
.bnav-item:hover { color: var(--ink-700); }

/* ─── Greeting ──────────────────────────────────────────────── */
.greeting { margin: var(--s-3) 0 var(--s-4); }
.greeting-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 2px;
  letter-spacing: -0.2px;
}
.greeting-date {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0;
}

/* ─── Hero status card ──────────────────────────────────────── */
.hero {
  background: var(--mcc-navy);
  color: #FFF;
  border-radius: var(--r-lg);
  margin-bottom: var(--s-5);
  overflow: hidden;
  position: relative;
  display: block;
  text-decoration: none;
}
.hero-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5);
  background: linear-gradient(135deg, #0B1F5C 0%, #1A347E 100%);
  transition: transform 0.08s ease;
}
.hero-action:active { transform: scale(0.99); }
.hero-left { display: flex; align-items: center; gap: var(--s-3); }
.hero-icon {
  width: 48px; height: 48px;
  border-radius: var(--r-md);
  background: rgba(63,184,240,0.18);
  color: var(--mcc-sky);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.hero-icon-ok { background: rgba(31,158,117,0.25); color: #6FE3B8; }
.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(255,255,255,0.7);
  font-weight: 500;
  margin-bottom: 2px;
  display: flex; align-items: center; gap: 6px;
}
.hero-title {
  font-size: 18px;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.2px;
}
.hero-sub {
  font-size: 12px;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}
.hero-cta {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  background: var(--mcc-sky);
  color: var(--mcc-navy);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}

.hero-active { position: relative; padding: 0; }
.hero-active-stripe {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, #6FE3B8, #1D9E75);
}
.hero-active-body {
  padding: var(--s-5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.hero-time-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-top: 2px;
}
.hero-time {
  font-size: 22px;
  font-weight: 600;
  color: #FFF;
  letter-spacing: -0.3px;
}
.hero-elapsed {
  margin-top: var(--s-2);
  font-size: 13px;
  color: var(--mcc-sky);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.hero-elapsed i { font-size: 15px; }
.hero-checkout-form { margin: 0; flex-shrink: 0; }
.hero-checkout-btn {
  background: var(--mcc-sky);
  color: var(--mcc-navy);
  border: none;
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.2px;
}
.hero-checkout-btn:hover { background: #5BC5F5; }
.hero-checkout-btn:active { transform: scale(0.97); }

.hero-done {
  background: linear-gradient(135deg, #2C3E70 0%, #3B4F85 100%);
}
.hero-done .hero-left { padding: var(--s-5); }

.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #6FE3B8;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(111,227,184,0.25);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 4px rgba(111,227,184,0.25); }
  50%      { box-shadow: 0 0 0 7px rgba(111,227,184,0.08); }
}

/* ─── Pills ─────────────────────────────────────────────────── */
.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  background: rgba(255,255,255,0.15);
  color: #FFF;
}
.pill-ok    { background: rgba(111,227,184,0.20); color: #6FE3B8; }
.pill-warn  { background: rgba(245,180,90,0.20); color: #FFD494; }
.pill-err   { background: rgba(240,149,149,0.20); color: #FFA9A9; }
.pill-warn-sm {
  background: var(--warn-50);
  color: var(--warn-600);
  font-size: 10px;
  padding: 2px 7px;
  font-weight: 500;
}

/* ─── Stats grid ────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.stat-cell {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
}
.stat-label {
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--ink-300);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-value {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.5px;
  line-height: 1;
}
.stat-cap {
  font-size: 13px;
  color: var(--ink-300);
  font-weight: 500;
  margin-left: 2px;
}
.stat-foot {
  font-size: 10px;
  color: var(--ink-300);
  margin-top: 4px;
  letter-spacing: 0.3px;
}

/* ─── Action grid ───────────────────────────────────────────── */
.section-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--ink-300);
  margin: var(--s-4) 0 var(--s-3);
  display: block;
}
.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.action {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--s-4) var(--s-2);
  border-radius: var(--r-md);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: transform 0.08s ease;
}
.action:active { transform: scale(0.96); }
.action i { font-size: 22px; }
.action-green  { background: #E8F5E0; color: #3B6D11; }
.action-sky    { background: var(--mcc-sky-50); color: var(--mcc-sky-700); }
.action-purple { background: #EFE5F8; color: #6B3FA0; }
.action-amber  { background: var(--warn-50); color: var(--warn-600); }
.action-rose   { background: #FCE5E5; color: #A32D2D; }
.action-navy   { background: var(--mcc-navy-50); color: var(--mcc-navy); }

/* ─── Activity feed ─────────────────────────────────────────── */
.activity {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-5);
}
.activity-row {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.5px solid var(--ink-50);
}
.activity-row:last-child { border-bottom: 0; }
.activity-icon {
  width: 36px; height: 36px;
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
}
.activity-icon-ok   { background: var(--ok-50); color: var(--ok-600); }
.activity-icon-warn { background: var(--warn-50); color: var(--warn-600); }
.activity-body { flex: 1; min-width: 0; }
.activity-title { font-size: 13px; font-weight: 500; color: var(--ink-900); }
.activity-sub   { font-size: 11px; color: var(--ink-500); margin-top: 1px; }
.activity-empty {
  padding: var(--s-6) var(--s-4);
  text-align: center;
  color: var(--ink-300);
}
.activity-empty i { font-size: 30px; opacity: 0.5; }
.activity-empty p { margin: var(--s-2) 0 0; font-size: 13px; }

/* ─── Signout button ────────────────────────────────────────── */
.signout-form { margin: var(--s-6) 0 var(--s-4); }
.signout-btn {
  width: 100%;
  background: transparent;
  color: var(--ink-500);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-3);
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.signout-btn:hover { background: var(--bg-tint); color: var(--ink-700); }

/* ─── Empty state ───────────────────────────────────────────── */
.empty-card {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-lg);
  padding: var(--s-8) var(--s-5) var(--s-6);
  text-align: center;
  margin: var(--s-4) 0;
}
.empty-icon {
  width: 64px; height: 64px;
  background: var(--mcc-navy-50);
  color: var(--mcc-navy);
  border-radius: var(--r-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  margin-bottom: var(--s-4);
}
.empty-title { font-size: 18px; font-weight: 600; color: var(--ink-900); margin: 0 0 var(--s-2); }
.empty-text  { font-size: 13px; color: var(--ink-500); line-height: 1.6; margin: 0 0 var(--s-4); }
.empty-text code {
  background: var(--bg-tint);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-900);
}

/* =============================================================
   CHECK-IN PAGE
   ============================================================= */

.map-wrap {
  position: relative;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  background: #F0EAE0;
  overflow: hidden;
}
#user-pulse { transform-origin: center; animation: user-pulse 2s ease-in-out infinite; }
@keyframes user-pulse {
  0%, 100% { opacity: 0.25; transform: scale(1); }
  50%      { opacity: 0.12; transform: scale(1.3); }
}

.checkin-pad { padding: var(--s-4); max-width: 560px; margin: 0 auto; }

.status-card {
  background: var(--bg-card);
  border: 1px solid var(--ink-100);
  border-left: 3px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-3);
  cursor: default;
  transition: all .15s ease;
}
.status-card.status-ok   { border-color: var(--ok-border); border-left-color: var(--ok-600); background: linear-gradient(0deg, var(--ok-50), var(--bg-card)); }
.status-card.status-warn { border-color: #FCDFA0; border-left-color: var(--warn-600); background: linear-gradient(0deg, var(--warn-50), var(--bg-card)); }
.status-card.status-err  { border-color: var(--err-border); border-left-color: var(--err-600); background: linear-gradient(0deg, var(--err-50), var(--bg-card)); cursor: pointer; }
.status-card.status-err:hover { background: var(--err-50); }
.status-icon {
  width: 38px; height: 38px;
  border-radius: var(--r-full);
  background: var(--bg-tint);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.status-ok  .status-icon { background: var(--ok-50);   color: var(--ok-600); }
.status-warn .status-icon { background: var(--warn-50); color: var(--warn-600); }
.status-err  .status-icon { background: var(--err-50);  color: var(--err-600); }
.status-body { flex: 1; min-width: 0; }
.status-title { font-size: 14px; font-weight: 500; color: var(--ink-900); }
.status-sub   { font-size: 11px; color: var(--ink-500); margin-top: 2px; line-height: 1.4; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--ink-100);
  border-top-color: var(--mcc-navy);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.time-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  border: 0.5px solid var(--ink-100);
  margin-bottom: var(--s-4);
}
.time-left { display: flex; align-items: center; gap: var(--s-3); }
.time-icon {
  width: 32px; height: 32px;
  background: var(--ok-50);
  color: var(--ok-600);
  border-radius: var(--r-full);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.time-text { display: flex; flex-direction: column; line-height: 1.3; }
.time-text strong { font-weight: 600; color: var(--ink-900); font-size: 14px; }
.time-text span { font-size: 11px; color: var(--ink-500); }
.time-row .pill {
  background: var(--ok-50); color: var(--ok-600);
  font-weight: 500;
}
.time-row .pill.pill-warn { background: var(--warn-50); color: var(--warn-600); }
.time-row .pill.pill-err  { background: var(--err-50);  color: var(--err-600); }

.btn-checkin {
  width: 100%;
  height: 52px;
  border-radius: var(--r-md);
  background: var(--mcc-navy);
  color: #FFF;
  border: none;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  margin-top: var(--s-2);
  transition: background .15s ease, transform .05s ease;
}
.btn-checkin:hover:not(:disabled)  { background: var(--mcc-navy-dark); }
.btn-checkin:active:not(:disabled) { transform: scale(0.99); }
.btn-checkin:disabled { background: var(--ink-100); color: var(--ink-300); cursor: not-allowed; }

.alt-line {
  text-align: center;
  font-size: 11px;
  color: var(--ink-500);
  margin: var(--s-4) 0 var(--s-3);
}
.alt-line a {
  color: var(--mcc-sky-700);
  font-weight: 500;
  text-decoration: none;
}
.alt-line a:hover { text-decoration: underline; }

/* =============================================================
   PHASE 1C — Request flows (forms, lists, badges)
   ============================================================= */

/* ─── Section header with back btn + action ─────────────────── */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.page-head-title { font-size: 22px; font-weight: 600; color: var(--ink-900); margin: 0; letter-spacing: -0.2px; }
.page-head-sub   { font-size: 12px; color: var(--ink-500); margin-top: 2px; }

.btn-primary-sm {
  background: var(--mcc-navy);
  color: #FFF;
  border: none;
  border-radius: var(--r-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.btn-primary-sm:hover { background: var(--mcc-navy-dark); }
.btn-ghost {
  background: transparent;
  color: var(--ink-700);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-ghost:hover { background: var(--bg-tint); }

/* ─── Summary card row ──────────────────────────────────────── */
.summary-card {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-4);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--s-2);
}
.summary-cell { text-align: center; }
.summary-cell + .summary-cell { border-left: 0.5px solid var(--ink-50); }
.summary-value { font-size: 22px; font-weight: 600; color: var(--ink-900); letter-spacing: -0.3px; }
.summary-value-mono { font-family: var(--font-mono); font-size: 18px; }
.summary-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-300);
  font-weight: 500;
  margin-top: 4px;
}

/* ─── Forms ─────────────────────────────────────────────────── */
.form-card {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
}
.form-row { margin-bottom: var(--s-4); }
.form-row:last-child { margin-bottom: 0; }
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
}
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-700);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.form-label .req { color: var(--err-600); }
.form-input,
.form-select,
.form-textarea {
  display: block;
  width: 100%;
  background: var(--bg-page);
  border: 1px solid var(--ink-100);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink-900);
  -webkit-appearance: none;
  appearance: none;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--mcc-navy);
  box-shadow: 0 0 0 3px var(--mcc-navy-50);
}
.form-textarea { min-height: 90px; resize: vertical; line-height: 1.4; }
.form-select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%235F5E5A' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}
.form-hint {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 4px;
  line-height: 1.4;
}
.form-check {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 13px;
  color: var(--ink-700);
  cursor: pointer;
}
.form-check input[type=checkbox] {
  width: 18px;
  height: 18px;
  accent-color: var(--mcc-navy);
}

.btn-submit {
  width: 100%;
  height: 50px;
  background: var(--mcc-navy);
  color: #FFF;
  border: none;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: var(--s-2);
}
.btn-submit:hover { background: var(--mcc-navy-dark); }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { background: var(--ink-100); color: var(--ink-300); cursor: not-allowed; }

/* ─── Request list rows ─────────────────────────────────────── */
.req-list {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  overflow: hidden;
  margin-bottom: var(--s-4);
}
.req-row {
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.5px solid var(--ink-50);
}
.req-row:last-child { border-bottom: 0; }
.req-row-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-2);
  margin-bottom: 4px;
}
.req-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
}
.req-row-sub {
  font-size: 12px;
  color: var(--ink-500);
  line-height: 1.5;
}
.req-row-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-2);
  gap: var(--s-2);
}
.req-row-stamp {
  font-size: 10px;
  color: var(--ink-300);
  letter-spacing: 0.3px;
}
.btn-cancel-sm {
  background: transparent;
  border: 0.5px solid var(--err-border);
  color: var(--err-600);
  border-radius: var(--r-full);
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
}
.btn-cancel-sm:hover { background: var(--err-50); }

/* ─── Status badges ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.2px;
  white-space: nowrap;
}
.badge i { font-size: 12px; }
.badge-ok    { background: var(--ok-50);   color: var(--ok-600); }
.badge-warn  { background: var(--warn-50); color: var(--warn-600); }
.badge-err   { background: var(--err-50);  color: var(--err-600); }
.badge-mute  { background: var(--bg-tint); color: var(--ink-500); }

/* Compliance flag warnings inside form */
.flag-warnings {
  background: var(--warn-50);
  border: 0.5px solid #FCDFA0;
  border-radius: var(--r-sm);
  padding: var(--s-3);
  margin-bottom: var(--s-3);
  font-size: 12px;
  color: var(--warn-600);
  line-height: 1.5;
}
.flag-warnings strong { font-weight: 600; }
.flag-warnings ul { margin: var(--s-2) 0 0; padding-left: 18px; }

/* ─── Filter chips ──────────────────────────────────────────── */
.filter-chips {
  display: flex;
  gap: 6px;
  margin-bottom: var(--s-4);
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.filter-chips::-webkit-scrollbar { display: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-full);
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-700);
  text-decoration: none;
  white-space: nowrap;
}
.chip.active {
  background: var(--mcc-navy);
  color: #FFF;
  border-color: var(--mcc-navy);
}
.chip i { font-size: 13px; }

/* ─── Pay summary card (payslip page) ───────────────────────── */
.payslip-card {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.payslip-cycle {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-300);
  font-weight: 500;
}
.payslip-amount {
  font-size: 24px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.3px;
  margin-top: 4px;
}

/* =============================================================
   PHASE 2 — Admin Panel (desktop-first sidebar + responsive)
   ============================================================= */

.admin-body {
  background: var(--bg-page);
  margin: 0;
  min-height: 100vh;
  color: var(--ink-900);
  font-family: var(--font-sans);
}

/* ─── Layout shell ──────────────────────────────────────────── */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ─── Sidebar (desktop) ─────────────────────────────────────── */
.admin-sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: var(--mcc-navy);
  color: #FFF;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.admin-sidebar-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: var(--s-4);
  border-bottom: 0.5px solid rgba(255,255,255,0.08);
}
.admin-sidebar-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: #FFF;
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
}
.admin-sidebar-brand { flex: 1; min-width: 0; }
.admin-sidebar-title { font-size: 15px; font-weight: 600; color: #FFF; letter-spacing: -0.1px; }
.admin-sidebar-subtitle { font-size: 11px; color: rgba(255,255,255,0.55); margin-top: 2px; letter-spacing: 0.3px; }

.admin-sidebar-close {
  display: none; /* hidden on desktop, shown on mobile drawer */
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  padding: 4px;
  font-size: 20px;
}

.admin-sidebar-nav {
  flex: 1;
  padding: var(--s-3) 0;
  overflow-y: auto;
}
.admin-sidebar-section {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: rgba(255,255,255,0.45);
  padding: var(--s-3) var(--s-4) 6px;
  font-weight: 500;
}
.admin-sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  padding: 10px var(--s-4);
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  font-weight: 400;
  border-left: 3px solid transparent;
  transition: background 0.12s, color 0.12s;
}
.admin-sidebar-link i {
  font-size: 18px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.admin-sidebar-link:hover { background: rgba(255,255,255,0.05); color: #FFF; }
.admin-sidebar-link.active {
  background: rgba(63,184,240,0.12);
  color: #FFF;
  border-left-color: var(--mcc-sky);
  font-weight: 500;
}
.admin-sidebar-label { flex: 1; min-width: 0; }
.admin-sidebar-badge {
  background: var(--mcc-sky);
  color: var(--mcc-navy);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--r-full);
  min-width: 18px;
  text-align: center;
  letter-spacing: 0;
}

.admin-sidebar-foot {
  border-top: 0.5px solid rgba(255,255,255,0.08);
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.admin-user { display: flex; align-items: center; gap: var(--s-2); flex: 1; min-width: 0; }
.admin-user-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--r-full);
  background: var(--mcc-sky);
  color: var(--mcc-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name {
  font-size: 13px;
  font-weight: 500;
  color: #FFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-user-role {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  text-transform: capitalize;
  letter-spacing: 0.3px;
}
.admin-sidebar-logout {
  background: transparent;
  border: 0.5px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.7);
  border-radius: var(--r-sm);
  padding: 8px;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-sidebar-logout:hover { color: #FFF; background: rgba(255,255,255,0.05); }

/* ─── Top bar (mobile only) ─────────────────────────────────── */
.admin-topbar {
  display: none; /* hidden on desktop */
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--mcc-navy);
  color: #FFF;
  height: 56px;
  padding: 0 var(--s-3);
  align-items: center;
  gap: var(--s-2);
}
.admin-topbar-menu {
  background: transparent;
  border: none;
  color: #FFF;
  font-size: 22px;
  padding: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.admin-topbar-brand { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.admin-topbar-logo {
  width: 28px; height: 28px; border-radius: 4px;
  background: #FFF; padding: 3px; object-fit: contain;
}
.admin-topbar-brand span { font-size: 14px; font-weight: 500; }
.admin-topbar-actions { display: flex; align-items: center; gap: var(--s-2); }
.admin-topbar-badge {
  color: #FFF;
  text-decoration: none;
  position: relative;
  padding: 6px 8px;
  font-size: 18px;
}
.admin-topbar-badge .badge-count {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--mcc-sky);
  color: var(--mcc-navy);
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: var(--r-full);
  min-width: 14px;
  text-align: center;
}

/* ─── Drawer overlay (mobile only) ──────────────────────────── */
.admin-drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,31,92,0.5);
  z-index: 90;
}
.admin-drawer-overlay.is-open { display: block; }

/* ─── Main content ──────────────────────────────────────────── */
.admin-main {
  flex: 1;
  min-width: 0;
  padding: var(--s-5) var(--s-5);
  max-width: 1200px;
}

/* ─── Admin page chrome ─────────────────────────────────────── */
.admin-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.admin-page-title { font-size: 24px; font-weight: 600; color: var(--ink-900); margin: 0; letter-spacing: -0.4px; }
.admin-page-sub   { font-size: 13px; color: var(--ink-500); margin-top: 4px; }

/* ─── Stat tile grid for dashboard ──────────────────────────── */
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.admin-stat-tile {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-4);
  position: relative;
}
.admin-stat-tile-icon {
  position: absolute;
  top: var(--s-3);
  right: var(--s-3);
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--mcc-navy-50);
  color: var(--mcc-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.admin-stat-tile-value {
  font-size: 30px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.5px;
  line-height: 1.1;
  font-family: var(--font-mono);
}
.admin-stat-tile-label {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 6px;
  letter-spacing: 0.2px;
}
.admin-stat-tile-sub {
  font-size: 11px;
  color: var(--ink-300);
  margin-top: 2px;
}
.admin-stat-tile.ok    { border-top: 3px solid var(--ok-600); }
.admin-stat-tile.warn  { border-top: 3px solid var(--warn-600); }
.admin-stat-tile.err   { border-top: 3px solid var(--err-600); }
.admin-stat-tile.info  { border-top: 3px solid var(--mcc-sky); }

/* ─── Pending queue tiles on dashboard ──────────────────────── */
.admin-queue-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--s-3);
  margin-bottom: var(--s-5);
}
.admin-queue-tile {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  padding: var(--s-4);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: border-color 0.12s, transform 0.12s;
}
.admin-queue-tile:hover { border-color: var(--mcc-navy); transform: translateY(-1px); }
.admin-queue-tile.has-pending { border-left: 3px solid var(--warn-600); }
.admin-queue-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.admin-queue-tile-label { font-size: 12px; color: var(--ink-500); font-weight: 500; letter-spacing: 0.3px; }
.admin-queue-tile-icon  { color: var(--ink-300); font-size: 18px; }
.admin-queue-tile-count {
  font-size: 28px;
  font-weight: 600;
  color: var(--ink-900);
  font-family: var(--font-mono);
  letter-spacing: -0.5px;
}
.admin-queue-tile.has-pending .admin-queue-tile-count { color: var(--warn-600); }
.admin-queue-tile-action {
  font-size: 11px;
  color: var(--mcc-sky-700, var(--mcc-navy));
  font-weight: 500;
}

/* ─── Admin cards (lists, tables) ───────────────────────────── */
.admin-card {
  background: var(--bg-card);
  border: 0.5px solid var(--ink-100);
  border-radius: var(--r-md);
  margin-bottom: var(--s-4);
  overflow: hidden;
}
.admin-card-head {
  padding: var(--s-3) var(--s-4);
  border-bottom: 0.5px solid var(--ink-100);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
}
.admin-card-title { font-size: 14px; font-weight: 600; color: var(--ink-900); margin: 0; }
.admin-card-body { padding: 0; }

/* ─── Admin table ───────────────────────────────────────────── */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table thead th {
  text-align: left;
  background: var(--bg-tint);
  padding: 10px var(--s-3);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--ink-500);
  font-weight: 500;
  border-bottom: 0.5px solid var(--ink-100);
}
.admin-table tbody td {
  padding: 12px var(--s-3);
  border-bottom: 0.5px solid var(--ink-50);
  color: var(--ink-700);
  vertical-align: middle;
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: var(--bg-tint); }
.admin-table .emp-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}
.admin-table .emp-code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-500);
}
.admin-table .emp-name { font-weight: 500; color: var(--ink-900); }
.admin-table .actions { text-align: right; white-space: nowrap; }
.admin-table .btn-link {
  color: var(--mcc-navy);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: var(--r-sm);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-table .btn-link:hover { background: var(--mcc-navy-50); }
.admin-table .num { font-family: var(--font-mono); }

/* Empty state inside admin table */
.admin-empty {
  padding: var(--s-5);
  text-align: center;
  color: var(--ink-500);
}
.admin-empty i { font-size: 32px; color: var(--ink-300); display: block; margin-bottom: var(--s-2); }

/* ─── Filter tabs (for list pages) ──────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: var(--s-4);
  border-bottom: 0.5px solid var(--ink-100);
  overflow-x: auto;
}
.admin-tab {
  padding: 10px var(--s-3);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-500);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.admin-tab:hover { color: var(--ink-700); }
.admin-tab.active {
  color: var(--mcc-navy);
  border-bottom-color: var(--mcc-navy);
}
.admin-tab-count {
  background: var(--ink-100);
  color: var(--ink-700);
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--r-full);
  min-width: 16px;
  text-align: center;
}
.admin-tab.active .admin-tab-count {
  background: var(--mcc-navy);
  color: #FFF;
}

/* ─── Two-column layout for detail pages ────────────────────── */
.admin-detail {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: var(--s-4);
  align-items: start;
}
.admin-detail-main, .admin-detail-side { min-width: 0; }

/* Field rows in detail cards (reusing the review-row pattern) */
.detail-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--s-3);
  padding: var(--s-2) var(--s-4);
  align-items: baseline;
  border-top: 0.5px solid var(--ink-50);
}
.detail-row:first-child { border-top: 0; }
.detail-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--ink-300);
  font-weight: 500;
}
.detail-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-900);
  line-height: 1.5;
}

/* Action button cluster (Approve / Reject) */
.admin-action-form {
  padding: var(--s-4);
  background: var(--bg-tint);
  border-top: 0.5px solid var(--ink-100);
}
.admin-action-form .form-label { color: var(--ink-700); }
.admin-action-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-2);
  margin-top: var(--s-3);
}
.btn-approve {
  background: var(--ok-600);
  color: #FFF;
  border: none;
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-approve:hover { background: #1F8B3F; }
.btn-reject {
  background: #FFF;
  color: var(--err-600);
  border: 1px solid var(--err-border, var(--err-600));
  border-radius: var(--r-md);
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.btn-reject:hover { background: var(--err-50); }

/* ─── Mobile breakpoint ─────────────────────────────────────── */
@media (max-width: 900px) {
  .admin-topbar { display: flex; }
  .admin-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    z-index: 100;
    box-shadow: 4px 0 20px rgba(0,0,0,0.18);
  }
  .admin-sidebar.is-open { transform: translateX(0); }
  .admin-sidebar-close { display: flex; align-items: center; justify-content: center; margin-left: auto; }
  .admin-main { padding: var(--s-3); }
  .admin-stat-grid { grid-template-columns: 1fr 1fr; }
  .admin-queue-grid { grid-template-columns: 1fr 1fr; gap: var(--s-2); }
  .admin-detail { grid-template-columns: 1fr; }
  .admin-page-title { font-size: 20px; }
}
@media (max-width: 480px) {
  .admin-stat-grid { grid-template-columns: 1fr; }
  .admin-queue-grid { grid-template-columns: 1fr; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; }
  .admin-table tr {
    border-bottom: 0.5px solid var(--ink-100);
    padding: var(--s-3);
  }
  .admin-table td { border: none; padding: 4px 0; }
  .admin-table td.actions { padding-top: var(--s-2); }
}

/* ════════════════════════════════════════════════════════════════════
 * Ship 6 — Profile self-service (P6)
 * Avatar partial + profile-edit form helpers.
 * ════════════════════════════════════════════════════════════════════ */

/* Avatar partial (Views/_avatar.php) — the inline styles in the partial
 * already set width/height/font-size/border per-call, so these rules
 * just provide subtle defaults that won't override the inline values. */
.avatar-photo {
  /* nothing here — inline styles control sizing/border-radius */
}
.avatar-letter {
  /* nothing here — inline styles control sizing/colors */
}

/* Header avatar hosting an <img> — neutralise the .header-avatar
 * background so the photo isn't cropped by it on slow connections.
 * The img has its own white background to handle PNG transparency. */
.header-avatar img {
  display: block;
  border-radius: 50%;
}

/* form-input fields that are locked (fill-once already filled) */
.form-input.profile-locked {
  background: var(--ink-50, #f4f4f0);
  color: var(--ink-500, #5f5e5a);
  cursor: not-allowed;
}
