:root {
  --bg:#f6f7f9; --paper:#fff; --ink:#1c2d45; --muted:#637087;
  --line:#dfe5ee; --blue:#2459c4; --blue-soft:#edf3ff;
  --green:#18734f; --green-soft:#eaf6ef; --amber:#fff6df; --radius:16px;
}
* { box-sizing:border-box; }
html { scroll-padding-top:22px; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.5 'Segoe UI',Arial,sans-serif; }
a { color:var(--blue); text-underline-offset:4px; }
button,a,summary { -webkit-tap-highlight-color:transparent; }
button:focus-visible,a:focus-visible,summary:focus-visible { outline:3px solid #4379e0; outline-offset:3px; }
button,.button { min-height:46px; display:inline-flex; justify-content:center; align-items:center; gap:14px; padding:11px 18px; border:1px solid var(--blue); border-radius:9px; background:var(--blue); color:#fff; font:600 14px/1.4 'Segoe UI',Arial,sans-serif; text-decoration:none; cursor:pointer; }
button:hover,.button:hover { background:#1948a9; }
button.secondary,.button.secondary { color:var(--ink); background:var(--paper); border-color:#ccd6e5; }
button.secondary:hover,.button.secondary:hover { background:var(--blue-soft); border-color:#9cb9ee; }
button:disabled { background:#e4e9f1; color:#66758d; border-color:#d8e0eb; cursor:default; }
button.compact { min-height:36px; padding:6px 12px; font-size:12px; }
.full-width { width:100%; }
h1,h2,h3,p { margin:0; }
h1 { font-size:36px; line-height:1.15; letter-spacing:-1px; font-weight:700; }
h2 { font-size:23px; line-height:1.3; letter-spacing:-.35px; }
h3 { font-size:16px; line-height:1.4; }
p { max-width:80ch; }
.small { font-size:12px; }
.muted { color:var(--muted); }
.site-header { height:88px; background:var(--paper); border-bottom:1px solid var(--line); padding:0 40px; display:flex; align-items:center; justify-content:space-between; gap:20px; }
.brand { display:flex; gap:11px; align-items:center; color:var(--ink); font-size:23px; line-height:1.2; font-weight:750; text-decoration:none; }
.brand small { display:block; color:var(--muted); font-size:11px; line-height:1.6; font-weight:500; }
.brand-symbol { display:flex; align-items:center; justify-content:center; width:40px; height:43px; border-radius:11px 11px 11px 2px; background:var(--blue); color:white; font-size:37px; font-weight:800; padding-bottom:3px; }
.site-header nav { display:flex; align-items:center; gap:24px; }
.client-switch { display:flex; align-items:center; gap:28px; padding:9px 14px; border:1px solid var(--line); border-radius:8px; color:var(--ink); font-weight:600; text-decoration:none; }
.environment { display:flex; align-items:center; gap:7px; font-size:12px; color:var(--muted); }
i { display:inline-block; width:9px; height:9px; border-radius:50%; flex-shrink:0; }
.environment i { background:#66a183; width:7px; height:7px; }
main { max-width:1520px; margin:auto; padding:32px 40px 50px; }
footer { max-width:1520px; margin:auto; display:flex; justify-content:space-between; gap:20px; padding:0 40px 26px; font-size:11px; color:var(--muted); }
.pill,.badge { display:inline-flex; align-items:center; gap:5px; border-radius:6px; padding:4px 8px; background:#eef2f7; color:#596a82; font-size:11px; font-weight:600; }
.pill.green,.badge.safe { background:var(--green-soft); color:var(--green); }
.pill.amber,.badge.warning { background:#fff3d8; color:#8b5815; }
.badge.danger { background:#fcedeb; color:#a33e38; }
.badge.neutral { color:#67758a; background:#eef2f6; }
.eyebrow { font-size:13px; font-weight:600; color:var(--blue); margin-bottom:10px; }
.page-intro { padding:30px 0 34px; }
.page-intro h1 { margin-bottom:15px; }
.page-intro>p:last-child { color:var(--muted); }
.login-layout { display:grid; grid-template-columns:1.25fr 1fr; gap:80px; align-items:center; max-width:1120px; margin:62px auto 50px; }
.login-story h1 { font-size:60px; line-height:1.05; letter-spacing:-2px; margin:24px 0; }
.login-story>p { color:var(--muted); font-size:18px; max-width:37ch; }
.login-story>.pill { background:#e8effe; color:var(--blue); }
.login-card { background:var(--paper); border:1px solid var(--line); border-radius:20px; padding:38px; box-shadow:0 18px 48px #29486a09; }
.icon-tile { display:flex; align-items:center; justify-content:center; width:48px; height:48px; border-radius:14px; background:var(--blue-soft); color:var(--blue); font-size:26px; }
.login-card h2 { margin:25px 0 12px; font-size:25px; }
.login-card>p { color:var(--muted); margin-bottom:26px; }
.login-card .full-width { margin-top:10px; }
.login-note { display:flex; align-items:center; gap:12px; color:var(--muted); font-size:12px; padding-top:23px; margin-top:25px; border-top:1px solid var(--line); }
.login-note i { background:#d0a553; }
.route-illustration { height:160px; margin-top:36px; position:relative; max-width:425px; }
.illustration-line { position:absolute; border:2px dashed #b9cdec; border-radius:0 45px 45px 45px; width:75%; height:67px; top:20px; left:27px; transform:rotate(-8deg); }
.illustration-stop { position:absolute; width:39px; height:39px; background:var(--blue); color:white; border:5px solid var(--bg); border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; }
.illustration-stop.one { top:28px; left:10px; }.illustration-stop.two { top:60px; left:46%; background:#158367; }.illustration-stop.three { top:0; right:10%; background:#7d65b4; }
.illustration-caption { position:absolute; bottom:5px; left:5px; display:flex; gap:14px; color:var(--muted); font-size:12px; }
.illustration-caption span { color:#8ca8d1; }
.client-grid { display:grid; grid-template-columns:1fr 1fr; gap:24px; max-width:1100px; padding-top:5px; }
.client-card { display:block; margin:0; padding:30px; background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); color:var(--ink); text-decoration:none; }
a.client-card { border-top:4px solid var(--blue); }
a.client-card:hover { border-color:#91b0e6; }
.client-top { display:flex; justify-content:space-between; align-items:center; }
.client-monogram { font-size:31px; font-weight:750; width:56px; height:56px; background:#eef4fb; border-radius:14px; display:grid; place-items:center; }
.client-card h2 { margin:25px 0 10px; font-size:27px; }
.client-card>p { color:var(--muted); }
.client-meta { display:flex; flex-wrap:wrap; gap:20px; font-size:12px; color:var(--muted); margin-top:25px; }
.client-card strong { display:flex; justify-content:space-between; margin-top:34px; padding-top:19px; border-top:1px solid var(--line); color:var(--blue); font-size:14px; }
.future { background:transparent; border-style:dashed; padding-top:39px; }
.future-icon { color:#8e9bb0; font-size:30px; }
.future>.muted { display:block; font-size:12px; margin-top:58px; }
.dashboard-intro { display:flex; justify-content:space-between; align-items:center; gap:24px; }
.dashboard-intro h1 { margin:0 0 11px; }
.dashboard-intro>div>p:last-child { display:flex; gap:15px; flex-wrap:wrap; align-items:center; color:var(--muted); font-size:14px; }
.count { min-width:23px; height:23px; border-radius:6px; background:var(--blue-soft); color:var(--blue); display:grid; place-items:center; font-size:12px; }
.section-nav { display:flex; flex-wrap:wrap; gap:26px; border-bottom:1px solid var(--line); margin:27px 0 25px; }
.section-nav a { text-decoration:none; font-size:14px; color:var(--muted); padding:12px 1px; border-bottom:3px solid transparent; }
.section-nav a.active { color:var(--blue); border-bottom-color:var(--blue); font-weight:700; }
.notice { display:flex; align-items:center; gap:14px; background:var(--amber); border:1px solid #efdbad; border-radius:10px; padding:16px 20px; margin-bottom:22px; font-size:13px; color:#78551d; }
.notice p { margin-top:6px; }
.notice>a { margin-left:auto; white-space:nowrap; color:inherit; font-weight:600; }
.notice.success { background:var(--green-soft); border-color:#c3dfce; color:var(--green); }
.notice.success>span { font-size:22px; }
.section-title { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:20px; }
.section-title p { color:var(--muted); margin-top:6px; font-size:13px; }
.daily-counts { display:flex; gap:25px; color:var(--muted); font-size:13px; }
.daily-counts b { font-size:22px; color:var(--ink); margin-right:4px; }
.planning-layout { display:grid; grid-template-columns:minmax(0,1fr) 345px; gap:20px; align-items:stretch; }
.map-panel { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:17px 18px 12px; min-width:0; }
.map-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:12px; }
.map-heading h3 { font-size:15px; }
#map { height:490px; width:100%; background:#e6edf1; border-radius:9px; z-index:0; }
.map-foot { display:flex; justify-content:space-between; flex-wrap:wrap; gap:6px; padding:11px 0; font-size:10px; color:var(--muted); }
.legend { display:flex; flex-wrap:wrap; gap:5px 7px; padding-top:10px; border-top:1px solid var(--line); }
button.legend-tech { color:var(--muted); border:0; background:none; padding:4px 6px; min-height:32px; font-weight:500; font-size:10px; gap:6px; border-radius:5px; }
button.legend-tech:hover { background:var(--blue-soft); color:var(--blue); }
.map-note { color:var(--muted); font-size:10px; padding-top:9px; }
.team-panel { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius); padding:18px 12px 12px; min-width:0; display:flex; flex-direction:column; }
.team-heading { padding:0 6px 14px; }
.team-heading h3 { font-size:16px; }
.team-heading p { font-size:12px; color:var(--muted); margin-top:3px; }
.routes { height:642px; overflow-y:auto; scrollbar-width:thin; padding:0 4px 2px; }
details>summary { cursor:pointer; list-style:none; }
details>summary::-webkit-details-marker { display:none; }
.route { border:1px solid var(--line); border-radius:10px; margin-bottom:9px; overflow:hidden; border-left:3px solid var(--tech-color); }
.route>summary { padding:14px 11px; }
.route>summary:hover { background:#f8faff; }
.tech-summary-top { display:flex; align-items:center; gap:8px; }
.tech-summary-top i { background:var(--tech-color); width:8px; height:8px; }
.tech-summary-top b { font-size:14px; }
.visits-count { font-size:11px; color:var(--muted); margin-left:auto; white-space:nowrap; }
.expand-sign { display:inline-flex; align-items:center; justify-content:center; min-width:18px; color:#7b8da7; font-size:18px; }
.expand-sign:after { content:'+'; }
details[open]>summary .expand-sign:after { content:'−'; }
.work-zone { color:var(--muted); font-size:11px; margin:6px 0 9px; }
.sla-badges { display:flex; flex-wrap:wrap; gap:5px; }
.sla-badges .badge { font-size:10px; padding:3px 6px; }
.tech-note { margin:8px 11px; padding:10px; background:#fff8e8; border-radius:6px; color:#78551d; font-size:11px; }
.route-visits { padding:0 11px; }
.visit { padding:18px 0; border-top:1px solid var(--line); }
.visit-heading { display:flex; align-items:center; gap:10px; }
.visit-number { display:grid; place-items:center; background:var(--tech-color); color:white; width:28px; height:28px; border-radius:50%; font-size:12px; font-weight:700; flex-shrink:0; }
.visit-heading b { font-size:13px; }
.visit-heading p { font-size:11px; color:var(--muted); margin-top:3px; }
.visit-tags { display:flex; flex-wrap:wrap; gap:5px; margin:12px 0; }
.visit-tags .pill,.visit-tags .badge { font-size:10px; }
.reason { color:#51647f; font-size:12px; line-height:1.6; }
.reason>span { color:var(--blue); }
.actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:14px; }
.actions form { width:100%; margin:0; }
.actions button { width:100%; min-height:44px; font-size:12px; padding:9px 11px; }
.decision-status { width:100%; display:flex; flex-direction:column; gap:5px; color:var(--green); font-size:12px; }
.decision-status>span { color:#8a5d22; font-size:11px; }
.decision-status.postponed { color:#8a5d22; }
.source-note { display:flex; align-items:center; gap:10px; padding:14px 0 8px; color:var(--muted); font-size:11px; }
.source-note>span { font-size:17px; }
.rules { margin:8px 0 0; border-top:1px solid var(--line); font-size:12px; color:var(--muted); }
.rules summary { padding:11px 0; text-decoration:underline; text-underline-offset:4px; }
.rules>div { padding:5px 0 15px; }
.rules p { margin-bottom:8px; }
.week-section { margin-top:32px; padding-top:28px; border-top:1px solid var(--line); }
.week-grid { display:grid; gap:12px; }
.day { background:var(--paper); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
.day>summary { padding:17px 20px; display:flex; align-items:center; gap:18px; }
.day>summary:hover { background:#fafcff; }
.calendar-day { font-size:23px; font-weight:650; width:46px; height:48px; border-radius:9px; display:grid; place-items:center; background:#f0f4fa; }
.day>summary h3 { font-size:15px; }
.day>summary div>span { font-size:11px; color:var(--muted); }
.day-count { color:var(--muted); font-size:12px; margin-left:auto; }
.week-visits { padding:0 20px 15px; display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:start; }
.week-tech { border:1px solid var(--line); border-radius:9px; }
.week-tech>summary { display:flex; gap:10px; padding:12px; font-size:12px; align-items:center; }
.week-tech>summary>span:first-of-type { margin-left:auto; color:var(--muted); font-size:11px; }
.week-tech>div { padding:0 14px; }
.week-section>.small { margin-top:14px; }
.decisions-banner { background:var(--paper); border:1px solid var(--line); border-radius:14px; padding:24px; margin-top:32px; display:flex; align-items:center; gap:18px; }
.decisions-banner h2 { font-size:19px; }
.decisions-banner p { color:var(--muted); font-size:13px; margin-top:5px; }
.decisions-banner>.button { margin-left:auto; white-space:nowrap; }
.chat { display:grid; grid-template-columns:1fr 1fr; gap:60px; margin-top:28px; padding:30px; background:#edf2fa; border:1px solid #dae4f3; border-radius:14px; }
.chat h2 { font-size:26px; margin:14px 0 8px; }
.chat-description>p:last-child { font-size:13px; margin-top:10px; }
.chat-compose label { display:block; font-size:13px; font-weight:600; margin-bottom:10px; }
textarea { display:block; width:100%; height:76px; border:1px solid #d4ddea; border-radius:8px; background:#f9fbff; color:var(--muted); font:13px 'Segoe UI',Arial,sans-serif; padding:13px; resize:none; margin-bottom:10px; }
.chat-compose>.small { display:block; margin-top:10px; }
.back-link { display:inline-block; font-size:13px; text-decoration:none; }
.history-intro { padding:25px 0; }
.manual-notice { padding:22px; font-size:14px; align-items:start; }
.notice-icon { display:grid; place-items:center; font-size:20px; font-weight:750; width:32px; height:32px; flex-shrink:0; background:#f5e5b9; border-radius:50%; }
.decision-tabs { display:flex; gap:8px; margin:28px 0; background:#e9eef6; padding:5px; border-radius:10px; width:fit-content; }
.decision-tabs a { display:flex; gap:12px; align-items:center; padding:10px 18px; border-radius:7px; font-size:14px; color:var(--muted); text-decoration:none; }
.decision-tabs a.selected { background:white; color:var(--blue); box-shadow:0 1px 4px #2c446215; font-weight:600; }
.decision-tabs span { font-size:11px; background:#e9eef7; padding:1px 7px; border-radius:5px; }
.history-list { display:grid; gap:14px; }
.history-card { border:1px solid var(--line); background:var(--paper); border-radius:14px; padding:23px; }
.history-card-heading { display:flex; align-items:center; gap:13px; }
.history-card-heading p { color:var(--muted); font-size:12px; margin-top:3px; }
.history-card-heading>.pill { margin-left:auto; }
.decision-icon { display:grid; place-items:center; width:39px; height:39px; border-radius:10px; background:var(--green-soft); color:var(--green); font-size:20px; flex-shrink:0; }
.decision-icon.postponed { background:var(--amber); color:#8b5815; }
.history-facts { display:grid; grid-template-columns:1fr 1.3fr 1.3fr 1.2fr; gap:20px; padding:19px 0; margin:20px 0 12px; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.history-facts dt { font-size:11px; color:var(--muted); margin-bottom:5px; }
.history-facts dd { margin:0; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.history-facts small { display:block; font-size:11px; color:var(--muted); font-weight:400; margin-top:3px; }
.history-next { font-size:12px; margin-top:10px; color:#8a5d22; }
.empty-state { padding:45px; border:1px dashed #cad5e5; border-radius:14px; text-align:center; background:white; }
.empty-state>.icon-tile { margin:0 auto 20px; }.empty-state p { margin:12px auto 25px; color:var(--muted); max-width:52ch; }
.visit-marker { background:none; border:0; }
.visit-marker span { display:flex; align-items:center; justify-content:center; border:2px solid white; color:white; width:28px; height:28px; border-radius:50%; font-size:12px; font-weight:750; box-shadow:0 1px 5px #0005; }
.leaflet-popup-content { font:13px/1.5 'Segoe UI',Arial,sans-serif; }
.leaflet-popup-content p { margin:8px 0; }
@media(min-width:1600px) { #map { height:540px; }.routes { height:692px; } }
@media(max-width:1100px) { main { padding:28px; }.site-header { padding:0 28px; }.planning-layout { grid-template-columns:minmax(0,1fr) 310px;gap:14px; } #map { height:460px; }.routes { height:665px; }.week-visits { grid-template-columns:repeat(2,minmax(0,1fr)); }.login-layout { gap:35px; margin-top:35px; }.login-story h1 { font-size:49px; } }
@media(max-width:800px) {
  .site-header { padding:0 18px; height:76px; }.brand { font-size:20px; }.brand-symbol { width:34px; height:37px; font-size:32px; }.brand small { font-size:9px; }.site-header nav { gap:10px; }.environment { font-size:10px; }.client-switch { font-size:12px; padding:8px 10px; gap:10px; }
  main { padding:25px 18px 35px; } h1 { font-size:29px; } h2 { font-size:21px; } footer { padding:0 18px 22px; font-size:10px; flex-direction:column; gap:5px; }
  .planning-layout { grid-template-columns:1fr; }.routes { height:auto; max-height:none; padding:0 3px; }.team-panel { padding:18px 12px 10px; }.team-heading p { font-size:13px; }.route>summary { padding:16px 14px; }.work-zone { font-size:12px; }.tech-summary-top b { font-size:15px; }.visits-count { font-size:12px; }.sla-badges .badge { font-size:10px; }.route-visits { padding:0 15px; }.visit-heading b { font-size:15px; }.visit-heading p,.reason { font-size:13px; }.actions button { font-size:14px; min-height:48px; }
  #map { height:440px; }.map-panel { padding:15px 12px 12px; }.map-heading h3 { font-size:14px; }.legend { gap:3px; }.legend button { font-size:10px; min-height:36px; padding:5px; }
  .dashboard-intro { align-items:start; }.dashboard-intro>.button { font-size:12px; padding:10px; min-height:42px; white-space:nowrap; }.dashboard-intro .eyebrow { font-size:12px; }.dashboard-intro>div>p:last-child { font-size:12px; }.dashboard-intro .count { display:none; }.section-nav { gap:18px; margin:21px 0; }.section-nav a { font-size:12px; padding-bottom:10px; }
  .daily-counts { gap:12px; font-size:11px; }.daily-counts b { font-size:19px; }.section-title { align-items:start; gap:12px; }.section-title p { font-size:12px; }.notice { flex-wrap:wrap; padding:15px; }.notice>a { margin-left:0; }.daily-counts span { white-space:nowrap; }
  .week-visits { grid-template-columns:1fr; padding:0 12px 12px; }.day>summary { padding:15px 12px; gap:10px; }.calendar-day { width:39px; height:43px; font-size:21px; }.day-count { font-size:11px; }.day>summary div>span { font-size:10px; }
  .decisions-banner { flex-wrap:wrap; padding:20px; }.decisions-banner>.icon-tile { display:none; }.decisions-banner>.button { margin:0; width:100%; }.chat { grid-template-columns:1fr; gap:24px; padding:23px; }.chat-compose button { width:100%; }
  .client-grid { grid-template-columns:1fr; }.client-card { padding:25px; }.future>.muted { margin-top:25px; }.login-layout { grid-template-columns:1fr; gap:30px; margin:10px auto; }.login-story h1 { font-size:44px; }.login-story>p { font-size:16px; }.login-card { padding:28px; }.route-illustration { display:none; }.login-story h1 br:last-child { display:none; }
  .history-facts { grid-template-columns:1fr 1fr; gap:18px 14px; }.history-card { padding:19px; }.history-card-heading { flex-wrap:wrap; }.history-card-heading>.pill { margin-left:0; }.history-facts dd { font-size:12px; }.history-card h3 { font-size:17px; }.history-intro { padding-top:22px; }.decision-tabs { width:100%; }.decision-tabs a { flex:1; justify-content:center; padding:10px 12px; }.manual-notice { gap:10px; font-size:13px; }.empty-state { padding:30px 20px; }
}
@media(max-width:460px) { .site-header .environment { display:none; }.dashboard-intro { display:block; }.dashboard-intro>.button { margin-top:17px; }.section-title .daily-counts { flex-direction:column; gap:0; }.section-title h2 { font-size:20px; }#map { height:420px; }.map-foot { font-size:9px; }.section-nav { gap:17px; }.section-nav a { font-size:11px; }.history-card-heading>.pill { margin-left:52px; } }
@media(prefers-reduced-motion:reduce) { * { scroll-behavior:auto!important; } }

.admin-users { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,340px),1fr)); gap:24px; }
.admin-user { min-width:0; }
.admin-user p, .admin-user h2, .admin-user button { overflow-wrap:anywhere; }
.admin-user fieldset { border:1px solid #dbe2ea; border-radius:12px; margin:20px 0; padding:16px; }
.admin-option { display:flex; align-items:center; gap:12px; min-height:44px; }
.admin-option input { width:20px; height:20px; flex-shrink:0; }
.admin-user button { max-width:100%; min-height:44px; }
