/* ─────────────────────────────────────────────────────────────
   HLSR 8 Seconds v2 — Dark Rodeo Theme
   Brand: Orange #EF7622 · Deep Navy #0a1628 · White · Gold
   Inspired by rodeohouston.com
───────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;600&family=DM+Mono:wght@400;500&family=Oswald:wght@400;500;600;700&display=swap');

:root {
  /* Light surfaces */
  --bg:        #D1D3D4;
  --surface:   #ffffff;
  --surface2:  #f4f5f7;
  --surface3:  #e4e7eb;
  --border:    rgba(0,46,93,0.08);
  --border2:   rgba(0,46,93,0.16);

  /* Text */
  --text:      #002E5D;
  --muted:     #5a6a7e;
  --muted2:    #8fa0b4;

  /* Brand */
  --orange:    #EF7622;
  --orange2:   #d4651a;
  --orangeglow:rgba(239,118,34,0.12);
  --navy:      #002E5D;
  --silver:    #D1D3D4;
  --gold:      #f5a623;

  /* Accent alias */
  --accent:    #EF7622;
  --accent2:   #d4651a;
  --accentglow:rgba(239,118,34,0.12);
  --blue:      #0076A9;
  --bluebg:    rgba(0,118,169,0.10);

  /* Status */
  --green:     #1a8a4a;
  --greenbg:   rgba(26,138,74,0.10);
  --red:       #c0303a;
  --redbg:     rgba(192,48,58,0.10);
  --amber:     #b87010;
  --amberbg:   rgba(184,112,16,0.10);

  --r:  10px;
  --r2: 14px;
  --r3: 20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 14px;
  line-height: 1.6;
}
a { color: var(--orange); text-decoration: none; }
a:hover { text-decoration: underline; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }

/* ── Layout ─────────────────────────────────────────────────── */
.shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 230px; min-width: 230px;
  background: #002E5D;
  display: flex; flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(0,0,0,0.15);
}

.content { flex: 1; overflow-y: auto; display: flex; flex-direction: column; min-width: 0; background: #D1D3D4; }

/* ── Sidebar brand / logo ────────────────────────────────────── */
.brand {
  padding: 16px 16px 12px;
  border-bottom: 3px solid var(--orange);
  background: #ffffff;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.brand-logo {
  width: 200px; height: auto;
  display: block;
}
.brand-app {
  font-size: 11px; font-weight: 800; letter-spacing: .10em;
  text-transform: uppercase; color: var(--navy);
  text-align: center; margin-top: 2px;
}

/* Legacy text brand fallback */
.brand-name { font-size: 15px; font-weight: 600; color: #fff; font-family: 'Oswald', sans-serif; letter-spacing: .03em; }
.brand-sub  { font-size: 10px; color: rgba(255,255,255,0.40); }

/* ── Sidebar nav ─────────────────────────────────────────────── */
.nav-body { flex: 1; overflow-y: auto; padding: 10px 8px; }
.nav-sect {
  font-size: 9px; font-weight: 600; color: rgba(255,255,255,0.30);
  text-transform: uppercase; letter-spacing: .10em;
  padding: 12px 10px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: 8px; cursor: pointer;
  color: rgba(255,255,255,0.60); font-size: 13px; font-weight: 400;
  border: none; background: none; font-family: inherit;
  width: 100%; text-align: left; transition: all .12s;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-item.active {
  background: rgba(239,118,34,0.22);
  color: #fff; font-weight: 600;
  border-left: 3px solid var(--orange);
  padding-left: 7px;
}
.nav-item .nav-icon { width: 16px; text-align: center; font-size: 14px; opacity: .7; }
.nav-badge {
  margin-left: auto; background: var(--orange); color: #fff;
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px;
}

/* ── Sidebar footer / user chip ─────────────────────────────── */
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.10); }
.user-chip { display: flex; align-items: center; gap: 8px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
  background: rgba(239,118,34,0.20); color: var(--orange);
  border: 1.5px solid rgba(239,118,34,0.40);
}
.user-name       { font-size: 12px; font-weight: 600; color: #fff; }
.user-role-label { font-size: 10px; color: rgba(255,255,255,0.40); }
.signout-btn {
  margin-top: 10px; width: 100%; padding: 7px;
  border-radius: 8px; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.50); font-size: 12px; cursor: pointer;
  font-family: inherit; transition: all .15s;
}
.signout-btn:hover { background: rgba(239,118,34,0.15); color: #fff; border-color: rgba(239,118,34,0.35); }

/* ── Top bar ─────────────────────────────────────────────────── */
.topbar {
  padding: 16px 28px;
  border-bottom: 1px solid rgba(239,118,34,0.20);
  display: flex; align-items: center; justify-content: space-between;
  background: linear-gradient(90deg, var(--orange) 0%, var(--orange2) 100%);
  position: sticky; top: 0; z-index: 10; flex-shrink: 0;
  box-shadow: 0 2px 20px rgba(239,118,34,0.25);
  gap: 8px;
}
.topbar > div:first-child { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 0; }
.page-title { font-size: 18px; font-weight: 700; letter-spacing: -0.2px; color: #fff; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.page-sub   { font-size: 12px; color: rgba(255,255,255,0.70); margin-top: 1px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

/* ── Main panel ──────────────────────────────────────────────── */
.main-panel { padding: 24px 28px; flex: 1; }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 500;
  border: 1px solid var(--border2); background: var(--surface2);
  cursor: pointer; color: var(--text); font-family: inherit;
  transition: all .12s; display: inline-flex; align-items: center; gap: 6px;
}
.btn:hover   { background: var(--surface3); border-color: rgba(255,255,255,0.20); }
.btn-primary { background: var(--orange); border-color: var(--orange2); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--orange2); }
.btn-sm  { padding: 5px 12px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--surface2); color: var(--text); border-color: transparent; }
.btn-success { background: var(--greenbg); border-color: rgba(34,197,94,0.35); color: var(--green); }
.btn-success:hover { background: rgba(34,197,94,0.20); }
.btn-danger  { background: var(--redbg);  border-color: rgba(239,68,68,0.35);  color: var(--red);   }
.btn-danger:hover  { background: rgba(239,68,68,0.20); }

