:root {
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #151d1e;
  color: #f4f1e8;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: #141a1b;
}

body:has(.modal-backdrop) {
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.app-toolbar,
.hero-banner {
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 0 0 8px 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-banner-start, #0d1b3d) 92%, transparent), color-mix(in srgb, var(--theme-banner-end, #1f3568) 88%, transparent));
  box-shadow: none;
  padding: 6px 8px;
}

.toolbar-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.toolbar-status {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 18px;
  margin-top: 4px;
  color: rgba(244, 241, 232, 0.78);
  font-size: 11px;
}

.toolbar-status strong {
  color: #f4f1e8;
  font-size: 12px;
}

.toolbar-status small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(244, 241, 232, 0.58);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
}

.brand h1 {
  margin: 0;
  font-size: 23px;
  line-height: 1;
  letter-spacing: 0;
}

.brand p {
  font-size: 15px;
  line-height: 1.1;
}

.brand p,
.muted {
  margin: 3px 0 0;
  color: #a9b1ad;
}

.account-chip,
.status-copy {
  color: #c8cec8;
  font-size: 12px;
}

.secondary-status {
  max-width: min(680px, 80vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 0.74;
}

.account-chip {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border-radius: 999px;
  background: rgba(67, 148, 91, 0.9);
  color: #ffffff;
  padding: 6px 9px;
}

.nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px;
  max-width: none;
  flex: 1 1 auto;
}

.nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #d9ddd7;
  background: transparent;
  border-radius: 7px;
  min-width: 0;
  min-height: 34px;
  padding: 6px 11px;
}

.nav button span {
  font-size: 13px;
  font-weight: 700;
}

.nav .tab-icon {
  font-size: 15px;
  line-height: 1;
  opacity: 0.86;
}

.nav button small {
  display: none;
}

.nav button.active {
  background: var(--theme-button, rgba(214, 184, 90, 0.95));
  color: #ffffff;
  box-shadow: none;
}

.nav button.active small {
  color: rgba(255, 255, 255, 0.82);
}

.content {
  min-width: 0;
  max-width: 1360px;
  width: 100%;
  margin: 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.topbar h2,
.hero-actions h2 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.status-row,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-row {
  max-width: 42vw;
}

.toolbar-actions {
  flex: 0 0 auto;
  max-width: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.08);
  color: #f4f1e8;
  white-space: nowrap;
}

.toolbar-icon-button,
.toolbar-icon-select {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 36px;
  border-radius: 7px;
  color: #ffffff;
  background: transparent;
  border: 0;
  font-size: 18px;
  font-weight: 800;
}

.toolbar-icon-button:hover,
.toolbar-icon-select:hover {
  background: rgba(255, 255, 255, 0.10);
}

.toolbar-icon-select select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dashboard-only-action {
  display: inline-grid;
}

.app-shell:not([data-active-view="dashboard"]) .dashboard-only-action {
  display: none;
}

.pill.good {
  background: rgba(67, 148, 91, 0.9);
}

.pill.warn {
  background: rgba(220, 140, 45, 0.95);
}

.primary,
.secondary,
.danger,
.pill-button {
  min-height: 32px;
  border-radius: 8px;
  padding: 6px 11px;
  color: #ffffff;
}

.primary {
  background: var(--theme-accent, #2f7ac7);
}

.secondary {
  background: rgba(255, 255, 255, 0.1);
}

.danger {
  background: rgba(168, 68, 68, 0.9);
}

.pill-button,
.toolbar-select {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  border-radius: 999px;
  border: 0;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  padding: 6px 10px;
  white-space: nowrap;
}

.primary-pill {
  background: var(--theme-accent, #2f7ac7);
}

.toolbar-select {
  padding: 0 5px 0 10px;
}

.toolbar-select span {
  font-size: 13px;
  font-weight: 750;
}

.toolbar-select select {
  width: auto;
  min-height: 25px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #ffffff;
  padding: 4px 18px 4px 4px;
}

.mini {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 13px;
}

.grid {
  display: grid;
  grid-template-columns: minmax(250px, 280px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.split-view {
  align-items: stretch;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(460px, 1.2fr);
  gap: 12px;
  align-items: start;
}

.native-page-stack {
  display: grid;
  gap: 12px;
  max-width: 1100px;
}

.metric-band {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 16px;
}

.metric {
  display: grid;
  gap: 5px;
  min-height: 82px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 16px;
  color: #f4f1e8;
  text-align: left;
}

.dashboard-stack,
.widget-pair-grid {
  display: grid;
  gap: 18px;
}

.widget-pair-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.metric:hover,
.dashboard-widget-card:hover,
.upcoming-charter-card:hover,
.weather-card:hover,
.tide-card:hover {
  border-color: color-mix(in srgb, var(--theme-accent, #2f7ac7) 52%, rgba(255, 255, 255, 0.08));
  background: rgba(255, 255, 255, 0.065);
}

.widget-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 18px;
}

.dashboard-widget-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  min-height: 128px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 18px;
  color: #f4f1e8;
  text-align: left;
  cursor: pointer;
}

.dashboard-widget-card h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.dashboard-widget-card strong {
  display: block;
  font-size: 26px;
  line-height: 1.1;
}

.dashboard-widget-card p {
  margin: 10px 0 0;
  color: #aeb6b0;
  white-space: pre-line;
}

.widget-symbol {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #ffffff;
  background: var(--theme-accent, #2f7ac7);
  overflow: hidden;
  font-size: 0;
  line-height: 0;
}

.widget-symbol svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.widget-symbol:not(:has(svg))::before {
  display: block;
  font-size: 18px;
  line-height: 1;
}

.widget-icon-exclamationmark-triangle:not(:has(svg))::before {
  content: "!";
}

.widget-icon-bell-badge:not(:has(svg))::before {
  content: "•";
}

.widget-icon-banknote:not(:has(svg))::before {
  content: "$";
}

.active-charter-card,
.upcoming-charter-card {
  cursor: pointer;
}

.active-charter-card {
  display: grid;
  gap: 18px;
  border-radius: 16px;
  padding: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.105), rgba(255, 255, 255, 0.045)),
    rgba(21, 32, 31, 0.94);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.22);
}

.active-charter-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
}

.active-charter-title-block {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.active-charter-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #f4f1e8;
  font-size: 17px;
  font-weight: 800;
}

.active-charter-label-icon,
.active-charter-button-icon {
  display: inline-grid;
  place-items: center;
}

.active-charter-label-icon svg,
.active-charter-button-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.active-charter-card h3 {
  margin: 0;
  color: #f4f1e8;
  font-size: 30px;
  line-height: 1.05;
  font-weight: 850;
}

.active-charter-title-block p {
  margin: 0;
  color: #aeb6b0;
  font-weight: 700;
}

.active-charter-countdown {
  color: #e7a12a !important;
}

.active-charter-meta {
  flex: 0 0 auto;
  color: #c8cec8;
  font-size: 15px;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.active-charter-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.active-charter-actions button {
  align-items: center;
  gap: 8px;
}

.progress-track {
  position: relative;
  height: 54px;
  margin-top: 4px;
}

.progress-track::before,
.progress-fill {
  position: absolute;
  left: 18px;
  right: 22px;
  top: 28px;
  height: 12px;
  border-radius: 999px;
  content: "";
}

.progress-track::before {
  background: rgba(255, 255, 255, 0.12);
}

.progress-fill {
  right: auto;
  max-width: calc(100% - 40px);
  background: linear-gradient(90deg, #218ce6, #2bc0c2);
}

.progress-marker {
  position: absolute;
  top: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #1e63b4;
  transform: translateX(1px);
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.25));
}

.progress-marker svg {
  width: 30px;
  height: 30px;
  fill: #1e63b4;
  stroke: #1e63b4;
  stroke-width: 1.8;
}

.progress-start-dot {
  position: absolute;
  left: 13px;
  top: 29px;
  z-index: 1;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.35);
}

