/* Sparked admin panel: the site's Night Lab palette (src/css/tokens.css), dark by default, light on request */
:root {
  --bg: #0B1418; --raised: #0F1C22; --card: #13232A; --line: rgba(243, 238, 227, .12); --line-2: rgba(243, 238, 227, .22);
  --ink: #F3EEE3; --ink-2: #C3C0B6; --ink-3: #8F9895;
  --accent: #7FE7FF; --accent-ink: #052B33; --accent-soft: rgba(127, 231, 255, .14);
  --ok: #8FE3A8; --warn: #F2C46B; --bad: #FF8E7A; --tile: #E9E1D0;
  --serif: "Fraunces", Georgia, serif; --sans: "Instrument Sans", Arial, sans-serif;
  --r: 10px;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root {
    --bg: #F6F2E9; --raised: #EFE9DC; --card: #FBF8F2; --line: rgba(14, 29, 36, .12); --line-2: rgba(14, 29, 36, .24);
    --ink: #0E1D24; --ink-2: #33444B; --ink-3: #56666C;
    --accent: #A84A15; --accent-ink: #FFFFFF; --accent-soft: rgba(168, 74, 21, .10);
    --ok: #2F7A45; --warn: #9A6A06; --bad: #B23A26;
    color-scheme: light;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--sans); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; margin: 0; letter-spacing: -.01em; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px 80px; }

/* top bar */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { font-family: var(--serif); font-size: 20px; }
.brand span { color: var(--ink-3); font-family: var(--sans); font-size: 14px; margin-left: 8px; }
.spacer { flex: 1; }
.status { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line-2);
  font-size: 13px; color: var(--ink-2); background: var(--raised); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status.busy .dot { background: var(--accent); animation: pulse 1.2s infinite; }
.status.bad { border-color: var(--bad); color: var(--bad); } .status.bad .dot { background: var(--bad); }
button.status { cursor: pointer; } button.status:hover { border-color: var(--ink-3); }
.status .more { color: var(--ink-3); border-left: 1px solid var(--line-2); padding-left: 8px; }

/* activity panel */
.runbox { border: 1px solid var(--line-2); border-radius: var(--r); padding: 12px 14px; margin-bottom: 10px; background: var(--card); }
.runhead { display: flex; gap: 10px; align-items: baseline; margin-bottom: 8px; }
.runhead b { flex: 1; font-weight: 600; } .runhead small { color: var(--ink-3); }
.steps { list-style: none; margin: 0; padding: 0; }
.st { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 14px; color: var(--ink-3); }
.st.done { color: var(--ink-2); } .st.running { color: var(--ink); font-weight: 600; } .st.failed { color: var(--bad); font-weight: 600; }
.st .ic { width: 16px; text-align: center; flex: none; } .st.done .ic { color: var(--ok); }
.st small { margin-left: auto; color: var(--ink-3); font-weight: 400; }
.spin.sm { width: 14px; height: 14px; margin: 0 1px; }
.calm { color: var(--ink-2); margin: 0 0 8px; }
.changes { list-style: none; margin: 0; padding: 0; }
.chg { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.chg:first-child { border-top: 0; }
.chg .what { display: block; font-weight: 500; } .chg small { color: var(--ink-3); font-size: 12px; }
.chg .hint { grid-column: 1 / -1; margin: 0; }
.chip-state { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line-2); white-space: nowrap; justify-self: end; }
.chip-state.ok { color: var(--ok); border-color: currentColor; } .chip-state.busy { color: var(--accent); border-color: currentColor; }
.chip-state.wait { color: var(--warn); border-color: currentColor; } .chip-state.bad { color: var(--bad); border-color: currentColor; }
.chip-state.muted { color: var(--ink-3); }
@keyframes pulse { 50% { opacity: .3; } }

/* buttons and fields */
.btn { border: 1px solid var(--line-2); background: transparent; border-radius: 8px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn.danger { color: var(--bad); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.link { background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0; text-decoration: underline; font-size: 13px; }
input[type=text], input[type=url], input[type=password], input[type=month], select, textarea {
  width: 100%; background: var(--raised); border: 1px solid var(--line-2); border-radius: 8px; padding: 9px 11px; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus, .btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
label.f { display: block; margin: 0 0 14px; }
label.f > span { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 500; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.hint.over { color: var(--bad); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); border-radius: 999px; padding: 4px 11px; font-size: 13px; cursor: pointer; user-select: none; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); color: var(--ink); }

/* switch */
.switch { position: relative; display: inline-block; vertical-align: middle; width: 38px; height: 22px; flex: none; }
.switch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--line-2); transition: background .15s; pointer-events: none; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--ink); transition: transform .15s; }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); background: var(--accent-ink); }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

/* page sections */
.head { display: flex; align-items: end; gap: 12px; margin: 34px 0 16px; flex-wrap: wrap; }
.head h2 { font-size: 26px; }
.head .count { color: var(--ink-3); }
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.tools input { max-width: 260px; }
.tools select { width: auto; }

/* jobs (companies being added) */
.jobs { display: grid; gap: 10px; }
.job { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--card); flex-wrap: wrap; }
.job .what { flex: 1; min-width: 220px; }
.job .what b { font-weight: 600; }
.job .what p { margin: 2px 0 0; color: var(--ink-2); font-size: 14px; }
.job.attention { border-color: var(--warn); } .job.failed { border-color: var(--bad); }
.job .acts { display: flex; gap: 8px; flex-wrap: wrap; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* company list */
.list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: grid; grid-template-columns: 64px minmax(0, 1.6fr) minmax(0, 1.4fr) 130px 70px 64px; gap: 14px; align-items: center;
  padding: 10px 14px; border-top: 1px solid var(--line); background: var(--card); }
