:root {
  color-scheme: dark;
  --ink: #080B14;
  --surface: rgba(255,255,255,.035);
  --surface-2: rgba(255,255,255,.055);
  --field: rgba(255,255,255,.045);
  --line: rgba(178,190,225,.13);
  --line-soft: rgba(178,190,225,.07);
  --text: #E9ECF6;
  --text-2: #A2ABC6;
  --text-3: #6C7590;
  --violet: #A08CFF;
  --cyan: #5FE3F5;
  --wash: rgba(123,92,255,.20);
  --wash-2: rgba(34,211,238,.12);
  --btn: linear-gradient(135deg,#6B48F5,#3F5BFF);
  --shadow: 0 30px 70px -34px rgba(0,0,0,.9);
  --focus: var(--cyan);
  --display: "Sora","Segoe UI",system-ui,sans-serif;
  --body: "IBM Plex Sans",system-ui,-apple-system,sans-serif;
  --mono: "IBM Plex Mono",ui-monospace,Menlo,monospace;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) { color-scheme: light;
    --ink:#F1F2F8; --surface:rgba(255,255,255,.88); --surface-2:#FFF; --field:#FFF;
    --line:rgba(22,27,54,.12); --line-soft:rgba(22,27,54,.07);
    --text:#10152B; --text-2:#4C5473; --text-3:#7B84A3;
    --violet:#4B31D6; --cyan:#07728A; --wash:rgba(91,61,245,.13); --wash-2:rgba(12,147,172,.10);
    --btn:linear-gradient(135deg,#5B3DF5,#3048E8); --shadow:0 26px 54px -30px rgba(16,21,43,.34);
    --focus:#4B31D6; }
}

:root[data-theme="light"] { color-scheme: light;
  --ink:#F1F2F8; --surface:rgba(255,255,255,.88); --surface-2:#FFF; --field:#FFF;
  --line:rgba(22,27,54,.12); --line-soft:rgba(22,27,54,.07);
  --text:#10152B; --text-2:#4C5473; --text-3:#7B84A3;
  --violet:#4B31D6; --cyan:#07728A; --wash:rgba(91,61,245,.13); --wash-2:rgba(12,147,172,.10);
  --btn:linear-gradient(135deg,#5B3DF5,#3048E8); --shadow:0 26px 54px -30px rgba(16,21,43,.34);
  --focus:#4B31D6; }

* { box-sizing: border-box; }

body {
  margin: 0; min-height: 100svh; display: flex; flex-direction: column;
  background: var(--ink); color: var(--text);
  font-family: var(--body); font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2 { font-family: var(--display); margin: 0; letter-spacing: -.02em; line-height: 1.25; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.brand {
  display: flex; align-items: center; gap: 11px;
  font-family: var(--display); font-weight: 600; letter-spacing: -.032em;
}
.brand .mark { width: 26px; height: 26px; flex: none; }
.brand .lever { stroke: var(--cyan); stroke-width: 2; stroke-linecap: round; fill: none; }
.brand .fulcrum { fill: var(--violet); }

.btn {
  padding: 11px 16px; border: 0; border-radius: 10px;
  background: var(--btn); color: #fff; font: inherit; font-weight: 500;
  cursor: pointer; transition: filter .15s;
}
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: none; border: 1px solid var(--line); color: var(--text-2); }
.btn-ghost:hover { color: var(--text); filter: none; }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: 8px; }

/* login */

.stage { position: relative; flex: 1; display: grid; place-items: center; padding: 72px 16px 28px; }
.glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(620px 420px at 50% 30%, var(--wash), transparent 70%),
    radial-gradient(520px 380px at 76% 78%, var(--wash-2), transparent 72%);
}
.panel {
  width: 100%; max-width: 380px; padding: 36px 32px 30px;
  border: 1px solid var(--line); border-radius: 20px;
  background: var(--surface); backdrop-filter: blur(14px); box-shadow: var(--shadow);
}
.panel .brand { justify-content: center; font-size: 1.6rem; margin-bottom: 30px; }
.signin { display: grid; gap: 14px; }
.signin label { display: grid; gap: 6px; }
.signin label span { font-size: .8rem; font-weight: 500; color: var(--text-2); }
.signin input {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--field); color: var(--text); font: inherit; font-size: .95rem;
}
.signin input::placeholder { color: var(--text-3); }
.signin .btn { margin-top: 6px; }
.note { margin: 0; min-height: 1.3em; font-size: .8rem; color: var(--text-3); text-align: center; }
.note.bad { color: #F2684F; }
.alt { margin: 22px 0 0; font-size: .85rem; color: var(--text-3); text-align: center; }
.foot { padding: 0 16px 26px; font-size: .78rem; color: var(--text-3); text-align: center; }

/* chrome */

.theme-toggle {
  position: fixed; top: 18px; right: 18px; width: 34px; height: 34px; z-index: 5;
  border: 1px solid var(--line); border-radius: 10px; display: grid; place-items: center;
  background: var(--surface); color: var(--text-3); cursor: pointer;
}
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle circle { fill: none; stroke: currentColor; stroke-width: 1.6; }
.theme-toggle path { fill: currentColor; }
.theme-toggle:hover { color: var(--text); }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 68px 16px 24px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.topbar .brand { font-size: 1.1rem; }
.topbar-right { display: flex; align-items: center; gap: 12px; font-size: .82rem; color: var(--text-3); }

.wrap { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 28px 24px 64px; }

/* toolbar */

.head { margin-bottom: 20px; }
.head h1 { font-size: 1.5rem; letter-spacing: -.03em; }
.head p { margin-top: 4px; color: var(--text-2); font-size: .9rem; }

.toolbar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar input, .toolbar select {
  padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px;
  background: var(--field); color: var(--text); font: inherit; font-size: .88rem;
}
.toolbar input { flex: 1; min-width: 200px; }
.toolbar input::placeholder { color: var(--text-3); }

/* table */

.cols, .row-head {
  display: grid; grid-template-columns: 1.1fr 1.4fr 132px 28px; gap: 14px; align-items: center;
}

.cols { padding: 0 14px 8px; border-bottom: 1px solid var(--line); }
.cols button {
  background: none; border: 0; padding: 0; cursor: pointer; text-align: left;
  font-family: var(--mono); font-size: .68rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--text-3); font-weight: 500;
}
.cols button:hover { color: var(--text-2); }
.cols button[data-dir]::after { content: " ↑"; color: var(--violet); }
.cols button[data-dir="desc"]::after { content: " ↓"; }

.rows { display: flex; flex-direction: column; }

.app { border-bottom: 1px solid var(--line-soft); }
.app.hidden { display: none; }

.row-head {
  width: 100%; padding: 14px; background: none; border: 0; cursor: pointer;
  font: inherit; color: inherit; text-align: left; transition: background .12s;
}
.row-head:hover { background: var(--surface); }
.app[open] > .row-head { background: var(--surface); }

.company { font-weight: 500; }
.title { color: var(--text-2); }
.date { font-family: var(--mono); font-size: .8rem; color: var(--text-3); }
.caret { color: var(--text-3); transition: transform .18s; justify-self: end; }
.app[open] .caret { transform: rotate(90deg); }

.detail { padding: 4px 14px 22px; }
.detail .card {
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--surface-2); padding: 20px 22px;
}
.detail h2 {
  font-family: var(--mono); font-size: .66rem; text-transform: uppercase;
  letter-spacing: .13em; color: var(--text-3); margin: 22px 0 10px;
}
.detail h2:first-child { margin-top: 0; }

.field { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.field:last-child { border-bottom: 0; }
.field .label { font-size: .75rem; color: var(--text-3); margin-bottom: 3px; }
.field .value { font-size: .9rem; white-space: pre-wrap; }
.field .value a { color: var(--cyan); }

.files { display: flex; flex-wrap: wrap; gap: 8px; }
.file {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--field); color: var(--text-2); text-decoration: none; font-size: .84rem;
}
.file:hover { color: var(--text); border-color: color-mix(in srgb, var(--line) 50%, var(--violet)); }
.file .size { font-family: var(--mono); font-size: .7rem; color: var(--text-3); }

.empty {
  border: 1px dashed var(--line); border-radius: 12px; padding: 40px 20px;
  text-align: center; color: var(--text-3); font-size: .9rem;
}

@media (max-width: 640px) {
  .cols { display: none; }
  .row-head { grid-template-columns: 1fr 24px; gap: 4px; row-gap: 2px; }
  .row-head .date { grid-column: 1; }
  .caret { grid-row: 1 / span 3; }
}

summary.row-head { list-style: none; }
summary.row-head::-webkit-details-marker { display: none; }
