@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');
:root{--blue:#2163a7;--blue-dark:#164c85;--green:#37855a;--green-light:#e7f3eb;--burgundy:#8b2343;--ink:#1a2535;--muted:#718096;--line:#e5eaf0;--paper:#fff;--bg:#f5f7fa;--shadow:0 12px 32px rgba(22,48,78,.07)}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font:15px 'DM Sans',Arial,sans-serif}h1,h2,b,strong{font-family:Manrope,'DM Sans',sans-serif}h1{font-size:32px;letter-spacing:-.8px;margin:4px 0 8px}h2{font-size:18px;margin:0}p{line-height:1.55}.muted{color:var(--muted)}.small{font-size:12px}.eyebrow{font-size:10px;letter-spacing:1.6px;color:var(--blue);font-weight:700;margin:0 0 5px}.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 max(28px,calc((100vw - 1220px)/2));position:sticky;top:0;z-index:800}.brand{display:flex;align-items:center;gap:13px;text-decoration:none;color:var(--ink);font:700 16px Manrope}.brand img{width:116px;height:52px;object-fit:contain}.brand small,.mobile-header small{display:block;color:var(--muted);font:500 11px 'DM Sans';margin-top:3px}.top-actions{display:flex;align-items:center;gap:12px}.desktop-label{font-size:13px;color:#58677a;margin-right:12px}.button{border:0;border-radius:9px;padding:11px 16px;font:700 13px 'DM Sans';text-decoration:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;cursor:pointer;transition:.18s ease}.button:hover{transform:translateY(-1px);filter:brightness(.98)}.button:disabled{opacity:.65;cursor:wait}.button.primary{background:var(--blue);color:#fff;box-shadow:0 4px 10px rgba(33,99,167,.16)}.button.primary:hover{background:var(--blue-dark)}.button.secondary{background:#eaf1f8;color:var(--blue)}.button.light{background:#f0f4f8;color:#34445a}.button.outline{border:1px solid var(--line);background:white;color:#556477}.full{width:100%;padding:14px}.admin-wrap{max-width:1220px;margin:28px auto 60px;padding:0 24px}.admin-nav{display:flex;gap:7px;overflow-x:auto;padding:7px;background:#eaf0f5;border-radius:12px;margin-bottom:25px}.admin-nav a{white-space:nowrap;text-decoration:none;color:#56677a;border-radius:8px;padding:10px 13px;font-size:12px;font-weight:700}.admin-nav a.active{background:#fff;color:var(--blue);box-shadow:0 2px 7px #1f3a5510}.page-heading{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:24px}.page-heading .muted{margin:0}.date-pill{border:1px solid var(--line);background:white;padding:9px 13px;border-radius:999px;color:#5b6a7a;font-size:12px}.dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--green);margin-right:6px}.admin-grid{display:grid;grid-template-columns:1.05fr .95fr;gap:18px}.card{background:var(--paper);border:1px solid #edf0f4;border-radius:15px;padding:23px;box-shadow:var(--shadow)}.daily-card{border-top:3px solid var(--blue)}.bus-card{border-top:3px solid var(--burgundy)}.card-title{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}.card-title>div{display:flex;align-items:center;gap:11px}.step{width:28px;height:28px;display:grid;place-items:center;color:var(--blue);background:#edf4fa;border-radius:9px;font:800 10px Manrope}.tag{border-radius:999px;background:#f3f5f8;color:#64748b;padding:6px 10px;font-size:10px;font-weight:700}.green-tag{background:var(--green-light);color:var(--green)}.small-link{font-size:11px;font-weight:700;color:var(--blue);text-decoration:none;white-space:nowrap}.small-link:hover{text-decoration:underline}.daily-form{display:flex;gap:10px;align-items:flex-end}.date-select-label{display:block;color:var(--muted);font-size:10px;font-weight:700;white-space:nowrap}.date-select-label input{display:block;margin-top:4px;width:148px}.daily-form select{flex:1}.hint{color:var(--muted);font-size:12px;margin:14px 0 0}.narrow-card{max-width:820px}.vehicle-table{width:100%}.vehicle-head,.vehicle-row{display:grid;grid-template-columns:1.2fr 1fr 1.2fr 110px;gap:12px;align-items:center;padding:12px 10px;border-bottom:1px solid #edf0f4}.vehicle-head{font-size:10px;color:var(--muted);font-weight:700;text-transform:uppercase}.vehicle-row{font-size:12px}.vehicle-actions{display:flex;align-items:center;gap:8px}.vehicle-actions form{margin:0}.account-card{max-width:620px}.account-card form{display:grid;gap:14px}.account-card label{display:block;font-size:12px;color:#68778a;font-weight:700}.account-card input{display:block;width:100%;margin-top:6px}.field-help{display:block;margin-top:5px;color:var(--muted);font-size:10px;font-weight:400;line-height:1.45}.checkline{display:flex!important;align-items:center;gap:8px;font-size:12px!important}.checkline input{width:16px!important;height:16px!important;margin:0!important;accent-color:var(--blue)}.credential-status{display:flex;align-items:center;justify-content:space-between;gap:12px;background:#f3f8f4;border:1px solid #dfede3;border-radius:9px;padding:10px 12px;color:#276344;font-size:11px;font-weight:700}.credential-status .checkline{color:#748092;font-weight:500}.live-check{padding:12px;background:#f5f8fb;border-radius:9px}.bus-form{display:grid;grid-template-columns:1fr 1fr;gap:8px}.bus-form button{grid-column:1/-1}.bus-list{margin-top:13px;max-height:172px;overflow:auto}.bus-row{padding:9px 10px;border-radius:9px;display:flex;align-items:center;justify-content:space-between;border:1px solid transparent}.bus-row.active{background:#f0f5fa;border-color:#d8e5f1}.bus-row>a{display:flex;gap:10px;align-items:center;text-decoration:none;color:inherit;flex:1}.bus-icon{width:31px;height:31px;display:grid;place-items:center;border-radius:9px;background:#f8eaf0;color:var(--burgundy)}.bus-row b{display:block;font-size:12px}.bus-row small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.icon-button{border:0;background:transparent;color:#93a0b1;font-size:20px;line-height:1;cursor:pointer;padding:5px 9px}.icon-button:hover{color:var(--burgundy)}.section-card{margin-top:18px}.window-row{display:grid;grid-template-columns:150px 150px 1fr 30px;gap:12px;align-items:end;background:#f8fafc;border:1px solid #edf0f4;padding:12px;border-radius:11px;margin-bottom:9px}.window-row label,.route-toolbar label,.qr-layout>label,.login-card label{font-size:11px;color:#68778a;font-weight:700;display:block}.window-row input,.route-toolbar input,.qr-layout select,.login-card input{display:block;margin-top:6px;width:100%}.direction-field{min-width:150px}.form-actions{display:flex;gap:10px;justify-content:flex-end;margin-top:14px}.empty-note{font-size:13px;color:var(--muted)}input,select{height:40px;border-radius:8px;border:1px solid #dce3eb;padding:0 11px;background:white;color:var(--ink);font:13px 'DM Sans';outline:0}input:focus,select:focus{border-color:#7ba9d4;box-shadow:0 0 0 3px rgba(33,99,167,.09)}.route-toolbar{display:flex;align-items:flex-end;justify-content:space-between;gap:15px;margin:16px 0 11px}.route-toolbar label{width:300px}.admin-map{height:430px;border-radius:12px;border:1px solid var(--line);overflow:hidden;z-index:1}.route-bottom{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-top:13px}.stops-list{display:flex;flex-wrap:wrap;gap:7px;align-items:center;flex:1}.stop-row{display:flex;align-items:center;gap:5px;background:#f7f9fb;border:1px solid #e8edf2;border-radius:9px;padding:4px 5px 4px 7px}.stop-row input{height:28px;border:0;background:transparent;width:130px;padding:0 4px}.stop-index{background:#e7f3eb;color:var(--green);font-size:10px;font-weight:800;width:20px;height:20px;border-radius:50%;display:grid;place-items:center}.qr-layout{display:flex;align-items:center;gap:24px}.qr-layout>label{width:250px}.qr-box{min-width:200px;min-height:200px;border:1px dashed #d7e0e9;border-radius:12px;display:grid;place-items:center;padding:10px;background:white}.qr-box img,.qr-box canvas{max-width:180px}.qr-copy b{font:700 15px Manrope}.qr-copy p{max-width:400px;word-break:break-all}.footer{text-align:center;color:#99a3b0;font-size:11px;padding:30px 0 0}.alert{padding:11px 14px;border-radius:9px;margin-bottom:16px;font-size:13px}.alert.success{background:#e7f3eb;color:#276344}.alert.error{background:#fbebee;color:#8b2343}
.login-bg{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#edf3f9,#f7f8fa 58%,#f3e9ee)}.login-card{width:min(420px,calc(100vw - 32px));background:#fff;padding:38px;border-radius:18px;box-shadow:0 24px 60px rgba(30,51,75,.13)}.brand-logo{display:block;width:240px;height:82px;object-fit:contain;object-position:left;margin-bottom:17px}.login-card h1{font-size:25px;margin:4px 0 22px}.login-card label{margin:14px 0}.login-card input{height:45px}.login-card .small{margin:17px 0 0}.mobile-page{background:#f3f6f8;min-height:100vh}.mobile-header{background:#fff;padding:10px max(18px,calc((100vw - 1040px)/2));display:flex;align-items:center;gap:13px;border-bottom:1px solid var(--line)}.mobile-header img{width:130px;height:52px;object-fit:contain}.mobile-header>span{font:800 14px Manrope}.mobile-wrap{max-width:1000px;margin:24px auto;padding:0 18px 38px}.mobile-title{display:flex;align-items:center;justify-content:space-between;margin:4px 0 16px}.mobile-title h1{font-size:25px}.live-badge{color:var(--green);background:#e7f3eb;border-radius:999px;padding:7px 10px;font-size:9px;font-weight:800;letter-spacing:.8px}.live-badge i{display:inline-block;width:7px;height:7px;border-radius:50%;background:#36a16b;margin-right:5px;box-shadow:0 0 0 3px #cfebd9}.mobile-status{display:grid;grid-template-columns:1fr 1fr;gap:16px;padding:19px 21px;background:#fff;border:1px solid #e8edf2;border-radius:14px;box-shadow:var(--shadow)}.status-bus{display:flex;gap:11px;align-items:center}.bus-symbol{display:grid;place-items:center;width:40px;height:40px;background:#f8eaf0;color:var(--burgundy);border-radius:11px;font-size:21px}.status-bus b{display:block;font:700 15px Manrope}.status-bus small{color:var(--muted);display:block;margin-top:4px;font-size:11px}.status-direction{text-align:right}.status-caption{font-size:9px;letter-spacing:1.1px;color:var(--muted);font-weight:700;display:block;margin-bottom:4px}.status-direction strong{font-size:16px;color:var(--green)}.status-meta{grid-column:1/-1;border-top:1px solid #edf0f4;padding-top:13px;display:flex;justify-content:space-between;gap:12px;color:#657487;font-size:11px}.mini-icon{color:var(--blue);font-size:15px;margin-right:5px;font-style:normal}.api-error{grid-column:1/-1;color:var(--burgundy);font-size:12px;background:#fff4f5;padding:9px;border-radius:8px}.map-card{background:white;margin-top:16px;border:1px solid #e8edf2;border-radius:14px;overflow:hidden;box-shadow:var(--shadow)}.map-heading{padding:13px 16px;display:flex;justify-content:space-between;align-items:center}.map-heading b{display:block;font:700 13px Manrope}.map-heading small{display:block;color:var(--muted);font-size:10px;margin-top:3px}.map-expand{width:34px;height:34px;border-radius:10px;border:1px solid var(--line);background:#fff;color:var(--blue);font-size:21px;cursor:pointer}.user-map{height:430px;z-index:1}.location-button{display:flex;width:100%;margin-top:14px;background:var(--blue);color:white;padding:14px;border-radius:11px}.location-button span{font-size:18px}.privacy-note{text-align:center;font-size:10px;color:var(--muted);margin:10px 0}.mobile-footer{text-align:center;color:#97a2af;font-size:10px;margin-top:21px}.bus-marker{background:var(--blue);border:3px solid white;border-radius:13px;color:#fff;box-shadow:0 3px 10px #41566c66;text-align:center;font-size:18px;line-height:34px}.bus-marker span{font-size:19px}.leaflet-container{font-family:'DM Sans',sans-serif}.leaflet-tooltip{border:0;box-shadow:0 2px 10px #1c2b3b30;border-radius:7px;font-size:11px}
@media(max-width:760px){.topbar{height:65px;padding:0 14px}.brand img{width:76px;height:43px}.brand{gap:8px;font-size:13px}.brand small{font-size:9px}.top-actions{gap:6px}.top-actions .button{font-size:10px;padding:9px}.desktop-label{display:none}.admin-wrap{margin:22px auto 40px;padding:0 13px}.admin-nav{margin-bottom:16px}.admin-nav a{font-size:10px;padding:9px 10px}.vehicle-head{display:none}.vehicle-row{grid-template-columns:1fr 1fr;gap:8px}.vehicle-actions{grid-column:1/-1}.narrow-card{max-width:none}.page-heading{align-items:flex-start;gap:10px}.page-heading h1{font-size:24px}.page-heading .muted{font-size:12px}.date-pill{font-size:10px;white-space:nowrap}.admin-grid{grid-template-columns:1fr}.card{padding:17px;border-radius:12px}.card-title{align-items:flex-start}.card-title h2{font-size:15px}.tag{font-size:9px}.daily-form{flex-direction:column}.bus-form{grid-template-columns:1fr}.bus-form button{grid-column:auto}.window-row{grid-template-columns:1fr 1fr 32px;gap:8px}.direction-field{grid-column:1/3;grid-row:2}.window-row .icon-button{grid-column:3;grid-row:1}.form-actions{justify-content:space-between}.form-actions .button{font-size:11px;padding:10px}.route-toolbar{align-items:flex-end}.route-toolbar label{width:55%}.admin-map{height:360px}.route-bottom{display:block}.route-bottom>.button{width:100%;margin-top:12px}.qr-layout{flex-wrap:wrap;gap:15px}.qr-layout>label{width:100%}.qr-box{min-width:166px;min-height:166px}.qr-copy{flex:1;min-width:130px}.qr-copy .button{font-size:10px;padding:10px}.mobile-header{padding:7px 14px}.mobile-header img{width:99px;height:43px}.mobile-header>span{font-size:12px}.mobile-wrap{margin:16px auto;padding:0 12px 28px}.mobile-title h1{font-size:22px}.mobile-status{padding:15px;gap:12px}.status-direction strong{font-size:13px}.status-meta{font-size:10px}.user-map{height:52vh;min-height:320px;max-height:460px}.login-card{padding:28px}}
.fleet-form { display: grid; gap: 9px; }
.fleet-form select { width: 100%; height: auto; padding: 5px; }
.fleet-form option { padding: 7px 9px; }
.fleet-form input, .fleet-form button { justify-self: start; }
/* Keep the public bus tracker comfortable to read on small phones. */
@media(max-width:760px){
  .mobile-header{gap:11px}
  .mobile-header>span{font-size:14px}
  .mobile-header small{font-size:11px}
  .mobile-wrap{padding-right:14px;padding-left:14px}
  .mobile-title{align-items:center;gap:10px}
  .mobile-title .eyebrow{font-size:11px;letter-spacing:1.2px}
  .mobile-title h1{font-size:24px;line-height:1.2}
  .live-badge{font-size:10px;padding:8px 11px;white-space:nowrap}
  .mobile-status{gap:14px;padding:17px}
  .status-bus b{font-size:16px}
  .status-bus small{font-size:12px;line-height:1.35}
  .status-caption{font-size:10px;letter-spacing:.8px}
  .status-direction strong{font-size:15px;line-height:1.35}
  .status-meta{font-size:12px;line-height:1.45;gap:8px;flex-wrap:wrap}
  .status-meta>span{flex:1 1 100%;display:flex;align-items:flex-start}
  .mini-icon{flex:0 0 auto}
  .map-heading{padding:14px 16px}
  .map-heading b{font-size:15px}
  .map-heading small{font-size:12px;line-height:1.35}
  .map-expand{width:40px;height:40px;font-size:23px;flex:0 0 auto}
  .location-button{min-height:48px;font-size:15px}
  .privacy-note,.mobile-footer{font-size:12px;line-height:1.5}
  .leaflet-tooltip{font-size:12px}
}
/* Extra legibility for compact Android phone screens, including Galaxy A31. */
@media(max-width:760px){
  .mobile-page{font-size:16px;font-weight:500;color:#172536}
  .mobile-header>span{font-size:15px;font-weight:800}
  .mobile-header small{font-size:12px;font-weight:600;color:#536579}
  .mobile-title .eyebrow{font-size:12px;font-weight:800;color:#185a99}
  .mobile-title h1{font-size:26px;font-weight:800;letter-spacing:-.3px;color:#172536}
  .live-badge{font-size:11px;font-weight:800}
  .status-bus b{font-size:17px;font-weight:800;color:#172536}
  .status-bus small{font-size:15px;font-weight:800;line-height:1.4;color:#263c52}
  .status-caption{font-size:11px;font-weight:800;color:#536579}
  .status-direction strong{font-size:16px;font-weight:800}
  .status-meta{font-size:13px;font-weight:600;color:#405267}
  .map-heading b{font-size:16px;font-weight:800;color:#172536}
  .map-heading small{font-size:13px;font-weight:600;color:#536579}
  .location-button{font-size:16px;font-weight:800}
  .privacy-note,.mobile-footer{font-size:13px;font-weight:600;color:#536579}
  .leaflet-tooltip{font-size:13px;font-weight:700}
}
@media(max-width:760px){
  .status-meta>span:first-child{align-items:center;gap:5px;background:#edf5fc;border-radius:9px;padding:10px 12px;color:#183f67}
  #schedule-info{font-size:17px;font-weight:800;line-height:1.4;color:#183f67}
  .status-meta>span:first-child .mini-icon{font-size:19px;color:#2163a7}
  .status-meta>span:last-child{font-size:12px;font-weight:600;color:#536579}
}

.bus-marker{position:relative;display:block;background:var(--blue);border:3px solid #fff;border-radius:13px;box-shadow:0 3px 10px #41566c66}.bus-marker svg{position:absolute;inset:0;margin:auto;width:30px;height:23px;display:block}.bus-marker .bus-body{fill:#fff}.bus-marker .bus-window{fill:var(--blue)}.bus-marker .bus-wheel{fill:var(--blue)}
.bus-marker-wrap{background:transparent;border:0}.bus-marker-wrap .bus-marker{position:absolute;left:24px;top:31px;width:44px;height:44px}.speed-bubble{position:absolute;left:50%;top:3px;transform:translateX(-50%);z-index:2;white-space:nowrap;padding:5px 9px;border-radius:999px;background:#fff;color:var(--blue-dark);border:1px solid #dce8f3;box-shadow:0 3px 10px #1c2b3b30;font:800 12px Manrope,'DM Sans',sans-serif;line-height:1.2}.speed-bubble:after{content:"";position:absolute;left:50%;bottom:-5px;width:8px;height:8px;background:#fff;border-right:1px solid #dce8f3;border-bottom:1px solid #dce8f3;transform:translateX(-50%) rotate(45deg)}
.schedule-card{margin:14px 0 10px;background:#fff;border:1px solid #e8edf2;border-radius:14px;box-shadow:var(--shadow);overflow:hidden}.schedule-card details summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:15px 17px;cursor:pointer}.schedule-card details summary::-webkit-details-marker{display:none}.schedule-card details summary>span:first-child{min-width:0}.schedule-card details summary b,.schedule-card details summary small{display:block}.schedule-card details summary b{font:800 15px Manrope,sans-serif;color:#172536}.schedule-card details summary small{font-size:12px;color:#536579;margin-top:4px}.schedule-chevron{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--line);border-radius:10px;color:var(--blue);font-size:21px;line-height:1;transition:transform .18s ease}.schedule-card details[open] .schedule-chevron{transform:rotate(180deg)}.schedule-list{padding:0 17px 14px}.schedule-row{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:12px 10px;border-top:1px solid #edf0f4;color:#3d5065}.schedule-time{font:700 15px Manrope,sans-serif;white-space:nowrap}.schedule-direction{font-size:13px;color:#536579}.schedule-row.is-active{background:#fff3f4;color:#bd2637}.schedule-row.is-active .schedule-time,.schedule-row.is-active .schedule-direction{font-weight:800;color:#bd2637}.schedule-active-label{font-size:10px;font-weight:800;letter-spacing:.6px;color:#bd2637;background:#ffe0e3;border-radius:999px;padding:5px 7px;white-space:nowrap}.schedule-empty{margin:0;padding:14px 0 4px;border-top:1px solid #edf0f4;color:#718096;font-size:13px}
@media(max-width:420px){.schedule-row{grid-template-columns:auto 1fr;gap:5px 9px}.schedule-direction{grid-column:1/-1}.schedule-active-label{grid-column:2;grid-row:1;justify-self:end}}
