/* ═══════════════════════════════════════════════════════════════
   AI Job Loss Tracker — Shared Styles
   The Alliance for Secure AI
   Light theme · WCAG 2.1 AA compliant
   ═══════════════════════════════════════════════════════════════ */

:root {
  /* Brand */
  --seaweed:       #192d17;
  --seaweed-mid:   #2a4a26;
  --gamboge:       #c07f10;       /* darkened for AA on white (4.6:1) */
  --gamboge-light: #e4991b;       /* decorative only, not for text on white */
  --gamboge-bg:    #fef8ed;
  --green:         #3d6b35;       /* darkened for AA on white (5.8:1) */
  --green-light:   #709663;       /* large text / decorative only */
  --green-bg:      #f0f5ee;
  --green-bg-alt:  #e5ede2;

  /* Surfaces */
  --bg:            #ffffff;
  --bg-warm:       #faf8f5;       /* warm off-white like corporate site */
  --bg-cool:       #f3f6f2;       /* green-tinted off-white */

  /* Text — all meet 4.5:1 on white */
  --text:          #1a2118;       /* primary — 14.8:1 */
  --text-mid:      #4a5648;       /* secondary — 6.2:1 */
  --text-dim:      #6b7a64;       /* tertiary — 4.5:1 exactly */
  --text-on-dark:  #f3f7f1;
  --text-on-dark-mid: #b8c8b1;

  /* Borders */
  --border:        #d4ddd0;
  --border-light:  #e8ede5;
  --border-focus:  #3d6b35;

  /* Feedback */
  --red:           #b03a2e;       /* AA on white: 5.4:1 */
  --red-bg:        #fdf0ee;
  --green-pos:     #2d7a2d;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(25,45,23,0.08);
  --shadow-md:     0 4px 12px rgba(25,45,23,0.1);
  --shadow-lg:     0 8px 24px rgba(25,45,23,0.12);
}

/* ── Reset ─── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: "Libre Franklin", "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
  color: var(--text); line-height: 1.6; -webkit-font-smoothing: antialiased;
}

/* ── Focus — WCAG 2.4.7 ─── */
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
}

/* ── Logo mask — luminance mode for JPEG/no-alpha ─── */
.logo-mask {
  background: var(--text-on-dark);
  -webkit-mask: var(--mask-img) no-repeat left center / contain;
  mask: var(--mask-img) no-repeat left center / contain;
  -webkit-mask-mode: luminance; mask-mode: luminance;
}
.logo-mask-center {
  background: var(--text-on-dark);
  -webkit-mask: var(--mask-img) no-repeat center / contain;
  mask: var(--mask-img) no-repeat center / contain;
  -webkit-mask-mode: luminance; mask-mode: luminance;
}
.logo-mask-dark {
  background: var(--seaweed);
  -webkit-mask: var(--mask-img) no-repeat left center / contain;
  mask: var(--mask-img) no-repeat left center / contain;
  -webkit-mask-mode: luminance; mask-mode: luminance;
}

