:root {
  --bg: #0c1014;
  --bg-elev: #141a21;
  --line: #2a3340;
  --text: #e7ece8;
  --muted: #8b968c;
  --accent: #d4a05a;
  --accent-2: #7eb8c9;
  --ok: #6fbf8a;
  --danger: #c45c4a;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(212, 160, 90, 0.08), transparent 55%),
    radial-gradient(900px 400px at 100% 0%, rgba(126, 184, 201, 0.07), transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: "IBM Plex Sans", sans-serif;
}

code, .key, .url {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

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

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 22px 80px;
}

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gate[hidden],
#app[hidden] {
  display: none !important;
}

.gate-card {
  width: min(440px, 100%);
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  display: grid;
  gap: 14px;
  box-shadow: var(--shadow);
}

.gate-card h1 {
  margin: 0;
  font-size: 28px;
}

.gate-card .lead {
  margin: 0;
}

.gate-error {
  margin: 0;
  color: #e8a090;
  font-size: 13px;
}

.top {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 28px;
  align-items: start;
  margin-bottom: 28px;
}

.kicker {
  margin: 0 0 8px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--accent);
}

h1 {
  margin: 0 0 12px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

h1 span {
  color: var(--muted);
  font-weight: 400;
}

.lead {
  margin: 0;
  max-width: 62ch;
  color: var(--muted);
  line-height: 1.55;
}

.ghost.danger {
  color: #e0a090;
  border-color: #6a3f36;
}

.ghost.danger:hover {
  border-color: var(--danger);
  color: #f0c0b4;
}

.top-panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: grid;
  gap: 12px;
  box-shadow: var(--shadow);
}

.token {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
}

.token small {
  font-size: 11px;
  margin-left: 6px;
}

.token.ok input { border-color: var(--ok); }
.token.bad input { border-color: var(--danger); }
.token.empty input { border-color: var(--accent); }

.ghost:disabled,
.pick:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--line);
}

input, button {
  font: inherit;
}

input[type="password"], input[type="text"] {
  background: #0e1419;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
}

.meta {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}

.ghost, .btn, .linkish {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 8px 12px;
  cursor: pointer;
}

.ghost:hover, .btn:hover { border-color: var(--accent); }

a.linkish {
  text-decoration: none;
  display: inline-block;
}

.banner {
  background: #1a1410;
  border: 1px solid #5a3d24;
  color: #e8cba0;
  padding: 10px 12px;
  border-radius: 10px;
  margin: 0 0 18px;
}

.board { display: grid; gap: 28px; }

.group h2 {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  min-height: 210px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.card.drag {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.title { margin: 0; font-size: 15px; line-height: 1.4; }

.badge {
  flex: none;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
}

.badge.pdf { color: #e0a090; border-color: #6a3f36; }
.badge.deb { color: #d4a05a; border-color: #6a5228; }

.key {
  margin: 0;
  font-size: 12px;
  color: var(--accent-2);
}

.status {
  margin: 0;
  font-size: 13px;
  color: var(--muted);
}

.status.ok { color: var(--ok); }

.url {
  margin: 0;
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

.ver {
  color: var(--accent);
}

.history {
  margin: 0;
  padding: 8px 10px;
  background: #0e1419;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  color: var(--muted);
  white-space: pre-wrap;
  line-height: 1.45;
}

.row {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.file {
  position: relative;
  overflow: hidden;
}

.picker {
  display: none;
}

.progress {
  height: 3px;
  background: #223;
  border-radius: 99px;
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
}

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

.badge.other { color: var(--accent-2); border-color: #2d4a55; }

.modal {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elev);
  color: var(--text);
  padding: 22px;
  width: min(520px, calc(100vw - 32px));
  box-shadow: var(--shadow);
}

.modal::backdrop {
  background: rgba(6, 8, 10, 0.72);
}

.modal h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.modal-lead {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.modal label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--muted);
}

.modal input[type="text"] {
  width: 100%;
}

.modal .row {
  margin-top: 8px;
}
