:root {
  --bg: #10151c;
  --panel: #171e27;
  --line: #2a3544;
  --text: #e8eef6;
  --muted: #93a0b0;
  --accent: #3b82f6;
  --ok: #34d399;
  --err: #f87171;
  --drop: rgba(59, 130, 246, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font: 15px/1.45 system-ui, Segoe UI, sans-serif; background: var(--bg); color: var(--text); }
a { color: #93c5fd; }
.auth { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.card { width: min(520px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.card h1 { margin: 0 0 8px; font-size: 22px; }
.card h2 { margin: 22px 0 10px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
label { display: flex; flex-direction: column; gap: 6px; margin: 10px 0; color: var(--muted); font-size: 13px; }
input, select { background: #0d1218; border: 1px solid var(--line); color: var(--text); border-radius: 10px; padding: 10px 12px; font: inherit; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 10px 14px; font: inherit; cursor: pointer; text-decoration: none; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--text); }
.muted { color: var(--muted); }
.err { background: #3a1c1c; color: #fecaca; padding: 10px 12px; border-radius: 10px; }
.ok { background: #163326; color: #bbf7d0; padding: 10px 12px; border-radius: 10px; }
.app { min-height: 100vh; }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--panel); }
.top nav { display: flex; gap: 8px; }
.top .who { margin-left: auto; color: var(--muted); font-size: 13px; }
.link { background: none; border: 0; color: #93c5fd; cursor: pointer; font: inherit; }
.layout { display: grid; grid-template-columns: 240px 1fr; min-height: calc(100vh - 54px); }
aside { border-right: 1px solid var(--line); padding: 16px; background: #131a22; }
.aside-title { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.folder-btn { display: block; width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.folder-btn.active, .folder-btn:hover { background: #243044; }
.files { position: relative; padding: 18px 22px 40px; }
.files.drag { outline: 2px dashed var(--accent); outline-offset: -10px; background: var(--drop); }
.crumb { color: var(--muted); margin-bottom: 12px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hint { color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; padding: 16px; }
.row { display: grid; grid-template-columns: 36px 1fr 140px 110px 90px; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.row button, .row a { background: none; border: 0; color: #93c5fd; cursor: pointer; font: inherit; padding: 0; }
.icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; background: #243044; font-size: 13px; }
.progress { margin: 8px 0; background: #0d1218; border-radius: 999px; overflow: hidden; height: 8px; }
.progress > span { display: block; height: 100%; background: var(--ok); width: 0; }
.admin { padding: 22px; display: grid; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; align-items: end; margin-bottom: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
.empty { color: var(--muted); padding: 24px 8px; }
@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .row { grid-template-columns: 36px 1fr 80px; }
  .row .hide-sm { display: none; }
}
