/* Палитра и шрифты — один в один с memelabs.tech (тёмная тема) для единого вида. */
:root {
  --bg: #121211;
  --bg2: #171614;
  --panel: #1a1a18;
  --panel2: #201f1d;
  --panel3: #26251f;
  --border: #262521;
  --border2: #3a3935;
  --text: #f2f1ed;
  --muted: #97958e;
  --muted2: #6f6d67;
  --green: #a3e635; /* accent (lime) */
  --green-b: #bef264; /* accent lit */
  --green-dim: color-mix(in srgb, #a3e635 14%, transparent);
  --go: #4ade80; /* success */
  --go-dim: color-mix(in srgb, #4ade80 14%, transparent);
  --red: #f2555a;
  --red-dim: color-mix(in srgb, #f2555a 14%, transparent);
  --amber: #e3b341;
  --amber-dim: color-mix(in srgb, #e3b341 14%, transparent);
  --brand: #ea6a2a;
  --blue: #5b9dff;
  --purple: #b08bff;
  --mono: "Geist Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 13px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
.boot { padding: 40px; color: var(--muted); }
a { color: inherit; text-decoration: none; }
::selection { background: rgba(79, 224, 107, 0.3); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--panel3); border-radius: 6px; }

.app { max-width: 1400px; margin: 0 auto; }

/* Top nav */
.topnav { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 0 22px; height: 56px; background: rgba(8, 10, 12, 0.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; }
.logo .flask { width: 22px; height: 22px; display: block; filter: drop-shadow(0 0 7px rgba(163, 230, 53, 0.5)); }
.flask .bub { animation: bub 3s ease-in-out infinite; }
.flask .b2 { animation-delay: 0.6s; }
.flask .b3 { animation-delay: 1.2s; }
@keyframes bub { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2.5px); } }
.logo b { color: var(--green-b); }
.tabs { display: flex; gap: 2px; flex: 1; }
.tabs a { color: var(--muted); padding: 9px 13px; font-size: 13px; font-weight: 500; border-radius: 4px; white-space: nowrap; }
.tabs a:hover { color: var(--text); background: var(--panel2); }
.tabs a.active { color: var(--green-b); background: var(--green-dim); }
.status { display: flex; align-items: center; gap: 12px; }
.capmini { font-family: var(--mono); font-size: 13px; color: var(--muted); }
.capmini b { color: var(--green-b); }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.live.on { color: var(--green-b); }
.live .d { width: 8px; height: 8px; border-radius: 50%; background: var(--red); }
.live.on .d { background: var(--green); box-shadow: 0 0 8px var(--green); animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }
.badge { font-size: 11px; padding: 3px 9px; border-radius: 6px; font-weight: 700; letter-spacing: 0.04em; }
.badge.sim { background: var(--green-dim); color: var(--green-b); border: 1px solid rgba(79, 224, 107, 0.3); }
.badge.real { background: var(--red-dim); color: var(--red); border: 1px solid rgba(255, 93, 108, 0.4); }

.main { padding: 20px 22px 70px; }
.pagehead { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.pagehead h1 { font-size: 20px; margin: 0; font-weight: 700; }
.pagehead .sub { color: var(--muted); font-size: 13px; }
.pagehead .spacer { flex: 1; }

/* Capital strip */
.capstrip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 12px 14px; }
.tile .l { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 600; }
.tile .v { font-size: 21px; font-weight: 700; font-family: var(--mono); margin-top: 3px; }
.tile .v .u { font-size: 12px; color: var(--muted); font-weight: 400; }
.tile .v.green { color: var(--go); }
.tile .sub { font-size: 11px; color: var(--muted2); margin-top: 2px; }

/* Buttons */
button, .btn { background: var(--panel2); color: var(--text); border: 1px solid var(--border2); border-radius: 4px; padding: 8px 14px; cursor: pointer; font: inherit; font-size: 13px; transition: all 0.14s; }
button:hover, .btn:hover { border-color: var(--green); color: var(--green-b); }
button.primary { background: var(--green); border-color: var(--green); color: #05140a; font-weight: 600; }
button.primary:hover { background: var(--green-b); color: #05140a; }
button.danger { background: var(--red-dim); border-color: rgba(255, 93, 108, 0.4); color: var(--red); }
button.danger:hover { background: rgba(255, 93, 108, 0.25); color: var(--red); }
button.ghost { background: transparent; border-color: var(--border); }
button.sm { padding: 5px 10px; font-size: 12px; }
button:disabled { opacity: 0.4; cursor: not-allowed; }
.row { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }

/* Board of active launches */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.lcard { background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 15px 16px; display: flex; flex-direction: column; gap: 12px; }
.lcard .lh { display: flex; align-items: center; gap: 9px; }
.lcard .tk { font-weight: 700; font-size: 15px; font-family: var(--mono); }
.lcard .mint { font-family: var(--mono); font-size: 11px; color: var(--muted2); }
.lcard .lh .spacer { flex: 1; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.metrics .m { background: var(--bg2); border-radius: 4px; padding: 8px 9px; }
.metrics .m .ml { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.metrics .m .mv { font-size: 15px; font-weight: 700; font-family: var(--mono); margin-top: 1px; }
.rules { display: flex; flex-direction: column; gap: 7px; }
.rule { font-size: 12px; }
.rule .rl { display: flex; justify-content: space-between; margin-bottom: 3px; }
.rule .rl .met { color: var(--muted); }
.rule .rl .met b { color: var(--text); }
.rule.met .rl .met b { color: var(--green-b); }
.progress { height: 6px; background: var(--panel3); border-radius: 4px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--green-b)); transition: width 0.5s ease; }
.progress.met > i { background: var(--green-b); }
.timers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.timer .tl { font-size: 10.5px; color: var(--muted); display: flex; justify-content: space-between; margin-bottom: 3px; }
.timer .bar { height: 5px; background: var(--panel3); border-radius: 3px; overflow: hidden; }
.timer .bar > i { display: block; height: 100%; background: var(--amber); transition: width 0.9s linear; }
.timer.danger .bar > i { background: var(--red); }
.stage { font-size: 11px; padding: 3px 10px; border-radius: 4px; font-weight: 600; font-family: var(--mono); }

/* Chips */
.chip { font-size: 10.5px; padding: 2px 8px; border-radius: 5px; font-weight: 600; white-space: nowrap; font-family: var(--mono); }
.chip.g { background: var(--go-dim); color: var(--go); }
.chip.r { background: var(--red-dim); color: var(--red); }
.chip.a { background: var(--amber-dim); color: var(--amber); }
.chip.b { background: rgba(91, 157, 255, 0.14); color: var(--blue); }
.chip.p { background: rgba(176, 139, 255, 0.14); color: var(--purple); }
.chip.m { background: var(--panel3); color: var(--muted); }

/* Cards & layout */
.card { background: var(--panel); border: 1px solid var(--border); border-radius: 5px; padding: 16px; }
.card h3 { margin: 0 0 12px; font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }
.cols { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; align-items: start; }
.section-title { font-size: 12px; font-weight: 700; margin: 22px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); font-size: 12.5px; vertical-align: middle; }
th { color: var(--muted); font-weight: 600; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; }
tbody tr:hover td { background: var(--panel2); }
tr.sel td { background: var(--green-dim); }
.mono { font-family: var(--mono); font-size: 12px; }
.pos { color: var(--go); } .neg { color: var(--red); } .muted { color: var(--muted); }

/* Forms */
input, select, textarea { background: var(--panel2); color: var(--text); border: 1px solid var(--border2); border-radius: 4px; padding: 8px 10px; font: inherit; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--green); }
input[type=checkbox] { width: auto; accent-color: var(--green); }
label { display: block; font-size: 11px; color: var(--muted); margin: 0 0 4px; }
.field { margin-bottom: 12px; }
.fgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.fgrid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

/* Preview panel */
.preview .kv { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.preview .kv .k { color: var(--muted); }
.preview .kv .v { font-family: var(--mono); }
.preview .total { font-weight: 700; }

/* Preset cards */
.presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.preset { background: var(--panel2); border: 1px solid var(--border); border-radius: 5px; padding: 12px; }
.preset b { display: block; }
.preset .d { font-size: 11.5px; color: var(--muted); margin: 4px 0 10px; min-height: 32px; }

.empty { color: var(--muted); padding: 50px 20px; text-align: center; }
.empty .big { font-size: 15px; color: var(--text); margin-bottom: 14px; }
.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast { background: var(--panel3); border: 1px solid var(--border2); border-left: 3px solid var(--green); border-radius: 4px; padding: 11px 15px; max-width: 400px; font-size: 13px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4); animation: slidein 0.2s; }
.toast.err { border-left-color: var(--red); }
@keyframes slidein { from { transform: translateX(20px); opacity: 0; } }
.log { font-family: var(--mono); font-size: 11.5px; max-height: 380px; overflow: auto; }
.log > div { padding: 3px 0; border-bottom: 1px solid var(--border); }
.log .t { color: var(--muted2); }

/* Drawer */
.drawer { position: fixed; top: 0; right: 0; width: 520px; max-width: 92vw; height: 100vh; background: var(--panel); border-left: 1px solid var(--border2); z-index: 50; padding: 20px; overflow: auto; box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5); }
.drawer .x { position: absolute; top: 16px; right: 16px; }
.overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); z-index: 49; }

@media (max-width: 820px) { .cols { grid-template-columns: 1fr; } .metrics { grid-template-columns: repeat(2, 1fr); } .fgrid, .fgrid3 { grid-template-columns: 1fr; } .tabs { overflow-x: auto; } }
