:root {
  --a-bg: #0a0908;
  --a-surface: #151210;
  --a-surface-2: #1e1912;
  --a-line: #2b2415;
  --a-gold: #d4af37;
  --a-gold-bright: #f2d16b;
  --a-purple: #7c3aed;
  --a-purple-soft: #a78bfa;
  --a-ivory: #f7f3e8;
  --a-muted: #a89f8d;
  --a-font: "Inter", ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--a-bg);
  color: var(--a-ivory);
  font-family: var(--a-font);
  font-size: 15px;
  line-height: 1.55;
}
a { color: var(--a-gold-bright); text-decoration: none; }
a:hover { color: var(--a-gold); }

.admin-top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.5rem;
  background: rgba(10, 9, 8, .92);
  border-bottom: 1px solid var(--a-line);
  backdrop-filter: blur(10px);
}
.admin-top h1 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .05em;
}
.admin-top nav { display: flex; gap: 1.2rem; }
.admin-top nav a { font-size: .9rem; color: var(--a-muted); }
.admin-top nav a:hover { color: var(--a-gold-bright); }

.admin-wrap {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: calc(100vh - 60px);
}

.admin-side {
  border-right: 1px solid var(--a-line);
  padding: 1.5rem 0;
  background: var(--a-surface);
}
.admin-side ul { list-style: none; margin: 0; padding: 0; }
.admin-side li a {
  display: block;
  padding: .75rem 1.5rem;
  color: var(--a-muted);
  border-left: 3px solid transparent;
}
.admin-side li a:hover, .admin-side li a.active { color: var(--a-gold-bright); background: rgba(212, 175, 55, .06); border-left-color: var(--a-gold); }

