/* Moving Support Admin — minimal vanilla CSS */
:root {
  --navy-900: #0F1E3D;
  --navy-700: #1E3A6F;
  --cream: #F5EFE0;
  --paper: #FFFFFF;
  --clay: #C8551F;
  --clay-dk: #A8451A;
  --charcoal: #2A2A2A;
  --slate: #5B6270;
  --slate-lt: #9CA3AF;
  --divider: rgba(15, 30, 61, 0.10);
  --success: #1F7A4D;
  --error: #B42318;
  --error-bg: #FEF2F2;
  --r-md: 8px;
  --r-lg: 12px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  font-size: 15px;
  line-height: 1.5;
}

.topbar {
  background: var(--navy-900);
  color: var(--cream);
  display: flex;
  align-items: center;
  padding: 12px 24px;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 16px;
}
.brand em { color: var(--clay); font-style: normal; font-weight: 700; }
.topnav {
  display: flex;
  gap: 4px;
  flex: 1;
}
.topnav a {
  color: var(--slate-lt);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-weight: 500;
  font-size: 14px;
}
.topnav a.active { background: rgba(255,255,255,0.1); color: var(--cream); }
.topnav a:hover { color: var(--cream); }
.user {
  font-size: 13px;
  color: var(--slate-lt);
  display: flex;
  align-items: center;
  gap: 12px;
}
.user a {
  color: var(--slate-lt);
  text-decoration: none;
  padding: 4px 10px;
  border-radius: var(--r-md);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid rgba(255,255,255,0.15);
}
.user a:hover {
  background: rgba(255,255,255,0.1);
  color: var(--cream);
}

.dash-hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  color: var(--cream);
  padding: 24px 28px;
  border-radius: var(--r-lg);
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}
.dash-hero h1 {
  color: var(--cream);
  font-size: 24px;
}
.dash-hero p {
  color: rgba(245, 239, 224, 0.7);
}
.dash-hero-actions {
  display: flex;
  gap: 8px;
}
.dash-hero-actions .btn {
  background: rgba(255,255,255,0.1);
  color: var(--cream);
  border-color: rgba(255,255,255,0.2);
}
.dash-hero-actions .btn:hover {
  background: rgba(255,255,255,0.2);
}
.dash-hero-actions .btn-primary {
  background: var(--clay);
  border-color: var(--clay-dk);
}
.dash-hero-actions .btn-primary:hover {
  background: var(--clay-dk);
}

main {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}
.loading {
  text-align: center;
  padding: 80px 0;
  color: var(--slate);
}

h1 { font-size: 24px; margin: 0 0 8px; }
h2 { font-size: 18px; margin: 24px 0 12px; }
.muted { color: var(--slate); }
.section { margin-bottom: 32px; }

.card {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--divider);
  background: var(--paper);
  color: var(--charcoal);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--cream); }
.btn-primary { background: var(--clay); border-color: var(--clay-dk); color: var(--paper); }
.btn-primary:hover { background: var(--clay-dk); }
.btn-sm { padding: 4px 10px; font-size: 13px; }
.btn-danger { color: var(--error); border-color: rgba(180,35,24,0.3); }
.btn-danger:hover { background: var(--error-bg); }

input[type="text"], input[type="url"], input[type="number"], input[type="time"], textarea, select {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  font-size: 14px;
  font-family: inherit;
  background: var(--paper);
}
textarea { min-height: 200px; resize: vertical; font-family: ui-monospace, monospace; }
label { display: block; font-weight: 500; font-size: 13px; margin-bottom: 4px; color: var(--slate); }
.field { margin-bottom: 16px; }

