@font-face { font-family: 'Geist'; src: url('/assets/fonts/geist.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/assets/fonts/geist-mono.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }

:root {
  --bg: #0a0a0a; --bg-2: #0e0e0e; --panel: #111111; --panel-2: #161616; --hover: #1a1a1a;
  --line: #1f1f1f; --line-2: #2a2a2a; --line-3: #3a3a3a;
  --text: #ededed; --text-2: #b4b4b4; --muted: #8a8a8a; --dim: #5e5e5e; --white: #fafafa;
  --ok: #d4d4d4; --bad: #a3a3a3;
  --r: 10px; --r-lg: 14px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --shadow: 0 1px 0 rgba(255,255,255,.03) inset, 0 20px 60px -20px rgba(0,0,0,.8);
  --side: 248px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 14px/1.5 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; letter-spacing: -0.006em; }
::selection { background: #fafafa; color: #0a0a0a; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, p { margin: 0; }
code, .mono { font-family: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 5px; }
[hidden] { display: none !important; }
.i { width: 16px; height: 16px; flex: none; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .sm { font-size: 12.5px; } .mt { margin-top: 14px; } .pad { padding: 16px 18px; } .pad-l { padding: 22px 24px; } .grow { flex: 1; }
:focus-visible { outline: 2px solid rgba(250,250,250,.5); outline-offset: 2px; }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: #222; border-radius: 10px; border: 2px solid var(--bg); } ::-webkit-scrollbar-track { background: transparent; }

/* Boot */
.boot { min-height: 100vh; display: grid; place-items: center; }
.fatal { display: grid; gap: 8px; text-align: center; justify-items: center; color: var(--muted); }
.fatal strong { color: var(--text); }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid rgba(255,255,255,.15); border-top-color: var(--white); animation: spin .7s linear infinite; }
.spinner.sm { width: 14px; height: 14px; }
.btn-primary .spinner { border-color: rgba(0,0,0,.15); border-top-color: #0a0a0a; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-block { padding: 60px 0; display: grid; place-items: center; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--r); font-weight: 500; font-size: 13.5px; white-space: nowrap;
  transition: background-color .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease), transform .12s var(--ease), opacity .18s; user-select: none; }
.btn:active:not(:disabled) { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.busy { opacity: .85; cursor: progress; }
.btn-primary { background: var(--white); color: #0a0a0a; }
.btn-primary:hover:not(:disabled) { background: #dedede; }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: rgba(255,255,255,.01); }
.btn-ghost:hover:not(:disabled) { background: var(--hover); border-color: var(--line-3); }
.btn-danger { border: 1px solid #3d3d3d; color: #f1f1f1; background: #1c1c1c; }
.btn-danger:hover { background: #262626; border-color: #555; }
.btn-block { width: 100%; height: 44px; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { width: 40px; padding: 0; }
.btn-row { display: flex; gap: 10px; align-items: center; } .btn-row.wrap { flex-wrap: wrap; }
.icon-btn { width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 8px; color: var(--muted); transition: background-color .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.sm { width: 28px; height: 28px; } .icon-btn.danger:hover { color: #fff; background: #262626; }
.linkish { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-3); }
.linkish:hover { text-decoration-color: var(--text); }

/* Inputs */
.field { display: grid; gap: 7px; margin-bottom: 14px; }
.label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field-hint, .hint { font-size: 12px; color: var(--muted); }
.field-hint.ok { color: var(--white); } .field-hint.bad { color: var(--bad); }
.field-hint:empty { display: none; }
.input { width: 100%; height: 42px; padding: 0 13px; border-radius: var(--r); border: 1px solid var(--line-2); background: #0c0c0c; color: var(--text); font: inherit; font-size: 14px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease), background-color .15s; outline: none; }
.input::placeholder { color: var(--dim); }
.input:hover { border-color: var(--line-3); }
.input:focus { border-color: #8a8a8a; box-shadow: 0 0 0 4px rgba(255,255,255,.05); background: #0e0e0e; }
textarea.input { height: auto; padding: 11px 13px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 32px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8a' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-group { position: relative; display: flex; align-items: stretch; }
.input-group .input { flex: 1; min-width: 0; }
.input-suffix { position: absolute; right: 1px; top: 1px; bottom: 1px; display: flex; align-items: center; padding: 0 13px 0 4px; color: var(--dim); font-size: 13.5px; pointer-events: none; user-select: none; background: linear-gradient(90deg, transparent, #0c0c0c 12px); border-radius: 0 var(--r) var(--r) 0; }
.input-group:has(.input-suffix) .input { padding-right: 142px; }
.input-group.pw .input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 34px; height: 34px; display: grid; place-items: center; color: var(--muted); border-radius: 7px; }
.pw-toggle:hover { color: var(--text); background: var(--hover); }
.input-static { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 13px; border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--text-2); font-size: 14px; }
.input-static .i { color: var(--dim); }
.form-error { font-size: 13px; color: #e5e5e5; background: #161616; border: 1px solid var(--line-2); border-left: 2px solid #e5e5e5; padding: 9px 12px; border-radius: 8px; margin: 2px 0 14px; }
.form-ok { font-size: 13px; color: var(--text); background: #121212; border: 1px solid var(--line-2); padding: 9px 12px; border-radius: 8px; margin: 2px 0 14px; }
.shake { animation: shake .35s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.switch { appearance: none; width: 36px; height: 21px; border-radius: 20px; background: #262626; border: 1px solid var(--line-3); position: relative; cursor: pointer; transition: background-color .2s var(--ease); flex: none; margin: 0; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 15px; height: 15px; border-radius: 50%; background: #8a8a8a; transition: transform .2s var(--ease), background-color .2s; }
.switch:checked { background: var(--white); border-color: var(--white); } .switch:checked::after { transform: translateX(15px); background: #0a0a0a; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.toggle-row > span { display: grid; gap: 2px; } .toggle-label { font-weight: 500; }
.toggle-row:last-child { border-bottom: 0; }

/* Auth */
.auth-screen { position: fixed; inset: 0; background: #070707; overflow-y: auto; }
.auth-bg { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
.auth-vignette { position: fixed; inset: 0; pointer-events: none; background: radial-gradient(ellipse 60% 55% at 50% 45%, transparent 0%, rgba(7,7,7,.55) 60%, #070707 100%),
  linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 64px 64px, linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px) 0 0 / 64px 64px; }
.auth-center { position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 18px calc(32px + var(--safe-b)); }
.auth-card { width: 100%; max-width: 384px; background: rgba(13,13,13,.78); border: 1px solid var(--line); border-radius: 18px; padding: 34px 30px 28px; box-shadow: var(--shadow);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); transition: max-width .3s var(--ease), opacity .22s, transform .22s var(--ease); animation: rise .5s var(--ease) both; }
.auth-card.wide { max-width: 520px; }
.auth-card.leaving { opacity: 0; transform: scale(.98) translateY(-6px); }
@keyframes rise { from { opacity: 0; transform: translateY(10px) scale(.99); } to { opacity: 1; transform: none; } }
.auth-view { animation: viewIn .32s var(--ease) both; }
.auth-view.out { animation: viewOut .16s ease-in both; }
@keyframes viewIn { from { opacity: 0; transform: translateX(10px); } to { opacity: 1; transform: none; } }
@keyframes viewOut { to { opacity: 0; transform: translateX(-10px); } }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 12.5px; letter-spacing: .22em; color: var(--white); }
.auth-card .logo { margin-bottom: 28px; }
.auth-title { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; line-height: 1.25; color: var(--white); }
.auth-sub { color: var(--muted); margin: 6px 0 24px; font-size: 13.5px; }
.auth-sub strong { color: var(--text-2); font-weight: 500; }
.auth-alt { text-align: right; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.auth-alt a:hover, .auth-switch a:hover { color: var(--white); }
.auth-switch { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); text-align: center; font-size: 13px; color: var(--muted); }
.auth-switch a { color: var(--white); font-weight: 500; }
.auth-legal { margin-top: 22px; font-size: 11.5px; color: #3f3f3f; letter-spacing: .04em; }
.eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; font-family: 'Geist Mono', monospace; }
.steps { display: flex; gap: 6px; margin: -10px 0 22px; }
.steps span { flex: 1; height: 2px; border-radius: 2px; background: var(--line-2); transition: background-color .4s var(--ease); }
.steps span.on { background: var(--white); }
.checks { list-style: none; padding: 0; margin: -2px 0 16px; display: grid; gap: 6px; font-size: 12.5px; color: var(--dim); }
.checks li { display: flex; align-items: center; gap: 8px; transition: color .2s; }
.checks li .i { width: 13px; height: 13px; } .checks li.ok { color: var(--text-2); }
.summary { margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r); }
.summary div { display: flex; justify-content: space-between; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.summary div:last-child { border-bottom: 0; } .summary dt { color: var(--muted); } .summary dd { margin: 0; color: var(--text); word-break: break-all; text-align: right; }
.done { text-align: center; } .done .auth-sub { margin-bottom: 24px; }
.done-mark { width: 56px; height: 56px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-3); color: var(--white); }
.done-mark.draw { border: 0; }
.done-mark svg { width: 56px; height: 56px; fill: none; stroke: var(--white); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.done-mark svg circle { stroke: var(--line-3); stroke-dasharray: 151; stroke-dashoffset: 151; animation: draw .7s var(--ease) forwards; }
.done-mark svg path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: draw .45s .45s var(--ease) forwards; stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.req-list { list-style: none; padding: 0; margin: 0 0 20px; border: 1px solid var(--line); border-radius: var(--r); }
.req-list li { display: grid; grid-template-columns: 18px 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.req-list li:last-child { border-bottom: 0; } .req-list em { font-style: normal; color: var(--muted); font-size: 12px; text-align: right; }
.req-list li.bad { color: #fff; background: #151515; } .req-list li.bad .i { color: #fff; } .req-list li.ok .i { color: var(--muted); }
.status-view { text-align: center; } .status-view .logo { margin-bottom: 22px; }
.status-view .auth-sub { margin-bottom: 22px; }
.orbit { position: relative; width: 84px; height: 84px; margin: 4px auto 26px; }
.orbit span { position: absolute; inset: 0; border-radius: 50%; border: 1px solid var(--line-2); }
.orbit span:nth-child(2) { inset: 16px; border-color: var(--line-3); }
.orbit i { position: absolute; top: -2px; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: var(--white); box-shadow: 0 0 12px rgba(255,255,255,.6); transform-origin: 2.5px 44px; animation: orbit 6s linear infinite; }
.orbit::after { content: ''; position: absolute; inset: 37px; border-radius: 50%; background: var(--white); animation: pulse 3s ease-in-out infinite; }
@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .35; transform: scale(.8); } }
.state-icon { width: 56px; height: 56px; margin: 0 auto 22px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--text-2); }
.state-icon .i { width: 22px; height: 22px; }
.status-box { display: flex; align-items: center; gap: 12px; text-align: left; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 18px; background: rgba(255,255,255,.012); }
.status-box > div { flex: 1; min-width: 0; display: grid; } .status-box strong { font-weight: 500; font-size: 13.5px; }
.status-box span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 11.5px; padding: 4px 10px 4px 8px; border-radius: 20px; border: 1px solid var(--line-2); color: var(--text-2); white-space: nowrap; font-weight: 500; }
.status-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-chip.ok i { background: var(--white); box-shadow: 0 0 8px rgba(255,255,255,.5); }
.status-chip.wait i { background: transparent; border: 1px solid var(--text-2); animation: pulse 2s ease-in-out infinite; }
.status-chip.bad { color: var(--muted); border-style: dashed; } .status-chip.bad i { background: #444; }

/* Avatar & tags */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: #1d1d1d; display: block; }
.avatar-i { display: inline-grid; place-items: center; color: var(--text-2); font-weight: 600; letter-spacing: .02em; border: 1px solid var(--line-2); background: #151515; }
.tag { display: inline-block; font-style: normal; font-size: 11px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line-2); color: var(--muted); white-space: nowrap; font-weight: 500; }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--white); color: #0a0a0a; font-size: 10.5px; font-weight: 700; display: inline-grid; place-items: center; font-style: normal; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 4px 0 10px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 12.5px; max-width: 260px; }
.chip button { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); border-radius: 5px; } .chip button:hover { background: var(--hover); color: var(--text); }
.chip .i { width: 13px; height: 13px; }

/* App shell */
.shell { min-height: 100vh; }
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--side); border-right: 1px solid var(--line); background: var(--bg); display: flex; flex-direction: column; padding: 18px 12px; z-index: 20; }
.side-logo { padding: 4px 10px 22px; display: block; } .side-logo .logo { font-size: 11.5px; }
.side-nav, .side-channels { display: grid; gap: 1px; }
.side-nav a, .side-channels a, .side-admin { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 10px; border-radius: 8px; color: var(--muted); font-size: 13.5px; font-weight: 450; transition: background-color .15s, color .15s; position: relative; }
.side-nav a:hover, .side-channels a:hover, .side-admin:hover { background: var(--panel-2); color: var(--text); }
.side-nav a.active, .side-channels a.active { background: var(--panel-2); color: var(--white); }
.side-nav a.active::before, .side-channels a.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 2px; border-radius: 2px; background: var(--white); }
.side-nav .badge { margin-left: auto; }
.side-section { padding: 22px 10px 8px; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); font-family: 'Geist Mono', monospace; }
.side-channels { overflow-y: auto; flex: 1; align-content: start; }
.side-channels a { height: 32px; font-size: 13px; } .hash { color: var(--dim); width: 16px; text-align: center; font-family: 'Geist Mono', monospace; }
.side-empty { padding: 4px 10px; color: var(--dim); font-size: 12.5px; }
.side-foot { border-top: 1px solid var(--line); padding-top: 12px; display: grid; gap: 4px; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; transition: background-color .15s; min-width: 0; }
.side-user:hover, .side-user.active { background: var(--panel-2); }
.side-user span { display: grid; min-width: 0; } .side-user strong { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-user em { font-style: normal; color: var(--dim); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.main-wrap { margin-left: var(--side); min-height: 100vh; }
.topbar, .tabbar { display: none; }
.main { padding: 40px clamp(20px, 4vw, 56px) 80px; max-width: 1180px; }
.page { max-width: 1100px; } .page.narrow { max-width: 680px; }
.fade-in { animation: fadeIn .35s var(--ease) both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { font-size: 24px; font-weight: 600; letter-spacing: -0.028em; color: var(--white); line-height: 1.2; }
.page-head p.muted { margin-top: 5px; font-size: 13.5px; }
.head-actions { display: flex; gap: 8px; align-items: center; flex: none; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; margin-bottom: 10px; } .back:hover { color: var(--text); } .back .i { width: 14px; height: 14px; }

/* Panels & lists */
.panel, .a-panel { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--bg-2); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .a-panel > h2, .form-section h2 { font-size: 13.5px; font-weight: 600; letter-spacing: -0.01em; }
.panel-head a { font-size: 12.5px; color: var(--muted); } .panel-head a:hover { color: var(--text); }
.panel-foot { padding: 14px 18px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.list > * + * { border-top: 1px solid var(--line); }
.empty { display: grid; justify-items: center; gap: 5px; text-align: center; padding: 38px 20px; color: var(--muted); font-size: 13px; }
.empty .i { width: 20px; height: 20px; color: var(--dim); margin-bottom: 6px; } .empty strong { color: var(--text-2); font-weight: 500; }
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 26px; }
.quick-item { display: flex; align-items: center; gap: 11px; height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); font-size: 13.5px; font-weight: 500; color: var(--text-2);
  transition: border-color .18s, background-color .18s, color .18s, transform .18s var(--ease); text-align: left; }
.quick-item:hover { border-color: var(--line-3); background: var(--panel-2); color: var(--white); transform: translateY(-1px); }
.quick-item .badge { margin-left: auto; }
.dash-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.act-row, .conv-row { display: flex; gap: 12px; padding: 13px 18px; transition: background-color .15s; align-items: flex-start; min-width: 0; }
.act-row:hover, .conv-row:hover { background: var(--panel); }
.act-row > div, .conv-main { flex: 1; min-width: 0; display: grid; gap: 2px; }
.act-top, .conv-top { display: flex; gap: 6px; align-items: baseline; font-size: 13px; color: var(--muted); min-width: 0; }
.act-top strong, .conv-top strong { color: var(--text); font-weight: 500; } .act-top b { color: var(--text-2); font-weight: 500; }
.act-top time, .conv-top time { margin-left: auto; font-size: 11.5px; color: var(--dim); flex: none; }
.act-body, .conv-last { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-row.unread .conv-last { color: var(--text); } .conv-row .badge { align-self: center; }
.meter { display: grid; gap: 8px; } .meter-top { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); } .meter-top .mono { color: var(--text-2); }
.bar { height: 3px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--white); border-radius: 3px; transition: width .3s var(--ease); }

/* Files */
.file-row { display: flex; align-items: center; gap: 13px; padding: 12px 18px; transition: background-color .15s; min-width: 0; }
.file-row:hover { background: var(--panel); } .file-row.compact { padding: 10px 18px; }
.file-row.blocked { opacity: .55; }
.file-ic { width: 36px; height: 36px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; font: 600 9.5px 'Geist Mono', monospace; letter-spacing: .04em; color: var(--text-2); background: var(--panel); }
.file-ic-image { background: #161616; } .file-ic-pdf { color: var(--white); border-color: var(--line-3); }
.file-main { flex: 1; min-width: 0; display: grid; gap: 1px; }
.file-name { font-weight: 500; font-size: 13.5px; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; color: var(--text); text-decoration: none; }
.file-name:hover { text-decoration: underline; text-underline-offset: 3px; }
.meta { font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meta .warn { color: var(--text-2); font-weight: 500; } .meta .exp { color: var(--muted); }
.file-actions { display: flex; gap: 2px; opacity: .75; transition: opacity .15s; } .file-row:hover .file-actions { opacity: 1; }
.dropzone { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; border: 1px dashed var(--line-3); border-radius: var(--r-lg); padding: 18px 20px; margin-bottom: 22px; color: var(--muted); font-size: 13.5px; transition: border-color .2s, background-color .2s; }
.dropzone strong { color: var(--text); font-weight: 500; } .dropzone > .i { width: 20px; height: 20px; color: var(--text-2); }
.dropzone.over { border-color: var(--white); background: #111; }
.exp-pick { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12.5px; } .exp-pick .input { height: 34px; width: auto; font-size: 13px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar.wrap { justify-content: flex-start; } .toolbar.wrap .input.select { width: auto; height: 36px; font-size: 13px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; } .filters .select { width: auto; height: 36px; font-size: 13px; }
.search { position: relative; min-width: 220px; } .search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 14px; height: 14px; z-index: 1; pointer-events: none; }
.search .input { height: 36px; padding-left: 34px; font-size: 13px; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.tabs a { padding: 9px 12px; font-size: 13px; color: var(--muted); border-bottom: 1.5px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s; }
.tabs a:hover { color: var(--text); } .tabs a.on { color: var(--white); border-bottom-color: var(--white); }
.seg { display: inline-flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; gap: 2px; background: var(--bg-2); flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 11px; border-radius: 7px; font-size: 12.5px; color: var(--muted); transition: background-color .15s, color .15s; }
.seg button:hover { color: var(--text); } .seg button.on { background: var(--panel-2); color: var(--white); box-shadow: 0 0 0 1px var(--line-2); }
.upload-panel { position: fixed; right: 20px; bottom: 20px; width: 340px; max-height: 50vh; overflow: auto; z-index: 60; background: #101010; border: 1px solid var(--line-2); border-radius: var(--r-lg); box-shadow: var(--shadow); animation: rise .3s var(--ease); }
.up-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 10px 10px 16px; border-bottom: 1px solid var(--line); font-size: 13px; }
.up-row { padding: 11px 16px; display: grid; gap: 7px; border-bottom: 1px solid var(--line); }
.up-name { display: flex; gap: 10px; font-size: 12.5px; } .up-name span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .up-name em { font-style: normal; color: var(--dim); }
.up-state { font-size: 11.5px; color: var(--muted); } .up-row.bad .up-state { color: #fff; } .up-row.bad .bar i { background: #555; }
.popmenu { position: fixed; z-index: 80; min-width: 190px; padding: 5px; background: #121212; border: 1px solid var(--line-2); border-radius: 11px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-4px); transition: opacity .14s, transform .14s var(--ease); }
.popmenu.in { opacity: 1; transform: none; }
.popmenu button { display: flex; align-items: center; gap: 10px; width: 100%; height: 34px; padding: 0 10px; border-radius: 7px; font-size: 13px; color: var(--text-2); }
.popmenu button:hover { background: var(--hover); color: var(--white); } .popmenu button.danger { color: #fff; } .popmenu .i { width: 14px; height: 14px; }

/* Channels */
.chan-row { display: flex; align-items: center; gap: 14px; padding: 15px 18px; transition: background-color .15s; }
.chan-row:hover { background: var(--panel); } .chan-row.archived { opacity: .6; }
.chan-hash { width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line-2); display: grid; place-items: center; font-family: 'Geist Mono', monospace; color: var(--muted); flex: none; }
.chan-main { flex: 1; min-width: 0; display: grid; } .chan-main strong { font-weight: 500; } .chan-main span { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chan-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--dim); flex: none; }
.chan-head h1 .dim { margin-right: 2px; font-weight: 400; }
.composer { border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-2); margin-bottom: 22px; transition: border-color .15s; }
.composer:focus-within { border-color: var(--line-3); }
.composer textarea { border: 0; background: transparent; box-shadow: none !important; resize: none; min-height: 64px; }
.link-fields { display: grid; grid-template-columns: 1.4fr 1fr; gap: 8px; padding: 0 12px 10px; } .link-fields .input { height: 36px; font-size: 13px; }
.attach-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; } .attach-list:not(:empty) { padding-bottom: 10px; }
.composer-bar { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-top: 1px solid var(--line); }
.posts { display: grid; }
.post { display: flex; gap: 13px; padding: 18px 2px; border-bottom: 1px solid var(--line); animation: fadeIn .3s var(--ease) both; }
.post-main { flex: 1; min-width: 0; }
.post header { display: flex; align-items: center; gap: 8px; font-size: 13.5px; } .post header strong { font-weight: 500; }
.post header time { font-size: 12px; color: var(--dim); } .post-del { margin-left: auto; opacity: 0; transition: opacity .15s; } .post:hover .post-del { opacity: 1; }
.post-body { white-space: pre-wrap; word-wrap: break-word; color: var(--text-2); margin-top: 4px; font-size: 14px; line-height: 1.6; }
.link-card { display: flex; gap: 12px; align-items: center; margin-top: 10px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r); max-width: 520px; transition: border-color .15s, background-color .15s; }
.link-card:hover { border-color: var(--line-3); background: var(--panel); } .link-card span { display: grid; min-width: 0; }
.link-card strong { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .link-card em { font-style: normal; font-size: 12px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-files { margin-top: 10px; border: 1px solid var(--line); border-radius: var(--r); max-width: 560px; overflow: hidden; }
.more { display: flex; justify-content: center; padding: 18px 0; } .more:empty { display: none; }

/* Chat */
.chat { display: grid; grid-template-columns: 320px 1fr; height: calc(100vh - 120px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; background: var(--bg-2); }
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list-head { padding: 16px; border-bottom: 1px solid var(--line); display: grid; gap: 12px; } .chat-list-head h1 { font-size: 16px; font-weight: 600; letter-spacing: -0.02em; }
.chat-list-head .search { min-width: 0; }
#convList, #userRes { overflow-y: auto; } #convList { flex: 1; } #userRes { border-bottom: 1px solid var(--line); max-height: 40%; }
#convList .sel .conv-row { background: var(--panel-2); }
.user-row { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 16px; text-align: left; transition: background-color .15s; }
.user-row:hover { background: var(--panel); } .user-row span { flex: 1; display: grid; } .user-row strong { font-weight: 500; font-size: 13px; } .user-row em { font-style: normal; color: var(--dim); font-size: 12px; } .user-row .i { color: var(--dim); }
.chat-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.chat-empty { margin: auto; display: grid; justify-items: center; gap: 6px; color: var(--muted); font-size: 13px; text-align: center; padding: 30px; }
.chat-empty > .i { width: 22px; height: 22px; color: var(--dim); } .chat-empty strong { color: var(--text-2); font-weight: 500; }
.thread-head { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.thread-head div { display: grid; } .thread-head strong { font-weight: 500; } .thread-head span { font-size: 12px; color: var(--dim); }
.back-btn { display: none; }
.thread-body { flex: 1; overflow-y: auto; padding: 18px 18px 8px; display: flex; flex-direction: column; gap: 4px; overscroll-behavior: contain; }
.day-sep { text-align: center; margin: 14px 0 8px; font-size: 11.5px; color: var(--dim); } .day-sep span { padding: 3px 10px; border: 1px solid var(--line); border-radius: 20px; }
.msg { display: flex; gap: 8px; align-items: flex-end; max-width: 78%; animation: msgIn .25s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.bubble-wrap { display: grid; gap: 2px; min-width: 0; } .msg.mine .bubble-wrap { justify-items: end; }
.bubble { padding: 9px 13px; border-radius: 16px 16px 16px 5px; background: #1a1a1a; border: 1px solid var(--line-2); color: var(--text); font-size: 14px; line-height: 1.45; min-width: 0; overflow-wrap: anywhere; }
.bubble p { white-space: pre-wrap; }
.msg.mine .bubble { background: var(--white); color: #0a0a0a; border-color: var(--white); border-radius: 16px 16px 5px 16px; }
.msg.deleted .bubble { background: transparent; color: var(--dim); border-style: dashed; } .msg.mine.deleted .bubble { background: transparent; color: var(--dim); border-color: var(--line-3); }
.msg-meta { font-size: 10.5px; color: var(--dim); display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.msg-del { opacity: 0; color: var(--dim); display: grid; } .msg-del .i { width: 12px; height: 12px; } .msg:hover .msg-del { opacity: 1; } .msg-del:hover { color: var(--text); }
.msg-img { display: block; margin: -4px -8px 4px; } .msg-img img { display: block; max-width: 260px; max-height: 260px; border-radius: 11px; object-fit: cover; }
.msg-file { display: flex; align-items: center; gap: 10px; padding: 2px 0 4px; min-width: 0; } .msg-file span { display: grid; min-width: 0; }
.msg-file strong { font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .msg-file em { font-style: normal; font-size: 11.5px; opacity: .6; }
.msg.mine .file-ic { background: #eaeaea; border-color: #d0d0d0; color: #0a0a0a; }
.msg-file.blocked { color: var(--muted); font-size: 12.5px; gap: 6px; }
.read-state { align-self: flex-end; font-size: 10.5px; color: var(--dim); margin: -1px 4px 4px; }
.thread-compose { display: flex; align-items: flex-end; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.thread-compose textarea { resize: none; min-height: 40px; max-height: 140px; height: 40px; padding: 9px 13px; }
.thread-off { padding: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }

/* Account */
.form-section { padding: 26px 0; border-top: 1px solid var(--line); } .form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section h2 { margin-bottom: 16px; }
.sec-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; } .sec-head h2 { margin: 0; }
.avatar-edit { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.row-form { display: flex; gap: 10px; align-items: flex-end; } .row-form .field { margin-bottom: 14px; } .row-form .btn { margin-bottom: 14px; height: 42px; }
#pw .btn { margin-right: 12px; }
.sess-row { display: flex; align-items: center; gap: 13px; padding: 13px 4px; }
.sess-row > .i { color: var(--dim); } .sess-row > div { flex: 1; min-width: 0; display: grid; } .sess-row strong { font-weight: 500; font-size: 13.5px; } .sess-row span { font-size: 12px; color: var(--dim); }
.a-panel .sess-row { padding: 12px 18px; }
.pick-list { max-height: 200px; overflow-y: auto; margin-top: 8px; display: grid; gap: 2px; }
.pick-list button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-align: left; font-size: 13px; }
.pick-list button:hover { background: var(--hover); } .pick-list button.on { background: var(--panel-2); box-shadow: 0 0 0 1px var(--line-3); } .pick-list em { font-style: normal; color: var(--dim); margin-left: auto; font-size: 12px; }

/* Modal & toasts */
.modal-wrap { position: fixed; inset: 0; z-index: 70; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; opacity: 0; transition: opacity .18s; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-wrap.in { opacity: 1; }
.modal { width: 100%; max-width: 440px; max-height: calc(100vh - 40px); overflow: auto; background: #0f0f0f; border: 1px solid var(--line-2); border-radius: 16px; box-shadow: var(--shadow); transform: translateY(8px) scale(.99); transition: transform .22s var(--ease); }
.modal-wrap.in .modal { transform: none; } .modal-wide { max-width: 920px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 14px 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal-body { padding: 18px 20px 20px; }
.modal-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 20px; } .modal-actions .muted { margin-right: auto; }
.preview { display: grid; place-items: center; background: #080808; border: 1px solid var(--line); border-radius: var(--r); min-height: 300px; overflow: hidden; }
.preview img { max-width: 100%; max-height: 70vh; display: block; } .preview iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
.code-box { font-size: 22px; letter-spacing: .08em; text-align: center; padding: 18px; margin: 16px 0 8px; border: 1px solid var(--line-3); border-radius: var(--r); background: #0a0a0a; color: var(--white); user-select: all; }
#toasts { position: fixed; z-index: 90; left: 50%; top: 18px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: #f5f5f5; color: #0a0a0a; padding: 10px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; box-shadow: 0 10px 30px rgba(0,0,0,.5); opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .25s var(--ease); }
.toast.in { opacity: 1; transform: none; } .toast-error { background: #1a1a1a; color: #fff; border: 1px solid #3a3a3a; }

/* Admin */
.admin { min-height: 100vh; background: #080808; }
.admin-top { position: sticky; top: 0; z-index: 30; height: 56px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: rgba(8,8,8,.85); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.admin-brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 12px; letter-spacing: .2em; }
.admin-brand em { font-style: normal; letter-spacing: .04em; font-size: 11px; font-family: 'Geist Mono', monospace; color: #0a0a0a; background: var(--white); padding: 2px 7px; border-radius: 5px; font-weight: 600; }
.admin-top-r { display: flex; align-items: center; gap: 12px; }
.sys-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); } .sys-dot.ok { background: var(--white); box-shadow: 0 0 10px rgba(255,255,255,.6); } .sys-dot.bad { background: #555; outline: 1px solid #fff; }
.admin-body { display: grid; grid-template-columns: 220px 1fr; }
.admin-nav { position: sticky; top: 56px; height: calc(100vh - 56px); padding: 18px 12px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.admin-nav a { display: flex; align-items: center; gap: 11px; height: 36px; padding: 0 11px; border-radius: 8px; color: var(--muted); font-size: 13.5px; transition: background-color .15s, color .15s; }
.admin-nav a:hover { background: var(--panel-2); color: var(--text); } .admin-nav a.active { background: var(--panel-2); color: var(--white); box-shadow: inset 2px 0 0 var(--white); }
.admin-nav .badge { margin-left: auto; }
.admin-main { padding: 34px clamp(18px, 3.5vw, 48px) 80px; min-width: 0; max-width: 1280px; }
.a-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.a-head h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.025em; color: var(--white); } .a-head p { margin-top: 4px; font-size: 13px; }
.user-head { align-items: center; justify-content: flex-start; } .user-head .head-actions { margin-left: auto; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin-bottom: 18px; background: var(--bg-2); }
.stat { padding: 18px 20px; display: grid; gap: 4px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat:nth-child(4n) { border-right: 0; } .stat:nth-last-child(-n+4) { border-bottom: 0; }
.stat span { font-size: 12px; color: var(--muted); } .stat strong { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; color: var(--white); } .stat em { font-style: normal; font-size: 11.5px; color: var(--dim); }
.a-panel.pad-l + .a-grid { margin-top: 16px; }
.a-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; } .span-2 { grid-column: span 2; }
.release-box { margin: 18px; padding: 16px; border: 1px dashed var(--line-3); border-radius: var(--r); display: flex; align-items: center; gap: 16px; }
.release-box.live { border-style: solid; border-color: var(--white); }
.release-box > div { flex: 1; display: grid; gap: 3px; } .release-box span { font-size: 12.5px; color: var(--muted); }
#quickSet { padding: 0 18px 6px; }
.user-line { display: flex; align-items: center; gap: 10px; padding: 11px 18px; } .user-line a { flex: 1; display: grid; min-width: 0; } .user-line strong { font-weight: 500; font-size: 13px; } .user-line span { font-size: 12px; color: var(--dim); }
.audit-row { display: grid; grid-template-columns: 86px 1fr auto; gap: 12px; align-items: start; padding: 11px 18px; font-size: 13px; }
.audit-row > div { display: grid; min-width: 0; } .audit-row strong { font-weight: 500; } .audit-row div span { color: var(--dim); font-size: 12px; overflow-wrap: anywhere; } .audit-row time { font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.cat { font: 500 10.5px 'Geist Mono', monospace; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 2px 0; }
.cat-security { color: var(--white); } .cat-moderation { color: var(--text-2); }
.sys-list { margin: 0; } .sys-list div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }
.sys-list div:last-child { border-bottom: 0; } .sys-list dt { color: var(--muted); } .sys-list dd { margin: 0; text-align: right; color: var(--text-2); overflow-wrap: anywhere; }
.sys-list dd.ok { color: var(--white); } .sys-list dd.bad { color: #fff; text-decoration: underline; text-decoration-style: dotted; }
.table-wrap { overflow-x: auto; } .table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 500; color: var(--dim); font-size: 11.5px; letter-spacing: .03em; padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #0c0c0c; }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--text-2); }
.table tr:last-child td { border-bottom: 0; } .table tbody tr { transition: background-color .15s; } .table tbody tr:hover { background: var(--panel); }
.table tr.blocked td { opacity: .6; } .table td a:hover { color: var(--white); }
.u-cell { display: flex; align-items: center; gap: 11px; min-width: 0; } .u-cell span { display: grid; min-width: 0; } .u-cell strong { color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.u-cell em, .cell-sub { font-style: normal; font-size: 12px; color: var(--dim); display: block; }
.t-actions { text-align: right; white-space: nowrap; } .t-actions > * { vertical-align: middle; }
.action-list { padding: 16px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.note { display: flex; gap: 10px; align-items: center; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: var(--r); margin-bottom: 14px; color: var(--text-2); font-size: 13px; }
.usage-row { display: grid; grid-template-columns: minmax(120px, 1fr) 1.2fr auto; gap: 16px; align-items: center; padding: 11px 18px; font-size: 13px; }
.usage-row span:first-child { display: grid; } .usage-row strong { font-weight: 500; } .usage-row em { font-style: normal; color: var(--dim); font-size: 12px; } .usage-row .mono { color: var(--text-2); text-align: right; }
a.usage-row:hover { background: var(--panel); }
.settings { display: grid; gap: 16px; } .settings h2 { margin-bottom: 12px; }
.save-bar { position: sticky; bottom: 16px; display: flex; justify-content: flex-end; }

/* Responsive */
@media (max-width: 1100px) { .dash-grid, .a-grid { grid-template-columns: 1fr; } .span-2 { grid-column: auto; } }
@media (max-width: 860px) {
  .sidebar { display: none; }
  .main-wrap { margin-left: 0; }
  .topbar { display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 25; height: calc(52px + env(safe-area-inset-top, 0px)); padding: env(safe-area-inset-top, 0px) 14px 0; background: rgba(10,10,10,.86); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .topbar h2 { font-size: 15px; font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: -0.01em; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; padding: 6px 4px calc(6px + var(--safe-b)); background: rgba(10,10,10,.92); border-top: 1px solid var(--line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .tabbar a { display: grid; justify-items: center; gap: 3px; padding: 6px 0; font-size: 10.5px; color: var(--dim); position: relative; transition: color .15s; -webkit-tap-highlight-color: transparent; }
  .tabbar a .i { width: 20px; height: 20px; } .tabbar a.active { color: var(--white); }
  .tabbar .badge { position: absolute; top: 1px; left: calc(50% + 6px); min-width: 16px; height: 16px; font-size: 9.5px; }
  .main { padding: 22px 16px calc(96px + var(--safe-b)); }
  .page-head { margin-bottom: 20px; flex-wrap: wrap; align-items: flex-start; } .page-head h1 { font-size: 21px; }
  .quick { grid-template-columns: 1fr 1fr; }
  .chat { grid-template-columns: 1fr; height: calc(100vh - 52px - 70px - var(--safe-b)); height: calc(100dvh - 52px - 70px - var(--safe-b)); border: 0; border-radius: 0; margin: -22px -16px; background: var(--bg); min-height: 0; }
  .chat.has-thread .chat-list { display: none; } .chat:not(.has-thread) .chat-thread { display: none; }
  .chat-list { border-right: 0; } .back-btn { display: inline-grid; margin-left: -6px; }
  .msg { max-width: 88%; } .msg-del { opacity: .6; } .post-del { opacity: 1; }
  .chan-meta span { display: none; }
  .admin-body { grid-template-columns: 1fr; }
  .admin-nav { position: sticky; top: 56px; z-index: 20; height: auto; flex-direction: row; overflow-x: auto; padding: 8px 10px; border-right: 0; border-bottom: 1px solid var(--line); background: #080808; scrollbar-width: none; }
  .admin-nav a { flex: none; } .admin-nav a.active { box-shadow: none; }
  .admin-main { padding: 22px 14px 60px; }
  .stats { grid-template-columns: 1fr 1fr; } .stat:nth-child(4n) { border-right: 1px solid var(--line); } .stat:nth-child(2n) { border-right: 0; } .stat:nth-last-child(-n+4) { border-bottom: 1px solid var(--line); } .stat:nth-last-child(-n+2) { border-bottom: 0; }
  .release-box { flex-direction: column; align-items: stretch; }
  .upload-panel { left: 12px; right: 12px; width: auto; bottom: calc(80px + var(--safe-b)); }
  .admin-top .btn span, .admin-top-r .avatar { display: none; }
}
@media (max-width: 560px) {
  .auth-card { padding: 28px 22px 22px; border-radius: 16px; }
  .grid-2, .link-fields { grid-template-columns: 1fr; }
  .exp-pick { margin-left: 0; width: 100%; }
  .search { min-width: 0; flex: 1; } .toolbar { align-items: stretch; } .filters { width: 100%; } .filters .search { flex-basis: 100%; }
  .file-row { padding: 12px 14px; } .file-actions { opacity: 1; }
  .row-form { flex-direction: column; align-items: stretch; }
  .audit-row { grid-template-columns: 1fr auto; } .audit-row .cat { grid-column: span 2; }
  .usage-row { grid-template-columns: 1fr auto; } .usage-row .bar { display: none; }
  .input, .select { font-size: 16px; }
  .head-actions .btn { padding: 0 12px; }
}
@media (hover: none) { .file-actions, .post-del { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
