/* VAULTIX — design system.
   Direction: a private vault. Obsidian graphite surfaces, one brass accent (the dial of a safe), precise hairlines,
   calm motion. Hebrew first (RTL), mobile first. One type scale, one radius scale, one icon set (1.8 stroke). */
@font-face { font-family: 'Assistant'; src: url('/fonts/Assistant.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }

:root {
  --bg: #0A0C10; --bg2: #0E1116; --s1: #12151B; --s2: #171B22; --s3: #1D222B; --s4: #252B36;
  --line: rgba(255,255,255,.07); --line2: rgba(255,255,255,.12); --hi: rgba(255,255,255,.045);
  --text: #ECEFF4; --soft: #C2C9D5; --mute: #8C95A6; --faint: #5B6373;
  --acc: #E8B04B; --acc2: #F4D17E; --acc-deep: #9C6C17; --acc-ink: #1B1204; --acc-wash: rgba(232,176,75,.12); --acc-line: rgba(232,176,75,.38);
  --ok: #3DD68C; --ok-wash: rgba(61,214,140,.12); --err: #FF5D6C; --err-wash: rgba(255,93,108,.12); --info: #6FA8FF; --info-wash: rgba(111,168,255,.12);
  --t-image: #4FD1C5; --t-video: #FF8A5B; --t-audio: #B48CFF; --t-pdf: #FF6B7A; --t-zip: #E8B04B; --t-code: #6FA8FF; --t-doc: #8DB6FF; --t-sheet: #3DD68C; --t-text: #C2C9D5; --t-file: #8C95A6;
  --r-xs: 8px; --r-s: 11px; --r-m: 14px; --r-l: 18px; --r-xl: 24px;
  --shadow: 0 24px 60px -28px rgba(0,0,0,.85);
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: hidden; }
body { font-family: 'Assistant', system-ui, sans-serif; font-size: 15.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; min-height: 100vh; min-height: 100dvh; overscroll-behavior-y: none; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(900px 520px at 100% -10%, rgba(232,176,75,.07), transparent 70%), radial-gradient(700px 520px at -10% 110%, rgba(111,168,255,.045), transparent 70%); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
::selection { background: var(--acc-wash); color: var(--text); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; border-radius: 8px; }
* { scrollbar-width: thin; scrollbar-color: var(--s4) transparent; }
::-webkit-scrollbar { width: 9px; height: 9px; } ::-webkit-scrollbar-thumb { background: var(--s4); border-radius: 9px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }
svg { display: block; flex: none; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.num, .ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--mute); }

/* ---------- logo: the dial of a vault ---------- */
.logo { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; position: relative;
  background: radial-gradient(circle at 50% 35%, #2A2F38, #15181E 70%); border: 1px solid var(--acc-line); box-shadow: inset 0 1px 0 var(--hi), 0 8px 20px -10px rgba(232,176,75,.5); }
.logo svg { width: 26px; height: 26px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--text); font-weight: 800; font-size: 19px; letter-spacing: .6px; min-width: 0; }
.brand:hover { text-decoration: none; }
.brand b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-size: 12px; letter-spacing: 0; font-weight: 600; color: var(--mute); margin-top: -3px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--r-m); font-weight: 700; font-size: 15px; white-space: nowrap;
  transition: background .18s, border-color .18s, color .18s, transform .12s, box-shadow .18s, opacity .18s; user-select: none; }
.btn .ic { width: 19px; height: 19px; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.busy { opacity: .5; pointer-events: none; }
.btn-acc { color: var(--acc-ink); background: linear-gradient(180deg, var(--acc2), var(--acc)); box-shadow: inset 0 1px 0 rgba(255,255,255,.4), 0 1px 0 var(--acc-deep), 0 10px 24px -12px rgba(232,176,75,.7); }
.btn-acc:hover { filter: brightness(1.05); text-decoration: none; }
.btn-soft { background: var(--s3); border: 1px solid var(--line2); color: var(--text); box-shadow: inset 0 1px 0 var(--hi); }
.btn-soft:hover { border-color: var(--acc-line); text-decoration: none; }
.btn-ghost { color: var(--soft); }
.btn-ghost:hover { color: var(--text); background: var(--s2); }
.btn-danger { color: #fff; background: linear-gradient(180deg, #FF7280, var(--err)); box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 10px 24px -14px var(--err); }
.btn-danger-soft { color: var(--err); background: var(--err-wash); border: 1px solid rgba(255,93,108,.28); }
.btn-ok { color: #04140B; background: linear-gradient(180deg, #6BE6A9, var(--ok)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.btn-sm { min-height: 36px; padding: 0 13px; border-radius: var(--r-s); font-size: 14px; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 16.5px; border-radius: var(--r-m); }
.btn-w { width: 100%; }
.btn .spin { width: 18px; height: 18px; border-radius: 50%; border: 2.4px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.iconbtn { width: 40px; height: 40px; border-radius: var(--r-s); display: grid; place-items: center; color: var(--soft); transition: background .15s, color .15s, transform .12s; flex: none; position: relative; }
.iconbtn:hover { background: var(--s3); color: var(--text); }
.iconbtn:active { transform: scale(.94); }
.iconbtn.on { color: var(--acc); background: var(--acc-wash); }
.iconbtn .dot { position: absolute; top: 7px; left: 7px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: var(--acc); color: var(--acc-ink); font-size: 10.5px; font-weight: 800; display: grid; place-items: center; }

/* ---------- inputs ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13.5px; font-weight: 700; color: var(--soft); margin: 0 2px 7px; }
.input { width: 100%; height: 48px; padding: 0 14px; border-radius: var(--r-m); background: var(--bg2); border: 1px solid var(--line2); color: var(--text); font-size: 16px; caret-color: var(--acc); transition: border-color .18s, box-shadow .18s, background .18s; }
textarea.input { height: auto; min-height: 84px; padding: 12px 14px; resize: vertical; line-height: 1.5; }
.input::placeholder { color: var(--faint); }
.input:hover { border-color: rgba(255,255,255,.18); }
.input:focus { outline: none; border-color: var(--acc); box-shadow: 0 0 0 4px var(--acc-wash); background: var(--s1); }
.input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px var(--bg2) inset; -webkit-text-fill-color: var(--text); caret-color: var(--acc); }
.input.bad { border-color: var(--err); box-shadow: 0 0 0 4px var(--err-wash); }
.pw { position: relative; }
.pw .input { padding-left: 48px; }
.pw .eye { position: absolute; left: 4px; top: 4px; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--mute); }
.pw .eye:hover { color: var(--text); background: var(--s3); }
.ferr { display: block; min-height: 18px; color: var(--err); font-size: 13.5px; font-weight: 700; margin: 6px 2px 0; }
.hint { color: var(--mute); font-size: 13px; margin: 6px 2px 0; }
.search { position: relative; }
.search .ic { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--mute); pointer-events: none; }
input[type=search]::-webkit-search-cancel-button, input[type=search]::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search .input { height: 40px; padding-right: 38px; border-radius: var(--r-s); font-size: 14.5px; background: var(--s1); }
.search .clear { position: absolute; left: 4px; top: 4px; width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: var(--mute); }
.search .clear:hover { color: var(--text); background: var(--s3); }

/* switch */
.sw { position: relative; width: 46px; height: 28px; flex: none; display: inline-block; }
.sw input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; appearance: none; -webkit-appearance: none; }
.sw i { position: absolute; inset: 0; border-radius: 99px; background: var(--s4); border: 1px solid var(--line2); transition: background .2s, border-color .2s; }
.sw i::after { content: ''; position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: #9AA3B2; box-shadow: 0 2px 5px rgba(0,0,0,.4); transition: transform .22s var(--ease), background .2s; }
.sw input:checked + i { background: linear-gradient(180deg, var(--acc2), var(--acc)); border-color: transparent; }
.sw input:checked + i::after { transform: translateX(-18px); background: #fff; }
.sw input:focus-visible + i { outline: 2px solid var(--acc); outline-offset: 2px; }
.sw input:disabled + i { opacity: .45; }
/* segmented choice */
.seg { display: inline-flex; padding: 3px; gap: 2px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.seg button { min-height: 34px; padding: 0 13px; border-radius: 9px; font-weight: 700; font-size: 14px; color: var(--mute); transition: background .15s, color .15s; display: inline-flex; align-items: center; gap: 6px; }
.seg button .ic { width: 17px; height: 17px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--s4); color: var(--text); box-shadow: inset 0 1px 0 var(--hi), 0 2px 6px rgba(0,0,0,.35); }
.seg.acc button.on { background: var(--acc-wash); color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }

/* chips and badges */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 12.5px; font-weight: 800; background: var(--s3); color: var(--soft); border: 1px solid var(--line); white-space: nowrap; }
.chip .ic { width: 14px; height: 14px; }
.chip.acc { color: var(--acc); background: var(--acc-wash); border-color: var(--acc-line); }
.chip.ok { color: var(--ok); background: var(--ok-wash); border-color: rgba(61,214,140,.3); }
.chip.err { color: var(--err); background: var(--err-wash); border-color: rgba(255,93,108,.3); }
.chip.info { color: var(--info); background: var(--info-wash); border-color: rgba(111,168,255,.3); }

/* cards */
.card { background: linear-gradient(180deg, var(--s2), var(--s1)); border: 1px solid var(--line); border-radius: var(--r-l); box-shadow: inset 0 1px 0 var(--hi); }
.bar { height: 6px; border-radius: 6px; background: var(--s4); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(270deg, var(--acc2), var(--acc)); transition: width .4s var(--ease); }
.bar.warn i { background: linear-gradient(270deg, #FFB86B, #FF8A5B); }
.bar.full i { background: var(--err); }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--s2) 0%, var(--s3) 40%, var(--s2) 80%); background-size: 300% 100%; animation: sk 1.3s linear infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -200% 0; } }

/* ---------- toast ---------- */
.toasts { position: fixed; z-index: 120; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(460px, calc(100% - 24px)); }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 14px; border-radius: var(--r-m); background: var(--s3); border: 1px solid var(--line2); box-shadow: inset 0 1px 0 var(--hi), 0 18px 44px -14px rgba(0,0,0,.8);
  font-weight: 700; font-size: 14.5px; animation: tIn .28s var(--ease) both; }
.toast.out { animation: tOut .2s ease both; }
.toast .ti { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--acc-wash); color: var(--acc); flex: none; }
.toast .ti .ic { width: 17px; height: 17px; }
.toast.ok .ti { background: var(--ok-wash); color: var(--ok); }
.toast.err .ti { background: var(--err-wash); color: var(--err); }
.toast span { flex: 1; min-width: 0; }
.toast button { color: var(--acc); font-weight: 800; padding: 6px 8px; border-radius: 8px; }
@keyframes tIn { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes tOut { to { opacity: 0; transform: translateY(8px); } }

/* ---------- sheet / modal ---------- */
.layer { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; background: rgba(3,5,8,.62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: fade .18s ease both; }
.layer.out { animation: fadeOut .18s ease both; }
@keyframes fade { from { opacity: 0; } } @keyframes fadeOut { to { opacity: 0; } }
.sheet { width: min(540px, 100%); max-height: calc(100% - 20px); overflow: auto; overscroll-behavior: contain; background: linear-gradient(180deg, var(--s3), var(--s2) 140px); border: 1px solid var(--line2); border-bottom: 0;
  border-radius: 26px 26px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); box-shadow: inset 0 1px 0 var(--hi), 0 -24px 60px -20px rgba(0,0,0,.7); animation: up .3s var(--ease) both; }
.layer.out .sheet { animation: down .2s ease both; }
@keyframes up { from { transform: translateY(40px); opacity: .5; } } @keyframes down { to { transform: translateY(30px); opacity: 0; } }
.sheet .grab { width: 42px; height: 5px; border-radius: 5px; background: var(--s4); margin: 0 auto 14px; }
.sheet .sh { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.sheet .sh .si { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--acc-wash); color: var(--acc); flex: none; }
.sheet .sh .si.err { background: var(--err-wash); color: var(--err); }
.sheet .sh .si .ic { width: 22px; height: 22px; }
.sheet .sh .st { flex: 1; min-width: 0; padding-top: 1px; }
.sheet h3 { margin: 0; font-size: 20px; line-height: 1.25; letter-spacing: -.2px; }
.sheet .sh p { margin: 4px 0 0; color: var(--mute); font-size: 14.5px; line-height: 1.5; overflow-wrap: anywhere; }
.sheet .acts { display: flex; gap: 10px; margin-top: 18px; }
.sheet .acts .btn { flex: 1; }
.sheet.wide { width: min(760px, 100%); }
@media (min-width: 720px) {
  .layer { align-items: center; padding: 24px; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--line2); padding: 22px 24px 22px; max-height: calc(100% - 48px); box-shadow: inset 0 1px 0 var(--hi), 0 40px 90px -30px rgba(0,0,0,.85); }
  .sheet .grab { display: none; }
}
/* action list inside a sheet (the menu of a file on a phone) */
.alist { display: flex; flex-direction: column; gap: 2px; margin: 0 -8px; }
.alist button { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 12px; border-radius: 12px; text-align: start; font-weight: 700; font-size: 15.5px; color: var(--text); transition: background .12s; }
.alist button:hover, .alist button:focus-visible { background: var(--s4); }
.alist button .ic { width: 21px; height: 21px; color: var(--soft); }
.alist button.danger, .alist button.danger .ic { color: var(--err); }
.alist hr { border: 0; height: 1px; background: var(--line); margin: 6px 12px; }
/* popover menu (desktop) */
.pop { position: fixed; z-index: 110; min-width: 220px; padding: 6px; border-radius: 14px; background: var(--s3); border: 1px solid var(--line2); box-shadow: inset 0 1px 0 var(--hi), 0 24px 50px -16px rgba(0,0,0,.85); animation: popIn .14s var(--ease) both; }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.pop button { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 38px; padding: 0 11px; border-radius: 9px; text-align: start; font-weight: 600; font-size: 14.5px; color: var(--text); }
.pop button:hover, .pop button:focus-visible { background: var(--s4); outline: none; }
.pop button .ic { width: 18px; height: 18px; color: var(--soft); }
.pop button.danger, .pop button.danger .ic { color: var(--err); }
.pop button .kb { margin-inline-start: auto; font-size: 12px; color: var(--faint); direction: ltr; }
.pop hr { border: 0; height: 1px; background: var(--line); margin: 5px 6px; }

/* ---------- the file manager ---------- */
.fm { display: flex; flex-direction: column; min-height: 0; }
.fm-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.spaces { display: flex; gap: 6px; }
.space { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 12px; font-weight: 700; font-size: 14.5px; color: var(--mute); border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.space .ic { width: 18px; height: 18px; }
.space:hover { color: var(--text); background: var(--s2); }
.space.on { color: var(--text); background: var(--s3); border-color: var(--line2); box-shadow: inset 0 1px 0 var(--hi); }
.space.on .ic { color: var(--acc); }
.fm-tools { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.fm-tools .search { width: 230px; }
.crumbs { display: flex; align-items: center; gap: 2px; min-width: 0; flex: 1; overflow-x: auto; scrollbar-width: none; mask-image: linear-gradient(270deg, #000 92%, transparent); -webkit-mask-image: linear-gradient(270deg, #000 92%, transparent); }
.crumbs::-webkit-scrollbar { display: none; }
.crumbs button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 9px; border-radius: 9px; font-weight: 700; font-size: 15px; color: var(--mute); white-space: nowrap; flex: none; transition: background .15s, color .15s; }
.crumbs button:hover { background: var(--s2); color: var(--text); }
.crumbs button:last-child { color: var(--text); }
.crumbs button .ic { width: 17px; height: 17px; }
.crumbs .sep { color: var(--faint); flex: none; } .crumbs .sep .ic { width: 15px; height: 15px; transform: scaleX(-1); }
.crumbs button.drop { background: var(--acc-wash); color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
.fm-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; min-height: 40px; }
.fm-bar .back { display: none; }
.fm-actions { display: flex; align-items: center; gap: 6px; flex: none; }

.list { border-radius: var(--r-l); background: var(--s1); border: 1px solid var(--line); overflow: hidden; box-shadow: inset 0 1px 0 var(--hi); }
.lhead { display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 140px 48px; align-items: center; height: 40px; padding: 0 10px; border-bottom: 1px solid var(--line); color: var(--mute); font-size: 12.5px; font-weight: 800; }
.lhead button { display: inline-flex; align-items: center; gap: 4px; color: inherit; font-weight: 800; height: 28px; padding: 0 6px; border-radius: 7px; justify-self: start; }
.lhead button:hover { color: var(--text); background: var(--s3); }
.lhead button .ic { width: 14px; height: 14px; }
.lhead button.on { color: var(--acc); }
.row { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr) 110px 140px 48px; align-items: center; min-height: 58px; padding: 0 10px; border-bottom: 1px solid var(--line); cursor: default; transition: background .12s; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.row:last-child { border-bottom: 0; }
.row:hover { background: var(--s2); }
.row.sel { background: var(--acc-wash); }
.row.sel::before { content: ''; position: absolute; inset-block: 0; right: 0; width: 3px; background: var(--acc); }
.row.drop { background: var(--acc-wash); box-shadow: inset 0 0 0 1.5px var(--acc); }
.row.dragging { opacity: .45; }
.row.fresh { animation: fresh 1.6s ease; }
@keyframes fresh { 0%, 30% { background: var(--acc-wash); } }
.row .ck { width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid var(--line2); display: grid; place-items: center; color: transparent; transition: background .12s, border-color .12s, color .12s; justify-self: center; }
.row .ck .ic { width: 14px; height: 14px; stroke-width: 3; }
.row:hover .ck { border-color: var(--mute); }
.row.sel .ck { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.row .nm { display: flex; align-items: center; gap: 12px; min-width: 0; padding-inline-end: 10px; cursor: pointer; }
.ft { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; color: var(--c, var(--t-file)); background: color-mix(in srgb, var(--c, var(--t-file)) 13%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c, var(--t-file)) 22%, transparent); position: relative; overflow: hidden; }
.ft .ic { width: 20px; height: 20px; }
.ft.dir { --c: var(--acc); }
.ft img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ft .ext { position: absolute; bottom: 2px; font-size: 8.5px; font-weight: 800; letter-spacing: .3px; text-transform: uppercase; line-height: 1; }
.row .tx { min-width: 0; }
.row .tx b { display: block; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: auto; unicode-bidi: plaintext; text-align: right; }
.row .tx small { display: none; color: var(--mute); font-size: 12.5px; }
.row .c-size, .row .c-date { color: var(--mute); font-size: 13.5px; white-space: nowrap; text-align: right; padding-inline-start: 6px; overflow: hidden; text-overflow: ellipsis; }
.row .more { justify-self: center; }
.row .more .iconbtn { width: 36px; height: 36px; opacity: .65; }
.row:hover .more .iconbtn, .row .more .iconbtn:focus-visible { opacity: 1; }

/* grid view */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tile { position: relative; display: flex; flex-direction: column; border-radius: var(--r-m); background: var(--s1); border: 1px solid var(--line); overflow: hidden; cursor: pointer; transition: border-color .15s, transform .12s, background .15s; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.tile:hover { border-color: var(--line2); background: var(--s2); }
.tile.sel { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.tile.drop { border-color: var(--acc); background: var(--acc-wash); }
.tile .pv { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bg2); border-bottom: 1px solid var(--line); position: relative; overflow: hidden; }
.tile .pv img { width: 100%; height: 100%; object-fit: cover; }
.tile .pv .ft { width: 54px; height: 54px; border-radius: 16px; }
.tile .pv .ft .ic { width: 27px; height: 27px; }
.tile .tt { padding: 9px 11px 10px; min-width: 0; }
.tile .tt b { display: block; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: right; }
.tile .tt small { color: var(--mute); font-size: 12px; }
.tile .ck { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 8px; background: rgba(10,12,16,.7); border: 1.6px solid rgba(255,255,255,.35); display: grid; place-items: center; color: transparent; opacity: 0; transition: opacity .12s; }
.tile .ck .ic { width: 14px; height: 14px; stroke-width: 3; }
.tile:hover .ck, .tile.sel .ck, .fm.selecting .tile .ck { opacity: 1; }
.tile.sel .ck { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }

/* empty / error */
.empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 54px 20px; }
.empty .art { width: 120px; height: 120px; margin-bottom: 16px; }
.empty b { font-size: 18px; } .empty p { margin: 6px 0 18px; color: var(--mute); max-width: 360px; }
.empty .row-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* selection bar */
.selbar { position: fixed; z-index: 60; left: 50%; bottom: calc(16px + env(safe-area-inset-bottom)); transform: translate(-50%, 0); display: flex; align-items: center; gap: 4px; padding: 6px; border-radius: 18px;
  background: color-mix(in srgb, var(--s3) 92%, transparent); border: 1px solid var(--line2); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); box-shadow: inset 0 1px 0 var(--hi), 0 24px 50px -16px rgba(0,0,0,.85); animation: selIn .22s var(--ease) both; max-width: calc(100% - 20px); }
@keyframes selIn { from { opacity: 0; transform: translate(-50%, 16px); } }
.selbar .cnt { padding: 0 12px 0 8px; font-weight: 800; font-size: 14.5px; white-space: nowrap; }
.selbar .btn { min-height: 40px; padding: 0 12px; border-radius: 12px; }
.selbar .sep { width: 1px; height: 24px; background: var(--line2); margin: 0 2px; }

/* drop overlay */
.dropzone { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(10,12,16,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); pointer-events: none; animation: fade .15s ease both; }
.dropzone .dz { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 40px 56px; border-radius: 28px; border: 2px dashed var(--acc); background: var(--acc-wash); color: var(--acc); font-weight: 800; font-size: 20px; text-align: center; }
.dropzone .dz .ic { width: 48px; height: 48px; }
.dropzone .dz small { color: var(--soft); font-weight: 600; font-size: 14.5px; }

/* upload-only mode */
.uponly { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; border-radius: var(--r-xl); border: 2px dashed var(--line2); background: var(--s1); transition: border-color .2s, background .2s; cursor: pointer; }
.uponly:hover, .uponly.over { border-color: var(--acc); background: var(--acc-wash); }
.uponly .art { width: 96px; height: 96px; margin-bottom: 10px; }
.uponly b { font-size: 20px; } .uponly p { margin: 6px 0 18px; color: var(--mute); max-width: 380px; }

/* ---------- the upload panel ---------- */
.uppanel { position: fixed; z-index: 70; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 380px; max-width: calc(100% - 24px); border-radius: 20px; background: var(--s2); border: 1px solid var(--line2);
  box-shadow: inset 0 1px 0 var(--hi), 0 30px 70px -20px rgba(0,0,0,.9); overflow: hidden; animation: up .28s var(--ease) both; }
.uppanel .uh { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 8px; }
.uppanel .uh .ring { width: 38px; height: 38px; flex: none; position: relative; }
.uppanel .uh .ring svg { width: 38px; height: 38px; transform: rotate(-90deg); }
.uppanel .uh .ring .t { stroke: var(--s4); } .uppanel .uh .ring .b { stroke: var(--acc); transition: stroke-dashoffset .3s; }
.uppanel .uh .ring .ic { position: absolute; inset: 0; margin: auto; width: 17px; height: 17px; color: var(--acc); }
.uppanel .uh .ring.done .b { stroke: var(--ok); } .uppanel .uh .ring.done .ic { color: var(--ok); }
.uppanel .uh .ut { flex: 1; min-width: 0; padding-inline-start: 4px; }
.uppanel .uh .ut b { display: block; font-size: 15px; }
.uppanel .uh .ut small { color: var(--mute); font-size: 12.5px; }
.uppanel .ub { max-height: 290px; overflow: auto; border-top: 1px solid var(--line); }
.uppanel.min .ub { display: none; }
.uitem { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--line); }
.uitem:last-child { border-bottom: 0; }
.uitem .ft { width: 32px; height: 32px; border-radius: 9px; } .uitem .ft .ic { width: 17px; height: 17px; }
.uitem .ui { flex: 1; min-width: 0; }
.uitem .ui b { display: block; font-size: 13.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: right; }
.uitem .ui small { display: block; color: var(--mute); font-size: 12px; }
.uitem .ui small.err { color: var(--err); }
.uitem .ui .bar { height: 4px; margin-top: 5px; }
.uitem .st { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--mute); flex: none; }
.uitem .st.ok { color: var(--ok); } .uitem .st .ic { width: 18px; height: 18px; }
.uitem button.st:hover { background: var(--s4); color: var(--text); }

/* ---------- previews ---------- */
.viewer { position: fixed; inset: 0; z-index: 105; display: flex; flex-direction: column; background: rgba(5,6,9,.96); animation: fade .18s ease both; }
.viewer .vh { display: flex; align-items: center; gap: 8px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px; }
.viewer .vh .vt { flex: 1; min-width: 0; }
.viewer .vh .vt b { display: block; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; unicode-bidi: plaintext; text-align: right; }
.viewer .vh .vt small { color: var(--mute); font-size: 12.5px; }
.viewer .vh .iconbtn { color: var(--soft); }
.viewer .vb { flex: 1; min-height: 0; display: grid; place-items: center; position: relative; padding: 8px 12px calc(16px + env(safe-area-inset-bottom)); }
.viewer .vb img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; box-shadow: 0 30px 80px -30px #000; }
.viewer .vb iframe { width: min(1000px, 100%); height: 100%; border: 0; border-radius: 12px; background: #fff; }
.viewer .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(23,27,34,.82); border: 1px solid var(--line2); color: var(--text); }
.viewer .nav:hover { background: var(--s4); }
.viewer .nav.prev { right: 14px; } .viewer .nav.next { left: 14px; }
.viewer .nav.next .ic { transform: scaleX(-1); }
.viewer .nav.prev .ic { transform: none; }
.textview { width: min(980px, 100%); height: 100%; overflow: auto; margin: 0; padding: 18px 20px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); color: var(--soft); font: 13.5px/1.65 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word; direction: ltr; text-align: left; unicode-bidi: plaintext; }
.noprev { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; }
.noprev .ft { width: 84px; height: 84px; border-radius: 24px; margin-bottom: 10px; } .noprev .ft .ic { width: 40px; height: 40px; }
.noprev b { font-size: 19px; } .noprev p { color: var(--mute); margin: 0 0 14px; }
/* the media player (no browser controls) */
.player { width: min(1000px, 100%); display: flex; flex-direction: column; gap: 0; border-radius: 16px; overflow: hidden; background: #000; border: 1px solid var(--line); position: relative; }
.player video { width: 100%; max-height: calc(100vh - 220px); max-height: calc(100dvh - 220px); display: block; background: #000; }
.player.audio { background: linear-gradient(180deg, var(--s2), var(--s1)); }
.player .art { display: grid; place-items: center; padding: 34px 20px 16px; }
.player .art .ft { width: 96px; height: 96px; border-radius: 28px; } .player .art .ft .ic { width: 44px; height: 44px; }
.pctl { display: flex; align-items: center; gap: 10px; padding: 10px 14px 12px; background: linear-gradient(0deg, rgba(10,12,16,.96), rgba(10,12,16,.75)); direction: ltr; }
.pctl .iconbtn { width: 38px; height: 38px; color: var(--text); }
.pctl .play { width: 44px; height: 44px; border-radius: 50%; background: var(--acc); color: var(--acc-ink); }
.pctl .play:hover { background: var(--acc2); color: var(--acc-ink); }
.pctl .tm { font-size: 12.5px; color: var(--soft); font-variant-numeric: tabular-nums; min-width: 92px; text-align: center; }
.seek { position: relative; flex: 1; height: 28px; cursor: pointer; touch-action: none; }
.seek::before { content: ''; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.16); }
.seek .buf { position: absolute; left: 0; top: 12px; height: 4px; border-radius: 4px; background: rgba(255,255,255,.28); }
.seek .fill { position: absolute; left: 0; top: 12px; height: 4px; border-radius: 4px; background: var(--acc); }
.seek .knob { position: absolute; top: 7px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); transform: scale(0); transition: transform .12s; }
.seek:hover .knob, .seek.drag .knob { transform: scale(1); }

