:root {
  color-scheme: light;
  --background: #f4f7f8;
  --surface: #fff;
  --ink: #142a36;
  --muted: #526875;
  --line: #dae4e8;
  --navy: #102632;
  --navy-alt: #1b3946;
  --teal: #0b6d60;
  --teal-hover: #085a50;
  --teal-bg: #e3f4ef;
  --blue: #24558d;
  --blue-bg: #eaf1fa;
  --gold: #7c4b03;
  --gold-bg: #fff2d9;
  --red: #9d3333;
  --red-bg: #fceaea;
  --gray-bg: #eef2f4;
  --shadow: 0 2px 7px #162d3a08, 0 1px 1px #162d3a08;
  --radius: 14px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--background); color: var(--ink); line-height: 1.48; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.85rem, 4vw, 2.65rem); line-height: 1.13; letter-spacing: -.05em; }
h2 { font-size: 1.12rem; line-height: 1.25; letter-spacing: -.025em; }
h3 { font-size: .98rem; letter-spacing: -.012em; }
a { color: var(--teal); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .65; }
:focus-visible { outline: 3px solid #29a793; outline-offset: 3px; }
.muted { color: var(--muted); }
.eyebrow { color: var(--teal); font-size: .68rem; font-weight: 800; letter-spacing: .115em; text-transform: uppercase; margin-bottom: .45rem; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link:focus { position: fixed; z-index: 5; background: var(--surface); color: var(--ink); top: 10px; left: 10px; padding: 10px; }
.boot { display: flex; justify-content: center; align-items: center; min-height: 100dvh; gap: 15px; color: var(--muted); }
.button { display: inline-flex; min-height: 41px; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; border: 1px solid transparent; border-radius: 8px; font-weight: 700; font-size: .86rem; white-space: nowrap; line-height: 1.35; }
.button.primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.button.primary:hover { background: var(--teal-hover); }
.button.secondary { color: var(--ink); background: var(--surface); border-color: var(--line); }
.button.secondary:hover, .button.quiet:hover { background: var(--gray-bg); }
.button.quiet { color: var(--teal); background: transparent; min-height: 35px; padding-inline: 8px; }
.button.danger { color: var(--red); background: var(--red-bg); }
.button.small { min-height: 33px; padding: 6px 9px; font-size: .78rem; }
.button svg, .nav-link svg, .metric-icon svg, .icon-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px; font-size: 1.3rem; line-height: 1; background: transparent; color: inherit; }
.icon-button:hover { background: #a2b6bf2e; }
.app-shell { display: grid; grid-template-columns: 235px minmax(0, 1fr); min-height: 100dvh; }
.sidebar { background: var(--navy); color: #edf5f7; display: flex; flex-direction: column; padding: 25px 15px 17px; position: sticky; top: 0; height: 100dvh; overflow: auto; }
.brand { display: flex; align-items: center; gap: 10px; color: #f6fdff; white-space: nowrap; width: fit-content; font-size: .91rem; font-weight: 760; letter-spacing: -.02em; }
.brand small, .sidebar-account small { display: block; font-size: .71rem; color: #b2c6cc; font-weight: 500; letter-spacing: 0; margin-top: 1px; }
.sidebar .brand { padding-left: 5px; margin-bottom: 34px; }
.sidebar-label { color: #a3bbc2; padding-left: 11px; margin: 0 0 7px; text-transform: uppercase; font-size: .65rem; font-weight: 800; letter-spacing: .13em; }
.sidebar nav { display: grid; gap: 4px; margin-bottom: 20px; }
.nav-link { color: #d0dfe3; display: flex; gap: 11px; align-items: center; min-height: 43px; border-radius: 8px; padding: 9px 11px; white-space: nowrap; font-size: .86rem; font-weight: 620; }
.nav-link:hover { background: #203e4b; color: #fff; }
.nav-link.active { color: #f5fffd; background: #245348; box-shadow: inset 3px 0 #65cdb5; }
.nav-link.active svg { color: #85e0c9; }
.sidebar-account { display: flex; align-items: center; gap: 9px; min-height: 54px; border-top: 1px solid #35515b; padding: 13px 2px 0; margin-top: auto; font-size: .82rem; }
.sidebar-account > div { min-width: 0; flex: 1; overflow: hidden; }
.sidebar-account strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { width: 33px; height: 33px; flex: 0 0 33px; display: grid; place-items: center; background: #274856; color: #dcf6f1; font-size: .75rem; font-weight: 800; border-radius: 50%; }
.sign-out-button { color: #c5d7dc; }
.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; gap: 12px; align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); padding: 12px clamp(16px, 3vw, 36px); min-height: 63px; }
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 11px; min-width: 0; }
.topbar-right { flex-shrink: 0; }
.clock-display { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 7px; font-size: .78rem; color: var(--muted); }
.clock-display time { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
#show-gmt[aria-pressed="true"] { background: var(--blue-bg); color: var(--blue); }
.marina-select { min-width: 0; }
.marina-select select { padding: 6px 9px; color: var(--ink); border: 1px solid var(--line); border-radius: 7px; background: var(--surface); font-weight: 750; font-size: .85rem; max-width: 100%; }
.menu-button { display: none; }
#workspace-content { width: 100%; max-width: 1500px; padding: clamp(18px, 3vw, 36px); margin: 0 auto; min-height: 60vh; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 23px; }
.page-head p:not(.eyebrow) { margin-top: .45rem; color: var(--muted); max-width: 61ch; font-size: .93rem; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin: 0 0 19px; }
.metric { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; color: var(--ink); box-shadow: var(--shadow); min-width: 0; }
.metric:hover { border-color: #98bdb6; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: .78rem; font-weight: 740; color: var(--muted); }
.metric-icon { display: grid; place-items: center; min-width: 31px; height: 31px; border-radius: 8px; background: var(--teal-bg); color: var(--teal); }
.metric-icon.blue { background: var(--blue-bg); color: var(--blue); }
.metric-icon.gold { background: var(--gold-bg); color: var(--gold); }
.metric-icon.red { background: var(--red-bg); color: var(--red); }
.metric-number { display: block; margin: 8px 0 2px; font-size: clamp(1.45rem, 3vw, 2.05rem); line-height: 1.15; font-weight: 780; letter-spacing: -.05em; overflow-wrap: anywhere; }
.metric-foot { color: var(--muted); font-size: .75rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); gap: 15px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; overflow: clip; }
.panel + .panel.spaced { margin-top: 15px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 16px 16px 12px; }
.panel-head p, .panel-description { color: var(--muted); font-size: .79rem; margin-top: 4px; }
.panel-body { padding: 15px 16px; }
.panel-foot { padding: 10px 16px; background: #f7fafb; border-top: 1px solid var(--line); color: var(--muted); font-size: .75rem; }
.dock-group + .dock-group { margin-top: 16px; }
.dock-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 6px; }
.dock-top small { font-size: .75rem; color: var(--muted); }
.slip-map { display: grid; grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); gap: 5px; }
.slip-cell { border-radius: 6px; text-align: center; padding: 7px 4px; border: 1px solid var(--line); min-width: 0; overflow-wrap: anywhere; font-size: .75rem; font-weight: 760; }
.slip-cell.available { color: var(--teal); background: var(--teal-bg); border-color: #c1e1d8; }
.slip-cell.occupied { color: var(--blue); background: var(--blue-bg); border-color: #cbdceb; }
.slip-cell.reserved, .slip-cell.held { color: var(--gold); background: var(--gold-bg); border-color: #f3dfb7; }
.slip-cell.out-of-service { color: var(--muted); background: var(--gray-bg); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 13px; margin-top: 14px; font-size: .73rem; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; background: #94a8b0; margin-right: 5px; border-radius: 50%; }
.legend .available::before { background: #169582; }
.legend .occupied::before { background: #336da5; }
.legend .held::before { background: #b4751b; }
.notice { display: flex; gap: 9px; padding: 12px 13px; border-radius: 8px; background: var(--teal-bg); color: #155247; font-size: .83rem; margin-bottom: 14px; }
.notice.warning { background: var(--gold-bg); color: var(--gold); }
.notice.error { background: var(--red-bg); color: var(--red); }
.empty { padding: 27px 16px; color: var(--muted); text-align: center; }
.empty strong { display: block; color: var(--ink); margin-bottom: 5px; }
.empty p { margin: 0 auto; max-width: 52ch; font-size: .86rem; }
.table-scroll { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: .85rem; }
thead { background: #f7fafb; color: #526875; }
th, td { padding: 11px 13px; text-align: left; border-top: 1px solid var(--line); vertical-align: top; }
th { font-size: .72rem; font-weight: 780; white-space: nowrap; }
td:first-child, th:first-child { padding-left: 16px; }
td:last-child, th:last-child { padding-right: 16px; }
td strong { font-weight: 750; }
.cell-note { display: block; color: var(--muted); font-size: .75rem; margin-top: 2px; }
.nowrap { white-space: nowrap; }
.amount { white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 99px; background: var(--gray-bg); color: #435763; font-size: .71rem; font-weight: 750; white-space: nowrap; }
.badge.available, .badge.paid, .badge.active, .badge.assigned, .badge.completed { background: var(--teal-bg); color: var(--teal); }
.badge.occupied, .badge.waiting, .badge.scheduled, .badge.upcoming, .badge.open { background: var(--blue-bg); color: var(--blue); }
.badge.held, .badge.reserved, .badge.offered, .badge.due-today, .badge.partially-paid { background: var(--gold-bg); color: var(--gold); }
.badge.overdue, .badge.offer-expired, .badge.voided { background: var(--red-bg); color: var(--red); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; min-width: 98px; }
.chip { border-radius: 5px; color: var(--teal); background: var(--teal-bg); padding: 2px 5px; font-size: .73rem; font-weight: 700; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; padding: 13px 16px; }
.toolbar select, .toolbar input { width: auto; min-width: 0; font-size: .83rem; }
.toolbar input { max-width: min(240px, 100%); }
.toolbar label { margin: 0; }
.mini-list { list-style: none; margin: 0; padding: 0; }
.mini-list li { display: grid; grid-template-columns: 9px minmax(0, 1fr) auto; align-items: start; gap: 9px; padding: 11px 16px; border-top: 1px solid var(--line); font-size: .82rem; }
.mini-list .dot { width: 7px; height: 7px; border-radius: 50%; background: #208773; margin-top: 5px; }
.mini-list .dot.urgent { background: #be5454; }
.mini-list time { white-space: nowrap; font-size: .76rem; color: var(--muted); }
.mini-list a { font-weight: 750; }
.customer-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.customer-card address { font-style: normal; color: var(--muted); font-size: .79rem; overflow-wrap: anywhere; margin-top: 3px; }
.customer-card .panel-body { border-top: 1px solid var(--line); padding-top: 12px; }
.vessel-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.vessel-list li { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 7px; font-size: .84rem; }
.settings-panel { max-width: 700px; }
.settings-panel .panel-body { display: grid; gap: 8px; }
.settings-panel .button { justify-self: start; }
label { display: block; color: var(--ink); font-size: .82rem; font-weight: 710; }
input, select, textarea { display: block; width: 100%; color: var(--ink); background: var(--surface); border: 1px solid #bdcbd1; border-radius: 7px; min-height: 39px; padding: 8px 9px; font-size: .9rem; }
label input, label select, label textarea { margin-top: 4px; }
textarea { resize: vertical; min-height: 72px; }
input[type="checkbox"] { width: 16px; min-height: 16px; margin: 0; accent-color: var(--teal); }
.checkbox { display: flex; gap: 8px; align-items: center; min-height: 37px; }
.field-help { display: block; margin-top: 3px; font-size: .73rem; color: var(--muted); font-weight: 500; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 13px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-error { color: var(--red); background: var(--red-bg); border-radius: 7px; padding: 9px 10px; font-size: .83rem; }
dialog { width: min(600px, calc(100% - 24px)); max-height: min(90dvh, 760px); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 0; box-shadow: 0 14px 75px #0b253c50; }
dialog::backdrop { background: #0e2736aa; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 17px 18px 12px; border-bottom: 1px solid var(--line); }
.dialog-head .icon-button { margin: -3px -5px 0 0; }
.dialog-head h2 { font-size: 1.33rem; }
.dialog-body { padding: 15px 18px; }
.dialog-error { margin: 0 18px 10px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line); padding: 11px 18px; background: #f7fafb; }
.dialog-body p + p { margin-top: 8px; }
.toast { position: fixed; z-index: 6; right: 18px; bottom: 18px; max-width: min(420px, calc(100% - 36px)); background: var(--navy); color: #fff; font-size: .86rem; border-radius: 9px; padding: 11px 14px; box-shadow: 0 2px 12px #0003; }
.sign-in { min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); }
.sign-in-story { display: flex; flex-direction: column; justify-content: space-between; gap: 36px; padding: clamp(24px, 5vw, 64px); color: #fff; background: radial-gradient(ellipse at 90% 80%, #24605f, transparent 58%), var(--navy); }
.sign-in-story-copy h1 { font-size: clamp(2.45rem, 6vw, 4.5rem); max-width: 12ch; }
.sign-in-story .eyebrow { color: #a3dfd2; }
.sign-in-story-copy > p:not(.eyebrow) { color: #cbdee1; margin-top: 14px; max-width: 36ch; }
.sign-in-foot { color: #b4cacc; font-size: .82rem; }
.sign-in-panel { display: grid; place-items: center; background: var(--surface); padding: 32px 25px; }
.sign-in-panel > div { width: min(100%, 390px); }
.sign-in-logo { display: block; width: min(100%, 265px); height: auto; margin-bottom: 20px; }
.sign-in-panel h2 { font-size: 2.2rem; margin-bottom: 6px; }
.sign-in-panel form { display: grid; gap: 13px; margin-top: 21px; }
.sign-in-panel .button { margin-top: 3px; }
@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 202px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { display: none; height: auto; position: static; padding: 15px; }
  .app-shell.menu-open .sidebar { display: flex; }
  .sidebar .brand { margin-bottom: 16px; }
  .sidebar nav { grid-template-columns: 1fr 1fr; gap: 4px; margin-bottom: 12px; }
  .sidebar-account { padding-top: 9px; }
  .menu-button { display: grid; }
  .metrics { gap: 8px; margin-bottom: 12px; }
  .metric { padding: 11px; }
  .split { grid-template-columns: 1fr; gap: 12px; }
  .page-head { align-items: flex-start; gap: 10px; margin-bottom: 16px; }
  .sign-in { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sign-in-story { padding: 20px; gap: 16px; }
  .sign-in-story-copy h1 { font-size: 2rem; max-width: 18ch; }
  .sign-in-foot { display: none; }
}
@media (max-width: 390px) {
  .topbar { gap: 8px; }
  .topbar-right { gap: 4px; }
  .clock-display > span { display: none; }
  .form-grid { grid-template-columns: 1fr; }
}

.slip-cell { font: inherit; font-weight: 700; cursor: pointer; }
.backfill-available { background: #e3f3ed; color: #1f5f4d; }
.legend .backfill-available { background: transparent; }
.legend .backfill-available::before { background: #8bc6b5; }
.plain-button { padding: 0; background: none; border: 0; color: var(--blue); text-align: left; font: inherit; font-weight: 760; cursor: pointer; }
.plain-button:hover { text-decoration: underline; }
.slip-detail-actions { margin-top: 12px; }
.slip-detail-actions + h3 { margin: 16px 0 8px; }
.matching-slips { display: flex; flex-wrap: wrap; gap: 8px; }

.schedule-toolbar { flex-wrap: wrap; }
.schedule-toolbar select, .schedule-toolbar input { width: auto; min-width: 112px; }
.schedule-toolbar strong { min-width: 125px; text-align: center; }
.month-arrow { padding-inline: 10px; font-size: 1.2rem; }
.schedule-legend { display: flex; flex-wrap: wrap; gap: 7px 16px; padding: 10px 14px; font-size: .75rem; color: var(--muted); }
.schedule-legend span { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.schedule-legend i { height: 12px; width: 12px; border: 1px solid #658195; border-radius: 3px; background: var(--period-color); }
.schedule-color { --period-color: #fbfcfd; --period-border: #9eafbb; }
.schedule-color.long { --period-color: #a4c6ed; --period-border: #31548c; }
.schedule-color.short { --period-color: #b8a8ea; --period-border: #6041a8; }
.schedule-color.away { --period-color: #8cd9b9; --period-border: #14664f; }
.schedule-color.outage { --period-color: #b9c3c9; --period-border: #44565e; }
.schedule-color.hold { --period-color: #f3d59d; --period-border: #9d6418; }
.schedule-color.long.hold { --period-color: #dae8fa; --period-border: #31548c; }
.schedule-color.short.hold { --period-color: #eee5ff; --period-border: #6041a8; }
.calendar-scroll { overflow: auto; max-height: min(67vh, 850px); border-top: 1px solid var(--line); }
.slip-calendar { border-collapse: separate; border-spacing: 0; width: 100%; }
.slip-calendar thead th { position: sticky; top: 0; z-index: 2; padding: 5px 4px; text-align: center; background: #f0f5f8; }
.slip-calendar thead th.today { background: #e1f2ee; color: var(--teal); }
.slip-calendar tbody th, .slip-calendar thead th:first-child { position: sticky; left: 0; min-width: 112px; text-align: left; padding: 3px 9px; white-space: nowrap; }
.slip-calendar tbody th { background: var(--surface); z-index: 1; }
.slip-calendar thead th:first-child { z-index: 3; }
.slip-calendar th small { display: block; font-size: .66rem; font-weight: normal; color: var(--muted); }
.slip-calendar td { padding: 0; min-width: 27px; border-right: 1px solid #e2e9ed; }
.slip-calendar tbody tr:hover td { background: transparent; }
.day-cell { display: block; width: 100%; height: 34px; border: 0; padding: 0; cursor: pointer; background: var(--period-color); }
.day-cell.hold, .day-cell.away, .day-cell.outage { background: repeating-linear-gradient(135deg, transparent 0 5px, #2943571c 5px 7px), var(--period-color); }
.day-cell:hover, .day-cell:focus-visible { outline: 2px solid var(--period-border); outline-offset: -2px; }

.map-wrap { padding: 14px; background: #edf2f5; }
.map-viewport { position: relative; width: min(100%, 1050px); margin-inline: auto; }
.map-viewport img { display: block; width: 100%; }
.map-overlay { position: absolute; width: 100%; height: 100%; inset: 0; pointer-events: none; }
.map-overlay.drawing { pointer-events: auto; cursor: crosshair; touch-action: none; }
.map-overlay a { pointer-events: auto; }
.map-overlay.drawing a { pointer-events: none; }
.map-slip { fill: var(--period-color); fill-opacity: .66; stroke: var(--period-border); stroke-width: 2px; vector-effect: non-scaling-stroke; cursor: pointer; }
.map-slip.available { fill: #c8f6de; stroke: #14664f; }
.map-slip.hold, .map-slip.away, .map-slip.outage { stroke-dasharray: 4 2; }
.map-overlay a:hover .map-slip, .map-overlay a:focus-visible .map-slip { fill-opacity: .94; stroke-width: 3px; }
.map-draft { fill: #5eb8c766; stroke: #14647a; stroke-width: 2px; stroke-dasharray: 5 3; vector-effect: non-scaling-stroke; }

.import-group { border: 1px solid var(--line); border-radius: 7px; padding: 9px 12px; margin-bottom: 8px; }
.import-group summary { cursor: pointer; font-weight: 720; }
.import-group details { margin-top: 7px; padding: 5px 4px; border-top: 1px solid var(--line); }
.import-group details summary { font-size: .83rem; }
.import-group p, .import-group dl { font-size: .81rem; }
.import-group dl { display: grid; grid-template-columns: minmax(85px, 1fr) 2fr; gap: 4px 10px; }
.import-group dt { color: var(--muted); }
.import-group dd { margin: 0; overflow-wrap: anywhere; }
