:root {
  color-scheme: dark;
  --bg: #090b10;
  --card: #11151d;
  --card-2: #151a24;
  --border: #242b38;
  --text: #f4f7fb;
  --muted: #8c97a8;
  --accent: #66f0b6;
  --danger: #ff6474;
  --warn: #ffc766;
  --shadow: 0 24px 80px rgba(0,0,0,.35);
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 50% -150px, rgba(78, 105, 150, .18), transparent 70%),
    var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.shell {
  width: min(720px, 100%);
  margin: 0 auto;
  padding: max(28px, env(safe-area-inset-top)) 18px calc(36px + env(safe-area-inset-bottom));
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.eyebrow, .label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
  letter-spacing: .14em;
  font-weight: 800;
}

h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 34px; letter-spacing: -.04em; }
h2 { margin-bottom: 8px; font-size: 20px; letter-spacing: -.02em; }
p { color: var(--muted); line-height: 1.55; }

.card {
  background: linear-gradient(180deg, rgba(255,255,255,.02), transparent), var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}

.hero { padding: 26px; }
.hero-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.status-text { font-size: clamp(34px, 8vw, 58px); font-weight: 850; letter-spacing: -.055em; margin-top: 8px; }
.status-dot { width: 24px; height: 24px; border-radius: 999px; box-shadow: 0 0 0 8px rgba(255,255,255,.03); }
.status-dot.space { background: var(--accent); box-shadow: 0 0 0 8px rgba(102,240,182,.08), 0 0 30px rgba(102,240,182,.28); }
.status-dot.full { background: var(--danger); box-shadow: 0 0 0 8px rgba(255,100,116,.08), 0 0 30px rgba(255,100,116,.3); }
.status-dot.warn { background: var(--warn); }
.status-dot.unknown { background: #556070; }

.meta-grid {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.meta-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.meta-grid strong { font-size: 15px; }

.push-card, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.push-card p { margin-bottom: 0; }

.primary, .icon-btn, .text-btn {
  border: 0;
  border-radius: 13px;
  transition: transform .12s ease, opacity .12s ease, background .12s ease;
}
.primary:active, .icon-btn:active, .text-btn:active { transform: scale(.98); }
.primary {
  background: var(--text);
  color: #080a0f;
  padding: 12px 16px;
  font-weight: 800;
  white-space: nowrap;
}
.primary[disabled] { opacity: .45; cursor: default; }
.icon-btn {
  background: var(--card-2);
  color: var(--muted);
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
}
.text-btn { background: transparent; color: var(--text); padding: 8px 0; }

.history-list { margin-top: 16px; display: grid; gap: 9px; }
.history-item {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}
.history-item strong { font-size: 14px; }
.history-item time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.empty { color: var(--muted); padding: 8px 0; }

.locked { text-align: center; padding: 34px 24px; }
.lock-mark { font-size: 42px; margin-bottom: 12px; color: var(--accent); }
.access-form { display: flex; gap: 10px; max-width: 430px; margin: 20px auto 0; }
.access-form input {
  min-width: 0;
  flex: 1;
  background: #0b0e14;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 12px 14px;
  outline: none;
}
.access-form input:focus { border-color: #4f5c70; }
.error { color: var(--danger); min-height: 22px; margin: 12px 0 0; }

footer { text-align: center; color: #5f6978; font-size: 11px; margin-top: 20px; }

@media (max-width: 560px) {
  .shell { padding-left: 14px; padding-right: 14px; }
  .card { border-radius: 18px; padding: 18px; }
  .push-card { align-items: stretch; flex-direction: column; }
  .push-card .primary { width: 100%; }
  .access-form { flex-direction: column; }
  .meta-grid { grid-template-columns: 1fr; }
}
