/* ============================================================
   Creative Performance — Twixt-inspired theme
   Palette, type, and the ghost-watermark signature all derive
   from twixtdigital.com's own brand (warm paper, single orange
   accent, oversized outline section dividers).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Reem+Kufi:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  --bg: #FCFBF7;
  --paper: #FFFFFF;
  --ink: #14120F;
  --muted: #8A8577;
  --line: #E7E2D9;
  --line-strong: #D8D2C4;

  --accent: #FF5A1F;
  --accent-soft: #FFE4D6;
  --accent-ink: #C7430F;

  --win: #1B8A5A;
  --win-bg: #E4F4EC;
  --mid: #B8790A;
  --mid-bg: #FBF0DC;
  --low: #C23B3B;
  --low-bg: #FBE7E7;

  --ghost: rgba(20, 18, 15, 0.13);
  --ghost-fill: rgba(20, 18, 15, 0.09);

  --font-display: 'Reem Kufi', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius: 14px;
  --radius-pill: 999px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.35s ease, color 0.35s ease;
}

/* ---------- Dark mode ----------
   Toggled via [data-theme="dark"] on <html>, set by app.js and
   persisted in localStorage. Every color token gets a dark-mode
   value here — nothing falls back to browser defaults, so
   contrast stays intentional in both modes. */

html[data-theme="dark"] {
  --bg: #14120F;
  --paper: #1C1A16;
  --ink: #F5F2EA;
  --muted: #9C9686;
  --line: #322E27;
  --line-strong: #423D33;

  --accent: #FF6B35;
  --accent-soft: rgba(255, 107, 53, 0.16);
  --accent-ink: #FF9466;

  --win: #34C285;
  --win-bg: rgba(52, 194, 133, 0.14);
  --mid: #E0A83F;
  --mid-bg: rgba(224, 168, 63, 0.14);
  --low: #E85C5C;
  --low-bg: rgba(232, 92, 92, 0.14);

  --ghost: rgba(245, 242, 234, 0.13);
  --ghost-fill: rgba(245, 242, 234, 0.09);
}

/* Every surface that carries a theme color transitions smoothly
   when [data-theme] flips, since the underlying CSS custom
   properties change value but the properties below (which
   reference them) are what actually animate. */
body, .card, .stat-card, .chip, .badge, #search, #sortBy,
.card-link, .cp-thumb, .btn-ghost, .theme-toggle, .stats-grid,
.sample-banner, .cp-thumb-placeholder {
  transition: background-color 0.35s ease, color 0.35s ease,
              border-color 0.35s ease, box-shadow 0.35s ease;
}

/* ---------- Theme toggle ---------- */

.theme-toggle {
  display: inline-flex;
  align-items: center;
  height: 44px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-pill);
  padding: 0 5px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(20,18,15,0.06);
}
.theme-toggle:hover { box-shadow: 0 2px 8px rgba(255,90,31,0.25); }

.theme-toggle-track {
  position: relative;
  width: 56px;
  height: 34px;
  border-radius: var(--radius-pill);
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--paper);
  border: 1.5px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(20,18,15,0.15);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.35s ease, border-color 0.35s ease;
}
.theme-toggle-thumb svg { width: 16px; height: 16px; }

html[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(22px);
  background: var(--accent);
  border-color: var(--accent);
}
html[data-theme="dark"] .theme-toggle-thumb svg { stroke: var(--paper); }
html:not([data-theme="dark"]) .theme-toggle-thumb svg { stroke: var(--accent-ink); }

a { color: inherit; }

.mono { font-family: var(--font-mono); }
.display { font-family: var(--font-display); }

.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 48px 32px 96px;
}

/* ---------- Header ---------- */

.header-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
  flex-wrap: wrap;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
}

.brand-logo {
  width: clamp(48px, 9vw, 78px);
  height: clamp(48px, 9vw, 78px);
  border-radius: 16px;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 10px;
  flex-shrink: 0;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.header-brand a { display: inline-flex; cursor: pointer; }
.header-brand a:hover .brand-logo {
  border-color: var(--accent);
  transform: scale(1.04);
}

.eyebrow {
  font-family: var(--font-body);
  font-size: clamp(10px, 1.6vw, 12px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 8px;
  white-space: nowrap;
}

.title {
  font-size: clamp(22px, 5.2vw, 44px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
  white-space: nowrap;
}

.subtitle {
  font-size: 15px;
  color: var(--muted);
  margin: 0;
  max-width: 480px;
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  height: 44px;
  gap: 8px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-ghost:hover { background: var(--accent-ink); transform: translateY(-1px); }
.btn-ghost::after { content: '↗'; font-size: 13px; }

/* ---------- Stat cards ---------- */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--paper);
  padding: 20px 22px;
}

.stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- Sample banner ---------- */

.sample-banner {
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 12px 18px;
  font-size: 13px;
  color: var(--accent-ink);
  margin-bottom: 24px;
}
.sample-banner b { color: var(--ink); }

/* ---------- Toolbar ---------- */

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
}
.chip:hover { border-color: var(--ink); }
.chip.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.toolbar-right {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

#search, #sortBy {
  font-family: var(--font-body);
  font-size: 13px;
  padding: 10px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
}
#search { min-width: 220px; }
#search:focus, #sortBy:focus { outline: none; border-color: var(--accent); }

/* ---------- Ghost watermark (signature element) ----------
   Shown above the grid when a single brand is selected.
   Matches twixtdigital.com's own section dividers exactly —
   solid light-gray fill, lowercase, not an outline effect. */

.ghost-watermark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4.5vw, 70px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--ghost-fill);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 8px 0 -18px;
  user-select: none;
  pointer-events: none;
}