/* ---------- utility layout ---------- */
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 18px; }
.topbar { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 64px; padding-top: env(safe-area-inset-top); }
.topbar .sp { flex: 1; }
.usage { display: flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); min-width: 0; }
.usage .ur { width: 32px; height: 32px; position: relative; flex: none; }
.usage .ur svg { width: 32px; height: 32px; transform: rotate(-90deg); }
.usage .ur .t { stroke: var(--s4); } .usage .ur .b { stroke: var(--acc); }
.usage b { display: block; font-size: 13px; line-height: 1.2; white-space: nowrap; }
.usage small { display: block; font-size: 11.5px; color: var(--mute); white-space: nowrap; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 16px; color: var(--acc-ink); background: linear-gradient(135deg, var(--acc2), var(--acc)); flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.4); }
.me-btn { display: inline-flex; align-items: center; gap: 9px; padding: 4px 4px 4px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--s1); font-weight: 700; font-size: 14.5px; transition: border-color .15s; max-width: 220px; }
.me-btn:hover { border-color: var(--line2); }
.me-btn span:not(.avatar) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-btn .avatar { width: 32px; height: 32px; border-radius: 10px; font-size: 14px; }
.foot { text-align: center; color: var(--faint); font-size: 13px; padding: 28px 0 34px; }
.foot a { color: var(--mute); }
.foot a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .lhead { display: none; }
  .row { grid-template-columns: 38px minmax(0, 1fr) 44px; min-height: 64px; padding: 0 6px 0 4px; }
  .row .c-size, .row .c-date { display: none; }
  .row .tx small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .row .ck { width: 20px; height: 20px; opacity: 0; transition: opacity .15s; }
  .fm.selecting .row .ck, .row.sel .ck { opacity: 1; }
  .row:hover { background: transparent; }
  .row.sel { background: var(--acc-wash); }
  .fm-tools .search { width: auto; flex: 1; }
}
@media (max-width: 640px) {
  .wrap { padding: 0 12px; }
  .topbar .wrap { height: 58px; gap: 8px; }
  .usage { padding: 5px; } .usage .ut { display: none; }
  .me-btn { padding: 3px; } .me-btn span:not(.avatar) { display: none; }
  .fm-head { gap: 8px; }
  .spaces { width: 100%; }
  .space { flex: 1; justify-content: center; }
  .fm-tools { width: 100%; margin: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .uppanel { left: 8px; right: 8px; width: auto; max-width: none; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .selbar { left: 8px; right: 8px; transform: none; justify-content: space-between; animation: none; }
  .selbar .btn span { display: none; }
  .selbar .btn { padding: 0 11px; }
  .viewer .nav { width: 42px; height: 42px; }
  .fab { display: grid !important; }
  .fm-actions .up-btn { display: none; }
}
.fab { display: none; position: fixed; z-index: 55; left: 16px; bottom: calc(18px + env(safe-area-inset-bottom)); width: 60px; height: 60px; border-radius: 20px; place-items: center; color: var(--acc-ink); background: linear-gradient(180deg, var(--acc2), var(--acc));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), 0 2px 0 var(--acc-deep), 0 18px 34px -12px rgba(232,176,75,.75); transition: transform .15s; }
.fm.selecting .fab { display: none !important; }
.fab .ic { width: 26px; height: 26px; stroke-width: 2.2; }
.fab:active { transform: scale(.94); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- the sign-in page ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); }
.auth-art { position: relative; overflow: hidden; border-left: 1px solid var(--line); background: radial-gradient(800px 600px at 50% 30%, rgba(232,176,75,.10), transparent 65%), linear-gradient(180deg, #0D1015, #090B0E); display: flex; align-items: center; justify-content: center; padding: 48px; }
.auth-art::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.05) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: radial-gradient(closest-side, #000, transparent); -webkit-mask-image: radial-gradient(closest-side, #000, transparent); pointer-events: none; }
.aa-in { position: relative; z-index: 1; width: min(440px, 100%); }
.aa-in .brand { font-size: 21px; margin-bottom: 36px; }
.dial { width: 300px; height: 300px; margin: 0 auto 34px; filter: drop-shadow(0 40px 60px rgba(0,0,0,.6)); }
.dial svg { width: 100%; height: 100%; }
.dial .spinr { transform-origin: 150px 150px; animation: dial 18s cubic-bezier(.6,0,.4,1) infinite; }
@keyframes dial { 0% { transform: rotate(0); } 30% { transform: rotate(72deg); } 55% { transform: rotate(-36deg); } 80% { transform: rotate(108deg); } 100% { transform: rotate(0); } }
.aa-in h2 { font-size: 38px; line-height: 1.1; letter-spacing: -.8px; margin: 0 0 26px; font-weight: 800; }
.aa-in h2 em { font-style: normal; color: var(--acc); }
.feats { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.feats li { display: flex; gap: 14px; align-items: flex-start; }
.feats li > .ic { width: 38px; height: 38px; padding: 9px; border-radius: 12px; background: var(--acc-wash); color: var(--acc); box-shadow: inset 0 0 0 1px var(--acc-line); }
.feats b { display: block; font-size: 15.5px; } .feats span { color: var(--mute); font-size: 14px; line-height: 1.45; }
.auth-main { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px 24px 0; }
.auth-card { width: min(420px, 100%); }
.auth-card .only-m { display: none; }
.auth-card .tabs { display: flex; margin-bottom: 30px; } .auth-card .tabs button { flex: 1; justify-content: center; min-height: 40px; font-size: 15px; }
.auth-card h1 { margin: 0 0 6px; font-size: 30px; letter-spacing: -.6px; line-height: 1.15; }
.auth-card .lead { margin: 0 0 24px; color: var(--mute); font-size: 15.5px; }
.auth-card form .btn-lg { margin-top: 6px; }
.auth-card .alt { text-align: center; color: var(--mute); margin: 20px 0 0; font-size: 14.5px; }
.link { color: var(--acc); font-weight: 700; padding: 2px 4px; border-radius: 6px; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
.closed { text-align: center; } .closed .art { width: 110px; height: 110px; margin: 0 auto 10px; display: block; }
.auth .foot { margin-top: auto; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .auth-main { justify-content: flex-start; padding-top: max(28px, env(safe-area-inset-top)); }
  .auth-card .only-m { display: flex; justify-content: center; margin: 8px 0 28px; font-size: 21px; }
}
/* waiting, blocked, offline */
.center { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 32px 22px; gap: 4px; }
.center .art { width: 150px; height: 150px; margin-bottom: 18px; }
.center h1 { margin: 14px 0 8px; font-size: 27px; letter-spacing: -.4px; line-height: 1.2; }
.center p { max-width: 460px; margin: 0 0 22px; line-height: 1.6; }
.center .row-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.center .tiny { font-size: 12.5px; margin-top: 16px; }
.pulse { position: relative; }
.pulse::before { content: ''; position: absolute; inset: -6px -6px 12px; border-radius: 50%; border: 2px solid var(--acc-line); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.25); opacity: 0; } }
.boot { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; }
.boot .logo { width: 64px; height: 64px; border-radius: 20px; animation: bootp 1.2s ease-in-out infinite; } .boot .logo svg { width: 42px; height: 42px; }
@keyframes bootp { 50% { transform: scale(.94); opacity: .7; } }
.space.picker { max-width: 100%; } .space.picker span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .space.picker .ic:last-child { color: var(--mute); width: 16px; height: 16px; }

/* ---------- the owner's panel ---------- */
.adm { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-left: 1px solid var(--line); background: linear-gradient(180deg, #0D1015, #0A0C10); }
.side .brand { padding: 4px 6px 18px; }
.brand > span:not(.logo) { min-width: 0; display: block; }
.brand > span b { display: block; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 12px; color: var(--mute); font-weight: 700; font-size: 15px; transition: background .15s, color .15s; position: relative; }
.snav button:hover { color: var(--text); background: var(--s2); }
.snav button.on { color: var(--text); background: var(--s3); box-shadow: inset 0 1px 0 var(--hi), inset 0 0 0 1px var(--line); }
.snav button.on .ic { color: var(--acc); }
.snav button.on::before { content: ''; position: absolute; right: -14px; top: 10px; bottom: 10px; width: 3px; border-radius: 3px 0 0 3px; background: var(--acc); }
.badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 99px; background: var(--acc); color: var(--acc-ink); font-style: normal; font-size: 12px; font-weight: 800; display: grid; place-items: center; }
.sfoot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.sfoot .btn { justify-content: flex-start; }
.amain { min-width: 0; }
.atop { display: none; }
/* opacity only: a transform here would trap the fixed buttons (upload, selection) inside the page */
.aview { width: min(1120px, 100%); margin: 0 auto; padding: 30px 28px 60px; animation: fadeOnly .22s ease; }
@keyframes fadeOnly { from { opacity: 0; } }
.vhead { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.vhead h1 { margin: 0; font-size: 28px; letter-spacing: -.5px; line-height: 1.2; }
.vhead p { margin: 4px 0 0; color: var(--mute); font-size: 14.5px; }
.vacts { margin-inline-start: auto; display: flex; gap: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 16px 18px; text-align: start; color: var(--text); transition: border-color .15s, transform .12s; }
button.stat:hover { border-color: var(--line2); }
button.stat:active { transform: scale(.99); }
.stat .si { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--s4); color: var(--soft); margin-bottom: 10px; }
.stat .si .ic { width: 19px; height: 19px; }
.stat.acc .si { background: var(--acc-wash); color: var(--acc); } .stat.acc { border-color: var(--acc-line); }
.stat.err .si { background: var(--err-wash); color: var(--err); }
.stat .sl { color: var(--mute); font-size: 13.5px; font-weight: 700; }
.stat b { font-size: 30px; line-height: 1.1; letter-spacing: -.5px; }
.stat small { color: var(--mute); font-size: 12.5px; margin-top: 4px; }
.stat .bar { width: 100%; }
.cols { display: grid; grid-template-columns: 1.1fr 1fr; gap: 14px; align-items: start; }
.pane { padding: 16px 18px 18px; }
.pane .ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.pane h2 { margin: 0; font-size: 16.5px; display: flex; align-items: center; gap: 9px; }
.pane h2 .ic { color: var(--acc); width: 19px; height: 19px; }
.empty.sm { padding: 26px 10px; } .empty.sm .art { width: 84px; height: 84px; } .empty.sm b { font-size: 16px; } .empty.sm p { margin-bottom: 0; }
.req { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: var(--r-l); background: var(--s1); border: 1px solid var(--line); }
.reqs { display: grid; gap: 10px; }
.req.compact { padding: 12px 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; }
.req.compact:first-of-type { border-top: 0; }
.uav { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 18px; color: #0A0C10; background: var(--h, var(--acc)); flex: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.uav.big { width: 60px; height: 60px; border-radius: 18px; font-size: 25px; }
.rt { min-width: 0; } .rt b { font-size: 16px; } .rt small { display: block; color: var(--mute); font-size: 13px; }
.rt q, .unote { display: block; margin-top: 8px; padding: 9px 12px; border-radius: 12px; background: var(--s2); border-inline-start: 3px solid var(--acc-line); color: var(--soft); font-size: 14px; quotes: none; overflow-wrap: anywhere; }
.unote { margin: 0 0 14px; }
.ra { display: flex; gap: 8px; }
.ufilters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.ufilters .search { flex: 1; min-width: 200px; max-width: 340px; margin-inline-start: auto; }
.seg .cnt { font-size: 11.5px; color: var(--faint); font-weight: 800; }
.seg button.on .cnt { color: var(--mute); }
.ulist .urow, .list .urow { display: grid; grid-template-columns: 44px minmax(0, 1.3fr) auto minmax(110px, .7fr) auto 20px; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.list .urow:last-child { border-bottom: 0; }
.ulist .urow:hover { background: var(--s2); }
.urow .ut { min-width: 0; } .urow .ut b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .urow .ut small { color: var(--mute); font-size: 12.5px; }
.uperm { display: flex; gap: 3px; }
.uperm i { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: var(--faint); background: var(--s2); }
.uperm i .ic { width: 15px; height: 15px; }
.uperm i.on { color: var(--acc); background: var(--acc-wash); }
.uuse { min-width: 0; font-size: 13.5px; } .uuse small { color: var(--mute); font-size: 12px; margin-inline-start: 4px; } .uuse .bar { height: 4px; margin-top: 5px; }
.urow .chev { color: var(--faint); } .urow .chev .ic { transform: scaleX(-1); width: 18px; height: 18px; }
.uhead { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.uhead h3 { margin: 0 0 5px; font-size: 22px; }
.ufacts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.ufacts span { padding: 10px 12px; border-radius: 12px; background: var(--s1); border: 1px solid var(--line); min-width: 0; }
.ufacts small { display: block; color: var(--mute); font-size: 12px; font-weight: 700; }
.ufacts b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgroup { margin-bottom: 18px; }
.pgroup h4, .subh { margin: 0 0 8px; font-size: 13px; color: var(--mute); font-weight: 800; letter-spacing: .2px; }
.subh { margin-top: 20px; }
.prow { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 14px; background: var(--s1); border: 1px solid var(--line); margin-bottom: 6px; cursor: pointer; transition: border-color .15s; }
.prow:hover { border-color: var(--line2); }
.prow .pi { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--s3); color: var(--soft); flex: none; }
.prow .pi .ic { width: 18px; height: 18px; }
.prow:has(input:checked) .pi { background: var(--acc-wash); color: var(--acc); }
.prow .pt { flex: 1; min-width: 0; } .prow .pt b { display: block; font-size: 15px; } .prow .pt small { display: block; color: var(--mute); font-size: 13px; line-height: 1.4; }
.seg.wide { display: flex; flex-wrap: wrap; } .seg.wide button { flex: 1 1 auto; justify-content: center; }
.qcustom { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--mute); font-size: 14px; font-weight: 700; }
.qcustom .input { width: 120px; height: 40px; text-align: center; }
.note { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--info-wash); color: #B9D3FF; font-size: 13.5px; margin: -4px 0 16px; }
.note .ic { width: 17px; height: 17px; margin-top: 2px; }
.note.warn { background: var(--err-wash); color: #FFB3BB; }
.saved { min-height: 20px; margin: 4px 2px 0; font-size: 13.5px; font-weight: 700; color: var(--mute); display: flex; align-items: center; gap: 6px; }
.saved .ic { width: 16px; height: 16px; }
.saved.ok { color: var(--ok); } .saved.err { color: var(--err); }
.uacts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 16px; border-top: 1px solid var(--line); margin-top: 8px; }
.uacts .btn { flex: 1 1 auto; }
.secret { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: 14px; background: var(--bg2); border: 1px dashed var(--acc-line); }
.secret code { flex: 1; font-size: 22px; font-weight: 800; letter-spacing: 1.5px; color: var(--acc2); user-select: all; font-family: ui-monospace, Menlo, Consolas, monospace; text-align: left; }
.choice { display: grid; gap: 8px; }
.choice label { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line2); background: var(--s1); cursor: pointer; transition: border-color .15s, background .15s; }
.choice label:has(input:checked) { border-color: var(--acc); background: var(--acc-wash); }
.choice input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--mute); margin: 2px 0 0; flex: none; display: grid; place-items: center; }
.choice input:checked { border-color: var(--acc); } .choice input:checked::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--acc); }
.choice input:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.choice b { display: block; } .choice small { display: block; color: var(--mute); font-size: 13px; }
.logl { display: flex; flex-direction: column; }
.card.logl { padding: 4px 16px; }
.lrow { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.lrow:last-child { border-bottom: 0; }
.lrow .li { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--s3); color: var(--soft); }
.lrow .li .ic { width: 16px; height: 16px; }
.lrow .li.ok { background: var(--ok-wash); color: var(--ok); } .lrow .li.err { background: var(--err-wash); color: var(--err); }
.lrow .lt { font-size: 14px; color: var(--soft); min-width: 0; overflow-wrap: anywhere; } .lrow .lt b { color: var(--text); font-weight: 700; }
.lrow .lt small { display: block; color: var(--mute); font-size: 12.5px; }
.lrow time { color: var(--faint); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.day { margin: 22px 4px 8px; font-size: 13.5px; color: var(--mute); font-weight: 800; }
.setgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: start; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv span { color: var(--mute); display: flex; align-items: center; gap: 8px; } .kv span .ic { width: 16px; height: 16px; }
.kv b { font-weight: 700; overflow-wrap: anywhere; text-align: left; }
.sess { margin-bottom: 12px; }
.adm-login .al-card { width: min(420px, 100%); padding: 30px 26px 26px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.adm-login .al-card form { width: 100%; text-align: start; margin-top: 10px; }
.adm-login .al-lock .art { width: 96px; height: 96px; margin-bottom: 6px; }
.adm-login h1 { margin: 12px 0 2px; }
.adm-login .al-card > p { margin-bottom: 18px; }
.bnav { display: none; }
@media (max-width: 1000px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cols, .setgrid { grid-template-columns: 1fr; }
  .ulist .urow { grid-template-columns: 44px minmax(0, 1fr) auto 20px; } .ulist .urow .uperm, .ulist .urow .uuse { display: none; }
}
@media (max-width: 860px) {
  .adm { grid-template-columns: 1fr; }
  .side { display: none; }
  .atop { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 40; height: 58px; padding: env(safe-area-inset-top) 14px 0; background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-bottom: 1px solid var(--line); }
  .atop .sp { flex: 1; } .atop .brand { font-size: 17px; } .atop .brand small { font-size: 11.5px; }
  .aview { padding: 20px 14px calc(100px + env(safe-area-inset-bottom)); }
  .vhead h1 { font-size: 24px; }
  .bnav { display: flex; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--s1) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--line2); }
  .bnav button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px 6px; border-radius: 12px; color: var(--mute); font-size: 12px; font-weight: 700; position: relative; min-height: 54px; justify-content: center; }
  .bnav button .ic { width: 22px; height: 22px; }
  .bnav button.on { color: var(--acc); background: var(--acc-wash); }
  .bnav .badge { position: absolute; top: 3px; left: calc(50% - 22px); min-width: 18px; height: 18px; font-size: 10.5px; padding: 0 5px; }
  .req { grid-template-columns: auto minmax(0, 1fr); } .req .ra { grid-column: 1 / -1; } .req .ra .btn { flex: 1; }
  .ufacts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .uacts .btn { flex: 1 1 calc(50% - 8px); }
  .ufilters .search { max-width: none; margin: 0; width: 100%; }
  .ufilters .seg { width: 100%; } .ufilters .seg button { flex: 1; justify-content: center; padding: 0 6px; }
  .adm .fab { bottom: calc(80px + env(safe-area-inset-bottom)); }
  .is-adm .selbar, .adm .selbar { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .is-adm .uppanel { bottom: calc(76px + env(safe-area-inset-bottom)); }
  .is-adm .toasts { bottom: calc(80px + env(safe-area-inset-bottom)); }
}
@media (max-width: 420px) { .stats { gap: 8px; } .stat { padding: 13px 14px; } .stat b { font-size: 25px; } }

