﻿:root {
  --bg: #0a0b0e;
  --bg-elev: #11131a;
  --bg-soft: #171a23;
  --line: #262b38;
  --line-strong: #343a4a;
  --text: #f0f3fa;
  --muted: #9ca5ba;
  --accent: #c27c0e;
  --accent-soft: #d5922f;
  --danger: #cf4a61;
  --ok: #50b87c;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
  --mx: 50vw;
  --my: 35vh;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: 'Manrope', 'Segoe UI', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 20% -10%, #1a1d27, #08090d 40%);
  overflow-x: hidden;
}

.noise,
.ambient {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.noise {
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0.7px, transparent 1px);
  background-size: 14px 14px;
  opacity: 0.24;
}

.ambient {
  z-index: -1;
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(194, 124, 14, 0.18), transparent 26%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%);
  transition: background-position 120ms linear;
}

.app-shell {
  width: min(1400px, 95vw);
  margin: 20px auto 38px;
}

.topbar {
  border: 1px solid var(--line);
  background: linear-gradient(140deg, rgba(17, 19, 26, 0.95), rgba(11, 13, 19, 0.94));
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.top-kicker {
  margin: 0 0 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.topbar h1 {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: clamp(28px, 4.3vw, 46px);
  line-height: 1.02;
  letter-spacing: 0.01em;
}

.top-subtitle {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.top-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-strip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tabbar {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

button,
a,
input,
select {
  font: inherit;
}

.btn,
.tabbar button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg-soft);
  color: var(--text);
  font-weight: 650;
  font-size: 13px;
  padding: 9px 13px;
  cursor: pointer;
  text-decoration: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.btn:hover,
.tabbar button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.btn {
  border-color: #5e4720;
  background: linear-gradient(135deg, var(--accent), #a36308);
  color: #120d05;
}

.btn:hover {
  background: linear-gradient(135deg, var(--accent-soft), #b9760f);
}

.btn.ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--line);
}

.btn.ghost:hover {
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line-strong);
}

.btn.danger {
  background: linear-gradient(135deg, #d7586d, var(--danger));
  color: #fff;
  border-color: #9f3446;
}

.btn.small {
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 9px;
}

.tabbar button.active {
  background: rgba(194, 124, 14, 0.2);
  border-color: #8d5d1c;
  color: #ffd89d;
}

.panel {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(22, 25, 34, 0.96), rgba(14, 16, 22, 0.95));
  box-shadow: var(--shadow);
  padding: 16px;
  display: none;
}

.panel.active {
  display: block;
}

.panel-head h2 {
  margin: 0;
  font-family: 'Space Grotesk', 'Manrope', sans-serif;
  font-size: 24px;
}

.panel-head p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.grid {
  display: grid;
  gap: 12px;
}

.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.card {
  border: 1px solid #252b37;
  border-radius: 12px;
  background: linear-gradient(180deg, #1a1f2a, #131821);
  padding: 12px;
}

.card h3 {
  margin: 0;
  font-size: 15px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin: 8px 0 0;
}

.list {
  margin: 9px 0 0;
  padding-left: 18px;
  font-size: 13px;
  color: #d7ddec;
  line-height: 1.48;
}

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

.row.between {
  justify-content: space-between;
}

.wrap-gap {
  gap: 10px;
}

.mt8 {
  margin-top: 8px;
}

.mt12 {
  margin-top: 12px;
}

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.chip {
  border: 1px solid #364056;
  background: #202636;
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
  color: #dde4f6;
}

.code-box {
  margin-top: 8px;
  border: 1px solid #323a4d;
  border-radius: 10px;
  background: #0f131b;
  padding: 10px;
  font-family: Consolas, 'Courier New', monospace;
  font-size: 12px;
  color: #e4e9f7;
  word-break: break-all;
}

.command-grid {
  margin-top: 10px;
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.command-card {
  border: 1px solid #283040;
  border-radius: 12px;
  background: #171d28;
  padding: 12px;
}

.command-card h3 {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffddaa;
}

.command-list {
  margin: 8px 0 0;
  padding-left: 16px;
  color: #d4dced;
  font-size: 13px;
  line-height: 1.45;
}

.timeline-entry {
  border: 1px solid #283041;
  background: #151c27;
  border-radius: 12px;
  padding: 12px;
  margin-top: 10px;
}

.timeline-entry .date {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.timeline-entry h4 {
  margin: 4px 0 8px;
  font-size: 16px;
}

.timeline-entry ul {
  margin: 0;
  padding-left: 18px;
  color: #d6deee;
  font-size: 13px;
}

input,
select {
  border: 1px solid #30384b;
  border-radius: 10px;
  background: #0f141d;
  color: var(--text);
  padding: 8px 10px;
  min-height: 36px;
}

input::placeholder {
  color: #7f89a0;
}

.table-wrap {
  border: 1px solid #2a3140;
  border-radius: 10px;
  background: #0d121a;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #141a24;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b0bacf;
  border-bottom: 1px solid #2b3344;
  padding: 10px 8px;
  text-align: left;
  white-space: nowrap;
}

tbody td {
  border-top: 1px solid #1f2532;
  font-size: 12px;
  color: #dbe3f5;
  padding: 9px 8px;
  vertical-align: top;
}

tbody tr:hover {
  background: rgba(194, 124, 14, 0.06);
}

.mono {
  font-family: Consolas, 'Courier New', monospace;
  font-size: 11px;
}

.badge {
  display: inline-block;
  border: 1px solid #405070;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #dce7ff;
}

.badge.live {
  border-color: #2f8b56;
  color: #9ee2bc;
  background: rgba(80, 184, 124, 0.13);
}

.badge.open {
  border-color: #8f6f2a;
  color: #ffd993;
  background: rgba(194, 124, 14, 0.14);
}

.badge.closed {
  border-color: #45506a;
  color: #c8d1e6;
  background: rgba(150, 160, 180, 0.12);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.raw-blocks details {
  margin-top: 8px;
  border: 1px solid #2b3344;
  border-radius: 8px;
  padding: 8px;
  background: #0f141d;
}

.raw-blocks summary {
  cursor: pointer;
  font-size: 12px;
  color: #cfd7ea;
}

.raw-blocks pre {
  margin: 8px 0 0;
  font-size: 11px;
  max-height: 260px;
  overflow: auto;
  border: 1px solid #252b38;
  border-radius: 8px;
  padding: 8px;
  background: #090d13;
  color: #dde4f4;
}

.status {
  margin-top: 9px;
  font-size: 12px;
  color: #d0d7ea;
}

.empty {
  color: var(--muted);
  font-size: 13px;
  padding: 10px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 18px;
  border: 1px solid #55421d;
  border-radius: 10px;
  background: rgba(17, 19, 24, 0.95);
  color: #ffe0aa;
  padding: 9px 12px;
  font-size: 12px;
  opacity: 0;
  transform: translateY(8px);
  transition: 160ms ease;
  pointer-events: none;
  z-index: 30;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1100px) {
  .grid.four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .grid.two,
  .grid.four {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(1400px, 97vw);
  }

  .topbar {
    padding: 16px;
  }
}

/* Unified dark style pass */
body {
  background:
    radial-gradient(circle at 14% 8%, rgba(255,255,255,0.08), transparent 24%),
    radial-gradient(circle at 72% 70%, rgba(255,255,255,0.06), transparent 30%),
    radial-gradient(circle, rgba(160, 168, 186, 0.14) 1px, transparent 1.4px),
    #050508;
  background-size: 100% 100%, 100% 100%, 22px 22px, 100% 100%;
}

.noise { opacity: 0.12; }

.topbar,
.panel,
.card {
  background: rgba(14, 16, 20, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
}

.btn,
button {
  border-color: rgba(255, 255, 255, 0.2);
}

.btn:hover,
button:hover {
  border-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 16px rgba(255,255,255,0.2);
}

