:root { --bg: #19191b; --bg2: #212124; --card: #26262a; --card2: #2d2d32; --line: rgba(255,255,255,.1); --line2: rgba(255,255,255,.18); --text: #ececef; --dim: #a0a0a8; --red: #e10600; --red2: #ff3b30; --ok: #3ddc84; --warn: #f5a524; --bad: #ff5a52; --shadow: 0 10px 40px rgba(0,0,0,.45); --font: 'Segoe UI', system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif; --mono: ui-monospace, 'Cascadia Mono', Menlo, Consolas, monospace; }
@media (prefers-color-scheme: light) { :root { --bg: #eceef3; --bg2: #e3e6ee; --card: #ffffff; --card2: #f3f4f8; --line: rgba(20,24,40,.12); --line2: rgba(20,24,40,.22); --text: #1b1d27; --dim: #5d6272; --shadow: 0 10px 40px rgba(30,35,70,.18); } }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
body { background: radial-gradient(900px 500px at 8% -5%, rgba(225,6,0,.22), transparent 60%), var(--bg); background-attachment: fixed; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
a { color: var(--red2); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.dim { color: var(--dim); }
/* shell */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 18px 14px; display: flex; flex-direction: column; gap: 4px; background: var(--bg2); border-right: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 700; font-size: 17px; }
.brand i { width: 34px; height: 34px; border-radius: 10px; background: var(--red); display: grid; place-items: center; flex: none; }
.brand small { display: block; font-size: 11px; font-weight: 500; color: var(--dim); letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.side nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; min-height: 0; flex: 1; }
.side nav button { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--text); border: 1px solid transparent; }
.side nav button:hover { background: var(--card2); }
.side nav button.on { background: rgba(225,6,0,.16); border-color: rgba(225,6,0,.4); }
.side nav button:focus-visible, .btn:focus-visible, .input:focus-visible, .tabs button:focus-visible { outline: 2px solid var(--red2); outline-offset: 2px; }
.side nav b { margin-left: auto; font-size: 11px; background: var(--red); color: #fff; border-radius: 99px; padding: 1px 8px; font-weight: 600; }
.me { display: flex; align-items: center; gap: 8px; padding: 10px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line); }
.me span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.main { padding: 26px clamp(16px, 3vw, 36px) 60px; min-width: 0; }
.head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.head h1 { font-size: 26px; }
.head p { margin: 4px 0 0; color: var(--dim); max-width: 70ch; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.end { justify-content: flex-end; }
/* things */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.card + .card { margin-top: 16px; }
.card h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .09em; color: var(--dim); margin-bottom: 12px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; }
.stat small { display: block; color: var(--dim); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.stat b { display: block; font-size: 28px; line-height: 1.2; margin-top: 4px; }
.stat span { color: var(--dim); font-size: 12px; }
.btn { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 14px; min-height: 36px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font-weight: 600; font-size: 13px; white-space: nowrap; }
.btn:hover:not(:disabled) { background: var(--bg2); border-color: var(--text); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--red2); border-color: var(--red2); }
.btn.danger { color: var(--bad); border-color: rgba(255,90,82,.5); }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; background: var(--card2); border: 1px solid var(--line2); color: var(--dim); white-space: nowrap; }
.chip.ok { color: var(--ok); border-color: rgba(61,220,132,.45); background: rgba(61,220,132,.1); }
.chip.warn { color: var(--warn); border-color: rgba(245,165,36,.5); background: rgba(245,165,36,.1); }
.chip.bad { color: var(--bad); border-color: rgba(255,90,82,.5); background: rgba(255,90,82,.1); }
.chip.premium { color: #b794ff; border-color: rgba(183,148,255,.5); background: rgba(183,148,255,.1); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); }
.field small { color: var(--dim); line-height: 1.45; font-size: 12px; }
.input { width: 100%; min-height: 40px; padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--bg); color: var(--text); }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { border-color: var(--red2); outline: none; }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--red); cursor: pointer; }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; background: var(--card); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
tr:first-child td { border-top: 0; }
td.act { white-space: nowrap; text-align: right; }
td.act .btn + .btn { margin-left: 6px; }
.empty { padding: 34px 16px; text-align: center; color: var(--dim); }
.bars { display: grid; gap: 8px; }
.bar { display: grid; grid-template-columns: 90px 1fr 40px; align-items: center; gap: 10px; font-size: 13px; }
.bar i { height: 10px; border-radius: 6px; background: var(--card2); overflow: hidden; display: block; }
.bar i span { display: block; height: 100%; background: var(--red); border-radius: 6px; }
.remind { display: grid; gap: 10px; }
.remind > div { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--card2); }
.remind > div.done { opacity: .55; }
.remind b { display: block; }
.remind p { margin: 2px 0 0; color: var(--dim); font-size: 13px; }
.remind .grow { flex: 1; min-width: 0; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tabs button { all: unset; box-sizing: border-box; cursor: pointer; padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line2); background: var(--card2); font-size: 13px; font-weight: 600; }
.tabs button.on { background: rgba(225,6,0,.16); border-color: rgba(225,6,0,.5); }
/* popups */
.veil { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 18px; }
.modal { width: min(560px, 100%); max-height: min(720px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; }
.modal.wide { width: min(820px, 100%); }
.modal header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal header h2 { font-size: 18px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .body { padding: 18px 20px 6px; overflow-y: auto; min-height: 0; }
.modal footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--card); }
.x { all: unset; cursor: pointer; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line2); font-size: 18px; line-height: 1; flex: none; }
.x:hover { border-color: var(--red2); }
#toasts { position: fixed; z-index: 90; left: 50%; bottom: 22px; transform: translateX(-50%); display: grid; gap: 8px; width: min(420px, calc(100vw - 24px)); pointer-events: none; }
.toast { padding: 11px 16px; border-radius: 12px; background: var(--card2); border: 1px solid var(--line2); box-shadow: var(--shadow); font-weight: 600; }
.toast.bad { border-color: rgba(255,90,82,.6); color: var(--bad); }
.toast.ok { border-color: rgba(61,220,132,.5); }
/* sign in */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(400px, 100%); padding: 28px; }
.login h1 { font-size: 22px; margin: 14px 0 4px; }
.keybox { display: flex; gap: 8px; align-items: center; }
.keybox code { flex: 1; min-width: 0; overflow-wrap: anywhere; padding: 8px 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 12.5px; }
pre.pem { margin: 0; padding: 12px; border-radius: 10px; background: var(--bg); border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; overflow-x: auto; white-space: pre-wrap; word-break: break-all; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; gap: 6px; }
  .brand { padding: 0 6px 0 0; }
  .side nav { flex-direction: row; flex-wrap: wrap; flex: 1 1 100%; overflow: visible; order: 3; }
  .side nav button { padding: 8px 12px; min-height: 38px; }
  .me { margin-left: auto; }
  .btn { min-height: 40px; }
  .btn.sm { min-height: 36px; }
}
