:root {
  --canvas: #eaf0f3;
  --surface: #f8fbfc;
  --surface-elevated: #fff;
  --ink: #14212b;
  --muted: #61717d;
  --line: #d7e1e6;
  --accent: #087fa8;
  --accent-soft: #dff3f8;
}
:root[data-theme="dark"] {
  --canvas: #071117;
  --surface: #0c1a21;
  --surface-elevated: #12252e;
  --ink: #ecf5f7;
  --muted: #93aab4;
  --line: #203943;
  --accent: #25b8dc;
  --accent-soft: #0d303b;
  color-scheme: dark;
}
body { background: var(--canvas); color: var(--ink); }
.workspace { max-width: 1440px; }
.workspace > header a { font-weight: 750; text-decoration: none; color: var(--ink); }
.workspace > footer { padding: 24px; color: var(--muted); border-color: var(--line); }
.workspace > footer h2 { font-size: 16px; }
.workspace > footer button, .workspace > header button { background: var(--surface-elevated); color: var(--ink); border-color: var(--line); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.logbook-shell { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 75vh; }
.logbook-nav { display: flex; flex-direction: column; align-items: stretch; gap: 6px; padding: 28px 16px; border-right: 1px solid var(--line); }
.logbook-nav button { text-align: left; color: var(--muted); background: transparent; border: 0; border-radius: 8px; padding: 12px 14px; font-weight: 600; }
.logbook-nav button.selected { color: var(--accent); background: var(--accent-soft); }
.logbook-content { padding: 36px; min-width: 0; max-width: 1280px; width: 100%; margin-inline: auto; }
.logbook-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.logbook-heading h1 { font-size: 32px; letter-spacing: -.04em; margin: 6px 0; }
.eyebrow { color: var(--muted); font-size: 11px; font-weight: 750; letter-spacing: .13em; margin: 0; }
.logbook-search { display: block; max-width: 420px; margin-bottom: 20px; }
.logbook-content input, .logbook-content select, .logbook-content textarea { width: 100%; padding: 12px; color: var(--ink); background: var(--surface-elevated); border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.logbook-content textarea { min-height: 110px; resize: vertical; }
.logbook-list, .logbook-panel, .logbook-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.logbook-row { display: flex; align-items: center; gap: 24px; padding: 22px; width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); }
.logbook-row:hover { background: var(--accent-soft); }
.logbook-row:disabled { opacity: 1; }
.logbook-row:disabled:hover { background: transparent; }
.logbook-row:last-child { border-bottom: 0; }
.row-caption { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.row-main { display: flex; flex: 1; min-width: 0; flex-direction: column; gap: 6px; }
.row-main strong { font-size: 17px; }
.row-main small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logbook-empty { padding: 70px 20px; text-align: center; color: var(--muted); }
.logbook-empty > span { font-size: 42px; color: var(--accent); }
.logbook-empty h2 { color: var(--ink); font-size: 21px; }
.logbook-panel, .logbook-form { padding: 26px; margin-bottom: 24px; }
.logbook-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.logbook-grid label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; }
.logbook-grid .wide { grid-column: 1 / -1; }
.logbook-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.logbook-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 26px; }
.stat { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.stat p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.stat strong { font-size: 30px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.summary-row { display: flex; justify-content: space-between; gap: 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.logbook-content button { cursor: pointer; }
.logbook-content .primary { background: var(--accent); color: white; border: 0; border-radius: 8px; padding: 12px 18px; font-weight: 650; }
.logbook-content .secondary { color: var(--ink); background: var(--surface-elevated); border: 1px solid var(--line); border-radius: 8px; padding: 11px 17px; }
.logbook-content :focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
@media (max-width: 760px) {
  .logbook-shell { display: flex; flex-direction: column; }
  .logbook-nav { flex-direction: row; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .logbook-nav button { flex-shrink: 0; padding: 10px; font-size: 13px; }
  .logbook-content { padding: 22px 14px; }
  .logbook-heading { gap: 12px; }
  .logbook-heading h1 { font-size: 27px; }
  .logbook-row { gap: 12px; padding: 18px 12px; flex-wrap: wrap; }
  .row-caption { width: 100%; }
  .logbook-grid { grid-template-columns: 1fr; }
  .logbook-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 18px; }
  .stat strong { font-size: 26px; }
  .logbook-form, .logbook-panel { padding: 18px; }
}