.row:first-child { border-top: 0; }
.row.hidden-co { opacity: .62; }
.row.labels { background: var(--raised); font-size: 12px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; padding: 8px 14px; }
.logo { width: 64px; height: 36px; border-radius: 6px; background: var(--tile); display: grid; place-items: center; overflow: hidden; }
.logo img { max-width: 52px; max-height: 24px; filter: brightness(0); opacity: .82; }
.logo .init { color: #33444B; font-family: var(--serif); font-size: 15px; }
.name b { font-weight: 600; } .name small { display: block; color: var(--ink-3); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sect { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row select { padding: 5px 8px; font-size: 13px; }
.empty { padding: 30px; text-align: center; color: var(--ink-3); }

/* drawer */
.scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); z-index: 10; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: var(--bg); z-index: 11; border-left: 1px solid var(--line-2);
  display: flex; flex-direction: column; }
.drawer header { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer header h2 { font-size: 22px; flex: 1; }
.drawer .body { overflow-y: auto; padding: 20px 22px 30px; flex: 1; }
.drawer footer { display: flex; gap: 10px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--raised); }
.drawer footer .msg { flex: 1; font-size: 13px; color: var(--bad); }
.drawer h3 { font-size: 17px; margin: 22px 0 12px; }
.drawer h3:first-child { margin-top: 0; }
.drawer .private { border: 1px dashed var(--line-2); border-radius: var(--r); padding: 14px 14px 2px; }
.drawer .private h3 { margin-top: 0; }
.person { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 12px 0; margin-bottom: 10px; background: var(--card); }
.person .top-line { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.person .top-line b { flex: 1; }
.person .ph { width: 40px; height: 50px; border-radius: 6px; object-fit: cover; background: var(--raised); }
.checkline { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; font-size: 14px; }
.flink { display: grid; grid-template-columns: 1fr 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.flink label { font-size: 13px; color: var(--ink-2); display: flex; gap: 6px; align-items: center; white-space: nowrap; }

/* login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login form { width: min(360px, 100%); }
.login h1 { font-size: 30px; margin-bottom: 6px; }
.login p { color: var(--ink-3); margin: 0 0 22px; }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--bg);
  padding: 10px 16px; border-radius: 8px; font-size: 14px; transition: all .2s; z-index: 20; max-width: calc(100vw - 32px); pointer-events: none; }
#toast.show { opacity: 1; transform: translateX(-50%); }
#toast.bad { background: var(--bad); color: #fff; }

@media (max-width: 760px) {
  .wrap { padding: 0 16px 60px; }
  .row { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "logo name show" "logo outcome edit"; row-gap: 6px; }
  .row .oc select { max-width: 160px; }
  .top .wrap { flex-wrap: wrap; gap: 10px; }
  .brand span { display: none; }
  .row .logo { grid-area: logo; width: 56px; } .row .name { grid-area: name; } .row .sect { display: none; }
  .row .oc { grid-area: outcome; } .row .sw { grid-area: show; justify-self: end; } .row .ed { grid-area: edit; justify-self: end; }
  .row.labels { display: none; }
  .grid2 { grid-template-columns: 1fr; }
  .flink { grid-template-columns: 1fr; }
  .status .long, .status .more { display: none; }
  .chg { grid-template-columns: 1fr; } .chip-state { justify-self: start; white-space: normal; }
  .status { font-size: 12px; padding: 5px 10px; }
  .head .spacer { display: none; }
}

/* tabs, founders list, logo editor (2026-10-19, after the first call) */
.tabs { display: flex; gap: 4px; margin: 26px 0 0; border-bottom: 1px solid var(--line); }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; padding: 8px 14px; cursor: pointer; color: var(--ink-3); font-weight: 600; }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.row.frow { grid-template-columns: 48px minmax(0, 1.6fr) minmax(0, 1fr) 90px 64px; }
.face { width: 40px; height: 48px; border-radius: 6px; overflow: hidden; background: var(--raised); display: grid; place-items: center; color: var(--ink-3); font-family: var(--serif); }
.face img { width: 100%; height: 100%; object-fit: cover; }
.logo-edit { display: flex; gap: 14px; align-items: center; margin-bottom: 8px; }
.logo-edit .logo { width: 120px; height: 64px; } .logo-edit .logo img { max-width: 96px; max-height: 40px; }
@media (max-width: 760px) {
  .row.frow { grid-template-columns: 48px minmax(0, 1fr) auto; grid-template-areas: "face name show" "face sect edit"; }
  .row.frow .face { grid-area: face; } .row.frow .sect { display: block; grid-area: sect; }
  .logo-edit { flex-direction: column; align-items: flex-start; }
}

.row.fundrow { grid-template-columns: 64px minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) 64px; }
.chip.add { border-style: dashed; color: var(--ink-3); }
@media (max-width: 760px) {
  .row.fundrow { grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-areas: "logo name edit"; }
  .row.fundrow .logo { grid-area: logo; } .row.fundrow .name { grid-area: name; } .row.fundrow .ed { grid-area: edit; }
  .row.fundrow .sect { display: none; }
}
