:root {
  --lb-bg: #071321;
  --lb-panel: #0d2034;
  --lb-panel-2: #102a43;
  --lb-card: #f7fbff;
  --lb-card-soft: #edf7fb;
  --lb-line: rgba(75, 148, 191, .28);
  --lb-text: #071727;
  --lb-text-dark: #dceeff;
  --lb-muted: #6d8596;
  --lb-blue: #00b7e8;
  --lb-teal: #02d8a2;
  --lb-orange: #ff9f1c;
  --lb-red: #ff3864;
  --lb-purple: #7b61ff;
  --lb-shadow: 0 18px 42px rgba(2, 15, 28, .18);
}

/* 2026-08-29: compact machinery entry and non-destructive field editor. */
@media screen {
  .lb-reference-section .lb-section-title {
    align-items: flex-start;
    margin-bottom: 6px;
  }

  .lb-reference-section .lb-section-tools {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
  }

  .lb-compact-btn {
    min-height: 28px !important;
    padding: 0 10px !important;
    font-size: 11px !important;
  }

  .lb-reference-workbook {
    padding: 2px 14px 9px;
  }

  .lb-sheet-block,
  .lb-sheet-block:last-child {
    padding: 8px 0 9px;
  }

  .lb-sheet-heading {
    min-height: 34px;
    margin-bottom: 5px;
  }

  .lb-sheet-toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-width: 240px;
    min-height: 32px;
    padding: 3px 8px 3px 2px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--lb-text-dark);
    cursor: pointer;
    text-align: left;
  }

  .lb-sheet-toggle:hover,
  .lb-sheet-toggle:focus-visible {
    outline: 0;
    background: color-mix(in srgb, var(--sheet-tone) 9%, transparent);
  }

  .lb-sheet-toggle h4 {
    margin: 0;
    color: inherit;
    font-size: 16px;
    font-weight: 900;
  }

  .lb-sheet-chevron {
    margin-left: 2px;
    color: var(--sheet-tone);
    font-size: 19px;
    font-weight: 900;
    line-height: 1;
    transform: rotate(180deg);
    transition: transform .16s ease;
  }

  .lb-sheet-block.collapsed {
    padding-block: 5px;
  }

  .lb-sheet-block.collapsed .lb-sheet-heading {
    margin-bottom: 0;
  }

  .lb-sheet-block.collapsed .lb-sheet-chevron {
    transform: rotate(0deg);
  }

  .lb-sheet-block.collapsed .lb-sheet-body {
    display: none;
  }

  .lb-upload-panel .lb-collapsible-panel-body {
    display: block;
  }

  .lb-upload-panel.collapsed .lb-collapsible-panel-body {
    display: none;
  }

  .lb-field-editor-modal {
    z-index: 96;
  }

  .lb-field-editor-window {
    width: min(1180px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    border: 1px solid var(--lb-line-strong);
    border-radius: 14px;
    background: var(--lb-card);
    color: var(--lb-text-dark);
    box-shadow: 0 28px 80px rgba(0, 0, 0, .42);
  }

  .lb-field-editor-window h2 {
    margin: 0 0 3px;
    color: var(--lb-text-dark);
    font-size: 20px;
  }

  .lb-field-editor-command {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 220px 190px auto;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--lb-line);
    background: var(--lb-panel-tint);
  }

  .lb-field-editor-body {
    min-height: 0;
    overflow: auto;
    padding: 0 14px 8px;
    background: var(--lb-page-bg);
  }

  .lb-field-editor-head,
  .lb-field-editor-row {
    display: grid;
    grid-template-columns: 105px minmax(240px, 1fr) 205px minmax(210px, .8fr);
    align-items: center;
    gap: 10px;
  }

  .lb-field-editor-head {
    position: sticky;
    top: 0;
    z-index: 2;
    min-height: 34px;
    border-bottom: 1px solid var(--lb-line-strong);
    background: var(--lb-table-head-bg);
    color: var(--lb-muted);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
  }

  .lb-field-editor-row {
    min-height: 44px;
    border-bottom: 1px solid var(--lb-line);
  }

  .lb-field-editor-row[hidden] {
    display: none !important;
  }

  .lb-field-editor-row .lb-input {
    min-height: 32px;
    padding: 5px 8px;
  }

  .lb-field-editor-row code {
    overflow: hidden;
    color: var(--lb-muted);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .lb-field-visibility {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--lb-text-dark);
    font-size: 11px;
    font-weight: 800;
  }

  .lb-field-visibility input {
    accent-color: var(--lb-teal);
  }

  .lb-field-group {
    color: var(--lb-text-dark);
    font-size: 11px;
    font-weight: 800;
  }

  .lb-field-editor-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 14px;
    border-top: 1px solid var(--lb-line);
    background: var(--lb-panel-tint);
  }

  .lb-field-editor-footer > div {
    display: flex;
    gap: 8px;
  }

  @media (max-width: 820px) {
    .lb-reference-section .lb-section-title,
    .lb-field-editor-footer {
      align-items: stretch;
      flex-direction: column;
    }

    .lb-field-editor-command {
      grid-template-columns: 1fr 1fr;
    }

    .lb-field-editor-head {
      display: none;
    }

    .lb-field-editor-row {
      grid-template-columns: 90px minmax(0, 1fr);
      gap: 6px 8px;
      padding: 8px 0;
    }

    .lb-field-editor-row .lb-field-group,
    .lb-field-editor-row code {
      grid-column: 2;
    }
  }
}

/* 2026-08-29: keep navigation and vessel controls readable in every light theme. */
@media screen {
  html:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) :is(.lb-vessel-btn, .lb-nav-btn, .lb-btn):not(.active):not(.primary),
  body:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) :is(.lb-vessel-btn, .lb-nav-btn, .lb-btn):not(.active):not(.primary),
  .lb-app:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) :is(.lb-vessel-btn, .lb-nav-btn, .lb-btn):not(.active):not(.primary) {
    border-color: color-mix(in srgb, var(--lb-line) 74%, var(--lb-blue) 26%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-surface-strong) 88%, white 12%), color-mix(in srgb, var(--lb-surface-strong) 92%, var(--lb-blue) 8%)) !important;
    color: var(--lb-text-dark) !important;
    box-shadow: 0 3px 10px rgba(24, 73, 94, .08) !important;
  }

  html:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) :is(.lb-vessel-btn, .lb-nav-btn, .lb-btn):not(.active):not(.primary):hover,
  body:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) :is(.lb-vessel-btn, .lb-nav-btn, .lb-btn):not(.active):not(.primary):hover,
  .lb-app:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) :is(.lb-vessel-btn, .lb-nav-btn, .lb-btn):not(.active):not(.primary):hover {
    border-color: var(--lb-blue) !important;
    background: color-mix(in srgb, var(--lb-surface-strong) 82%, var(--lb-blue) 18%) !important;
  }
}

@media screen {
  .lb-matrix-section {
    padding: 0 !important;
    overflow: hidden;
    border-color: color-mix(in srgb, var(--lb-line) 72%, var(--lb-blue) 28%) !important;
  }

  .lb-matrix-section .lb-section-title {
    margin: 0 !important;
    padding: 13px 15px;
    gap: 12px;
    align-items: center;
    background: linear-gradient(90deg, color-mix(in srgb, var(--lb-panel-tint) 88%, var(--lb-blue) 12%), var(--lb-panel-tint));
  }

  .lb-matrix-section .lb-section-title > div:first-child {
    min-width: 0;
  }

  .lb-matrix-note {
    display: block;
    margin-top: 4px;
    color: var(--lb-muted);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .01em;
  }

  .lb-section-tools,
  .lb-history-modes,
  .lb-history-command {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .lb-matrix-count {
    white-space: nowrap;
    padding: 6px 9px;
    border: 1px solid color-mix(in srgb, var(--lb-line) 68%, var(--lb-teal) 32%);
    border-radius: 999px;
    color: var(--lb-teal);
    background: color-mix(in srgb, var(--lb-panel-tint) 90%, var(--lb-teal) 10%);
    font-size: 10px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .04em;
  }

  .lb-matrix-wrap {
    max-height: 430px;
    overflow: auto;
    border-top: 1px solid var(--lb-line);
    scrollbar-color: var(--lb-blue) var(--lb-panel-tint);
  }

  .lb-matrix {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: var(--lb-text-dark);
    font-size: 12px;
  }

  .lb-matrix th,
  .lb-matrix td {
    min-width: 130px;
    padding: 8px 10px;
    border-right: 1px solid color-mix(in srgb, var(--lb-line) 82%, transparent);
    border-bottom: 1px solid color-mix(in srgb, var(--lb-line) 82%, transparent);
    background: var(--lb-table-row-bg);
    vertical-align: middle;
  }

  .lb-matrix thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    height: 48px;
    color: var(--lb-text-dark);
    background: var(--lb-table-head-bg);
    font-size: 11px;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .035em;
  }

  .lb-matrix thead th small,
  .lb-history-table th small {
    display: block;
    margin-top: 3px;
    color: var(--lb-muted);
    font-size: 9px;
    font-weight: 800;
    text-transform: none;
  }

  .lb-matrix th:first-child,
  .lb-matrix td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 155px;
    min-width: 155px;
    background: color-mix(in srgb, var(--lb-table-head-bg) 92%, var(--lb-blue) 8%);
  }

  .lb-matrix thead th:first-child {
    z-index: 5;
  }

  .lb-equipment-id {
    color: var(--lb-text-dark);
    font-weight: 900;
    letter-spacing: .025em;
  }

  .lb-matrix-input {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid var(--lb-line);
    border-radius: 7px;
    outline: 0;
    color: var(--lb-text-dark);
    background: var(--lb-input-bg);
    font: inherit;
    font-size: 14px;
    font-weight: 900;
    text-align: center;
    transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  }

  .lb-matrix-input:focus {
    border-color: var(--lb-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--lb-blue) 20%, transparent);
    background: color-mix(in srgb, var(--lb-input-bg) 88%, var(--lb-blue) 12%);
  }

  .lb-matrix td.has-value {
    background: color-mix(in srgb, var(--lb-table-row-bg) 86%, var(--lb-teal) 14%);
  }

  .lb-matrix td.has-value .lb-matrix-input {
    border-color: color-mix(in srgb, var(--lb-teal) 82%, var(--lb-line));
    color: var(--lb-teal);
  }

  .lb-matrix-na {
    color: var(--lb-muted);
    text-align: center;
  }

  .lb-unit-pill {
    display: inline-flex;
    min-width: 46px;
    justify-content: center;
    padding: 5px 8px;
    border-radius: 999px;
    color: var(--lb-blue);
    background: color-mix(in srgb, var(--lb-panel-tint) 86%, var(--lb-blue) 14%);
    font-weight: 900;
  }

  .lb-temperature-table {
    min-width: 680px;
  }

  .lb-temperature-table th:nth-child(1) { width: 24%; }
  .lb-temperature-table th:nth-child(2) { width: 43%; }
  .lb-temperature-table th:nth-child(3) { width: 21%; }
  .lb-temperature-table th:nth-child(4) { width: 12%; }

  .lb-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  .lb-history-command {
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 12px;
    padding: 10px;
    border: 1px solid var(--lb-line);
    border-radius: 9px;
    background: var(--lb-panel-tint);
  }

  .lb-history-mode {
    min-height: 35px;
    padding: 7px 12px;
    border: 1px solid var(--lb-line);
    border-radius: 7px;
    color: var(--lb-muted);
    background: var(--lb-input-bg);
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
  }

  .lb-history-mode.active {
    border-color: var(--lb-blue);
    color: white;
    background: linear-gradient(135deg, var(--lb-blue), color-mix(in srgb, var(--lb-blue) 58%, var(--lb-teal) 42%));
    box-shadow: 0 6px 15px color-mix(in srgb, var(--lb-blue) 20%, transparent);
  }

  .lb-history-table-wrap {
    max-height: 620px;
  }

  .lb-history-table {
    min-width: 1280px;
    font-size: 13px;
  }

  .lb-history-temperatures { min-width: 3200px; }
  .lb-history-all { min-width: 7200px; }

  .lb-history-table th,
  .lb-history-table td {
    padding: 10px 9px !important;
    line-height: 1.35;
    vertical-align: middle;
  }

  .lb-history-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    font-size: 11px;
    letter-spacing: .035em;
  }

  .lb-history-table th:nth-child(1),
  .lb-history-table td:nth-child(1),
  .lb-history-table th:nth-child(2),
  .lb-history-table td:nth-child(2),
  .lb-history-table th:nth-child(3),
  .lb-history-table td:nth-child(3) {
    position: sticky;
    z-index: 3;
    background: var(--lb-table-row-bg) !important;
  }

  .lb-history-table th:nth-child(1), .lb-history-table td:nth-child(1) { left: 0; min-width: 145px; }
  .lb-history-table th:nth-child(2), .lb-history-table td:nth-child(2) { left: 145px; min-width: 70px; }
  .lb-history-table th:nth-child(3), .lb-history-table td:nth-child(3) { left: 215px; min-width: 104px; }
  .lb-history-table thead th:nth-child(-n+3) { z-index: 6; background: var(--lb-table-head-bg) !important; }

  @media (max-width: 760px) {
    .lb-section-tools,
    .lb-history-command,
    .lb-history-modes,
    .lb-history-filters {
      width: 100%;
    }

    .lb-section-tools,
    .lb-history-modes {
      flex-wrap: wrap;
    }

    .lb-matrix-section .lb-section-title {
      align-items: flex-start;
      flex-direction: column;
    }

    .lb-history-mode {
      flex: 1;
    }
  }
}

