:root {
  color-scheme: dark;
  --bg: #101110;
  --panel: #171917;
  --panel-raised: #1c1f1c;
  --line: #292d29;
  --text: #eeefeb;
  --muted: #898f88;
  --subtle: #59615a;
  --accent: #c3ef79;
  --accent-ink: #1a2110;
  --danger: #ff8b80;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 252px; padding: 28px 18px 18px; display: flex; flex-direction: column; border-right: 1px solid var(--line); background: #131513; z-index: 3; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-family: inherit; font-size: 19px; font-weight: 700; letter-spacing: -.7px; padding: 0 10px; }
.brand-mark { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 16px; }
.side-label { margin: 52px 10px 12px; color: var(--subtle); font-size: 10px; letter-spacing: 1.4px; font-weight: 700; }
.sidebar nav { display: grid; gap: 5px; }
.nav-item { width: 100%; display: flex; align-items: center; gap: 13px; padding: 11px 12px; border: 0; border-radius: 8px; background: transparent; color: #9ca29a; text-align: left; font-size: 13px; cursor: pointer; transition: background .15s, color .15s; }
.nav-item:hover { background: #1b1e1b; color: var(--text); }
.nav-item.active { color: var(--text); background: #222622; }
.nav-item.active .nav-icon { color: var(--accent); }
.nav-icon { width: 18px; text-align: center; font-size: 16px; color: #7a827a; }
.storage-card { margin: auto 5px 22px; padding: 15px; border: 1px solid var(--line); border-radius: 10px; background: #171a17; }
.storage-label { display: flex; justify-content: space-between; font-size: 12px; }
.storage-label span:last-child { color: var(--muted); font-size: 11px; }
.progress { height: 5px; margin: 13px 0 9px; border-radius: 5px; background: #303530; overflow: hidden; }
.progress span { display: block; width: 0; height: 100%; background: var(--accent); transition: width .25s; }
.progress span[data-level="5"] { width: 5%; }
.progress span[data-level="10"] { width: 10%; }
.progress span[data-level="15"] { width: 15%; }
.progress span[data-level="20"] { width: 20%; }
.progress span[data-level="25"] { width: 25%; }
.progress span[data-level="30"] { width: 30%; }
.progress span[data-level="35"] { width: 35%; }
.progress span[data-level="40"] { width: 40%; }
.progress span[data-level="45"] { width: 45%; }
.progress span[data-level="50"] { width: 50%; }
.progress span[data-level="55"] { width: 55%; }
.progress span[data-level="60"] { width: 60%; }
.progress span[data-level="65"] { width: 65%; }
.progress span[data-level="70"] { width: 70%; }
.progress span[data-level="75"] { width: 75%; }
.progress span[data-level="80"] { width: 80%; }
.progress span[data-level="85"] { width: 85%; }
.progress span[data-level="90"] { width: 90%; }
.progress span[data-level="95"] { width: 95%; }
.progress span[data-level="100"] { width: 100%; }
.micro { font-size: 11px; line-height: 1.5; }
.muted { color: var(--muted); }
.storage-card p { margin: 0; }
.sidebar-bottom { border-top: 1px solid var(--line); padding-top: 12px; }
.user-chip { display: flex; align-items: center; gap: 10px; margin: 18px 5px 2px; }
.avatar { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 50%; color: var(--accent); background: #313a2b; font-size: 12px; font-weight: 700; }
.user-email { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #b4bab2; font-size: 11px; }
.icon-button { display: inline-grid; place-items: center; min-width: 34px; min-height: 34px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: #909790; cursor: pointer; font-size: 17px; }
.icon-button:hover { border-color: var(--line); background: var(--panel-raised); color: var(--text); }
.main { min-height: 100vh; margin-left: 252px; }
.topbar { min-height: 74px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px 42px; border-bottom: 1px solid var(--line); }
.breadcrumbs { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; }
.breadcrumbs button { padding: 4px 0; border: 0; background: transparent; color: inherit; cursor: pointer; }
.breadcrumbs button:last-child { color: var(--text); }
.crumb-sep { color: #555c55; }
.top-actions { display: flex; align-items: center; gap: 12px; }
.search-box { width: min(300px, 30vw); display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 7px; color: var(--muted); background: #151715; }
.search-box input { min-width: 0; width: 100%; border: 0; outline: 0; color: var(--text); background: transparent; font-size: 12px; }
.search-box input::placeholder { color: #687068; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 14px; border: 1px solid var(--line); border-radius: 7px; background: #1c1f1c; color: #d5d8d3; font-size: 12px; font-weight: 600; cursor: pointer; transition: transform .12s, background .12s; }
.button:hover { background: #252a25; }
.button:active { transform: translateY(1px); }
.button-primary { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.button-primary:hover { background: #d1f998; }
.button-danger { color: var(--danger); }
.button-wide { width: 100%; min-height: 42px; margin-top: 6px; }
.content { max-width: 1220px; margin: 0 auto; padding: 43px 42px 70px; }
.doc-title { margin-top: 35px; }
.eyebrow { color: #9dae89; font-size: 10px; letter-spacing: 1.6px; font-weight: 700; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: inherit; letter-spacing: -.7px; }
.page-title { margin: 0; font-size: 25px; font-weight: 600; }
.page-subtitle { margin: 8px 0 28px; color: var(--muted); font-size: 13px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 30px 0 14px; }
.section-head h2 { margin: 0; font-size: 15px; font-weight: 600; }
.section-head .muted { font-size: 12px; }
.welcome-row { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.welcome-row h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); font-weight: 600; }
.welcome-row .page-subtitle { margin-bottom: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin: 30px 0 34px; }
.stat-card { padding: 18px 19px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.stat-title { color: var(--muted); font-size: 11px; }
.stat-value { display: block; margin-top: 9px; font-family: inherit; font-size: 21px; font-weight: 600; }
.stat-note { display: block; margin-top: 4px; color: #727a72; font-size: 10px; }
.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 11px; }
.folder-card, .file-card { min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.folder-card { display: flex; align-items: center; gap: 11px; cursor: pointer; text-align: left; }
.folder-card:hover, .file-card:hover { border-color: #444a43; background: #1a1d1a; }
.folder-card { cursor: default; }
.folder-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 11px; padding: 0; border: 0; color: inherit; background: transparent; text-align: left; cursor: pointer; }
.folder-icon { color: var(--accent); font-size: 20px; }
.item-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.file-card { position: relative; }
.file-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.file-type { display: grid; place-items: center; width: 39px; height: 39px; border-radius: 9px; background: #272d25; color: var(--accent); font-size: 11px; font-weight: 700; text-transform: uppercase; }
.file-menu { position: relative; }
.file-menu > button { border: 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 18px; }
.file-actions { position: absolute; top: 28px; right: 0; z-index: 2; display: grid; min-width: 155px; padding: 5px; border: 1px solid var(--line); border-radius: 8px; background: #222522; box-shadow: 0 10px 30px #0008; }
.file-actions button { padding: 8px 9px; border: 0; border-radius: 5px; background: none; color: var(--text); text-align: left; font-size: 11px; cursor: pointer; }
.file-actions button:hover { background: #303530; }
.file-name { margin: 13px 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 12px; font-weight: 500; }
.file-meta { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 10px; }
.empty { padding: 45px 20px; border: 1px dashed #343a34; border-radius: 9px; color: var(--muted); text-align: center; font-size: 13px; }
.empty strong { display: block; margin-bottom: 7px; color: #d2d6d0; font-family: inherit; font-size: 15px; }
.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
.file-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.file-table th { padding: 12px 14px; color: var(--muted); font-size: 10px; font-weight: 500; text-align: left; background: #171917; }
.file-table td { padding: 13px 14px; border-top: 1px solid var(--line); }
.file-table tr:hover td { background: #191c19; }
.table-name { display: flex; align-items: center; gap: 10px; }
.table-name .file-type { width: 29px; height: 29px; border-radius: 6px; font-size: 9px; }
.auth-shell { min-height: 100vh; display: grid; place-items: center; padding: 25px; background: radial-gradient(ellipse at 50% 35%, #1b2119, #101110 55%); }
.auth-card { width: min(100%, 410px); padding: 35px; border: 1px solid var(--line); border-radius: 12px; background: #151715; box-shadow: 0 25px 80px #0004; }
.auth-brand { padding: 0; margin-bottom: 39px; }
.auth-card .eyebrow { margin-bottom: 10px; }
.auth-card h1 { margin-bottom: 8px; font-size: 25px; font-weight: 600; }
.auth-card .muted { font-size: 12px; }
.auth-card form { display: grid; margin-top: 25px; }
.auth-card label:not(.check-row) { margin: 0 0 7px; color: #c6cbc4; font-size: 11px; }
.auth-card input:not([type=checkbox]) { width: 100%; height: 41px; margin-bottom: 17px; padding: 0 11px; border: 1px solid #303530; border-radius: 6px; color: var(--text); background: #101210; font-size: 12px; }
.check-row { display: flex; align-items: flex-start; gap: 8px; margin: 0 0 14px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.check-row input { accent-color: var(--accent); }
.check-row a { color: var(--accent); }
.auth-switch { margin: 20px 0 0; color: var(--muted); text-align: center; font-size: 11px; }
.text-button { padding: 0; border: 0; color: var(--accent); background: none; cursor: pointer; font-size: inherit; }
.auth-card .micro { margin: 22px 0 0; text-align: center; }
.notice { margin: 0 0 10px; color: var(--danger); font-size: 11px; }
.toast { position: fixed; right: 25px; bottom: 23px; z-index: 8; max-width: min(400px, calc(100vw - 40px)); padding: 12px 16px; border: 1px solid #3a4434; border-radius: 8px; opacity: 0; transform: translateY(10px); pointer-events: none; color: var(--text); background: #20251e; box-shadow: 0 12px 40px #0006; font-size: 12px; transition: all .18s; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error { border-color: #653b37; background: #2b1b19; }
.preview-dialog { width: min(900px, 94vw); height: min(760px, 90vh); padding: 0; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #171917; }
.preview-dialog::backdrop { background: #000b; }
.dialog-head { height: 48px; display: flex; align-items: center; justify-content: space-between; padding: 0 13px; border-bottom: 1px solid var(--line); font-size: 12px; }
.preview-dialog iframe { width: 100%; height: calc(100% - 48px); border: 0; background: #202220; }
.move-dialog { width: min(420px, calc(100vw - 30px)); padding: 24px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); background: #191c19; }
.move-dialog::backdrop { background: #000a; }
.move-dialog h2 { margin-bottom: 20px; font-size: 17px; }
.move-dialog label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; }
.move-dialog select, #sort-select { min-height: 37px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #111311; font-size: 11px; }
.move-dialog select { width: 100%; }
.move-dialog input { width: 100%; height: 38px; margin-bottom: 13px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px; color: var(--text); background: #111311; font-size: 12px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.mobile-menu { display: none; }
.settings-card { max-width: 620px; margin-bottom: 15px; padding: 20px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); }
.settings-card h2 { margin: 0 0 7px; font-size: 14px; }
.settings-card p { color: var(--muted); font-size: 11px; line-height: 1.6; }
.settings-card form { max-width: 350px; }
.button-spaced { margin-top: 14px; }
.settings-card label { display: block; margin: 12px 0 6px; color: #c6cbc4; font-size: 11px; }
.settings-card input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid #303530; border-radius: 6px; color: var(--text); background: #101210; }
.session-row { display: flex; justify-content: space-between; gap: 15px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 11px; }
.session-row small { display: block; margin-top: 4px; color: var(--muted); }
@media (max-width: 900px) {
  .sidebar { width: 218px; }
  .main { margin-left: 218px; }
  .topbar { padding: 13px 24px; }
  .content { padding: 34px 24px 60px; }
  .search-box { width: 210px; }
}
@media (max-width: 680px) {
  .sidebar { width: 250px; transform: translateX(-102%); transition: transform .2s; box-shadow: 18px 0 45px #0005; }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .topbar { min-height: 63px; padding: 10px 14px; }
  .mobile-menu { display: inline-grid; }
  .breadcrumbs { flex: 1; }
  .top-actions { gap: 7px; }
  .search-box { width: 38px; padding: 8px; border: 0; background: transparent; }
  .search-box input { position: absolute; inset: 63px 0 auto; width: 100%; height: 0; padding: 0 15px; opacity: 0; transition: height .16s; background: #181a18; }
  .search-box:focus-within input { height: 42px; opacity: 1; border-bottom: 1px solid var(--line); }
  .upload-label { display: none; }
  .content { padding: 27px 17px 50px; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .stat-card:last-child { grid-column: span 2; }
  .welcome-row { flex-direction: column; }
  .auth-card { padding: 27px 23px; }
}