.admin-main { padding: 2rem; max-width: 1100px; }
.admin-main h2 { margin-top: 0; font-weight: 600; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.card-stat { background: var(--a-surface); border: 1px solid var(--a-line); border-radius: 12px; padding: 1.25rem; }
.card-stat strong { display: block; font-size: 2rem; color: var(--a-gold-bright); font-weight: 700; }
.card-stat span { color: var(--a-muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; }

.admin-table { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.admin-table th, .admin-table td { text-align: left; padding: .8rem; border-bottom: 1px solid var(--a-line); }
.admin-table th { color: var(--a-gold); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 600; }
.admin-table td { color: var(--a-ivory); font-size: .92rem; vertical-align: middle; }
.admin-table img { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; border: 1px solid var(--a-line); }
.admin-table .actions { display: flex; gap: .6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  gap: .4em;
  padding: .65em 1.3em;
  border-radius: 8px;
  border: 1px solid transparent;
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-primary { background: var(--a-gold); color: #141006; }
.btn-primary:hover { background: var(--a-gold-bright); color: #141006; }
.btn-ghost { border-color: var(--a-line); color: var(--a-ivory); background: transparent; }
.btn-ghost:hover { border-color: var(--a-gold); color: var(--a-gold-bright); }
.btn-danger { border-color: #7f1d1d; color: #fca5a5; background: rgba(127, 29, 29, .12); }
.btn-danger:hover { background: rgba(127, 29, 29, .25); }
.btn:focus-visible { outline: 2px solid var(--a-gold-bright); outline-offset: 2px; }

input[type="checkbox"] { accent-color: var(--a-gold); }

.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: .4rem; font-size: .82rem; color: var(--a-muted); text-transform: uppercase; letter-spacing: .1em; }
.form-group input[type="text"], .form-group input[type="email"], .form-group input[type="password"], .form-group input[type="number"], .form-group input[type="url"], .form-group select, .form-group textarea {
  width: 100%;
  padding: .7rem .9rem;
  border-radius: 8px;
  border: 1px solid var(--a-line);
  background: var(--a-surface-2);
  color: var(--a-ivory);
  font-family: var(--a-font);
  font-size: .95rem;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { outline: none; border-color: var(--a-gold); }
.form-group input[type="checkbox"] { width: auto; margin-right: .5rem; }
.form-group input[type="file"] {
  width: 100%;
  padding: .55rem .75rem;
  border-radius: 8px;
  border: 1px solid var(--a-line);
  background: var(--a-surface-2);
  color: var(--a-muted);
  font-family: var(--a-font);
  font-size: .9rem;
}
.form-group input[type="file"]::file-selector-button {
  margin-right: .75em;
  padding: .55em 1.15em;
  border-radius: 6px;
  border: 1px solid transparent;
  background: var(--a-gold);
  color: #141006;
  font-family: var(--a-font);
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}
.form-group input[type="file"]::file-selector-button:hover {
  background: var(--a-gold-bright);
}
.form-group input[type="file"]:focus-visible {
  outline: none;
  border-color: var(--a-gold);
}
.form-help { color: var(--a-muted); font-size: .82rem; margin-top: .3rem; }

.flash { padding: .9rem 1.1rem; border-radius: 8px; margin-bottom: 1.5rem; background: rgba(212, 175, 55, .12); border: 1px solid var(--a-gold); color: var(--a-gold-bright); }
.error { background: rgba(127, 29, 29, .18); border-color: #7f1d1d; color: #fca5a5; }

@media (max-width: 760px) {
  .admin-wrap { grid-template-columns: 1fr; }
  .admin-side { border-right: 0; border-bottom: 1px solid var(--a-line); }
  .admin-main { padding: 1.2rem; }
  .admin-table, .admin-table thead, .admin-table tbody, .admin-table th, .admin-table td, .admin-table tr { display: block; }
  .admin-table thead { display: none; }
  .admin-table td { display: flex; justify-content: space-between; padding: .6rem 0; }
  .admin-table td::before { content: attr(data-label); color: var(--a-gold); font-size: .75rem; text-transform: uppercase; }
}
/* Settings: toggle grid + code textareas */
.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0.25rem 1.5rem;
}
.toggle-grid .form-group {
  margin-bottom: 0.5rem;
}
.toggle-grid label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: normal;
  cursor: pointer;
}
.toggle-grid input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--gold, #d4af37);
}
textarea.code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}

/* Team hub: positions + inline photo slots */
.slot-form {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}
.slot-form input[type="text"] {
  width: auto;
  min-width: 10rem;
  flex: 0 1 16rem;
  padding: .55rem .8rem;
  border-radius: 8px;
  border: 1px solid var(--a-line);
  background: var(--a-surface-2);
  color: var(--a-ivory);
  font-family: var(--a-font);
  font-size: .92rem;
}
.slot-form--stack { flex-direction: column; align-items: stretch; margin-top: .5rem; }
.slot-form--stack .btn { width: 100%; }
.photo-slot { display: flex; flex-direction: column; align-items: flex-start; }
.photo-slot img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; border: 1px solid var(--a-line); }
.slot-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px; height: 56px;
  border: 1px dashed var(--a-line);
  border-radius: 8px;
  color: var(--a-muted);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.founder-slot {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  background: var(--a-surface);
  border: 1px solid var(--a-line);
  border-radius: 12px;
  padding: 1.25rem;
}
.founder-slot img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; border: 1px solid var(--a-line); }
.founder-slot .slot-form { flex: 1 1 260px; }
.founder-slot input[type="file"] { flex: 1 1 180px; }
.quick-add {
  background: var(--a-surface);
  border: 1px solid var(--a-line);
  border-radius: 12px;
  padding: 1.25rem;
  max-width: 560px;
}
.rank-cell { font-weight: 700; color: var(--a-gold-bright); font-size: 1rem; }
.positions-table input[type="text"] { min-width: 8rem; }

/* Press kit reminder (bottom corner, dismissible) */
.press-reminder {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 200;
  width: min(320px, calc(100vw - 2.5rem));
  padding: 1rem 1.1rem;
  background: var(--a-surface);
  border: 1px solid var(--a-gold);
  border-radius: 12px;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55), 0 0 24px rgba(212, 175, 55, .12);
  animation: reminder-in .45s ease;
}
@keyframes reminder-in {
  from { transform: translateY(14px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.press-reminder-head {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.press-reminder-head strong { color: var(--a-gold-bright); font-size: .92rem; }
.press-reminder-head button {
  margin-left: auto;
  background: none;
  border: 0;
  color: var(--a-muted);
  font-size: .95rem;
  cursor: pointer;
}
.press-reminder-head button:hover { color: var(--a-gold-bright); }
.press-reminder-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--a-gold);
  box-shadow: 0 0 8px rgba(212, 175, 55, .8);
  flex: none;
}
.press-reminder p {
  margin: 0 0 .8rem;
  font-size: .84rem;
  color: var(--a-ivory);
  line-height: 1.55;
}
.press-reminder .btn { width: 100%; justify-content: center; }