@media screen {
  .lb-unified-matrix {
    margin-top: 7px !important;
    --lb-group-main: #ff7043;
    --lb-group-aux: #22c7f2;
    --lb-group-turbo: #a78bfa;
    --lb-group-other: #25d49a;
  }

  .lb-unified-matrix .lb-matrix-wrap {
    max-height: none !important;
    overflow-x: auto;
    overflow-y: visible;
  }

  .lb-unified-table {
    min-width: 760px;
    table-layout: fixed;
  }

  .lb-unified-table .lb-unified-group th {
    position: static !important;
    width: auto !important;
    min-width: 0 !important;
    height: 32px;
    padding: 6px 12px !important;
    border-top: 1px solid var(--lb-line-strong);
    border-bottom: 1px solid var(--lb-line-strong);
    color: var(--lb-text-dark);
    background: color-mix(in srgb, var(--lb-panel-tint) 78%, var(--group-tone) 22%) !important;
    text-align: left;
  }

  .lb-unified-group.main { --group-tone: var(--lb-group-main); }
  .lb-unified-group.aux { --group-tone: var(--lb-group-aux); }
  .lb-unified-group.turbo { --group-tone: var(--lb-group-turbo); }
  .lb-unified-group.other { --group-tone: var(--lb-group-other); }

  .lb-unified-group th::before {
    display: inline-block;
    width: 4px;
    height: 18px;
    margin-right: 9px;
    border-radius: 999px;
    background: var(--group-tone);
    content: "";
    vertical-align: middle;
  }

  .lb-unified-group th span {
    color: var(--group-tone);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .055em;
    text-transform: uppercase;
  }

  .lb-unified-group th small {
    float: right;
    margin-top: 2px;
    color: var(--lb-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .lb-unified-table tbody tr:not(.lb-unified-group):hover th,
  .lb-unified-table tbody tr:not(.lb-unified-group):hover td {
    background: color-mix(in srgb, var(--lb-table-row-bg) 86%, var(--lb-blue) 14%) !important;
  }

  .lb-unified-table thead th {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-table-head-bg) 82%, var(--lb-blue) 18%), var(--lb-table-head-bg)) !important;
    box-shadow: inset 0 -1px 0 var(--lb-line-strong);
  }

  .lb-unified-table tbody tr:not(.lb-unified-group) th:first-child {
    color: color-mix(in srgb, var(--lb-text-dark) 84%, var(--lb-blue) 16%);
  }

  .lb-unified-table tbody tr:not(.lb-unified-group):nth-child(odd) th,
  .lb-unified-table tbody tr:not(.lb-unified-group):nth-child(odd) td {
    background: color-mix(in srgb, var(--lb-table-row-bg) 94%, var(--lb-blue) 6%) !important;
  }

  html[data-theme="paper"] .lb-unified-matrix,
  body[data-theme="paper"] .lb-unified-matrix,
  .lb-app[data-theme="paper"] .lb-unified-matrix,
  html[data-theme="frost"] .lb-unified-matrix,
  body[data-theme="frost"] .lb-unified-matrix,
  .lb-app[data-theme="frost"] .lb-unified-matrix,
  html[data-theme="harbor-light"] .lb-unified-matrix,
  body[data-theme="harbor-light"] .lb-unified-matrix,
  .lb-app[data-theme="harbor-light"] .lb-unified-matrix {
    --lb-group-main: #c84f24;
    --lb-group-aux: #007fa7;
    --lb-group-turbo: #7053c6;
    --lb-group-other: #087d61;
  }

  html[data-theme="charcoal"] .lb-unified-matrix,
  body[data-theme="charcoal"] .lb-unified-matrix,
  .lb-app[data-theme="charcoal"] .lb-unified-matrix {
    --lb-group-main: #ff8b52;
    --lb-group-aux: #45c8ff;
    --lb-group-turbo: #b895ff;
    --lb-group-other: #45dda6;
  }
}

/* 2026-07-06: tactile 3D data-entry cells for easier daily log input. */
@media screen {
  .lb-entry-panel .lb-field,
  .lb-admin-grid .lb-check {
    position: relative;
    padding: 5px;
    border: 1px solid color-mix(in srgb, var(--lb-line) 62%, white 18%);
    border-radius: 10px;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-panel-tint) 70%, white 7%), var(--lb-panel-tint));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .10),
      inset 0 -1px 0 rgba(0, 0, 0, .20),
      0 1px 0 rgba(255, 255, 255, .035),
      0 8px 18px rgba(0, 0, 0, .13);
  }

  .lb-entry-panel .lb-field:hover,
  .lb-admin-grid .lb-check:hover {
    border-color: color-mix(in srgb, var(--lb-blue) 48%, var(--lb-line));
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .14),
      inset 0 -1px 0 rgba(0, 0, 0, .22),
      0 1px 0 rgba(255, 255, 255, .045),
      0 10px 22px rgba(0, 0, 0, .17);
  }

  .lb-entry-panel .lb-field:focus-within,
  .lb-admin-grid .lb-check:focus-within {
    border-color: color-mix(in srgb, var(--lb-blue) 72%, white 10%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-blue) 10%, var(--lb-panel-tint)), var(--lb-panel-tint)) !important;
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--lb-blue) 18%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .18),
      inset 0 -1px 0 rgba(0, 0, 0, .20),
      0 12px 26px rgba(0, 0, 0, .20) !important;
  }

  .lb-entry-panel .lb-field label,
  .lb-admin-grid .lb-check strong {
    display: inline-flex;
    align-items: center;
    min-height: 16px;
    width: fit-content;
    max-width: 100%;
    margin-left: 2px;
    padding: 1px 6px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lb-page-bg) 76%, var(--lb-blue) 10%);
    color: var(--lb-muted) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .10),
      0 1px 0 rgba(0, 0, 0, .16);
  }

  .lb-entry-panel .lb-field:focus-within label {
    color: var(--lb-blue) !important;
    background: color-mix(in srgb, var(--lb-page-bg) 68%, var(--lb-blue) 18%);
  }

  .lb-entry-panel .lb-input,
  .lb-entry-panel .lb-select,
  .lb-entry-panel .lb-textarea,
  .lb-admin-grid .lb-label-input {
    border-top-color: color-mix(in srgb, var(--lb-line) 45%, white 45%) !important;
    border-left-color: color-mix(in srgb, var(--lb-line) 50%, white 32%) !important;
    border-right-color: color-mix(in srgb, var(--lb-line) 80%, black 18%) !important;
    border-bottom-color: color-mix(in srgb, var(--lb-line) 78%, black 22%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 84%, white 10%) 0%, var(--lb-input-bg) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .16),
      inset 0 -10px 18px rgba(0, 0, 0, .11),
      0 1px 0 rgba(255, 255, 255, .05),
      0 4px 10px rgba(0, 0, 0, .16) !important;
    transform: translateY(0);
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease, background .14s ease;
  }

  .lb-entry-panel .lb-input:hover,
  .lb-entry-panel .lb-select:hover,
  .lb-entry-panel .lb-textarea:hover,
  .lb-admin-grid .lb-label-input:hover {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .18),
      inset 0 -10px 18px rgba(0, 0, 0, .12),
      0 1px 0 rgba(255, 255, 255, .06),
      0 7px 14px rgba(0, 0, 0, .19) !important;
  }

  .lb-entry-panel .lb-input:focus,
  .lb-entry-panel .lb-select:focus,
  .lb-entry-panel .lb-textarea:focus,
  .lb-admin-grid .lb-label-input:focus {
    transform: translateY(-1px);
    border-color: var(--lb-blue) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 78%, var(--lb-blue) 10%) 0%, var(--lb-input-bg) 100%) !important;
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--lb-blue) 18%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .20),
      inset 0 -10px 18px rgba(0, 0, 0, .10),
      0 9px 18px rgba(0, 0, 0, .22) !important;
  }

  .lb-entry-panel .lb-input[readonly] {
    opacity: .86;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 88%, var(--lb-muted) 8%) 0%, var(--lb-input-bg) 100%) !important;
  }

  @media (max-width: 760px) {
    .lb-entry-panel .lb-field,
    .lb-admin-grid .lb-check {
      padding: 6px;
      border-radius: 9px;
    }
  }
}

/* 2026-07-06: final tactile 3D lock for logbook entry cells. */
@media screen {
  .lb-entry-panel .lb-field,
  .lb-admin-grid .lb-check {
    position: relative;
    padding: 5px !important;
    border: 1px solid color-mix(in srgb, var(--lb-line) 62%, white 18%) !important;
    border-radius: 10px !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-panel-tint) 70%, white 7%), var(--lb-panel-tint)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .10),
      inset 0 -1px 0 rgba(0, 0, 0, .20),
      0 1px 0 rgba(255, 255, 255, .035),
      0 8px 18px rgba(0, 0, 0, .13) !important;
  }

  .lb-entry-panel .lb-field:hover,
  .lb-admin-grid .lb-check:hover {
    border-color: color-mix(in srgb, var(--lb-blue) 48%, var(--lb-line)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .14),
      inset 0 -1px 0 rgba(0, 0, 0, .22),
      0 1px 0 rgba(255, 255, 255, .045),
      0 10px 22px rgba(0, 0, 0, .17) !important;
  }

  .lb-entry-panel .lb-field:focus-within,
  .lb-admin-grid .lb-check:focus-within {
    border-color: color-mix(in srgb, var(--lb-blue) 72%, white 10%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-blue) 10%, var(--lb-panel-tint)), var(--lb-panel-tint)) !important;
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--lb-blue) 18%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .18),
      inset 0 -1px 0 rgba(0, 0, 0, .20),
      0 12px 26px rgba(0, 0, 0, .20) !important;
  }

  .lb-entry-panel .lb-field label,
  .lb-admin-grid .lb-check strong {
    display: inline-flex !important;
    align-items: center;
    min-height: 16px;
    width: fit-content;
    max-width: 100%;
    margin-left: 2px;
    padding: 1px 6px !important;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lb-page-bg) 76%, var(--lb-blue) 10%) !important;
    color: var(--lb-muted) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .10),
      0 1px 0 rgba(0, 0, 0, .16);
  }

  .lb-entry-panel .lb-field:focus-within label {
    color: var(--lb-blue) !important;
    background: color-mix(in srgb, var(--lb-page-bg) 68%, var(--lb-blue) 18%) !important;
  }

  .lb-entry-panel .lb-input,
  .lb-entry-panel .lb-select,
  .lb-entry-panel .lb-textarea,
  .lb-admin-grid .lb-label-input {
    border-top-color: color-mix(in srgb, var(--lb-line) 45%, white 45%) !important;
    border-left-color: color-mix(in srgb, var(--lb-line) 50%, white 32%) !important;
    border-right-color: color-mix(in srgb, var(--lb-line) 80%, black 18%) !important;
    border-bottom-color: color-mix(in srgb, var(--lb-line) 78%, black 22%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 84%, white 10%) 0%, var(--lb-input-bg) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .16),
      inset 0 -10px 18px rgba(0, 0, 0, .11),
      0 1px 0 rgba(255, 255, 255, .05),
      0 4px 10px rgba(0, 0, 0, .16) !important;
    transform: translateY(0);
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease, background .14s ease;
  }

  .lb-entry-panel .lb-input:hover,
  .lb-entry-panel .lb-select:hover,
  .lb-entry-panel .lb-textarea:hover,
  .lb-admin-grid .lb-label-input:hover {
    transform: translateY(-1px);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .18),
      inset 0 -10px 18px rgba(0, 0, 0, .12),
      0 1px 0 rgba(255, 255, 255, .06),
      0 7px 14px rgba(0, 0, 0, .19) !important;
  }

  .lb-entry-panel .lb-input:focus,
  .lb-entry-panel .lb-select:focus,
  .lb-entry-panel .lb-textarea:focus,
  .lb-admin-grid .lb-label-input:focus {
    transform: translateY(-1px);
    border-color: var(--lb-blue) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 78%, var(--lb-blue) 10%) 0%, var(--lb-input-bg) 100%) !important;
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--lb-blue) 18%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .20),
      inset 0 -10px 18px rgba(0, 0, 0, .10),
      0 9px 18px rgba(0, 0, 0, .22) !important;
  }

  .lb-entry-panel .lb-input[readonly] {
    opacity: .86;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 88%, var(--lb-muted) 8%) 0%, var(--lb-input-bg) 100%) !important;
  }

  @media (max-width: 760px) {
    .lb-entry-panel .lb-field,
    .lb-admin-grid .lb-check {
      padding: 6px !important;
      border-radius: 9px !important;
    }
  }
}

