:root{font-family:system-ui,sans-serif;color:#183044;background:#f1f5f7}*{box-sizing:border-box}body{margin:0}header{display:flex;align-items:center;gap:24px;background:#132c40;color:white;padding:18px 28px}header strong{font-size:24px}header button{margin-left:auto}main{padding:20px}h1{font-size:24px}label{display:block;margin:12px 0;font-size:14px}input,select,button{font:inherit;border:1px solid #b2c5cf;border-radius:7px;padding:10px;width:100%;margin-top:5px}button{background:#126b66;color:white;cursor:pointer}header button{width:auto}button:disabled{opacity:.5;cursor:wait}#login{max-width:420px;margin:10vh auto;padding:30px;background:white;border-radius:14px}#dashboard{display:grid;grid-template-columns:340px 1fr;gap:20px}#dashboard[hidden],#login[hidden]{display:none}aside{max-height:80vh;overflow:auto;background:white;padding:20px;border-radius:12px}#map{height:80vh;min-height:420px;border-radius:12px}#message{white-space:pre-line}article{border-bottom:1px solid #d9e4ea;padding:14px 0}article small{display:block}details{margin-top:20px}p{font-size:14px;line-height:1.5}@media(max-width:760px){#dashboard{grid-template-columns:1fr}#map{height:60vh}aside{max-height:none}}
:where([hidden]){display:none!important}
header nav{display:flex;gap:6px;flex-wrap:wrap;margin-left:auto}
header nav a{color:#deebef;text-decoration:none;padding:9px 12px;border-radius:7px}
header nav>a:hover,header nav>a[aria-current=page]{background:#28566b;color:white}
.nav-dropdown{position:relative;margin:0}
.nav-dropdown summary{list-style:none;cursor:pointer;color:#deebef;padding:9px 12px;border-radius:7px}
.nav-dropdown summary::-webkit-details-marker{display:none}
.nav-dropdown summary::after{content:' ▾'}
.nav-dropdown summary:hover,.nav-dropdown summary.active,.nav-dropdown[open] summary{background:#28566b;color:white}
.nav-dropdown-list{position:absolute;right:0;top:calc(100% + 8px);z-index:1000;min-width:190px;padding:7px;background:white;border:1px solid #d9e4ea;border-radius:9px;box-shadow:0 12px 30px #132c4055}
.nav-dropdown-list a{display:block;color:#183044;white-space:nowrap}
.nav-dropdown-list a:hover,.nav-dropdown-list a[aria-current=page]{background:#dcece9;color:#125a56}
header #logout{margin-left:0}
.management{display:grid;grid-template-columns:minmax(280px,380px) minmax(0,1fr);gap:20px;align-items:start}
.panel{background:white;padding:22px;border-radius:12px;min-width:0}
.panel h2{margin-top:0;font-size:19px}
.fields{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}
.actions button{width:auto;margin:0}
.secondary{background:white;color:#126b66;border-color:#126b66}
.danger{background:#a62929;border-color:#a62929}
.panel article{overflow-wrap:anywhere}
.panel article strong{display:block}
.panel article small{white-space:pre-line;color:#526674;margin-top:4px}
@media(max-width:800px){header{flex-wrap:wrap}header nav{order:3;width:100%;margin-left:0}.management{grid-template-columns:1fr}}
#client-map-dialog{width:min(760px,92vw);max-width:92vw;border:0;border-radius:12px;padding:20px;box-shadow:0 18px 50px #132c4055;color:#183044}
#client-map-dialog::backdrop{background:#102b3c99}
.dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.dialog-heading h2{margin:0;font-size:20px}
.dialog-heading button{width:auto;margin:0}
#client-map{height:min(60vh,460px);min-height:300px;width:100%;border-radius:8px}
textarea{font:inherit;border:1px solid #b2c5cf;border-radius:7px;padding:10px;width:100%;margin-top:5px;resize:vertical}
.visit-description{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0}
.report-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr)) auto;gap:12px;align-items:end;margin-bottom:20px}
.report-filters label{margin:0}
.report-filters button{margin:0}
.report-table-wrap{overflow-x:auto}
.report-table-wrap table{width:100%;border-collapse:collapse}
.report-table-wrap th,.report-table-wrap td{text-align:left;vertical-align:top;padding:12px;border-bottom:1px solid #d9e4ea}
.report-table-wrap th{white-space:nowrap}
.report-table-wrap td:last-child{white-space:pre-wrap;overflow-wrap:anywhere;min-width:220px}
.report-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.report-heading h2{margin:0}
.report-heading .actions{margin:0}
@media(max-width:900px){.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.report-filters button{grid-column:1/-1}}
.route-direction{display:grid;place-items:center;border:2px solid white;border-radius:50%;background:#126b66;color:white;box-shadow:0 1px 5px #132c4088;pointer-events:none}
.route-direction span{display:block;font-size:16px;line-height:1}
.visit-number{display:grid;place-items:center;border:2px solid white;border-radius:50%;background:#d65b2d;color:white;box-shadow:0 2px 7px #132c4088;font-weight:700;text-align:center}
.visit-number span{line-height:28px}
header .brand{display:flex;align-items:center;gap:10px;white-space:nowrap}
header .brand-icon{display:block;width:42px;height:42px;flex:none}
