/* Omni Office. DEP design tokens: Inter, brand blue hsl(224 76% 48%), soft surfaces. */
:root {
  --brand: hsl(224 76% 48%);
  --brand-dark: hsl(224 76% 40%);
  --brand-soft: hsl(224 90% 96%);
  --ink: hsl(222 47% 11%);
  --dim: hsl(215 16% 42%);
  --line: hsl(214 32% 91%);
  --bg: hsl(210 40% 98%);
  --card: #fff;
  --top: hsl(222 47% 11%);
  --danger: hsl(0 72% 45%);
  --docs: hsl(217 85% 52%);
  --sheets: hsl(152 62% 34%);
  --slides: hsl(22 88% 50%);
  --top-h: 52px;
  --rail-w: 208px;
  --radius: 10px;
  --shadow: 0 1px 2px hsl(222 47% 11% / .06), 0 4px 14px hsl(222 47% 11% / .05);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
h1 { font-size: 22px; line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.sub { color: var(--dim); margin: 4px 0 0; }

.top { position: fixed; inset: 0 0 auto 0; height: var(--top-h); background: var(--top); color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 16px; z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 650; font-size: 16px; letter-spacing: -.01em; }
.brand img { display: block; }
.who { display: flex; align-items: center; gap: 14px; font-size: 13px; }
.who-name { opacity: .85; max-width: 40vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who form { margin: 0; }
.link { background: none; border: 0; color: #fff; font: inherit; cursor: pointer; padding: 6px 10px; border-radius: 6px; opacity: .85; }
.link:hover { background: hsl(0 0% 100% / .12); opacity: 1; }

.rail { position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--rail-w); background: var(--card); border-right: 1px solid var(--line); padding: 14px 10px; display: flex; flex-direction: column; gap: 2px; z-index: 10; }
.rail a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--dim); font-weight: 550; }
.rail a:hover { background: var(--bg); color: var(--ink); }
.rail a.on { background: var(--brand-soft); color: var(--brand); }
.nav-ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.main { padding: calc(var(--top-h) + 26px) 28px 60px calc(var(--rail-w) + 28px); max-width: 1320px; }
.main.solo { padding: calc(var(--top-h) + 8vh) 16px 40px; max-width: none; display: flex; justify-content: center; }

.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.use { display: flex; flex-direction: column; gap: 5px; color: var(--dim); font-size: 12px; min-width: 170px; }
.bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--brand); border-radius: 99px; min-width: 2px; }

.new { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.tile { display: flex; align-items: center; gap: 12px; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 14px; cursor: pointer; font: inherit; color: var(--ink); box-shadow: var(--shadow); transition: border-color .12s, transform .12s; }
.tile:hover { border-color: var(--brand); transform: translateY(-1px); }
.tile:focus-visible, .btn:focus-visible, .rail a:focus-visible, .c-name a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.tile:disabled { opacity: .6; cursor: progress; }
.tile .ic { width: 34px; height: 34px; }
.tile span { display: flex; flex-direction: column; line-height: 1.3; }
.tile small { color: var(--dim); font-size: 12px; }
.tile.plain { box-shadow: none; background: transparent; border-style: dashed; }

.ic { width: 22px; height: 22px; flex: none; }
.ic path { fill: var(--dim); }
.ic .fold { fill: hsl(0 0% 100% / .45); }
.ic .ln { fill: none; stroke: #fff; stroke-width: 1.4; stroke-linecap: round; }
.ic-docs > path:first-child { fill: var(--docs); }
.ic-sheets > path:first-child { fill: var(--sheets); }
.ic-slides > path:first-child { fill: var(--slides); }
.ic-folder path { fill: hsl(40 92% 55%); }

.crumbs { color: var(--dim); margin: 0 0 10px; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crumbs a:hover { color: var(--brand); text-decoration: underline; }
.crumbs b { color: var(--ink); font-weight: 600; }
.sep { opacity: .5; }

.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
.list { width: 100%; border-collapse: collapse; }
.list th { text-align: left; font-size: 12px; font-weight: 600; color: var(--dim); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list td { padding: 9px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr:hover { background: hsl(210 40% 98%); }
.c-name a, .c-name .static { display: flex; align-items: center; gap: 10px; font-weight: 550; min-width: 180px; }
.c-name a:hover span { color: var(--brand); text-decoration: underline; }
.c-name span span, .c-name a > span { overflow-wrap: anywhere; }
.c-dim { color: var(--dim); white-space: nowrap; font-size: 13px; }
.c-act { text-align: right; white-space: nowrap; }
.c-act .btn { opacity: .0; }
.list tr:hover .c-act .btn, .c-act .btn:focus-visible { opacity: 1; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 550; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; color: var(--dim); }
.btn.ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn.ghost.danger:hover { background: hsl(0 80% 96%); color: var(--danger); }
.btn.sm { padding: 5px 9px; font-size: 13px; }
.btn.wide { width: 100%; padding: 11px 14px; font-size: 15px; }

.empty { border: 1.5px dashed var(--line); border-radius: var(--radius); padding: 44px 20px; text-align: center; color: var(--dim); background: var(--card); }
.empty p { margin: 0 0 4px; }
.empty b { color: var(--ink); }
body.dropping::after { content: "Drop files to upload"; position: fixed; inset: var(--top-h) 0 0 0; z-index: 30; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 650; color: var(--brand); background: hsl(224 90% 96% / .92); border: 3px dashed var(--brand); pointer-events: none; }

.card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 34px 30px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; height: fit-content; }
.card .sub { margin: 0 0 8px; }
.warn { color: var(--danger); background: hsl(0 80% 97%); border-radius: 8px; padding: 8px 12px; margin: 0; width: 100%; }
.fine { color: var(--dim); font-size: 12px; margin: 4px 0 0; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; z-index: 40; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.bad { background: var(--danger); }

/* Editor page: a slim bar and the editor filling the rest. */
body.editing { display: flex; flex-direction: column; height: 100dvh; overflow: hidden; background: #fff; }
.edit-top { flex: none; height: 44px; background: var(--top); color: #fff; display: flex; align-items: center; gap: 14px; padding: 0 14px; font-size: 13px; white-space: nowrap; }
.edit-top b { overflow: hidden; text-overflow: ellipsis; font-weight: 600; min-width: 0; }
.edit-back, .edit-dl { padding: 5px 10px; border-radius: 6px; opacity: .85; }
.edit-back:hover, .edit-dl:hover { background: hsl(0 0% 100% / .14); opacity: 1; }
.edit-app { background: hsl(0 0% 100% / .14); padding: 2px 9px; border-radius: 99px; font-weight: 600; font-size: 12px; }
.edit-note { opacity: .6; margin-left: auto; }
.edit-frame { flex: 1; width: 100%; border: 0; min-height: 0; }

@media (max-width: 820px) {
  :root { --rail-w: 0px; }
  .rail { top: auto; bottom: 0; right: 0; width: auto; height: 58px; flex-direction: row; justify-content: space-around; border-right: 0; border-top: 1px solid var(--line); padding: 4px; }
  .rail a { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 8px; flex: 1; justify-content: center; }
  .main { padding: calc(var(--top-h) + 18px) 16px 90px; }
  .c-by, .c-size, .list th:nth-child(3), .list th:nth-child(4) { display: none; }
  .c-act .btn { opacity: 1; }
  .edit-note, .edit-app { display: none; }
  .toast { bottom: 72px; }
}