/* 2026-07-06: live theme switch support for the SMC topbar Theme button. */
@media screen {
  html[data-theme="midnight"],
  body[data-theme="midnight"],
  .lb-app[data-theme="midnight"] {
    --lb-page-bg: #06111f;
    --lb-page-grad-a: rgba(33, 200, 246, .13);
    --lb-page-grad-b: rgba(25, 224, 171, .045);
    --lb-surface-bg: rgba(8, 25, 38, .94);
    --lb-surface-strong: rgba(11, 34, 48, .96);
    --lb-panel-tint: rgba(6, 17, 31, .48);
    --lb-input-bg: #061321;
    --lb-table-head-bg: #0f3040;
    --lb-table-row-bg: #081c2a;
    --lb-table-row-alt-bg: #0a2230;
    --lb-line: rgba(100, 205, 225, .24);
    --lb-line-strong: rgba(34, 211, 238, .48);
    --lb-text-dark: #f4fbff;
    --lb-muted: #9db9c7;
    --lb-blue: #21c8f6;
    --lb-teal: #19e0ab;
    --lb-chart-text: #e5f8ff;
    --lb-chart-muted: #a5becb;
    --lb-chart-grid: rgba(105, 205, 225, .22);
    --lb-chart-soft-grid: rgba(105, 205, 225, .12);
  }

  html[data-theme="ocean"],
  body[data-theme="ocean"],
  .lb-app[data-theme="ocean"] {
    --lb-page-bg: #052025;
    --lb-page-grad-a: rgba(0, 216, 162, .14);
    --lb-page-grad-b: rgba(31, 192, 255, .06);
    --lb-surface-bg: rgba(7, 42, 47, .94);
    --lb-surface-strong: rgba(8, 52, 58, .96);
    --lb-panel-tint: rgba(2, 25, 28, .50);
    --lb-input-bg: #041a1f;
    --lb-table-head-bg: #0c3f46;
    --lb-table-row-bg: #07272e;
    --lb-table-row-alt-bg: #082f35;
    --lb-line: rgba(0, 216, 162, .26);
    --lb-line-strong: rgba(0, 216, 162, .52);
    --lb-text-dark: #eefdfa;
    --lb-muted: #9ac8c5;
    --lb-blue: #32c8ff;
    --lb-teal: #24e4ac;
    --lb-chart-text: #ecfffb;
    --lb-chart-muted: #a4cbc8;
    --lb-chart-grid: rgba(72, 218, 190, .22);
    --lb-chart-soft-grid: rgba(72, 218, 190, .12);
  }

  html[data-theme="paper"],
  body[data-theme="paper"],
  .lb-app[data-theme="paper"] {
    --lb-page-bg: #eef5f8;
    --lb-page-grad-a: rgba(33, 160, 200, .14);
    --lb-page-grad-b: rgba(25, 184, 148, .06);
    --lb-surface-bg: rgba(255, 255, 255, .96);
    --lb-surface-strong: rgba(247, 252, 255, .98);
    --lb-panel-tint: rgba(232, 244, 249, .82);
    --lb-input-bg: #ffffff;
    --lb-table-head-bg: #dceef6;
    --lb-table-row-bg: #ffffff;
    --lb-table-row-alt-bg: #f1f8fb;
    --lb-line: rgba(38, 116, 150, .22);
    --lb-line-strong: rgba(0, 136, 180, .36);
    --lb-text-dark: #0b2230;
    --lb-muted: #607c8c;
    --lb-blue: #007faa;
    --lb-teal: #008d73;
    --lb-chart-text: #0b2230;
    --lb-chart-muted: #506c7c;
    --lb-chart-grid: rgba(42, 107, 138, .22);
    --lb-chart-soft-grid: rgba(42, 107, 138, .12);
  }

  html[data-theme="charcoal"],
  body[data-theme="charcoal"],
  .lb-app[data-theme="charcoal"] {
    --lb-page-bg: #111820;
    --lb-page-grad-a: rgba(255, 107, 53, .12);
    --lb-page-grad-b: rgba(33, 200, 246, .04);
    --lb-surface-bg: rgba(22, 31, 39, .95);
    --lb-surface-strong: rgba(28, 39, 48, .97);
    --lb-panel-tint: rgba(12, 18, 24, .52);
    --lb-input-bg: #0b1118;
    --lb-table-head-bg: #25323d;
    --lb-table-row-bg: #141d26;
    --lb-table-row-alt-bg: #18232c;
    --lb-line: rgba(255, 146, 92, .24);
    --lb-line-strong: rgba(255, 146, 92, .44);
    --lb-text-dark: #f7fbff;
    --lb-muted: #b3bdc7;
    --lb-blue: #45c8ff;
    --lb-teal: #ff8b52;
    --lb-chart-text: #f7fbff;
    --lb-chart-muted: #b3bdc7;
    --lb-chart-grid: rgba(255, 146, 92, .20);
    --lb-chart-soft-grid: rgba(255, 146, 92, .10);
  }

  html[data-theme="slate"],
  body[data-theme="slate"],
  .lb-app[data-theme="slate"] {
    --lb-page-bg: #10172a;
    --lb-page-grad-a: rgba(122, 90, 224, .13);
    --lb-page-grad-b: rgba(33, 200, 246, .05);
    --lb-surface-bg: rgba(18, 28, 48, .95);
    --lb-surface-strong: rgba(22, 34, 58, .97);
    --lb-panel-tint: rgba(9, 15, 28, .52);
    --lb-input-bg: #090f1c;
    --lb-table-head-bg: #202b46;
    --lb-table-row-bg: #121c32;
    --lb-table-row-alt-bg: #16223a;
    --lb-line: rgba(143, 168, 255, .24);
    --lb-line-strong: rgba(143, 168, 255, .44);
    --lb-text-dark: #f4f8ff;
    --lb-muted: #aab7d0;
    --lb-blue: #7fb4ff;
    --lb-teal: #35d7c7;
    --lb-chart-text: #f4f8ff;
    --lb-chart-muted: #aab7d0;
    --lb-chart-grid: rgba(143, 168, 255, .20);
    --lb-chart-soft-grid: rgba(143, 168, 255, .10);
  }

  html[data-theme="nord"],
  body[data-theme="nord"],
  .lb-app[data-theme="nord"] {
    --lb-page-bg: #0d1b24;
    --lb-page-grad-a: rgba(78, 205, 196, .13);
    --lb-page-grad-b: rgba(136, 192, 208, .06);
    --lb-surface-bg: rgba(17, 35, 45, .95);
    --lb-surface-strong: rgba(21, 44, 55, .97);
    --lb-panel-tint: rgba(8, 20, 27, .52);
    --lb-input-bg: #07141b;
    --lb-table-head-bg: #203946;
    --lb-table-row-bg: #112633;
    --lb-table-row-alt-bg: #142d3a;
    --lb-line: rgba(136, 192, 208, .25);
    --lb-line-strong: rgba(78, 205, 196, .45);
    --lb-text-dark: #eef8fb;
    --lb-muted: #a9c1c9;
    --lb-blue: #8bd8f0;
    --lb-teal: #4ecdc4;
    --lb-chart-text: #eef8fb;
    --lb-chart-muted: #a9c1c9;
    --lb-chart-grid: rgba(136, 192, 208, .20);
    --lb-chart-soft-grid: rgba(136, 192, 208, .10);
  }

  html[data-theme="dracula"],
  body[data-theme="dracula"],
  .lb-app[data-theme="dracula"] {
    --lb-page-bg: #141421;
    --lb-page-grad-a: rgba(255, 59, 92, .13);
    --lb-page-grad-b: rgba(33, 200, 246, .045);
    --lb-surface-bg: rgba(25, 25, 40, .95);
    --lb-surface-strong: rgba(32, 31, 49, .97);
    --lb-panel-tint: rgba(12, 12, 22, .54);
    --lb-input-bg: #0d0d18;
    --lb-table-head-bg: #2b2a42;
    --lb-table-row-bg: #181827;
    --lb-table-row-alt-bg: #1e1d2f;
    --lb-line: rgba(255, 93, 122, .25);
    --lb-line-strong: rgba(255, 93, 122, .45);
    --lb-text-dark: #fbf7ff;
    --lb-muted: #c2b8cf;
    --lb-blue: #67d9ff;
    --lb-teal: #ff6f91;
    --lb-chart-text: #fbf7ff;
    --lb-chart-muted: #c2b8cf;
    --lb-chart-grid: rgba(255, 93, 122, .20);
    --lb-chart-soft-grid: rgba(255, 93, 122, .10);
  }

  html[data-theme="solarized"],
  body[data-theme="solarized"],
  .lb-app[data-theme="solarized"] {
    --lb-page-bg: #10222a;
    --lb-page-grad-a: rgba(255, 159, 28, .13);
    --lb-page-grad-b: rgba(0, 183, 232, .05);
    --lb-surface-bg: rgba(18, 39, 47, .95);
    --lb-surface-strong: rgba(22, 48, 57, .97);
    --lb-panel-tint: rgba(8, 20, 26, .53);
    --lb-input-bg: #07161c;
    --lb-table-head-bg: #243d47;
    --lb-table-row-bg: #132a32;
    --lb-table-row-alt-bg: #17313a;
    --lb-line: rgba(255, 180, 75, .25);
    --lb-line-strong: rgba(255, 180, 75, .45);
    --lb-text-dark: #f8fbf2;
    --lb-muted: #bac4b2;
    --lb-blue: #4fc3ff;
    --lb-teal: #ffb44b;
    --lb-chart-text: #f8fbf2;
    --lb-chart-muted: #bac4b2;
    --lb-chart-grid: rgba(255, 180, 75, .20);
    --lb-chart-soft-grid: rgba(255, 180, 75, .10);
  }

  html[data-theme="frost"],
  body[data-theme="frost"],
  .lb-app[data-theme="frost"] {
    --lb-page-bg: #eaf3f7;
    --lb-page-grad-a: rgba(72, 190, 218, .16);
    --lb-page-grad-b: rgba(127, 159, 255, .06);
    --lb-surface-bg: rgba(248, 253, 255, .96);
    --lb-surface-strong: rgba(242, 251, 254, .98);
    --lb-panel-tint: rgba(225, 240, 247, .84);
    --lb-input-bg: #ffffff;
    --lb-table-head-bg: #d5ebf3;
    --lb-table-row-bg: #fbfeff;
    --lb-table-row-alt-bg: #edf7fb;
    --lb-line: rgba(80, 140, 170, .23);
    --lb-line-strong: rgba(23, 144, 188, .36);
    --lb-text-dark: #092235;
    --lb-muted: #5c7788;
    --lb-blue: #008ebd;
    --lb-teal: #009b83;
    --lb-chart-text: #092235;
    --lb-chart-muted: #526e80;
    --lb-chart-grid: rgba(57, 116, 146, .22);
    --lb-chart-soft-grid: rgba(57, 116, 146, .12);
  }

  html[data-theme="harbor-light"],
  body[data-theme="harbor-light"],
  .lb-app[data-theme="harbor-light"] {
    --lb-page-bg: #f3f7f6;
    --lb-page-grad-a: rgba(0, 155, 131, .13);
    --lb-page-grad-b: rgba(0, 127, 170, .07);
    --lb-surface-bg: rgba(255, 255, 255, .96);
    --lb-surface-strong: rgba(247, 253, 251, .98);
    --lb-panel-tint: rgba(230, 245, 243, .84);
    --lb-input-bg: #ffffff;
    --lb-table-head-bg: #d8eeeb;
    --lb-table-row-bg: #ffffff;
    --lb-table-row-alt-bg: #edf8f6;
    --lb-line: rgba(28, 125, 122, .22);
    --lb-line-strong: rgba(0, 155, 131, .36);
    --lb-text-dark: #0b282d;
    --lb-muted: #5e7a80;
    --lb-blue: #007faa;
    --lb-teal: #008f78;
    --lb-chart-text: #0b282d;
    --lb-chart-muted: #526f76;
    --lb-chart-grid: rgba(35, 124, 132, .22);
    --lb-chart-soft-grid: rgba(35, 124, 132, .12);
  }

  html,
  body,
  .lb-app {
    background: var(--lb-page-bg) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-app {
    background:
      linear-gradient(180deg, var(--lb-page-grad-a) 0, rgba(33, 200, 246, 0) 250px),
      linear-gradient(90deg, var(--lb-page-bg) 0, color-mix(in srgb, var(--lb-page-bg) 84%, #062034) 48%, var(--lb-page-bg) 100%) !important;
  }

  .lb-sidebar,
  .lb-panel,
  .lb-records-window,
  .lb-modal-card,
  .lb-dashboard-panel,
  .lb-metric,
  .lb-dash-kpi,
  .lb-reading-card,
  .lb-chart-panel,
  .lb-complete-values,
  .lb-tc-health,
  .lb-values-section,
  .lb-value-chip,
  .lb-tc-score > div,
  .lb-dev-group,
  .lb-ai-card {
    background: var(--lb-surface-bg) !important;
    border-color: var(--lb-line) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-entry-panel,
  .lb-hero {
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--lb-blue) 13%, transparent), color-mix(in srgb, var(--lb-teal) 7%, transparent)),
      var(--lb-surface-strong) !important;
    border-color: var(--lb-line-strong) !important;
  }

  .lb-select,
  .lb-input,
  .lb-textarea {
    background: var(--lb-input-bg) !important;
    border-color: var(--lb-line) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-entry-strip span,
  .lb-history-filters,
  .lb-dashboard-controls,
  .lb-segments,
  .lb-ai-panel,
  .lb-sidebar-note,
  .lb-entry-actions,
  .lb-upload-drop {
    background: var(--lb-panel-tint) !important;
    border-color: var(--lb-line) !important;
    color: var(--lb-muted) !important;
  }

  .lb-table th {
    background: var(--lb-table-head-bg) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-table td {
    background: var(--lb-table-row-bg) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-table tr:nth-child(even) td {
    background: var(--lb-table-row-alt-bg) !important;
  }

  .lb-brand strong,
  .lb-vessel-btn strong,
  .lb-panel h2,
  .lb-panel h3,
  .lb-chart-head h3,
  .lb-reading-title,
  .lb-dev-head strong,
  .lb-ai-card strong,
  .lb-metric strong,
  .lb-dash-kpi strong,
  .lb-tc-score strong,
  .lb-value-chip em,
  .lb-value {
    color: var(--lb-text-dark) !important;
  }

  .lb-brand span,
  .lb-muted,
  .lb-hero p,
  .lb-chart-head span,
  .lb-dev-head span:not(.lb-tag),
  .lb-ai-card small,
  .lb-value-chip b,
  .lb-dash-kpi span,
  .lb-dash-kpi small,
  .lb-metric span {
    color: var(--lb-muted) !important;
  }
}

body.lb-print-dashboard {
  --lb-chart-text: #061a2b;
  --lb-chart-muted: #23475f;
  --lb-chart-grid: rgba(18, 74, 108, .24);
  --lb-chart-soft-grid: rgba(18, 74, 108, .14);
}

/* 2026-07-06: SMC standard logbook theme and entry polish. Data/API contracts are unchanged. */
@media screen {
  :root,
  html[data-theme],
  body[data-theme],
  .lb-app[data-theme] {
    --lb-bg: #06111f;
    --lb-panel: #0b2230;
    --lb-panel-2: #0f3040;
    --lb-card: #0d2432;
    --lb-card-soft: #122f3d;
    --lb-line: rgba(100, 205, 225, .24);
    --lb-line-strong: rgba(34, 211, 238, .48);
    --lb-text: #eaf8ff;
    --lb-text-dark: #f4fbff;
    --lb-muted: #9db9c7;
    --lb-blue: #21c8f6;
    --lb-teal: #19e0ab;
    --lb-orange: #ffb44b;
    --lb-red: #ff5d7a;
    --lb-purple: #8fa8ff;
    --lb-shadow: 0 18px 40px rgba(0, 0, 0, .26);
    --lb-chart-text: #e5f8ff;
    --lb-chart-muted: #a5becb;
    --lb-chart-grid: rgba(105, 205, 225, .22);
    --lb-chart-soft-grid: rgba(105, 205, 225, .12);
  }

  html,
  body {
    background: #06111f !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-app {
    min-height: calc(100vh - 52px);
    padding: 12px 14px 18px;
    background:
      linear-gradient(180deg, rgba(33, 200, 246, .13) 0, rgba(33, 200, 246, 0) 250px),
      linear-gradient(90deg, #06111f 0, #0a1a26 48%, #06111f 100%) !important;
  }

  .lb-shell {
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 12px;
  }

  .lb-sidebar,
  .lb-panel,
  .lb-records-window,
  .lb-modal-card,
  .lb-dashboard-panel {
    border: 1px solid var(--lb-line);
    border-radius: 8px;
    background: rgba(11, 34, 48, .94) !important;
    color: var(--lb-text-dark);
    box-shadow: var(--lb-shadow);
  }

  .lb-sidebar {
    top: 58px;
    height: calc(100vh - 72px);
    padding: 10px;
  }

  .lb-brand {
    border-bottom-color: var(--lb-line);
  }

  .lb-brand strong,
  .lb-vessel-btn strong,
  .lb-panel h2,
  .lb-panel h3,
  .lb-chart-head h3,
  .lb-reading-title,
  .lb-dev-head strong,
  .lb-ai-card strong {
    color: var(--lb-text-dark) !important;
  }

  .lb-brand span,
  .lb-muted,
  .lb-hero p,
  .lb-chart-head span,
  .lb-dev-head span:not(.lb-tag),
  .lb-ai-card small,
  .lb-value-chip b,
  .lb-dash-kpi span,
  .lb-dash-kpi small {
    color: var(--lb-muted) !important;
  }

  .lb-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    border: 1px solid var(--lb-line-strong);
    border-radius: 8px;
    background:
      linear-gradient(90deg, rgba(33, 200, 246, .18), rgba(25, 224, 171, .08)),
      rgba(11, 34, 48, .96) !important;
  }

  .lb-kicker,
  .lb-panel-head .lb-section-add,
  .lb-vessel-btn.locked::after {
    color: var(--lb-blue) !important;
  }

  .lb-vessel-btn,
  .lb-nav-btn,
  .lb-btn {
    border-color: rgba(100, 205, 225, .24);
    border-radius: 7px;
    background: rgba(6, 17, 31, .76);
    color: var(--lb-text-dark);
  }

  .lb-vessel-btn.active,
  .lb-nav-btn.active,
  .lb-btn.primary {
    border-color: rgba(25, 224, 171, .55);
    background: linear-gradient(135deg, #087ea4, #00a980) !important;
    color: #f6fffd !important;
    box-shadow: 0 10px 24px rgba(0, 169, 128, .18);
  }

  .lb-btn:hover,
  .lb-vessel-btn:hover {
    border-color: var(--lb-blue);
    transform: translateY(-1px);
  }

  .lb-select,
  .lb-input,
  .lb-textarea {
    min-height: 36px;
    border: 1px solid rgba(100, 205, 225, .28) !important;
    border-radius: 7px;
    background: #061321 !important;
    color: #f5fbff !important;
    caret-color: var(--lb-teal);
  }

  .lb-select option,
  .lb-select optgroup {
    background: #061321;
    color: #f5fbff;
  }

  .lb-select:focus,
  .lb-input:focus,
  .lb-textarea:focus {
    border-color: var(--lb-blue) !important;
    box-shadow: 0 0 0 3px rgba(33, 200, 246, .14) !important;
  }

  .lb-metrics {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    gap: 8px;
  }

  .lb-metric,
  .lb-dash-kpi,
  .lb-reading-card,
  .lb-chart-panel,
  .lb-complete-values,
  .lb-tc-health,
  .lb-values-section,
  .lb-value-chip,
  .lb-tc-score > div,
  .lb-dev-group,
  .lb-ai-card {
    border-color: var(--lb-line) !important;
    border-radius: 8px;
    background: rgba(8, 25, 38, .92) !important;
    color: var(--lb-text-dark) !important;
    box-shadow: none;
  }

  .lb-metric {
    padding: 10px 12px;
  }

  .lb-metric span {
    color: var(--lb-muted) !important;
  }

  .lb-metric strong,
  .lb-dash-kpi strong,
  .lb-tc-score strong,
  .lb-value-chip em,
  .lb-value {
    color: #f6fbff !important;
  }

  .lb-entry-panel {
    border-color: var(--lb-line-strong);
    background:
      linear-gradient(180deg, rgba(33, 200, 246, .08), rgba(33, 200, 246, 0) 210px),
      rgba(11, 34, 48, .96) !important;
  }

  .lb-panel-head {
    border-bottom-color: var(--lb-line);
  }

  .lb-entry-strip span {
    border-color: rgba(33, 200, 246, .26);
    background: rgba(33, 200, 246, .08);
    color: #bfdce8 !important;
  }

  .lb-entry-strip b {
    color: var(--lb-teal);
  }

  .lb-form-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 176px));
    gap: 7px;
  }

  .lb-entry-panel > form > .lb-form-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 190px));
  }

  .lb-form-section {
    margin-top: 9px;
    padding: 9px;
    border-color: rgba(100, 205, 225, .20);
    border-left-color: var(--section-tone);
    background:
      linear-gradient(90deg, rgba(33, 200, 246, .06), rgba(25, 224, 171, .025)),
      rgba(6, 17, 31, .42);
  }

  .lb-section-title {
    margin-bottom: 7px;
  }

  .lb-form-section h3 {
    color: var(--section-tone) !important;
    font-size: 14px;
  }

  .lb-field label {
    color: #9db9c7;
    font-size: 10px;
    letter-spacing: .05em;
  }

  .lb-entry-panel .lb-input,
  .lb-entry-panel .lb-select,
  .lb-entry-panel .lb-textarea {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .lb-textarea {
    min-height: 64px;
  }

  .lb-entry-actions {
    border-color: rgba(100, 205, 225, .28);
    border-radius: 8px;
    background: rgba(6, 17, 31, .92);
  }

  .lb-upload-drop {
    min-height: 78px;
    border-color: rgba(33, 200, 246, .45);
    border-radius: 8px;
    background: rgba(33, 200, 246, .08);
    color: var(--lb-text-dark);
  }

  .lb-table-wrap {
    border-color: var(--lb-line);
    border-radius: 8px;
  }

  .lb-table th {
    background: #0f3040 !important;
    color: #bde7f1 !important;
  }

  .lb-table td,
  .lb-table tr:nth-child(even) td {
    background: #081c2a !important;
    color: #eef9ff !important;
  }

  .lb-table tr:nth-child(even) td {
    background: #0a2230 !important;
  }

  .lb-history-filters,
  .lb-dashboard-controls,
  .lb-segments,
  .lb-ai-panel,
  .lb-sidebar-note {
    border-color: var(--lb-line);
    background: rgba(6, 17, 31, .48);
  }

  .lb-modal {
    background: rgba(0, 0, 0, .72);
  }

  .lb-modal-head {
    border-bottom-color: var(--lb-line);
    background: #0b2230;
  }

  .lb-modal-body {
    background: #06111f;
  }

  .lb-notice {
    border-color: rgba(255, 180, 75, .34);
    background: rgba(255, 180, 75, .10);
    color: #ffdca0;
  }

  .lb-tag {
    background: rgba(33, 200, 246, .14);
    color: #72dcff;
  }

  .lb-tag.ok {
    background: rgba(25, 224, 171, .16);
    color: #5effcf;
  }

  .lb-tag.warn {
    background: rgba(255, 180, 75, .18);
    color: #ffd58f;
  }

  .lb-tag.alarm {
    background: rgba(255, 93, 122, .18);
    color: #ff9caf;
  }

  .lb-bar {
    background: rgba(158, 190, 208, .18);
  }

  .lb-bottom {
    gap: 10px;
  }

  @media (max-width: 1180px) {
    .lb-shell {
      grid-template-columns: 1fr;
    }

    .lb-sidebar {
      position: static;
      height: auto;
    }

    .lb-vessel-list {
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
  }

  @media (max-width: 760px) {
    .lb-app {
      padding: 8px;
    }

    .lb-hero {
      grid-template-columns: 1fr;
      padding: 11px;
    }

    .lb-hero-actions .lb-select,
    .lb-btn,
    .lb-file-row > * {
      width: 100%;
    }

    .lb-metrics,
    .lb-form-grid,
    .lb-entry-panel > form > .lb-form-grid,
    .lb-dashboard-kpis,
    .lb-chart-grid,
    .lb-grid,
    .lb-grid.three,
    .lb-admin-grid {
      grid-template-columns: 1fr !important;
    }

    .lb-compact-reading-grid {
      grid-template-columns: repeat(2, minmax(135px, 1fr));
    }

    .lb-entry-panel .lb-field:not(.wide) {
      max-width: none;
    }

    .lb-content,
    .lb-entry-panel,
    .lb-entry-panel #entryForm,
    .lb-reference-section,
    .lb-reference-workbook {
      min-width: 0 !important;
      max-width: 100% !important;
    }

    .lb-reference-section .lb-section-tools .lb-btn,
    .lb-reference-section .lb-section-tools .lb-section-add {
      width: auto !important;
    }
  }
}

@media screen {
  .lb-reference-workbook {
    padding: 2px 14px 9px;
  }

  .lb-sheet-block,
  .lb-sheet-block:last-child {
    padding: 8px 0 9px;
  }

  .lb-sheet-block.collapsed {
    padding-block: 5px;
  }

  .lb-sheet-block.collapsed .lb-sheet-heading {
    margin-bottom: 0;
  }

  .lb-sheet-block.collapsed .lb-sheet-body,
  .lb-upload-panel.collapsed .lb-collapsible-panel-body {
    display: none;
  }
}

/* 2026-08-29: reference-style machinery workbook, kept on one continuous page. */
@media screen {
  .lb-reference-section {
    --sheet-main: #ff7a45;
    --sheet-aux: #36c8f4;
    --sheet-pressure: #aa84ff;
    --sheet-other: #31d49b;
    overflow: visible !important;
  }

  .lb-reference-workbook {
    padding: 8px 16px 18px;
    overflow-x: auto;
    overflow-y: visible;
    border-top: 1px solid var(--lb-line);
    background: color-mix(in srgb, var(--lb-panel-tint) 94%, var(--lb-page-bg) 6%);
    scrollbar-color: var(--lb-blue) var(--lb-panel-tint);
  }

  .lb-sheet-block {
    min-width: 760px;
    padding: 18px 0 20px;
    border-bottom: 1px solid color-mix(in srgb, var(--lb-line) 78%, transparent);
  }

  .lb-sheet-block:last-child {
    padding-bottom: 4px;
    border-bottom: 0;
  }

  .lb-sheet-block.main { --sheet-tone: var(--sheet-main); }
  .lb-sheet-block.aux { --sheet-tone: var(--sheet-aux); }
  .lb-sheet-block.pressure { --sheet-tone: var(--sheet-pressure); }
  .lb-sheet-block.other { --sheet-tone: var(--sheet-other); }

  .lb-sheet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }

  .lb-sheet-heading > div {
    display: flex;
    align-items: center;
    gap: 9px;
  }

  .lb-sheet-marker {
    width: 4px;
    height: 21px;
    flex: 0 0 4px;
    border-radius: 999px;
    background: var(--sheet-tone);
    box-shadow: 0 0 14px color-mix(in srgb, var(--sheet-tone) 46%, transparent);
  }

  .lb-sheet-heading h4 {
    margin: 0;
    color: var(--lb-text-dark);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: -.015em;
  }

  .lb-sheet-heading small {
    color: color-mix(in srgb, var(--lb-muted) 82%, var(--sheet-tone) 18%);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .045em;
    text-transform: uppercase;
  }

  .lb-sheet-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    color: var(--lb-text-dark);
    font-size: 12px;
  }

  .lb-sheet-table thead th {
    height: 32px;
    padding: 5px 8px;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--lb-line-strong) 72%, var(--sheet-tone) 28%);
    background: transparent !important;
    color: var(--lb-muted) !important;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .045em;
    text-align: center;
    text-transform: uppercase;
  }

  .lb-sheet-table thead th:first-child {
    width: 22%;
    text-align: left;
  }

  .lb-main-sheet thead th:first-child { width: 25%; }
  .lb-aux-sheet thead th:first-child { width: 34%; }
  .lb-other-sheet thead th:first-child { width: 25%; }
  .lb-other-sheet thead th:nth-child(2) { width: 35%; }
  .lb-other-sheet thead th:nth-child(3) { width: 30%; }
  .lb-other-sheet thead th:nth-child(4) { width: 10%; }
  .lb-main-support-sheet thead th:first-child { width: 25%; }
  .lb-main-support-sheet thead th:nth-child(2) { width: 35%; }
  .lb-main-support-sheet thead th:nth-child(3) { width: 30%; }
  .lb-main-support-sheet thead th:nth-child(4) { width: 10%; }
  .lb-pressure-sheet thead th:first-child { width: 25%; }
  .lb-pressure-sheet thead th:nth-child(2) { width: 35%; }
  .lb-pressure-sheet thead th:nth-child(3) { width: 30%; }
  .lb-pressure-sheet thead th:nth-child(4) { width: 10%; }

  @media (min-width: 700px) and (max-width: 900px) {
    .lb-reference-workbook {
      padding-inline: 10px;
    }

    .lb-sheet-block {
      min-width: 0;
    }

    .lb-sheet-table {
      font-size: 11px;
    }

    .lb-sheet-table thead th,
    .lb-sheet-table tbody th,
    .lb-sheet-table tbody td {
      padding-inline: 5px;
    }
  }

  .lb-sheet-subhead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 13px 0 3px;
    padding: 8px 9px;
    border-left: 3px solid var(--sheet-tone);
    background: color-mix(in srgb, var(--sheet-tone) 7%, transparent);
  }

  .lb-sheet-subhead span {
    color: var(--lb-text-dark);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
  }

  .lb-sheet-subhead small {
    color: var(--lb-muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .lb-sheet-table tbody th,
  .lb-sheet-table tbody td {
    height: 43px;
    padding: 5px 7px;
    border-top: 0;
    border-right: 0;
    border-bottom: 1px solid color-mix(in srgb, var(--lb-line) 72%, transparent);
    background: transparent !important;
    vertical-align: middle;
  }

  .lb-sheet-table tbody tr:hover th,
  .lb-sheet-table tbody tr:hover td {
    background: color-mix(in srgb, var(--sheet-tone) 7%, transparent) !important;
  }

  .lb-sheet-table tbody th {
    color: var(--lb-text-dark);
    font-weight: 850;
    line-height: 1.12;
    text-align: left;
  }

  .lb-sheet-table tbody th span {
    display: block;
  }

  .lb-sheet-table tbody th small {
    display: block;
    margin-top: 3px;
    color: var(--sheet-tone);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .035em;
  }

  .lb-sheet-table .lb-matrix-input {
    width: 100%;
    min-height: 31px !important;
    height: 31px;
    padding: 4px 8px !important;
    border: 1px solid color-mix(in srgb, var(--lb-line) 76%, var(--sheet-tone) 24%) !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--lb-input-bg) 96%, var(--sheet-tone) 4%) !important;
    color: var(--lb-text-dark) !important;
    font-size: 12px;
    text-align: center;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18) !important;
    transform: none !important;
  }

  .lb-sheet-table .lb-matrix-input:hover,
  .lb-sheet-table .lb-matrix-input:focus {
    border-color: var(--sheet-tone) !important;
    background: color-mix(in srgb, var(--lb-input-bg) 90%, var(--sheet-tone) 10%) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--sheet-tone) 18%, transparent) !important;
    transform: none !important;
  }

  .lb-sheet-table td.has-value .lb-matrix-input {
    border-color: var(--sheet-tone) !important;
    background: color-mix(in srgb, var(--lb-input-bg) 86%, var(--sheet-tone) 14%) !important;
  }

  .lb-sheet-table .lb-unit-pill {
    color: var(--sheet-tone);
    background: color-mix(in srgb, var(--sheet-tone) 12%, transparent);
  }

  .lb-entry-panel .lb-entry-actions {
    position: static !important;
    bottom: auto !important;
    justify-content: flex-end;
    margin-top: 18px !important;
    box-shadow: none !important;
  }

  html:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) .lb-reference-section,
  body:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) .lb-reference-section,
  .lb-app:is([data-theme="paper"], [data-theme="frost"], [data-theme="harbor-light"]) .lb-reference-section {
    --sheet-main: #c94f27;
    --sheet-aux: #007fa9;
    --sheet-other: #087d61;
  }

  @media (max-width: 760px) {
    .lb-reference-workbook {
      padding-inline: 10px;
    }

    .lb-sheet-block {
      min-width: 720px;
    }
  }
}

