:root {
  --navy-950: #071a28;
  --navy-900: #0a2435;
  --navy-800: #11364a;
  --teal-600: #0c7d83;
  --teal-500: #15949a;
  --teal-100: #dff1ef;
  --canvas: #f5f7f6;
  --surface: #ffffff;
  --ink: #13252f;
  --muted: #6e7f87;
  --line: #e4eae9;
  --coral: #df6b59;
  --coral-soft: #fbe9e5;
  --amber: #d58b28;
  --amber-soft: #fff2d8;
  --green: #378566;
  --green-soft: #e3f2ea;
  --blue: #4276a6;
  --blue-soft: #e7f0f8;
  --purple: #806fa6;
  --purple-soft: #f0ebf8;
  --shadow: 0 8px 30px rgba(19, 48, 59, 0.07);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; }
body { margin: 0; min-height: 100vh; background: var(--canvas); }
button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
svg { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 244px; padding: 28px 18px 20px;
  display: flex; flex-direction: column; color: #d9e6e8; background: var(--navy-950);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 8px; color: white; }
.brand-mark {
  width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px;
  color: #bfe7e1; background: var(--teal-600);
}
.brand-mark svg { width: 36px; height: 36px; stroke-width: 1.7; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: Georgia, serif; font-size: 1.25rem; font-weight: 600; line-height: 1; }
.brand small { margin-top: 5px; color: #86a8ae; font-size: .57rem; font-weight: 700; letter-spacing: .18em; }
.main-nav { margin-top: 42px; display: grid; gap: 7px; }
.nav-link {
  min-height: 46px; display: flex; align-items: center; gap: 13px; padding: 0 13px;
  border-radius: 10px; color: #9eb6bc; font-size: .9rem; font-weight: 600;
  transition: background 160ms ease, color 160ms ease;
}
.nav-link svg { width: 19px; height: 19px; }
.nav-link:hover, .nav-link.active { color: white; background: rgba(31, 128, 133, .27); }
.nav-link.active { box-shadow: inset 3px 0 #4fb3aa; }
.nav-count, .nav-alert {
  min-width: 24px; height: 22px; margin-left: auto; padding: 0 6px; display: inline-grid;
  place-items: center; border-radius: 99px; font-size: .72rem; line-height: 1;
}
.nav-count { color: #d3e5e7; background: rgba(255,255,255,.09); }
.nav-alert { color: white; background: var(--coral); }
.sidebar-bottom { margin-top: auto; }
.target-card {
  margin: 0 4px 15px; padding: 14px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 12px; background: rgba(255,255,255,.04);
}
.target-heading { display: flex; justify-content: space-between; color: #b4c7cb; font-size: .76rem; }
.target-heading strong { color: #72c5bb; }
.progress-track { height: 5px; margin-top: 11px; overflow: hidden; border-radius: 9px; background: rgba(255,255,255,.09); }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: #52aaa3; }
.target-card p { margin: 9px 0 0; color: #78949b; font-size: .67rem; }
.target-card p strong { color: #cbdadd; font-weight: 600; }
.version-trigger {
  width: calc(100% - 8px);
  min-height: 34px;
  margin: 0 4px 8px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  color: #78949b;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.63rem;
}
.version-trigger:hover {
  color: #c8dbde;
  background: rgba(255, 255, 255, 0.07);
}
.version-trigger strong {
  color: #72c5bb;
  font-size: 0.62rem;
}
.app-last-updated {
  margin: -1px 8px 8px;
  color: #78949b;
  font-size: 0.56rem;
  line-height: 1.45;
}
.app-last-updated span,
.app-last-updated time {
  display: block;
}
.app-last-updated time {
  color: #a7bec3;
}

.main-area { min-width: 0; margin-left: 244px; }
.topbar {
  height: 76px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between;
  gap: 24px; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94);
}
.beta-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255, 165, 0, 0.12);
  color: #b45400;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.global-search {
  width: min(450px, 45vw); height: 40px; padding: 0 12px; display: flex; align-items: center;
  gap: 10px; border: 1px solid #dde5e4; border-radius: 9px; color: #8b999e; background: #f8faf9;
}
.global-search:focus-within { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(21,148,154,.1); }
.global-search svg { width: 18px; height: 18px; }
.global-search input { min-width: 0; flex: 1; border: 0; outline: 0; color: var(--ink); background: transparent; }
.global-search input::placeholder { color: #95a2a7; }
kbd {
  padding: 3px 7px; border: 1px solid #dfe5e5; border-radius: 5px; color: #89979c;
  background: white; box-shadow: 0 1px 1px rgba(0,0,0,.03); font-family: inherit; font-size: .67rem;
}
.topbar-actions { display: flex; align-items: center; gap: 17px; }
.icon-button {
  width: 40px; height: 40px; padding: 0; display: inline-grid; place-items: center;
  border: 0; border-radius: 9px; cursor: pointer; background: transparent;
}
.icon-button:hover { background: #f0f4f3; }
.icon-button svg { width: 21px; height: 21px; }
.notification-button { position: relative; color: #536970; }
.notification-button span {
  position: absolute; top: 8px; right: 8px; width: 7px; height: 7px;
  border: 2px solid white; border-radius: 50%; background: var(--coral);
}
.profile-button { padding: 0; display: flex; align-items: center; gap: 10px; border: 0; cursor: pointer; text-align: left; background: transparent; }
.avatar {
  width: 36px; height: 36px; flex: 0 0 auto; display: inline-grid; place-items: center;
  border-radius: 50%; color: white; background: var(--teal-600); font-size: .72rem;
  font-weight: 750; letter-spacing: .02em;
}
.profile-copy strong, .profile-copy small { display: block; }
.profile-copy strong { font-size: .82rem; }
.profile-copy small { margin-top: 3px; color: var(--muted); font-size: .68rem; }
.profile-button > svg { width: 15px; height: 15px; color: #8a989d; }
.menu-button { display: none; }

.content { max-width: 1540px; margin: 0 auto; padding: 30px 32px 50px; }
.welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; color: var(--teal-600); font-size: .67rem; font-weight: 800; letter-spacing: .14em; }
.welcome h1 {
  margin: 0; font-family: Georgia, "Times New Roman", serif; color: var(--navy-900);
  font-size: clamp(1.65rem, 2vw, 2.2rem); font-weight: 600; line-height: 1.15;
}
.welcome h1 span { font-family: sans-serif; font-size: .8em; }
.welcome p:last-child { margin: 8px 0 0; color: var(--muted); font-size: .9rem; }
.primary-button, .secondary-button, .outline-button { min-height: 40px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.primary-button {
  padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--teal-600); color: white; background: var(--teal-600);
  box-shadow: 0 5px 12px rgba(12,125,131,.15);
}
.primary-button:hover { border-color: #096b70; background: #096b70; }
.primary-button svg { width: 17px; height: 17px; }

.attention-grid { margin-top: 26px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 15px; }
.metric-card {
  min-width: 0; min-height: 112px; padding: 17px; display: flex; align-items: center; gap: 13px;
  border: 1px solid var(--line); border-radius: 13px; cursor: pointer; text-align: left;
  background: var(--surface); box-shadow: 0 3px 12px rgba(19,48,59,.03);
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}
.metric-card:hover, .metric-card.selected { transform: translateY(-2px); border-color: #bed7d4; box-shadow: var(--shadow); }
.metric-icon { width: 44px; height: 44px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 12px; }
.metric-icon svg { width: 23px; height: 23px; }
.overdue .metric-icon,
.metric-icon.overdue { color: var(--coral); background: var(--coral-soft); }
.deposit .metric-icon,
.metric-icon.deposit { color: var(--amber); background: var(--amber-soft); }
.payment .metric-icon,
.metric-icon.payment { color: var(--teal-600); background: var(--teal-100); }
.followup .metric-icon,
.metric-icon.followup { color: var(--blue); background: var(--blue-soft); }
.metric-copy { min-width: 0; }
.metric-copy strong, .metric-copy span, .metric-copy small { display: block; }
.metric-copy strong {
  float: left; margin-right: 7px; color: var(--navy-900); font-family: Georgia,serif;
  font-size: 1.7rem; font-weight: 600; line-height: 1;
}
.metric-copy span {
  padding-top: 1px; color: #314851; overflow: hidden; font-size: .82rem;
  font-weight: 700; line-height: 1.15; white-space: nowrap; text-overflow: ellipsis;
}
.metric-copy small { clear: both; padding-top: 5px; color: var(--muted); font-size: .68rem; white-space: nowrap; }
.metric-arrow { width: 16px; height: 16px; margin-left: auto; flex: 0 0 auto; color: #9ba8ac; }

.dashboard-layout {
  margin-top: 18px; display: grid; grid-template-columns: minmax(0,1.9fr) minmax(300px,.75fr); gap: 18px;
}
.secondary-layout {
  margin-top: 18px; display: grid; grid-template-columns: minmax(0,1.35fr) minmax(340px,.65fr); gap: 18px;
}
.panel {
  min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 13px;
  background: var(--surface); box-shadow: 0 4px 20px rgba(19,48,59,.04);
}
.panel-heading { min-height: 42px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading h2 {
  margin: 0; color: var(--navy-900); font-family: Georgia,"Times New Roman",serif;
  font-size: 1.14rem; font-weight: 600;
}
.panel-heading p { margin: 5px 0 0; color: var(--muted); font-size: .72rem; }
.panel-heading a {
  margin-top: 3px; display: inline-flex; align-items: center; gap: 3px;
  color: var(--teal-600); font-size: .74rem; font-weight: 700;
}
.panel-heading a svg { width: 14px; height: 14px; }
.table-scroll { margin: 12px -4px -5px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  padding: 10px; color: #87969b; font-size: .62rem; font-weight: 750;
  letter-spacing: .055em; text-align: left; text-transform: uppercase;
}
td { padding: 14px 10px; border-top: 1px solid #edf1f0; color: #30464e; font-size: .76rem; vertical-align: middle; }
tbody tr { transition: background 150ms ease, opacity 150ms ease; }
tbody tr:hover { background: #fbfcfc; }
.customer-cell, .cruise-cell { min-width: 140px; }
.customer-cell { display: flex; align-items: center; gap: 10px; }
.customer-cell .avatar { width: 34px; height: 34px; font-size: .64rem; }
.avatar.coral { color: #a34539; background: #f8ddd7; }
.avatar.blue { color: #34648e; background: #dfeaf5; }
.avatar.purple { color: #67578a; background: #eae4f3; }
.avatar.gold { color: #9a6f23; background: #f8e9ca; }
.customer-cell strong, .customer-cell small, .cruise-cell strong, .cruise-cell small, .days + small { display: block; }
.customer-cell strong, .cruise-cell strong {
  color: #21363e; font-size: .75rem; font-weight: 700; white-space: nowrap;
}
.customer-cell small, .cruise-cell small, .days + small {
  margin-top: 4px; color: #839196; font-size: .64rem; white-space: nowrap;
}
.cruise-cell { max-width: 180px; }
.cruise-cell strong, .cruise-cell small { overflow: hidden; text-overflow: ellipsis; }
.days { display: block; color: #344b54; font-size: .74rem; }
.urgent-text { color: var(--coral); }
.status {
  display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px;
  border-radius: 99px; font-size: .62rem; font-weight: 750; white-space: nowrap;
}
.status::before { width: 5px; height: 5px; border-radius: 50%; background: currentColor; content: ""; }
.status.warning { color: #a56b14; background: var(--amber-soft); }
.status.success { color: var(--green); background: var(--green-soft); }
.status.info { color: var(--blue); background: var(--blue-soft); }
.status.danger { color: #b75445; background: var(--coral-soft); }
.more-button {
  width: 30px; height: 30px; border: 0; border-radius: 7px; color: #77898f;
  cursor: pointer; letter-spacing: .08em; background: transparent;
}
.more-button:hover { background: #eef3f2; }
.empty-search { margin: 30px 0 12px; color: var(--muted); font-size: .82rem; text-align: center; }

.small-add-button {
  width: 32px; height: 32px; padding: 0; display: grid; place-items: center;
  border: 1px solid #d5e1df; border-radius: 8px; color: var(--teal-600); cursor: pointer; background: #f8fbfa;
}
.small-add-button:hover { background: var(--teal-100); }
.small-add-button svg { width: 16px; height: 16px; }
.followup-list { margin-top: 9px; }
.followup-item {
  position: relative; padding: 12px 4px 12px 18px; display: grid;
  grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 9px; border-bottom: 1px solid #edf1f0;
}
.followup-item::before {
  position: absolute; top: 16px; left: 2px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--teal-500); content: "";
}
.followup-item.overdue::before { background: var(--coral); }
.followup-item.completed { opacity: .48; }
.followup-item.completed strong { text-decoration: line-through; }
.followup-item strong, .followup-item small, .followup-item time { display: block; }
.followup-item strong { color: #263c44; font-size: .75rem; }
.followup-item small { margin-top: 4px; color: var(--muted); font-size: .65rem; line-height: 1.4; }
.followup-item time { color: #71838a; font-size: .63rem; font-weight: 700; }
.followup-item.overdue time { color: var(--coral); }
.complete-button {
  width: 25px; height: 25px; margin-top: 6px; padding: 0; display: none; place-items: center;
  border: 1px solid #cddbd9; border-radius: 50%; color: var(--green); cursor: pointer; background: white;
}
.followup-item:hover .complete-button, .complete-button:focus { display: grid; }
.complete-button svg { width: 13px; height: 13px; }
.text-button {
  margin: 13px auto -5px; display: block; border: 0; color: var(--teal-600);
  cursor: pointer; background: transparent; font-size: .7rem; font-weight: 750;
}

.panel-count {
  padding: 5px 8px; border-radius: 7px; color: #a55748;
  background: var(--coral-soft); font-size: .63rem; font-weight: 750; white-space: nowrap;
}
.requirement-list { margin-top: 13px; }
.requirement-row {
  min-height: 67px; padding: 10px 3px; display: flex; align-items: center;
  justify-content: space-between; gap: 15px; border-top: 1px solid #edf1f0;
}
.requirement-main { min-width: 0; display: flex; align-items: center; gap: 11px; }
.requirement-icon {
  width: 35px; height: 35px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 9px;
}
.requirement-icon svg { width: 18px; height: 18px; }
.requirement-icon.passport { color: var(--coral); background: var(--coral-soft); }
.requirement-icon.insurance { color: var(--amber); background: var(--amber-soft); }
.requirement-icon.assistance { color: var(--purple); background: var(--purple-soft); }
.requirement-main strong, .requirement-main small { display: block; }
.requirement-main strong { color: #283e46; font-size: .75rem; }
.requirement-main small { margin-top: 4px; color: var(--muted); font-size: .65rem; }
.outline-button {
  min-height: 31px; padding: 0 10px; flex: 0 0 auto; border: 1px solid #cddbd9;
  color: var(--teal-600); background: white; font-size: .63rem;
}
.outline-button:hover { border-color: var(--teal-500); background: #f4faf9; }
.outline-button:disabled { cursor: default; opacity: .65; }

.period-button {
  padding: 5px 8px; display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line);
  border-radius: 7px; color: #63767d; cursor: pointer; background: white; font-size: .63rem;
}
.period-button svg { width: 12px; height: 12px; }
.pulse-content { margin-top: 16px; display: grid; grid-template-columns: 122px minmax(0,1fr); align-items: center; gap: 20px; }
.donut {
  width: 116px; height: 116px; display: grid; place-items: center; border-radius: 50%;
  background: conic-gradient(var(--teal-600) 0 62.5%, #e0a747 62.5% 87.5%, #dce6e5 87.5% 100%);
}
.donut::before { grid-area: 1/1; width: 78px; height: 78px; border-radius: 50%; background: white; content: ""; }
.donut div { z-index: 1; grid-area: 1/1; text-align: center; }
.donut strong, .donut span { display: block; }
.donut strong { font-family: Georgia,serif; color: var(--navy-900); font-size: 1.45rem; line-height: 1; }
.donut span { margin-top: 4px; color: var(--muted); font-size: .58rem; }
.legend { display: grid; gap: 11px; }
.legend > div {
  display: grid; grid-template-columns: 8px minmax(0,1fr) auto; align-items: center;
  gap: 8px; color: #63767d; font-size: .65rem;
}
.legend strong { color: #2b4149; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.confirmed { background: var(--teal-600); }
.dot.awaiting { background: #e0a747; }
.dot.enquiry { background: #dce6e5; }
.revenue-strip {
  margin-top: 17px; padding: 10px 12px; display: flex; align-items: center;
  gap: 10px; border-radius: 9px; background: #f5f8f7;
}
.revenue-strip > span { width: 31px; height: 31px; display: grid; place-items: center; border-radius: 8px; color: var(--teal-600); background: var(--teal-100); }
.revenue-strip svg { width: 17px; height: 17px; }
.revenue-strip div { min-width: 0; flex: 1; }
.revenue-strip small, .revenue-strip strong { display: block; }
.revenue-strip small { color: var(--muted); font-size: .6rem; }
.revenue-strip strong { margin-top: 2px; color: var(--navy-900); font-size: .85rem; }
.revenue-strip b { color: var(--green); font-size: .65rem; }

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 50; max-width: min(360px,calc(100vw - 48px));
  padding: 12px 16px; border-radius: 9px; color: white; background: var(--navy-900);
  box-shadow: 0 12px 35px rgba(7,26,40,.22); font-size: .78rem; opacity: 0;
  pointer-events: none; transform: translateY(10px); transition: opacity 180ms ease, transform 180ms ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.modal {
  width: min(520px,calc(100vw - 32px)); padding: 0; border: 0; border-radius: 15px;
  color: var(--ink); background: white; box-shadow: 0 28px 80px rgba(7,26,40,.28);
}
.modal::backdrop { background: rgba(7,26,40,.58); backdrop-filter: blur(3px); }
.modal form { padding: 25px; }
.modal-heading { margin-bottom: 22px; display: flex; justify-content: space-between; gap: 20px; }
.modal h2 { margin: 0; font-family: Georgia,serif; color: var(--navy-900); font-size: 1.5rem; }
.close-button { margin-top: -4px; }
.modal label {
  margin-top: 14px; display: grid; gap: 7px; color: #354b53; font-size: .72rem; font-weight: 700;
}
.modal input {
  width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d7e0df;
  border-radius: 8px; outline: 0; color: var(--ink); background: #fbfcfc;
}
.modal input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(21,148,154,.1); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.modal-actions { margin-top: 25px; display: flex; justify-content: flex-end; gap: 9px; }
.secondary-button { padding: 0 16px; border: 1px solid #d6dfde; background: white; }
.secondary-button:hover { background: #f5f8f7; }

.version-dialog {
  width: min(480px, calc(100vw - 32px));
}

.version-dialog-body {
  padding: 25px;
}

.version-dialog .modal-heading {
  margin-bottom: 18px;
}

.release-state {
  padding: 11px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 9px;
  color: #895c16;
  background: var(--amber-soft);
  font-size: 0.68rem;
}

.release-state strong {
  font-size: 0.66rem;
}

.version-list {
  margin: 17px 0 0;
  display: grid;
}

.version-row {
  min-height: 52px;
  padding: 10px 2px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.version-row dt {
  color: var(--muted);
  font-size: 0.65rem;
}

.version-row dd {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 750;
}

.commit-code {
  padding: 4px 7px;
  border-radius: 6px;
  color: var(--teal-600);
  background: var(--teal-100);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  letter-spacing: 0.03em;
}

.version-note {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.5;
}

.version-dialog .modal-actions {
  margin-top: 19px;
}

.customer-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: min(90vh, 880px);
}

.customer-modal form {
  max-height: min(90vh, 880px);
  overflow-y: auto;
}

.modal-section {
  margin: 0;
  padding: 15px 0 2px;
  display: grid;
  gap: 12px;
  border: 0;
  border-top: 1px solid var(--line);
}

.modal-section + .modal-section {
  margin-top: 13px;
}

.modal-section legend {
  padding: 0 8px 0 0;
  color: var(--teal-600);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal select,
.modal textarea {
  width: 100%;
  padding: 0 12px;
  border: 1px solid #d7e0df;
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #fbfcfc;
  font: inherit;
}

.modal select {
  height: 42px;
}

.modal textarea {
  min-height: 74px;
  padding-top: 10px;
  resize: vertical;
}

.modal select:focus,
.modal textarea:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(21, 148, 154, 0.1);
}

.checkbox-row {
  min-height: 48px;
  padding: 8px 10px;
  display: flex !important;
  grid-template-columns: none !important;
  align-items: flex-start;
  gap: 9px !important;
  border-radius: 8px;
  background: #f5f8f7;
  cursor: pointer;
}

.checkbox-row input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--teal-600);
}

.checkbox-row span {
  min-width: 0;
}

.checkbox-row strong,
.checkbox-row small {
  display: block;
}

.checkbox-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.61rem;
  font-weight: 400;
}

.form-message {
  min-height: 19px;
  margin: 14px 0 0;
  color: var(--coral);
  font-size: 0.68rem;
  font-weight: 650;
}

.form-message.success {
  color: var(--green);
}

.booking-modal {
  width: min(860px, calc(100vw - 32px));
  max-height: min(94vh, 980px);
}

.booking-modal form {
  max-height: min(94vh, 980px);
  padding-bottom: 0;
  overflow-y: auto;
}

.booking-modal-heading {
  margin-bottom: 15px;
}

.booking-modal-heading > div {
  min-width: 0;
}

.booking-modal-heading p:last-child {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.69rem;
  line-height: 1.5;
}

.choice-tabs {
  width: fit-content;
  padding: 4px;
  display: flex;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f4f7f6;
}

.choice-tabs label {
  margin: 0;
  display: block;
  cursor: pointer;
}

.choice-tabs input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.choice-tabs span {
  min-height: 36px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-radius: 7px;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 750;
}

.choice-tabs input:checked + span {
  color: var(--teal-600);
  background: white;
  box-shadow: 0 2px 8px rgba(7, 26, 40, 0.09);
}

.choice-tabs input:focus-visible + span {
  outline: 2px solid var(--teal-500);
  outline-offset: 1px;
}

.conditional-fields {
  display: grid;
  gap: 0;
}

.conditional-fields[hidden] {
  display: none;
}

.field-help {
  color: var(--muted);
  font-size: 0.59rem;
  font-weight: 450;
  line-height: 1.45;
}

.booking-travel-type {
  margin-bottom: 11px;
}

.booking-modal .other-value {
  margin-top: 7px;
}

.booking-modal .other-value[hidden] {
  display: none;
}

.booking-sailing-picker {
  padding: 11px 12px;
  border: 1px solid #d9e7e4;
  border-radius: 9px;
  background: #f8fbfa;
}

.booking-sailing-picker .field-help {
  margin-top: 6px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.booking-sailing-picker .field-help a {
  flex: 0 0 auto;
  color: var(--teal-600);
  font-weight: 750;
}

.booking-sailing-picker .field-help a[hidden] {
  display: none;
}

.fly-cruise-fields {
  gap: 9px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid #cde3df;
  border-radius: 9px;
  background: #f8fbfa;
}

.booking-date-row {
  grid-template-columns: 1.35fr repeat(3, minmax(0, 1fr));
}

.booking-date-help {
  display: block;
  margin: -5px 0 11px;
}

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

.modal input[readonly] {
  color: var(--muted);
  background: #eef3f2;
}

.value-explainer {
  padding: 11px 13px;
  display: grid;
  gap: 3px;
  border-left: 3px solid var(--teal-500);
  border-radius: 7px;
  color: var(--navy-900);
  background: var(--teal-100);
}

.value-explainer strong {
  font-size: 0.69rem;
}

.value-explainer span {
  color: #4d696e;
  font-size: 0.61rem;
  line-height: 1.45;
}

.booking-balance {
  min-height: 46px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: 8px;
  background: #f4f7f6;
}

.booking-balance span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.booking-balance strong {
  color: var(--navy-900);
  font-size: 0.9rem;
}

.booking-modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin: 8px -25px 0;
  padding: 15px 25px 20px;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 -8px 18px rgba(7, 26, 40, 0.04);
  backdrop-filter: blur(8px);
}

/* Shared secondary-page layouts */
.page-content {
  display: grid;
  gap: 18px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.page-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  color: var(--navy-900);
  font-size: clamp(1.65rem, 2vw, 2.2rem);
  font-weight: 600;
  line-height: 1.15;
}

.page-header p:last-child {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

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

.summary-card {
  min-width: 0;
  padding: 17px;
  display: flex;
  align-items: center;
  gap: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 3px 12px rgba(19, 48, 59, 0.03);
}

.summary-card .metric-icon {
  width: 40px;
  height: 40px;
}

.summary-card-copy {
  min-width: 0;
}

.summary-card-copy span,
.summary-card-copy strong,
.summary-card-copy small {
  display: block;
}

.summary-card-copy span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.summary-card-copy strong {
  margin-top: 3px;
  color: var(--navy-900);
  font-family: Georgia, serif;
  font-size: 1.32rem;
  font-weight: 600;
}

.summary-card-copy small {
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.62rem;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.page-grid.wide-aside {
  grid-template-columns: minmax(0, 1.7fr) minmax(330px, 0.7fr);
}

.toolbar {
  margin-top: 15px;
  padding: 11px 0 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid #edf1f0;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
}

.filter-tab {
  min-height: 31px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #667980;
  cursor: pointer;
  background: transparent;
  font-size: 0.67rem;
  font-weight: 700;
  white-space: nowrap;
}

.filter-tab:hover,
.filter-tab.active {
  color: var(--teal-600);
  background: var(--teal-100);
}

.table-search {
  width: min(240px, 35vw);
  height: 34px;
  padding: 0 10px;
  border: 1px solid #dce4e3;
  border-radius: 7px;
  outline: 0;
  color: var(--ink);
  background: #fafcfc;
  font-size: 0.68rem;
}

.table-search:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(21, 148, 154, 0.1);
}

.toolbar-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.source-filter {
  height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid #dce4e3;
  border-radius: 7px;
  outline: 0;
  color: #596d74;
  background: #fafcfc;
  font: inherit;
  font-size: 0.66rem;
}

.source-filter:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(21, 148, 154, 0.1);
}

.filter-more-button,
.clear-filters-button {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #dce4e3;
  border-radius: 7px;
  color: #52676e;
  background: #fff;
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
}

.filter-more-button:hover,
.filter-more-button[aria-expanded="true"],
.clear-filters-button:hover {
  border-color: #a9d9d8;
  color: var(--teal-600);
  background: var(--teal-100);
}

.filter-more-button span {
  display: inline-grid;
  width: 18px;
  height: 18px;
  margin-left: 4px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal-500);
  font-size: 0.58rem;
}

.advanced-filters {
  margin-top: 10px;
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  border: 1px solid #e2e9e8;
  border-radius: 9px;
  background: #f8fbfb;
}

.advanced-filters[hidden] {
  display: none;
}

.advanced-filters label {
  display: grid;
  gap: 5px;
  color: #52676e;
  font-size: 0.62rem;
  font-weight: 700;
}

.advanced-filters input,
.advanced-filters select {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #dce4e3;
  border-radius: 7px;
  outline: 0;
  color: #445b63;
  background: #fff;
  font: inherit;
  font-weight: 500;
}

.advanced-filters input:focus,
.advanced-filters select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(21, 148, 154, 0.1);
}

.filter-summary {
  min-height: 30px;
  padding: 8px 2px 2px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.62rem;
}

.filter-summary strong {
  color: var(--ink);
}

.data-table td {
  height: 62px;
}

.data-table td > strong,
.data-table td > small {
  display: block;
}

.data-table td > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.data-table th:first-child,
.data-table td:first-child {
  padding-left: 4px;
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.table-action {
  min-height: 29px;
  padding: 0 9px;
  border: 1px solid #d6e1df;
  border-radius: 7px;
  color: var(--teal-600);
  cursor: pointer;
  background: white;
  font-size: 0.61rem;
  font-weight: 750;
  white-space: nowrap;
}

.table-action:hover {
  border-color: var(--teal-500);
  background: #f5faf9;
}

.money {
  color: var(--navy-900);
  font-weight: 750;
  white-space: nowrap;
}

.muted-cell {
  color: var(--muted);
  font-size: 0.68rem;
}

.tag {
  display: inline-flex;
  padding: 4px 7px;
  border-radius: 6px;
  color: #5e737a;
  background: #eef3f2;
  font-size: 0.6rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag.teal { color: var(--teal-600); background: var(--teal-100); }
.tag.coral { color: #b75445; background: var(--coral-soft); }
.tag.amber { color: #9b691a; background: var(--amber-soft); }
.tag.blue { color: var(--blue); background: var(--blue-soft); }

.side-list {
  margin-top: 10px;
  display: grid;
}

.side-list-item {
  padding: 13px 2px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #edf1f0;
}

.side-list-item:first-child {
  border-top: 0;
}

.side-list-item strong,
.side-list-item small {
  display: block;
}

.side-list-item strong {
  color: #2a4048;
  font-size: 0.72rem;
}

.side-list-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.4;
}

.side-list-item time {
  color: var(--teal-600);
  font-size: 0.61rem;
  font-weight: 750;
  white-space: nowrap;
}

.progress-list {
  margin-top: 14px;
  display: grid;
  gap: 16px;
}

.progress-row {
  display: grid;
  gap: 6px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #52676e;
  font-size: 0.67rem;
}

.progress-label strong {
  color: #2b4149;
}

.progress-row .progress-track {
  height: 7px;
  margin: 0;
  background: #e9efee;
}

.progress-row .progress-track span {
  background: var(--teal-500);
}

.empty-table {
  display: none;
  padding: 30px 10px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

/* Calendar */
.calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
}

.calendar-toolbar {
  margin: 15px 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.calendar-toolbar h3 {
  margin: 0;
  color: var(--navy-900);
  font-family: Georgia, serif;
  font-size: 1.05rem;
}

.calendar-nav {
  display: flex;
  gap: 5px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.calendar-day-label {
  min-height: 34px;
  padding: 10px 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #7c8d92;
  font-size: 0.59rem;
  font-weight: 750;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 86px;
  padding: 7px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: #435960;
  font-size: 0.64rem;
}

.calendar-day.muted {
  color: #b1babc;
  background: #fafbfb;
}

.calendar-day.today > span {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--teal-600);
}

.calendar-event {
  margin-top: 5px;
  padding: 4px 5px;
  overflow: hidden;
  border-radius: 5px;
  color: var(--teal-600);
  background: var(--teal-100);
  font-size: 0.56rem;
  font-weight: 700;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.calendar-event.payment { color: #9b691a; background: var(--amber-soft); }
.calendar-event.sailing { color: var(--blue); background: var(--blue-soft); }
.calendar-event.overdue { color: #b75445; background: var(--coral-soft); }

/* Reports */
.chart-panel {
  min-height: 330px;
}

.bar-chart {
  height: 210px;
  margin-top: 24px;
  padding: 8px 5px 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  gap: 15px;
  border-bottom: 1px solid var(--line);
}

.bar-column {
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
}

.bar-column span {
  width: min(36px, 80%);
  min-height: 4px;
  border-radius: 6px 6px 0 0;
  background: var(--teal-500);
}

.bar-column:nth-child(2n) span {
  background: #55aaa3;
}

.bar-column small {
  color: var(--muted);
  font-size: 0.58rem;
}

.report-highlight {
  margin-top: 14px;
  padding: 14px;
  border-radius: 10px;
  color: #d8ece9;
  background: var(--navy-900);
}

.report-highlight small,
.report-highlight strong {
  display: block;
}

.report-highlight small {
  color: #8fb0b5;
  font-size: 0.63rem;
}

.report-highlight strong {
  margin-top: 5px;
  color: white;
  font-family: Georgia, serif;
  font-size: 1.35rem;
}

/* Settings */
.settings-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 18px;
}

.settings-layout > * {
  min-width: 0;
}

.settings-nav {
  max-width: 100%;
  padding: 10px;
}

.settings-link {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 0;
  border-radius: 8px;
  color: #64777e;
  cursor: pointer;
  text-align: left;
  background: transparent;
  font-size: 0.69rem;
  font-weight: 700;
}

.settings-link:hover,
.settings-link.active {
  color: var(--teal-600);
  background: var(--teal-100);
}

.settings-link svg {
  width: 16px;
  height: 16px;
}

.settings-section + .settings-section {
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.settings-section h3 {
  margin: 0;
  color: var(--navy-900);
  font-family: Georgia, serif;
  font-size: 1rem;
}

.settings-section > p {
  margin: 5px 0 15px;
  color: var(--muted);
  font-size: 0.68rem;
}

.settings-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 13px;
}

.settings-form label {
  display: grid;
  gap: 6px;
  color: #4a5f67;
  font-size: 0.67rem;
  font-weight: 700;
}

.settings-form input,
.settings-form select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid #d7e1e0;
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: #fbfcfc;
  font: inherit;
  font-size: 0.7rem;
}

.settings-form input:focus,
.settings-form select:focus {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(21, 148, 154, 0.1);
}

.toggle-row {
  min-height: 55px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #edf1f0;
}

.toggle-row strong,
.toggle-row small {
  display: block;
}

.toggle-row strong {
  color: #2d434b;
  font-size: 0.71rem;
}

.toggle-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.62rem;
}

.switch {
  position: relative;
  width: 39px;
  height: 22px;
  flex: 0 0 auto;
}

.switch input {
  width: 1px;
  height: 1px;
  opacity: 0;
}

.switch span {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  cursor: pointer;
  background: #cbd6d5;
  transition: background 150ms ease;
}

.switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
  content: "";
  transition: transform 150ms ease;
}

.switch input:checked + span {
  background: var(--teal-600);
}

.switch input:checked + span::after {
  transform: translateX(17px);
}