.progress-flag {
  position: absolute;
  right: 2px;
  top: 17px;
  color: #f4f1e8;
}

.progress-flag svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.progress-endpoints {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #aeb6b0;
}

.progress-endpoints > div {
  display: grid;
  gap: 4px;
}

.progress-endpoints .end {
  text-align: right;
}

.progress-endpoints span {
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.progress-endpoints strong {
  color: #c8cec8;
  font-size: 13px;
  font-weight: 650;
}

.active-charter-body,
.upcoming-charter-body,
.weather-now,
.tide-now {
  display: grid;
  gap: 12px;
}

.active-charter-route,
.active-charter-times,
.upcoming-stats,
.weather-forecast,
.tide-extrema {
  display: grid;
  gap: 10px;
}

.active-charter-times,
.upcoming-stats,
.weather-forecast,
.tide-extrema {
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
}

.active-charter-route {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.active-charter-meta,
.weather-meta,
.weather-subhead {
  color: #c8cec8;
}

.weather-now {
  grid-template-columns: auto minmax(0, 1fr) minmax(120px, auto);
  align-items: center;
}

.weather-symbol {
  font-size: 42px;
  line-height: 1;
}

.weather-now strong,
.tide-now strong {
  font-size: 32px;
  line-height: 1;
}

.weather-forecast > div,
.tide-extreme,
.upcoming-stats > div,
.active-charter-times > div,
.active-charter-route > div {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px;
}

.weather-forecast > div {
  display: grid;
  justify-items: center;
  gap: 4px;
}

.weather-day-symbol {
  font-size: 22px;
}

.tide-kind {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 3px 8px;
  color: #ffffff;
  background: var(--theme-accent, #2f7ac7);
  font-size: 12px;
  font-weight: 800;
}

.tide-kind.low {
  background: rgba(75, 128, 190, 0.9);
}

.widget-icon-sparkles:not(:has(svg))::before {
  content: "*";
}

.widget-icon-clock:not(:has(svg))::before {
  content: "◷";
}

.metric span {
  color: #aeb6b0;
  font-size: 13px;
}

.metric strong {
  font-size: 24px;
  line-height: 1;
}

.panel {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(27, 38, 39, 0.78);
  padding: 14px;
  box-shadow: none;
}

.panel h3 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: 0;
}

.field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
}

.field label {
  color: #c8cec8;
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #f5f2ea;
  background: rgba(13, 18, 19, 0.86);
  padding: 8px 10px;
}

textarea {
  min-height: 124px;
  resize: vertical;
}

.detail-stack {
  display: grid;
  gap: 10px;
}

.section-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 12px;
}

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

.section-header h3,
.section-header h4,
.section-header h5 {
  margin: 0;
  letter-spacing: 0;
}

.section-header h4 {
  font-size: 15px;
}

.section-header h5 {
  font-size: 14px;
}

.widget-selector-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.link-button {
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--theme-accent, #2f7ac7);
  padding: 6px 2px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: var(--theme-accent, #2f7ac7);
  color: #ffffff;
  font: inherit;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.nested-list {
  display: grid;
  gap: 10px;
}

.nested-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.14);
  padding: 10px;
}

.timeline-list,
.archive-list,
.file-list {
  display: grid;
  gap: 10px;
}

.calendar-header {
  align-items: end;
}