/* 2026-08-29: compact Figma-reviewed log-book workbench. */
@media screen {
  .lb-view-entry .lb-content {
    gap: 6px;
  }

  .lb-view-entry .lb-hero {
    min-height: 62px;
    padding: 8px 12px;
  }

  .lb-view-entry .lb-kicker {
    font-size: 9px;
  }

  .lb-view-entry .lb-hero h1 {
    margin: 0;
    font-size: 22px;
    line-height: 1.05;
  }

  .lb-view-entry .lb-hero p {
    margin: 3px 0 0;
    font-size: 11px;
  }

  .lb-view-entry .lb-hero-actions .lb-btn,
  .lb-view-entry .lb-hero-actions .lb-select {
    min-height: 30px;
    padding-top: 5px;
    padding-bottom: 5px;
  }

  .lb-view-entry .lb-metrics {
    gap: 5px;
  }

  .lb-view-entry .lb-metric {
    min-height: 48px;
    padding: 6px 9px;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    align-items: center;
  }

  .lb-view-entry .lb-metric span {
    font-size: 9px;
  }

  .lb-view-entry .lb-metric strong {
    grid-column: 2;
    grid-row: 1 / span 2;
    font-size: 18px;
  }

  .lb-view-entry .lb-metric small {
    font-size: 9px;
  }

  .lb-view-entry .lb-notice {
    min-height: 26px;
  }

  .lb-view-entry .lb-notice-track {
    padding: 5px 8px;
    font-size: 10px;
  }

  .lb-view-entry .lb-entry-panel {
    padding: 7px;
  }

  .lb-view-entry .lb-entry-panel > .lb-panel-head {
    min-height: 36px;
    padding: 3px 4px 6px;
  }

  .lb-view-entry .lb-panel h2 {
    font-size: 18px;
  }

  .lb-view-entry .lb-panel-head .lb-muted {
    font-size: 10px;
  }

  .lb-view-entry .lb-entry-strip {
    margin-bottom: 5px;
  }

  .lb-view-entry .lb-entry-strip span {
    min-height: 22px;
    padding: 2px 7px;
    font-size: 9px;
  }

  .lb-view-entry .lb-entry-panel > form > .lb-form-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
  }

  .lb-view-entry .lb-entry-panel > form > .lb-form-grid .lb-field {
    padding: 3px !important;
    border-radius: 7px !important;
  }

  .lb-view-entry .lb-entry-panel > form > .lb-form-grid .lb-field label {
    padding: 0 4px !important;
    font-size: 8px;
  }

  .lb-view-entry .lb-entry-panel > form > .lb-form-grid .lb-input {
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
  }

  .lb-matrix-workbench {
    margin-top: 7px;
    border: 1px solid var(--lb-line);
    border-radius: 9px;
    overflow: hidden;
    background: var(--lb-panel-tint);
  }

  .lb-matrix-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    padding: 4px;
    background: color-mix(in srgb, var(--lb-page-bg) 84%, var(--lb-blue) 8%);
  }

  .lb-matrix-tab {
    min-height: 34px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: var(--lb-muted);
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 900;
    cursor: pointer;
  }

  .lb-matrix-tab b {
    display: inline-grid;
    min-width: 21px;
    height: 21px;
    margin-left: 5px;
    place-items: center;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lb-input-bg) 78%, var(--lb-blue) 22%);
    color: var(--lb-blue);
    font-size: 9px;
  }

  .lb-matrix-tab.active {
    border-color: color-mix(in srgb, var(--lb-blue) 58%, var(--lb-line));
    color: #f4fcff;
    background: linear-gradient(135deg, color-mix(in srgb, var(--lb-blue) 72%, #06364a), color-mix(in srgb, var(--lb-teal) 58%, #063c34));
  }

  .lb-matrix-tab.active b {
    color: #061321;
    background: #f0fffb;
  }

  .lb-matrix-deck .lb-matrix-section[data-matrix-panel] {
    display: none;
    margin: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }

  .lb-matrix-deck .lb-matrix-section[data-matrix-panel].active {
    display: block;
  }

  .lb-matrix-section .lb-section-title {
    min-height: 52px;
    padding: 8px 11px;
  }

  .lb-matrix-note {
    margin-top: 2px;
    font-size: 9px;
  }

  .lb-matrix-count {
    padding: 4px 7px;
    font-size: 8px;
  }

  .lb-matrix-wrap {
    max-height: 360px;
  }

  .lb-temperature-matrix .lb-matrix-wrap {
    max-height: 328px;
  }

  .lb-matrix thead th {
    height: 36px;
    padding: 5px 8px;
    font-size: 9px;
  }

  .lb-matrix th,
  .lb-matrix td {
    height: 42px;
    padding: 4px 8px;
    font-size: 11px;
  }

  .lb-matrix-input {
    min-height: 30px;
    padding: 4px 7px;
    font-size: 13px;
  }

  .lb-unit-pill {
    padding: 3px 7px;
    font-size: 10px;
  }

  .lb-view-entry .lb-matrix-workbench + .lb-form-section {
    margin-top: 7px;
  }

  @media (max-width: 1100px) {
    .lb-view-entry .lb-entry-panel > form > .lb-form-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr));
    }
  }

  @media (max-width: 760px) {
    .lb-view-entry .lb-entry-panel > form > .lb-form-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .lb-matrix-tabs {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
}

[data-theme="daylight"],
[data-theme="light"],
body[data-theme="daylight"],
body[data-theme="light"] {
  --lb-bg: #eef5f8;
  --lb-panel: #ffffff;
  --lb-panel-2: #edf7fb;
  --lb-text-dark: #071727;
  --lb-line: rgba(30, 110, 150, .24);
}

[data-theme="paper"],
body[data-theme="paper"],
[data-theme="frost"],
body[data-theme="frost"],
[data-theme="harbor-light"],
body[data-theme="harbor-light"] {
  --lb-bg: #edf4f7;
  --lb-panel: #ffffff;
  --lb-panel-2: #eef8fb;
  --lb-card: #ffffff;
  --lb-card-soft: #f4fbfd;
  --lb-text-dark: #071727;
  --lb-line: rgba(30, 110, 150, .24);
  --lb-shadow: 0 14px 34px rgba(2, 15, 28, .12);
}

[data-theme="ocean"],
body[data-theme="ocean"] {
  --lb-bg: #071e27;
  --lb-panel: #0b2833;
  --lb-panel-2: #0e3a45;
  --lb-text-dark: #e6fbff;
  --lb-line: rgba(0, 216, 162, .28);
}

[data-theme="midnight"],
[data-theme="dark"],
body[data-theme="midnight"],
body[data-theme="dark"] {
  --lb-bg: #071321;
  --lb-panel: #0d2034;
  --lb-panel-2: #102a43;
  --lb-text-dark: #dceeff;
  --lb-line: rgba(75, 148, 191, .28);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--lb-bg);
  color: var(--lb-text-dark);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button, input, select, textarea {
  font: inherit;
}

.lb-app {
  min-height: calc(100vh - 52px);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(0, 186, 232, .08), transparent 300px),
    var(--lb-bg);
}

