/* ================================================================
   EMSER PORTAL — GLOBAL STYLESHEET
   Colors: #C49A3C (gold) · #1e1e1e (charcoal)
   Fonts: Cormorant Garamond (display) · Barlow (body)
================================================================ */

:root {
  --gold: #B8860B;
  --gold-light: #C49A3C;
  --gold-dim: rgba(184,134,11,0.10);
  --charcoal: #f2f1ee;
  --charcoal-2: #ffffff;
  --charcoal-3: #f7f6f3;
  --charcoal-4: #eae9e5;
  --border: rgba(0,0,0,0.09);
  --border-gold: rgba(184,134,11,0.30);
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --text-dim: #aaa;
  --red: #b91c1c;
  --yellow: #92400e;
  --green: #166534;
  --sidebar-w: 240px;
  --topbar-h: 60px;
  --radius: 6px;
  --shadow: 0 2px 16px rgba(0,0,0,0.08);
}

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

html { font-size: 15px; }

body {
  font-family: 'Barlow', sans-serif;
  background: var(--charcoal);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── SCROLLBAR ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ================================================================
   PORTAL LANDING — password gate + app cards
================================================================ */
.portal-bg {
  min-height: 100vh;
  background: #f2f1ee;
  background-image:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(184,134,11,0.08) 0%, transparent 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 24px 32px;
}

.portal-header {
  text-align: center;
  margin-bottom: 32px;
}

.portal-wordmark {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 12px;
}

.portal-tile-mark {
  width: 48px;
  height: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
}

.portal-tile-mark span {
  background: var(--gold);
  border-radius: 2px;
  opacity: 0.9;
}

.portal-tile-mark span:nth-child(2) { opacity: 0.6; }
.portal-tile-mark span:nth-child(3) { opacity: 0.6; }

.portal-brand-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.6rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.08em;
  line-height: 1;
}

.portal-brand-name span { color: var(--gold); }

.portal-tagline {
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.portal-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 12px auto;
}

/* App Cards Grid */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 900px;
}

@media (max-width: 700px) {
  .portal-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .portal-grid { grid-template-columns: 1fr; }
}

.app-card {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px 20px;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}

.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), transparent);
  opacity: 0;
  transition: opacity 0.25s;
}

.app-card:hover {
  border-color: var(--border-gold);
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.4), 0 0 0 1px rgba(196,154,60,0.1);
}

.app-card:hover::before { opacity: 1; }

.app-card-icon {
  width: 38px;
  height: 38px;
  background: var(--gold-dim);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.app-card-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--gold);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-card-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 5px;
}

.app-card-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 14px;
}

.app-card-arrow {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--gold);
  text-transform: uppercase;
  font-weight: 500;
}

.app-card-badge {
  display: inline-block;
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  margin-bottom: 10px;
}

.badge-live { background: rgba(76,175,125,0.15); color: var(--green); border: 1px solid rgba(76,175,125,0.3); }
.badge-soon { background: rgba(196,154,60,0.1); color: var(--text-dim); border: 1px solid rgba(255,255,255,0.08); }

/* ================================================================
   AUTH PAGES — Login, Portal Login
================================================================ */
.auth-page {
  min-height: 100vh;
  background: #f2f1ee;
  background-image: radial-gradient(ellipse 60% 50% at 50% 0%, rgba(184,134,11,0.06) 0%, transparent 70%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-container {
  width: 100%;
  max-width: 420px;
}

.auth-brand {
  text-align: center;
  margin-bottom: 36px;
}

.auth-brand-mark {
  width: 56px;
  height: 56px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.05em;
}

.auth-brand-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.05em;
}

.auth-brand-sub {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.auth-box {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 36px;
}

.auth-box h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 4px;
}

.auth-box-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 28px;
}

