/* YachtCall workspace — shared with the public site's navy, warm paper and gold. */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  --bg: #f5f5f2;
  --panel: #fff;
  --ink: #15212a;
  --muted: #626e75;
  --line: #e3e6e3;
  --navy: #0c1923;
  --accent: #243f49;
  --gold: #b9a078;
  --focus: #896d43;
  --soft: #f2f4f1;
  --success: #28674c;
  --success-bg: #eaf4ed;
  --warning: #805c1e;
  --warning-bg: #faf0da;
  --danger: #a43737;
  --danger-bg: #faecea;
  --shadow: 0 2px 5px #15212a03, 0 12px 36px -28px #15212a30;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); -webkit-font-smoothing: antialiased; line-height: 1.5; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button, select { cursor: pointer; }
a { color: var(--accent); text-underline-offset: 4px; }
img { display: block; max-width: 100%; }
button { min-height: 44px; padding: 10px 17px; border: 1px solid transparent; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 550; font-size: 13px; transition: background .15s, box-shadow .15s; }
button:hover { box-shadow: inset 0 0 0 999px #ffffff12; }
button:active { box-shadow: inset 0 0 0 999px #0000000c; }
button.secondary { border-color: var(--line); background: var(--panel); color: var(--ink); }
button.secondary:hover { background: var(--soft); }
button.danger { color: var(--danger); background: var(--danger-bg); }
button:disabled { cursor: wait; opacity: .55; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
#main:focus { outline: none; }
.skip { position: fixed; left: 18px; top: -100px; z-index: 100; border-radius: 8px; padding: 14px 20px; background: var(--panel); color: var(--ink); }
.skip:focus { top: 12px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(28px, 2.7vw, 38px); line-height: 1.15; letter-spacing: -1.25px; font-weight: 550; margin-bottom: 9px; }
h2 { font-size: 16px; font-weight: 600; letter-spacing: -.25px; line-height: 1.4; margin: 0 0 22px; }
p { line-height: 1.65; }
small { font-size: 12px; }
.muted { color: var(--muted); }
.eyebrow { font-size: 10px; font-weight: 600; letter-spacing: 1.9px; }
.icon { width: 19px; height: 19px; flex: 0 0 19px; vertical-align: middle; }
.shell { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: 100svh; }
.sidebar { position: sticky; top: 0; height: 100svh; display: flex; flex-direction: column; background: var(--navy); color: #eaf0ee; padding: 30px 16px 18px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: #4b575d transparent; }
.sidebar-head { padding: 4px 12px 24px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 34px; object-fit: contain; }
.wordmark { font-size: 22px; font-weight: 550; letter-spacing: -.85px; line-height: 1.2; color: #faf6ef; }
.wordmark small { display: block; font-size: 8px; font-weight: 450; letter-spacing: 1.65px; color: #b9c2c5; margin-top: 7px; }
.menu-toggle { display: none; }
.mfa-qr { width: 208px; height: 208px; margin: 20px 0; padding: 8px; border: 1px solid #e3e6e3; border-radius: 12px; background: #fff; }
.authenticator-link { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 17px; border-radius: 10px; background: var(--accent); color: #fff; font-weight: 550; font-size: 13px; text-decoration: none; }
.authenticator-setup details { margin: 18px 0; }
.authenticator-setup summary { cursor: pointer; font-size: 13px; font-weight: 550; }
.authenticator-setup details p { margin-top: 12px; font-size: 13px; color: var(--muted); }
.authenticator-setup .secret { display: block; margin-top: 12px; overflow-wrap: anywhere; }
nav { display: grid; gap: 3px; }
.nav-label { color: #95a3a9; font-size: 9px; letter-spacing: 1.8px; margin: 16px 14px 8px; }
.sidebar nav button { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 11px 14px; border: 0; border-radius: 9px; text-align: left; font-size: 13px; font-weight: 450; color: #c3ced1; background: transparent !important; box-shadow: none !important; }
.sidebar nav button:hover { color: #fff; background: #ffffff0b !important; }
.sidebar nav button.active { color: #fff; background: #ffffff12 !important; box-shadow: inset 2px 0 var(--gold) !important; }
.sidebar nav button.active .icon { color: #d8bf94; }
.foot { margin-top: auto; padding: 30px 8px 0; }
.account { display: flex; gap: 10px; align-items: center; padding: 17px 4px; border-top: 1px solid #ffffff16; min-width: 0; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; flex: 0 0 34px; border: 1px solid #ffffff1b; border-radius: 50%; background: #ffffff0b; color: #e3cfac; font-size: 11px; }
.account strong { display: block; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.account small { display: block; font-size: 10px; color: #a7b5ba; margin-top: 2px; }
.foot .actions { flex-wrap: nowrap; gap: 6px; margin: 0; }
.foot button.secondary { display: flex; align-items: center; justify-content: center; gap: 7px; flex: 1; min-height: 44px; border-color: #ffffff18; background: transparent; color: #c3ced1; padding: 8px; font-size: 10px; }
.foot button .icon { width: 15px; height: 15px; flex-basis: 15px; }
.content { min-width: 0; }
.topbar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 40px; border-bottom: 1px solid var(--line); background: var(--panel); }
.workspace-context { display: flex; align-items: center; gap: 18px; min-width: 0; }
.context-label { color: var(--muted); font-size: 12px; white-space: nowrap; border-right: 1px solid var(--line); padding-right: 18px; }
.topbar select { border: 0; background: transparent; width: auto; max-width: min(340px,40vw); margin: 0; padding: 9px 30px 9px 3px; font-weight: 550; font-size: 13px; }
.workspace-health { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
.stage { font-size: 10px; letter-spacing: .4px; color: var(--muted); border: 1px solid var(--line); border-radius: 5px; padding: 4px 8px; }
#connection { background: transparent; padding: 0; color: var(--muted); font-size: 11px; border: 0; }
#connection:before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--success); margin-right: 7px; }
#connection.warn:before { background: #b88c38; }
#main { max-width: 1600px; padding: 38px 40px 64px; margin-inline: auto; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.heading p { margin: 0; font-size: 13px; }
.heading > button { flex-shrink: 0; }
.grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; margin-bottom: 28px; }
.metric { position: relative; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 23px 24px 18px; box-shadow: var(--shadow); }
.metric > small:first-child { font-size: 12px; font-weight: 500; color: var(--muted); }
.metric .value { font-size: clamp(30px,3vw,40px); letter-spacing: -1.5px; line-height: 1.25; font-weight: 500; margin-top: 12px; font-variant-numeric: tabular-nums; }
.metric > small:last-child { display: block; color: var(--muted); font-size: 11px; min-height: 17px; margin-top: 5px; }
.card { min-width: 0; padding: 26px; margin-bottom: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.card > p { font-size: 13px; color: var(--muted); max-width: 75ch; }
.card > button { margin-bottom: 16px; }
.card > button:last-child { margin-bottom: 0; }
.card > .table-wrap { margin: 0 -26px -26px; border-radius: 0 0 14px 14px; width: calc(100% + 52px); }
.card > .table-wrap:not(:last-child) { margin-bottom: 20px; }
.table-wrap { overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; width: 100%; }
table { border-collapse: collapse; font-size: 12px; text-align: left; width: 100%; }
th { background: var(--soft); color: var(--muted); font-size: 10px; font-weight: 550; letter-spacing: .6px; white-space: nowrap; padding: 13px 18px; border-block: 1px solid var(--line); }
td { padding: 17px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; max-width: 340px; overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-left: 26px; }
th:last-child, td:last-child { padding-right: 26px; }
td:first-child { font-weight: 550; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--soft); }
td button { min-height: 36px; padding: 7px 11px; font-size: 11px; white-space: nowrap; }
td .actions { flex-wrap: nowrap; margin: 0; gap: 6px; }
.badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 6px; color: var(--success); background: var(--success-bg); font-size: 10px; font-weight: 550; white-space: nowrap; padding: 5px 9px; }
.badge.warn { color: var(--warning); background: var(--warning-bg); }
.badge.bad { color: var(--danger); background: var(--danger-bg); }
.badge.neutral { color: var(--muted); background: var(--soft); }
.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty .icon { display: block; width: 28px; height: 28px; margin: 0 auto 12px; opacity: .65; }
.empty p { color: var(--ink); font-size: 13px; margin-bottom: 4px; }
.empty small { font-size: 11px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.filters { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-bottom: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
label { font-size: 12px; font-weight: 500; color: var(--muted); min-width: 0; }
input, select, textarea { display: block; width: 100%; min-height: 44px; padding: 11px 13px; margin-top: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 9px; color: var(--ink); }
input:hover, select:hover, textarea:hover { border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
input[type=search] { margin: 0 0 24px; max-width: 520px; }
textarea { resize: vertical; min-height: 110px; }
select[multiple] { min-height: 130px; }
.form-grid label:has(textarea), .form-grid label:has(select[multiple]) { grid-column: 1/-1; }
dialog { color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 32px; width: min(680px,calc(100% - 32px)); max-height: calc(100svh - 40px); box-shadow: 0 30px 100px #0004; }
dialog::backdrop { background: #07152099; backdrop-filter: blur(5px); }
dialog h2 { font-size: 23px; font-weight: 550; letter-spacing: -.6px; margin-bottom: 22px; }
dialog p { color: var(--muted); font-size: 13px; }
dialog form > button { margin-top: 14px; }
dialog > button { margin-top: 18px; }
.secret { overflow-wrap: anywhere; white-space: pre-wrap; display: block; background: var(--soft); border: 1px solid var(--line); padding: 15px; border-radius: 9px; font-size: 12px; }
#notice:not(:empty) { position: fixed; z-index: 100; bottom: 22px; right: 24px; max-width: min(480px,calc(100% - 32px)); background: var(--navy); color: #fff; padding: 15px 20px; border: 1px solid #ffffff20; border-radius: 12px; box-shadow: 0 12px 40px #0003; font-size: 13px; }
#notice[role=alert] { background: #652d2d; }
.banner { border: 1px solid var(--line); border-left: 3px solid var(--gold); background: var(--panel); padding: 16px 20px; border-radius: 8px; font-size: 13px; }
.chart { display: grid; gap: 16px; }
.chart-row { display: grid; grid-template-columns: minmax(110px,1fr) 2fr 50px; gap: 16px; align-items: center; font-size: 12px; }
.chart-row > span:first-child { overflow-wrap: anywhere; }
.chart-row > span:last-child { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
meter { width: 100%; height: 9px; border: 0; background: var(--soft); border-radius: 4px; }
meter::-webkit-meter-bar { background: var(--soft); border: 0; border-radius: 4px; height: 7px; }
meter::-webkit-meter-optimum-value { background: var(--gold); border-radius: 4px; }
meter::-moz-meter-bar { background: var(--gold); border-radius: 4px; }
.steps { list-style: none; padding: 0; margin: 0; }
.steps li { display: flex; align-items: center; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.steps li:last-child { border: 0; padding-bottom: 0; }
.step-number { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; background: var(--soft); font-size: 12px; color: var(--muted); }
.steps button { margin-left: auto; }
.auth { min-height: 100svh; display: grid; grid-template-columns: 1fr 1fr; background: var(--panel); }
.auth-aside { position: relative; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; min-height: 100svh; padding: 48px 10%; color: #faf6ef; background: var(--navy); overflow: hidden; }
.auth-aside:before { content: ''; position: absolute; inset: 0; z-index: -2; background: url('/assets/yacht-detail.jpg') center/cover; opacity: .32; }
.auth-aside:after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg,#0c192399,#0c192355 40%,#0c1923e8); }
.auth-story { margin-block: 100px; max-width: 440px; }
.auth-story .eyebrow { color: #dfcfb1; margin-bottom: 28px; }
.auth-story h2 { font-size: clamp(34px,3.6vw,54px); font-weight: 450; letter-spacing: -2px; line-height: 1.12; white-space: pre-line; margin-bottom: 24px; }
.auth-story p { font-size: 14px; max-width: 300px; color: #d1d8d6; }
.auth-aside > small { color: #b9c3c5; font-size: 9px; letter-spacing: 1.8px; }
.auth-main { display: grid; place-items: center; padding: 48px !important; }
.auth-card { width: min(380px,100%); }
.auth-card .eyebrow { color: var(--muted); font-size: 9px; margin-bottom: 18px; }
.auth-card h1 { font-size: 34px; margin-bottom: 24px; }
.auth-card p { color: var(--muted); font-size: 13px; }
.auth-card .form-grid { grid-template-columns: 1fr; gap: 20px; }
.auth-card .actions button { width: 100%; margin-top: 8px; }
.auth-card > button { width: 100%; margin-top: 14px; }
.auth-card > small { display: block; margin-top: 30px; font-size: 10px; color: var(--muted); text-align: center; line-height: 1.8; }
.theme-dark { color-scheme: dark; --bg: #111a20; --panel: #17232b; --ink: #edf0ed; --muted: #b0bdc1; --line: #31414a; --accent: #3b626b; --soft: #1d2c34; --success: #a3d7b8; --success-bg: #213c30; --warning: #eed39e; --warning-bg: #463b25; --danger: #f2b7b2; --danger-bg: #492e30; --focus: #dfc598; --shadow: none; }
@media (prefers-color-scheme:dark) {
  :root:not(.theme-light) { color-scheme: dark; --bg: #111a20; --panel: #17232b; --ink: #edf0ed; --muted: #b0bdc1; --line: #31414a; --accent: #3b626b; --soft: #1d2c34; --success: #a3d7b8; --success-bg: #213c30; --warning: #eed39e; --warning-bg: #463b25; --danger: #f2b7b2; --danger-bg: #492e30; --focus: #dfc598; --shadow: none; }
}
@media (min-width:1800px) { #main { padding-top: 48px; } }
@media (max-width:1200px) {
  .shell { grid-template-columns: 218px minmax(0,1fr); }
  #main { padding: 30px 26px 48px; }
  .topbar { padding-inline: 26px; }
  .grid { gap: 14px; }
  .metric { padding: 20px 18px 16px; }
  .context-label { display: none; }
}
@media (max-width:1050px) { .grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:900px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: 0 22px; overflow: visible; }
  .sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; }
  .brand img { width: 35px; height: 30px; }
  .wordmark { font-size: 20px; }
  .wordmark small { font-size: 7px; margin-top: 5px; }
  .menu-toggle { display: flex; align-items: center; gap: 8px; background: #ffffff0c; border-color: #ffffff25; padding: 9px 12px; font-size: 12px; }
  .sidebar nav, .sidebar .foot { display: none; }
  .sidebar[data-open=true] nav { display: grid; grid-template-columns: 1fr 1fr; padding-block: 8px 18px; }
  .sidebar[data-open=true] .nav-label { grid-column: 1/-1; margin-top: 4px; }
  .sidebar[data-open=true] .foot { display: block; padding: 0 0 20px; }
  .foot .actions { justify-content: flex-start; }
  .foot button.secondary { flex: 0 1 auto; min-width: 120px; font-size: 12px; }
  .topbar { min-height: 72px; padding: 12px 26px; }
  .topbar select { max-width: 48vw; }
  .auth-aside { padding: 38px 10%; }
  .auth-main { padding: 38px !important; }
  .auth-story h2 { font-size: 38px; }
  td button { min-height: 44px; }
}
@media (max-width:640px) {
  #main { padding: 28px 18px 48px; }
  .topbar { padding: 12px 18px; gap: 10px; }
  .workspace-health { gap: 10px; }
  .stage { font-size: 9px; padding: 3px 6px; }
  #connection { font-size: 10px; }
  .topbar select { max-width: 42vw; font-size: 12px; padding-right: 18px; }
  .heading { align-items: flex-start; flex-direction: column; gap: 16px; margin-bottom: 24px; }
  .heading p { font-size: 12px; }
  h1 { font-size: 30px; }
  .grid { gap: 12px; margin-bottom: 20px; }
  .metric { padding: 18px 16px 14px; border-radius: 12px; }
  .metric > small:first-child { font-size: 11px; }
  .metric .value { font-size: 32px; }
  .card { padding: 21px; margin-bottom: 18px; border-radius: 12px; }
  .card > .table-wrap { margin: 0 -21px -21px; width: calc(100% + 42px); border-radius: 0 0 12px 12px; }
  th:first-child,td:first-child { padding-left: 21px; }
  th:last-child,td:last-child { padding-right: 21px; }
  td { min-width: 110px; }
  .filters { grid-template-columns: 1fr 1fr; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  input,select,textarea { font-size: 16px; } /* Avoid iOS focus zoom. */
  dialog { padding: 24px; border-radius: 16px; }
  dialog h2 { font-size: 22px; }
  .chart-row { grid-template-columns: minmax(80px,1fr) 1.3fr 35px; gap: 10px; }
  .steps li { gap: 10px; flex-wrap: wrap; }
  .steps li > span:nth-child(2) { flex: 1; min-width: 140px; }
  .auth { display: block; }
  .auth-aside { min-height: auto; padding: 28px; }
  .auth-story { margin: 40px 0 10px; }
  .auth-story .eyebrow, .auth-story p, .auth-aside > small { display: none; }
  .auth-story h2 { font-size: 32px; letter-spacing: -1px; margin: 0; }
  .auth-main { padding: 36px 28px 50px !important; }
  .auth-card h1 { font-size: 30px; }
}
@media (max-width:360px) { .workspace-health .stage { display: none; } .sidebar { padding-inline: 18px; } .metric { padding-inline: 12px; } }
@media (prefers-reduced-motion:reduce) { *, *:before, *:after { transition: none !important; scroll-behavior: auto !important; } }