.lb-loading {
  display: grid;
  gap: 8px;
  max-width: 620px;
  margin: 80px auto;
  padding: 28px;
  border: 1px solid var(--lb-line);
  border-radius: 14px;
  background: var(--lb-panel);
  text-align: center;
}

.lb-shell {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 14px;
}

.lb-sidebar,
.lb-panel,
.lb-records-window,
.lb-modal-card {
  border: 1px solid var(--lb-line);
  border-radius: 14px;
  background: var(--lb-panel);
  box-shadow: var(--lb-shadow);
}

.lb-sidebar {
  position: sticky;
  top: 62px;
  height: calc(100vh - 82px);
  padding: 14px;
  overflow: auto;
}

.lb-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--lb-line);
}

.lb-brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.lb-brand strong {
  display: block;
  font-size: 22px;
  letter-spacing: .22em;
}

.lb-brand span,
.lb-small,
.lb-muted {
  color: #8bb1c2;
  font-size: 12px;
}

.lb-vessel-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.lb-vessel-btn,
.lb-nav-btn,
.lb-btn {
  border: 1px solid var(--lb-line);
  border-radius: 10px;
  background: rgba(2, 15, 28, .45);
  color: var(--lb-text-dark);
  cursor: pointer;
  transition: .16s ease;
}

.lb-vessel-btn {
  display: grid;
  gap: 3px;
  padding: 11px;
  text-align: left;
}

.lb-vessel-btn strong {
  color: #fff;
  font-size: 15px;
}

.lb-vessel-btn.active,
.lb-nav-btn.active,
.lb-btn.primary {
  background: linear-gradient(135deg, #00b7e8, #00d8a2);
  border-color: transparent;
  color: #041522;
  font-weight: 800;
}

.lb-vessel-btn.locked::after {
  content: "Assigned vessel";
  color: var(--lb-teal);
  font-size: 11px;
  font-weight: 700;
}

.lb-sidebar-note {
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed var(--lb-line);
  border-radius: 10px;
  color: #9fc1ce;
  font-size: 12px;
  line-height: 1.4;
}

.lb-content {
  min-width: 0;
  display: grid;
  gap: 14px;
}

.lb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid rgba(90, 204, 242, .35);
  border-radius: 16px;
  background:
    radial-gradient(circle at 12% 0, rgba(0, 183, 232, .18), transparent 42%),
    linear-gradient(135deg, var(--lb-panel-2), var(--lb-panel));
}

.lb-kicker {
  color: var(--lb-blue);
  font-weight: 900;
  letter-spacing: .18em;
  font-size: 12px;
  text-transform: uppercase;
}

.lb-hero h1 {
  margin: 5px 0 6px;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.05;
}

.lb-hero p {
  margin: 0;
  color: #a6c4d0;
}

.lb-hero-actions,
.lb-toolbar,
.lb-panel-head,
.lb-tools,
.lb-segments,
.lb-file-row,
.lb-entry-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.lb-hero-actions {
  justify-content: flex-start;
  max-width: 720px;
}

.lb-hero-actions .lb-select {
  width: auto;
  min-width: 190px;
  max-width: 240px;
}

.lb-select,
.lb-input,
.lb-textarea {
  width: 100%;
  border: 1px solid var(--lb-line);
  border-radius: 9px;
  background: rgba(3, 15, 28, .62);
  color: var(--lb-text-dark);
  padding: 10px 12px;
  outline: none;
}

.lb-select:focus,
.lb-input:focus,
.lb-textarea:focus {
  border-color: var(--lb-blue);
  box-shadow: 0 0 0 3px rgba(0, 183, 232, .16);
}

.lb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 8px 13px;
  text-decoration: none;
}

.lb-btn:hover,
.lb-vessel-btn:hover {
  transform: translateY(-1px);
  border-color: var(--lb-blue);
}

.lb-btn.danger {
  color: #fff;
  border-color: rgba(255, 56, 100, .5);
  background: rgba(255, 56, 100, .12);
}

.lb-record-action-head {
  min-width: 150px;
}

.lb-record-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

.lb-amend-banner {
  display: grid;
  grid-template-columns: auto 1fr minmax(260px, 420px);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--lb-blue) 48%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--lb-table-row-bg) 84%, var(--lb-blue) 16%);
}

.lb-amend-banner label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 900px) {
  .lb-amend-banner {
    grid-template-columns: 1fr;
  }
}

.lb-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.lb-metric {
  padding: 15px;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  background: var(--lb-card);
  color: var(--lb-text);
}

.lb-metric span {
  display: block;
  color: #6d8596;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lb-metric strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.lb-notice {
  overflow: hidden;
  border: 1px solid rgba(255, 159, 28, .36);
  border-radius: 12px;
  background: rgba(255, 159, 28, .1);
  color: #ffd48a;
}

.lb-notice-track {
  display: inline-flex;
  gap: 28px;
  white-space: nowrap;
  padding: 10px 14px;
  animation: lbMarquee 47s linear infinite;
}

@keyframes lbMarquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.lb-panel {
  padding: 15px;
}

.lb-panel-head {
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--lb-line);
}

.lb-history-panel {
  overflow: hidden;
}

.lb-history-head {
  justify-content: flex-start;
  align-items: flex-start;
  gap: 18px;
}

.lb-history-actions {
  order: -1;
  flex: none;
  justify-content: flex-start;
}

.lb-history-head > div:last-child {
  min-width: 220px;
}

.lb-history-filters {
  justify-content: flex-start;
}

.lb-history-filters .lb-input {
  width: auto;
  min-width: 150px;
}

.lb-dashboard-panel {
  background:
    radial-gradient(circle at 20% 0, rgba(0, 183, 232, .12), transparent 32%),
    var(--lb-panel);
}

.lb-dashboard-controls,
.lb-history-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  background: rgba(3, 15, 28, .24);
}

.lb-dashboard-controls .lb-field {
  min-width: min(520px, 100%);
  flex: 1;
}

.lb-dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.lb-dash-kpi {
  position: relative;
  overflow: hidden;
  min-height: 92px;
  padding: 13px 14px;
  border: 1px solid rgba(91, 148, 181, .28);
  border-radius: 12px;
  background: linear-gradient(160deg, #f8fcff, #eef8fb);
  color: #0a2134;
  box-shadow: 0 10px 22px rgba(4, 18, 32, .08);
}

.lb-dash-kpi::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--lb-blue);
}

.lb-dash-kpi.ok::before,
.lb-dash-kpi.teal::before { background: var(--lb-teal); }
.lb-dash-kpi.warn::before,
.lb-dash-kpi.orange::before { background: var(--lb-orange); }
.lb-dash-kpi.alarm::before { background: var(--lb-red); }
.lb-dash-kpi.purple::before { background: var(--lb-purple); }

.lb-dash-kpi span {
  display: block;
  color: #5e788a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lb-dash-kpi strong {
  display: block;
  margin-top: 6px;
  font-size: 26px;
  line-height: 1;
  color: #071727;
}

.lb-dash-kpi small {
  display: block;
  margin-top: 7px;
  color: #6d8596;
  font-size: 12px;
}

.lb-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.lb-chart-grid-trend {
  grid-template-columns: 1fr;
}

.lb-chart-panel {
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(91, 148, 181, .28);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255,255,255,.97), rgba(241,249,252,.97));
  color: #0a2134;
  box-shadow: 0 12px 26px rgba(4, 18, 32, .08);
}

.lb-chart-panel.full {
  grid-column: 1 / -1;
}

.lb-chart-head {
  display: grid;
  gap: 4px;
  margin-bottom: 10px;
}

.lb-chart-head h3 {
  margin: 0;
  color: #09243a;
  font-size: 17px;
  line-height: 1.2;
}

.lb-chart-head span {
  color: #63798a;
  font-size: 12px;
}

.lb-chart-wrap {
  position: relative;
  height: 280px;
}

.lb-chart-wrap.tall {
  height: 340px;
}

.lb-chart-panel canvas {
  color: #123047;
}

.lb-complete-values {
  background: linear-gradient(180deg, rgba(249,253,255,.98), rgba(235,248,252,.98));
}

.lb-values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px;
}

.lb-values-section {
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(91, 148, 181, .22);
  border-radius: 12px;
  background: rgba(255,255,255,.72);
}

.lb-values-section h4 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0 0 8px;
  color: #09243a;
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.lb-values-section h4 small {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0,183,232,.12);
  color: #007ca7;
  text-align: center;
  font-size: 11px;
}

