/* Quetta Ride operations */
:root {
  color-scheme: light;
  --forest: #123c34;
  --ink: #162f29;
  --green: #00695c;
  --green-dark: #085447;
  --muted: #52645b;
  --line: #d8e2d8;
  --paper: #f5f6f0;
  --white: #fff;
  --gold: #ebb35d;
  --shadow: 0 3px 14px rgba(32, 59, 38, .045);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
}
*, *::before, *::after { box-sizing: border-box; }
body { min-width: 0; margin: 0; }
h1, h2, p, dl, ol, ul { margin: 0; }
h1, h2, strong, button { font-weight: 680; }
h1 { font-size: clamp(2rem, 3.5vw, 3.25rem); line-height: 1.08; letter-spacing: -.05em; text-wrap: balance; }
h2 { font-size: clamp(1.25rem, 1.7vw, 1.48rem); line-height: 1.25; letter-spacing: -.035em; }
a { color: var(--green-dark); text-underline-offset: .18em; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 3px solid #bc701b; outline-offset: 3px; }
button, input, select, textarea { font: inherit; }
button, .action {
  min-height: 44px; padding: .62rem 1.12rem; border: 1px solid transparent; border-radius: .65rem;
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; cursor: pointer;
  color: white; background: var(--green); font-size: .92rem; font-weight: 650; line-height: 1.25; text-decoration: none;
}
button:hover, .action:hover { background: var(--green-dark); text-decoration: none; }
button:active, .action:active { transform: translateY(1px); }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  display: block; width: 100%; min-height: 46px; margin-top: .37rem; padding: .62rem .78rem; border: 1px solid #a6b8ad;
  border-radius: .58rem; color: var(--ink); background: #fff; font-size: 1rem; line-height: 1.35;
}
input::placeholder, textarea::placeholder { color: #65756c; opacity: 1; }
input:hover, select:hover, textarea:hover { border-color: #6d8577; }
input[type=checkbox] { width: 1.16rem; height: 1.16rem; margin: 0; flex: 0 0 auto; accent-color: var(--green); }
textarea { resize: vertical; }
label { display: block; min-width: 0; font-size: .87rem; font-weight: 620; }
.skip, .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip:focus { z-index: 5; top: 1rem; left: 1rem; width: auto; height: auto; padding: .65rem 1rem; clip-path: none; background: white; border-radius: .4rem; }
.lead { color: var(--muted); font-size: 1.015rem; line-height: 1.55; margin-top: .68rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: #fff; text-align: left; }
.brand img { display: block; border-radius: .7rem; width: 44px; height: 44px; }
.brand > span { font-size: 1.28rem; font-weight: 720; letter-spacing: -.04em; line-height: 1.12; }
.brand small { display: block; margin-top: .28rem; font-size: .73rem; font-weight: 500; color: #c9e3d8; letter-spacing: .025em; }

/* The ranges and road echo the mountain mark on both mobile apps. */
.login { display: grid; place-items: center; min-height: 100svh; padding: clamp(1rem, 5vw, 5rem); background: radial-gradient(ellipse at 16% 10%,#eaf2e7 0, transparent 47%), var(--paper); }
.login-card { width: min(100%, 1040px); display: grid; grid-template-columns: 49% 51%; overflow: hidden; border-radius: 1.6rem; background: var(--white); border: 1px solid #d3dfd4; box-shadow: 0 22px 70px rgba(33,61,42,.11); }
.login-art { position: relative; isolation: isolate; overflow: hidden; min-height: 530px; background: linear-gradient(152deg,#103e35 4%,#205c4a 45%,#74926a 74%,#d5ba7d); }
.login-art .brand { position: relative; z-index: 2; margin: clamp(1.6rem,4vw,3rem); }
.login-art .brand img { width: 54px; height: 54px; border: 1px solid #ffffff32; }
.login-art .brand > span { font-size: 1.65rem; }
.login-art .brand small { font-size: .85rem; }
.landscape, .range, .road { position: absolute; inset: 0; }
.landscape { top: 20%; overflow: hidden; }
.sun { position: absolute; right: 19%; top: 15%; width: 20%; aspect-ratio: 1; border-radius: 50%; background: linear-gradient(#ffe0a5,#e8af67); box-shadow: 0 0 70px #f9cc7e26; }
.range.far { background: linear-gradient(145deg,#88a181,#56816e); clip-path: polygon(0 55%,8% 48%,14% 50%,24% 41%,32% 45%,47% 26%,55% 34%,64% 30%,71% 39%,82% 32%,92% 43%,100% 38%,100% 100%,0 100%); }
.range.middle { background: linear-gradient(135deg,#526f56,#316653 83%); clip-path: polygon(0 54%,10% 55%,19% 47%,25% 49%,36% 39%,45% 48%,51% 47%,64% 60%,72% 55%,81% 47%,88% 50%,100% 41%,100% 100%,0 100%); }
.range.near { background: linear-gradient(155deg,#36634e,#153e35 92%); clip-path: polygon(0 65%,12% 63%,23% 67%,34% 64%,47% 69%,61% 62%,70% 64%,86% 56%,100% 63%,100% 100%,0 100%); }
.road { background: linear-gradient(20deg,#edcb83,#b3985e 65%); clip-path: polygon(55% 64%,60% 65%,62% 66%,61% 67%,55% 68%,50% 70%,51% 71%,64% 73%,71% 75%,74% 78%,73% 80%,67% 83%,53% 87%,43% 92%,41% 96%,44% 100%,30% 100%,33% 94%,39% 90%,50% 86%,65% 82%,70% 79%,71% 77%,68% 75.5%,62% 74%,50% 72%,48% 70.5%,50% 69%,55% 67.7%,60% 66.8%,61% 66%,59% 65.4%); }
.login-panel { padding: clamp(2rem,4.5vw,4.25rem); display: flex; flex-direction: column; justify-content: center; gap: 1.65rem; }
.login-panel h1 { font-size: clamp(2.25rem,3.4vw,3.1rem); }
.login-panel .fields { grid-template-columns: 1fr; gap: 1.05rem; margin: 0; }
.login-panel .fields button { width: 100%; margin-top: .35rem; }
.field-hint, .section-hint, .muted, .meta { color: var(--muted); font-size: .9rem; }
.field-hint { margin-top: -.72rem; font-size: .81rem; }
.notice { padding: .8rem 1rem; border: 1px solid #eac6ac; border-radius: .65rem; color: #71341f; background: #fff3e9; font-size: .93rem; }

/* Authenticated workspace */
.shell { display: grid; grid-template-columns: 224px minmax(0,1fr); min-height: 100svh; }
.rail { position: sticky; top: 0; align-self: start; display: flex; flex-direction: column; min-height: 100svh; max-height: 100svh; overflow-y: auto; padding: 1.8rem 1rem 1.25rem; color: #fff; background: var(--forest); }
.brand-home { display: inline-flex; padding: .35rem .5rem 1.55rem; text-decoration: none; border-bottom: 1px solid #ffffff24; }
.brand-home:hover { text-decoration: none; }
.navigation { display: grid; gap: .28rem; align-content: start; margin: 1.5rem 0; }
.navigation a { display: flex; align-items: center; gap: .8rem; min-height: 45px; padding: .62rem .85rem; color: #e1eee5; border-radius: .6rem; text-decoration: none; font-size: .95rem; font-weight: 540; }
.navigation a svg { flex: 0 0 auto; }
.navigation a:hover { background: #ffffff13; }
.navigation a[aria-current=page] { color: var(--forest); background: #d2ead9; font-weight: 690; }
.account { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .55rem .7rem; align-items: center; margin-top: auto; padding: 1rem .45rem 0; border-top: 1px solid #ffffff25; }
.avatar { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: #e9c47d; color: #363521; font-weight: 700; }
.account strong, .account small { display: block; line-height: 1.35; overflow-wrap: anywhere; }
.account strong { font-size: .88rem; }.account small { color: #b9d6ca; margin-top: .12rem; font-size: .75rem; }
.account form { grid-column: 1/-1; }
.signout { background: transparent; border: 0; padding: .42rem .55rem; color: #e0eee6; font-size: .86rem; }
.signout:hover { background: #ffffff15; }
.workspace { width: 100%; min-width: 0; max-width: 1480px; margin: 0 auto; padding: clamp(1.5rem, 4vw, 3.9rem); padding-bottom: 5rem; }
.page-heading, .record-heading { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .7rem 1.2rem; }
.page-heading { margin: 0 0 1.8rem; }
.page-heading .action { font-size: .85rem; color: var(--green-dark); background: white; border-color: var(--line); }
.page-heading .action:hover { border-color: #88a898; background: #edf5ee; }
.panel, .metrics > div, .empty { background: white; border: 1px solid var(--line); border-radius: 1rem; box-shadow: var(--shadow); }
.panel { min-width: 0; padding: clamp(1.15rem,2.3vw,2rem); }
.panel + .panel, .panel + .empty, .panel + .pager, .metrics + .panel { margin-top: 1.1rem; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; }
.metrics > div { padding: 1.15rem 1.35rem; }
.metrics dt { display: flex; align-items:center; gap: .65rem; font-size: .89rem; font-weight: 580; color: #475c51; line-height: 1.3; }
.metric-icon { display: inline-grid; flex: 0 0 auto; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: .65rem; }
.metric.amber .metric-icon { color:#845709;background:#f8eac9; }
.metric.mint .metric-icon { color:#1f6b4b;background:#e0f1e3; }
.metric.blue .metric-icon { color:#385b82;background:#e6eef6; }
.metrics dd { margin: .7rem 0 0; font-size: clamp(1.85rem,3vw,2.6rem); font-weight: 650; letter-spacing: -.055em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,190px),1fr)); align-items: end; gap: 1rem; margin-top: 1rem; }
.fields button { justify-self: start; }
.fields .check { min-height: 46px; display: flex; align-items: center; gap: .6rem; }
.fields.danger button { color: #8b3028; background: #fff3ee; border-color: #e4bab3; }
.fields.danger button:hover { background: #fae3dc; }
.section-hint, .case-message, .meta, .muted { margin-top: .6rem; }
.case-message, .timeline p { white-space: pre-wrap; overflow-wrap: anywhere; }
.search { display: flex; align-items: flex-end; gap: .7rem; margin: 1rem 0 0; }
.search label { flex: 1; max-width: 26rem; }
.search label span { display: block; position: relative; }.search label svg { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #5d7166; }
.search input[type=search] { padding-left: 2.45rem; }
.search button { min-height: 46px; }
.table-scroll { overflow-x: auto; margin-top: 1.4rem; }
table { width:100%; border-spacing: 0; border-collapse: collapse; font-size: .91rem; text-align: left; }
th { color: #506257; background: #f1f5ef; font-size: .78rem; font-weight: 650; }
th,td { padding: .8rem .7rem; border-bottom: 1px solid #e3e9e1; vertical-align: middle; }
tbody tr:hover { background: #f8faf5; }
td:not(:first-child) { min-width: 5rem; }.amount { white-space:nowrap; font-variant-numeric:tabular-nums; }
.route { display: inline-grid; position: relative; gap: .15rem; padding-left:1rem; text-decoration:none; overflow-wrap:anywhere; }
.route::before { position:absolute; content:""; left:.18rem; top:.72em; bottom:.7em; border-left:1px solid #91afa0; }
.route span { position:relative; }.route span::before { content:""; position:absolute; left:-1rem; top:.55em; width:.44rem; height:.44rem; border:1.5px solid #48896a; background:white; border-radius:50%; }
.route span:nth-child(2)::before { background:#48896a; border-radius:1px; }
a.route { color:var(--green-dark); font-weight:600; }
.badge { display:inline-flex; align-items:center; line-height:1.3; gap:.38rem; padding:.27rem .58rem; border-radius:2rem; font-size:.77rem; font-weight:650; }
.badge::before { content:""; display:inline-block; flex:0 0 auto; width:.38rem; height:.38rem; border-radius:50%; background:currentColor; }
.gold { color:#77500c; background:#faf0cf; }.green { color:#236344; background:#e5f2e4; }
.blue { color:#365b80; background:#e7eff8; }.red { color:#8c3c31; background:#f9e6dd; }.gray { color:#495b51; background:#edf1eb; }
.empty { padding:1.7rem 1.25rem; text-align:center; }
.panel .empty { margin-top:1.1rem; box-shadow:none; border:1px dashed #c5d4c8; background:#f8faf6; border-radius:.7rem; }
.empty p { margin-top:.25rem; color:var(--muted); font-size:.91rem; }
.facts { display:flex; flex-wrap:wrap; gap:1rem 2.5rem; padding:.95rem 0; }
.facts dt { font-size:.78rem; color:var(--muted); }.facts dd { font-weight:610; margin:.15rem 0 0; }
.facts + .fields, .documents + .fields, .muted + .fields, .notes + .fields { border-top:1px solid var(--line); padding-top:1rem; }
.documents { display:flex; flex-wrap:wrap; list-style:none; gap:.55rem; padding:0; margin:.45rem 0; }
.documents a { display:inline-flex; gap:.6rem; align-items:center; min-height:44px; padding:.45rem .65rem; border:1px solid var(--line); border-radius:.5rem; font-size:.88rem; }
.documents small { color:var(--muted); }
.notes { margin:1rem 0; }.notes summary { cursor:pointer; color:var(--green-dark); font-weight:620; padding:.45rem 0; }
.timeline { list-style:none; margin-top:1.2rem; padding:0; }
.timeline li { position:relative; padding:0 0 1.1rem 1.4rem; border-left:1px solid #b5cbb9; margin-left:.2rem; }
.timeline li:last-child { border-left-color:transparent; padding-bottom:0; }
.timeline li::before { content:""; position:absolute; top:.38rem; left:-.25rem; width:.45rem; height:.45rem; border-radius:50%; background:var(--green); }
.timeline strong,.timeline small { display:block; }.timeline small { color:var(--muted); }.timeline p { font-size:.91rem; }
.pager { display:flex; align-items:center; flex-wrap:wrap; gap:1rem; margin-top:1rem; font-size:.88rem; }
.pager a { padding:.55rem .75rem; border:1px solid var(--line); background:white; border-radius:.5rem; }
@media(max-width: 1000px) {
  .shell { grid-template-columns:190px minmax(0,1fr); }.rail { padding-inline:.7rem; }
  .workspace { padding:1.6rem; }.metrics { gap:.65rem; }.metrics > div { padding:1rem; }
  .metrics dt { flex-wrap:wrap; }.login-card { grid-template-columns:44% 56%; }
}
@media(max-width: 760px) {
  .shell { display:block; }.rail { position:static; min-height:0; max-height:none; padding:.85rem 1rem; display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:.75rem; overflow:visible; }
  .brand-home { border:0; padding:0; }.brand img { width:37px; height:37px; }.brand > span { font-size:1.1rem; }.brand small { font-size:.66rem; }
  .navigation { grid-column:1/-1; grid-row:2; display:flex; flex-wrap:wrap; gap:.16rem; margin:0; border-top:1px solid #ffffff20; padding-top:.5rem; }
  .navigation a { font-size:.82rem; min-height:44px; padding:.45rem .6rem; gap:.4rem; }.navigation svg { width:17px; height:17px; }
  .account { grid-row:1; grid-column:2; display:block; margin:0; border:0; padding:0; }
  .account > span,.account > div { display:none; }.signout { font-size:.8rem; }
  .workspace { padding:1.6rem 1rem 3rem; }.page-heading { margin-bottom:1.2rem; }.metrics { gap:.5rem; }
  .metrics dt { gap:.4rem; font-size:.77rem; }.metrics > div { padding:.8rem; }.metrics dd { font-size:1.85rem; }
  .login { padding:1rem; }.login-card { max-width:500px; grid-template-columns:1fr; }
  .login-art { min-height:145px; }.login-art .brand { margin:1.5rem; }.login-art .brand img { width:45px; height:45px; }
  .login-art .brand > span { font-size:1.35rem; }.login-art .brand small { font-size:.73rem; }
  .landscape { top:0; left:23%; }.sun { width:12%; top:9%; }.login-panel { padding:1.65rem; gap:1.15rem; }
}
@media(max-width: 480px) {
  .login { padding:.7rem; }.login-card { border-radius:1rem; }.login-art { min-height:108px; }.login-panel { padding:1.45rem 1.2rem; }
  .login-panel h1 { font-size:2.05rem; }.navigation a { flex:1 1 30%; justify-content:flex-start; padding:.35rem .5rem; }
  .metrics { grid-template-columns:1fr; }.metrics > div { display:flex; align-items:center; justify-content:space-between; min-height:52px; padding:.5rem .75rem; border-radius:.68rem; }
  .metrics dt { flex-wrap:nowrap; font-size:.86rem; gap:.65rem; }.metric-icon { width:1.9rem; height:1.9rem; }
  .metrics dd { margin:0; font-size:1.55rem; }.panel { padding:1rem; }
  .search { gap:.45rem; }.search button { padding-inline:.75rem; }
  .table-scroll th, .table-scroll td { padding:.6rem .45rem; }
  .facts { flex-direction:column; gap:.5rem; }.facts div { display:flex; gap:1rem; justify-content:space-between; }.facts dd { text-align:right; margin:0; }
}
@media print {
  .rail,.skip,.search,.fields,.pager,.page-heading .action { display:none; }.shell { display:block; }.workspace { padding:0; }
  .panel,.metrics > div { box-shadow:none; break-inside:avoid; }.table-scroll { overflow:visible; }
}

/* Operations overview and service controls */
.work-grid,.grant-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,210px),1fr)); gap:.7rem; }
.work-link { display:flex; align-items:center; gap:.7rem; padding:.85rem; border:1px solid var(--line); border-radius:.65rem; color:var(--forest); text-decoration:none; }
.work-link:hover { background:#eff6ef; border-color:#86a69c; }
.work-link span { margin-left:auto; }
.switch-row { display:grid; grid-template-columns:minmax(0,1fr) auto minmax(10rem,auto); align-items:center; gap:1rem; padding:.9rem 0; }
.switch-row + .switch-row { border-top:1px solid var(--line); }
.switch-row p { font-size:.88rem; color:var(--muted); }
.switch-action { display:block; margin:0; }
.switch-action button { width:100%; background:#eef4ee; color:var(--forest); border:1px solid #c9d8cd; }
.grant-box { min-width:0; grid-column:1/-1; border:1px solid var(--line); border-radius:.7rem; padding:1rem; }
.grant-box legend { padding:0 .45rem; font-weight:650; }.grant-grid { margin-top:.8rem; }
.feedback { padding:.8rem 1rem; border-left:3px solid var(--green); background:#e6f2ea; }
.filter-tabs { display:flex; flex-wrap:wrap; gap:.4rem; margin-bottom:1rem; }
.filter-tabs a { display:inline-flex; align-items:center; gap:.5rem; min-height:44px; padding:.4rem .85rem; border:1px solid var(--line); border-radius:.55rem; background:white; text-decoration:none; }
.filter-tabs a[aria-current=page] { color:white; background:var(--forest); border-color:var(--forest); }
.activity-link { display:inline-block; margin-top:1rem; }
.vehicle-rate { padding-block:1rem; }
.vehicle-rate + .vehicle-rate { border-top:1px solid var(--line); }
.vehicle-rate h3 { margin:0; }
.zone-form .map-workbench {grid-column:1/-1;min-width:0}
.zone-form [hidden] {display:none}
.map-workbench iframe {display:block;width:100%;height:clamp(330px,55vh,620px);margin:.6rem 0;border:1px solid var(--line);border-radius:.6rem}
.map-tools {display:flex;flex-wrap:wrap;align-items:end;gap:.6rem}
.map-tools button {background:var(--white);color:var(--forest);border:1px solid var(--line)}
.map-tools button:disabled,.zone-form button:disabled {opacity:.55;cursor:default}
.permission-summary summary { cursor:pointer; color:var(--green-dark); font-weight:650; }
.permission-summary ul { padding:.4rem 0 0 1.2rem; }
.metrics:has(> :nth-child(4)) { grid-template-columns:repeat(4,minmax(0,1fr)); }
@media(max-width:1000px){.metrics:has(> :nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:600px){.switch-row{grid-template-columns:minmax(0,1fr) auto;gap:.4rem;}.switch-action{grid-column:1/-1;}.navigation{flex-wrap:nowrap;overflow-x:auto;}.navigation a{flex-shrink:0;}}

.nav-group { margin:.65rem .7rem .15rem; color:#a8c5b8; font-size:.72rem; font-weight:650; letter-spacing:.07em; text-transform:uppercase; }
@media(max-width:720px){.navigation .nav-group{display:none;}}
