:root {
  --brand: #0068ff;
  --brand-600: #0057d6;
  --brand-50: #eaf3ff;
  --bg: #f6f8fb;
  --card: #ffffff;
  --line: #e2e8f0;
  --text: #0f172a;
  --muted: #64748b;
  --green: #16a34a;
  --red: #dc2626;
  --amber: #f59e0b;
  --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; }
a { color: var(--brand); text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand-50); border-color: var(--brand); }
label { display: block; font-size: 12px; color: var(--muted); margin: 8px 0 4px; font-weight: 600; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.spread { justify-content: space-between; }
.mt { margin-top: 10px; }
.muted { color: var(--muted); font-size: 12px; }
.grow { flex: 1; min-width: 0; }
.hidden { display: none !important; }

.btn { border: 1px solid var(--line); background: #fff; color: var(--text); padding: 8px 14px; border-radius: 9px; font-weight: 600; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-600); color: #fff; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--red); border-color: #fecaca; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.shell { display: flex; min-height: 100vh; }
.side { width: 232px; background: #0b1a33; color: #cbd5e1; padding: 16px 12px; flex: none; }
.side h1 { font-size: 16px; color: #fff; margin: 4px 8px 18px; }
.side a { display: block; padding: 9px 12px; border-radius: 9px; color: #cbd5e1; font-weight: 600; margin-bottom: 2px; font-size: 13.5px; }
.side a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.active { background: var(--brand); color: #fff; }
.side .sep { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #64748b; margin: 14px 10px 6px; }
.main { flex: 1; min-width: 0; padding: 20px 24px 48px; }
.main h2 { margin: 0 0 14px; font-size: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 15px; }
.grid { display: grid; gap: 12px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.kpi .l { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
.kpi .v { font-size: 24px; font-weight: 800; margin-top: 6px; }
.products { grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }
.prod { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.prod .ico { font-size: 30px; }
.prod .name { font-weight: 800; font-size: 15px; }
.prod .desc { color: var(--muted); font-size: 12.5px; min-height: 34px; }
.prod .price { font-weight: 800; color: var(--brand); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: middle; }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #f8fafc; }
tr:hover td { background: #fbfdff; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--brand-50); color: var(--brand-600); }
.badge.green { background: #dcfce7; color: #15803d; }
.badge.red { background: #fee2e2; color: #b91c1c; }
.badge.amber { background: #fef3c7; color: #b45309; }
.badge.orange { background: #ffedd5; color: #c2410c; }
.badge.gray { background: #f1f5f9; color: #475569; }
.trial-row { background: linear-gradient(90deg, rgba(249, 115, 22, 0.08), transparent 55%); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; }
.toast { position: fixed; right: 18px; bottom: 18px; background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 10px; box-shadow: 0 10px 30px rgba(2,6,23,.35); font-size: 13px; z-index: 50; }
.toast.err { background: #b91c1c; }
.toast.ok { background: #15803d; }
.modal-bg { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 40; padding: 20px; }
.modal { background: #fff; border-radius: 14px; max-width: 720px; width: 100%; max-height: 88vh; overflow: auto; padding: 18px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.tab { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 12.5px; font-weight: 600; }
.tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.qr { text-align: center; }
.qr img { width: 220px; height: 220px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.plan { border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.plan.sel { border-color: var(--brand); background: var(--brand-50); }
.plan .p-name { font-weight: 700; }
.plan .p-price { margin-left: auto; font-weight: 800; color: var(--brand); white-space: nowrap; }
.chk { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-weight: 600; color: var(--text); }
.chk input { width: 16px; height: 16px; }
.chk .p-price { margin-left: auto; color: var(--brand); font-weight: 800; }
.sum { background: #f8fafc; border: 1px dashed var(--line); border-radius: 10px; padding: 12px; }
.auth-wrap { max-width: 420px; margin: 8vh auto; }
.banner { background: linear-gradient(135deg, #0068ff, #00c2ff); color: #fff; border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.banner .b-title { font-weight: 800; }
.offers { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.offer { border: 1px dashed var(--brand); background: var(--brand-50); border-radius: 10px; padding: 12px; }
.empty { text-align: center; color: var(--muted); padding: 24px; }
@media (max-width: 860px) { .side { width: 64px; } .side h1, .side a span.t { display: none; } .side a { text-align: center; } }
