:root {
  --bg: #0b0f17; --bg2: #0f1521; --card: #131a28; --card2: #182133; --line: #233049;
  --text: #e8edf6; --muted: #93a0b8; --accent: #4f8cff; --accent2: #22d3ee;
  --ok: #22c55e; --warn: #f59e0b; --bad: #f87171; --radius: 14px;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text);
       font: 15px/1.55 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600;
       border-radius: 10px; padding: 10px 18px; border: 1px solid var(--line); background: var(--card2);
       color: var(--text); cursor: pointer; text-decoration: none !important; transition: .15s; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: linear-gradient(135deg, var(--accent), #6a5cff); border-color: transparent; color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }

input, select { font: inherit; color: var(--text); background: var(--bg2); border: 1px solid var(--line);
                border-radius: 10px; padding: 11px 13px; width: 100%; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 60%, transparent); border-color: var(--accent); }
label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
         font-size: 12px; font-weight: 600; background: var(--card2); color: var(--muted); }
.badge.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.badge.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.badge.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.dot.live { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { opacity: .35; } }

.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 26px; font-weight: 700; margin-top: 2px; }
.pos { color: var(--ok); } .neg { color: var(--bad); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--line); }
th { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.tablewrap { overflow-x: auto; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); opacity: 0;
         background: var(--card2); border: 1px solid var(--line); padding: 11px 18px; border-radius: 10px;
         box-shadow: var(--shadow); transition: .2s; z-index: 100; pointer-events: none; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }

.modal { position: fixed; inset: 0; background: rgba(3,6,12,.7); display: none; align-items: center;
         justify-content: center; padding: 16px; z-index: 50; }
.modal.open { display: flex; }
.modal .card { width: 100%; max-width: 480px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow); }

/* pricing */
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan .ribbon { position: absolute; top: -12px; right: 16px; background: linear-gradient(135deg, var(--accent), #6a5cff);
                color: #fff; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.plan .price { font-size: 38px; font-weight: 800; }
.plan .price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.plan ul { list-style: none; padding: 0; margin: 4px 0 10px; }
.plan li { padding: 4px 0 4px 24px; position: relative; color: var(--muted); }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.chartbox { position: relative; height: 300px; }
.skeleton { background: linear-gradient(90deg, var(--card2), var(--line), var(--card2)); background-size: 200% 100%;
            animation: sk 1.2s infinite; border-radius: 8px; min-height: 18px; }
@keyframes sk { to { background-position: -200% 0; } }

@media (max-width: 640px) {
  .card { padding: 16px; }
  .stat .value { font-size: 22px; }
}
