:root {
  --bg: #0c1210;
  --bg-2: #121a17;
  --panel: #17211d;
  --ink: #e8f3ee;
  --mute: #8aa197;
  --line: #2b3d36;
  --teal: #3dba9a;
  --teal-dim: #1e6f5c;
  --amber: #d4a45a;
  --danger: #e07060;
  --sans: "Noto Sans SC", "IBM Plex Sans", sans-serif;
  --display: "Syne", "Noto Sans SC", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 420px at 100% -10%, rgba(61, 186, 154, 0.12), transparent 50%),
    radial-gradient(700px 380px at -10% 110%, rgba(212, 164, 90, 0.08), transparent 46%),
    var(--bg);
  color: var(--ink);
  font-family: var(--sans);
}
#app { min-height: 100vh; }
a { color: inherit; }
button, input, select { font-family: inherit; }
button { cursor: pointer; }

.shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.rail {
  background: var(--bg-2);
  border-right: 1px solid var(--line);
  padding: 22px 16px;
}
.logo {
  font-family: var(--display);
  font-weight: 800;
  font-size: 32px;
  letter-spacing: -0.04em;
  line-height: 1;
}
.logo small {
  display: block;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.16em;
  color: var(--mute);
  text-transform: uppercase;
}
.nav { margin-top: 28px; display: flex; flex-direction: column; gap: 6px; }
.nav a {
  text-decoration: none;
  padding: 10px 12px;
  border: 1px solid transparent;
  color: var(--mute);
}
.nav a.active {
  color: var(--ink);
  border-color: var(--line);
  background: var(--panel);
}
.rail-meta {
  margin-top: 36px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--mute);
  line-height: 1.7;
}
.main { padding: 22px 28px 64px; }
.head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 18px;
}
.head h1 {
  font-family: var(--display);
  font-size: 34px;
  margin: 0;
  letter-spacing: -0.03em;
}
.kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 6px;
}
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px;
}
.crumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--mute);
  margin-bottom: 14px;
}
.crumb button {
  background: none;
  border: 0;
  color: var(--teal);
  padding: 0;
}
.drop {
  border: 1px dashed var(--teal-dim);
  background: rgba(61, 186, 154, 0.06);
  padding: 22px;
  text-align: center;
  color: var(--mute);
  margin-bottom: 14px;
}
.drop.over {
  border-color: var(--teal);
  color: var(--ink);
}
.btn {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #06211a;
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 700;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  font-weight: 500;
}
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.field input, .field select {
  background: #0f1714;
  border: 1px solid var(--line);
  color: var(--ink);
  padding: 10px 12px;
  font-size: 14px;
}
.check {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--mute);
  font-size: 13px;
  margin: 8px 0 16px;
}
table.files {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.files th {
  text-align: left;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
  font-weight: 500;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
table.files td {
  padding: 11px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.files tr:hover td { background: rgba(61, 186, 154, 0.05); }
.name-btn {
  background: none;
  border: 0;
  color: var(--ink);
  padding: 0;
  text-align: left;
}
.name-btn.dir { color: var(--amber); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.progress {
  height: 6px;
  background: #0f1714;
  border: 1px solid var(--line);
  margin-top: 8px;
}
.progress > i {
  display: block;
  height: 100%;
  background: var(--teal);
  width: 0;
}
.msg { font-size: 13px; color: var(--mute); min-height: 20px; }
.msg.err { color: var(--danger); }
.msg.ok { color: var(--teal); }
.queue { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.job {
  display: grid;
  grid-template-columns: 1fr 90px;
  gap: 10px;
  font-size: 12px;
}
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

@media (max-width: 860px) {
  .shell, .two { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); }
}

.dock { min-height: 100vh; padding: 18px 22px 48px; }
.dock-bar {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 22px;
}
.admin-link {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
  text-decoration: none;
}
.dock-grid {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 18px;
  align-items: start;
}
.gate h2, .hall h1, .admin-head h1, .dock-empty h1 {
  font-family: var(--display);
  margin: 0 0 12px;
  letter-spacing: -0.03em;
}
.gate h2 { font-size: 28px; }
.dock-empty { max-width: 520px; padding-top: 40px; }
.drop small { display: block; margin-top: 8px; color: var(--mute); }
.mosaic {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.tile {
  position: relative;
  border: 1px solid var(--line);
  background: #101916;
  padding: 14px 12px 12px;
  min-height: 148px;
}
.tile.kind-video { background: linear-gradient(160deg, #1a120c, #101916); }
.tile.kind-audio { background: linear-gradient(160deg, #0d1a22, #101916); }
.tile.kind-image { background: linear-gradient(160deg, #122018, #101916); }
.tile-kind {
  font-family: var(--display);
  font-size: 42px;
  line-height: 1;
  color: var(--amber);
  opacity: 0.85;
}
.tile h3 {
  margin: 10px 0 4px;
  font-size: 14px;
  font-weight: 500;
  word-break: break-all;
}
.tile p { margin: 0 0 10px; font-size: 12px; color: var(--mute); }
.tile-play {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #06211a;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 8px;
}
.stage {
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 9, 0.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  z-index: 20;
}
.stage[hidden] { display: none; }
.stage-frame {
  max-width: min(1100px, 100%);
  max-height: 72vh;
}
.stage-frame video, .stage-frame img {
  display: block;
  max-width: 100%;
  max-height: 72vh;
  background: #000;
}
.stage-frame audio { width: min(520px, 90vw); }
.stage-close {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 8px 12px;
}
.stage-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  color: var(--ink);
}
.admin-body {
  background:
    radial-gradient(800px 360px at 0% 0%, rgba(212, 164, 90, 0.12), transparent 50%),
    var(--bg);
}
.admin-wrap { max-width: 760px; margin: 0 auto; padding: 36px 20px 64px; }
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 18px;
}
.admin-card { padding: 22px; }


.lock {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(640px 280px at 50% 0%, rgba(61, 186, 154, 0.16), transparent 55%),
    var(--bg);
}
.lock-card {
  width: min(420px, 100%);
  padding: 28px 24px 22px;
}
.lock-card h1 {
  font-family: var(--display);
  font-size: 36px;
  margin: 0 0 18px;
  letter-spacing: -0.03em;
}
.lock-card .btn { width: 100%; }

@media (max-width: 860px) {
  .dock-grid { grid-template-columns: 1fr; }
}