/* ── Pill & tag components ─── */
.stock-pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 0.15rem 0.5rem; font-weight: 700; white-space: nowrap; font-size: 0.82rem;
}
.stock-pill.pos { color: #1a5c1a; background: #e6f4e6; border: 1px solid #b8dbb8; }
.stock-pill.neg { color: #7a2920; background: #fce8e5; border: 1px solid #ecc5bf; }
.stock-pill.na  { color: var(--text-dim); background: var(--bg-cool); border: 1px solid var(--border); }

.pct-pill {
  display: inline-flex; align-items: center; border-radius: 999px;
  padding: 0.15rem 0.5rem; background: var(--gamboge-bg);
  border: 1px solid #e8d5aa; font-weight: 700; font-size: 0.82rem; color: #7a5a0a;
}

.attr-tag {
  display: inline-block; font-size: 0.62rem; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; padding: 0.12rem 0.4rem; border-radius: 999px;
}
.attr-tag { transition: box-shadow 0.2s; }
.attr-tag.explicit { background: #e6f4e6; color: #1a5c1a; border: 1px solid #b8dbb8; }
.attr-tag.explicit:hover { box-shadow: 0 0 0 3px rgba(26,92,26,0.1); }
.attr-tag.blamed   { background: var(--gamboge-bg); color: #7a5a0a; border: 1px solid #e8d5aa; }
.attr-tag.blamed:hover { box-shadow: 0 0 0 3px rgba(192,127,16,0.12); }
.attr-tag.mixed    { background: var(--bg-cool); color: var(--text-mid); border: 1px solid var(--border); }
.attr-tag.mixed:hover { box-shadow: 0 0 0 3px rgba(61,107,53,0.08); }

/* ── Source links ─── */
.source-link {
  color: var(--green); font-size: 0.8rem; text-decoration: none;
  font-weight: 600; border-bottom: 1px solid rgba(61,107,53,0.3);
  transition: border-color 0.15s, color 0.15s;
}
.source-link:hover { color: var(--seaweed); border-bottom-color: var(--seaweed); }

/* ── Loading / error ─── */
.loading-state { text-align: center; padding: 2.5rem 1rem; color: var(--text-dim); }
.loading-state .spinner {
  display: inline-block; width: 1.4rem; height: 1.4rem;
  border: 2px solid var(--border); border-top-color: var(--gamboge-light);
  border-radius: 50%; animation: spin 0.8s linear infinite; margin-bottom: 0.5rem;
}
.error-state { text-align: center; padding: 2rem 1rem; color: var(--red); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }


/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — index.html
   ═══════════════════════════════════════════════════════════════ */

.dash-body { background: var(--bg-warm); }

/* ── Dark header band ─── */
.site-header {
  background: linear-gradient(135deg, var(--seaweed) 0%, #1e3a1a 100%);
  padding: 1rem 0 1.1rem;
}
.site-header .wrap {
  width: min(1100px, 92vw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand-logo { display: block; width: min(140px, 30vw); height: auto; aspect-ratio: 1600/583; flex-shrink: 0; }
.site-title {
  margin: 0; font-size: clamp(0.9rem, 2vw, 1.2rem);
  font-weight: 800; color: #f3f7f1; letter-spacing: -0.01em; line-height: 1.1;
}

/* ── Counter section — dark band, first in main ─── */
.counter-section {
  background: var(--seaweed);
  padding: 2.6rem 0 3rem;
  border-top: 1px solid rgba(255,255,255,0.08);
}
.counter-inner { width: min(1100px, 92vw); margin: 0 auto; }
.counter-grid { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.counter-left { min-width: 0; align-self: center; }
.counter-label {
  font-size: 0.7rem; color: rgba(184,200,177,0.95); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.5rem;
}
.counter-number {
  margin: 0;
  font-size: clamp(3.4rem, 10vw, 5.8rem);
  font-weight: 900; font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em; color: #f3f7f1; line-height: 1;
  text-shadow: 0 0 40px rgba(255,255,255,0.07);
}
.counter-number.counting { color: #fff; }
.counter-sub {
  margin: 0.35rem 0 0;
  font-size: clamp(0.95rem, 2.2vw, 1.25rem);
  font-weight: 600; color: rgba(184,200,177,0.82);
  letter-spacing: -0.01em; line-height: 1;
}
.counter-asof { margin: 0.5rem 0 0; font-size: 0.72rem; color: rgba(184,200,177,0.7); letter-spacing: 0.02em; }

.page { width: min(1100px, 92vw); margin: 0 auto; }

/* ── Hero section ─── */
.hero {
  padding: 2rem 0 0;
}
.hero-grid {
  display: grid; grid-template-columns: minmax(0,1.2fr) minmax(280px,0.8fr);
  gap: 1.8rem; align-items: start;
}
.hero-copy { min-width: 0; }
.eyebrow {
  margin: 0; color: var(--green); letter-spacing: 0.12em;
  text-transform: uppercase; font-size: 0.72rem; font-weight: 700;
}
.hero-h2 {
  margin: 0.3rem 0 0; max-width: 20ch;
  font-size: clamp(1.4rem, 3.5vw, 2.2rem); line-height: 1.1; font-weight: 900;
  color: var(--seaweed);
}
.subtitle { margin: 0.8rem 0 0; max-width: 60ch; line-height: 1.55; color: var(--text-mid); font-size: 0.9rem; }
.last-updated { margin: 0.4rem 0 0; font-size: 0.72rem; font-weight: 700; color: var(--gamboge); }

/* ── Trend chart — on white card ─── */
.trend-panel {
  position: relative; border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--bg);
  padding: 0.85rem 1rem 0.75rem;
  box-shadow: var(--shadow-sm);
}
.trend-kicker {
  margin: 0; font-size: 0.62rem; text-transform: uppercase;
  letter-spacing: 0.1em; color: var(--text-dim); font-weight: 700;
}
.trend-panel h3 { margin: 0.25rem 0 0.5rem; font-size: 0.88rem; color: var(--seaweed); }
#monthlyLossChart { display: block; width: 100%; height: 180px; }
.trend-summary { margin: 0.4rem 0 0; color: var(--text-mid); font-size: 0.72rem; line-height: 1.38; }
.chart-tooltip {
  position: absolute; left: 0; top: 0; z-index: 6;
  transform: translate(-50%, calc(-100% - 10px));
  pointer-events: none; white-space: nowrap;
  padding: 0.35rem 0.55rem; border-radius: 0.45rem;
  border: 1px solid var(--border);
  background: var(--bg); color: var(--text);
  font-size: 0.72rem; font-weight: 700;
  box-shadow: var(--shadow-md);
}
.chart-point-highlight {
  position: absolute; left: 0; top: 0; width: 0.65rem; height: 0.65rem;
  border-radius: 50%; transform: translate(-50%,-50%); z-index: 5;
  pointer-events: none; border: 2px solid var(--bg);
  background: var(--gamboge-light); box-shadow: 0 0 0 0.15rem rgba(228,153,27,0.3);
}

/* ── Video embed — on dark (counter section right side) ─── */
.video-embed { min-width: 280px; max-width: 400px; flex-shrink: 0; }
.video-embed-label {
  font-size: 0.7rem; color: rgba(184,200,177,0.95); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em; margin: 0 0 0.5rem;
}
.video-embed iframe { border: none; border-radius: 24px; width: 100%; height: 500px; }

/* ── Signup section ─── */
.signup-section {
  background: var(--seaweed);
  border-top: 1px solid rgba(255,255,255,0.07);
  padding: 0.5rem 0;
}
.signup-wrap {
  width: min(1100px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.4rem 1.5rem;
  align-items: center;
}
.signup-copy h2 {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-on-dark);
  margin: 0 0 0.15rem;
}
.signup-copy p {
  font-size: 0.7rem;
  color: var(--text-on-dark-mid);
  line-height: 1.45;
  margin: 0;
  max-width: 36ch;
}
.signup-form-area {
  min-width: 0;
}

/* ── HubSpot developer-embed form — minimal colour overrides only ─── */
.signup-form-area .hs-form .hs-input {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.35rem 0.6rem;
}
.signup-form-area .hs-form .hs-input:focus {
  outline: 2px solid var(--gamboge-light);
  outline-offset: -1px;
}
.signup-form-area .hs-form label {
  color: var(--text-on-dark);
  font-size: 0.78rem;
  font-weight: 600;
}
.signup-form-area .hs-form .hs-button {
  background: var(--gamboge);
  color: #fff;
  border: none;
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.35rem 1rem;
}
.signup-form-area .hs-form .hs-button:hover { background: var(--gamboge-light); }
.signup-form-area .hs-form .legal-consent-container,
.signup-form-area .hs-form .hs-error-msgs li label {
  color: var(--text-on-dark-mid);
  font-size: 0.7rem;
}
.signup-form-area .submitted-message {
  color: #a0e0a0;
  font-weight: 600;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .signup-wrap {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .signup-copy p { max-width: 100%; }
}

/* ── Stats strip — white cards ─── */
.stats-section { padding: 1.5rem 0 0; }
.stats-row {
  width: min(1100px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 0.85rem;
}
.stat-card {
  border-radius: 0.65rem; padding: 0.85rem 1rem;
  border: 1px solid var(--border); background: var(--bg);
  box-shadow: var(--shadow-sm);
}
.stat-card h3 { margin: 0; font-size: 0.68rem; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.stat-card p { margin: 0.25rem 0 0; font-size: clamp(1.3rem, 3vw, 2rem); font-weight: 800; color: var(--seaweed); }

/* ── Scroll reveal ─── */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 0.5s cubic-bezier(0.25,1,0.5,1), transform 0.5s cubic-bezier(0.25,1,0.5,1); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── Reports section ─── */
.reports-section { padding: 1.5rem 0; }
.reports-wrap { width: min(1100px, 92vw); margin: 0 auto; }
.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 0.75rem; gap: 0.5rem;
}
.section-head h2 { font-size: 1.1rem; margin: 0; color: var(--seaweed); }
.section-head-right { display: flex; align-items: center; gap: 0.65rem; }
.count-badge { font-size: 0.72rem; color: var(--text-dim); font-weight: 600; }

/* ── View toggle ─── */
.view-toggle {
  display: inline-flex; border-radius: 999px; position: relative;
  border: 1px solid var(--border); background: var(--bg-cool);
  padding: 0.15rem;
}
.view-btn {
  border: none; background: transparent; cursor: pointer;
  font-family: inherit; font-size: 0.65rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-dim); padding: 0.28rem 0.65rem;
  border-radius: 999px; transition: background 0.2s cubic-bezier(0.25,1,0.5,1), color 0.2s;
  line-height: 1; position: relative; z-index: 1;
}
.view-btn.active {
  background: var(--seaweed); color: var(--text-on-dark);
}
.view-btn:hover:not(.active) { color: var(--text-mid); }

/* Desktop table */
.table-card {
  border: 1px solid var(--border); border-radius: 0.75rem;
  background: var(--bg); box-shadow: var(--shadow-sm); overflow: hidden;
}
.table-wrap { overflow-x: auto; }
table { width: 100%; table-layout: fixed; border-collapse: collapse; }
thead th {
  text-align: left; font-size: 0.66rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--text-mid);
  background: var(--bg-cool); padding: 0.6rem 0.7rem;
  white-space: normal; overflow-wrap: anywhere; font-weight: 700;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 0.65rem 0.7rem; border-top: 1px solid var(--border-light);
  font-size: 0.86rem; color: var(--text); vertical-align: top; overflow-wrap: anywhere;
}
thead th:nth-child(1), tbody td:nth-child(1) { width: 30%; }
thead th:nth-child(2), tbody td:nth-child(2) { width: 18%; }
thead th:nth-child(3), tbody td:nth-child(3) { width: 18%; }
thead th:nth-child(4), tbody td:nth-child(4) { width: 16%; }
thead th:nth-child(5), tbody td:nth-child(5) { width: 18%; }
tbody tr { transition: background 0.15s; }
tbody tr:hover { background: var(--green-bg); }
tbody tr:nth-child(even) { background: var(--bg-warm); }
tbody tr:nth-child(even):hover { background: var(--green-bg-alt); }

/* Major layoff rows */
tbody tr.major { background: var(--gamboge-bg); }
tbody tr.major td:first-child { border-left: 3px solid var(--gamboge-light); padding-left: calc(0.7rem - 3px); }
tbody tr.major .cell-company { font-size: 0.95rem; }
tbody tr.major .cell-jobs { font-size: 0.98rem; font-weight: 800; color: var(--gamboge); }

.cell-company { font-weight: 700; color: var(--seaweed); }
.cell-meta { color: var(--text-dim); font-size: 0.74rem; display: block; margin-top: 0.12rem; }
.cell-jobs { font-weight: 700; }

.table-disclaimer {
  padding: 0.55rem 0.7rem; font-size: 0.66rem; color: var(--text-dim);
  line-height: 1.4; font-style: italic; border-top: 1px solid var(--border-light);
  background: var(--bg-cool);
}

/* ── Mobile cards ─── */
.mobile-cards { display: none; }
.report-card {
  border: 1px solid var(--border); border-radius: 0.65rem;
  padding: 0.85rem; background: var(--bg); margin-bottom: 0.6rem;
  box-shadow: var(--shadow-sm);
}
.report-card:last-child { margin-bottom: 0; }
.report-card.major { border-left: 3px solid var(--gamboge-light); background: var(--gamboge-bg); }
.rc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.5rem; }
.rc-company { font-weight: 800; font-size: 0.95rem; color: var(--seaweed); }
.report-card.major .rc-company { font-size: 1.05rem; }
.rc-jobs { font-weight: 800; font-size: 1rem; white-space: nowrap; color: var(--text); }
.report-card.major .rc-jobs { color: var(--gamboge); font-size: 1.1rem; }
.rc-meta { color: var(--text-dim); font-size: 0.72rem; margin-top: 0.1rem; }
.rc-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0.35rem 0.75rem; margin-top: 0.55rem; padding-top: 0.55rem;
  border-top: 1px solid var(--border-light);
}
.rc-label { font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim); font-weight: 700; }
.rc-value { font-size: 0.82rem; font-weight: 600; margin-top: 0.03rem; }

/* ── Method — collapsible ─── */
.method-section { padding: 0 0 1rem; }
.method-wrap { width: min(1100px, 92vw); margin: 0 auto; }
.method {
  border-radius: 0.65rem; padding: 0.75rem 1rem;
  background: var(--green-bg); border: 1px solid var(--green-bg-alt);
}
.method summary {
  font-size: 0.85rem; font-weight: 700; cursor: pointer;
  list-style: none; display: flex; align-items: center; gap: 0.4rem;
  color: var(--seaweed);
}
.method summary::-webkit-details-marker { display: none; }
.method summary::before { content: "▸"; font-size: 0.7rem; transition: transform 0.2s; }
.method[open] summary::before { transform: rotate(90deg); }
.method .method-body {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s cubic-bezier(0.25,1,0.5,1);
  overflow: hidden;
}
.method[open] .method-body { grid-template-rows: 1fr; }
.method .method-body > * { overflow: hidden; min-height: 0; }
.method .method-body-inner { padding-top: 0.5rem; }
.method p { margin: 0.35rem 0 0; color: var(--text-mid); line-height: 1.5; font-size: 0.84rem; }

/* ── Citation + contact ─── */
.cite-section { padding: 0 0 1.5rem; }
.cite-wrap {
  width: min(1100px, 92vw); margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem;
}
.cite-block {
  border-radius: 0.65rem; padding: 0.85rem 1rem;
  background: var(--bg); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.cite-block h3 { margin: 0 0 0.35rem; font-size: 0.78rem; color: var(--seaweed); text-transform: uppercase; letter-spacing: 0.04em; }
.cite-block p { margin: 0; font-size: 0.84rem; color: var(--text-mid); line-height: 1.5; }
.cite-block a { color: var(--green); font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(61,107,53,0.3); }
.cite-block a:hover { color: var(--seaweed); }
.cite-block em { font-style: italic; }
@media (max-width: 768px) {
  .cite-wrap { grid-template-columns: 1fr; }
}

/* ── Footer ─── */
.site-footer {
  background: var(--seaweed); padding: 1.4rem 0;
}
.footer-inner {
  width: min(1100px, 92vw); margin: 0 auto;
  display: flex; align-items: center; gap: 1.2rem;
}
.footer-logo { width: 120px; height: auto; aspect-ratio: 1600/583; }
.site-footer p { margin: 0; color: var(--text-on-dark-mid); font-size: 0.72rem; line-height: 1.45; }
.site-footer a { color: var(--gamboge-light); text-decoration: underline; }
.site-footer a:hover { color: #fff; }

/* ── Responsive ─── */
@media (max-width: 768px) {
  .site-header { padding: 0.85rem 0; }
  .brand-logo { width: min(110px, 30vw); }
  .site-title { font-size: clamp(0.82rem, 4vw, 1rem); }
  .header-updated { font-size: 0.6rem; }
  .counter-section { padding: 1.8rem 0 2.2rem; }
  .counter-grid { flex-direction: column; align-items: flex-start; gap: 1.2rem; }
  .counter-number { font-size: clamp(2.8rem, 13vw, 4rem); }
  .video-embed { max-width: 100%; align-self: stretch; }
  .video-embed iframe { height: 400px; }
  .hero { padding: 1.4rem 0 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 1rem; }
  .hero-h2 { font-size: clamp(1.3rem, 6vw, 1.8rem); }
  .subtitle { font-size: 0.84rem; }
  .stats-row { gap: 0.45rem; }
  .stat-card { padding: 0.6rem 0.65rem; }
  .stat-card h3 { font-size: 0.62rem; }
  .stat-card p { font-size: 1.15rem; }
  .reports-section { padding: 1rem 0; }
  .table-wrap { display: none; }
  .mobile-cards { display: block; }
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.6rem; }
}
@media (max-width: 420px) {
  .stats-row { gap: 0.3rem; }
  .stat-card { padding: 0.45rem 0.5rem; }
  .brand-logo { width: min(90px, 32vw); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ── Print ─── */
@media print {
  .site-header, .site-footer { break-inside: avoid; }
  .video-embed { display: none; }
  .counter-section { background: #f0f0f0 !important; }
  .counter-number, .site-title { color: #111 !important; }
  body { font-size: 11pt; }
}


/* ═══════════════════════════════════════════════════════════════
   ADMIN — admin.html
   ═══════════════════════════════════════════════════════════════ */

.admin-body { background: var(--bg-warm); color: var(--text); }

.login-screen {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: linear-gradient(135deg, var(--seaweed), #1e3a1a);
}
.login-box {
  width: min(380px, 90vw); padding: 2.2rem; border-radius: 1rem;
  border: 1px solid rgba(255,255,255,0.15); background: rgba(255,255,255,0.06);
  backdrop-filter: blur(12px);
}
.login-box .login-logo { display: block; margin: 0 auto 1.2rem; width: 180px; height: auto; aspect-ratio: 1600/583; }
.login-box h1 { text-align: center; font-size: 1.1rem; font-weight: 700; margin-bottom: 1.4rem; color: var(--text-on-dark-mid); }
.login-box input {
  width: 100%; padding: 0.7rem 0.85rem; border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.2); background: rgba(255,255,255,0.08); color: #fff;
  font-size: 0.95rem; font-family: inherit; outline: none; transition: border-color 0.2s;
}
.login-box input::placeholder { color: rgba(255,255,255,0.4); }
.login-box input:focus { border-color: var(--gamboge-light); }
.login-box button { margin-top: 0.85rem; }
.login-error { color: #ffa0a0; font-size: 0.82rem; margin-top: 0.5rem; text-align: center; min-height: 1.2em; }

.admin-app { display: none; }
.admin-app.active { display: block; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1.5rem; border-bottom: 1px solid var(--border);
  background: var(--bg); position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-left { display: flex; align-items: center; gap: 0.75rem; }
.topbar-shield { height: 1.4rem; width: auto; aspect-ratio: 219/256; }
.topbar h1 { font-size: 0.92rem; font-weight: 700; color: var(--text-mid); }
.topbar-right { display: flex; align-items: center; gap: 0.65rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 1.5rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.55rem 1rem; border-radius: 0.5rem; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit;
  font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: all 0.15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--bg-cool); border-color: var(--green); }
.btn-primary { background: var(--seaweed); border-color: var(--seaweed); color: #fff; }
.btn-primary:hover { background: var(--seaweed-mid); }
.btn-danger { color: var(--red); }
.btn-danger:hover { background: var(--red-bg); border-color: var(--red); }
.btn-sm { padding: 0.35rem 0.65rem; font-size: 0.78rem; }
.btn-icon { padding: 0.35rem 0.5rem; font-size: 1rem; line-height: 1; }

.admin-stats-bar { display: flex; gap: 1rem; margin-bottom: 1.2rem; flex-wrap: wrap; }
.stat-chip {
  padding: 0.55rem 1rem; border-radius: 0.6rem; border: 1px solid var(--border);
  background: var(--bg); font-size: 0.82rem; color: var(--text-mid);
  box-shadow: var(--shadow-sm);
}
.stat-chip strong { color: var(--seaweed); font-weight: 800; font-size: 1.05rem; margin-right: 0.3rem; }

.table-section {
  border: 1px solid var(--border); border-radius: 0.75rem;
  overflow: hidden; background: var(--bg); box-shadow: var(--shadow-sm);
}
.table-header {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--border);
}
.table-header h2 { font-size: 0.95rem; font-weight: 700; color: var(--seaweed); }
.admin-table { width: 100%; border-collapse: collapse; min-width: 700px; }
.admin-table thead th {
  text-align: left; padding: 0.6rem 0.7rem; font-size: 0.68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-dim);
  background: var(--bg-cool); border-bottom: 1px solid var(--border); white-space: nowrap;
}
.admin-table tbody td {
  padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--border-light);
  font-size: 0.86rem; vertical-align: middle;
}
.admin-table tbody tr { transition: background 0.1s; }
.admin-table tbody tr:hover { background: var(--green-bg); }

.toggle-track {
  position: relative; width: 2.6rem; height: 1.4rem; border-radius: 999px;
  background: var(--border); cursor: pointer; transition: background 0.2s;
  border: none; padding: 0;
}
.toggle-track.on { background: var(--green); }
.toggle-knob {
  position: absolute; top: 2px; left: 2px; width: 1rem; height: 1rem;
  border-radius: 50%; background: #fff; transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-track.on .toggle-knob { transform: translateX(1.2rem); }

.modal-backdrop {
  display: none; position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(4px);
  align-items: flex-start; justify-content: center; padding-top: 6vh;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }
.modal {
  width: min(560px, 92vw); border-radius: 1rem; border: 1px solid var(--border);
  background: var(--bg); padding: 1.6rem; margin-bottom: 2rem;
  box-shadow: var(--shadow-lg); animation: fadeUp 0.2s ease-out;
}
.modal h2 { font-size: 1.1rem; margin-bottom: 1.2rem; color: var(--seaweed); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.85rem; }
.form-group { display: flex; flex-direction: column; gap: 0.3rem; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 0.78rem; font-weight: 600; color: var(--text-mid); }
.form-group input,
.form-group select {
  padding: 0.55rem 0.7rem; border-radius: 0.45rem; border: 1px solid var(--border);
  background: var(--bg); color: var(--text); font-family: inherit; font-size: 0.88rem;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group select:focus { border-color: var(--border-focus); }
.form-group select { cursor: pointer; }
.form-actions {
  display: flex; gap: 0.65rem; justify-content: flex-end;
  margin-top: 1.2rem; padding-top: 1rem; border-top: 1px solid var(--border-light);
}
.form-row-check { display: flex; align-items: center; gap: 0.5rem; margin-top: 0.3rem; }
.form-row-check input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--green); cursor: pointer; }

.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 300;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.toast {
  padding: 0.65rem 1rem; border-radius: 0.55rem; font-size: 0.85rem; font-weight: 600;
  background: var(--bg); border: 1px solid var(--green); color: var(--green);
  box-shadow: var(--shadow-md); animation: fadeUp 0.25s ease-out;
}
.toast.error { border-color: var(--red); color: var(--red); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-dim); }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .admin-stats-bar { flex-direction: column; }
  .topbar { flex-wrap: wrap; }
}