.lb-values-section > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 6px;
}

.lb-value-chip {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(91, 148, 181, .2);
  border-radius: 9px;
  background: rgba(245,251,253,.92);
}

.lb-value-chip b {
  overflow: hidden;
  color: #49697d;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.lb-value-chip em {
  overflow: hidden;
  color: #061a2b;
  font-style: normal;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-tc-health {
  background: linear-gradient(160deg, #f7fcff, #eef8fb);
}

.lb-tc-score {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.lb-tc-score .lb-tc-rotor {
  border-color: rgba(2, 216, 162, .42);
  background: linear-gradient(145deg, rgba(2,216,162,.12), rgba(0,183,232,.08));
}

.lb-tc-score .lb-tc-rotor strong {
  color: #007f69;
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}

.lb-tc-score > div {
  padding: 12px;
  border: 1px solid rgba(91, 148, 181, .26);
  border-radius: 10px;
  background: rgba(255,255,255,.78);
}

.lb-tc-score span {
  display: block;
  color: #5e788a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lb-tc-score strong {
  display: block;
  margin-top: 5px;
  color: #071727;
  font-size: 22px;
  line-height: 1.15;
}

.lb-tc-score small {
  display: block;
  margin-top: 5px;
  color: #5f788a;
  font-size: 12px;
}

.lb-tc-score.warn > div:first-child {
  border-left: 4px solid var(--lb-orange);
}

.lb-tc-score.alarm > div:first-child {
  border-left: 4px solid var(--lb-red);
}

.lb-tc-score.ok > div:first-child {
  border-left: 4px solid var(--lb-teal);
}

.lb-tc-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.lb-tc-pill {
  padding: 7px 9px;
  border-radius: 999px;
  border: 1px solid rgba(91, 148, 181, .28);
  background: rgba(0, 183, 232, .08);
  color: #123047;
  font-size: 12px;
  font-weight: 900;
}

.lb-tc-pill.warn {
  background: rgba(255, 159, 28, .12);
  border-color: rgba(255, 159, 28, .34);
}

.lb-tc-pill.alarm {
  background: rgba(255, 56, 100, .12);
  border-color: rgba(255, 56, 100, .34);
}

.lb-table-wrap.compact {
  max-height: none;
}

.lb-deviation-table {
  min-width: 720px;
}

.lb-deviation-table th,
.lb-deviation-table td {
  text-align: center;
}

.lb-dev-system {
  display: grid;
  gap: 12px;
}

.lb-dev-group {
  border: 1px solid rgba(91, 148, 181, .24);
  border-radius: 12px;
  background: rgba(255,255,255,.66);
  overflow: hidden;
}

.lb-dev-group.warn {
  border-color: rgba(255, 159, 28, .42);
}

.lb-dev-group.alarm {
  border-color: rgba(255, 56, 100, .42);
}

.lb-dev-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(91, 148, 181, .2);
}

.lb-dev-head strong {
  display: block;
  color: #071727;
  font-size: 15px;
}

.lb-dev-head span:not(.lb-tag) {
  display: block;
  margin-top: 3px;
  color: #607b8d;
  font-size: 12px;
}

.lb-segments {
  border: 1px solid var(--lb-line);
  border-radius: 10px;
  padding: 4px;
  background: rgba(3, 15, 28, .42);
}

.lb-panel h2,
.lb-panel h3 {
  margin: 0;
}

.lb-panel h2 {
  font-size: 20px;
}

.lb-panel h3 {
  font-size: 15px;
}

.lb-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.lb-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.lb-reading-card {
  padding: 13px;
  border: 1px solid rgba(12, 65, 96, .16);
  border-radius: 12px;
  background: var(--lb-card);
  color: var(--lb-text);
}

.lb-reading-card,
.lb-ai-card {
  box-shadow: 0 8px 20px rgba(4, 18, 32, .08);
}

.lb-reading-title {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  color: #5f7788;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lb-bar-row {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(160px, 2.2fr) 68px;
  gap: 9px;
  align-items: center;
  min-height: 30px;
  font-size: 13px;
}

.lb-trend-card {
  margin-top: 12px;
}

.lb-trend-row {
  display: grid;
  grid-template-columns: 160px minmax(160px, 1fr) 90px;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-bottom: 1px solid rgba(91, 148, 181, .16);
  color: var(--lb-text);
}

.lb-trend-row b {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.lb-bar {
  height: 14px;
  border-radius: 999px;
  background: #dbe8ef;
  overflow: hidden;
}

.lb-bar > span {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--lb-blue), var(--lb-teal));
}

.lb-bar.warn > span { background: linear-gradient(90deg, var(--lb-orange), #ffd166); }
.lb-bar.alarm > span { background: linear-gradient(90deg, var(--lb-red), #ff8fab); }

.lb-value {
  text-align: right;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}

.lb-table-wrap {
  overflow: auto;
  max-height: 58vh;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
}

.lb-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1480px;
}

.lb-table th,
.lb-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(91, 148, 181, .2);
  text-align: left;
  vertical-align: top;
}

.lb-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #dff0f7;
  color: #29465a;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lb-table td {
  background: #f8fcff;
  color: #10283a;
  font-size: 13px;
  white-space: nowrap;
}

.lb-table tr:nth-child(even) td {
  background: #eef8f9;
}

.lb-tag {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(0, 183, 232, .12);
  color: #007eaa;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.lb-tag.ok { color: #007a52; background: rgba(2, 216, 162, .16); }
.lb-tag.warn { color: #985d00; background: rgba(255, 159, 28, .2); }
.lb-tag.alarm { color: #b00032; background: rgba(255, 56, 100, .16); }

.lb-admin-field {
  display: grid;
  gap: 8px;
  align-items: start;
}

.lb-admin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.lb-admin-row strong {
  overflow: hidden;
  color: #7f9bad;
  font-size: 11px;
  letter-spacing: .04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lb-label-input {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
  font-weight: 800;
}

.lb-ai-panel {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  background: rgba(3, 15, 28, .22);
}

.lb-ai-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.lb-ai-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid rgba(255, 159, 28, .34);
  border-radius: 12px;
  background: #fff7eb;
  color: #10283a;
}

.lb-ai-card.critical {
  border-color: rgba(255, 56, 100, .45);
  background: #fff0f3;
}

.lb-ai-card.info,
.lb-ai-card.ok {
  border-color: rgba(2, 216, 162, .34);
  background: #ecfff9;
}

.lb-ai-card strong {
  font-size: 15px;
}

.lb-ai-card small {
  color: #63798a;
}

.lb-ai-card p {
  margin: 0;
  font-size: 14px;
}

.lb-ai-card em {
  color: #0a7457;
  font-size: 13px;
  font-style: normal;
}

.lb-rpm-direct {
  min-width: 92px;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
  letter-spacing: .03em;
}

.lb-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  padding: 18px;
  background: rgba(0, 0, 0, .62);
}

.lb-modal.open {
  display: grid;
  place-items: center;
}

.lb-records-window,
.lb-modal-card {
  width: min(1720px, 98vw);
  max-height: 94vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--lb-card);
  color: var(--lb-text);
}

.lb-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #cfe0e8;
}

.lb-modal-body {
  overflow: auto;
  padding: 14px;
}

.lb-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 10px;
}

.lb-form-section {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--lb-line);
  border-radius: 12px;
  background: rgba(237, 247, 251, .06);
}

.lb-form-section h3 {
  margin: 0;
  color: #9ddaf3;
}

.lb-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lb-section-add {
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(0, 216, 162, .45);
  border-radius: 999px;
  background: rgba(0, 216, 162, .13);
  color: var(--lb-teal);
  font-size: 12px;
  font-weight: 900;
}

.lb-panel-head .lb-section-add {
  flex: none;
}

.lb-field {
  display: grid;
  gap: 5px;
}

.lb-field label {
  color: #9fbfce;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.lb-field.wide {
  grid-column: 1 / -1;
}

.lb-textarea {
  min-height: 92px;
  resize: vertical;
}

.lb-admin-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.lb-check {
  display: flex;
  gap: 7px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--lb-line);
  border-radius: 9px;
  color: #cbe6f1;
  font-size: 13px;
}

.lb-upload-drop {
  display: grid;
  place-items: center;
  min-height: 92px;
  border: 1px dashed var(--lb-blue);
  border-radius: 12px;
  background: rgba(0, 183, 232, .08);
  cursor: pointer;
  text-align: center;
}

.lb-upload-drop input {
  display: none;
}

.lb-bottom {
  display: grid;
  gap: 12px;
}

.lb-empty {
  padding: 26px;
  border: 1px dashed var(--lb-line);
  border-radius: 12px;
  color: #9ebed0;
  text-align: center;
}

/* 2026-07-05: compact data-entry focused logbook skin. Data/API contracts are unchanged. */
.lb-app {
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(0, 183, 232, .07), transparent 220px),
    linear-gradient(135deg, rgba(2, 216, 162, .04), transparent 55%),
    var(--lb-bg);
}

.lb-shell {
  grid-template-columns: 196px minmax(0, 1fr);
  gap: 10px;
}

.lb-sidebar {
  top: 58px;
  height: calc(100vh - 70px);
  padding: 10px;
  border-radius: 10px;
}

.lb-brand {
  gap: 8px;
  padding-bottom: 10px;
}

.lb-brand img {
  width: 34px;
  height: 34px;
}

.lb-brand strong {
  font-size: 18px;
}

.lb-vessel-list {
  gap: 6px;
  margin-top: 10px;
}

.lb-vessel-btn {
  padding: 9px;
  border-radius: 8px;
}

.lb-vessel-btn strong {
  font-size: 13px;
}

.lb-sidebar-note {
  padding: 8px;
  font-size: 11px;
}

.lb-content {
  gap: 10px;
}

.lb-hero {
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(0, 183, 232, .14), rgba(2, 216, 162, .06)),
    var(--lb-panel);
}

.lb-kicker {
  font-size: 10px;
  letter-spacing: .12em;
}

.lb-hero h1 {
  margin: 2px 0;
  font-size: clamp(22px, 2.1vw, 30px);
}

.lb-hero p {
  font-size: 13px;
}

.lb-hero-actions {
  justify-content: flex-end;
}

.lb-btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 8px;
  font-weight: 800;
}

.lb-btn.primary {
  background: linear-gradient(135deg, var(--lb-blue), var(--lb-teal));
  color: #061321;
}

.lb-select,
.lb-input,
.lb-textarea {
  min-height: 40px;
  border-radius: 8px;
  background: rgba(2, 15, 28, .72);
}

.lb-metrics {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
}

.lb-metric {
  padding: 10px 12px;
  border-radius: 9px;
}

.lb-metric strong {
  font-size: 22px;
}

.lb-notice {
  border-radius: 9px;
}

.lb-notice-track {
  padding: 7px 10px;
  font-size: 12px;
}

.lb-panel {
  padding: 9px;
  border-radius: 10px;
}

.lb-panel-head {
  align-items: center;
  padding-bottom: 8px;
}

.lb-panel h2 {
  margin: 0;
  font-size: 22px;
}

.lb-entry-strip {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0 0 8px;
}

.lb-entry-strip span {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 8px;
  border: 1px solid rgba(0, 183, 232, .28);
  border-radius: 999px;
  background: rgba(0, 183, 232, .075);
  color: #b9d8e6;
  font-size: 11px;
  font-weight: 800;
}

.lb-entry-strip b {
  margin-left: 4px;
  color: var(--lb-teal);
}

.lb-entry-panel > form > .lb-form-grid {
  grid-template-columns: repeat(auto-fill, minmax(120px, 168px));
  gap: 6px;
}

.lb-form-grid {
  grid-template-columns: repeat(auto-fill, minmax(118px, 168px));
  gap: 6px;
}

.lb-form-section {
  --section-tone: var(--lb-blue);
  margin-top: 8px;
  padding: 8px;
  border-left: 4px solid var(--section-tone);
  border-radius: 9px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--section-tone) 14%, transparent), transparent 58%),
    rgba(237, 247, 251, .045);
}

