:root {
  --bg: #0b1020; --bg2: #121a33; --panel: #151d38; --panel2: #1b2544;
  --ink: #eaf0ff; --muted: #93a0c6; --line: #273257;
  --grad: linear-gradient(135deg, #35d6c6, #6c7cff);
  --ok: #37d67a; --err: #ff6b6b; --radius: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: radial-gradient(1200px 600px at 80% -10%, #1a2550 0%, var(--bg) 55%) fixed; color: var(--ink); }
[hidden] { display: none !important; }
.defs { position: absolute; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; }
.brand .mark { width: 26px; height: 26px; }
.brand b { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand.big { justify-content: center; font-size: 24px; }
.brand.big .mark { width: 32px; height: 32px; }

.btn { border: 0; border-radius: 10px; padding: 11px 16px; font: inherit; font-weight: 700; cursor: pointer; color: #06111f; background: var(--grad); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 7px 12px; font-size: 13px; }
.btn:focus-visible, input:focus-visible, .ws:focus-visible { outline: 2px solid #6c7cff; outline-offset: 2px; }

/* sign in */
.signin { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.signin .box { width: min(400px, 100%); background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: 18px; padding: 28px; }
.lede { text-align: center; color: var(--muted); margin: 6px 0 22px; font-size: 14px; }
.field { display: block; margin-bottom: 14px; }
.field span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field input { width: 100%; background: #0c1430; border: 1px solid var(--line); color: var(--ink); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 15px; }
.note { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 4px 0 8px; }
.err { color: var(--err); font-size: 13px; min-height: 18px; margin: 6px 0 10px; }
.signin .btn { width: 100%; }

/* app shell */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); }
.grow { flex: 1; }
.who { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 40vw; }
.body { flex: 1; display: grid; grid-template-columns: 240px 1fr; min-height: 0; }
.rail { border-right: 1px solid var(--line); padding: 16px 12px; }
.rail h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 6px 10px 12px; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.ws { width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; font-size: 14px; text-align: left; cursor: pointer; }
.ws:hover { background: var(--panel); color: var(--ink); }
.ws[aria-current="true"] { background: var(--panel2); color: var(--ink); }
.ws .glyph { flex: none; width: 22px; height: 22px; border-radius: 7px; background: var(--grad); display: grid; place-items: center; color: #06111f; font-weight: 800; font-size: 11px; }
.ws .label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.content { padding: 24px 28px; min-width: 0; }
.head h1 { margin: 0; font-size: 22px; }
.sub { color: var(--muted); font-size: 13px; margin: 4px 0 20px; }

.fs { display: grid; gap: 10px; }
.fsrow { display: grid; grid-template-columns: 40px 1fr auto; gap: 14px; align-items: center; background: linear-gradient(180deg, var(--panel), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.fsrow .ico { width: 40px; height: 40px; border-radius: 11px; background: #0e1630; border: 1px solid var(--line); display: grid; place-items: center; }
.fsrow .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsrow .meta { color: var(--muted); font-size: 12px; margin-top: 3px; }
.tag { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; background: #212b4d; color: var(--muted); white-space: nowrap; }
.empty { color: var(--muted); font-size: 14px; padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); }

.mounthint { margin-top: 26px; padding: 18px 20px; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(108,124,255,.07); }
.mounthint h2 { margin: 0 0 6px; font-size: 15px; }
.mounthint p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

@media (max-width: 720px) {
  .body { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; }
  .rail h3 { display: none; }
  .rail ul { display: flex; gap: 6px; overflow-x: auto; }
  .ws { width: auto; flex: none; }
  .content { padding: 18px 16px; }
  .who { display: none; }
}
