:root {
  --bg: #0b0e13;
  --bg-2: #10151c;
  --panel: #151b24;
  --panel-2: #1b2330;
  --line: #243041;
  --line-soft: #1c2533;
  --text: #e8edf4;
  --muted: #93a1b5;
  --faint: #67758a;
  --accent: #ffb000;
  --accent-2: #ff7a00;
  --accent-ink: #1a1203;
  --good: #3ecf8e;
  --warn: #ffb547;
  --bad: #ff5c6c;
  --info: #6aa8ff;
  --radius: 16px;
  --radius-s: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .35), 0 2px 6px rgba(0, 0, 0, .25);
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 176, 0, .07), transparent 60%),
    radial-gradient(900px 500px at -10% 10%, rgba(106, 168, 255, .06), transparent 60%),
    var(--bg);
  color: var(--text);
  font: 15px/1.5 var(--font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.mono { font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 13px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px;
  padding: 12px 24px;
  background: rgba(11, 14, 19, .84);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 19px; }
.logo { width: 28px; height: 28px; fill: var(--accent); filter: drop-shadow(0 2px 8px rgba(255, 176, 0, .35)); }

.nav { display: flex; align-items: center; gap: 6px; }
.nav-link {
  padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 14px; color: var(--muted);
  transition: background .15s, color .15s;
  display: inline-flex; align-items: center; gap: 6px;
}
.nav-link:hover { color: var(--text); background: var(--panel); }
.nav-link.active { color: var(--accent-ink); background: var(--accent); }
.badge {
  font-size: 11px; padding: 1px 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); color: inherit;
}
.badge:empty { display: none; }

.search {
  flex: 1 1 260px; max-width: 480px; margin-left: auto;
  display: flex; align-items: center; gap: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 999px;
  padding: 0 14px; transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: rgba(255, 176, 0, .6); box-shadow: 0 0 0 3px rgba(255, 176, 0, .12); }
.search svg { width: 17px; height: 17px; fill: none; stroke: var(--muted); stroke-width: 2; flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; padding: 9px 0; }
.icon-btn { background: none; border: 0; color: var(--muted); padding: 4px 6px; border-radius: 6px; }
.icon-btn:hover { color: var(--text); background: var(--panel-2); }

/* ---------- layout ---------- */
.container {
  width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px;
  flex: 1;
}

.hero {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px;
  margin-bottom: 18px;
}
.hero h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; }
.hero p { margin: 4px 0 0; color: var(--muted); }

