/* ============================================================
   VPS Backup Console — design system (#1F2430 · Be Vietnam Pro)
   ============================================================ */

/* ---------- Be Vietnam Pro (self-host, latin + vietnamese) ---------- */
@font-face { font-family:"Be Vietnam Pro"; font-weight:400; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-latin-400-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:400; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2"); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:500; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-latin-500-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:500; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-vietnamese-500-normal.woff2") format("woff2"); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:600; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-latin-600-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:600; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-vietnamese-600-normal.woff2") format("woff2"); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:700; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-latin-700-normal.woff2") format("woff2"); unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family:"Be Vietnam Pro"; font-weight:700; font-display:swap; src:url("/assets/fonts/be-vietnam-pro-vietnamese-700-normal.woff2") format("woff2"); unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+1EA0-1EF9,U+20AB; }
@font-face { font-family:"Geist Mono"; font-weight:100 900; font-display:swap; src:url("/assets/fonts/GeistMono-Variable.woff2") format("woff2"); }

/* ---------- Tokens ---------- */
:root {
  /* sidebar cố định (#1F2430) ở mọi theme */
  --side-bg:#1F2430; --side-bg-2:#262C3A; --side-active:#2E3545;
  --side-text:#C7CDD9; --side-text-2:#7E8697; --side-hair:rgba(255,255,255,.08);

  /* dark theme (mặc định) */
  --bg:#171A21; --surface:#1F2430; --surface-2:#262C3A; --surface-3:#2E3545;
  --hair:rgba(255,255,255,.08); --hair-2:rgba(255,255,255,.12); --highlight:rgba(255,255,255,.04);
  --text:#E7EAF0; --text-2:#9BA3B4; --text-3:#6B7384;

  --accent:#4D8DF0; --accent-2:#3B7CE0; --accent-dim:rgba(77,141,240,.16); --accent-glow:rgba(77,141,240,.32);
  --on-accent:#fff;
  --ok:#3FB97A; --ok-dim:rgba(63,185,122,.15);
  --danger:#E5645C; --danger-dim:rgba(229,100,92,.15);
  --warn:#E0A33C;

  --radius:14px; --radius-sm:10px; --radius-lg:18px;
  --ease:cubic-bezier(.32,.72,0,1);
  --shadow:0 1px 2px rgba(0,0,0,.35), 0 10px 26px -14px rgba(0,0,0,.6);
  --shadow-lg:0 24px 60px -22px rgba(0,0,0,.7);
  --font:"Be Vietnam Pro",-apple-system,BlinkMacSystemFont,"Segoe UI",system-ui,sans-serif;
  --mono:"Geist Mono",ui-monospace,"SF Mono","JetBrains Mono",monospace;
  --sidebar-w:248px;

  --ok-bg:#133024; --ok-tx:#5fd9a2; --info-bg:#132840; --info-tx:#7db2f5;
  --err-bg:#331a19; --err-tx:#f09a94; --warn-bg:#2f2614; --warn-tx:#e6c160; --mut-bg:#262c38; --mut-tx:#aab2bd;
}
:root[data-theme="light"] {
  --bg:#EEF1F6; --surface:#FFFFFF; --surface-2:#F6F8FB; --surface-3:#EDF1F7;
  --hair:rgba(31,36,48,.10); --hair-2:rgba(31,36,48,.16); --highlight:rgba(255,255,255,.9);
  --text:#1F2430; --text-2:#5B636F; --text-3:#8A92A0;
  --accent:#3B7CE0; --accent-2:#2E6AD0; --accent-dim:rgba(59,124,224,.1); --accent-glow:rgba(59,124,224,.22);
  --shadow:0 1px 2px rgba(31,36,48,.05), 0 12px 30px -18px rgba(31,36,48,.22);
  --shadow-lg:0 30px 60px -25px rgba(31,36,48,.26);
  --ok-bg:#e6f6ee; --ok-tx:#128a56; --info-bg:#e8f1fd; --info-tx:#2567c4;
  --err-bg:#fbeae9; --err-tx:#c0453f; --warn-bg:#f8f0db; --warn-tx:#8a5e12; --mut-bg:#eef1f6; --mut-tx:#5b636f;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:#EEF1F6; --surface:#FFFFFF; --surface-2:#F6F8FB; --surface-3:#EDF1F7;
    --hair:rgba(31,36,48,.10); --hair-2:rgba(31,36,48,.16); --highlight:rgba(255,255,255,.9);
    --text:#1F2430; --text-2:#5B636F; --text-3:#8A92A0;
    --accent:#3B7CE0; --accent-2:#2E6AD0; --accent-dim:rgba(59,124,224,.1); --accent-glow:rgba(59,124,224,.22);
    --shadow:0 1px 2px rgba(31,36,48,.05), 0 12px 30px -18px rgba(31,36,48,.22);
    --shadow-lg:0 30px 60px -25px rgba(31,36,48,.26);
    --ok-bg:#e6f6ee; --ok-tx:#128a56; --info-bg:#e8f1fd; --info-tx:#2567c4;
    --err-bg:#fbeae9; --err-tx:#c0453f; --warn-bg:#f8f0db; --warn-tx:#8a5e12; --mut-bg:#eef1f6; --mut-tx:#5b636f;
  }
}