/* ================================================================
   SIDEBAR LAYOUT
================================================================ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #1e1e1e;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.25s ease;
}

.sidebar-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: 'Cormorant Garamond', serif; font-size: 1.05rem; font-weight: 600; color: #e8e8e8; letter-spacing: 0.04em; }
.brand-sub { font-size: 0.62rem; text-transform: uppercase; letter-spacing: 0.18em; color: #666; }

.sidebar-user {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 32px;
  height: 32px;
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.03em;
  flex-shrink: 0;
}

.user-info { display: flex; flex-direction: column; min-width: 0; }
.user-name { font-size: 0.82rem; font-weight: 500; color: #e8e8e8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 0.68rem; color: #777; text-transform: capitalize; }

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 10px 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius);
  color: #999;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 400;
  transition: color 0.15s, background 0.15s;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item:hover { color: #fff; background: rgba(255,255,255,0.06); }
.nav-item.active { color: #C49A3C; background: rgba(196,154,60,0.15); font-weight: 500; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.06); margin: 8px 4px; }

.sidebar-footer {
  padding: 10px 10px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.logout-btn { color: var(--text-dim); }
.logout-btn:hover { color: var(--red); background: rgba(224,85,85,0.08); }

/* ── MAIN CONTENT ────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  background: #ffffff;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
  flex: 1;
  letter-spacing: 0.02em;
}

.topbar-actions { display: flex; align-items: center; gap: 10px; }

.page-content {
  padding: 28px;
  flex: 1;
}

/* ================================================================
   COMPONENTS
================================================================ */

/* ── CARDS ───────────────────────────────────────────────────── */
.card {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.card-header {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}

.card-body { padding: 20px 22px; }

/* ── STAT CARDS ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px 22px;
}

.stat-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.stat-value {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
}

.stat-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.stat-card.gold-accent { border-left: 3px solid var(--gold); }
.stat-card.green-accent { border-left: 3px solid var(--green); }
.stat-card.red-accent { border-left: 3px solid var(--red); }
.stat-card.yellow-accent { border-left: 3px solid var(--yellow); }

/* ── BUTTONS ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 18px;
  border-radius: var(--radius);
  font-family: 'Barlow', sans-serif;
  font-size: 0.84rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}

.btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.btn-gold { background: var(--gold); color: #1a1200; }
.btn-gold:hover { background: var(--gold-light); }

.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text); border-color: rgba(255,255,255,0.15); }

.btn-danger { background: rgba(224,85,85,0.1); color: var(--red); border: 1px solid rgba(224,85,85,0.2); }
.btn-danger:hover { background: rgba(224,85,85,0.18); }

.btn-sm { padding: 5px 12px; font-size: 0.78rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 7px; }

/* ── FORMS ───────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); margin-bottom: 7px; font-weight: 500; }

.form-input, .form-select, .form-textarea {
  width: 100%;
  background: var(--charcoal-3);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  padding: 9px 13px;
  outline: none;
  transition: border-color 0.15s;
  appearance: none;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--gold);
}

.form-textarea { resize: vertical; min-height: 80px; }
.form-select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

/* ── TABLES ──────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
thead th { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--text-muted); padding: 11px 14px; border-bottom: 1px solid var(--border); font-weight: 500; text-align: left; white-space: nowrap; }
tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,0.02); }

th.right, td.right { text-align: right; }
th.center, td.center { text-align: center; }

.td-editable {
  cursor: pointer;
  position: relative;
}

.td-editable:hover .editable-val {
  background: var(--charcoal-3);
  border-radius: 4px;
}

.editable-val {
  display: inline-block;
  padding: 3px 7px;
  min-width: 90px;
  transition: background 0.15s;
}

.editable-input {
  background: var(--charcoal-3);
  border: 1px solid var(--gold);
  border-radius: 4px;
  color: var(--text);
  font-family: 'Barlow', sans-serif;
  font-size: 0.875rem;
  padding: 3px 7px;
  width: 110px;
  outline: none;
}

/* Quarter/Total rows */
.row-quarter td { background: rgba(196,154,60,0.06); font-weight: 500; }
.row-quarter td:first-child { color: var(--gold); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; }
.row-total td { background: rgba(196,154,60,0.1); font-weight: 600; border-top: 1px solid var(--border-gold); }
.row-total td:first-child { font-family: 'Cormorant Garamond', serif; font-size: 1rem; color: var(--gold); }

/* ── ALERTS ──────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  margin-bottom: 18px;
}
.alert-error { background: rgba(224,85,85,0.1); color: #f5a0a0; border: 1px solid rgba(224,85,85,0.25); }
.alert-success { background: rgba(76,175,125,0.1); color: #8fdfb4; border: 1px solid rgba(76,175,125,0.25); }
.alert-info { background: var(--gold-dim); color: #d4b870; border: 1px solid var(--border-gold); }

/* ── BADGES / GRADE ─────────────────────────────────────────── */
.grade { font-size: 1rem; }
.grade-label { font-size: 0.72rem; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 20px; font-size: 0.72rem; font-weight: 500; }
.tag-green { background: rgba(76,175,125,0.12); color: var(--green); }
.tag-yellow { background: rgba(212,160,23,0.12); color: var(--yellow); }
.tag-red { background: rgba(224,85,85,0.12); color: var(--red); }
.tag-gold { background: var(--gold-dim); color: var(--gold); }
.tag-gray { background: rgba(255,255,255,0.06); color: var(--text-muted); }

/* ── MODALS ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%;
  max-width: 480px;
  transform: translateY(12px);
  transition: transform 0.2s;
  overflow: hidden;
}

.modal-overlay.open .modal { transform: translateY(0); }

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

.modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  font-size: 1.2rem;
  line-height: 1;
  transition: color 0.15s;
}
.modal-close:hover { color: var(--text); }

.modal-body { padding: 22px 24px; }
.modal-footer { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; }

/* ── TOAST ───────────────────────────────────────────────────── */
#toast {
  position: fixed;
  bottom: 28px;
  right: 28px;
  background: #1e1e1e;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 0.85rem;
  color: #e8e8e8;
  z-index: 300;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.25s;
  pointer-events: none;
  max-width: 320px;
}