.lb-form-section.lb-tone-main { --section-tone: #ff7a3d; }
.lb-form-section.lb-tone-aux { --section-tone: #4fc3ff; }
.lb-form-section.lb-tone-turbo { --section-tone: #9b7cff; }
.lb-form-section.lb-tone-air { --section-tone: #ffd166; }
.lb-form-section.lb-tone-oil { --section-tone: #02d8a2; }
.lb-form-section.lb-tone-cooling { --section-tone: #3ddc97; }
.lb-form-section.lb-tone-hours { --section-tone: #ff5ca8; }
.lb-form-section.lb-tone-general { --section-tone: #9fbfce; }

.lb-section-title {
  margin-bottom: 6px;
}

.lb-form-section h3 {
  color: var(--section-tone);
  font-size: 15px;
}

.lb-field {
  min-width: 0;
  gap: 3px;
}

.lb-field label {
  color: #a9ccd9;
  font-size: 9.8px;
  letter-spacing: .035em;
}

.lb-entry-panel .lb-field:not(.wide) {
  max-width: 168px;
}

.lb-entry-panel .lb-input,
.lb-entry-panel .lb-select,
.lb-entry-panel .lb-textarea {
  min-height: 34px;
  padding: 7px 9px;
  font-size: 13px;
}

.lb-field:focus-within label {
  color: var(--section-tone, var(--lb-blue));
}

.lb-textarea {
  min-height: 58px;
}

.lb-entry-actions {
  position: sticky;
  bottom: 8px;
  z-index: 12;
  justify-content: flex-end;
  padding: 7px;
  border: 1px solid var(--lb-line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--lb-panel) 92%, transparent);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .26);
}

.lb-entry-actions .lb-btn.primary {
  min-width: 142px;
}

[data-theme="light"] .lb-entry-strip span,
[data-theme="paper"] .lb-entry-strip span,
[data-theme="frost"] .lb-entry-strip span,
[data-theme="harbor-light"] .lb-entry-strip span,
body[data-theme="light"] .lb-entry-strip span,
body[data-theme="paper"] .lb-entry-strip span,
body[data-theme="frost"] .lb-entry-strip span,
body[data-theme="harbor-light"] .lb-entry-strip span {
  color: #315265;
}

@media (max-width: 980px) {
  .lb-shell { grid-template-columns: 1fr; }
  .lb-sidebar { position: static; height: auto; }
  .lb-hero { grid-template-columns: 1fr; }
  .lb-metrics, .lb-grid, .lb-grid.three, .lb-form-grid, .lb-admin-grid, .lb-chart-grid, .lb-dashboard-kpis {
    grid-template-columns: 1fr;
  }
  .lb-tc-score {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .lb-dashboard-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .lb-tc-score,
  .lb-ai-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body.lb-print-dashboard,
  body.lb-print-dashboard * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  body.lb-print-dashboard {
    background: #fff !important;
    color: #071727 !important;
    height: auto !important;
    overflow: visible !important;
  }

  body.lb-print-dashboard .lb-app {
    min-height: auto !important;
    overflow: visible !important;
  }

  body.lb-print-dashboard .logbookStdTopbarFallback,
  body.lb-print-dashboard .lb-sidebar,
  body.lb-print-dashboard .lb-metrics,
  body.lb-print-dashboard .lb-bottom,
  body.lb-print-dashboard .lb-notice,
  body.lb-print-dashboard .lb-hero-actions,
  body.lb-print-dashboard .lb-dashboard-controls,
  body.lb-print-dashboard .lb-ai-panel .lb-tools,
  body.lb-print-dashboard #analyzeBtn,
  body.lb-print-dashboard #dashboardPdfBtn,
  body.lb-print-dashboard [data-open-records] {
    display: none !important;
  }

  body.lb-print-dashboard .lb-shell,
  body.lb-print-dashboard .lb-main,
  body.lb-print-dashboard .lb-content {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
    background: #fff !important;
  }

  body.lb-print-dashboard .lb-hero,
  body.lb-print-dashboard .lb-panel,
  body.lb-print-dashboard .lb-dashboard-panel,
  body.lb-print-dashboard .lb-chart-panel,
  body.lb-print-dashboard .lb-dash-kpi,
  body.lb-print-dashboard .lb-ai-card,
  body.lb-print-dashboard .lb-values-section,
  body.lb-print-dashboard .lb-value-chip {
    color: #071727 !important;
    background: #fff !important;
    border-color: #bed0dc !important;
    box-shadow: none !important;
  }

  body.lb-print-dashboard .lb-hero {
    margin-bottom: 8px !important;
    padding: 0 0 8px !important;
  }

  body.lb-print-dashboard .lb-panel-head h2,
  body.lb-print-dashboard .lb-chart-head h3,
  body.lb-print-dashboard .lb-dash-kpi strong {
    color: #071727 !important;
  }

  body.lb-print-dashboard .lb-muted,
  body.lb-print-dashboard .lb-chart-head span,
  body.lb-print-dashboard .lb-dash-kpi span,
  body.lb-print-dashboard .lb-dash-kpi small {
    color: #486579 !important;
  }

  body.lb-print-dashboard .lb-dashboard-kpis {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
    margin: 8px 0 !important;
  }

  body.lb-print-dashboard .lb-dash-kpi {
    min-height: 62px !important;
    padding: 8px 10px !important;
  }

  body.lb-print-dashboard .lb-dash-kpi strong {
    font-size: 20px !important;
  }

  body.lb-print-dashboard .lb-chart-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin-top: 8px !important;
  }

  body.lb-print-dashboard .lb-chart-panel {
    break-inside: avoid;
    page-break-inside: avoid;
    padding: 8px !important;
    border-radius: 8px !important;
  }

  body.lb-print-dashboard .lb-chart-wrap {
    height: 165px !important;
    page-break-inside: avoid;
  }

  body.lb-print-dashboard .lb-chart-wrap.tall {
    height: 210px !important;
  }

  body.lb-print-dashboard .lb-ai-grid {
    grid-template-columns: 1fr !important;
  }

  body.lb-print-dashboard .lb-values-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }

  body.lb-print-dashboard .lb-values-section {
    padding: 6px !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  body.lb-print-dashboard .lb-values-section h4 {
    color: #071727 !important;
    font-size: 10px !important;
    margin-bottom: 5px !important;
  }

  body.lb-print-dashboard .lb-values-section > div {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 4px !important;
  }

  body.lb-print-dashboard .lb-value-chip {
    padding: 4px 5px !important;
  }

  body.lb-print-dashboard .lb-value-chip b {
    color: #486579 !important;
    font-size: 8px !important;
  }

  body.lb-print-dashboard .lb-value-chip em {
    color: #071727 !important;
    font-size: 10px !important;
  }

  body.lb-print-dashboard .lb-table-wrap {
    max-height: none !important;
    overflow: visible !important;
  }
}

/* 2026-07-06: final SMC standard screen lock. Kept last so older theme blocks cannot override it. */
body.lb-print-dashboard {
  --lb-chart-text: #061a2b;
  --lb-chart-muted: #23475f;
  --lb-chart-grid: rgba(18, 74, 108, .24);
  --lb-chart-soft-grid: rgba(18, 74, 108, .14);
}

@media screen {
  :root,
  html[data-theme],
  body[data-theme],
  .lb-app[data-theme] {
    --lb-page-bg: #06111f;
    --lb-page-grad-a: rgba(33, 200, 246, .13);
    --lb-page-grad-b: rgba(25, 224, 171, .045);
    --lb-surface-bg: rgba(8, 25, 38, .94);
    --lb-surface-strong: rgba(11, 34, 48, .96);
    --lb-panel-tint: rgba(6, 17, 31, .48);
    --lb-input-bg: #061321;
    --lb-table-head-bg: #0f3040;
    --lb-table-row-bg: #081c2a;
    --lb-table-row-alt-bg: #0a2230;
    --lb-bg: #06111f;
    --lb-panel: #0b2230;
    --lb-panel-2: #0f3040;
    --lb-card: #0d2432;
    --lb-card-soft: #122f3d;
    --lb-line: rgba(100, 205, 225, .24);
    --lb-line-strong: rgba(34, 211, 238, .48);
    --lb-text: #eaf8ff;
    --lb-text-dark: #f4fbff;
    --lb-muted: #9db9c7;
    --lb-blue: #21c8f6;
    --lb-teal: #19e0ab;
    --lb-orange: #ffb44b;
    --lb-red: #ff5d7a;
    --lb-purple: #8fa8ff;
    --lb-shadow: 0 18px 40px rgba(0, 0, 0, .26);
    --lb-chart-text: #e5f8ff;
    --lb-chart-muted: #a5becb;
    --lb-chart-grid: rgba(105, 205, 225, .22);
    --lb-chart-soft-grid: rgba(105, 205, 225, .12);
  }

  html[data-theme="charcoal"],
  body[data-theme="charcoal"],
  .lb-app[data-theme="charcoal"] {
    --lb-page-bg: #111820;
    --lb-page-grad-a: rgba(255, 107, 53, .12);
    --lb-page-grad-b: rgba(33, 200, 246, .04);
    --lb-surface-bg: rgba(22, 31, 39, .95);
    --lb-surface-strong: rgba(28, 39, 48, .97);
    --lb-panel-tint: rgba(12, 18, 24, .52);
    --lb-input-bg: #0b1118;
    --lb-table-head-bg: #25323d;
    --lb-table-row-bg: #141d26;
    --lb-table-row-alt-bg: #18232c;
    --lb-line: rgba(255, 146, 92, .24);
    --lb-line-strong: rgba(255, 146, 92, .44);
    --lb-text-dark: #f7fbff;
    --lb-muted: #b3bdc7;
    --lb-blue: #45c8ff;
    --lb-teal: #ff8b52;
    --lb-chart-text: #f7fbff;
    --lb-chart-muted: #b3bdc7;
    --lb-chart-grid: rgba(255, 146, 92, .20);
    --lb-chart-soft-grid: rgba(255, 146, 92, .10);
  }

  html[data-theme="slate"],
  body[data-theme="slate"],
  .lb-app[data-theme="slate"] {
    --lb-page-bg: #10172a;
    --lb-page-grad-a: rgba(122, 90, 224, .13);
    --lb-page-grad-b: rgba(33, 200, 246, .05);
    --lb-surface-bg: rgba(18, 28, 48, .95);
    --lb-surface-strong: rgba(22, 34, 58, .97);
    --lb-panel-tint: rgba(9, 15, 28, .52);
    --lb-input-bg: #090f1c;
    --lb-table-head-bg: #202b46;
    --lb-table-row-bg: #121c32;
    --lb-table-row-alt-bg: #16223a;
    --lb-line: rgba(143, 168, 255, .24);
    --lb-line-strong: rgba(143, 168, 255, .44);
    --lb-text-dark: #f4f8ff;
    --lb-muted: #aab7d0;
    --lb-blue: #7fb4ff;
    --lb-teal: #35d7c7;
    --lb-chart-text: #f4f8ff;
    --lb-chart-muted: #aab7d0;
    --lb-chart-grid: rgba(143, 168, 255, .20);
    --lb-chart-soft-grid: rgba(143, 168, 255, .10);
  }

  html[data-theme="nord"],
  body[data-theme="nord"],
  .lb-app[data-theme="nord"] {
    --lb-page-bg: #0d1b24;
    --lb-page-grad-a: rgba(78, 205, 196, .13);
    --lb-page-grad-b: rgba(136, 192, 208, .06);
    --lb-surface-bg: rgba(17, 35, 45, .95);
    --lb-surface-strong: rgba(21, 44, 55, .97);
    --lb-panel-tint: rgba(8, 20, 27, .52);
    --lb-input-bg: #07141b;
    --lb-table-head-bg: #203946;
    --lb-table-row-bg: #112633;
    --lb-table-row-alt-bg: #142d3a;
    --lb-line: rgba(136, 192, 208, .25);
    --lb-line-strong: rgba(78, 205, 196, .45);
    --lb-text-dark: #eef8fb;
    --lb-muted: #a9c1c9;
    --lb-blue: #8bd8f0;
    --lb-teal: #4ecdc4;
    --lb-chart-text: #eef8fb;
    --lb-chart-muted: #a9c1c9;
    --lb-chart-grid: rgba(136, 192, 208, .20);
    --lb-chart-soft-grid: rgba(136, 192, 208, .10);
  }

  html[data-theme="dracula"],
  body[data-theme="dracula"],
  .lb-app[data-theme="dracula"] {
    --lb-page-bg: #141421;
    --lb-page-grad-a: rgba(255, 59, 92, .13);
    --lb-page-grad-b: rgba(33, 200, 246, .045);
    --lb-surface-bg: rgba(25, 25, 40, .95);
    --lb-surface-strong: rgba(32, 31, 49, .97);
    --lb-panel-tint: rgba(12, 12, 22, .54);
    --lb-input-bg: #0d0d18;
    --lb-table-head-bg: #2b2a42;
    --lb-table-row-bg: #181827;
    --lb-table-row-alt-bg: #1e1d2f;
    --lb-line: rgba(255, 93, 122, .25);
    --lb-line-strong: rgba(255, 93, 122, .45);
    --lb-text-dark: #fbf7ff;
    --lb-muted: #c2b8cf;
    --lb-blue: #67d9ff;
    --lb-teal: #ff6f91;
    --lb-chart-text: #fbf7ff;
    --lb-chart-muted: #c2b8cf;
    --lb-chart-grid: rgba(255, 93, 122, .20);
    --lb-chart-soft-grid: rgba(255, 93, 122, .10);
  }

  html[data-theme="solarized"],
  body[data-theme="solarized"],
  .lb-app[data-theme="solarized"] {
    --lb-page-bg: #10222a;
    --lb-page-grad-a: rgba(255, 159, 28, .13);
    --lb-page-grad-b: rgba(0, 183, 232, .05);
    --lb-surface-bg: rgba(18, 39, 47, .95);
    --lb-surface-strong: rgba(22, 48, 57, .97);
    --lb-panel-tint: rgba(8, 20, 26, .53);
    --lb-input-bg: #07161c;
    --lb-table-head-bg: #243d47;
    --lb-table-row-bg: #132a32;
    --lb-table-row-alt-bg: #17313a;
    --lb-line: rgba(255, 180, 75, .25);
    --lb-line-strong: rgba(255, 180, 75, .45);
    --lb-text-dark: #f8fbf2;
    --lb-muted: #bac4b2;
    --lb-blue: #4fc3ff;
    --lb-teal: #ffb44b;
    --lb-chart-text: #f8fbf2;
    --lb-chart-muted: #bac4b2;
    --lb-chart-grid: rgba(255, 180, 75, .20);
    --lb-chart-soft-grid: rgba(255, 180, 75, .10);
  }

  html[data-theme="ocean"],
  body[data-theme="ocean"],
  .lb-app[data-theme="ocean"] {
    --lb-page-bg: #052025;
    --lb-page-grad-a: rgba(0, 216, 162, .14);
    --lb-page-grad-b: rgba(31, 192, 255, .06);
    --lb-surface-bg: rgba(7, 42, 47, .94);
    --lb-surface-strong: rgba(8, 52, 58, .96);
    --lb-panel-tint: rgba(2, 25, 28, .50);
    --lb-input-bg: #041a1f;
    --lb-table-head-bg: #0c3f46;
    --lb-table-row-bg: #07272e;
    --lb-table-row-alt-bg: #082f35;
    --lb-line: rgba(0, 216, 162, .26);
    --lb-line-strong: rgba(0, 216, 162, .52);
    --lb-text-dark: #eefdfa;
    --lb-muted: #9ac8c5;
    --lb-blue: #32c8ff;
    --lb-teal: #24e4ac;
    --lb-chart-text: #ecfffb;
    --lb-chart-muted: #a4cbc8;
    --lb-chart-grid: rgba(72, 218, 190, .22);
    --lb-chart-soft-grid: rgba(72, 218, 190, .12);
  }

  html[data-theme="paper"],
  body[data-theme="paper"],
  .lb-app[data-theme="paper"] {
    --lb-page-bg: #eef5f8;
    --lb-page-grad-a: rgba(33, 160, 200, .14);
    --lb-page-grad-b: rgba(25, 184, 148, .06);
    --lb-surface-bg: rgba(255, 255, 255, .96);
    --lb-surface-strong: rgba(247, 252, 255, .98);
    --lb-panel-tint: rgba(232, 244, 249, .82);
    --lb-input-bg: #ffffff;
    --lb-table-head-bg: #dceef6;
    --lb-table-row-bg: #ffffff;
    --lb-table-row-alt-bg: #f1f8fb;
    --lb-line: rgba(38, 116, 150, .22);
    --lb-line-strong: rgba(0, 136, 180, .36);
    --lb-text-dark: #0b2230;
    --lb-muted: #607c8c;
    --lb-blue: #007faa;
    --lb-teal: #008d73;
    --lb-chart-text: #0b2230;
    --lb-chart-muted: #506c7c;
    --lb-chart-grid: rgba(42, 107, 138, .22);
    --lb-chart-soft-grid: rgba(42, 107, 138, .12);
  }

  html[data-theme="frost"],
  body[data-theme="frost"],
  .lb-app[data-theme="frost"] {
    --lb-page-bg: #eaf3f7;
    --lb-page-grad-a: rgba(72, 190, 218, .16);
    --lb-page-grad-b: rgba(127, 159, 255, .06);
    --lb-surface-bg: rgba(248, 253, 255, .96);
    --lb-surface-strong: rgba(242, 251, 254, .98);
    --lb-panel-tint: rgba(225, 240, 247, .84);
    --lb-input-bg: #ffffff;
    --lb-table-head-bg: #d5ebf3;
    --lb-table-row-bg: #fbfeff;
    --lb-table-row-alt-bg: #edf7fb;
    --lb-line: rgba(80, 140, 170, .23);
    --lb-line-strong: rgba(23, 144, 188, .36);
    --lb-text-dark: #092235;
    --lb-muted: #5c7788;
    --lb-blue: #008ebd;
    --lb-teal: #009b83;
    --lb-chart-text: #092235;
    --lb-chart-muted: #526e80;
    --lb-chart-grid: rgba(57, 116, 146, .22);
    --lb-chart-soft-grid: rgba(57, 116, 146, .12);
  }

  html[data-theme="harbor-light"],
  body[data-theme="harbor-light"],
  .lb-app[data-theme="harbor-light"] {
    --lb-page-bg: #f3f7f6;
    --lb-page-grad-a: rgba(0, 155, 131, .13);
    --lb-page-grad-b: rgba(0, 127, 170, .07);
    --lb-surface-bg: rgba(255, 255, 255, .96);
    --lb-surface-strong: rgba(247, 253, 251, .98);
    --lb-panel-tint: rgba(230, 245, 243, .84);
    --lb-input-bg: #ffffff;
    --lb-table-head-bg: #d8eeeb;
    --lb-table-row-bg: #ffffff;
    --lb-table-row-alt-bg: #edf8f6;
    --lb-line: rgba(28, 125, 122, .22);
    --lb-line-strong: rgba(0, 155, 131, .36);
    --lb-text-dark: #0b282d;
    --lb-muted: #5e7a80;
    --lb-blue: #007faa;
    --lb-teal: #008f78;
    --lb-chart-text: #0b282d;
    --lb-chart-muted: #526f76;
    --lb-chart-grid: rgba(35, 124, 132, .22);
    --lb-chart-soft-grid: rgba(35, 124, 132, .12);
  }

  html,
  body,
  .lb-app {
    background: var(--lb-page-bg) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-app {
    padding: 12px 14px 18px;
    background:
      linear-gradient(180deg, var(--lb-page-grad-a) 0, rgba(33, 200, 246, 0) 250px),
      linear-gradient(90deg, var(--lb-page-bg) 0, color-mix(in srgb, var(--lb-page-bg) 84%, #062034) 48%, var(--lb-page-bg) 100%) !important;
  }

  .lb-shell {
    grid-template-columns: 214px minmax(0, 1fr);
    gap: 12px;
  }

  .lb-sidebar,
  .lb-panel,
  .lb-records-window,
  .lb-modal-card,
  .lb-dashboard-panel,
  .lb-metric,
  .lb-dash-kpi,
  .lb-reading-card,
  .lb-chart-panel,
  .lb-complete-values,
  .lb-tc-health,
  .lb-values-section,
  .lb-value-chip,
  .lb-tc-score > div,
  .lb-dev-group,
  .lb-ai-card {
    border-color: var(--lb-line) !important;
    border-radius: 8px !important;
    background: var(--lb-surface-bg) !important;
    color: var(--lb-text-dark) !important;
    box-shadow: var(--lb-shadow);
  }

  .lb-entry-panel {
    border-color: var(--lb-line-strong) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-blue) 8%, transparent), rgba(33, 200, 246, 0) 210px),
      var(--lb-surface-strong) !important;
  }

  .lb-hero {
    border-color: var(--lb-line-strong) !important;
    border-radius: 8px !important;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--lb-blue) 13%, transparent), color-mix(in srgb, var(--lb-teal) 7%, transparent)),
      var(--lb-surface-strong) !important;
  }

  .lb-brand strong,
  .lb-vessel-btn strong,
  .lb-panel h2,
  .lb-panel h3,
  .lb-chart-head h3,
  .lb-reading-title,
  .lb-dev-head strong,
  .lb-ai-card strong,
  .lb-metric strong,
  .lb-dash-kpi strong,
  .lb-tc-score strong,
  .lb-value-chip em,
  .lb-value {
    color: var(--lb-text-dark) !important;
  }

  .lb-brand span,
  .lb-muted,
  .lb-hero p,
  .lb-chart-head span,
  .lb-dev-head span:not(.lb-tag),
  .lb-ai-card small,
  .lb-value-chip b,
  .lb-dash-kpi span,
  .lb-dash-kpi small,
  .lb-metric span {
    color: var(--lb-muted) !important;
  }

  .lb-kicker,
  .lb-panel-head .lb-section-add,
  .lb-vessel-btn.locked::after {
    color: var(--lb-blue) !important;
  }

  .lb-select,
  .lb-input,
  .lb-textarea {
    min-height: 36px;
    border: 1px solid rgba(100, 205, 225, .28) !important;
    border-radius: 7px !important;
    background: var(--lb-input-bg) !important;
    color: var(--lb-text-dark) !important;
    caret-color: var(--lb-teal);
  }

  .lb-select option,
  .lb-select optgroup {
    background: var(--lb-input-bg);
    color: var(--lb-text-dark);
  }

  .lb-select:focus,
  .lb-input:focus,
  .lb-textarea:focus {
    border-color: var(--lb-blue) !important;
    box-shadow: 0 0 0 3px rgba(33, 200, 246, .14) !important;
  }

  .lb-vessel-btn,
  .lb-nav-btn,
  .lb-btn {
    border-color: rgba(100, 205, 225, .24);
    border-radius: 7px !important;
    background: rgba(6, 17, 31, .76);
    color: var(--lb-text-dark);
  }

  .lb-vessel-btn.active,
  .lb-nav-btn.active,
  .lb-btn.primary {
    border-color: rgba(25, 224, 171, .55) !important;
    background: linear-gradient(135deg, #087ea4, #00a980) !important;
    color: #f6fffd !important;
  }

  .lb-entry-strip span,
  .lb-history-filters,
  .lb-dashboard-controls,
  .lb-segments,
  .lb-ai-panel,
  .lb-sidebar-note {
    border-color: var(--lb-line) !important;
    background: var(--lb-panel-tint) !important;
    color: var(--lb-muted) !important;
  }

  .lb-form-grid {
    grid-template-columns: repeat(auto-fill, minmax(128px, 176px));
    gap: 7px;
  }

  .lb-entry-panel > form > .lb-form-grid {
    grid-template-columns: repeat(auto-fill, minmax(138px, 190px));
  }

  .lb-form-section {
    margin-top: 9px;
    padding: 9px;
    border-color: rgba(100, 205, 225, .20) !important;
    border-left-color: var(--section-tone) !important;
    background:
      linear-gradient(90deg, color-mix(in srgb, var(--lb-blue) 6%, transparent), color-mix(in srgb, var(--lb-teal) 3%, transparent)),
      var(--lb-panel-tint) !important;
  }

  .lb-form-section h3 {
    color: var(--section-tone) !important;
    font-size: 14px;
  }

  .lb-entry-panel .lb-field {
    position: relative;
    padding: 5px !important;
    border: 1px solid color-mix(in srgb, var(--lb-line) 62%, white 18%) !important;
    border-radius: 10px !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-panel-tint) 70%, white 7%), var(--lb-panel-tint)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .10),
      inset 0 -1px 0 rgba(0, 0, 0, .20),
      0 1px 0 rgba(255, 255, 255, .035),
      0 8px 18px rgba(0, 0, 0, .13) !important;
  }

  .lb-entry-panel .lb-field:hover {
    border-color: color-mix(in srgb, var(--lb-blue) 48%, var(--lb-line)) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .14),
      inset 0 -1px 0 rgba(0, 0, 0, .22),
      0 1px 0 rgba(255, 255, 255, .045),
      0 10px 22px rgba(0, 0, 0, .17) !important;
  }

  .lb-entry-panel .lb-field:focus-within {
    border-color: color-mix(in srgb, var(--lb-blue) 72%, white 10%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-blue) 10%, var(--lb-panel-tint)), var(--lb-panel-tint)) !important;
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--lb-blue) 18%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .18),
      inset 0 -1px 0 rgba(0, 0, 0, .20),
      0 12px 26px rgba(0, 0, 0, .20) !important;
  }

  .lb-field label {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    max-width: 100%;
    margin-left: 2px;
    padding: 1px 6px !important;
    border-radius: 999px;
    background: color-mix(in srgb, var(--lb-page-bg) 76%, var(--lb-blue) 10%) !important;
    color: #9db9c7 !important;
    font-size: 10px;
    letter-spacing: .05em;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .10),
      0 1px 0 rgba(0, 0, 0, .16);
  }

  .lb-entry-panel .lb-field:focus-within label {
    color: var(--lb-blue) !important;
    background: color-mix(in srgb, var(--lb-page-bg) 68%, var(--lb-blue) 18%) !important;
  }

  .lb-entry-panel .lb-input,
  .lb-entry-panel .lb-select,
  .lb-entry-panel .lb-textarea {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
    border-top-color: color-mix(in srgb, var(--lb-line) 45%, white 45%) !important;
    border-left-color: color-mix(in srgb, var(--lb-line) 50%, white 32%) !important;
    border-right-color: color-mix(in srgb, var(--lb-line) 80%, black 18%) !important;
    border-bottom-color: color-mix(in srgb, var(--lb-line) 78%, black 22%) !important;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 84%, white 10%) 0%, var(--lb-input-bg) 100%) !important;
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .16),
      inset 0 -10px 18px rgba(0, 0, 0, .11),
      0 1px 0 rgba(255, 255, 255, .05),
      0 4px 10px rgba(0, 0, 0, .16) !important;
    transform: translateY(0);
    transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease, background .14s ease;
  }

  .lb-entry-panel .lb-input:hover,
  .lb-entry-panel .lb-select:hover,
  .lb-entry-panel .lb-textarea:hover,
  .lb-entry-panel .lb-input:focus,
  .lb-entry-panel .lb-select:focus,
  .lb-entry-panel .lb-textarea:focus {
    transform: translateY(-1px);
    box-shadow:
      0 0 0 3px color-mix(in srgb, var(--lb-blue) 16%, transparent),
      inset 0 1px 0 rgba(255, 255, 255, .19),
      inset 0 -10px 18px rgba(0, 0, 0, .10),
      0 9px 18px rgba(0, 0, 0, .21) !important;
  }

  .lb-entry-panel .lb-input[readonly] {
    opacity: .86;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--lb-input-bg) 88%, var(--lb-muted) 8%) 0%, var(--lb-input-bg) 100%) !important;
  }

  .lb-entry-actions,
  .lb-upload-drop {
    border-color: rgba(100, 205, 225, .28) !important;
    border-radius: 8px !important;
    background: var(--lb-panel-tint) !important;
  }

  .lb-table th {
    background: var(--lb-table-head-bg) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-table td,
  .lb-table tr:nth-child(even) td {
    background: var(--lb-table-row-bg) !important;
    color: var(--lb-text-dark) !important;
  }

  .lb-table tr:nth-child(even) td {
    background: var(--lb-table-row-alt-bg) !important;
  }

  .lb-modal-head,
  .lb-modal-body {
    border-color: var(--lb-line) !important;
    background: var(--lb-page-bg) !important;
  }

  .lb-compact-reading-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(164px, 1fr));
    gap: 7px;
    padding: 3px 0 5px;
  }

  .lb-compact-reading-card {
    min-width: 0;
    padding: 5px;
    border: 1px solid color-mix(in srgb, var(--lb-line) 72%, var(--sheet-tone) 28%);
    border-radius: 10px;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--sheet-tone) 8%, transparent), transparent 44%),
      color-mix(in srgb, var(--lb-panel-tint) 94%, var(--lb-page-bg) 6%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);
  }

  .lb-compact-reading-head {
    min-height: 28px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 5px;
    padding: 3px 5px 4px;
    border-radius: 7px 7px 5px 5px;
    background: color-mix(in srgb, var(--lb-panel-2) 88%, var(--sheet-tone) 12%);
  }

  .lb-compact-reading-head span {
    min-width: 0;
    overflow: hidden;
    color: var(--lb-text-dark);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .025em;
    line-height: 1.12;
    text-overflow: ellipsis;
    text-transform: uppercase;
  }

  .lb-compact-reading-head small {
    flex: none;
    color: var(--sheet-tone);
    font-size: 9px;
    font-weight: 900;
    line-height: 1.1;
  }

  .lb-compact-reading-card .lb-matrix-input {
    width: 100%;
    min-height: 32px !important;
    height: 32px;
    margin-top: 4px;
    padding: 4px 7px !important;
    border: 1px solid color-mix(in srgb, var(--lb-line) 68%, var(--sheet-tone) 32%) !important;
    border-radius: 7px !important;
    background: color-mix(in srgb, var(--lb-input-bg) 96%, var(--sheet-tone) 4%) !important;
    color: var(--lb-text-dark) !important;
    font-size: 12px;
    text-align: left;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18) !important;
    transform: none !important;
  }

  .lb-compact-reading-card .lb-matrix-input:hover,
  .lb-compact-reading-card .lb-matrix-input:focus,
  .lb-compact-reading-card.has-value .lb-matrix-input {
    border-color: var(--sheet-tone) !important;
    background: color-mix(in srgb, var(--lb-input-bg) 88%, var(--sheet-tone) 12%) !important;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--sheet-tone) 17%, transparent) !important;
  }

  .lb-sheet-subhead {
    margin-top: 8px;
    margin-bottom: 2px;
    padding-block: 6px;
  }

  .lb-sheet-block .lb-sheet-body {
    display: block !important;
  }

  .lb-reference-workbook {
    padding: 2px 14px 9px;
  }

  .lb-sheet-block,
  .lb-sheet-block:last-child {
    padding: 8px 0 9px;
  }

  .lb-sheet-block.collapsed {
    padding-block: 5px;
  }

  .lb-sheet-block.collapsed .lb-sheet-heading {
    margin-bottom: 0;
  }

  .lb-sheet-block.collapsed .lb-sheet-body,
  .lb-upload-panel.collapsed .lb-collapsible-panel-body {
    display: none;
  }

  @media (max-width: 760px) {
    .lb-compact-reading-grid {
      grid-template-columns: repeat(2, minmax(135px, 1fr));
    }
  }

  @media (max-width: 1180px) {
    .lb-shell {
      grid-template-columns: 1fr;
    }

    .lb-sidebar {
      position: static;
      height: auto;
    }

    .lb-vessel-list {
      grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    }
  }

  @media (max-width: 760px) {
    .lb-app {
      padding: 8px;
    }

    .lb-hero {
      grid-template-columns: 1fr;
      padding: 11px;
    }

    .lb-hero-actions .lb-select,
    .lb-btn,
    .lb-file-row > * {
      width: 100%;
    }

    .lb-metrics,
    .lb-form-grid,
    .lb-entry-panel > form > .lb-form-grid,
    .lb-dashboard-kpis,
    .lb-chart-grid,
    .lb-grid,
    .lb-grid.three,
    .lb-admin-grid {
      grid-template-columns: 1fr !important;
    }

    .lb-entry-panel .lb-field:not(.wide) {
      max-width: none;
    }
  }
}
