/* Dark, black-focused theme with KDCI accent colours sampled from kdci.co. */
:root {
  --bg: #08080a;
  --panel: #101014;
  --panel-2: #16161c;
  --line: #26262e;
  --text: #e7ebef;
  --muted: #8b949e;
  --accent: #6ce2ff;
  --accent-2: #4264d1;
  --ok: #3fb950;
  --warn: #d29922;
  --bad: #f85149;
  --unverified: #8957e5;
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Segoe UI", system-ui, -apple-system, sans-serif;
}

a { color: var(--accent); }

.shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

/* Left navigation */
.sidebar {
  background: linear-gradient(180deg, #0c0c10 0%, #08080a 100%);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.brand { padding: 6px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.brand-name { font-size: 15px; font-weight: 700; letter-spacing: 0.2px; }
.brand-name span { color: var(--accent); }
.brand-tag { color: var(--muted); font-size: 11.5px; margin-top: 3px; }

.nav a {
  display: block;
  padding: 9px 11px;
  margin-bottom: 4px;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  border: 1px solid transparent;
}
.nav a:hover { background: var(--panel-2); }
.nav a.active {
  background: var(--panel-2);
  border-color: var(--line);
  border-left: 3px solid var(--accent);
  font-weight: 600;
}

.sidebar-foot { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.sidebar-foot .row { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.sidebar-foot .row b { color: var(--text); font-weight: 600; }

/* Main area */
.main { padding: 22px 26px 60px; max-width: 1500px; }
h1 { font-size: 20px; margin: 0 0 4px; }
h2 { font-size: 15px; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 16px;
}
.card-title { font-size: 14px; font-weight: 600; margin: 0 0 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 1100px) { .grid-2 { grid-template-columns: 1fr; } .shell { grid-template-columns: 1fr; } .sidebar { height: auto; position: static; } }

/* Controls */
label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
input[type="text"], input[type="number"], input[type="date"], select, textarea {
  width: 100%;
  background: #0b0b0f;
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent-2); }
textarea { min-height: 90px; resize: vertical; }

.field { margin-bottom: 12px; }
.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.inline label { margin: 0; }

button {
  background: var(--accent-2);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 9px 14px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
button:hover { filter: brightness(1.12); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
button.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
button.small { padding: 5px 9px; font-size: 12px; font-weight: 500; }
button.danger { background: #7d2b28; }

.checkbox { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text); }
.checkbox input { width: auto; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 12.5px; }
th, td { padding: 7px 9px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--panel-2); color: var(--muted); font-weight: 600; position: sticky; top: 0; }
tbody tr:hover { background: #0d0d12; }
td input, td select { padding: 4px 6px; font-size: 12px; min-width: 110px; }
td.wide input { min-width: 220px; }

/* Status colours */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid transparent;
}
.pill.ok { background: rgba(63,185,80,.14); color: var(--ok); border-color: rgba(63,185,80,.35); }
.pill.bad { background: rgba(248,81,73,.14); color: var(--bad); border-color: rgba(248,81,73,.35); }
.pill.warn { background: rgba(210,153,34,.14); color: var(--warn); border-color: rgba(210,153,34,.35); }
.pill.unverified { background: rgba(137,87,229,.16); color: #b392f0; border-color: rgba(137,87,229,.4); }
.pill.muted { background: var(--panel-2); color: var(--muted); border-color: var(--line); }

.note { font-size: 12px; color: var(--muted); margin-top: 8px; }
.banner {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  background: var(--panel-2);
  padding: 10px 12px;
  border-radius: 6px;
  font-size: 12.5px;
  margin-bottom: 14px;
}
.banner.warn { border-left-color: var(--warn); }
.banner.bad { border-left-color: var(--bad); }

/* Progress */
.bar { height: 6px; background: var(--panel-2); border-radius: 999px; overflow: hidden; margin: 8px 0; }
.bar > div { height: 100%; background: var(--accent); width: 0%; transition: width .3s; }

/* Logo previews */
/* flex-start, or every tile stretches to the tallest and the small sizes float in space */
.variants { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-start; }
.variant { border: 1px solid var(--line); border-radius: 6px; padding: 8px; background: var(--panel-2); }
.variant-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
/* Transparency has to be obvious at a glance: the old squares were six levels apart on a
   dark panel, so a cut-out logo and an uncut one looked identical. */
.preview-bg { display: flex; align-items: center; justify-content: center; padding: 6px; }
.preview-bg.checker {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #c9c9d1 25%, transparent 25%),
    linear-gradient(-45deg, #c9c9d1 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #c9c9d1 75%),
    linear-gradient(-45deg, transparent 75%, #c9c9d1 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}
.preview-bg.light { background: #ffffff; }
.preview-bg.dark { background: #1a1a1a; }
.variant img, .before-preview img { display: block; max-width: 320px; }

.before { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0; }
.before-preview { border: 1px solid var(--line); border-radius: 6px; padding: 8px; }
.before-preview img { max-width: 220px; max-height: 140px; }
.card.busy { opacity: .6; pointer-events: none; }

.stats { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 6px; }
.stat { min-width: 92px; }
.stat b { display: block; font-size: 18px; }
.stat span { font-size: 11px; color: var(--muted); }
.hidden { display: none !important; }
code { background: var(--panel-2); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* Background colour picker */
.colour-row { display: flex; gap: 8px; align-items: center; }
.colour-row input[type="color"] { width: 40px; height: 32px; padding: 2px; cursor: pointer; }
.colour-row input[type="text"] { width: 96px; font-family: ui-monospace, monospace; }
.colour-row input.invalid { border-color: var(--bad); }
.swatches { display: flex; gap: 6px; margin-top: 6px; }
.swatch {
  width: 22px; height: 22px; padding: 0; border: 1px solid var(--line); border-radius: 4px;
  cursor: pointer;
}
.swatch:hover { border-color: var(--accent); }

/* Sample picker (T11) */
.sample { border-top: 1px solid var(--line); padding: 10px 0; }
.sample audio { width: 100%; max-width: 420px; margin: 6px 0; }
.notice-text { white-space: pre-wrap; font-size: 13px; margin: 0; }
.provenance p { margin: 6px 0 0; }