/* ---------- upcoming strip ---------- */
.upcoming-strip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.strip-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 10px;
}
.strip-head h2 { margin: 0; font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.strip-link { font-size: 13px; color: var(--info); font-weight: 600; }
.strip-link:hover { text-decoration: underline; }
.strip-rail {
  display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px;
  scrollbar-width: thin;
}
.strip-chip {
  flex: 0 0 auto;
  background: var(--panel-2); border: 1px solid var(--line-soft);
  border-radius: var(--radius-s); padding: 8px 12px;
  min-width: 200px; max-width: 250px;
}
.strip-chip .pos { font-size: 11px; font-weight: 700; color: var(--accent); }
.strip-chip .stitle { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.strip-chip .smeta { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ---------- filter bar ---------- */
.pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px;
}
.pill-btn {
  border: 1px solid var(--line); background: var(--panel); color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.pill-btn:hover { border-color: #364760; color: var(--text); }
.pill-btn.active { background: rgba(255, 176, 0, .15); border-color: rgba(255, 176, 0, .55); color: var(--accent); }

.toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-bottom: 18px;
}
.select, .input, .textarea {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 8px 12px; color: var(--text); outline: none;
}
.select:focus, .input:focus, .textarea:focus {
  border-color: rgba(255, 176, 0, .6);
}
.check-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 7px 12px; font-size: 13px; cursor: pointer;
}
.toolbar-count { margin-left: auto; font-size: 13px; color: var(--muted); }

/* ---------- model grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-2px); border-color: #34455e; box-shadow: var(--shadow); }
.thumb-wrap {
  position: relative; aspect-ratio: 4 / 3; background: var(--bg-2); overflow: hidden; cursor: pointer;
}
.thumb-wrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-fallback {
  width: 100%; height: 100%; display: grid; place-items: center;
  color: var(--faint); font-weight: 700; font-size: 14px;
}
.diff-tag {
  position: absolute; top: 10px; right: 10px;
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(11, 14, 19, .82); border: 1px solid var(--line);
}
.diff-Easy { color: var(--good); }
.diff-Medium { color: var(--warn); }
.diff-Difficult { color: var(--bad); }

.card-body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card-title { font-weight: 700; font-size: 15px; line-height: 1.35; cursor: pointer; }
.card-title:hover { color: var(--accent); }
.card-sub { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; }
.card-stats {
  display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12px; color: var(--muted);
  margin-top: auto; padding-top: 6px; border-top: 1px solid var(--line-soft);
}
.card-actions { display: flex; gap: 8px; margin-top: 6px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: var(--radius-s); padding: 8px 13px; font-size: 13px; font-weight: 600;
  transition: all .15s;
}
.btn:hover:not(:disabled) { border-color: #3a4c66; background: #222c3c; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.primary {
  background: var(--accent); color: var(--accent-ink); border-color: var(--accent);
}
.btn.primary:hover:not(:disabled) { background: #ffc033; border-color: #ffc033; }
.btn.full { width: 100%; }
.btn.small { padding: 6px 10px; font-size: 12px; }

.load-more-wrap { text-align: center; margin: 28px 0 8px; }

/* ---------- modal ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(5, 7, 10, .78); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px;
}
.modal {
  width: 100%; max-width: 860px; max-height: 90vh; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px;
}
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 20px; }
.modal-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.modal-gallery img {
  width: 100%; border-radius: var(--radius-s); border: 1px solid var(--line-soft);
  background: var(--bg-2); object-fit: cover; max-height: 320px;
}
.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px;
  margin-bottom: 16px;
}
.stat-box { background: var(--panel-2); border: 1px solid var(--line-soft); border-radius: var(--radius-s); padding: 10px 12px; }
.stat-box .lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stat-box .val { font-size: 16px; font-weight: 700; margin-top: 2px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-soft); color: var(--muted); }

/* ---------- upcoming & requests pages ---------- */
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 20px;
}
.panel h2 { margin: 0 0 8px; font-size: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.set-preview {
  margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-s);
  background: var(--panel-2); border: 1px solid var(--line);
  font-size: 14px;
}
.set-preview.ok { border-color: rgba(62, 207, 142, .45); }
.set-preview.warn { border-color: rgba(255, 181, 71, .5); }
.set-preview.err { border-color: rgba(255, 92, 108, .5); }

.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; }
table.list th, table.list td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line-soft); }
table.list th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

.status-pill {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--panel-2);
}
.status-pending { color: var(--info); }
.status-approved, .status-building { color: var(--warn); }
.status-live { color: var(--good); border-color: rgba(62, 207, 142, .4); }

.empty {
  text-align: center; padding: 48px 20px; color: var(--muted);
  background: var(--panel); border: 1px dashed var(--line); border-radius: var(--radius);
}

.footer {
  border-top: 1px solid var(--line-soft); padding: 18px 24px; text-align: center;
  color: var(--muted); font-size: 13px;
}
.footer p { margin: 4px 0; }

/* ---------- toast ---------- */
.toast-host { position: fixed; bottom: 20px; right: 20px; z-index: 80; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius-s);
  padding: 10px 14px; box-shadow: var(--shadow); font-size: 14px; max-width: 360px;
}
.toast.good { border-color: rgba(62, 207, 142, .5); }
.toast.bad { border-color: rgba(255, 92, 108, .55); }