/* ---------- Cards grid ---------- */

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 18px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.15s ease;
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-id {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.card-id-link { text-decoration: none; color: var(--ink); }
.card-id-link:hover { color: var(--accent-ink); }

.card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  background: var(--bg);
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}

.dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

.badge-launched {
  color: var(--accent-ink);
  background: var(--accent-soft);
  border-color: var(--accent);
}

.card-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.cp-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
}
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 20px; font-weight: 700;
  color: var(--muted);
}

.brand-name { font-weight: 600; font-size: 14px; }
.brand-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }

.card-link {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  margin-bottom: 16px;
  cursor: pointer;
}
.link-label { font-size: 10px; font-weight: 600; color: var(--muted); letter-spacing: 0.05em; }
.link-text {
  flex: 1;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.copy-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-size: 14px;
  padding: 2px 4px;
}
.copy-btn:hover { color: var(--ink); }

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.metric-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.metric-value { font-size: 16px; font-weight: 600; }

/* ---------- Active-status accent (guaranteed via inline style from app.js) ---------- */
/* app.js sets border-left + box-shadow inline per card based on live status,
   these variables just define what "active" looks like in this palette. */

/* ---------- Empty state ---------- */

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.empty-title { font-size: 22px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .title { font-size: 32px; }
  .wrap { padding: 32px 18px 64px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-right { flex-direction: column; align-items: stretch; }
  #search { min-width: 0; }
  .ghost-watermark { margin: 8px 0 -6px; font-size: clamp(18px, 7vw, 32px); }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .btn-ghost, .chip { transition: none; }
}

/* ---------- Keyboard focus ---------- */

.chip:focus-visible,
.btn-ghost:focus-visible,
#search:focus-visible,
#sortBy:focus-visible,
.card-id-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   Login page
   Same tokens as the dashboard (Reem Kufi headline, Inter body,
   orange accent, pill controls) — no auth logic touched, this
   is purely presentational and targets login.php's existing
   markup/class names as-is.
   ============================================================ */

.login-body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}

.login-card {
  width: 100%;
  max-width: 400px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: 0 20px 60px -30px rgba(20, 18, 15, 0.18);
  text-align: left;
}

.login-eyebrow {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 12px;
}

.login-title {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 10px;
}

.login-sub {
  font-family: var(--font-body);
  font-size: 14px;
  color: var(--muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.login-card input[type="password"] {
  display: block;
  width: 100%;
  font-family: var(--font-body);
  font-size: 14px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1.5px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  margin-bottom: 16px;
  transition: border-color 0.15s ease, background-color 0.35s ease, color 0.35s ease;
}
.login-card input[type="password"]:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--paper);
}
.login-card input[type="password"]::placeholder { color: var(--muted); }

.login-card button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 46px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.login-card button[type="submit"]:hover {
  background: var(--accent-ink);
  transform: translateY(-1px);
}
.login-card button[type="submit"]::after {
  content: '↗';
  font-size: 14px;
}

.login-error {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--low);
  background: var(--low-bg);
  border: 1px solid var(--low);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
}

/* ---------- Login mode toggle (Team / Admin) ---------- */

.login-mode-tabs {
  display: flex;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: 28px;
}

.login-mode-tab {
  flex: 1;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  padding: 9px 0;
  border: none;
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.login-mode-tab.active {
  background: var(--ink);
  color: var(--paper);
}

/* When Admin mode is active, the whole card shifts to a distinct
   warning-toned accent so it's visually unmistakable from the
   normal team login — same red used for "Underperforming"/Inactive
   elsewhere, repurposed here as an intentional "this edits data" cue. */
.login-card[data-mode="admin"] {
  border-color: var(--low);
  box-shadow: 0 20px 60px -30px rgba(194, 59, 59, 0.35);
}
.login-card[data-mode="admin"] .login-mode-tab[data-mode="admin"].active {
  background: var(--low);
}
.login-card[data-mode="admin"] .login-eyebrow {
  color: var(--low);
}
.login-card[data-mode="admin"] input[type="password"]:focus {
  border-color: var(--low);
}
.login-card[data-mode="admin"] button[type="submit"] {
  background: var(--low);
}
.login-card[data-mode="admin"] button[type="submit"]:hover {
  background: #a52f2f;
}

/* ============================================================
   Launch timeline modal
   ============================================================ */

.badge-launched {
  border: none;
  font-family: var(--font-body);
  cursor: pointer;
}
.badge-launched:hover {
  background: var(--accent);
  color: var(--paper);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 100;
  animation: fadeIn 0.15s ease;
}

.modal-card {
  width: 100%;
  max-width: 740px;
  max-height: 85vh;
  overflow-y: auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: 0 30px 80px -30px rgba(20, 18, 15, 0.35);
}

.modal-loading {
  padding: 40px 0;
  text-align: center;
  color: var(--muted);
  font-family: var(--font-body);
  font-size: 14px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
}

.modal-eyebrow {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-ink);
  margin-bottom: 6px;
}