/* ── Cards ───────────────────────────────────────────────────── */
.card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--r2); padding: 18px 20px;
}
.card + .card { margin-top: 10px; }
.card-sm { padding: 12px 16px; }
.card-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ── Stat grid ───────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--r2); padding: 16px 18px;
  border-top: 3px solid var(--orange);
}
.stat-num   { font-size: 30px; font-weight: 700; letter-spacing: -1px; font-family: 'Oswald', sans-serif; color: var(--text); }
.stat-label { font-size: 12px; color: var(--muted); margin-top: 4px; }
.stat-delta { font-size: 11px; margin-top: 6px; }
.delta-up      { color: var(--green); }
.delta-pending { color: var(--amber); }

/* ── Badges ──────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; letter-spacing: .02em; }
.badge-yes      { background: var(--greenbg); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-no       { background: var(--redbg);   color: var(--red);   border: 1px solid rgba(239,68,68,0.25); }
.badge-pending  { background: var(--amberbg); color: var(--amber); border: 1px solid rgba(245,158,11,0.25); }
.badge-review   { background: var(--bluebg);  color: var(--blue);  border: 1px solid rgba(59,130,246,0.25); }
.badge-approved { background: var(--greenbg); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-draft    { background: rgba(255,255,255,0.06); color: var(--muted); border: 1px solid var(--border2); }
.badge-active   { background: var(--bluebg);  color: var(--blue);  border: 1px solid rgba(59,130,246,0.25); }
.badge-published { background: var(--greenbg); color: var(--green); border: 1px solid rgba(34,197,94,0.25); }
.badge-archived  { background: rgba(255,255,255,0.04); color: var(--muted2); border: 1px solid var(--border); }

/* ── Event cards ─────────────────────────────────────────────── */
.event-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: var(--r2); padding: 16px 20px; margin-bottom: 10px;
  transition: border-color .15s, box-shadow .15s;
  border-left: 3px solid transparent;
}
.event-card:hover { border-color: rgba(239,118,34,0.35); border-left-color: var(--orange); box-shadow: 0 2px 12px rgba(239,118,34,0.08); }
.event-title { font-size: 14px; font-weight: 600; color: var(--text); font-family: 'Oswald', sans-serif; letter-spacing: .02em; font-size: 15px; }
.event-meta  { font-size: 12px; color: var(--muted); margin-top: 4px; display: flex; gap: 12px; flex-wrap: wrap; }
.event-desc  { font-size: 13px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.event-actions { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.event-attendees { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; align-items: center; }

/* ── Attendance chips ────────────────────────────────────────── */
.att-chip    { font-size: 11px; padding: 2px 9px; border-radius: 6px; font-weight: 500; background: rgba(255,255,255,0.07); color: var(--muted); }
.att-yes     { background: var(--greenbg); color: var(--green); }
.att-pending { background: var(--amberbg); color: var(--amber); }
.att-no      { background: var(--redbg);   color: var(--red);   }

/* ── Forms ───────────────────────────────────────────────────── */
.form-group  { margin-bottom: 14px; }
.form-label  { font-size: 12px; font-weight: 500; color: var(--muted); display: block; margin-bottom: 6px; text-transform: uppercase; letter-spacing: .04em; font-size: 11px; }
.form-input  {
  width: 100%; padding: 9px 12px; border-radius: 8px;
  border: 1px solid var(--border2); background: #f8f9fb;
  color: var(--text); font-size: 13px; font-family: inherit;
  transition: border-color .15s;
}
.form-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,118,34,0.12); }
.form-input::placeholder { color: var(--muted2); }
textarea.form-input { resize: vertical; min-height: 80px; }
select.form-input  { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* ── Upload zone ─────────────────────────────────────────────── */
.upload-zone {
  border: 1.5px dashed rgba(239,118,34,0.35); border-radius: var(--r);
  padding: 28px; text-align: center; cursor: pointer; transition: all .15s;
  background: rgba(239,118,34,0.04);
}
.upload-zone:hover { border-color: var(--orange); background: rgba(239,118,34,0.08); }
.upload-icon  { font-size: 28px; margin-bottom: 8px; }
.upload-title { font-size: 14px; font-weight: 500; color: var(--text); }
.upload-sub   { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* ── Calendar ────────────────────────────────────────────────── */
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-grid   { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; margin-bottom: 16px; }
.cal-day-hdr {
  font-size: 10px; font-weight: 700; color: var(--muted2);
  text-align: center; padding: 6px 0;
  text-transform: uppercase; letter-spacing: .06em;
}
.cal-day {
  min-height: 82px; border-radius: 8px; border: 1px solid var(--border);
  padding: 6px 7px; font-size: 11px; transition: all .12s;
  background: #ffffff; overflow: hidden; cursor: pointer;
}
.cal-day:hover { border-color: rgba(239,118,34,0.35); background: #fff8f4; }
.cal-day.empty-cell { cursor: default; }
.cal-day.has-event { background: #fff8f4; border-color: rgba(239,118,34,0.25); }
.cal-day.today { border-color: var(--orange); background: #fff3ec; }
.cal-day.empty-cell { background: transparent; border-color: transparent; }
.cal-day-num { font-size: 12px; font-weight: 600; color: var(--text); margin-bottom: 3px; display: block; }
.cal-day.today .cal-day-num {
  background: var(--orange); color: #fff;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.cal-chip {
  font-size: 9px; color: var(--orange); line-height: 1.3; margin-bottom: 2px;
  white-space: normal; word-break: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cal-chip-other { color: var(--blue); }
.cal-chip-vp  { color: var(--gold); }
.cal-people   { font-size: 9px; color: var(--muted); }
.cal-legend { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }

/* event list below calendar */
.cal-event-list { margin-top: 16px; }
.cal-event-row  {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--border);
}
.cal-event-row:last-child { border-bottom: none; }
.cal-event-date { min-width: 56px; font-size: 11px; font-weight: 700; color: var(--orange); font-family: 'Oswald', sans-serif; }
.cal-event-info { flex: 1; }
.cal-event-name { font-size: 13px; font-weight: 600; color: var(--text); }
.cal-event-loc  { font-size: 11px; color: var(--muted); margin-top: 1px; }
.cal-event-who  { font-size: 11px; color: var(--blue);  margin-top: 1px; }

/* ── Attendance bars ─────────────────────────────────────────── */
.att-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.att-row:last-child { border-bottom: none; }
.att-name   { font-size: 13px; width: 140px; flex-shrink: 0; color: var(--text); }
.att-bar-bg { flex: 1; height: 6px; background: var(--surface3); border-radius: 3px; overflow: hidden; }
.att-bar    { height: 100%; border-radius: 3px; background: var(--orange); transition: width .5s; }
.att-pct    { font-size: 12px; font-weight: 600; font-family: 'DM Mono', monospace; width: 40px; text-align: right; color: var(--orange); }

/* ── Recipient list ──────────────────────────────────────────── */
.rec-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: 8px; background: #f4f5f7; margin-bottom: 6px;
  border: 1px solid var(--border);
}
.rec-name { font-size: 13px; flex: 1; color: var(--text); }

/* ── Toggle ──────────────────────────────────────────────────── */
.toggle { position: relative; width: 36px; height: 20px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-track { position: absolute; inset: 0; background: var(--surface3); border-radius: 10px; cursor: pointer; transition: background .2s; }
.toggle input:checked + .toggle-track { background: var(--orange); }
.toggle-track::after { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: white; transition: transform .2s; }
.toggle input:checked + .toggle-track::after { transform: translateX(16px); }

/* ── Group / people selectors ────────────────────────────────── */
.group-grid  { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.group-tag   { padding: 5px 14px; border-radius: 20px; border: 1px solid var(--border2); font-size: 12px; font-weight: 500; cursor: pointer; color: var(--muted); transition: all .12s; }
.group-tag.selected { background: var(--orangeglow); border-color: var(--orange); color: var(--orange); }
.group-tag:hover { border-color: var(--border2); background: var(--surface3); color: var(--text); }

.people-grid { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.person-tag  { padding: 4px 12px; border-radius: 20px; border: 1px solid var(--border2); font-size: 12px; cursor: pointer; color: var(--muted); transition: all .12s; }
.person-tag.selected { background: var(--greenbg); border-color: rgba(34,197,94,0.40); color: var(--green); }

/* ── Toast ───────────────────────────────────────────────────── */
.toast {
  position: fixed; bottom: 24px; right: 24px;
  background: #002E5D; border: 1px solid rgba(239,118,34,0.30);
  border-radius: var(--r); padding: 12px 18px;
  font-size: 13px; font-weight: 500; z-index: 999;
  opacity: 0; transform: translateY(8px); transition: all .25s;
  pointer-events: none; max-width: 320px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.20);
  color: #ffffff;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Notifications ───────────────────────────────────────────── */
.notif-dot {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 16px; background: rgba(239,118,34,0.08);
  border-radius: var(--r); margin-bottom: 12px;
  border-left: 3px solid var(--orange);
}
.notif-icon  { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.notif-body  { flex: 1; }
.notif-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notif-meta  { font-size: 11px; color: var(--muted); margin-top: 2px; }
.notif-actions { display: flex; gap: 8px; margin-top: 8px; }

/* ── Section headers ─────────────────────────────────────────── */
.section-hdr { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; gap: 8px; }
.section-title { font-size: 14px; font-weight: 600; color: var(--text); font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .04em; }
.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

/* ── Status steps ────────────────────────────────────────────── */
.status-steps { display: flex; align-items: center; gap: 0; margin: 16px 0; }
.step { flex: 1; text-align: center; position: relative; }
.step::before { content: ''; position: absolute; top: 12px; left: -50%; right: 50%; height: 1px; background: var(--border2); z-index: 0; }
.step:first-child::before { display: none; }
.step-dot {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid var(--border2); background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 600; margin: 0 auto 4px; position: relative; z-index: 1;
  color: var(--muted2);
}
.step.done   .step-dot { background: var(--green);      border-color: var(--green); color: #fff; }
.step.active .step-dot { background: var(--orangeglow); border-color: var(--orange); color: var(--orange); }
.step-label { font-size: 10px; color: var(--muted2); }
.step.done .step-label, .step.active .step-label { color: var(--text); }

/* ── Flier preview ───────────────────────────────────────────── */
.flier-preview {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px; display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.flier-icon { width: 44px; height: 54px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.flier-pdf { background: var(--redbg); }
.flier-jpg { background: var(--bluebg); }
.flier-url { background: var(--bluebg); }

/* ── User table ──────────────────────────────────────────────── */
.user-table { width: 100%; border-collapse: collapse; }
.user-table th { text-align: left; font-size: 10px; font-weight: 700; color: var(--muted2); text-transform: uppercase; letter-spacing: .07em; padding: 8px 12px; border-bottom: 1px solid var(--border2); white-space: nowrap; }
.user-table th.sortable { cursor: pointer; user-select: none; }
.user-table th.sortable:hover { color: var(--navy); }
.user-table th .sort-arrow { margin-left: 4px; opacity: 0.35; font-style: normal; }
.user-table th.sort-asc .sort-arrow::after { content: '▲'; opacity: 1; }
.user-table th.sort-desc .sort-arrow::after { content: '▼'; opacity: 1; }
.user-table th:not(.sort-asc):not(.sort-desc) .sort-arrow::after { content: '⇅'; }
.user-table td { padding: 12px; border-bottom: 1px solid var(--border); font-size: 13px; vertical-align: middle; }
.user-table tr:last-child td { border-bottom: none; }
.user-table tr:hover td { background: var(--surface2); }

/* User action ⋯ dropdown menu */
.user-action-wrap { position: relative; display: inline-block; }
.user-menu-btn { font-size: 18px; line-height: 1; padding: 2px 8px; color: var(--muted2); }
.user-menu-btn:hover { color: var(--navy); background: var(--surface2); }
.user-menu { display: none; position: fixed; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,0.12); min-width: 130px; z-index: 9999; overflow: hidden; }
.user-menu.open { display: block; }
.user-menu button { display: block; width: 100%; text-align: left; padding: 10px 14px; font-size: 13px; background: none; border: none; cursor: pointer; color: var(--text); transition: background .15s; }
.user-menu button:hover { background: var(--surface2); }

.role-chip { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.role-chip.admin         { background: rgba(239,118,34,0.15);  color: var(--orange); border: 1px solid rgba(239,118,34,0.30); }
.role-chip.exec          { background: rgba(59,130,246,0.12);  color: var(--blue);   border: 1px solid rgba(59,130,246,0.25); }
.role-chip.lifetime_exec { background: rgba(0,46,93,0.12);     color: var(--navy);   border: 1px solid rgba(0,46,93,0.30); }
.role-chip.vp            { background: rgba(245,158,11,0.12);  color: var(--amber);  border: 1px solid rgba(245,158,11,0.25); }
.role-chip.lifetime_vp   { background: rgba(180,83,9,0.12);    color: #b45309;       border: 1px solid rgba(180,83,9,0.25); }
.role-chip.planner       { background: rgba(34,197,94,0.12);   color: var(--green);  border: 1px solid rgba(34,197,94,0.25); }

.tfa-badge { display: inline-flex; align-items: center; gap: 5px; background: var(--greenbg); border: 1px solid rgba(34,197,94,0.30); color: var(--green); font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 20px; }
.tfa-on  { color: var(--green);  font-size: 11px; font-weight: 500; }
.tfa-off { color: var(--muted2); font-size: 11px; font-weight: 500; }

/* ── Auth screen ─────────────────────────────────────────────── */
.auth-shell {
  min-height: 100vh;
  background: linear-gradient(
    135deg,
    #001830 0%,
    #002E5D 18%,
    #003d7a 36%,
    #002E5D 54%,
    #6b2a0c 72%,
    #EF7622 88%,
    #c45810 100%
  );
  background-size: 400% 400%;
  animation: fluidGrad 16s ease infinite;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  position: relative; overflow: hidden;
}

@keyframes fluidGrad {
  0%   { background-position: 0%   30%; }
  25%  { background-position: 60%  80%; }
  50%  { background-position: 100% 40%; }
  75%  { background-position: 40%  0%;  }
  100% { background-position: 0%   30%; }
}

/* Radial colour blobs that gently drift */
.auth-shell::before {
  content: '';
  position: absolute; inset: -20%;
  background:
    radial-gradient(ellipse 55% 45% at 72% 28%,  rgba(239,118,34,0.30) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 18% 75%,  rgba(0,46,93,0.55)    0%, transparent 55%),
    radial-gradient(ellipse 40% 40% at 85% 78%,  rgba(0,61,122,0.35)   0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: blobDrift 22s ease-in-out infinite alternate;
}

@keyframes blobDrift {
  0%   { transform: translate(0%,    0%)   scale(1);    opacity: 1;   }
  25%  { transform: translate(-4%,   6%)   scale(1.08); opacity: .88; }
  50%  { transform: translate(5%,   -4%)   scale(.96);  opacity: .95; }
  75%  { transform: translate(-3%,  -7%)   scale(1.06); opacity: .85; }
  100% { transform: translate(4%,    3%)   scale(1.02); opacity: 1;   }
}

/* Grain / noise texture overlay */
.auth-shell::after {
  content: '';
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.20;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 220px 220px;
}

.auth-card {
  background: #D1D3D4;
  border-radius: 20px; padding: 40px 44px;
  width: 100%; max-width: 440px;
  box-shadow: 0 24px 60px rgba(0,0,0,0.30);
  position: relative; z-index: 1;
}

.auth-logo { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 32px; }
.auth-logo-img {
  width: 200px; height: auto;
  filter: drop-shadow(0 4px 16px rgba(239,118,34,0.35));
}
.auth-logo-divider {
  width: 40px; height: 2px; background: var(--orange); border-radius: 2px; opacity: .5;
}
.auth-logo-app {
  font-size: 11px; font-weight: 600; letter-spacing: .15em;
  text-transform: uppercase; color: var(--muted);
}

/* Fallback icon-based logo */
.auth-logo-icon { width: 52px; height: 52px; background: var(--orange); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; color: #fff; font-weight: 700; font-family: 'Oswald', sans-serif; box-shadow: 0 4px 20px rgba(239,118,34,0.40); }
.auth-logo-name { font-size: 18px; font-weight: 700; color: var(--text); font-family: 'Oswald', sans-serif; letter-spacing: .04em; }
.auth-logo-sub  { font-size: 11px; color: var(--muted); letter-spacing: .04em; }

.auth-title { font-size: 22px; font-weight: 700; color: #002E5D; margin-bottom: 4px; font-family: 'Oswald', sans-serif; text-transform: uppercase; letter-spacing: .03em; }
.auth-sub   { font-size: 13px; color: #5a6a7e; margin-bottom: 28px; }

.auth-input {
  width: 100%; padding: 11px 14px; border-radius: 10px;
  border: 1px solid rgba(0,46,93,0.18); background: #f8f9fb;
  color: #002E5D; font-size: 14px; font-family: inherit;
  margin-bottom: 14px; transition: border-color .15s;
}
.auth-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(239,118,34,0.12); background: #fff; }
.auth-input::placeholder { color: var(--muted2); }

.auth-btn {
  width: 100%; padding: 13px; border-radius: 10px;
  background: linear-gradient(135deg, var(--orange) 0%, var(--orange2) 100%);
  border: none; color: #fff; font-size: 14px; font-weight: 700;
  font-family: 'Oswald', sans-serif; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: all .15s; margin-top: 4px;
  box-shadow: 0 4px 16px rgba(239,118,34,0.35);
}
.auth-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(239,118,34,0.45); }
.auth-btn:active { transform: translateY(0); }

.auth-btn-secondary {
  width: 100%; padding: 12px; border-radius: 10px;
  background: transparent; border: 1px solid var(--border2);
  color: var(--muted); font-size: 13px; font-weight: 500;
  font-family: inherit; cursor: pointer; transition: all .15s; margin-top: 8px;
}
.auth-btn-secondary:hover { border-color: var(--orange); color: var(--orange); background: rgba(239,118,34,0.06); }

.auth-link   { font-size: 13px; color: var(--orange); cursor: pointer; text-decoration: underline; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 13px; color: var(--muted2); }
.auth-divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.auth-error   { background: var(--redbg); border: 1px solid rgba(239,68,68,0.30); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--red); margin-bottom: 14px; }
.auth-success { background: var(--greenbg); border: 1px solid rgba(34,197,94,0.30); border-radius: 8px; padding: 10px 14px; font-size: 13px; color: var(--green); margin-bottom: 14px; }
.pw-strength-bar { height: 4px; border-radius: 2px; margin-top: -10px; margin-bottom: 14px; transition: width .3s, background .3s; }

/* ── Mobile hint ─────────────────────────────────────────────── */
.mobile-hint { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--amberbg); border: 1px solid rgba(245,158,11,0.25); border-radius: 8px; font-size: 12px; color: var(--amber); margin-bottom: 16px; }

/* ── ICS button ──────────────────────────────────────────────── */
.btn-ics { background: rgba(59,130,246,0.10); color: var(--blue); border: 1px solid rgba(59,130,246,0.25) !important; }
.btn-ics:hover { background: rgba(59,130,246,0.18); }

/* ── Hamburger button (hidden on desktop) ────────────────────── */
.hamburger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 6px 8px; border-radius: 8px; color: #fff;
  font-size: 22px; line-height: 1; margin-right: 6px;
  transition: background .15s;
}
.hamburger:hover { background: rgba(255,255,255,0.15); }

/* ── Sidebar overlay backdrop (mobile) ───────────────────────── */
.sidebar-overlay {
  display: none; position: fixed; inset: 0;
  z-index: 98; background: rgba(0,0,0,0.45);
}
.sidebar-overlay.show { display: block; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Show hamburger in topbar */
  .hamburger { display: flex; align-items: center; justify-content: center; }

  /* Sidebar slides in from the left as overlay — text stays fully visible */
  .sidebar {
    position: fixed; top: 0; left: -240px;
    height: 100vh; height: 100dvh; /* dvh = real visible height on mobile browsers */
    width: 230px; min-width: 230px; z-index: 99;
    transition: left .25s ease;
    box-shadow: 4px 0 24px rgba(0,0,0,0.30);
    overflow-y: auto; /* scroll if nav items exceed screen height */
  }
  .sidebar.open { left: 0; }

  /* Ensure footer (logout) is never cut off */
  .nav-body { flex: 1; overflow-y: auto; min-height: 0; }
  .sidebar-footer {
    flex-shrink: 0;
    padding-bottom: max(12px, env(safe-area-inset-bottom)); /* iPhone notch/home bar */
  }

  .content { width: 100%; }
  .main-panel { padding: 16px; }
  .form-row { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .topbar { padding: 12px 16px; }
  .page-title { font-size: 15px; }
  .auth-card { padding: 28px 20px; }
  .auth-logo-img { width: 160px; }
}

/* ── Site footer ─────────────────────────────────────────────── */
.site-footer {
  flex-shrink: 0;
  background: #002E5D;
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  text-align: center;
  padding: 14px 24px;
  line-height: 1.6;
  letter-spacing: .02em;
  border-top: 2px solid var(--orange);
}

/* ── File upload widget ──────────────────────────────────────── */
.file-drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 24px 16px;
  border: 2px dashed var(--border2);
  border-radius: 10px;
  background: var(--bg);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.file-drop:hover {
  border-color: var(--orange);
  background: rgba(239,118,34,0.04);
}
.file-drop-selected {
  border-color: var(--green);
  background: rgba(26,138,74,0.04);
}
.file-drop-hover,
.upload-zone-hover {
  border-color: var(--orange) !important;
  background: rgba(239,118,34,0.08) !important;
  transform: scale(1.01);
}
.file-drop-icon { font-size: 28px; line-height: 1; }
.file-drop-text { font-size: 13px; color: var(--muted); }
.file-preview   { margin-top: 8px; }

/* upload-zone already exists in admin styles — add transition for drag feedback */
.upload-zone { transition: border-color .15s, background .15s, transform .15s; }