* { box-sizing:border-box; }
[hidden] { display:none !important; } /* để thuộc tính hidden luôn thắng display của class */
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg); color:var(--text); font-family:var(--font); font-size:14.5px; line-height:1.6; letter-spacing:-.002em; -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility; min-height:100dvh; }
a { color:inherit; text-decoration:none; }
.mono { font-family:var(--mono); font-variant-numeric:tabular-nums; letter-spacing:-.01em; }
.small { font-size:12.5px; } .muted { color:var(--text-2); } .nowrap { white-space:nowrap; } .wrap { word-break:break-all; }
.mb { margin-bottom:14px; } .mt { margin-top:16px; } .req { color:var(--danger); }
code.mono { background:var(--surface-3); padding:1px 6px; border-radius:5px; border:1px solid var(--hair); font-size:.92em; }

/* ============================================================
   App shell
   ============================================================ */
.app { display:grid; grid-template-columns:var(--sidebar-w) 1fr; min-height:100dvh; }
.app__main { min-width:0; }

.sidebar { position:sticky; top:0; height:100dvh; display:flex; flex-direction:column; padding:20px 14px; gap:5px; background:var(--side-bg); color:var(--side-text); }
.brand { display:flex; align-items:center; gap:11px; padding:6px 8px 20px; font-weight:600; letter-spacing:-.02em; font-size:15px; color:#fff; }
.brand__mark { width:30px; height:30px; border-radius:9px; flex:none;
  background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M8 11h16M8 16h16M8 21h10' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center/26px no-repeat,
  linear-gradient(145deg,#5B9BF8,var(--accent-2)); box-shadow:0 4px 14px -4px var(--accent-glow); }
.brand__name { white-space:nowrap; }

.sidenav { display:flex; flex-direction:column; gap:3px; margin-top:4px; }
.sidenav__link { display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:9px; color:var(--side-text); font-weight:500; font-size:14px; position:relative; transition:color .2s var(--ease), background .2s var(--ease); }
.sidenav__icon { width:18px; height:18px; flex:none; opacity:.8; }
.sidenav__link:hover { color:#fff; background:var(--side-bg-2); }
.sidenav__link.is-active { color:#fff; background:var(--side-active); }
.sidenav__link.is-active::before { content:""; position:absolute; left:-14px; top:50%; transform:translateY(-50%); width:3px; height:20px; border-radius:0 3px 3px 0; background:var(--accent); }
.sidenav__link.is-active .sidenav__icon { color:var(--accent); opacity:1; }

.sidebar__foot { margin-top:auto; display:flex; flex-direction:column; gap:7px; }
.side-ctl { display:flex; align-items:center; gap:11px; padding:9px 11px; border-radius:9px; border:none; background:transparent; color:var(--side-text); cursor:pointer; font:inherit; font-size:14px; font-weight:500; width:100%; text-align:left; transition:color .2s, background .2s; }
.side-ctl:hover { color:#fff; background:var(--side-bg-2); }
.side-ctl svg { width:18px; height:18px; }
.sideuser { display:flex; align-items:center; gap:8px; padding:8px; border-radius:11px; border:1px solid var(--side-hair); }
.sideuser__id { display:flex; align-items:center; gap:9px; flex:1; min-width:0; }
.sideuser__avatar { width:30px; height:30px; border-radius:8px; flex:none; display:grid; place-items:center; background:var(--accent-dim); color:#9ec2fa; font-weight:650; font-size:13px; }
.sideuser__name { font-size:13.5px; font-weight:550; color:#fff; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.sideuser__out { color:var(--side-text-2); display:inline-flex; padding:6px; border-radius:8px; transition:color .2s, background .2s; }
.sideuser__out svg { width:17px; height:17px; }
.sideuser__out:hover { color:#f0908a; background:rgba(229,100,92,.14); }
.i-sun { display:inline; } .i-moon { display:none; }
:root[data-theme="dark"] .i-sun { display:none; } :root[data-theme="dark"] .i-moon { display:inline; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .i-sun { display:none; } :root:not([data-theme="light"]) .i-moon { display:inline; } }

.mobilebar { display:none; } .hamburger { display:none; } .scrim { display:none; }

/* ---------- Shell ---------- */
.shell { max-width:1440px; margin:0 auto; padding:34px 40px 80px; }
.shell--bare { max-width:none; padding:0; }
.pagehead { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:26px; flex-wrap:wrap; }
.pagehead__title { font-size:25px; letter-spacing:-.03em; margin:0; font-weight:600; }
.pagehead__sub { margin:6px 0 0; color:var(--text-2); font-size:13.5px; }
.pagehead__actions { display:flex; gap:10px; align-items:center; }
.crumbs { font-size:12.5px; color:var(--text-3); margin-bottom:7px; display:flex; gap:8px; align-items:center; }
.crumbs a:hover { color:var(--accent); } .crumbs span:not(:last-child) { opacity:.4; }

/* ---------- Buttons ---------- */
.btn { display:inline-flex; align-items:center; gap:8px; cursor:pointer; user-select:none; padding:9px 15px; border-radius:9px; font-size:13.5px; font-weight:550; line-height:1; border:1px solid var(--hair-2); background:var(--surface-2); color:var(--text); white-space:nowrap; font-family:inherit; transition:transform .16s var(--ease), background .2s, border-color .2s, box-shadow .2s, color .2s; }
.btn svg { width:15px; height:15px; }
.btn:hover { background:var(--surface-3); box-shadow:var(--shadow); }
.btn:active { transform:translateY(1px) scale(.985); }
.btn--primary { background:var(--accent); color:var(--on-accent); border-color:transparent; }
.btn--primary:hover { background:var(--accent); filter:brightness(1.07); box-shadow:0 6px 20px -8px var(--accent-glow); color:#fff; }
.btn--danger { background:var(--danger); color:#fff; border-color:transparent; }
.btn--ghost-danger { color:var(--danger); background:transparent; border-color:transparent; }
.btn--ghost-danger:hover { background:var(--danger-dim); box-shadow:none; }
.btn--sm { padding:6px 11px; font-size:12.5px; border-radius:8px; }
.btn--block { width:100%; justify-content:center; padding:12px; }
.btn:disabled { opacity:.5; cursor:not-allowed; }
.inline { display:inline; }

/* ---------- Fields ---------- */
.stack { display:flex; flex-direction:column; gap:17px; }
.field { display:flex; flex-direction:column; gap:7px; }
.field__label { font-size:12.5px; font-weight:550; color:var(--text); }
.field__hint { font-size:12px; color:var(--text-3); line-height:1.5; }
.input { width:100%; padding:10px 13px; font-size:13.5px; font-family:inherit; border:1px solid var(--hair-2); border-radius:9px; background:var(--surface-3); color:var(--text); transition:border-color .2s, box-shadow .2s, background .2s; }
.input::placeholder { color:var(--text-3); }
.input:focus { outline:none; border-color:var(--accent); box-shadow:0 0 0 3px var(--accent-dim); }
.input--code { letter-spacing:.5em; text-align:center; font-family:var(--mono); font-size:22px; padding-left:.5em; }
.field--narrow { max-width:240px; }
.formrow { display:grid; grid-template-columns:1fr 1fr; gap:17px; }
.formrow .field--narrow { max-width:none; }
.formpanel { padding:26px; display:flex; flex-direction:column; gap:19px; }
.formpanel__foot { display:flex; justify-content:flex-end; gap:10px; margin-top:4px; }
.formerr { background:var(--err-bg); color:var(--err-tx); border:1px solid color-mix(in srgb,var(--err-tx) 24%,transparent); border-radius:11px; padding:13px 16px; margin-bottom:20px; font-size:13px; }
.formerr p { margin:2px 0; }

/* ---------- Panels / tables ---------- */
.panel { background:var(--surface); border:1px solid var(--hair); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; margin-bottom:20px; }
.panel__head { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 20px; border-bottom:1px solid var(--hair); }
.panel__title { margin:0; font-size:14.5px; font-weight:600; letter-spacing:-.01em; }
.panel__meta { color:var(--text-3); font-size:12px; }
.table { width:100%; border-collapse:collapse; font-size:13.5px; }
.table th { text-align:left; font-size:11px; text-transform:uppercase; letter-spacing:.07em; color:var(--text-3); font-weight:600; padding:12px 18px; border-bottom:1px solid var(--hair); background:var(--surface-2); }
.table td { padding:13px 18px; border-bottom:1px solid var(--hair); vertical-align:middle; }
.table tr:last-child td { border-bottom:none; }
.table tbody tr { transition:background .15s; } .table tbody tr:hover { background:var(--surface-2); }
.row--err td { background:color-mix(in srgb,var(--err-bg) 45%,transparent); }
.row-actions { text-align:right; white-space:nowrap; } .row-actions .btn { margin-left:6px; }

/* ---------- Tags / status ---------- */
.tag { display:inline-flex; align-items:center; gap:5px; padding:3px 10px; border-radius:999px; font-size:10.5px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; }
.tag--green { background:var(--ok-bg); color:var(--ok-tx); } .tag--blue { background:var(--info-bg); color:var(--info-tx); }
.tag--red { background:var(--err-bg); color:var(--err-tx); } .tag--yellow { background:var(--warn-bg); color:var(--warn-tx); } .tag--gray { background:var(--mut-bg); color:var(--mut-tx); }
.status-dot { display:inline-flex; align-items:center; gap:8px; font-size:12.5px; color:var(--text-2); font-weight:500; }
.status-dot__led { width:7px; height:7px; border-radius:50%; background:var(--text-3); flex:none; }
.status-dot.is-on .status-dot__led { background:var(--ok); box-shadow:0 0 0 3px var(--ok-dim), 0 0 9px rgba(63,185,122,.4); animation:pulse 2.4s var(--ease) infinite; }
.status-dot.is-off .status-dot__led { background:var(--danger); box-shadow:0 0 0 3px var(--danger-dim); }
@keyframes pulse { 0%,100% { box-shadow:0 0 0 3px var(--ok-dim), 0 0 7px rgba(63,185,122,.35);} 50% { box-shadow:0 0 0 3px var(--ok-dim), 0 0 15px rgba(63,185,122,.55);} }

/* ---------- Dashboard cards ---------- */
.grid-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(330px,1fr)); gap:18px; }
.vcard { background:var(--surface); border:1px solid var(--hair); border-radius:var(--radius-lg); box-shadow:var(--shadow); display:flex; flex-direction:column; overflow:hidden; transition:transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s; }
.vcard:hover { transform:translateY(-2px); box-shadow:var(--shadow-lg); border-color:var(--hair-2); }
.vcard__head { display:flex; align-items:flex-start; justify-content:space-between; gap:10px; padding:18px 20px 14px; }
.vcard__title { display:block; min-width:0; }
.vcard__name { display:block; font-size:16px; font-weight:600; letter-spacing:-.02em; }
.vcard__url { display:block; font-size:11.5px; color:var(--text-3); margin-top:3px; }
.vcard__refresh { flex:none; width:34px; height:34px; display:grid; place-items:center; border:1px solid var(--hair-2); border-radius:9px; background:var(--surface-2); color:var(--text-2); cursor:pointer; transition:color .2s, background .2s, transform .4s var(--ease); }
.vcard__refresh:hover { color:var(--accent); background:var(--surface-3); }
.vcard__refresh.spinning svg { animation:spin .8s linear infinite; }
.vcard__refresh svg { width:16px; height:16px; }
.vcard__status { padding:0 20px 12px; }
.vcard__body { padding:0 20px 16px; }
.vcard__idle { color:var(--text-3); font-size:13px; padding:14px 0; text-align:center; border:1px dashed var(--hair-2); border-radius:11px; display:flex; flex-direction:column; gap:10px; align-items:center; }
.vcard__loaded { display:flex; flex-direction:column; gap:12px; }
.metric { display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.metric__label { font-size:12.5px; color:var(--text-2); } .metric__value { font-size:15px; font-weight:600; }
.vcard__foot { padding:14px 20px; border-top:1px solid var(--hair); display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:auto; background:color-mix(in srgb,var(--bg) 45%,transparent); }
.vcard__err { font-size:11.5px; color:var(--danger); }

/* ---------- Meters ---------- */
.meter { display:flex; flex-direction:column; gap:6px; }
.meter__top { display:flex; justify-content:space-between; font-size:12px; color:var(--text-2); }
.meter__track { height:7px; background:var(--surface-3); border-radius:5px; overflow:hidden; border:1px solid var(--hair); }
.meter__fill { height:100%; width:0; border-radius:5px; background:linear-gradient(90deg,var(--accent-2),var(--accent)); transition:width .9s var(--ease); }
.meter__fill.is-high { background:var(--warn); } .meter__fill.is-crit { background:var(--danger); }
.meter__val { font-size:12px; color:var(--text-2); }

/* ---------- VPS detail: statstrip ---------- */
.statstrip { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin-bottom:20px; }
.statstrip__item { background:var(--surface); border:1px solid var(--hair); border-radius:var(--radius); padding:16px 18px; box-shadow:var(--shadow); }
.statstrip__label { display:block; font-size:11px; color:var(--text-3); text-transform:uppercase; letter-spacing:.07em; margin-bottom:11px; }
.statstrip__value { font-size:13px; }
.statstrip .meter { gap:7px; }

/* ---------- Master-detail (days | files) ---------- */
.detail { display:grid; grid-template-columns:340px 1fr; gap:18px; align-items:start; }
.daypane, .filepane { background:var(--surface); border:1px solid var(--hair); border-radius:var(--radius); box-shadow:var(--shadow); overflow:hidden; }
.pane__head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:15px 18px; border-bottom:1px solid var(--hair); }
.pane__title { margin:0; font-size:14px; font-weight:600; }
.pane__meta { font-size:12px; color:var(--text-3); }

.daylist { display:flex; flex-direction:column; }
.dayitem { display:grid; grid-template-columns:1fr auto; align-items:center; gap:4px 12px; padding:13px 18px; cursor:pointer; border-bottom:1px solid var(--hair); border-left:2px solid transparent; transition:background .15s, border-color .15s; }
.dayitem:last-child { border-bottom:none; }
.dayitem:hover { background:var(--surface-2); }
.dayitem.is-active { background:var(--surface-2); border-left-color:var(--accent); }
.dayitem__day { font-weight:600; font-size:14px; }
.dayitem__size { font-size:12.5px; color:var(--text-2); font-weight:600; text-align:right; font-family:var(--mono); }
.dayitem__sub { font-size:11.5px; color:var(--text-3); grid-column:1; }

.filepane__bar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:13px 18px; border-bottom:1px solid var(--hair); background:var(--surface-2); }
.filepane__bar .input { flex:1; min-width:180px; font-size:12.5px; padding:7px 11px; }
.filepane__sel { font-size:12.5px; color:var(--text-2); } .filepane__sel b { color:var(--text); }

.filetable { width:100%; border-collapse:collapse; font-size:13px; }
.filetable td { padding:10px 18px; border-bottom:1px solid var(--hair); }
.filetable tr:last-child td { border-bottom:none; }
.filetable tr:hover td { background:var(--surface-2); }
.filetable .ckcell { width:20px; padding-right:0; }
.filetable .namecell { display:flex; align-items:center; gap:9px; min-width:0; }
.filetable .namecell svg { color:var(--text-3); flex:none; width:15px; height:15px; }
.fname { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.filetable .sizecell { text-align:right; color:var(--text-3); font-family:var(--mono); font-size:12px; white-space:nowrap; }
.filetable .dlcell { text-align:right; width:40px; }
.filedl { color:var(--text-3); display:inline-flex; padding:5px; border-radius:7px; cursor:pointer; transition:color .2s, background .2s; }
.filedl:hover { color:var(--accent); background:var(--accent-dim); }

.ck { appearance:none; width:17px; height:17px; border:1.5px solid var(--hair-2); border-radius:5px; background:var(--surface-3); cursor:pointer; position:relative; flex:none; transition:border-color .2s, background .2s; }
.ck:checked { background:var(--accent); border-color:var(--accent); }
.ck:checked::after { content:""; position:absolute; left:5px; top:1.5px; width:4px; height:9px; border:solid #fff; border-width:0 2px 2px 0; transform:rotate(45deg); }
.ck:focus-visible { outline:none; box-shadow:0 0 0 3px var(--accent-dim); }

.filepane__empty { padding:50px 20px; text-align:center; color:var(--text-3); font-size:13px; }

/* ---------- Pagination ---------- */
.pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 18px; border-top:1px solid var(--hair); font-size:12.5px; color:var(--text-2); }
.pager__info { color:var(--text-3); }
.pager__ctrl { display:flex; gap:6px; align-items:center; }
.pager__btn { min-width:30px; height:30px; padding:0 8px; display:grid; place-items:center; border:1px solid var(--hair-2); border-radius:8px; background:var(--surface-2); color:var(--text); cursor:pointer; font:inherit; font-size:12.5px; transition:background .2s, border-color .2s, color .2s; }
.pager__btn:hover:not(:disabled) { background:var(--surface-3); border-color:var(--accent); }
.pager__btn.is-active { background:var(--accent); color:#fff; border-color:transparent; }
.pager__btn:disabled { opacity:.4; cursor:not-allowed; }

/* ---------- Live jobs ---------- */
.joblist { display:flex; flex-direction:column; }
.jobitem { padding:15px 20px; border-bottom:1px solid var(--hair); } .jobitem:last-child { border-bottom:none; }
.jobitem__top { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px; }
.jobitem__label { font-size:13.5px; font-weight:550; display:flex; align-items:center; gap:9px; }
.jobitem__pct { font-size:12.5px; color:var(--text-2); font-family:var(--mono); }
.jobitem__msg { font-size:12px; color:var(--text-3); margin-top:8px; min-height:1em; font-family:var(--mono); }
.jobitem__msg .pathout { color:var(--accent); }
.pbar { height:8px; background:var(--surface-3); border-radius:6px; overflow:hidden; border:1px solid var(--hair); }
.pbar__fill { height:100%; width:0; border-radius:6px; background:linear-gradient(90deg,var(--accent-2),var(--accent)); transition:width .5s var(--ease); }
.pbar__fill.is-indeterminate { width:32%!important; animation:slide 1.3s var(--ease) infinite; }
.pbar__fill.is-error { background:var(--danger); } .pbar__fill.is-done { background:var(--ok); }
@keyframes slide { 0% { margin-left:-32%; } 100% { margin-left:100%; } }

/* ---------- Loader / empty / spinner ---------- */
.loader { padding:40px 20px; text-align:center; color:var(--text-3); font-size:13px; display:flex; align-items:center; justify-content:center; gap:10px; }
.spin { width:15px; height:15px; border:2px solid var(--hair-2); border-top-color:var(--accent); border-radius:50%; animation:spin .7s linear infinite; display:inline-block; }
@keyframes spin { to { transform:rotate(360deg); } }
.emptybox { text-align:center; padding:66px 24px; border:1px dashed var(--hair-2); border-radius:var(--radius-lg); background:var(--surface); }
.emptybox__title { font-size:19px; margin:0 0 9px; font-weight:600; } .emptybox__text { color:var(--text-2); margin:0 auto 22px; max-width:440px; }

/* ---------- Subnav ---------- */
.subnav { display:flex; gap:4px; padding:4px; background:var(--surface-2); border:1px solid var(--hair); border-radius:11px; margin-bottom:24px; width:max-content; max-width:100%; }
.subnav__link { padding:8px 15px; font-size:13px; color:var(--text-2); font-weight:550; border-radius:8px; transition:color .2s, background .2s; }
.subnav__link:hover { color:var(--text); } .subnav__link.is-active { color:var(--text); background:var(--surface-3); }
.cols { display:grid; grid-template-columns:1.4fr 1fr; gap:22px; align-items:start; }

/* ---------- Secretbox / disc (account) ---------- */
.secretbox { display:flex; align-items:center; gap:12px; flex-wrap:wrap; background:var(--surface-3); border:1px solid var(--hair); border-radius:11px; padding:15px 17px; margin:6px 0 10px; }
.secretbox__label { font-size:11px; color:var(--text-3); text-transform:uppercase; letter-spacing:.07em; }
.secretbox__code { font-size:17px; font-weight:600; letter-spacing:.05em; flex:1; min-width:160px; color:var(--accent); }
.disc { margin-top:10px; font-size:13px; } .disc summary { cursor:pointer; color:var(--text-2); }
.disc code { display:block; margin-top:8px; padding:11px; background:var(--surface-3); border:1px solid var(--hair); border-radius:9px; }

/* ---------- Auth ---------- */
.auth { min-height:100dvh; display:flex; align-items:center; justify-content:center; padding:24px; }
.auth__card { width:100%; max-width:400px; background:var(--surface); border:1px solid var(--hair-2); border-radius:var(--radius-lg); box-shadow:var(--shadow-lg); padding:38px 34px; }
.auth__brand { display:flex; align-items:center; gap:12px; margin-bottom:26px; font-size:15px; font-weight:600; }
.auth__title { font-size:23px; margin:0 0 5px; letter-spacing:-.03em; font-weight:600; }
.auth__sub { margin:0 0 26px; color:var(--text-2); font-size:13.5px; }
.auth__foot { text-align:center; margin:20px 0 0; font-size:13px; } .auth__foot a { color:var(--text-2); } .auth__foot a:hover { color:var(--accent); }

/* ---------- Flash + toast ---------- */
.flash { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 17px; border-radius:11px; margin-bottom:20px; font-size:13.5px; border:1px solid transparent; }
.flash--success { background:var(--ok-bg); color:var(--ok-tx); border-color:color-mix(in srgb,var(--ok-tx) 24%,transparent); }
.flash--error { background:var(--err-bg); color:var(--err-tx); border-color:color-mix(in srgb,var(--err-tx) 24%,transparent); }
.flash--info { background:var(--info-bg); color:var(--info-tx); border-color:color-mix(in srgb,var(--info-tx) 24%,transparent); }
.flash__close { background:none; border:none; font-size:18px; cursor:pointer; color:inherit; opacity:.6; } .flash__close:hover { opacity:1; }
.toast-stack { position:fixed; bottom:24px; right:24px; z-index:80; display:flex; flex-direction:column; gap:10px; max-width:380px; }
.toast { background:var(--surface); border:1px solid var(--hair-2); border-left:3px solid var(--accent); border-radius:11px; padding:13px 16px; box-shadow:var(--shadow-lg); font-size:13.5px; animation:toastin .35s var(--ease); }
.toast--error { border-left-color:var(--danger); } .toast--success { border-left-color:var(--ok); }
.toast__title { font-weight:600; margin-bottom:2px; } .toast__body { color:var(--text-2); font-size:12.5px; }
@keyframes toastin { from { opacity:0; transform:translateX(18px); } }

.icon-btn { display:inline-flex; align-items:center; justify-content:center; width:32px; height:32px; border:1px solid var(--hair); border-radius:9px; background:var(--surface-2); color:var(--text-2); cursor:pointer; font-size:20px; line-height:1; transition:color .2s, border-color .2s; }
.icon-btn:hover { color:var(--text); border-color:var(--hair-2); }

/* ---------- Responsive ---------- */
@media (max-width:1100px) { .detail { grid-template-columns:1fr; } .daypane { max-height:none; } }
@media (max-width:980px) {
  .app { grid-template-columns:1fr; }
  .sidebar { position:fixed; left:0; top:0; z-index:70; width:280px; height:100dvh; transform:translateX(-100%); transition:transform .4s var(--ease); box-shadow:var(--shadow-lg); }
  body.nav-open .sidebar { transform:none; }
  .mobilebar { display:flex; align-items:center; gap:14px; height:58px; padding:0 18px; position:sticky; top:0; z-index:40; border-bottom:1px solid var(--hair); background:color-mix(in srgb,var(--bg) 85%,transparent); backdrop-filter:blur(14px); }
  .brand--mobile { padding:0; font-size:14.5px; color:var(--text); }
  .brand--mobile .brand__name { color:var(--text); }
  .hamburger { display:inline-flex; flex-direction:column; justify-content:center; gap:5px; width:38px; height:38px; padding:9px; border:1px solid var(--hair-2); border-radius:9px; background:var(--surface-2); cursor:pointer; }
  .hamburger span { display:block; height:2px; border-radius:2px; background:var(--text); transition:transform .35s var(--ease), opacity .25s; }
  body.nav-open .hamburger span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
  body.nav-open .hamburger span:nth-child(2) { opacity:0; }
  body.nav-open .hamburger span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }
  .scrim { display:block; position:fixed; inset:0; z-index:60; background:rgba(10,12,16,.5); backdrop-filter:blur(2px); opacity:0; pointer-events:none; transition:opacity .3s; }
  body.nav-open .scrim { opacity:1; pointer-events:auto; }
  .shell { padding:26px 20px 70px; } .cols { grid-template-columns:1fr; } .statstrip { grid-template-columns:1fr; } .formrow { grid-template-columns:1fr; }
}
@media (max-width:560px) {
  .shell { padding:22px 15px 60px; } .pagehead { align-items:flex-start; }
  .table { display:block; overflow-x:auto; white-space:nowrap; }
}
@media (prefers-reduced-motion: reduce) { * { animation-duration:.01ms!important; transition-duration:.01ms!important; } }