/* ---------- text pages (privacy) ---------- */
.doc { max-width: 820px; padding-top: 40px; padding-bottom: 20px; }
.doc-hero { margin-bottom: 26px; }
.doc-hero h1 { font-size: clamp(30px, 6vw, 44px); line-height: 1.1; letter-spacing: -1px; margin: 14px 0 12px; }
.doc-hero h1 em { font-style: normal; color: var(--acc); }
.doc-hero p { color: var(--soft); font-size: 17px; line-height: 1.65; margin: 0; max-width: 660px; }
.facts3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 30px; }
.facts3 .card { padding: 16px; } .facts3 b { display: block; margin-bottom: 4px; } .facts3 span { color: var(--mute); font-size: 14px; line-height: 1.5; }
.doc section { padding: 22px 0; border-top: 1px solid var(--line); }
.doc h2 { font-size: 21px; margin: 0 0 12px; letter-spacing: -.2px; }
.doc p, .doc li { color: var(--soft); line-height: 1.7; font-size: 15.5px; }
.doc ul { margin: 0; padding-inline-start: 20px; display: grid; gap: 8px; }
.doc li::marker { color: var(--acc); }
.doc b { color: var(--text); }
@media (max-width: 700px) { .facts3 { grid-template-columns: 1fr; } .doc { padding-top: 24px; } }
