:root {
  --bg: #070b14;
  --dock: #0d1322;
  --ink: #edf1fb;
  --dim: #7d89a6;
  --line: #1c2740;
  --lime: #b6ff3b;
  --lime-ink: #102000;
  --coral: #ff5d4a;
  --sky: #6ecbff;
  --ok: #3ee0a0;
  font-family: "Segoe UI Variable", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background:
  radial-gradient(1200px 500px at 80% -10%, #1a2748 0%, transparent 55%),
  var(--bg);
}
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; cursor: pointer; background: #182238; color: var(--ink); }
button:disabled { opacity: .4; cursor: not-allowed; }
.hidden { display: none !important; }

body {
  display: grid;
  grid-template-columns: minmax(420px, 28vw) minmax(0, 1fr);
  min-height: 100vh;
}

.dock {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 22px 16px;
  background: linear-gradient(180deg, #10182c, var(--dock));
  border-right: 1px solid var(--line);
  min-width: 420px;
}
.brandRow { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.brand {
  display: flex; gap: 10px; align-items: center;
  color: inherit; text-decoration: none;
}
.channelTop {
  color: var(--sky); text-decoration: none; font-size: 12px; font-weight: 700;
  white-space: nowrap;
}
.brand svg { width: 34px; height: 34px; fill: var(--lime); }
.brand strong { display: block; font-size: 20px; letter-spacing: .18em; }
.brand small { color: var(--dim); letter-spacing: .08em; }

.cdkBlock, .composer { display: grid; gap: 8px; }
label { font-size: 11px; color: var(--dim); letter-spacing: .12em; text-transform: uppercase; }
input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  background: #080d18;
  border-radius: 4px;
  padding: 9px 10px;
}
textarea {
  min-height: 180px;
  resize: vertical;
  font: 12px/1.55 ui-monospace, Consolas, monospace;
  word-break: break-all;
}
.proxyBox { min-height: 128px; }
.cdkRow, .miniRow { display: flex; gap: 6px; align-items: center; }
.cdkRow input { flex: 1; }
.cdkRow button, .miniRow button, .fileBtn, .boardTools button, .lightboxCard button {
  min-height: 34px; padding: 0 10px; border-radius: 4px; font-size: 12px; font-weight: 700;
}
.fileBtn { position: relative; overflow: hidden; display: inline-flex; align-items: center; }
.fileBtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.accent, .fire { background: var(--lime); color: var(--lime-ink); }
.fire {
  min-height: 48px; width: 100%; margin-top: 6px;
  font-size: 15px; letter-spacing: .04em;
}
.halt { width: 100%; background: var(--coral); }
#cdkHint, #importStatus, #selectionMeta, #proxyCount { margin: 0; color: var(--dim); font-size: 12px; }
.retry { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.retry select { width: 64px; }

.dockFoot {
  margin-top: auto;
  display: flex; justify-content: flex-start; gap: 8px;
  font-size: 12px; color: var(--dim);
}
.pulse { display: flex; gap: 6px; align-items: center; }
.pulse i { width: 7px; height: 7px; border-radius: 50%; background: #556; }
.pulse.online i { background: var(--ok); }
.pulse.offline i { background: var(--coral); }

.board { display: flex; flex-direction: column; min-width: 0; padding: 20px 22px 28px; }
.boardHead { display: flex; justify-content: space-between; gap: 16px; align-items: end; }
h1 { margin: 0; font-size: 28px; font-weight: 650; letter-spacing: -.04em; }
.announce { margin: 6px 0 0; color: #f3c56b; font-size: 13px; }
.heroStats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  min-width: min(420px, 100%);
  flex: 1;
  border: 1px solid var(--line);
  background: #0c1220;
}
.heroStats div { padding: 8px 14px; border-left: 1px solid var(--line); }
.heroStats div:first-child { border-left: 0; }
.heroStats span { display: block; color: var(--dim); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; }
.heroStats b { font-size: 22px; font-variant-numeric: tabular-nums; color: var(--lime); }
.boardTools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.boardTools input, .boardTools select { width: auto; min-width: 140px; }

.tally {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 16px 0 12px;
  border: 1px solid var(--line);
  background: #0c1220;
}
.tally div { padding: 12px 14px; border-left: 1px solid var(--line); }
.tally div:first-child { border: 0; }
.tally span { display: block; color: var(--dim); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; }
.tally b { font-size: 26px; font-variant-numeric: tabular-nums; }
.warn { padding: 8px 10px; margin-bottom: 10px; background: #2a1a10; color: #f3c56b; font-size: 12px; }

.tableWrap {
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  background: #0a101d;
}
.sheet { width: 100%; border-collapse: collapse; font-size: 13px; }
.sheet th {
  position: sticky; top: 0;
  text-align: left; font-size: 11px; color: var(--dim);
  letter-spacing: .12em; text-transform: uppercase;
  background: #11192c; padding: 10px 12px; border-bottom: 1px solid var(--line);
}
.sheet td { padding: 10px 12px; border-bottom: 1px solid #151d32; vertical-align: middle; }
.sheet tr:hover td { background: #121a2e; }
.sheet input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--lime); }
.mail { display: block; font-weight: 650; }
.sub { color: var(--dim); font-size: 11px; }
.st {
  display: inline-flex; min-width: 64px; justify-content: center;
  padding: 3px 8px; font-size: 11px; font-weight: 800; letter-spacing: .06em;
}
.st.ok { background: #113226; color: var(--ok); }
.st.bad { background: #321411; color: var(--coral); }
.st.run { background: #1d2a12; color: var(--lime); }
.st.wait { background: #1a2236; color: var(--sky); }
.st.dead { background: #1b1f2c; color: var(--dim); }
.progress { display: block; width: 120px; height: 4px; background: #1c2740; }
.progress > i { display: block; height: 100%; background: var(--lime); }
.linkCell { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--sky); font: 11px/1.4 ui-monospace, Consolas, monospace; }
.acts { display: flex; gap: 4px; }
.acts button { min-height: 28px; font-size: 11px; }
.void { padding: 64px 20px; text-align: center; color: var(--dim); }

.lightbox {
  position: fixed; inset: 0; z-index: 20;
  display: grid; place-items: center;
  background: rgba(4, 8, 16, .78);
}
.lightboxCard {
  width: min(360px, calc(100% - 24px));
  padding: 16px;
  background: #10182b;
  border: 1px solid var(--line);
  display: grid; gap: 10px; justify-items: center;
}
.lightboxCard img { width: 240px; height: 240px; background: #fff; object-fit: contain; }
.x { justify-self: end; }
.toast {
  position: fixed; right: 18px; bottom: 18px;
  max-width: 360px; padding: 10px 12px;
  background: var(--lime); color: var(--lime-ink);
  font-size: 13px; font-weight: 700;
  transform: translateY(12px); opacity: 0; pointer-events: none;
}
.toast.show { opacity: 1; transform: none; }

@media (max-width: 1280px) {
  body { grid-template-columns: 400px minmax(0, 1fr); }
  .dock { min-width: 400px; }
}
@media (max-width: 960px) {
  body { grid-template-columns: 1fr; }
  .dock { min-width: 0; border-right: 0; border-bottom: 1px solid var(--line); }
  .tally { grid-template-columns: repeat(3, 1fr); }
}
