/* Общие стили страниц продукта: вход, кабинет, админка. Та же палитра, что у терминала (style.css). */
:root {
  --bg: #0d1117; --panel: #151b23; --card: #161c25; --border: #262f3b; --border-2: #323d4b;
  --text: #e6edf3; --muted: #8b98a8; --accent: #3b82f6; --accent-2: #2563eb;
  --green: #22c55e; --red: #ef4444; --amber: #f59e0b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body { font: 14px/1.5 system-ui, -apple-system, "Segoe UI", sans-serif; background: var(--bg); color: var(--text); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 6px; } h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 0 0 12px; font-weight: 600; }
.muted { color: var(--muted); font-size: 12px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.topbar { position: sticky; top: 0; z-index: 10; height: 52px; display: flex; align-items: center; gap: 20px; padding: 0 20px;
  background: var(--panel); border-bottom: 1px solid var(--border); }
.brand { font-weight: 700; font-size: 16px; color: var(--text); white-space: nowrap; }
.brand .badge { font-size: 10px; font-weight: 700; background: var(--amber); color: #000; padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: 2px; }
.topbar nav { display: flex; gap: 4px; }
.topbar nav a { color: var(--muted); padding: 8px 14px; border-radius: 6px; font-weight: 500; }
.topbar nav a:hover { color: var(--text); background: #1d2530; text-decoration: none; }
.topbar nav a.active { color: var(--text); background: #1f2937; box-shadow: inset 0 -2px 0 var(--accent); }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; background: #1a2230; border: 1px solid var(--border-2); color: var(--text);
  border-radius: 999px; padding: 5px 12px; font-size: 12px; white-space: nowrap; }
.chip b { font-weight: 600; } .chip .plan { color: var(--muted); }
.chip .plan.ok { color: var(--green); } .chip .plan.warn { color: var(--amber); } .chip .plan.off { color: var(--red); }

main.page { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
main.narrow { max-width: 460px; margin: 0 auto; padding: 60px 20px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; margin-bottom: 16px; }
.card h2 { margin-top: 0; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { justify-content: space-between; }

label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); margin: 0 0 12px; }
label.inline { flex-direction: row; align-items: center; gap: 8px; color: var(--text); font-size: 13px; }
input, select, textarea { width: 100%; min-width: 0; background: #0b0f14; border: 1px solid var(--border-2); color: var(--text);
  padding: 8px 10px; border-radius: 6px; font-size: 14px; font-family: inherit; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.2); }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }
button { font-family: inherit; cursor: pointer; }
.btn { border: none; border-radius: 6px; padding: 0 16px; height: 36px; font-weight: 600; font-size: 13px; color: #fff; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; }
.btn.primary { background: var(--accent); } .btn.primary:hover:not(:disabled) { background: var(--accent-2); }
.btn.secondary { background: #253041; } .btn.secondary:hover:not(:disabled) { background: #2d3a4e; }
.btn.danger { background: #b91c1c; } .btn.danger:hover:not(:disabled) { background: var(--red); }
.btn.ghost { background: none; border: 1px solid var(--border-2); color: var(--text); height: 30px; padding: 0 10px; font-size: 12px; font-weight: 500; }
.btn.ghost:hover { border-color: var(--accent); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.wide { width: 100%; justify-content: center; }
.error { color: var(--red); font-size: 13px; min-height: 18px; margin: 6px 0 0; }
.ok { color: var(--green); font-size: 13px; }
.notice { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.4); color: #fcd34d; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.notice.red { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.notice.blue { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.4); color: #93c5fd; }

/* вход */
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .logo { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.auth-brand .logo span { color: var(--accent); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 18px; }
.tabs button { background: none; border: none; color: var(--muted); padding: 10px 14px; font-size: 14px; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.lang { display: inline-flex; border: 1px solid var(--border-2); border-radius: 6px; overflow: hidden; }
.lang button { background: none; border: none; color: var(--muted); padding: 4px 10px; font-size: 12px; }
.lang button.active { background: #1f2937; color: var(--text); }

/* тарифы */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.plan { background: var(--panel); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.plan.current { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59,130,246,.15); }
.plan .name { font-size: 16px; font-weight: 700; }
.plan .price { font-size: 26px; font-weight: 800; } .plan .price small { font-size: 12px; color: var(--muted); font-weight: 500; }
.plan ul { margin: 0; padding: 0; list-style: none; font-size: 13px; color: var(--muted); display: grid; gap: 4px; flex: 1; align-content: start; }
.plan li::before { content: "✓ "; color: var(--green); }
.plan li.off { opacity: .45; } .plan li.off::before { content: "— "; color: var(--muted); }

/* таблицы */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; cursor: pointer; user-select: none; }
th.sorted::after { content: " ↓"; color: var(--accent); } th.sorted.asc::after { content: " ↑"; }
tr:hover td { background: #1a2230; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tag { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600; background: #253041; color: var(--text); }
.tag.green { background: rgba(34,197,94,.15); color: var(--green); } .tag.red { background: rgba(239,68,68,.15); color: #fca5a5; }
.tag.amber { background: rgba(245,158,11,.15); color: #fcd34d; } .tag.blue { background: rgba(59,130,246,.15); color: #93c5fd; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input, .toolbar select { width: auto; min-width: 140px; height: 34px; }
.table-wrap { overflow: auto; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 10px; font-size: 12px; color: var(--muted); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 13px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.copy { cursor: pointer; border-bottom: 1px dashed var(--muted); }
.qr { background: #fff; padding: 8px; border-radius: 8px; display: inline-block; }
dialog { background: var(--card); color: var(--text); border: 1px solid var(--border-2); border-radius: 12px; padding: 20px; max-width: 520px; width: calc(100% - 40px); }
dialog::backdrop { background: rgba(0,0,0,.6); }
@media (max-width: 720px) { .topbar { height: auto; flex-wrap: wrap; padding: 10px 14px; gap: 8px 12px; } .topbar .right { margin-left: 0; } main.page { padding: 16px 14px 40px; } }