.calendar-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekdays {
  gap: 8px;
  margin-bottom: 8px;
  color: #aeb6b0;
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.calendar-weekdays span {
  padding: 0 4px;
}

.calendar-grid {
  gap: 8px;
}

.calendar-day {
  display: grid;
  grid-template-rows: auto minmax(96px, 1fr);
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  padding: 8px;
}

.calendar-day.muted-month {
  opacity: 0.44;
}

.calendar-day.today {
  border-color: rgba(214, 184, 90, 0.95);
  box-shadow: inset 0 0 0 1px rgba(214, 184, 90, 0.35);
}

.calendar-day-number {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #f5f2ea;
  font-weight: 800;
}

.calendar-day.today .calendar-day-number {
  background: rgba(214, 184, 90, 0.95);
  color: #ffffff;
}

.calendar-events {
  display: grid;
  align-content: start;
  gap: 5px;
  min-width: 0;
}

.calendar-event {
  display: grid;
  gap: 1px;
  width: 100%;
  min-height: 38px;
  border-radius: 7px;
  color: #ffffff;
  text-align: left;
  padding: 6px 7px;
}

.calendar-event span,
.calendar-event small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.calendar-event span {
  font-size: 12px;
  font-weight: 800;
}

.calendar-event small {
  color: rgba(255, 255, 255, 0.78);
  font-size: 11px;
}

.calendar-event.confirmed {
  background: rgba(47, 122, 199, 0.86);
}

.calendar-event.hold {
  background: rgba(220, 140, 45, 0.9);
}

.calendar-event.blocked {
  background: rgba(140, 145, 150, 0.8);
}

.calendar-more {
  color: #aeb6b0;
  font-size: 12px;
  padding: 2px 4px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  color: #f2f0e8;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
}

.timeline-date,
.timeline-meta,
.file-row small {
  color: #aeb6b0;
  font-size: 13px;
}

.timeline-main {
  display: grid;
  gap: 3px;
}

.timeline-main small {
  color: #aeb6b0;
}

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px 12px;
}

.file-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.archive-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  padding: 14px;
}

.archive-metrics {
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  margin-bottom: 12px;
}

.archive-copy {
  color: #c8cec8;
}

.archive-copy p {
  margin: 6px 0;
}