.grid {
  display: grid;
  gap: 16px;
}
.grid-cards {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.grid-stats {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stat {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  padding: 16px;
}
.stat-value { font-size: 32px; font-weight: 700; color: var(--navy-900); line-height: 1.1; }
.stat-label { font-size: 13px; color: var(--slate); margin-top: 4px; }

/* Heroes — sticky quick-nav at top of the Hero images page */
.heroes-sticky-nav {
  position: sticky;
  top: 56px; /* sit just under the topbar (which is sticky at top:0) */
  z-index: 9;
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(15, 30, 61, 0.06);
}
.heroes-filter {
  flex: 1 1 240px;
  max-width: 360px;
  padding: 8px 12px;
  border: 1px solid var(--divider);
  border-radius: var(--r-md);
  font-size: 14px;
  background: var(--cream);
  color: var(--charcoal);
}
.heroes-filter:focus {
  outline: none;
  border-color: var(--navy-700);
  background: var(--paper);
  box-shadow: 0 0 0 3px rgba(30, 58, 111, 0.12);
}
.heroes-jumps {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}
.heroes-jump-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--r-md);
  background: var(--cream);
  color: var(--navy-900);
  font-family: inherit;
  font-weight: 500;
  font-size: 13px;
  border: 1px solid var(--divider);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.heroes-jump-btn:hover {
  background: var(--navy-900);
  color: var(--cream);
  border-color: var(--navy-900);
}
.heroes-jumps .jump-count {
  background: rgba(0,0,0,0.08);
  color: var(--slate);
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.heroes-jump-btn:hover .jump-count {
  background: rgba(255,255,255,0.18);
  color: var(--cream);
}
.heroes-stats {
  font-size: 13px;
  color: var(--slate);
  white-space: nowrap;
}
.heroes-stats [data-heroes-visible] {
  font-weight: 700;
  color: var(--navy-900);
}

/* Heroes section anchors land below the sticky nav */
.heroes-group {
  scroll-margin-top: 120px;
  margin-bottom: 32px;
}
.heroes-state-head {
  scroll-margin-top: 120px;
  margin: 24px 0 12px;
  font-size: 18px;
  color: var(--navy-700);
  border-bottom: 1px solid var(--divider);
  padding-bottom: 6px;
}
.heroes-state-block {
  margin-bottom: 24px;
}

@media (max-width: 720px) {
  .heroes-sticky-nav {
    flex-direction: column;
    align-items: stretch;
    top: 60px;
  }
  .heroes-filter { max-width: none; }
  .heroes-stats { text-align: right; }
}

/* Hero gallery */
.hero-card {
  background: var(--paper);
  border: 1px solid var(--divider);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.hero-card .preview {
  aspect-ratio: 16/9;
  background: var(--navy-900);
  position: relative;
  overflow: hidden;
}
.hero-card .preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-card .preview .badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(0,0,0,0.7);
  color: var(--cream);
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.hero-card.no-hero .preview img {
  /* OG-generated placeholder thumbnails fade slightly to indicate "not yet uploaded" */
  opacity: 0.92;
}
.hero-card.no-hero .badge {
  background: rgba(200, 85, 31, 0.85);
}
.hero-card .info {
  padding: 12px;
  font-size: 13px;
}
.hero-card .info strong { display: block; }
.hero-card .actions {
  padding: 0 12px 12px;
  display: flex;
  gap: 6px;
}

/* Blog */
.draft-row {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--divider);
}
.draft-row:last-child { border-bottom: none; }
.status-badge {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.status-draft { background: #FEF6E1; color: #8C5800; }
.status-scheduled { background: #E0F2FE; color: #0369A1; }
.status-published { background: #DCFCE7; color: #15803D; }

/* Toast */
#toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 100;
}
.toast {
  background: var(--navy-900);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: var(--r-md);
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  animation: slideIn 0.2s ease-out;
}
.toast.success { background: var(--success); }
.toast.error { background: var(--error); }
@keyframes slideIn {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.flex { display: flex; gap: 12px; align-items: center; }
.flex-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 12px; text-align: left; border-bottom: 1px solid var(--divider); }
th { font-size: 12px; text-transform: uppercase; color: var(--slate); font-weight: 600; letter-spacing: 0.5px; }

.empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--slate);
}

/* ───────────────────────────────────────
   Themed confirm modal — replaces browser confirm()
   ─────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 30, 61, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease-out;
  padding: 24px;
}
.modal-card {
  background: var(--paper);
  border-radius: var(--r-lg);
  padding: 28px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: scaleIn 0.18s ease-out;
}
.modal-card h3 {
  font-size: 19px;
  margin: 0 0 8px;
  color: var(--navy-900);
}
.modal-card p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
.btn-danger-solid {
  background: var(--error);
  color: var(--paper);
  border-color: var(--error);
}
.btn-danger-solid:hover { background: #8E1A12; border-color: #8E1A12; }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes scaleIn { from { transform: scale(0.96); opacity: 0 } to { transform: scale(1); opacity: 1 } }

/* ───────────────────────────────────────
   Sign-in screen (unauthed)
   ─────────────────────────────────────── */
body.body-unauthed {
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 100%);
  min-height: 100vh;
}
.topbar.topbar-unauthed .topnav,
.topbar.topbar-unauthed .user {
  display: none;
}
.signin-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 60px);
  padding: 24px;
}
.signin-card {
  background: var(--paper);
  max-width: 480px;
  width: 100%;
  padding: 48px 40px;
  border-radius: var(--r-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  text-align: center;
}
.signin-logo {
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
}
.signin-card h1 {
  font-size: 26px;
  margin: 0 0 8px;
  color: var(--navy-900);
  font-weight: 700;
  line-height: 1.25;
}
.signin-card h1 em {
  font-style: normal;
  color: var(--clay);
}
.signin-sub {
  color: var(--slate);
  margin: 0 0 32px;
  font-size: 15px;
  line-height: 1.5;
}
.btn-xl {
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 600;
}
.signin-btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 24px;
}
.signin-debug {
  margin-top: 24px;
  text-align: left;
  font-size: 13px;
  border-top: 1px solid var(--divider);
  padding-top: 16px;
}
.signin-debug summary {
  cursor: pointer;
  color: var(--slate);
  font-size: 13px;
  padding: 4px 0;
  user-select: none;
}
.signin-debug summary:hover {
  color: var(--navy-900);
}
.signin-debug code {
  background: var(--cream);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 12px;
  color: var(--charcoal);
}
.signin-debug ol {
  padding-left: 24px;
}
.signin-debug ol li {
  margin: 4px 0;
}

/* ─────────────────────────────────────────────
 * Carrier Audit feed
 * ───────────────────────────────────────────── */
.audit-change-row {
  border-top: 1px solid var(--divider);
  padding: 16px 0 18px;
}
.audit-change-row:first-child { border-top: none; padding-top: 0; }
.audit-change-row:last-child { padding-bottom: 0; }

.audit-change-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}
.audit-carrier-link {
  color: var(--charcoal);
  text-decoration: none;
}
.audit-carrier-link:hover { color: var(--clay); }
.audit-change-meta { text-align: right; flex-shrink: 0; }

/* Severity dot badges in the header — colored chips. */
.audit-sev-row {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.audit-sev-dot {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* Change list — left border colored by severity. */
.audit-change-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.audit-change-item {
  padding: 8px 12px;
  margin: 4px 0;
  border-left: 3px solid var(--slate-lt);
  background: rgba(15, 30, 61, 0.02);
  border-radius: 0 4px 4px 0;
  font-size: 14px;
}
.audit-sev-critical { border-left-color: #B85742; background: rgba(184, 87, 66, 0.06); }
.audit-sev-major { border-left-color: #C9963F; background: rgba(201, 150, 63, 0.06); }
.audit-sev-minor { border-left-color: #5BA86E; background: rgba(91, 168, 110, 0.04); }

.audit-change-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