#toast.show { transform: translateY(0); opacity: 1; }
#toast.success { border-color: rgba(76,175,125,0.4); }
#toast.error { border-color: rgba(224,85,85,0.4); color: #f5a0a0; }

/* ── VARIANCE ────────────────────────────────────────────────── */
.positive { color: var(--green); }
.negative { color: var(--red); }
.neutral { color: var(--text-muted); }

/* ── SECTION HEADERS ─────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--text);
}

.section-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ── PAGE SELECTORS ──────────────────────────────────────────── */
.selector-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}

.selector-row label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }

/* ── ACCORDION ───────────────────────────────────────────────── */
.accordion-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--charcoal-2);
  border: none;
  color: var(--text);
  cursor: pointer;
  font-family: 'Barlow', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  transition: background 0.15s;
}

.accordion-trigger:hover { background: var(--charcoal-3); }
.accordion-trigger.open { background: var(--charcoal-3); }

.accordion-chevron {
  width: 16px;
  height: 16px;
  stroke: var(--text-muted);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.accordion-trigger.open .accordion-chevron { transform: rotate(180deg); }

.accordion-body {
  display: none;
  padding: 20px;
  background: rgba(0,0,0,0.1);
  border-top: 1px solid var(--border);
}

.accordion-body.open { display: block; }

/* ── PRIORITY ────────────────────────────────────────────────── */
.priority-high { color: var(--red); }
.priority-medium { color: var(--yellow); }
.priority-low { color: var(--text-muted); }

/* ── WINS CARD ───────────────────────────────────────────────── */
.wins-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-bottom: 24px; }

.win-slot {
  background: var(--charcoal-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px;
  position: relative;
}

.win-slot.filled { border-color: rgba(196,154,60,0.25); }

.win-number {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 300;
  color: var(--gold-dim);
  line-height: 1;
  position: absolute;
  top: 14px;
  right: 18px;
  opacity: 0.5;
}

.win-label { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.15em; color: var(--gold); margin-bottom: 12px; }
.win-amount { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 600; color: var(--text); }
.win-order { font-size: 0.78rem; color: var(--text-muted); margin-top: 3px; }
.win-context { font-size: 0.82rem; color: var(--text); margin-top: 8px; line-height: 1.5; }

/* ── PROGRESS BAR ────────────────────────────────────────────── */
.progress-bar {
  height: 4px;
  background: var(--charcoal-4);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.5s ease;
}

.progress-fill.green { background: var(--green); }
.progress-fill.yellow { background: var(--yellow); }
.progress-fill.red { background: var(--red); }
.progress-fill.gold { background: var(--gold); }

/* ── EMPTY STATE ─────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
}

.empty-state svg { width: 36px; height: 36px; stroke: var(--text-dim); fill: none; stroke-width: 1.5; margin-bottom: 14px; }
.empty-state p { font-size: 0.88rem; }

/* ── UTILITY ─────────────────────────────────────────────────── */
.text-gold { color: var(--gold); }
.text-muted { color: var(--text-muted); }
.text-green { color: var(--green); }
.text-red { color: var(--red); }
.text-right { text-align: right; }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.font-serif { font-family: 'Cormorant Garamond', serif; }
.strike { text-decoration: line-through; opacity: 0.5; }

/* ── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow); }
  .main-content { margin-left: 0; }
  .menu-toggle { display: block; }
  .form-row { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .page-content { padding: 20px 16px; }
}