.payment-table {
  display: grid;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.payment-row {
  display: grid;
  grid-template-columns: 150px minmax(150px, 1.2fr) minmax(120px, 1fr) minmax(150px, 1fr) 120px 90px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-width: 840px;
  min-height: 44px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  color: #f2f0e8;
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  padding: 10px 12px;
}

.payment-row:last-child {
  border-bottom: 0;
}

.payment-row span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-head {
  color: #c8cec8;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  font-weight: 800;
  pointer-events: none;
}

.payment-row.paid span:first-child {
  color: #68c778;
}

.payment-row.unpaid span:first-child {
  color: #ee7676;
}

.payment-row.missing span:first-child,
.payment-row.missing span:nth-child(5) {
  color: #e5a34f;
}

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

.chalkboard-card {
  display: grid;
  grid-template-rows: auto minmax(240px, 1fr);
  gap: 14px;
  min-height: 360px;
  border: 10px solid var(--board-frame, #543a23);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(145deg, var(--board-top, #1f3a29), var(--board-bottom, #0f2119));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 18px 36px rgba(255, 255, 255, 0.03);
  color: var(--chalk-color, #f5f5f5);
  padding: 14px;
  cursor: pointer;
}

.chalkboard-header {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.chalkboard-title {
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid color-mix(in srgb, var(--chalk-color, #f5f5f5) 34%, transparent);
  border-radius: 0;
  background: transparent;
  color: var(--chalk-color, #f5f5f5);
  font-size: 21px;
  font-weight: 800;
  padding: 3px 0 7px;
}

.chalkboard-title:focus,
.chalkboard-text:focus {
  outline: 2px solid color-mix(in srgb, var(--chalk-accent, #ffffff) 44%, transparent);
  outline-offset: 3px;
}

.chalkboard-controls {
  display: grid;
  grid-template-columns: auto repeat(2, minmax(112px, 1fr)) auto;
  gap: 8px;
  align-items: end;
}

.chalkboard-expand {
  min-height: 34px;
  align-self: end;
  border: 1px solid color-mix(in srgb, var(--chalk-color, #f5f5f5) 28%, transparent);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--chalk-color, #f5f5f5);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.chalkboard-expand:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chalkboard-select {
  display: grid;
  gap: 4px;
}

.chalkboard-select span {
  color: color-mix(in srgb, var(--chalk-color, #f5f5f5) 72%, transparent);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.chalkboard-select select,
.chalkboard-fontsize {
  min-height: 34px;
  border: 1px solid color-mix(in srgb, var(--chalk-color, #f5f5f5) 22%, transparent);
  border-radius: 7px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--chalk-color, #f5f5f5);
}

.chalkboard-select select {
  padding: 6px 28px 6px 9px;
}

.chalkboard-fontsize {
  display: grid;
  grid-template-columns: 32px 42px 32px;
  align-items: center;
  overflow: hidden;
}

.chalkboard-fontsize span {
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.chalkboard-fontbutton {
  width: 100%;
  height: 100%;
  min-height: 32px;
  color: var(--chalk-color, #f5f5f5);
  background: transparent;
  font-size: 18px;
  font-weight: 800;
}

.chalkboard-fontbutton:hover {
  background: rgba(255, 255, 255, 0.08);
}

.chalkboard-text {
  min-height: 240px;
  height: 100%;
  border: 1px solid color-mix(in srgb, var(--chalk-color, #f5f5f5) 20%, transparent);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.12);
  color: var(--chalk-color, #f5f5f5);
  font-family: "Marker Felt", "Bradley Hand", "Comic Sans MS", ui-rounded, system-ui, sans-serif;
  font-size: var(--chalk-size, 23px);
  line-height: 1.35;
  padding: 14px;
  resize: vertical;
}

.chalkboard-text::placeholder,
.chalkboard-title::placeholder {
  color: color-mix(in srgb, var(--chalk-color, #f5f5f5) 54%, transparent);
}

.summary-list,
.todo-list {
  display: grid;
  gap: 9px;
}

.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  color: #f2f0e8;
  background: rgba(255, 255, 255, 0.055);
  padding: 12px;
}

.summary-card span {
  display: grid;
  gap: 3px;
}

.summary-card small {
  color: #aeb6b0;
  font-size: 13px;
}

.summary-date {
  min-width: 132px;
  text-align: right;
}

.todo-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px 12px;
}

.todo-row span {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 5px;
  flex: 0 0 auto;
}

.todo-row.editable {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.todo-row.editable input[type="checkbox"] {
  width: 18px;
}

.editable-list input {
  margin: 0;
}

.button-row,
.inline-form,
.segmented,
.toggle-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.button-row {
  margin-top: 14px;
}

.inline-form {
  margin: 10px 0;
}

.inline-form input,
.inline-form select {
  flex: 1 1 240px;
}

.segmented {
  align-items: stretch;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  padding: 4px;
  width: fit-content;
}

.segmented button {
  min-height: 32px;
  border-radius: 999px;
  color: #f2f0e8;
  background: transparent;
  padding: 6px 12px;
}

.segmented button.active {
  background: var(--theme-accent, #2f7ac7);
}

.toggle-grid {
  display: grid;
  grid-template-columns: minmax(220px, 360px);
  justify-content: center;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.055);
  padding: 10px 12px;
}

.toggle-row input {
  width: auto;
}

.template-list {
  display: grid;
  gap: 8px;
}

.template-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.soft-divider {
  border: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin: 18px 0;
}

.record-list {
  display: grid;
  gap: 6px;
  max-height: calc(100vh - 165px);
  overflow: auto;
  padding-right: 4px;
}

.record-button {
  display: grid;
  gap: 2px;
  width: 100%;
  text-align: left;
  border-radius: 7px;
  color: #f2f0e8;
  background: transparent;
  padding: 9px 10px;
}

.record-button.active {
  outline: 0;
  background: color-mix(in srgb, var(--theme-accent, #2f7ac7) 24%, transparent);
  box-shadow: inset 3px 0 0 var(--theme-accent, #2f7ac7);
}

.record-title {
  font-weight: 700;
}

.record-meta {
  color: #aeb6b0;
  font-size: 13px;
}

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

.profile-grid,
.vessel-editor-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.vessel-page-stack,
.crew-list {
  display: grid;
  gap: 10px;
}

.crew-inline-card {
  background: rgba(255, 255, 255, 0.045);
}

.crew-section-card {
  margin-top: 12px;
}

.profile-photo-column,
.vessel-photo-column {
  display: grid;
  gap: 10px;
}

.profile-photo,
.vessel-photo {
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: #aeb6b0;
  text-align: center;
}

.profile-photo {
  aspect-ratio: 1;
}

.vessel-photo {
  aspect-ratio: 4 / 3;
}

.profile-photo img,
.vessel-photo img,
.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
}

.photo-tile {
  display: grid;
  gap: 8px;
}

.photo-tile a,
.photo-tile-placeholder {
  display: grid;
  place-items: center;
  overflow: hidden;
  min-height: 132px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.18);
  color: #aeb6b0;
}

.repeat-guest-card {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 10px;
  background: rgba(220, 140, 45, 0.18);
}

.repeat-guest-card.confirmed {
  background: rgba(67, 148, 91, 0.2);
}

.full {
  grid-column: 1 / -1;
}

.wide {
  grid-column: span 2;
}

.empty {
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 18px;
  color: #bcc4bd;
}

.empty.compact {
  padding: 14px;
}

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

.auth-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  width: min(420px, 100%);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.54);
  padding: 20px;
}

.modal-sheet {
  width: min(720px, 100%);
  max-height: min(780px, calc(100vh - 40px));
  overflow: auto;
  overflow-wrap: anywhere;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: #1b2627;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.42);
  padding: 16px;
}

.modal-sheet h3,
.modal-sheet h4,
.modal-sheet p,
.modal-sheet strong,
.modal-sheet .muted {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.modal-sticky-header {
  position: sticky;
  top: -16px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -16px -16px 16px;
  padding: 14px 16px;
  background: color-mix(in srgb, #1b2627 94%, transparent);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(14px);
}

.modal-sticky-header h3 {
  margin: 0;
}

.chalkboard-editor-sheet {
  width: min(920px, 100%);
  height: min(820px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  border: 10px solid var(--board-frame, #543a23);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.08), transparent 28%),
    linear-gradient(145deg, var(--board-top, #1f3a29), var(--board-bottom, #0f2119));
  color: var(--chalk-color, #f5f5f5);
  padding: 16px;
}

.chalkboard-editor-header {
  top: -16px;
  background: color-mix(in srgb, var(--board-top, #1f3a29) 92%, transparent);
}

.chalkboard-editor-content {
  min-height: calc(100% - 56px);
  display: grid;
  grid-template-rows: auto auto minmax(320px, 1fr);
  gap: 16px;
}

.chalkboard-editor-content > .chalkboard-controls {
  justify-content: end;
}

.chalkboard-editor-text {
  min-height: 320px;
  resize: none;
}

.settings-select {
  width: min(360px, 100%);
}

@media (max-width: 980px) {
  .app-shell {
    padding: 10px;
  }

  .toolbar-main {
    display: grid;
    align-items: stretch;
  }

  .status-row {
    max-width: none;
    justify-content: flex-start;
  }

  .nav {
    justify-content: start;
  }

  .grid,
  .dashboard-grid,
  .notes-grid,
  .widget-card-grid,
  .toggle-grid,
  .form-grid,
  .profile-grid,
  .vessel-editor-grid,
  .widget-pair-grid {
    grid-template-columns: 1fr;
  }

  .chalkboard-header,
  .chalkboard-controls {
    grid-template-columns: 1fr;
  }

  .chalkboard-editor-content > .chalkboard-controls {
    justify-content: stretch;
  }

  .calendar-grid,
  .calendar-weekdays {
    gap: 5px;
  }

  .calendar-day {
    min-height: 104px;
    padding: 6px;
  }

  .calendar-event {
    min-height: 30px;
    padding: 5px;
  }

  .metric-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .active-charter-header {
    display: grid;
  }

  .active-charter-meta {
    text-align: left;
    white-space: normal;
  }

  .wide {
    grid-column: auto;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 12px;
  }

  .app-toolbar,
  .hero-banner {
    border-radius: 8px;
    padding: 10px;
  }

  .topbar,
  .summary-card,
  .timeline-item {
    align-items: stretch;
    flex-direction: column;
  }

  .timeline-item,
  .file-row {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

  .calendar-grid {
    grid-template-columns: 1fr;
  }

  .calendar-day {
    grid-template-rows: auto;
    min-height: 0;
  }

  .calendar-day.muted-month {
    display: none;
  }

  .calendar-controls {
    justify-content: stretch;
  }

  .calendar-controls button {
    flex: 1 1 44%;
  }

  .status-row {
    align-items: stretch;
  }

  .status-row button,
  .status-row .pill {
    justify-content: center;
  }

  .account-chip,
  .nav button {
    max-width: none;
    width: 100%;
  }

  .modal-backdrop {
    padding: 0;
    place-items: stretch;
  }

  .modal-sheet,
  .chalkboard-editor-sheet {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .modal-sheet {
    padding: 14px;
  }

  .modal-sticky-header {
    top: -14px;
    margin: -14px -14px 14px;
    padding:
      max(14px, env(safe-area-inset-top))
      max(14px, env(safe-area-inset-right))
      14px
      max(14px, env(safe-area-inset-left));
  }

  .chalkboard-editor-sheet {
    border-width: 6px;
  }

  .chalkboard-editor-content {
    min-height: calc(100dvh - 110px);
    grid-template-rows: auto auto minmax(280px, 1fr);
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }

  .metric-band {
    grid-template-columns: 1fr;
  }

  .active-charter-card {
    padding: 16px;
  }

  .active-charter-card h3 {
    font-size: 28px;
  }

  .active-charter-actions {
    display: grid;
  }

  .active-charter-actions button {
    justify-content: center;
  }

  .todo-row.editable {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .todo-row.editable button {
    grid-column: 1 / -1;
  }

  .summary-date {
    min-width: 0;
    text-align: left;
  }
}

/* macOS-inspired presentation */
:root {
  --mac-surface: rgba(28, 38, 40, 0.78);
  --mac-surface-strong: rgba(34, 45, 47, 0.94);
  --mac-surface-soft: rgba(255, 255, 255, 0.055);
  --mac-border: rgba(255, 255, 255, 0.105);
  --mac-highlight: rgba(255, 255, 255, 0.16);
  --mac-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

body {
  background:
    radial-gradient(circle at 12% 0%, color-mix(in srgb, var(--theme-accent, #2f7ac7) 16%, transparent), transparent 34rem),
    radial-gradient(circle at 92% 12%, rgba(255, 255, 255, 0.045), transparent 30rem),
    linear-gradient(180deg, #182122, #101617 72%);
  background-attachment: fixed;
}

.app-shell {
  gap: 18px;
  padding: 18px;
}

.app-toolbar {
  position: sticky;
  top: 12px;
  z-index: 10;
  border: 1px solid var(--mac-border);
  border-radius: 18px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-banner-start, #0d1b3d) 90%, transparent), color-mix(in srgb, var(--theme-banner-end, #1f3568) 84%, transparent)),
    rgba(23, 31, 33, 0.88);
  box-shadow: var(--mac-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 10px 12px;
  backdrop-filter: blur(22px) saturate(1.2);
}

.toolbar-main {
  gap: 14px;
}

.brand {
  min-width: 210px;
}

.brand img {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
}

.brand h1 {
  font-size: 24px;
  font-weight: 820;
  letter-spacing: -0.02em;
}

.brand p {
  margin-top: 4px;
  color: rgba(244, 241, 232, 0.66);
  font-size: 12px;
}

.nav {
  gap: 6px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.14);
}

.nav button {
  gap: 6px;
  min-height: 38px;
  border-radius: 9px;
  padding: 7px 10px;
  transition: background 140ms ease, color 140ms ease, transform 140ms ease;
}

.nav button:hover {
  background: rgba(255, 255, 255, 0.075);
}

.nav button:active {
  transform: scale(0.98);
}

.nav button.active {
  color: #fff;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--theme-button, #d1ab4a) 94%, white 6%), var(--theme-button, #d1ab4a));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--theme-button, #d1ab4a) 25%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.toolbar-actions {
  gap: 8px;
}

.toolbar-icon-button,
.toolbar-icon-select {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.toolbar-icon-button:hover,
.toolbar-icon-select:hover {
  border-color: rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.11);
}

.account-chip,
.pill {
  min-height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.account-chip {
  max-width: 180px;
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
}

.content {
  max-width: 1440px;
  padding: 2px 4px 28px;
}

.topbar {
  margin: 4px 2px 22px;
}

.topbar h2,
.hero-actions h2 {
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 820;
  letter-spacing: -0.035em;
}

.panel,
.section-card,
.metric,
.dashboard-widget-card,
.calendar-day,
.timeline-item,
.file-row,
.archive-card,
.nested-card {
  border-color: var(--mac-border);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.065), rgba(255, 255, 255, 0.025)),
    var(--mac-surface);
  box-shadow: 0 10px 32px rgba(0, 0, 0, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.045);
  backdrop-filter: blur(18px);
}

.panel,
.section-card,
.archive-card {
  border-radius: 16px;
}

.panel {
  padding: 20px;
}

.section-card {
  padding: 18px;
}

.metric {
  min-height: 96px;
  border-radius: 15px;
  padding: 18px;
}

.metric span {
  color: rgba(244, 241, 232, 0.68);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.045em;
  text-transform: uppercase;
}

.metric strong {
  font-size: 30px;
  font-weight: 820;
}

.dashboard-widget-card {
  min-height: 146px;
  border-radius: 16px;
  padding: 20px;
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease;
}

.metric:hover,
.dashboard-widget-card:hover,
.upcoming-charter-card:hover,
.weather-card:hover,
.tide-card:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--theme-accent, #2f7ac7) 48%, var(--mac-border));
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.035)),
    var(--mac-surface);
}

.widget-symbol {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 7px 18px color-mix(in srgb, var(--theme-accent, #2f7ac7) 22%, transparent);
}

.active-charter-card {
  border: 1px solid var(--mac-border);
  border-radius: 20px;
  padding: 24px;
  background:
    radial-gradient(circle at 90% 0%, color-mix(in srgb, var(--theme-accent, #2f7ac7) 15%, transparent), transparent 28rem),
    linear-gradient(145deg, rgba(255, 255, 255, 0.095), rgba(255, 255, 255, 0.035)),
    var(--mac-surface-strong);
  box-shadow: var(--mac-shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.active-charter-card h3 {
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: -0.035em;
}

.active-charter-label-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.active-charter-switcher {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--mac-border);
  border-radius: 9px;
  padding: 4px 8px;
  color: rgba(244, 241, 232, 0.65);
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  font-weight: 700;
}

.active-charter-switcher select {
  min-height: 26px;
  width: auto;
  max-width: min(360px, 55vw);
  border: 0;
  padding: 2px 24px 2px 5px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

input,
textarea,
select {
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 10px;
  background: rgba(6, 11, 12, 0.54);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  padding: 9px 11px;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--theme-accent, #2f7ac7) 78%, white 8%);
  background: rgba(8, 14, 15, 0.72);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--theme-accent, #2f7ac7) 22%, transparent), inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

.field {
  gap: 7px;
  margin-bottom: 14px;
}

.field label {
  color: rgba(244, 241, 232, 0.72);
  font-size: 12px;
  font-weight: 720;
}

.primary,
.secondary,
.danger,
.pill-button {
  min-height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  padding: 7px 13px;
  font-weight: 700;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.primary {
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-accent, #2f7ac7) 90%, white 10%), var(--theme-accent, #2f7ac7));
  box-shadow: 0 7px 18px color-mix(in srgb, var(--theme-accent, #2f7ac7) 22%, transparent), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.secondary {
  background: rgba(255, 255, 255, 0.075);
}

.primary:hover,
.secondary:hover,
.danger:hover,
.pill-button:hover {
  filter: brightness(1.08);
}

.section-header {
  margin-bottom: 14px;
}

.section-header h3 {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.015em;
}

.section-header h4 {
  font-size: 17px;
}

.calendar-grid {
  gap: 10px;
}

.calendar-day {
  min-height: 142px;
  border-radius: 13px;
  padding: 10px;
}

.calendar-event {
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.timeline-item,
.file-row {
  border: 1px solid var(--mac-border);
  border-radius: 13px;
  padding: 14px;
}

.payment-table {
  border-color: var(--mac-border);
  border-radius: 15px;
  background: var(--mac-surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}

.payment-row {
  min-height: 50px;
  background: rgba(255, 255, 255, 0.025);
}

.payment-head {
  background: rgba(255, 255, 255, 0.075);
}

.modal-backdrop {
  background: rgba(3, 7, 8, 0.62);
  backdrop-filter: blur(10px);
}

.modal-sheet {
  border-color: var(--mac-highlight);
  border-radius: 20px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.055), transparent),
    rgba(25, 35, 37, 0.96);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  padding: 22px;
}

.modal-sticky-header {
  top: -22px;
  margin: -22px -22px 20px;
  padding: 18px 22px;
  background: rgba(28, 39, 41, 0.9);
}

.auth-card {
  width: min(520px, 100%);
  border-radius: 22px;
  padding: 28px;
  box-shadow: var(--mac-shadow);
}

.auth-card .brand {
  margin-bottom: 24px;
}

.chalkboard-card {
  border-radius: 15px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

@media (max-width: 1180px) {
  .toolbar-main {
    flex-wrap: wrap;
  }

  .brand {
    flex: 1 1 auto;
  }

  .nav {
    order: 3;
    flex-basis: 100%;
  }
}

@media (max-width: 760px) {
  .app-shell {
    gap: 12px;
    padding: 10px;
  }

  .app-toolbar {
    position: static;
    border-radius: 15px;
    padding: 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand p,
  .account-chip {
    display: none;
  }

  .nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .nav button {
    width: 100%;
  }

  .toolbar-actions {
    margin-left: auto;
  }

  .content {
    padding-inline: 0;
  }

  .panel {
    padding: 16px;
  }

  .metric-band {
    gap: 10px;
  }

  .modal-sheet {
    border-radius: 0;
    padding: 16px;
  }

  .modal-sticky-header {
    top: -16px;
    margin: -16px -16px 16px;
  }
}

/* Guest-safe public vessel calendar */
.public-calendar-screen {
  min-height: 100vh;
  padding: clamp(12px, 3vw, 34px);
  color: #172026;
  background: #dfe5e7;
}

.public-calendar-page,
.public-calendar-loading,
.public-calendar-error {
  width: min(1120px, 100%);
  margin: 0 auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 22px 70px rgba(16, 29, 35, 0.18);
}

.public-calendar-page {
  padding: clamp(18px, 3vw, 34px);
}

.public-calendar-loading,
.public-calendar-error {
  display: grid;
  min-height: 360px;
  place-items: center;
  align-content: center;
  gap: 12px;
  padding: 34px;
  text-align: center;
}

.public-calendar-error img {
  width: 68px;
  height: 68px;
  border-radius: 14px;
}

.public-calendar-error h1,
.public-calendar-error p {
  margin: 0;
}

.public-calendar-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.public-calendar-brand {
  display: flex;
  align-items: flex-start;
  gap: 15px;
}

.public-calendar-brand > img {
  width: 58px;
  height: 58px;
  border-radius: 10px;
}

.public-calendar-brand div {
  display: grid;
  gap: 2px;
}

.public-calendar-brand h1 {
  margin: 0;
  color: #11181c;
  font-size: clamp(24px, 4vw, 34px);
  letter-spacing: -0.035em;
}

.public-calendar-brand p,
.public-calendar-brand span {
  margin: 0;
  color: #68757b;
  font-size: 12px;
}

.public-calendar-brand strong {
  margin-top: 3px;
  font-size: 13px;
}

.public-calendar-vessel-image {
  width: min(260px, 34vw);
  height: 110px;
  border-radius: 10px;
  object-fit: cover;
}

.public-calendar-divider {
  height: 1px;
  margin: 18px 0 12px;
  background: #dce2e5;
}

.public-calendar-toolbar {
  display: flex;
  justify-content: flex-end;
  gap: 7px;
  margin-bottom: 12px;
}

.public-calendar-toolbar button {
  min-height: 32px;
  border: 1px solid #cfd8dc;
  border-radius: 8px;
  padding: 5px 11px;
  color: #25343b;
  background: #f7f9fa;
  box-shadow: none;
}

.public-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.public-calendar-weekday {
  padding: 4px;
  color: #6e7a80;
  font-size: 10px;
  font-weight: 850;
  text-align: center;
}

.public-calendar-day {
  min-height: 112px;
  overflow: hidden;
  border: 1px solid #dce3e6;
  border-radius: 9px;
  padding: 6px;
  background: #f8fafb;
}

.public-calendar-day.outside {
  opacity: 0.45;
}

.public-calendar-day.today {
  border: 2px solid #2f7ac7;
}

.public-calendar-day-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  color: #26343a;
  font-size: 11px;
  font-weight: 800;
}

.public-calendar-day.today .public-calendar-day-number {
  color: #fff;
  background: #2f7ac7;
}

.public-calendar-events {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.public-calendar-event {
  overflow: hidden;
  border-radius: 5px;
  padding: 3px 5px;
  color: #fff;
  background: #2f7ac7;
  font-size: 9px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-calendar-event.status-hold {
  background: #d18a20;
}

.public-calendar-event.status-owner {
  background: #7e62b4;
}

.public-calendar-event.status-blocked {
  background: #68747a;
}

.public-calendar-event.status-haulout {
  background: #4c5960;
}

.public-calendar-events small {
  color: #6c787e;
  font-size: 9px;
}

.public-calendar-footer {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #dce2e5;
  margin-top: 14px;
  padding-top: 10px;
  color: #758187;
  font-size: 10px;
}

@media (max-width: 720px) {
  .public-calendar-screen {
    padding: 8px;
  }

  .public-calendar-page {
    overflow: visible;
    padding: 14px;
    border-radius: 14px;
  }

  .public-calendar-header {
    flex-direction: column;
    gap: 12px;
  }

  .public-calendar-brand {
    gap: 10px;
  }

  .public-calendar-brand > img {
    width: 46px;
    height: 46px;
  }

  .public-calendar-brand h1 {
    font-size: clamp(22px, 7vw, 30px);
  }

  .public-calendar-vessel-image {
    width: 100%;
    height: 132px;
  }

  .public-calendar-divider {
    margin: 14px 0 10px;
  }

  .public-calendar-toolbar {
    display: grid;
    grid-template-columns: 44px 70px 44px 64px;
    justify-content: end;
    gap: 5px;
  }

  .public-calendar-toolbar button {
    min-width: 0;
    padding-inline: 5px;
  }

  .public-calendar-grid {
    width: 100%;
    min-width: 0;
    gap: 3px;
  }

  .public-calendar-weekday {
    padding-inline: 0;
    font-size: 9px;
  }

  .public-calendar-day {
    min-width: 0;
    min-height: 82px;
    border-radius: 6px;
    padding: 3px;
  }

  .public-calendar-day-number {
    width: 21px;
    height: 21px;
    font-size: 10px;
  }

  .public-calendar-events {
    gap: 2px;
    margin-top: 2px;
  }

  .public-calendar-event {
    padding: 2px 3px;
    font-size: 8px;
  }

  .public-calendar-footer {
    flex-direction: column;
    gap: 4px;
  }
}

@media (max-width: 430px) {
  .public-calendar-screen {
    padding: 4px;
  }

  .public-calendar-page {
    padding: 10px 8px 12px;
    border-radius: 12px;
  }

  .public-calendar-brand span {
    line-height: 1.25;
  }

  .public-calendar-vessel-image {
    height: 112px;
  }

  .public-calendar-toolbar {
    grid-template-columns: 38px 58px 38px 54px;
  }

  .public-calendar-toolbar button {
    min-height: 36px;
    font-size: 11px;
  }

  .public-calendar-grid {
    gap: 2px;
  }

  .public-calendar-weekday {
    font-size: 0;
  }

  .public-calendar-weekday::after {
    content: attr(data-short-day);
    font-size: 9px;
  }

  .public-calendar-day {
    min-height: 72px;
    padding: 2px;
  }

  .public-calendar-event {
    padding-inline: 2px;
    font-size: 7px;
  }

  .public-calendar-events small {
    font-size: 7px;
  }
}

@media print {
  .public-calendar-screen {
    padding: 0;
    background: #fff;
  }

  .public-calendar-page {
    width: 100%;
    border-radius: 0;
    box-shadow: none;
  }

  .public-calendar-toolbar {
    display: none;
  }
}

/* macOS parity: dashboard banner, report workspace, and native-style controls */
.dashboard-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  overflow: hidden;
  min-height: 178px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  padding: 26px;
  background:
    radial-gradient(circle at 84% 8%, color-mix(in srgb, var(--theme-button) 22%, transparent), transparent 21rem),
    linear-gradient(135deg, var(--theme-banner-start), var(--theme-banner-end));
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.dashboard-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--mac-border);
  border-radius: 16px;
  padding: 12px 14px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025)),
    var(--mac-surface);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dashboard-command-status,
.dashboard-command-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-command-status {
  min-width: 0;
  color: rgba(244, 241, 232, 0.68);
  font-size: 12px;
}

.dashboard-command-summary {
  border-left: 1px solid var(--mac-border);
  margin-left: 3px;
  padding-left: 11px;
}

.dashboard-command-actions {
  justify-content: flex-end;
}

.dashboard-vessel-filter {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  border: 1px solid var(--mac-border);
  border-radius: 10px;
  padding: 4px 8px;
  color: rgba(244, 241, 232, 0.65);
  background: rgba(255, 255, 255, 0.055);
  font-size: 11px;
  font-weight: 750;
}

.dashboard-vessel-filter select {
  min-height: 26px;
  width: auto;
  max-width: min(280px, 46vw);
  border: 0;
  padding: 2px 24px 2px 5px;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
}

.dashboard-command-actions .primary {
  color: #101415;
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-button) 90%, white), var(--theme-button));
}

.dashboard-hero-copy {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.dashboard-hero-copy img {
  width: 68px;
  height: 68px;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.dashboard-hero h2,
.report-heading h2 {
  margin: 2px 0 6px;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -0.035em;
}

.dashboard-hero p {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.eyebrow {
  color: color-mix(in srgb, var(--theme-button) 82%, white);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-hero-actions {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.dashboard-hero-actions .primary {
  color: #101415;
  background: linear-gradient(180deg, color-mix(in srgb, var(--theme-button) 90%, white), var(--theme-button));
}

.dashboard-hero-status {
  position: absolute;
  right: 26px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 12px;
}

.dashboard-feature-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

.dashboard-feature-grid > * {
  min-width: 0;
  height: 100%;
}

.wide-button {
  width: 100%;
  justify-content: center;
}

.report-page {
  max-width: 1540px;
  margin-inline: auto;
}

.report-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 8px 2px 2px;
}

.report-heading p,
.report-heading h2 {
  margin-bottom: 0;
}

.segmented-control {
  display: inline-flex;
  gap: 2px;
  border: 1px solid var(--mac-border);
  border-radius: 11px;
  padding: 3px;
  background: rgba(5, 10, 11, 0.5);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.26);
}

.segmented-control button {
  min-height: 32px;
  border: 0;
  border-radius: 8px;
  padding: 6px 13px;
  color: rgba(244, 241, 232, 0.72);
  background: transparent;
  box-shadow: none;
}

.segmented-control button:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.segmented-control button.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.report-workspace {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.report-sidebar,
.report-main,
.report-single-column {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.report-card {
  border-radius: 18px;
}

.report-card .section-header > div:first-child p {
  margin: 4px 0 0;
}

.report-filter-grid,
.calendar-report-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.calendar-report-controls {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.report-date-toggle {
  margin: 2px 0 12px;
}

.report-presets {
  margin-bottom: 12px;
}

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

.report-record-list {
  display: grid;
  gap: 7px;
  max-height: 520px;
  overflow: auto;
  padding-right: 3px;
}

.report-record-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  border: 1px solid var(--mac-border);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.report-record-row:hover {
  border-color: color-mix(in srgb, var(--theme-accent) 48%, var(--mac-border));
  background: rgba(255, 255, 255, 0.06);
}

.report-record-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.report-record-copy strong,
.report-record-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.report-record-copy small {
  color: rgba(244, 241, 232, 0.62);
}

.status-badge {
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.08);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-badge.active {
  color: #8ce6b2;
  background: rgba(35, 166, 92, 0.16);
}

.status-badge.upcoming {
  color: #8dc9ff;
  background: rgba(47, 122, 199, 0.18);
}

.report-preview-card {
  min-height: 390px;
}

.report-preview {
  max-height: 560px;
  overflow: auto;
  border: 1px solid var(--mac-border);
  border-radius: 12px;
  margin: 0;
  padding: 18px;
  color: rgba(244, 241, 232, 0.82);
  background: rgba(4, 8, 9, 0.52);
  font: 12px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
}

.report-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.report-toolbar h3,
.report-toolbar p {
  margin: 0;
}

.checklist-report-list,
.calendar-report-list {
  display: grid;
  gap: 8px;
}

.checklist-history-row,
.calendar-report-row {
  display: grid;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--mac-border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.032);
}

.checklist-history-row {
  grid-template-columns: auto minmax(0, 1fr);
}

.checklist-history-row > span:last-child {
  display: grid;
  gap: 3px;
}

.checklist-history-row small {
  color: rgba(244, 241, 232, 0.56);
}

.checkmark {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  color: #8ce6b2;
  background: rgba(35, 166, 92, 0.16);
  font-weight: 900;
}

.calendar-report-row {
  grid-template-columns: 120px minmax(0, 1fr) auto;
}

.calendar-report-row time {
  color: color-mix(in srgb, var(--theme-accent) 70%, white);
  font-weight: 750;
}

.calendar-report-row p {
  margin: 3px 0 0;
  color: rgba(244, 241, 232, 0.6);
}

.season-archive-panel {
  padding: 0;
}

.season-archive-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.season-archive-panel > summary::-webkit-details-marker {
  display: none;
}

.season-archive-panel > summary span:first-child {
  display: grid;
  gap: 4px;
}

.season-archive-panel > summary small {
  color: rgba(244, 241, 232, 0.56);
  font-weight: 500;
}

.season-archive-panel .disclosure {
  font-size: 24px;
  transition: transform 150ms ease;
}

.season-archive-panel[open] .disclosure {
  transform: rotate(90deg);
}

.season-archive-panel .season-tools,
.season-archive-panel .section-header,
.season-archive-panel .archive-list {
  margin-inline: 20px;
}

.season-archive-panel .season-tools {
  border-top: 1px solid var(--mac-border);
  padding-top: 18px;
}

.season-archive-panel .archive-list {
  padding-bottom: 20px;
}

.link-button {
  min-height: 30px;
  border: 0;
  padding: 4px 7px;
  color: color-mix(in srgb, var(--theme-accent) 68%, white);
  background: transparent;
  box-shadow: none;
}

.link-button:hover {
  color: #fff;
  background: color-mix(in srgb, var(--theme-accent) 14%, transparent);
}

button:disabled,
.primary:disabled,
.secondary:disabled {
  opacity: 0.42;
  filter: none;
  cursor: default;
}

@media (max-width: 1050px) {
  .dashboard-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-workspace {
    grid-template-columns: 1fr;
  }

  .report-sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-sidebar > :last-child {
    grid-column: 1 / -1;
  }

  .calendar-report-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .dashboard-command-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .dashboard-command-actions {
    justify-content: flex-start;
  }

  .dashboard-hero {
    grid-template-columns: 1fr;
    border-radius: 20px;
    padding: 20px;
  }

  .dashboard-hero-copy {
    align-items: flex-start;
  }

  .dashboard-hero-copy img {
    width: 52px;
    height: 52px;
  }

  .dashboard-hero-actions {
    justify-content: flex-start;
    padding-bottom: 34px;
  }

  .dashboard-hero-status {
    right: auto;
    left: 20px;
    bottom: 18px;
  }

  .dashboard-feature-grid,
  .report-sidebar,
  .report-toggle-grid,
  .report-filter-grid,
  .calendar-report-controls {
    grid-template-columns: 1fr;
  }

  .report-sidebar > :last-child {
    grid-column: auto;
  }

  .report-heading,
  .report-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: 1fr;
  }

  .calendar-report-row {
    grid-template-columns: 1fr;
  }
}
