:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #0b2639;
  background: #eef4f7;
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
:focus-visible { outline: 3px solid #0e8291; outline-offset: 3px; }
.skip-link { position: absolute; left: 1rem; top: -5rem; z-index: 20; background: #fff; padding: .7rem 1rem; }
.skip-link:focus { top: 1rem; }

.app-shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { display: flex; flex-direction: column; gap: 2.25rem; background: #071b2c; color: #e7f4fa; padding: 1.65rem 1.05rem 1.25rem; }
.brand { display: flex; align-items: center; gap: .8rem; padding: 0 .45rem; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 2.45rem; height: 2.45rem; flex: none; border: 1px solid #78dce0; border-radius: .55rem; color: #78dce0; font-size: .9rem; font-weight: 850; letter-spacing: -.12em; }
.brand-mark span { transform: translateX(-.08rem); }
.brand strong { display: block; font-size: 1rem; line-height: 1.15; letter-spacing: -.03em; }
.brand small { display: block; color: #9bb8c9; font-size: .7rem; margin-top: .1rem; }
.side-label, .panel-kicker, .eyebrow { color: #488494; font-size: .7rem; font-weight: 750; letter-spacing: .14em; }
.side-label { color: #7ba2b3; padding: 0 .75rem; margin-bottom: -1.75rem; }
.primary-nav { display: grid; gap: .35rem; }
.primary-nav a { display: flex; align-items: center; gap: .8rem; min-height: 3rem; padding: .6rem .75rem; border-radius: .65rem; color: #a9c1cd; font-weight: 600; text-decoration: none; }
.primary-nav a:hover { color: #fff; background: #12364e; }
.primary-nav a[aria-current="page"] { color: #fff; background: #14506a; box-shadow: inset 3px 0 #72dbdf; }
.nav-number { color: #79acbc; font-size: .72rem; font-weight: 750; letter-spacing: .06em; }
.side-note { margin-top: auto; padding: 1.1rem; border: 1px solid #2a5368; border-radius: .85rem; background: #0d2b40; }
.side-note strong { display: inline-block; margin-left: .35rem; font-size: .82rem; }
.side-note p { margin: .5rem 0 0; color: #acc4d0; font-size: .8rem; }
.status-dot { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #72dbdf; }

.workspace { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 4.2rem; padding: .85rem clamp(1.25rem, 3.5vw, 3.25rem); border-bottom: 1px solid #dbe7ed; background: #f7fafb; color: #537184; font-size: .73rem; font-weight: 750; letter-spacing: .12em; }
.topbar-tag { border: 1px solid #b6d5dd; border-radius: 999px; padding: .33rem .7rem; color: #2e6575; }
.topbar-actions { display: flex; align-items: center; gap: .65rem; }
#signout { border: 0; background: transparent; color: #2e6575; font-size: .76rem; font-weight: 700; }
#signout[hidden] { display: none; }
main { max-width: 1440px; margin: 0 auto; padding: clamp(1.5rem, 3.5vw, 3.25rem); }
.notice { margin-bottom: 1.2rem; padding: .8rem 1rem; border: 1px solid #a7d8d9; border-radius: .6rem; background: #e1f7f4; color: #185367; font-weight: 650; }
.notice.is-error { border-color: #e4ada8; background: #fff0ed; color: #8d342d; }
.notice[hidden] { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 2rem; padding-bottom: 1.7rem; }
.page-head h1 { margin: .45rem 0 .6rem; font-size: clamp(2.15rem, 4vw, 3.3rem); line-height: 1.1; font-weight: 760; letter-spacing: -.055em; }
.page-head p { max-width: 46rem; margin: 0; color: #526a7a; font-size: 1rem; }
.flow-rail { display: flex; align-items: center; gap: .38rem; flex: none; color: #648492; font-size: .64rem; font-weight: 750; letter-spacing: .06em; white-space: nowrap; }
.flow-rail i { width: .65rem; height: 1px; background: #9fbac5; }
.metric-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 0 0 1.3rem; }
.metric-row > div { display: flex; align-items: baseline; gap: .8rem; min-height: 5.4rem; padding: 1rem 1.3rem; background: #dcecf0; border: 1px solid #c9e0e7; border-radius: .8rem; }
.metric-row strong { color: #0c5671; font-size: 2rem; line-height: 1; font-weight: 780; letter-spacing: -.05em; }
.metric-row span { color: #426474; font-size: .86rem; font-weight: 650; }
.content-grid { display: grid; grid-template-columns: minmax(280px, .86fr) minmax(360px, 1.14fr); gap: 1.2rem; align-items: stretch; }
.crm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lower-grid { margin-top: 1.2rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.panel { min-width: 0; border: 1px solid #d3e1e8; border-radius: .9rem; background: #fff; box-shadow: 0 14px 40px rgba(17, 54, 72, .035); }
.form-panel { padding: clamp(1.25rem, 2vw, 2rem); }
.panel h2 { margin: .3rem 0 .55rem; font-size: 1.45rem; line-height: 1.2; letter-spacing: -.035em; }
.panel-intro { margin: 0 0 1.35rem; color: #607786; font-size: .91rem; }
form { display: grid; gap: 1rem; }
label { display: grid; gap: .43rem; color: #244558; font-size: .82rem; font-weight: 720; }
input, select, textarea { width: 100%; min-height: 2.85rem; border: 1px solid #b9cdd7; border-radius: .45rem; padding: .62rem .72rem; background: #fff; color: #0b2639; font-size: .92rem; font-weight: 450; }
textarea { min-height: 6rem; resize: vertical; }
input::placeholder { color: #8398a3; }
input:focus, select:focus, textarea:focus { border-color: #167a90; }
input:disabled, select:disabled { background: #f1f5f6; color: #71818b; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: .5rem; min-height: 2.9rem; width: fit-content; border: 1px solid transparent; border-radius: .48rem; padding: .64rem 1.1rem; font-size: .88rem; font-weight: 730; text-decoration: none; }
.button.primary { background: #0a4d68; color: #fff; }
.button.primary:hover { background: #073d54; }
.button.secondary { background: #e7f3f5; border-color: #b7dce0; color: #12536a; }
.button.secondary:hover { background: #d8edf0; }
.button:disabled { opacity: .48; cursor: not-allowed; }
.form-hint { margin: .85rem 0 0; color: #667d8a; font-size: .8rem; }
.records-panel { overflow: hidden; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem 1.6rem 1.2rem; border-bottom: 1px solid #e1ebef; }
.panel-heading h2 { margin-bottom: 0; }
.count-pill { border-radius: 999px; padding: .34rem .65rem; background: #eaf4f6; color: #417080; font-size: .73rem; font-weight: 720; white-space: nowrap; }
.record-list { display: grid; }
.record-row, .customer-row, .lead-row { display: flex; align-items: center; gap: .9rem; padding: 1rem 1.6rem; border-bottom: 1px solid #e8eff2; }
.record-list > :last-child { border-bottom: 0; }
.record-icon { display: grid; place-items: center; width: 4rem; height: 3.2rem; flex: none; border-radius: .4rem; background: #d9ecef; color: #3c8392; overflow: hidden; }
.record-icon .boat-art { width: 4rem; height: auto; }
.record-main { flex: 1; min-width: 0; }
.record-row h3, .customer-row h3, .lead-row h3 { margin: 0; font-size: .95rem; letter-spacing: -.015em; }
.record-row p, .customer-row p, .lead-row p { margin: .18rem 0 0; color: #657b89; font-size: .8rem; overflow-wrap: anywhere; }
.record-status { color: #256c74; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.empty-state { display: grid; justify-items: center; align-content: center; min-height: 17rem; padding: 2rem; text-align: center; }
.empty-state.compact { min-height: 11rem; }
.empty-symbol { display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: .7rem; background: #e6f2f4; color: #478699; font-size: 1.6rem; }
.empty-state h3 { margin: .8rem 0 .25rem; font-size: 1rem; }
.empty-state p { max-width: 22rem; margin: 0; color: #6b8190; font-size: .85rem; }
.customer-row { align-items: start; justify-content: space-between; }
.tag-list { display: flex; flex-wrap: wrap; justify-content: end; gap: .35rem; }
.vessel-tag { border-radius: 999px; padding: .27rem .55rem; background: #e7f2f4; color: #245f70; font-size: .73rem; font-weight: 650; }
.muted { color: #8295a0; font-size: .78rem; }
.lead-icon { display: grid; place-items: center; width: 2rem; height: 2rem; flex: none; border-radius: 50%; background: #e5f5f2; color: #137b76; }
.lead-row span:last-child { display: block; margin-top: .3rem; color: #3b6978; font-size: .76rem; font-weight: 650; }
.holding-panel { margin-top: 1.2rem; }
.holding-row { align-items: start; }
.holding-row > div { min-width: 0; flex: 1; }
.review-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-top: .9rem; }
.review-actions form { display: flex; align-items: end; gap: .6rem; }
.review-actions label { flex: 1; }
.review-actions .button { white-space: nowrap; }
.login-panel { max-width: 32rem; margin: 3rem auto; }
.status-badge { flex: none; border-radius: 999px; padding: .25rem .55rem; background: #e8f3f5; color: #286475; font-size: .72rem; font-weight: 750; text-transform: capitalize; }
.status-badge.review { background: #fff1d6; color: #8b5b0a; }
.status-badge.spam { background: #fbe9e7; color: #97433c; }

.website-frame { overflow: hidden; border: 1px solid #193b50; border-radius: .85rem; background: #082439; box-shadow: 0 24px 60px rgba(10, 40, 60, .12); }
.website-bar { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 1.1rem; color: #9ac0cb; font-size: .65rem; font-weight: 750; letter-spacing: .1em; }
.window-dots { color: #75bac5; letter-spacing: .2em; }
.website-content { min-height: 28rem; padding: 0 clamp(1.2rem, 4vw, 3.5rem) 3rem; background: #f9fcfc; }
.broker-header { display: flex; justify-content: space-between; align-items: center; min-height: 5.5rem; border-bottom: 1px solid #dce8e9; color: #3f6471; font-size: .7rem; font-weight: 800; letter-spacing: .13em; }
.broker-brand { color: #0b384e; font-size: 1.1rem; letter-spacing: -.05em; }
.broker-brand span { display: block; color: #5d8993; font-size: .48rem; letter-spacing: .25em; }
.broker-intro { padding: 2.7rem 0 1.8rem; }
.broker-intro h2 { margin: .35rem 0 .3rem; font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.1; letter-spacing: -.055em; }
.broker-intro p { margin: 0; color: #607c88; }
.listing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1.1rem; }
.listing-card { overflow: hidden; border: 1px solid #d8e6e9; border-radius: .65rem; background: #fff; }
.listing-art { display: grid; place-items: center; height: 11.5rem; background: linear-gradient(145deg, #d7eff0, #9bcad3); color: #276c80; }
.boat-art { width: min(82%, 320px); }
.listing-body { padding: 1.1rem 1.2rem 1.25rem; }
.listing-year { color: #668491; font-size: .65rem; font-weight: 750; letter-spacing: .12em; }
.listing-body h3 { margin: .35rem 0 .3rem; font-size: 1.25rem; letter-spacing: -.035em; }
.listing-body > strong { display: block; margin-bottom: .75rem; color: #0a5872; font-size: 1.05rem; }
details { border-top: 1px solid #e1ebee; padding-top: .7rem; }
summary { color: #0b5770; font-size: .82rem; font-weight: 750; cursor: pointer; }
.lead-form { padding-top: 1rem; gap: .75rem; }
.lead-form label { font-size: .74rem; }
.lead-form input { min-height: 2.5rem; font-size: .85rem; }
.lead-form .button { width: 100%; }
.website-empty { min-height: 17rem; border: 1px dashed #bed9de; border-radius: .65rem; }
.website-empty .button { margin-top: 1rem; }
.load-error { padding: 2rem; background: #fff; border-radius: .8rem; }

@media (max-width: 1100px) {
  .flow-rail { display: none; }
  .content-grid, .crm-grid, .lower-grid { grid-template-columns: 1fr; }
  .review-actions { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .sidebar { gap: .9rem; padding: .8rem 1rem; }
  .brand { padding: 0; }
  .side-label, .side-note { display: none; }
  .primary-nav { display: flex; overflow-x: auto; padding-bottom: .1rem; }
  .primary-nav a { flex: none; min-height: 2.65rem; padding: .5rem .7rem; font-size: .84rem; }
  .topbar { min-height: 3.1rem; padding: .5rem 1rem; font-size: .62rem; }
  .topbar-tag { display: none; }
  main { padding: 1.4rem 1rem 2.5rem; }
  .metric-row { gap: .6rem; }
  .metric-row > div { display: grid; gap: .25rem; min-height: 5rem; padding: .85rem; }
  .metric-row strong { font-size: 1.6rem; }
  .metric-row span { font-size: .73rem; }
  .record-row, .customer-row, .lead-row { padding: .9rem 1rem; }
  .record-status { display: none; }
  .panel-heading { padding: 1.2rem 1rem; }
}
@media (max-width: 420px) {
  .field-row { grid-template-columns: 1fr; }
  .customer-row { display: grid; }
  .tag-list { justify-content: start; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
