:root { --canvas: #f3f6f5; --surface: #fff; --surface-muted: #edf2f0; --ink: #12211e; --muted: #61706c; --line: #d7dfdc; --accent: #087f78; --accent-hover: #056a65; --danger: #b3261e; --danger-soft: #f9e2df; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--canvas); color: var(--ink); }
button { cursor: pointer; font: inherit; }
[hidden] { display: none !important; }
.topbar { display: flex; min-height: 64px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); background: var(--surface); padding: 10px 22px; }
.topbar-actions { display: flex; gap: 8px; }
.brand-lockup { display: flex; align-items: center; gap: 12px; }
.brand-lockup > div { display: grid; }
.brand-lockup span:not(.brand-mark) { color: var(--muted); font-size: .82rem; }
.brand-mark { display: block; width: 38px; height: 38px; flex: 0 0 38px; }
.preview-banner { display: flex; min-height: 42px; align-items: center; gap: 12px; border-bottom: 1px solid #d5c084; background: #fff0c7; color: #6f4a00; padding: 8px 22px; font-size: .8rem; }
.preview-banner[hidden] { display: none; }
.auth-shell { min-height: calc(100vh - 64px); padding: clamp(32px, 8vh, 84px) 18px; background: var(--surface-muted); }
.auth-panel { display: grid; width: min(100%, 430px); gap: 14px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: clamp(22px, 5vw, 34px); box-shadow: 0 18px 52px rgba(18, 33, 30, .1); }
.auth-panel h1 { margin: 0; font-size: 1.55rem; }
.auth-panel > p, .auth-panel form p { margin: 0; color: var(--muted); }
.auth-panel form { display: grid; gap: 14px; }
.auth-panel label { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
.auth-panel input, #fleet-switcher { width: 100%; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 9px 11px; font: inherit; }
.selected-email { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.selected-email span { overflow-wrap: anywhere; font-weight: 700; }
.google-auth { display: grid; justify-items: center; gap: 12px; }
.auth-separator { display: flex; width: 100%; align-items: center; gap: 10px; color: var(--muted); font-size: .75rem; }
.auth-separator::before, .auth-separator::after { height: 1px; flex: 1; background: var(--line); content: ""; }
#google-button { min-height: 44px; }
.mfa-qr { width: min(256px, 100%); height: auto; justify-self: center; border: 1px solid var(--line); background: #fff; padding: 8px; }
#mfa-recovery-codes { overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); padding: 14px; font: 700 .85rem/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; user-select: all; }
.text-command { width: fit-content; border: 0; background: transparent; color: var(--accent); padding: 4px 0; font: inherit; font-weight: 750; }
#fleet-switcher { margin-top: 8px; }
.mode-label { margin-inline-start: auto; font-weight: 800; text-transform: uppercase; }
.workspace { display: grid; min-height: calc(100vh - 106px); grid-template-columns: 260px minmax(0, 1fr); }
.fleet-summary { border-inline-end: 1px solid var(--line); background: var(--surface); padding: 28px 22px; }
.eyebrow { color: var(--muted); font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.fleet-summary h1 { margin: 7px 0 8px; font-size: 1.35rem; overflow-wrap: anywhere; }
.fleet-summary code { color: var(--muted); font-size: .72rem; overflow-wrap: anywhere; user-select: all; }
dl { display: grid; gap: 17px; margin: 30px 0 0; }
dl div { display: grid; gap: 3px; }
dt { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
dd { margin: 0; font-size: .88rem; }
.content { min-width: 0; padding: 30px clamp(18px, 4vw, 52px) 60px; }
.metrics-row { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)); border-block: 1px solid var(--line); background: var(--surface); }
.metrics-row div { display: grid; gap: 8px; border-inline-end: 1px solid var(--line); padding: 18px; }
.metrics-row div:last-child { border-inline-end: 0; }
.metrics-row span { color: var(--muted); font-size: .75rem; font-weight: 750; }
.metrics-row strong { font-size: 1.65rem; }
.tabs { display: flex; gap: 24px; margin-top: 28px; border-bottom: 1px solid var(--line); }
.tab { min-height: 42px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--muted); padding: 0 2px; font-weight: 750; }
.tab.active { border-bottom-color: var(--accent); color: var(--ink); }
.table-section { padding-top: 24px; }
.table-section > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.table-section h2 { margin: 0; font-size: 1.15rem; }
.table-section header p { margin: 5px 0 0; color: var(--muted); font-size: .82rem; }
.table-wrap { margin-top: 14px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: var(--surface); }
th, td { border-bottom: 1px solid var(--line); padding: 12px; text-align: start; vertical-align: middle; }
th { background: var(--surface-muted); color: var(--muted); font-size: .72rem; text-transform: uppercase; }
td { font-size: .85rem; }
td > select { min-height: 36px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 6px 28px 6px 9px; font: inherit; }
.identity { display: grid; gap: 2px; }
.identity span { color: var(--muted); font-size: .75rem; }
.identity code { color: var(--muted); font-size: .72rem; }
#vessel-rows td small { display: block; margin-top: 3px; color: var(--muted); font-size: .72rem; }
.row-actions, .order-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; white-space: nowrap; }
.drag-handle { display: inline-grid; width: 24px; height: 32px; place-items: center; color: var(--muted); cursor: grab; font-size: 1rem; line-height: 1; user-select: none; }
.drag-handle:active { cursor: grabbing; }
.station-editor tr.dragging { background: #dff3ef; opacity: .58; }
.status-pill { display: inline-flex; min-height: 24px; align-items: center; border-radius: 999px; padding: 3px 9px; background: var(--surface-muted); font-size: .72rem; font-weight: 750; }
.status-published, .status-active { background: #d9f1e5; color: #12633d; }
.status-draft { background: #fff0c7; color: #6f4a00; }
.status-archived, .status-inactive { color: var(--muted); }
.preset-grid { display: grid; grid-template-columns: repeat(2, minmax(220px, 1fr)); gap: 12px; margin-top: 14px; }
.preset-card { display: grid; grid-template-columns: 1fr auto; gap: 7px 16px; align-items: end; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 16px; }
.preset-card h3 { grid-column: 1 / -1; margin: 0; font-size: 1rem; }
.preset-card p { grid-column: 1 / -1; min-height: 2.4em; margin: 0; color: var(--muted); font-size: .8rem; }
.preset-card span { color: var(--muted); font-size: .75rem; font-weight: 700; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.form-notice { margin: 0; color: var(--danger); font-size: .82rem; }
.editor-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.editor-heading > div { display: grid; gap: 2px; }
.editor-heading span, #template-version { color: var(--muted); font-size: .75rem; }
.template-fields { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(220px, 2fr); gap: 12px; }
.station-editor { max-height: min(52vh, 560px); overflow: auto; border: 1px solid var(--line); }
.station-editor .station-fields { display: grid; min-width: 260px; gap: 6px; }
.station-editor input, .station-editor select { min-height: 36px; }
.station-editor td { padding: 8px; }
.station-editor input[type="checkbox"] { width: 20px; min-height: 20px; accent-color: var(--accent); }
.wide-dialog { width: min(calc(100% - 32px), 1050px); }
.wide-dialog form { gap: 14px; }
details summary { cursor: pointer; color: var(--accent); font-size: .78rem; font-weight: 700; }
details pre { max-width: 360px; overflow: auto; white-space: pre-wrap; color: var(--muted); font-size: .7rem; }
.empty-copy, .load-error { color: var(--muted); font-size: .85rem; }
.load-error { margin: 40px; color: var(--danger); }
.policy-toggle { display: flex; gap: 12px; align-items: flex-start; padding: 16px 0; }
.policy-toggle input { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; margin-top: 2px; padding: 0; accent-color: var(--accent); }
.policy-toggle span { display: grid; gap: 4px; }
.policy-toggle small { max-width: 64ch; color: var(--muted); }
dialog { width: min(calc(100% - 32px), 440px); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 0; box-shadow: 0 24px 70px rgba(18, 33, 30, .2); }
dialog::backdrop { background: rgba(18, 33, 30, .42); }
dialog form { display: grid; gap: 20px; padding: 22px; }
dialog header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
dialog h2 { margin: 0; font-size: 1.2rem; }
dialog label, .readonly-field { display: grid; gap: 7px; color: var(--muted); font-size: .78rem; font-weight: 700; }
dialog input, dialog select, dialog textarea { width: 100%; min-height: 42px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 9px 11px; font: inherit; }
dialog textarea { resize: vertical; }
.consent-row { grid-template-columns: 20px 1fr; align-items: start; }
.consent-row input { width: 18px; min-height: 18px; accent-color: var(--accent); }
.readonly-field code { overflow-wrap: anywhere; border: 1px solid var(--line); border-radius: 6px; background: var(--surface-muted); color: var(--ink); padding: 11px; user-select: all; }
.dialog-actions { justify-content: flex-end; }
@media (max-width: 760px) { .preview-banner { flex-wrap: wrap; } .mode-label { margin-inline-start: 0; } .workspace { grid-template-columns: 1fr; } .fleet-summary { border-inline-end: 0; border-bottom: 1px solid var(--line); } .metrics-row { grid-template-columns: repeat(2, 1fr); } .tabs { gap: 16px; overflow-x: auto; } .preset-grid, .template-fields { grid-template-columns: 1fr; } .table-section > header { align-items: stretch; flex-direction: column; } }
