:root {
  --bg: #080b08;
  --panel: #111711;
  --panel-2: #171e17;
  --ink: #eef5e7;
  --muted: #8e9b89;
  --line: #344033;
  --acid: #d9ff37;
  --orange: #ff5c35;
  --danger: #ff4937;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { color-scheme: dark; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Courier New", monospace;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: linear-gradient(rgb(217 255 55 / .025) 1px, transparent 1px), linear-gradient(90deg, rgb(217 255 55 / .025) 1px, transparent 1px);
  background-size: 36px 36px;
  content: "";
}
button, input, textarea { font: inherit; }
button, a { transition: 140ms ease; }
button { border: 0; cursor: pointer; }
.eyebrow { margin: 0 0 .45rem; color: var(--acid); font-size: .67rem; font-weight: 700; letter-spacing: .14em; }
.muted { color: var(--muted); line-height: 1.55; }
.error { min-height: 1.2rem; color: var(--danger); font-size: .75rem; }

.login-shell { display: grid; min-height: 100vh; place-items: center; padding: 1.25rem; }
.login-card { width: min(460px, 100%); border: 1px solid var(--line); padding: clamp(1.5rem, 5vw, 3rem); background: var(--panel); box-shadow: 12px 12px #030403; }
.login-card h1, .topbar h1 { margin: .8rem 0 1.2rem; font-family: Arial Black, Impact, sans-serif; font-size: clamp(3rem, 9vw, 5.5rem); line-height: .78; letter-spacing: -.06em; }
label { display: grid; gap: .5rem; color: var(--muted); font-size: .67rem; font-weight: 700; letter-spacing: .08em; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0;
  padding: .85rem;
  background: #090d09;
  color: var(--ink);
  outline: 0;
}
input:focus, textarea:focus, select:focus { border-color: var(--acid); box-shadow: 0 0 0 2px rgb(217 255 55 / .14); }
textarea { resize: vertical; }
form > button, .section-heading > button, .form-actions > button {
  padding: .85rem 1rem;
  background: var(--acid);
  color: #090c08;
  font-size: .72rem;
  font-weight: 900;
}
form > button:hover, .section-heading > button:hover, .form-actions > button:hover { background: #e8ff7b; }
.login-card > button { width: 100%; margin-top: 1rem; }

.admin-shell { width: min(1180px, 100%); margin: 0 auto; padding: clamp(1rem, 3vw, 2.5rem); }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.topbar h1 { margin-bottom: 0; font-size: clamp(2.8rem, 7vw, 5rem); }
.top-actions { display: flex; align-items: center; gap: .75rem; }
.top-actions a { color: var(--acid); font-size: .7rem; font-weight: 700; text-decoration: none; }
.quiet-button { border: 1px solid var(--line) !important; background: transparent !important; color: var(--muted) !important; }
.quiet-button:hover { border-color: var(--ink) !important; color: var(--ink) !important; }
.danger-button { background: var(--danger) !important; color: white !important; }
.flash { min-height: 2.5rem; margin: 1rem 0; padding: .7rem 0; color: var(--acid); font-size: .72rem; }
.flash.is-error { color: var(--danger); }

.summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.summary-grid div { display: flex; min-width: 0; align-items: flex-end; justify-content: space-between; gap: 1rem; border: 1px solid var(--line); padding: 1rem; background: var(--panel); }
.summary-grid span { color: var(--muted); font-size: .62rem; letter-spacing: .08em; }
.summary-grid strong { color: var(--acid); font-family: Arial Black, sans-serif; font-size: 1.6rem; }
.tabs { display: flex; gap: .45rem; overflow-x: auto; margin: 2rem 0 1rem; border-bottom: 1px solid var(--line); }
.tab { flex: 0 0 auto; border: 1px solid var(--line); border-bottom: 0; padding: .85rem 1rem; background: #0b0f0b; color: var(--muted); font-size: .68rem; font-weight: 700; }
.tab.is-active { background: var(--acid); color: #090c08; }
.tab-panel { border: 1px solid var(--line); padding: clamp(1rem, 3vw, 2rem); background: rgb(17 23 17 / .88); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.section-heading h2 { margin: 0; font-family: Arial Black, sans-serif; font-size: clamp(1.6rem, 4vw, 2.5rem); letter-spacing: -.035em; }
.editor { display: grid; gap: 1rem; margin-bottom: 1.5rem; border: 1px solid var(--line); padding: 1rem; background: #0b0f0b; }
.field-row { display: grid; grid-template-columns: 1fr 110px; gap: 1rem; }
.check { display: flex; align-items: center; gap: .6rem; }
.check input { width: 1rem; height: 1rem; accent-color: var(--acid); }
.form-actions { display: flex; gap: .6rem; }
.item-list { display: grid; gap: .7rem; }
.item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid var(--line);
  padding: 1rem;
  background: var(--panel-2);
}
.item.is-disabled { opacity: .55; }
.item-copy { min-width: 0; }
.item-copy h3 { margin: 0 0 .35rem; overflow-wrap: anywhere; font: 900 1rem Arial, sans-serif; }
.item-copy p { margin: .2rem 0; color: var(--muted); font-size: .7rem; line-height: 1.45; }
.item-copy .meta { color: var(--acid); font-size: .6rem; letter-spacing: .08em; }
.item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.item-actions button { border: 1px solid var(--line); padding: .58rem .68rem; background: transparent; color: var(--ink); font-size: .62rem; font-weight: 700; }
.item-actions button:hover { border-color: var(--acid); color: var(--acid); }
.item-actions .delete:hover { border-color: var(--danger); color: var(--danger); }
.upload-form { grid-template-columns: 1fr 1fr auto; align-items: end; }
.track-category-select { min-width: 14rem; padding: .5rem; font-size: .65rem; }
.upload-form .muted { grid-column: 1 / -1; margin: -.4rem 0 0; font-size: .65rem; }
.settings-form { max-width: 700px; }
dialog { width: min(440px, calc(100% - 2rem)); border: 1px solid var(--line); padding: 1.5rem; background: var(--panel); color: var(--ink); box-shadow: 0 0 0 100vmax rgb(0 0 0 / .72); }
dialog h2 { font-family: Arial Black, sans-serif; }

@media (max-width: 720px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-grid div { align-items: center; }
  .field-row, .upload-form { grid-template-columns: 1fr; }
  .item { grid-template-columns: 1fr; }
  .item-actions { justify-content: flex-start; }
  .section-heading { align-items: flex-start; flex-direction: column; }
}
