:root {
  --bg: #0f1115;
  --panel: #171a21;
  --panel-2: #1e2330;
  --line: #2a3040;
  --text: #eef2f7;
  --muted: #aeb6c6;
  --green: #00c16a;
  --red: #f05f5f;
  --amber: #f3b94d;
  --blue: #4ea1ff;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.app-shell { min-height: 100vh; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 460px; background: linear-gradient(180deg, var(--panel), var(--panel-2)); border: 1px solid var(--line); border-radius: 20px; padding: 28px; box-shadow: 0 12px 32px rgba(0,0,0,.35); }
.brand { font-size: 30px; font-weight: 800; letter-spacing: 0.2px; }
.subtitle { color: var(--muted); margin-top: 6px; line-height: 1.45; }
.notice { margin-top: 16px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.02); color: var(--muted); font-size: 13px; }
.form-row { display: grid; gap: 8px; margin-top: 14px; }
label { font-size: 13px; color: var(--muted); }
input, select, textarea { width: 100%; background: #10141d; color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
textarea { min-height: 90px; resize: vertical; }
.btn { background: var(--green); color: #07120c; border: none; border-radius: 12px; padding: 11px 14px; font-weight: 700; }
.btn.secondary { background: #273144; color: var(--text); }
.btn.warn { background: var(--amber); color: #2f2200; }
.btn.danger { background: var(--red); color: white; }
.btn.small { padding: 7px 10px; border-radius: 10px; font-size: 12px; }
.login-actions { display: flex; gap: 10px; margin-top: 18px; }
.header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 22px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: rgba(15,17,21,.94); backdrop-filter: blur(12px); z-index: 20; }
.header-left h1 { margin: 0; font-size: 24px; }
.header-left p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.header-right { display: flex; align-items: center; gap: 10px; }
.pill { padding: 6px 10px; border-radius: 999px; border: 1px solid var(--line); background: #121722; color: var(--muted); font-size: 12px; }
.layout { display: grid; grid-template-columns: 240px 1fr; }
.sidebar { min-height: calc(100vh - 73px); border-right: 1px solid var(--line); padding: 18px; }
.nav-btn { display: block; width: 100%; text-align: left; margin-bottom: 8px; background: transparent; color: var(--text); padding: 12px 14px; border-radius: 12px; border: 1px solid transparent; }
.nav-btn.active { background: #182131; border-color: #2c3951; }
.main { padding: 20px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
.card { background: linear-gradient(180deg, var(--panel), #13171f); border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.card h2, .card h3 { margin-top: 0; }
.card-title { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.stat { font-size: 28px; font-weight: 800; }
.muted { color: var(--muted); }
.table-wrap { overflow: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.market-open { color: var(--green); }
.market-halted { color: var(--amber); }
.market-closed { color: var(--red); }
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; }
.banner { padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: #121722; margin-bottom: 16px; }
.pre { white-space: pre-wrap; background: #0c1017; border: 1px solid var(--line); padding: 12px; border-radius: 12px; max-height: 260px; overflow: auto; }
.hidden { display: none; }
@media (max-width: 980px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { min-height: auto; border-right: none; border-bottom: 1px solid var(--line); }
  .grid.cols-2, .grid.cols-3, .split { grid-template-columns: 1fr; }
}
