:root {
  --bg: #0e0f13;
  --card: #16181f;
  --card2: #1d2029;
  --line: #262a35;
  --fg: #eef0f4;
  --dim: #8b90a0;
  --acc: #4c7dff;
  --ok: #34c77b;
  --warn: #f5a524;
  --danger: #f0506e;
  --radius: 14px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: radial-gradient(1100px 500px at 20% -10%, #1a1d27 0%, var(--bg) 55%);
  color: var(--fg);
  font-family: -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 560px; margin: 0 auto; padding: 22px 16px 64px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 22px; margin: 6px 0 20px; }
.brand .b { background: var(--acc); color: #fff; border-radius: 7px; padding: 2px 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 14px; }
.card h2 { font-size: 16px; margin-bottom: 12px; }
.cap { font-size: 11px; letter-spacing: .6px; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
label { display: block; font-size: 13px; color: var(--dim); margin: 10px 0 5px; }
input, select {
  width: 100%; background: var(--card2); border: 1px solid var(--line); color: var(--fg);
  border-radius: 10px; padding: 12px 13px; font-size: 16px; outline: none;
}
input:focus { border-color: var(--acc); }
.btn {
  width: 100%; border: none; border-radius: 11px; padding: 13px; font-size: 15px; font-weight: 650;
  cursor: pointer; margin-top: 12px; transition: filter .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--acc); color: #fff; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }
.btn.oauth { background: var(--card2); color: var(--fg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 8px; }
.row { display: flex; gap: 10px; }
.row .btn { margin-top: 0; }
.muted { color: var(--dim); font-size: 13px; }
.tabs { display: flex; gap: 8px; margin-bottom: 14px; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--line); cursor: pointer; font-size: 14px; }
.tab.on { background: var(--acc); color: #fff; border-color: var(--acc); }
.plan { border: 1px solid var(--line); border-radius: 11px; padding: 12px; margin-bottom: 8px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.plan.on { border-color: var(--acc); background: rgba(76,125,255,.08); }
.plan .name { font-weight: 650; }
.durs { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0 4px; }
.dur { flex: 1; min-width: 90px; border: 1px solid var(--line); border-radius: 10px; padding: 9px; text-align: center; cursor: pointer; }
.dur.on { border-color: var(--acc); background: rgba(76,125,255,.08); }
.dur .m { font-size: 12px; color: var(--dim); }
.dur .p { font-weight: 700; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.ok { background: rgba(52,199,123,.15); color: var(--ok); }
.pill.warn { background: rgba(245,165,36,.15); color: var(--warn); }
.li { display: flex; justify-content: space-between; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.li:last-child { border-bottom: none; }
.sublink { word-break: break-all; background: var(--card2); border: 1px solid var(--line); border-radius: 10px; padding: 11px; font-family: ui-monospace, monospace; font-size: 12.5px; }
.hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; }
.divider { display: flex; align-items: center; gap: 10px; color: var(--dim); font-size: 12px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: #23262f; color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px;
  opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90%; text-align: center;
  border: 1px solid var(--line);
}
#toast.show { opacity: 1; }
.center { text-align: center; }
.link { color: var(--acc); cursor: pointer; }

/* Skiki cabinet theme: real block buttons, stable spacing, readable text. */
:root{--bg:#04112b;--card:#0a2146;--card2:#0a1b39;--line:#28558b;--fg:#f4f8ff;--dim:#b6cae9;--acc:#0878ef;--ok:#36efd0;--radius:20px;color-scheme:dark}
body{background:radial-gradient(ellipse at 85% 10%,#0c3672 0,transparent 55%),#04112b;font-family:"Segoe UI",Arial,sans-serif;line-height:1.55}
#app{max-width:900px;padding:28px 24px 64px}.auth-shell{max-width:540px;margin:auto}.brand{margin:0 0 24px}.brand-home{display:flex;align-items:center;gap:18px;color:var(--fg);text-decoration:none}.brand img{object-fit:contain;width:96px;height:96px}.brand strong{font-size:28px;letter-spacing:1px}.brand small{display:block;font-size:14px;color:#b8d0f2;font-weight:400}.intro{color:var(--dim);margin:6px 0 24px}h1{font-size:30px;line-height:1.25}.card{padding:24px;margin-bottom:20px;background:linear-gradient(130deg,#0c2854,#071932);box-shadow:0 10px 30px #0002}.card h2{font-size:21px;margin-bottom:16px}
.btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:50px;line-height:1.4;text-decoration:none;text-align:center;font-family:inherit;font-size:16px;font-weight:600;border:1px solid #3980c9;margin-top:14px;padding:13px 18px;white-space:normal}.btn.primary{color:white;background:linear-gradient(#079df2,#0563dc);border-color:#44d7fa;box-shadow:inset 0 1px #ffffff35}.btn.ghost,.btn.oauth{background:#102d56;border-color:#4273ac;color:#f5f8ff}.btn:hover:not(:disabled){filter:brightness(1.12);border-color:#75e7ff}.btn:active:not(:disabled){background:#074893}.btn:disabled{opacity:1;background:#243950;color:#adbed3;border-color:#41536c;cursor:not-allowed}.btn:focus-visible,.tab:focus-visible,.link:focus-visible,a:focus-visible{outline:3px solid #5eeaff;outline-offset:3px}
.tabs{gap:8px}.tab{font:600 14px "Segoe UI",sans-serif;color:#d5e6ff;min-height:46px;line-height:1.3;background:#102749}.tab.on{background:#086de0;border-color:#48cfff;color:white}input,select{background:#06172f;color:#f7faff;border-color:#3d6799;min-height:48px;font-family:inherit}input:focus,select:focus{border-color:#5eeaff;box-shadow:0 0 0 2px #00aaff25}input:-webkit-autofill{-webkit-text-fill-color:#f4f8ff;-webkit-box-shadow:0 0 0 1000px #102b4a inset}label{color:#c8daf1;font-size:14px;margin:14px 0 7px}.hint,.muted{font-size:14px;color:#b6cae9;line-height:1.6}.hint{margin-top:10px}.li{gap:16px;align-items:center;flex-wrap:wrap;padding:12px 0}.li b{overflow-wrap:anywhere}.sublink{font-size:13px;line-height:1.65;padding:16px;background:#05172f;user-select:all}.link{color:#67d8ff}.pill{padding:5px 12px;font-size:13px}.pill.ok{color:#65ffda;background:#073e3d}.row{flex-wrap:wrap}.row>*{flex:1;min-width:150px}.plan,.dur{background:#0c2449}.plan.on,.dur.on{background:#103866;border-color:#42d5f5}.center{margin-top:20px}.cap{color:#b6cae9}
@media(min-width:760px){.cabinet-shell:not(.auth-shell){display:grid;grid-template-columns:1fr 1fr;gap:20px}.cabinet-shell:not(.auth-shell)>.brand,.cabinet-shell:not(.auth-shell)>.center{grid-column:1/-1}.cabinet-shell:not(.auth-shell)>.card{margin:0}}
@media(max-width:480px){#app{padding:18px 14px 40px}.card{padding:18px}.brand img{width:76px;height:76px}.brand-home{gap:12px}.brand small{font-size:12px}.tab{font-size:13px;padding:10px 7px}h1{font-size:27px}}

/* Cabinet layout: explicit full-width sections, no empty grid cells or stretched cards. */
.cabinet-shell:not(.auth-shell){display:grid;gap:16px;align-items:start;grid-template-columns:minmax(0,1fr)}
.cabinet-shell:not(.auth-shell)>*{min-width:0;margin:0}
.cabinet-shell .card{padding:20px}.cabinet-shell .card h2{font-size:20px;margin-bottom:12px}
.cabinet-shell .hint{margin:8px 0 12px}.cabinet-shell .btn{font-size:15px;min-height:46px;padding:11px 16px;margin-top:10px}
.cabinet-shell .brand{margin-bottom:6px}.cabinet-shell .li{padding:10px 0}
.cabinet-shell>.center{margin-top:8px}
.cabinet-downloads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cabinet-downloads .btn{font-size:13px;padding:10px}
.cabinet-app-tabs{display:flex;gap:8px}.cabinet-app-tabs .tab{margin:0;min-width:0;font-family:inherit;cursor:pointer}
.cabinet-other-device{border-top:1px solid var(--line);padding-top:12px;margin-top:14px;font-size:13px;color:var(--dim)}
.cabinet-other-device summary{cursor:pointer}.cabinet-other-device select{margin-top:10px;font-size:14px}
@media(min-width:760px){
 .cabinet-shell:not(.auth-shell){grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
 .cabinet-shell .cabinet-wide{grid-column:1/-1}
 .cabinet-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
 .cabinet-summary .li{flex-direction:column;align-items:flex-start;justify-content:center;border-bottom:0;padding:0;gap:8px}
 .cabinet-summary .li+.li{border-left:1px solid var(--line);padding-left:24px}
 .cabinet-devices .sda-device-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:24px}
 .cabinet-devices .sda-devices-card>.sda-btn{width:auto;min-width:280px}
 .cabinet-shell>.card:not(.cabinet-wide){align-self:stretch}
 .cabinet-devices .sda-devices-card{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:24px}
 .cabinet-devices .sda-devices-card>h2,.cabinet-devices .sda-device-list,.cabinet-devices .sda-devices-card>p:nth-last-child(2){grid-column:1/-1}
 .cabinet-devices .sda-total{grid-column:1;grid-row:2}
 .cabinet-devices .sda-devices-card>p:nth-child(3){grid-column:1;grid-row:3}
 .cabinet-devices .sda-devices-card>.sda-badge{grid-column:1;justify-self:start;grid-row:4}
 .cabinet-devices .sda-devices-card>.sda-btn{grid-column:2;grid-row:2/5;align-self:center;margin:0}
}
@media(max-width:480px){.cabinet-shell .card{padding:18px}.cabinet-summary .li:first-child{align-items:flex-start}.cabinet-summary .pill{font-size:12px}}