.modal-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  line-height: 1.2;
}

.modal-close {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.modal-close:hover { background: var(--ink); color: var(--paper); }

.fatigue-banner {
  background: var(--low-bg);
  border: 1px solid var(--low);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.5;
  margin: 16px 0;
}
.fatigue-banner b { color: var(--low); }

.timeline-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 16px;
}

.timeline-header,
.timeline-row {
  display: grid;
  grid-template-columns: 85px 1fr 90px 95px 70px 70px;
  gap: 12px;
  align-items: center;
}

.timeline-header {
  padding: 0 0 10px;
  border-bottom: 1.5px solid var(--line-strong);
  font-family: var(--font-body);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.timeline-row {
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-row:last-child { border-bottom: none; }

.timeline-header .num,
.timeline-row > .num {
  text-align: right;
  justify-self: end;
}

.timeline-total {
  border-radius: 10px;
  padding: 12px 0;
  margin-top: 6px;
  border-top: 1.5px solid var(--accent);
  border-bottom: none !important;
}
.timeline-total-label {
  grid-column: 1 / 3;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.timeline-total-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-ink);
}
.timeline-total-sub {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--accent-ink);
  opacity: 0.75;
}
.timeline-total > div { font-weight: 700; }
.timeline-row > div { font-size: 13px; }

.timeline-date {
  font-size: 12px;
  color: var(--muted);
}

.timeline-name {
  font-size: 13px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend { font-size: 11px; margin-left: 2px; }
.trend-down { color: var(--low); }
.trend-up { color: var(--win); }
.trend-flat { color: var(--muted); }

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (max-width: 560px) {
  .timeline-header { display: none; }
  .timeline-row {
    grid-template-columns: 1fr 1fr;
    gap: 6px 16px;
    padding: 14px 0;
  }
  .timeline-date, .timeline-name { grid-column: 1 / -1; }
  .timeline-name { white-space: normal; }
  .timeline-row > .num { text-align: left; justify-self: start; }
}

/* ============================================================
   Manage page — dense admin table
   ============================================================ */

.admin-table-wrap {
  overflow-x: auto;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
}

.admin-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-family: var(--font-body);
  font-size: 13px;
}

.admin-table thead th {
  text-align: left;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  padding: 12px 14px;
  border-bottom: 1.5px solid var(--line-strong);
  border-right: 1px solid var(--line);
  white-space: nowrap;
}
.admin-table thead th:last-child { border-right: none; }

.admin-table thead th.num { text-align: right; }

.admin-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: middle;
  white-space: nowrap;
}
.admin-table tbody td:last-child { border-right: none; }

.admin-table tbody tr:last-child td { border-bottom: none; }
.admin-table tbody tr:nth-child(even) td { background: var(--bg); }
.admin-table tbody tr:hover td { background: var(--accent-soft); }

.admin-table td.num { text-align: right; }

.admin-table-name {
  font-weight: 600;
  color: var(--ink);
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

.admin-delete-btn {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--low);
  background: var(--low-bg);
  color: var(--low);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.admin-delete-btn:hover {
  background: var(--low);
  color: var(--paper);
}

.admin-name-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}
.admin-name-link:hover { color: var(--accent-ink); text-decoration: underline; }

/* ============================================================
   Import loading overlay — shown the instant either form on
   admin.php is submitted, since these are real page reloads
   with no AJAX to hook a real progress bar into.
   ============================================================ */

.import-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 18, 15, 0.75);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
}
.import-overlay.visible { display: flex; }

.import-overlay-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
}

.import-overlay-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 20px;
  animation: import-spin 1s linear infinite;
}
.import-overlay-icon svg { width: 100%; height: 100%; }

@keyframes import-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.import-overlay-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 10px;
}

.import-overlay-msg {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--muted);
  min-height: 18px;
  transition: opacity 0.2s ease;
  margin-bottom: 22px;
}

.import-overlay-bar {
  height: 5px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.import-overlay-bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: var(--accent);
  animation: import-bar-slide 1.4s ease-in-out infinite;
}
@keyframes import-bar-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}
