@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  font-family:Inter,system-ui,sans-serif;
  color:#172b35;
  background:#f3f6f8;
  font-size:16px;
  --navy:#102c3a;
  --teal:#086d69;
  --line:#dfe7eb
}
* {
  box-sizing:border-box
}
body {
  margin:0
}
a {
  color:var(--teal);
  text-decoration:none
}
a:hover {
  text-decoration:underline
}
button,input,select,textarea {
  font:inherit
}
button,a,input,select,textarea {
  outline-offset:4px
}
button {
  cursor:pointer
}
.sidebar {
  position:fixed;
  inset:0 auto 0 0;
  width:244px;
  padding:32px 22px;
  background:var(--navy);
  color:#fff;
  display:flex;
  flex-direction:column;
  overflow:auto
}
.brand {
  display:block;
  font-size:2rem;
  font-weight:800;
  letter-spacing:.08em;
  color:inherit
}
.brand span {
  display:block;
  font-size:.75rem;
  font-weight:500;
  letter-spacing:.06em;
  color:#b7ced6;
  margin-top:4px
}
.workspace {
  margin:30px 0 22px;
  padding:16px 0;
  border-block:1px solid #31505d;
  font-size:.9rem;
  font-weight:600
}
.workspace small {
  display:block;
  color:#aec4ce;
  margin-top:7px;
  font-weight:400
}
.sidebar nav {
  display:grid;
  gap:3px
}
.sidebar nav a {
  color:#c7d8df;
  padding:11px 12px;
  border-radius:7px;
  font-size:.88rem
}
.sidebar nav a.selected {
  background:#254653;
  color:white
}
.sidebar nav a:hover {
  background:#1c3e4c;
  text-decoration:none
}
.sidebar-bottom {
  margin-top:auto;
  padding-top:28px;
  display:grid;
  gap:14px;
  font-size:.85rem
}
.sidebar-bottom a,.text-button {
  color:#bed1da
}
.text-button {
  background:none;
  border:0;
  padding:0;
  font-size:.85rem
}
main {
  margin-left:244px
}
.topbar {
  height:86px;
  background:#fff;
  border-bottom:1px solid var(--line);
  padding:0 40px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:.8rem;
  color:#647782
}
.topbar strong {
  margin-left:12px;
  color:#203944;
  font-weight:500
}
.account {
  display:flex;
  align-items:center;
  gap:22px
}
.account label {
  position:absolute;
  clip:rect(0,0,0,0)
}
.account select {
  padding:7px;
  max-width:180px
}
.content {
  max-width:1500px;
  margin:auto;
  padding:44px 40px
}
.page-heading {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:32px
}
.page-heading h1 {
  font-size:2rem;
  letter-spacing:-.04em;
  margin:8px 0 12px;
  font-weight:700
}
.page-heading p {
  color:#667c87;
  margin:0;
  font-size:.94rem
}
.eyebrow {
  text-transform:uppercase;
  letter-spacing:.09em;
  font-size:.72rem!important;
  font-weight:600
}
.button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:46px;
  padding:12px 19px;
  border:1px solid transparent;
  border-radius:7px;
  background:var(--teal);
  color:#fff;
  font-size:.85rem;
  font-weight:600;
  white-space:nowrap
}
.button:hover {
  filter:brightness(.95);
  text-decoration:none
}
.button.secondary {
  background:white;
  color:#2c4652;
  border-color:#d5e0e5
}
.button.light {
  background:#e6f8ef;
  color:#174d47
}
.actions {
  display:flex;
  gap:10px
}
.metrics {
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:18px;
  margin-bottom:28px
}
.metric,.panel {
  background:#fff;
  border:1px solid var(--line);
  border-radius:12px
}
/* Every white content card has padding by default; variants may increase it. */
.panel {
  padding:clamp(20px,2.5vw,28px)
}
.metric {
  padding:24px
}
.metric span {
  font-size:.84rem;
  color:#647b87
}
.metric strong {
  display:block;
  font-size:2.4rem;
  letter-spacing:-.05em;
  margin-top:18px
}
.overview-grid {
  display:grid;
  grid-template-columns:1.8fr 1fr;
  gap:24px
}
.panel-heading {
  padding:0 0 20px;
  margin-bottom:20px;
  border-bottom:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  align-items:center
}
.panel h2 {
  font-size:1.06rem;
  margin:0
}
.panel-heading a {
  font-size:.82rem;
  font-weight:600
}
.job {
  display:flex;
  align-items:center;
  gap:14px;
  padding:20px 0;
  border-bottom:1px solid #edf2f4
}
.job:last-child {
  border-bottom:0
}
.job strong {
  font-size:.9rem
}
.job small {
  display:block;
  font-size:.78rem;
  color:#6c808c;
  margin-top:6px
}
.job-icon {
  display:grid;
  place-items:center;
  background:#e8f2f3;
  color:#28716c;
  font-size:.85rem;
  font-weight:700;
  border-radius:9px;
  min-width:42px;
  height:42px
}
.status {
  margin-left:auto;
  font-size:.75rem;
  padding:6px 10px;
  border-radius:5px;
  background:#edf1f5;
  color:#465d6a;
  white-space:nowrap
}
.status.done {
  background:#e2f4ea;
  color:#226247
}
.status.active {
  background:#e3f0fd;
  color:#215c90
}
.status.blocked {
  background:#fff0dc;
  color:#8d5b1e
}
.panel.dark {
  padding:34px;
  background:var(--navy);
  color:#fff;
  border-color:var(--navy)
}
.dark h2 {
  font-size:1.7rem;
  line-height:1.35;
  letter-spacing:-.03em;
  margin:28px 0 18px
}
.dark p {
  color:#bfd2db;
  font-size:.9rem;
  line-height:1.7
}
.dark .button {
  margin-top:16px
}
.empty {
  padding:52px 24px;
  text-align:center
}
.empty h2,.empty h3 {
  font-size:1.1rem;
  margin:0 0 14px
}
.empty p {
  color:#6a7f89;
  font-size:.9rem;
  line-height:1.7;
  max-width:410px;
  margin:0 auto 24px
}
.search {
  display:flex;
  gap:10px;
  padding:0 0 22px
}
.search input {
  max-width:400px
}
.table-scroll {
  overflow-x:auto
}
table {
  width:100%;
  border-collapse:collapse;
  text-align:left;
  font-size:.85rem
}
th {
  font-weight:500;
  color:#657b87;
  background:#f9fbfc;
  font-size:.78rem
}
td,th {
  padding:17px 24px;
  border-bottom:1px solid #edf1f4
}
td:first-child {
  font-weight:500
}
td a {
  font-size:.8rem
}
.table-note {
  font-size:.85rem;
  padding:12px 24px;
  color:#687e89
}
.form-panel {
  max-width:900px;
  padding:32px
}
.form-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:24px
}
.field label {
  display:block;
  font-size:.85rem;
  font-weight:600;
  margin-bottom:9px
}
input,select,textarea {
  width:100%;
  padding:12px;
  border:1px solid #ccd9df;
  border-radius:6px;
  background:white;
  color:#223f4c;
  min-height:46px
}
textarea {
  height:110px;
  resize:vertical
}
.field:has(textarea) {
  grid-column:1/-1
}
input[type=checkbox] {
  width:22px;
  height:22px;
  min-height:0
}
.field small {
  color:#6f818a;
  display:block;
  margin-top:7px;
  font-size:.8rem
}
.form-actions {
  display:flex;
  justify-content:flex-end;
  gap:10px;
  border-top:1px solid var(--line);
  margin-top:32px;
  padding-top:24px
}
.back {
  font-size:.85rem;
  display:inline-block;
  margin-bottom:20px
}
.errorlist {
  color:#a53232;
  font-size:.85rem;
  padding-left:20px
}
.message {
  background:#e0f4e9;
  border:1px solid #b9dfc9;
  padding:14px 18px;
  border-radius:8px;
  margin-bottom:24px
}
.help-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:22px
}
.help-card {
  padding:28px
}
.help-card h2 {
  margin-bottom:18px
}
.help-card p {
  font-size:.9rem;
  line-height:1.8;
  color:#586f7c
}
.sr-only {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  overflow:hidden;
  clip:rect(0,0,0,0)
}
.login-page {
  display:grid;
  grid-template-columns:1fr 1fr;
  min-height:100vh;
  background:#fff
}
.login-intro {
  background:var(--navy);
  color:#fff;
  display:flex;
  flex-direction:column;
  justify-content:space-between;
  padding:56px 70px
}
.login-intro h1 {
  font-size:3.7rem;
  line-height:1.1;
  letter-spacing:-.055em;
  margin:24px 0
}
.login-intro p {
  color:#bad0da;
  line-height:1.8;
  max-width:340px
}
.login-intro small {
  color:#9eb9c4
}
.login-side {
  display:grid;
  place-items:center;
  padding:40px
}
.login-card {
  max-width:390px;
  width:100%
}
.login-card h2 {
  font-size:1.7rem;
  letter-spacing:-.03em
}
.login-card p {
  color:#718590;
  font-size:.9rem;
  margin-bottom:32px
}
.login-card .field {
  margin-bottom:22px
}
.login-card .button {
  width:100%;
  margin-top:8px
}
@media(max-width:1100px) {
  .sidebar {
    width:210px
  }
  main {
    margin-left:210px
  }
  .content {
    padding:30px 24px
  }
  .overview-grid {
    grid-template-columns:1fr
  }
  .metrics {
    grid-template-columns:repeat(2,1fr)
  }
  .topbar {
    padding:0 24px
  }
  .login-intro {
    padding:40px
  }
  .login-intro h1 {
    font-size:3rem
  }

}
@media(max-width:720px) {
  .sidebar {
    position:relative;
    width:100%;
    padding:20px
  }
  .brand {
    font-size:1.6rem
  }
  .workspace {
    margin:16px 0;
    padding:10px 0
  }
  .sidebar nav {
    display:flex;
    overflow:auto;
    gap:6px
  }
  .sidebar nav a {
    white-space:nowrap
  }
  .sidebar-bottom {
    display:flex;
    padding-top:14px;
    gap:20px;
    flex-wrap:wrap
  }
  main {
    margin:0
  }
  .topbar {
    height:auto;
    min-height:66px;
    padding:14px 20px;
    gap:16px
  }
  .topbar>span {
    display:none
  }
  .account {
    width:100%;
    justify-content:space-between
  }
  .content {
    padding:28px 18px
  }
  .page-heading {
    align-items:flex-start;
    flex-direction:column
  }
  .page-heading h1 {
    font-size:1.8rem
  }
  .actions {
    flex-wrap:wrap
  }
  .metrics {
    gap:12px
  }
  .metric {
    padding:20px
  }
  .metric strong {
    font-size:2rem
  }
  .form-grid,.help-grid {
    grid-template-columns:1fr
  }
  .form-panel {
    padding:22px
  }
  .login-page {
    grid-template-columns:1fr
  }
  .login-intro {
    padding:28px
  }
  .login-intro>div:nth-child(2) {
    display:none
  }
  .login-intro small {
    display:none
  }
  .login-side {
    padding:32px 24px
  }
  .job {
    padding:18px 16px
  }
  .job-icon {
    display:none
  }
  td,th {
    padding:16px
  }
  .search {
    padding:16px
  }

}
.remove-ai-key { margin-top:1.5rem; }
.live-stop { background:#1753a3; border:2px solid white; border-radius:50%; color:white; text-align:center; font:bold 13px/18px system-ui; }
.live-plow svg { width:34px; height:28px; }
.live-plow { text-align:center; font-size:26px; line-height:34px; text-shadow:0 0 3px white; }
.operations-map { height: 65vh; min-height: 420px; border: 1px solid var(--line); border-radius: 12px; z-index: 0; }
.map-tools { padding: 20px; display: grid; gap: 14px; }
.map-tools select { max-width: 500px; }
.map-tools .actions { flex-wrap: wrap; }
.map-tools small { color: #586f7c; line-height: 1.6; }
.document-item { border-bottom: 1px solid var(--line); padding: 20px 0; }
.document-item small { display: block; margin-top: 10px; }
.document-preview { display: block; width: 100%; max-height: 400px; object-fit: contain; margin-top: 16px; border-radius: 8px; }
.help-card .field { margin-bottom: 20px; }
.import-preview { margin-top: 24px; }
.import-preview button { margin-top: 24px; }
.fore-logo { display: block; width: 180px; max-width: 100%; height: auto; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; }
.sidebar nav .bi { font-size: 1.1rem; width: 20px; text-align: center; flex-shrink: 0; }
.login-intro { background: linear-gradient(180deg, rgba(9, 34, 49, .7), rgba(9, 34, 49, .3)), url('brand/winter-hero.png') center / cover; }
.login-intro > div:nth-child(2) { text-shadow: 0 2px 25px rgba(0,0,0,.6); }
.login-intro .fore-logo { width: 230px; }
.inline-map-editor { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 26px; }
.inline-map-editor h2 { margin-bottom: 18px; }
.record-map { height: 430px; border: 1px solid var(--line); border-radius: 10px; z-index: 0; }
.address-search { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-bottom: 12px; }
.address-search label { grid-column: 1 / -1; font-size: .85rem; font-weight: 600; }
.address-result { display: block; width: 100%; text-align: left; background: #edf5f7; border: 1px solid #ccdee5; border-radius: 6px; padding: 12px; margin-bottom: 8px; color: #183e4d; }
.map-draw-actions { margin: 18px 0; flex-wrap: wrap; }
.field-help, .inline-map-editor small { font-size: .85rem; color: #5e7580; line-height: 1.6; }
.inline-map-editor small { display: block; margin-top: 12px; }
.equipment-picker { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.equipment-list { list-style: none; padding: 0; margin: 6px 0; grid-column: 1 / -1; }
.equipment-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 8px; }
.remove-equipment { border: 0; background: none; color: #8c3b3b; padding: 8px; }
.field[hidden] { display: none; }
@media (max-width: 720px) {
  .address-search, .equipment-picker { grid-template-columns: 1fr; }
  .record-map { height: 380px; }
}
.public-page { background: #f4f8fa; }
.public-nav { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 22px max(5vw, 22px); background: #102c3a; }
.public-nav .fore-logo { width: 180px; }
.public-nav .actions { flex-wrap: wrap; }
.public-hero { min-height: 590px; display: flex; align-items: center; padding: 70px 7vw; color: white; background: linear-gradient(90deg, rgba(8,31,47,.8), rgba(8,31,47,.12)), url('brand/winter-hero.png') center / cover; }
.public-hero-copy { max-width: 660px; }
.public-hero h1 { font-size: clamp(2.8rem, 5vw, 4.8rem); line-height: 1.05; letter-spacing: -.055em; margin: 0 0 28px; }
.public-hero p { color: #dcecf3; line-height: 1.8; font-size: 1.15rem; max-width: 470px; margin-bottom: 30px; }
.public-features { max-width: 1260px; padding: 64px 30px; margin: auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 42px; }
.public-features .bi { font-size: 2rem; color: #147a75; }
.public-features h2 { font-size: 1.2rem; margin-top: 22px; }
.public-features p { color: #5d7581; line-height: 1.8; }
.signup-card { max-width: 860px; margin: 50px auto; padding: 40px; }
.signup-card h1 { font-size: 2rem; letter-spacing: -.04em; }
.signup-card > p { color: #5d7581; line-height: 1.8; margin-bottom: 30px; }
.signup-card .field:has([type=password]) { grid-column: 1 / -1; }
.signup-card .helptext, .signup-card small { line-height: 1.7; }
.signup-submit { margin-top: 28px; }
.account-card { margin-bottom: 22px; }
@media (max-width: 720px) {
  .public-nav { padding: 20px; flex-wrap: wrap; }
  .public-hero { padding: 55px 24px; min-height: 500px; background-position: 65% center; }
  .public-features { grid-template-columns: 1fr; padding: 40px 24px; gap: 22px; }
  .signup-card { margin: 22px 14px; padding: 24px; }
}

/* Decorative photographs span the main workspace below the top bar. */
.main-stage { position: relative; isolation: isolate; min-height: calc(100vh - 86px); background: #f3f6f8; }
.main-stage::before { content: ''; position: absolute; inset: 0 0 auto; height: 510px; z-index: -1; pointer-events: none;
  background-image: linear-gradient(180deg, rgba(243,246,248,.14), rgba(243,246,248,.65) 55%, #f3f6f8 100%), linear-gradient(90deg, rgba(243,246,248,.89), rgba(243,246,248,.12)), var(--scene-image);
  background-size: cover; background-position: center 45%; background-repeat: no-repeat; }
.scene-winter { --scene-image: url('brand/winter-hero.png'); }
.scene-route { --scene-image: url('brand/winter-route.png'); }
.scene-fleet { --scene-image: url('brand/winter-fleet.png'); }
.heading-icon { display: inline-block; margin-right: 14px; font-size: .8em; color: var(--teal); vertical-align: .03em; }
.add-related { display: inline-flex; align-items: center; gap: 7px; margin-top: 10px; font-size: .85rem; font-weight: 600; }
.edit-button { display: inline-flex; gap: 8px; align-items: center; justify-content: center; min-height: 44px; min-width: 108px; padding: 10px 16px; white-space: nowrap; }
.fore-map-rotation { display: flex; background: white; }
.fore-map-rotation button { min-width: 40px; min-height: 40px; background: white; border: 0; border-right: 1px solid #dfe7eb; color: #173b49; font-weight: 700; font-size: 1.05rem; }
.fore-map-rotation button:last-child { border-right: 0; }
.fore-map-rotation button:hover { background: #e8f2f4; }
.rectangle-handle { background: white; border: 2px solid #147a75; box-shadow: 0 1px 5px #102c3a55; }
.rectangle-turn, .rectangle-move { border-radius: 50%; color: #147a75; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.rectangle-turn { border-color: #2b65b0; color: #2b65b0; }
.related-dialog { width: min(620px, calc(100% - 32px)); max-height: 90vh; overflow: auto; border: 1px solid var(--line); border-radius: 14px; padding: 28px; color: #172b35; box-shadow: 0 25px 100px #102c3a44; }
.related-dialog::backdrop { background: #102c3a99; }
.dialog-heading { display: flex; gap: 16px; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.dialog-heading h2 { margin: 0; font-size: 1.3rem; }
.related-type-form .field { margin-bottom: 18px; }
.form-actions { flex-wrap: wrap; }
.assistant-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.assistant-history { padding: 22px; }
.assistant-history h2 { font-size: 1rem; margin-top: 0; }
.assistant-history a { display: block; padding: 12px 9px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; font-size: .9rem; }
.assistant-history a[aria-current] { background: #e6f4f1; border-radius: 6px; font-weight: 600; }
.assistant-conversation { padding: 28px; }
.assistant-intro { padding: 30px 10px; text-align: center; }
.assistant-intro > .bi { font-size: 2.5rem; color: var(--teal); }
.assistant-intro p { color: #526d79; line-height: 1.7; }
.assistant-message { padding: 18px; border-radius: 10px; margin-bottom: 16px; line-height: 1.7; overflow-wrap: anywhere; }
.assistant-message strong { display: block; margin-bottom: 6px; font-size: .8rem; }
.assistant-user { background: #e4f2ef; }
.assistant-assistant { background: #f3f6f8; }
.assistant-compose { border-top: 1px solid var(--line); padding-top: 22px; margin-top: 24px; }
.assistant-compose label { display: block; font-weight: 600; margin-bottom: 10px; }
.assistant-compose textarea { width: 100%; padding: 14px; border: 1px solid #bed1d9; border-radius: 8px; resize: vertical; }
.assistant-compose small { color: #617784; font-size: .8rem; line-height: 1.6; flex: 1; }
.assistant-proposal, .ai-usage { margin-top: 24px; padding: 26px; }
.assistant-proposal h2, .ai-usage h2 { font-size: 1.2rem; }
.assistant-proposal dl > div { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.assistant-proposal dt { font-weight: 600; }
.assistant-proposal dd { margin: 0; overflow-wrap: anywhere; }
.ai-usage p { line-height: 1.7; color: #526d79; }
.ai-floating-button { position: fixed; z-index: 1200; right: 24px; bottom: 20px; display: flex; align-items: center; gap: 10px; border: 0; border-radius: 28px; background: #086d69; color: white; padding: 15px 22px; min-height: 52px; box-shadow: 0 8px 30px #102c3a33; font-weight: 600; }
.ai-drawer { position: fixed; z-index: 1200; right: 24px; bottom: 86px; width: min(460px, calc(100vw - 32px)); height: min(700px, calc(100dvh - 110px)); border: 1px solid #c9dce4; border-radius: 14px; background: white; box-shadow: 0 15px 60px #102c3a44; display: flex; flex-direction: column; overflow: hidden; }
.ai-drawer[hidden] { display: none; }
.ai-drawer-heading { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: #102c3a; color: white; }
.ai-drawer-scope { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 16px; font-size: .8rem; border-bottom: 1px solid var(--line); }
.ai-drawer-scope select { max-width: 200px; min-width: 100px; padding: 7px; border: 1px solid var(--line); }
.ai-drawer iframe { width: 100%; flex: 1; min-height: 0; border: 0; }
.assistant-compact .sidebar, .assistant-compact .topbar, .assistant-compact .content > .page-heading, .assistant-compact .assistant-history { display: none; }
.assistant-compact main { margin-left: 0; }
.assistant-compact .content { padding: 12px; }
.assistant-compact .main-stage { min-height: 100vh; }
.assistant-compact .assistant-layout { display: block; }
.assistant-compact .assistant-conversation { padding: 14px; }
.assistant-compact .assistant-proposal { padding: 14px; }
.assistant-voice { padding: 14px 0; border-top: 1px solid var(--line); }
.assistant-voice p { font-size: .82rem; line-height: 1.6; color: #526d79; }
.assistant-voice audio[controls] { width: 100%; }
button:disabled { opacity: .6; cursor: wait; }
@media (max-width: 720px) {
  .assistant-layout { grid-template-columns: 1fr; }
  .assistant-history { max-height: 180px; overflow-y: auto; }
  .assistant-conversation { padding: 18px; }
  .ai-drawer { right: 8px; bottom: 80px; width: calc(100vw - 16px); }
  .ai-floating-button { right: 14px; bottom: 14px; }
  .main-stage::before { height: 390px; background-position: 65% center; }
  .heading-icon { margin-right: 9px; }
}

/* The work page can navigate without unloading the independent AI frame. */
body.workspace-host { display: block; height: 100dvh; overflow: hidden; }
#sn-workspace-frame { display: block; width: 100%; height: 100dvh; border: 0; }
.workspace-child #open-ai-drawer, .workspace-child #ai-drawer { display: none !important; }

.ai-header-actions, .ai-drawer-voice-controls { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-drawer-heading { gap: 10px; flex-wrap: wrap; }
.ai-drawer-heading strong { font-size: .9rem; }
.ai-drawer-voice-controls { padding: 8px 12px; background: #f3f6f8; border-bottom: 1px solid var(--line); }
.ai-drawer-voice-controls button, .ai-header-actions button { min-height: 40px; padding: 8px 10px; font-size: .8rem; }
.assistant-voice { position: sticky; top: 0; z-index: 5; background: white; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; }
.assistant-voice > p { flex-basis: 100%; margin: 4px 0; font-size: .85rem; }
.assistant-voice button { min-height: 44px; }
.assistant-voice button[aria-pressed="true"], .ai-drawer-voice-controls button[aria-pressed="true"] { background: #ffe8c2; color: #653d00; border-color: #cf9b43; }

#ai-work-preview { position: fixed; inset: 0 auto 0 0; width: calc(100% - 500px); height: 100dvh; border: 0; z-index: 100; background: white; }
.assistant-with-workspace > .sidebar { display: none; }
.assistant-with-workspace > main { margin-left: calc(100% - 500px); }
.assistant-with-workspace .assistant-history { display: none; }
.assistant-with-workspace .assistant-layout { display: block; }
@media (max-width: 900px) { #ai-work-preview { inset: 0 0 auto; width: 100%; height: 55dvh; } .assistant-with-workspace > main { margin-left: 0; padding-top: 55dvh; } }

/* Keep settlement forms and tables comfortably inside their cards. */
.settlement-panel{padding:clamp(20px,3vw,32px);margin-bottom:24px}
.settlement-panel>.table-wrap{overflow-x:auto;margin:20px 0}
.settlement-panel h2{margin-top:0}
.settlement-form{max-width:680px;margin:24px 0}
.settlement-form p{display:grid;gap:8px;margin:0 0 20px}
.settlement-form p:has(input[type="checkbox"]){display:flex;flex-wrap:wrap;align-items:center}
.settlement-form input:not([type="checkbox"]),.settlement-form select{width:100%}

.environment-badge{display:inline-block;background:#fff0c2;color:#614400;border:1px solid #d7ac46;border-radius:8px;padding:7px 11px;font-size:12px;white-space:nowrap}

/* Native disclosure controls keep grouped navigation usable without JavaScript. */
.nav-group{min-width:0}
.nav-group summary{display:flex;align-items:center;gap:9px;min-height:44px;padding:11px 12px;border-radius:7px;color:#dbe8ed;font-size:.88rem;font-weight:600;cursor:pointer;list-style:none}
.nav-group summary::-webkit-details-marker{display:none}
.nav-group summary:hover,.nav-group summary.selected{background:#1c3e4c;color:white}
.nav-group summary span{flex:1;min-width:0}
.nav-chevron{font-size:.65rem;transition:transform .15s ease}
.nav-group[open]>summary .nav-chevron{transform:rotate(180deg)}
.nav-group-links{display:grid;gap:3px;margin:5px 0 10px 14px;padding-left:8px;border-left:1px solid #31505d}
.sidebar nav .nav-group-links a{display:flex;align-items:center;gap:9px;font-size:.82rem;padding:10px 9px;min-height:40px}
.nav-logout{width:100%;text-align:left;padding:10px 9px;min-height:40px;cursor:pointer;border-radius:7px}
.nav-logout:hover{background:#1c3e4c}
.nav-group summary:focus-visible{outline:2px solid #a8dace;outline-offset:2px}
@media(prefers-reduced-motion:reduce){.nav-chevron{transition:none}}

@media(max-width:720px){.sidebar>nav,.sidebar .nav-group-links{display:grid;overflow:visible;grid-template-columns:1fr}.sidebar-bottom{display:block}.sidebar-bottom>.nav-group{width:100%}}

.signup-selection{max-width:1100px;margin:48px auto;padding:0 24px}
.signup-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px;margin-top:28px}
.signup-choices h2{font-size:1.3rem;line-height:1.4}
.signup-choices p{line-height:1.7;color:#526873;margin:18px 0 26px}
.signup-choices .panel{display:flex;flex-direction:column;align-items:flex-start}
.signup-choices .button{margin-top:auto}
@media(max-width:720px){.signup-choices{grid-template-columns:1fr}.signup-selection{margin:28px auto;padding:0 18px}}


/* Registration cards share one form and one set of save actions. */
.record-editor {
  container: register-card / inline-size;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  min-width: 0;
}
.driver-grants { min-inline-size: 0; margin: 0; }
@container register-card (max-width: 480px) {
  .driver-grants table { table-layout: fixed; }
  .driver-grants th, .driver-grants td { padding: 10px 3px; text-align: center; overflow-wrap: anywhere; }
  .driver-grants th:first-child { width: 41%; text-align: left; }
}
.record-section { width: 100%; min-width: 0; margin: 0; }
.record-section h2 { margin: 0 0 20px; font-size: 1.14rem; line-height: 1.35; }
.record-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }
.record-fields > .field { min-width: 0; margin: 0; }
.record-fields textarea { min-height: 92px; }
.record-fields .field:has(textarea),
.record-fields [data-field="roles"],
.record-fields [data-field="default_role"],
.record-fields [data-field="billing_same_as_address"],
.record-fields [data-field="create_worksite"],
.record-fields [data-field="plowing_areas"] { grid-column: 1 / -1; }
.record-fields [data-field="default_role"] select { width: min(100%, 28rem); }
.record-fields .field > input, .record-fields .field > select { max-width: 100%; }
.record-fields .record-check, .record-modes label, #id_plowing_areas label {
  display: inline-flex; align-items: center; gap: 9px; min-height: 40px; margin: 0; cursor: pointer;
}
.record-editor input[type="checkbox"] { accent-color: #086d69; flex: 0 0 auto; }
.record-modes { min-width: 0; padding: 0; margin: 0; border: 0; }
.record-modes legend { padding: 0; margin-bottom: 6px; font-size: .85rem; font-weight: 600; }
.record-modes #id_roles { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type .record-fields {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}
.record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type .field { grid-column: span 4; }
.record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type [data-field="street_name"] { grid-column: span 5; }
.record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type :is([data-field="house_number"], [data-field="postal_code"]) { grid-column: span 2; }
.record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type [data-field="city"] { grid-column: span 3; }
.record-editor[data-register="customers"] .record-section:first-of-type :is([data-field="customer_type"], [data-field^="legacy_"], [data-field="create_worksite"]) { grid-column: 1 / -1; }
.record-editor[data-register="customers"] [data-field="customer_type"] select { width: min(100%, 28rem); }
.record-editor[data-register="customers"] .record-section:first-of-type [data-field="company_name"] { grid-column: span 8; }
.record-editor[data-register="drivers"] #id_plowing_areas {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: 4px 20px;
}
.record-editor[data-register="drivers"] #id_plowing_areas label {
  display: flex; min-height: 46px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere;
}
.record-empty { margin: 0; padding-block: 12px; color: #526873; }
.record-errors { padding: 1rem 1.25rem; border: 2px solid #a52820; border-radius: 8px; color: #63221b; background: #fff7f5; }
.record-errors h2 { margin: 0; font-size: 1.15rem; }
.record-errors ul:empty { display: none; }
.record-errors a { color: inherit; text-decoration: underline; }
.page-heading .overview-description { max-width: 70ch; margin: .4rem 0 .65rem; font-size: .94rem; line-height: 1.5; }
.overview-description .bi-info-circle { font-size: .85em; margin-inline-end: .2em; }
.mobile-menu-toggle { display: none; }
@media (max-width: 720px) {
  body:where(:not(.assistant-compact):not(.assistant-with-workspace)) > .sidebar.has-menu-button { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 8px 18px; }
  .sidebar.has-menu-button .fore-logo { width: 135px; }
  .topbar { flex-wrap: wrap; gap: 8px 16px; }
  .topbar > .environment-badge { margin-left: 0; }
  .topbar .account { flex: 1 1 190px; min-width: 0; flex-wrap: wrap; gap: 8px 12px; }
  .topbar .account > span { overflow-wrap: anywhere; }
  .has-menu-button .mobile-menu-toggle { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px; color: inherit; background: transparent; border: 1px solid #64828d; border-radius: 7px; font: inherit; }
  .sidebar.has-menu-button > :is(.workspace, nav, .sidebar-bottom) { grid-column: 1 / -1; }
  .sidebar.has-menu-button:not(.menu-open) > :is(.workspace, nav, .sidebar-bottom) { display: none; }
}
.record-footer, .record-buttons { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.record-footer { justify-content: flex-end; padding-bottom: 52px; }
.record-editor[data-register="drivers"] .record-footer { justify-content: space-between; }
.driver-active { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; min-height: 44px; font-weight: 600; cursor: pointer; }
.driver-active input[type="checkbox"] {
  appearance: none; width: 44px; height: 26px; min-height: 0; padding: 2px; margin: 0;
  border: 1px solid #617681; border-radius: 20px; background: #617681; cursor: pointer;
}
.driver-active input::before {
  content: ''; display: block; width: 20px; height: 20px; border-radius: 50%; background: white;
}
.driver-active input:checked { background: #086d69; border-color: #086d69; }
.driver-active input:checked::before { transform: translateX(18px); }
.driver-active input:focus-visible { outline: 3px solid #136981; outline-offset: 3px; }
.record-editor :is(#address-status, #job-agreement-status):empty { display: none; }
.record-editor[data-register="equipment"] .record-section:not(:has(.record-fields > .field:not([hidden]))) { display: none; }
@container register-card (max-width: 740px) {
  .record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type .record-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type .field[data-field] { grid-column: auto; }
}
@container register-card (max-width: 540px) {
  .record-fields, .record-editor:is([data-register="drivers"], [data-register="customers"]) .record-section:first-of-type .record-fields { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .record-fields [data-field="default_role"] select { max-width: none; }
  .record-footer { row-gap: 12px; }
}

.topbar { background:#e7f1f3; gap:14px; }
.topbar .active-company { margin:0 auto 0 0; font-size:clamp(1.05rem,2vw,1.45rem); font-weight:700; color:#153640; }
.header-shortcuts { display:flex; align-items:center; gap:6px; }
.header-shortcuts a { position:relative; display:grid; place-items:center; width:42px; min-height:44px; font-size:1.25rem; color:#124e53; }
.header-shortcuts b { position:absolute; top:0; right:0; font:600 12px/1.5 system-ui; background:#075b57; color:white; padding:0 5px; border-radius:1em; }
.assistant-compact :is(#stop-ai-voice,#mute-ai-microphone,#mute-ai-audio), .ai-drawer [hidden], .assistant-voice [hidden] {display:none!important}
:is(.ai-drawer-voice-controls,.assistant-voice) button[aria-pressed="true"] {background:#e0e8e9;color:#273b44;border:2px solid #486570}
.booking-actions { display:inline-flex; flex-wrap:wrap; gap:.5rem; margin:.4rem 0; }
#customer-message-dialog label, .message-compose label { display:block; font-weight:650; margin:1rem 0 .55rem; }

.live-stop.approximate { opacity: .72; }
.status-requested { background: #ffddb4; color: #682d00; }

.route-progress { display:flex; flex-wrap:wrap; gap:.5rem; list-style:none; padding:0; }
.route-progress li { padding:.3rem .6rem; border:1px solid #b2bcc7; border-radius:.5rem; }
.route-progress .own-stop { font-weight:700; border-color:#205fc2; }
