:root{--navy:#123b4a;--navy-2:#0b2c37;--teal:#137d75;--amber:#f5b544;--bg:#f3f6f7;--surface:#fff;--ink:#172b33;--muted:#667980;--line:#dce5e7;--danger:#bb3f4b;--shadow:0 10px 30px rgba(18,59,74,.08);font-family:Inter,"Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg);font-size:16px}
*{box-sizing:border-box}body{margin:0;min-width:320px}button,input,select{font:inherit}button{cursor:pointer}.app-shell{min-height:100vh;display:grid;grid-template-columns:250px 1fr}.sidebar{background:var(--navy-2);color:#fff;padding:22px 16px;display:flex;flex-direction:column;position:sticky;top:0;height:100vh}.brand{display:grid;gap:9px;padding:0 7px 24px}.brand img{width:100%;height:auto;max-height:58px;object-fit:contain;object-position:left center}.brand-product{font-size:.78rem;letter-spacing:.13em;text-transform:uppercase;color:#a9bec5;font-weight:800}.brand strong,.sidebar-foot strong{display:block}.brand small,.sidebar-foot small{display:block;color:#a9bec5;margin-top:3px}.sidebar nav{display:grid;gap:5px}.nav-item{border:0;background:transparent;color:#bdd0d6;text-align:left;padding:13px 14px;border-radius:10px;display:flex;gap:12px;align-items:center}.nav-item span{font-size:1.1rem;width:22px;text-align:center}.nav-item:hover,.nav-item.active{background:#194a5a;color:#fff}.nav-item.active{box-shadow:inset 3px 0 var(--amber)}.sidebar-foot{margin-top:auto;border-top:1px solid #315562;padding:20px 8px 0;display:flex;align-items:center;gap:10px}.avatar{width:38px;height:38px;border-radius:50%;background:#d5e6e6;color:var(--navy);display:grid;place-items:center;font-weight:800}main{min-width:0}.topbar{min-height:94px;background:var(--surface);border-bottom:1px solid var(--line);display:flex;align-items:center;padding:18px 32px;gap:16px;position:sticky;top:0;z-index:5}.topbar h1{font-size:1.45rem;margin:2px 0}.eyebrow{font-size:.73rem;font-weight:800;letter-spacing:.12em;color:var(--teal);margin:0}.top-actions{margin-left:auto;display:flex;gap:14px;align-items:center}.date{font-size:.9rem;color:var(--muted)}.icon-btn{border:1px solid var(--line);background:#fff;width:42px;height:42px;border-radius:11px;position:relative}.notify-dot{position:absolute;width:7px;height:7px;background:var(--amber);border-radius:50%;right:9px;top:8px}.menu-btn{display:none}.content{padding:28px 32px 48px;max-width:1550px;margin:auto}.view{display:none}.view.active{display:block}.welcome{background:linear-gradient(120deg,var(--navy),#176c6b);color:#fff;border-radius:20px;padding:28px 30px;display:flex;justify-content:space-between;align-items:center;gap:24px;box-shadow:var(--shadow)}.welcome h2{font-size:1.8rem;margin:10px 0 8px}.welcome p{color:#c8dddd;margin:0}.pill{font-size:.77rem;background:rgba(255,255,255,.13);border:1px solid rgba(255,255,255,.2);padding:6px 10px;border-radius:999px}.primary,.secondary,.danger{border:0;border-radius:10px;padding:11px 16px;font-weight:750;min-height:44px}.primary{background:var(--amber);color:#2a2d23}.primary:hover{background:#ffc45a}.secondary{background:#edf2f3;color:var(--ink)}.danger{background:var(--danger);color:#fff}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0}.stat-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px;display:flex;gap:15px;align-items:center}.stat-icon{width:44px;height:44px;border-radius:12px;background:#e7f2f1;color:var(--teal);display:grid;place-items:center;font-size:1.2rem}.stat-card strong{font-size:1.7rem;display:block}.stat-card span{color:var(--muted);font-size:.86rem}.dashboard-grid{display:grid;grid-template-columns:1.15fr .85fr;gap:18px;margin-bottom:18px}.panel{background:#fff;border:1px solid var(--line);border-radius:15px;box-shadow:0 3px 15px rgba(18,59,74,.03);overflow:hidden}.panel-head{padding:20px 22px 14px;display:flex;justify-content:space-between;align-items:center}.panel h3{margin:4px 0;font-size:1.1rem}.text-btn{border:0;background:transparent;color:var(--teal);font-weight:700}.fleet-status{padding:5px 22px 24px}.fleet-row{display:grid;grid-template-columns:140px 1fr 32px;gap:12px;align-items:center;margin:15px 0;font-size:.9rem}.bar{height:9px;border-radius:9px;background:#e8edef;overflow:hidden}.bar i{display:block;height:100%;border-radius:9px}.list{padding:0 22px 12px}.list-item{display:flex;align-items:center;gap:12px;padding:13px 0;border-top:1px solid var(--line)}.list-date{width:45px;text-align:center;border-radius:9px;background:#edf5f4;color:var(--teal);padding:6px}.list-date strong,.list-date small{display:block}.list-date small{font-size:.68rem}.list-copy strong,.list-copy small{display:block}.list-copy small{color:var(--muted);margin-top:3px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:18px}.section-copy{color:var(--muted);margin:0}.toolbar{display:flex;gap:12px;margin-bottom:16px}.search{background:#fff;border:1px solid var(--line);border-radius:10px;display:flex;align-items:center;gap:9px;padding:0 13px;flex:1;max-width:430px}.search input{border:0;outline:0;width:100%;height:44px;background:transparent}.toolbar select{border:1px solid var(--line);border-radius:10px;background:#fff;padding:0 36px 0 12px;color:var(--ink)}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;min-width:700px}th{text-align:left;color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.05em;background:#f8fafb}th,td{padding:14px 18px;border-bottom:1px solid var(--line)}tbody tr:last-child td{border-bottom:0}.person{display:flex;align-items:center;gap:11px}.person-avatar{width:37px;height:37px;border-radius:10px;background:#e1efef;color:var(--teal);font-weight:800;display:grid;place-items:center}.person strong,.person small{display:block}.person small{color:var(--muted);margin-top:2px}.status{display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border-radius:999px;font-size:.78rem;font-weight:750;background:#edf2f3}.status::before{content:"";width:7px;height:7px;border-radius:50%;background:#87979c}.status.ok{background:#e7f5ef;color:#227552}.status.ok::before{background:#2d966a}.status.warn{background:#fff3db;color:#93630b}.status.warn::before{background:#e2a52e}.status.bad{background:#fbe9ea;color:#a13640}.status.bad::before{background:#c94c56}.permissions{display:flex;gap:4px;flex-wrap:wrap}.permission{font-size:.7rem;background:#edf3f4;color:#526970;padding:4px 6px;border-radius:5px}.row-actions{white-space:nowrap}.action-btn{border:0;background:transparent;color:var(--teal);padding:7px;font-weight:700}.vehicle-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.vehicle-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:20px}.vehicle-top{display:flex;justify-content:space-between;align-items:start}.plate{font-size:1.2rem;letter-spacing:.08em;margin:7px 0 3px}.vehicle-card p{color:var(--muted);margin:0}.vehicle-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin:17px 0;padding:15px 0}.vehicle-meta small,.vehicle-meta strong{display:block}.vehicle-meta small{color:var(--muted);font-size:.74rem;margin-bottom:4px}.card-actions{display:flex;justify-content:space-between;align-items:center}.maintenance-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:18px}.summary-chip{background:#fff;border:1px solid var(--line);padding:16px 19px;border-radius:13px}.summary-chip strong{display:block;font-size:1.5rem}.summary-chip span{color:var(--muted);font-size:.84rem}dialog{width:min(720px,calc(100% - 28px));border:0;border-radius:18px;padding:0;box-shadow:0 24px 80px rgba(0,0,0,.25)}dialog::backdrop{background:rgba(5,29,36,.62);backdrop-filter:blur(3px)}dialog form{padding:25px}.dialog-head{display:flex;justify-content:space-between;align-items:start;margin-bottom:22px}.dialog-head h2{margin:4px 0}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.field{display:grid;gap:7px}.field.full{grid-column:1/-1}.field label{font-size:.84rem;font-weight:700}.field input,.field select{border:1px solid #ccd9dc;border-radius:9px;padding:11px 12px;min-width:0;background:#fff}.check-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}.check{display:flex;align-items:center;gap:6px;font-size:.82rem;border:1px solid var(--line);border-radius:8px;padding:8px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:25px}.small-dialog{max-width:430px;text-align:center}.danger-icon{margin:auto;width:48px;height:48px;border-radius:50%;display:grid;place-items:center;background:#fbe9ea;color:var(--danger);font-weight:900;font-size:1.5rem}.small-dialog p{color:var(--muted)}#toast{position:fixed;right:22px;bottom:22px;background:var(--navy-2);color:#fff;padding:13px 17px;border-radius:10px;box-shadow:var(--shadow);transform:translateY(100px);opacity:0;transition:.25s;z-index:20}#toast.show{transform:none;opacity:1}.empty{padding:30px;text-align:center;color:var(--muted)}
@media(max-width:1050px){.stats{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.vehicle-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.app-shell{display:block}.sidebar{position:fixed;left:-270px;z-index:20;width:250px;transition:.25s}.sidebar.open{left:0;box-shadow:10px 0 40px rgba(0,0,0,.2)}.menu-btn{display:block}.topbar{padding:13px 16px;min-height:78px}.date{display:none}.content{padding:20px 15px 35px}.welcome{align-items:flex-start;flex-direction:column;padding:23px}.stats{grid-template-columns:1fr 1fr}.vehicle-grid{grid-template-columns:1fr}.maintenance-summary{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr}.field.full{grid-column:auto}.check-grid{grid-template-columns:1fr 1fr}.toolbar{flex-direction:column}.search{max-width:none}.toolbar select{height:44px}.section-head{align-items:flex-start}.add-btn{white-space:nowrap}}
@media(max-width:460px){.stats{grid-template-columns:1fr}.section-head{flex-direction:column}.section-head .primary{width:100%}.topbar h1{font-size:1.18rem}.welcome h2{font-size:1.45rem}}

/* Formularios operativos */
.template-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:20px}.template-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:22px;display:grid;grid-template-columns:auto 1fr;gap:16px;position:relative;overflow:hidden}.template-card::before{content:"";position:absolute;left:0;top:0;bottom:0;width:5px;background:var(--teal)}.template-card.route::before{background:var(--amber)}.template-icon{width:48px;height:48px;border-radius:13px;background:#e6f2f1;color:var(--teal);display:grid;place-items:center;font-size:1.45rem}.template-card.route .template-icon{background:#fff2d8;color:#9b6908}.template-card h3{margin:5px 0 7px;font-size:1.15rem}.template-card p:not(.eyebrow){color:var(--muted);margin:0;line-height:1.45}.template-card .primary{grid-column:2;justify-self:start}.template-meta{display:flex;gap:8px;margin:14px 0}.template-meta span{font-size:.75rem;background:#eef3f4;color:#526970;border-radius:999px;padding:5px 8px}.forms-panel select{border:1px solid var(--line);border-radius:9px;padding:8px 11px;background:#fff}.checklist-dialog{width:min(1080px,calc(100% - 24px));max-height:94vh}.checklist-dialog form{padding:0}.checklist-head{padding:22px 26px 18px;background:linear-gradient(115deg,var(--navy),#146b70);color:#fff;display:flex;justify-content:space-between;align-items:start}.checklist-head .eyebrow{color:#80dfd4}.checklist-head h2{margin:4px 0 5px}.checklist-head p{margin:0;color:#cde0e4}.checklist-head .icon-btn{background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.25);color:#fff}.form-progress{padding:12px 26px;background:#edf3f4;display:flex;align-items:center;gap:16px;font-size:.78rem;color:var(--muted)}.progress-track{height:6px;background:#d5dfe1;border-radius:9px;flex:1;overflow:hidden}.progress-track i{display:block;height:100%;width:0;background:var(--teal);transition:.25s}.checklist-body{padding:22px 26px 90px;display:grid;gap:17px;max-height:calc(94vh - 205px);overflow:auto;background:#f5f8f8}.form-section{background:#fff;border:1px solid var(--line);border-radius:13px;overflow:hidden}.form-section h3{margin:0;padding:12px 16px;background:#eaf2f3;color:var(--navy);font-size:.95rem}.section-fields{padding:16px;display:grid;grid-template-columns:repeat(4,1fr);gap:14px}.form-control{display:grid;gap:6px}.form-control.span-2{grid-column:span 2}.form-control.span-4{grid-column:1/-1}.form-control label,.check-question>span{font-size:.81rem;font-weight:750;color:#3d555e}.form-control input,.form-control select,.form-control textarea{width:100%;border:1px solid #c9d7da;border-radius:8px;padding:10px 11px;background:#fff;min-height:42px}.form-control textarea{min-height:88px;resize:vertical}.radio-row{display:flex;gap:8px;flex-wrap:wrap}.radio-option{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:8px 10px;font-size:.8rem;background:#fff}.inspection-list{display:grid;gap:8px}.inspection-row{display:grid;grid-template-columns:minmax(180px,1.5fr) minmax(270px,1fr) minmax(150px,1fr);gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid #edf1f2}.inspection-row:last-child{border-bottom:0}.inspection-row>span{font-size:.83rem}.inspection-row .radio-row{flex-wrap:nowrap}.inspection-row .radio-option{padding:6px 8px}.inspection-row input[type="text"]{border:1px solid #c9d7da;border-radius:7px;padding:8px;width:100%}.repeat-table{overflow-x:auto}.repeat-table table{min-width:900px}.repeat-table input,.repeat-table select{width:100%;min-width:85px;border:1px solid #c9d7da;border-radius:6px;padding:7px}.result-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.result-option{border:2px solid var(--line);border-radius:10px;padding:13px;display:flex;align-items:center;gap:9px;font-weight:800}.result-option.good{background:#e8f6ef;border-color:#b9dfcc}.result-option.warn{background:#fff5dd;border-color:#eed28f}.result-option.bad{background:#fcebed;border-color:#ebbbc0}.evidence-box{border:2px dashed #b8cbd0;border-radius:10px;padding:20px;text-align:center;color:var(--muted);background:#f8fbfb}.checklist-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);padding:14px 24px;display:flex;justify-content:flex-end;gap:10px;z-index:2}
@media(max-width:1050px){.section-fields{grid-template-columns:1fr 1fr}.form-control.span-4{grid-column:1/-1}.inspection-row{grid-template-columns:1fr}.template-grid{grid-template-columns:1fr}}
@media(max-width:760px){.section-fields{grid-template-columns:1fr}.form-control.span-2,.form-control.span-4{grid-column:auto}.result-grid{grid-template-columns:1fr}.checklist-head{padding:18px}.checklist-body{padding:14px 14px 90px}.checklist-actions{padding:11px;display:grid;grid-template-columns:1fr 1fr}.checklist-actions .primary{grid-column:1/-1;grid-row:1}.template-card{grid-template-columns:1fr}.template-card .primary{grid-column:1;width:100%}.inspection-row .radio-row{flex-wrap:wrap}}

.template-card.alcohol::before{background:#2f69a8}.template-card.alcohol .template-icon{background:#e9f1fb;color:#2f69a8}
.forms-records-head{align-items:end;gap:18px;flex-wrap:wrap}.forms-records-head>div:first-child{min-width:175px}.filter-count{display:block;margin-top:5px;color:var(--muted);font-size:.78rem}.form-filter-bar{display:grid;grid-template-columns:minmax(145px,.8fr) minmax(180px,1fr) minmax(190px,1fr) minmax(145px,.8fr) auto auto;gap:9px;align-items:end;flex:1}.form-filter-bar label{display:grid;gap:5px;min-width:0}.form-filter-bar label span{font-size:.72rem;font-weight:800;color:#48636d}.form-filter-bar input,.form-filter-bar select{width:100%;height:44px;border:1px solid var(--line);border-radius:9px;padding:8px 11px;background:#fff;color:var(--ink);min-width:0}.form-filter-bar button{height:44px;white-space:nowrap}.form-filter-bar .primary{padding-inline:18px}
@media(max-width:1280px){.forms-records-head{align-items:start}.forms-records-head>div:first-child{width:100%}.form-filter-bar{grid-template-columns:repeat(3,minmax(0,1fr));width:100%}.form-filter-bar button{width:100%}}
@media(max-width:760px){.form-filter-bar{grid-template-columns:1fr 1fr}.form-filter-bar label:nth-child(3),.form-filter-bar label:nth-child(4){grid-column:auto}.form-filter-bar button{min-height:48px}}
@media(max-width:430px){.form-filter-bar{grid-template-columns:1fr}.form-filter-bar label,.form-filter-bar button{grid-column:1}}
.maintenance-warning{margin:14px 0 0;padding:10px 12px;border:1px solid #ebbbc0;border-radius:9px;background:#fcebed;color:#a22f3b;font-size:.82rem;font-weight:800}.list-item.maintenance-due{border-left:4px solid #c94c56;background:#fff5f6;padding-left:10px}
.signature-control small{color:var(--muted);font-size:.74rem}.signature-box{position:relative;border:2px dashed #a9bcc1;border-radius:10px;background:linear-gradient(#fff,#fbfdfd);overflow:hidden}.signature-box canvas{display:block;width:100%;height:145px;touch-action:none;cursor:crosshair}.signature-clear{position:absolute;right:8px;top:8px;border:1px solid #c9d7da;border-radius:7px;background:rgba(255,255,255,.92);padding:6px 10px;color:#526970;font-size:.75rem;font-weight:750;cursor:pointer}.signature-clear:hover{background:#edf3f4}
.alcohol-alert{grid-column:1/-1;border:2px solid;border-radius:11px;padding:15px 18px;text-align:center;font-weight:900;letter-spacing:.02em}.alcohol-alert.danger{color:#a21f2d;background:#fce7e9;border-color:#db4f5c}.alcohol-alert.safe{color:#176b4a;background:#e6f5ed;border-color:#62b38d}.alcohol-alert.warning{color:#805800;background:#fff3d8;border-color:#e2a52e}
.radio-option,.check,.result-option{transition:background-color .18s ease,border-color .18s ease,box-shadow .18s ease}.radio-option:has(input:checked),.check:has(input:checked){background:#e8f6ef;border-color:#78b99a;box-shadow:0 0 0 1px rgba(45,150,106,.08)}.radio-option input:checked,.check input:checked,.result-option input:checked{accent-color:#23845d}.result-option:has(input:checked){border-color:#52a77e;box-shadow:0 0 0 2px rgba(45,150,106,.16)}

/* Distribución adaptable de preguntas y opciones */
.form-control input[type="radio"],.form-control input[type="checkbox"]{width:auto;min-width:16px;min-height:16px;padding:0;flex:0 0 auto}.inspection-row{grid-template-columns:minmax(210px,1.15fr) minmax(430px,1.6fr) minmax(190px,.9fr);align-items:center}.inspection-row .radio-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(92px,1fr));gap:8px;min-width:0;width:100%}.inspection-row .radio-option{min-width:0;min-height:48px;justify-content:center;text-align:center;white-space:normal;line-height:1.2}.inspection-row>input[type="text"]{min-width:0}.inspection-row>span{line-height:1.35}

@media(max-width:1180px){.inspection-row{grid-template-columns:minmax(180px,.8fr) minmax(400px,1.5fr)}.inspection-row>input[type="text"]{grid-column:1/-1}.checklist-dialog{width:min(1040px,calc(100% - 20px))}}
@media(max-width:760px){.checklist-dialog{width:calc(100% - 10px);max-height:98svh;border-radius:18px}.checklist-head{padding:18px 58px 18px 20px;position:relative}.checklist-head h2{font-size:1.45rem;line-height:1.2}.checklist-head .icon-btn{position:absolute;right:14px;top:14px}.form-progress{padding:11px 20px}.checklist-body{max-height:calc(98svh - 245px);padding:12px 12px 96px}.form-section h3{padding:12px 14px;line-height:1.35}.section-fields{padding:13px;gap:12px}.inspection-row{grid-template-columns:1fr;gap:10px;padding:14px 0}.inspection-row .radio-row{grid-template-columns:repeat(2,minmax(0,1fr))}.inspection-row>input[type="text"]{grid-column:auto}.inspection-row .radio-option{min-height:54px;padding:9px 7px}.checklist-actions{gap:8px}.checklist-actions button{min-height:48px}}
@media(max-width:390px){.checklist-head h2{font-size:1.3rem}.checklist-actions{grid-template-columns:1fr}.checklist-actions .primary{grid-column:1;grid-row:auto}}

/* Controles propios para evitar que Safari móvil agrande los radios */
.radio-option input[type="radio"],.result-option input[type="radio"]{-webkit-appearance:none!important;appearance:none!important;display:inline-block!important;width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;max-height:18px!important;margin:0!important;padding:0!important;border:2px solid #819398!important;border-radius:50%!important;background:#fff!important;box-shadow:none!important;flex:0 0 18px!important}.radio-option input[type="radio"]:checked,.result-option input[type="radio"]:checked{border-color:#23845d!important;background:radial-gradient(circle at center,#23845d 0 4px,#fff 5px)!important}.inspection-row .radio-option{width:100%;overflow:hidden;overflow-wrap:anywhere}.inspection-row .radio-option input+*{min-width:0}
@media(max-width:760px){.inspection-row .radio-row{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important}.inspection-row .radio-option{display:flex!important;align-items:center!important;justify-content:flex-start!important;gap:8px!important;min-height:50px!important;padding:9px 10px!important;font-size:.78rem!important}.inspection-row>input[type="text"]{width:100%!important;max-width:100%!important}}
.sidebar-foot{display:grid;gap:13px}.session-user{display:flex;align-items:center;gap:10px;min-width:0}.session-user span{min-width:0}.session-user strong,.session-user small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.logout-btn{width:100%;border:1px solid #496b76;border-radius:9px;background:transparent;color:#d6e3e6;padding:9px 11px;display:flex;align-items:center;justify-content:center;gap:8px;font-weight:700}.logout-btn:hover{background:#194a5a;color:#fff;border-color:#62808a}
.add-stop{margin-top:12px;justify-self:start;border:1px solid #b9c9cd;color:var(--teal);background:#f3f8f8}.add-stop:hover{background:#e5f2f0}.form-pdf{border:1px solid #bfd1d5;border-radius:7px;padding:6px 9px!important}.forms-panel .row-actions{display:flex;gap:5px;align-items:center}
.email-settings{max-width:900px}.email-settings form{padding:8px 22px 24px}.field textarea{border:1px solid #ccd9dc;border-radius:9px;padding:11px 12px;min-height:105px;resize:vertical;font:inherit}.field small{color:var(--muted)}.email-active{min-height:44px;background:#f8fbfb}.email-settings .dialog-actions{margin-top:5px}
.login-dialog{width:min(460px,calc(100% - 28px))}.login-dialog::backdrop{background:linear-gradient(135deg,rgba(7,38,48,.96),rgba(15,68,100,.92));backdrop-filter:blur(6px)}.login-dialog form{display:grid;gap:16px;padding:34px}.login-dialog h2{margin:0}.login-dialog p{margin:0;color:var(--muted)}.login-dialog .primary{width:100%;margin-top:4px}.login-logo{display:block;width:min(290px,100%);height:auto;max-height:90px;object-fit:contain;object-position:left center;margin-bottom:4px}.login-error{color:var(--danger)!important;min-height:1.2em;font-size:.85rem}.login-dialog[open]{animation:login-in .2s ease-out}@keyframes login-in{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}

/* Acceso de conductores y trazabilidad */
.login-divider{display:flex;align-items:center;gap:10px;color:var(--muted);font-size:.78rem}.login-divider::before,.login-divider::after{content:"";height:1px;background:var(--line);flex:1}.driver-access-open{width:100%;border:1px solid #b9cbd0}.template-card.trace::before{background:#7857a6}.template-card.trace .template-icon{background:#f0eafa;color:#7857a6}.driver-only-label{grid-column:2;justify-self:start;border-radius:999px;padding:8px 11px;background:#f0eafa;color:#664390;font-size:.77rem;font-weight:800}.route-history{margin-top:20px}.driver-route-dialog{width:min(760px,calc(100% - 20px));max-height:96vh;background:#f3f7f8}.driver-route-dialog::backdrop{background:rgba(5,29,36,.76);backdrop-filter:blur(5px)}.driver-route-dialog .driver-route-shell{padding:0}.driver-route-head{padding:22px 25px;background:linear-gradient(115deg,var(--navy),#176c6b);color:#fff;display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.driver-route-head .eyebrow{color:#87e0d5}.driver-route-head h2{margin:5px 0}.driver-route-head p{margin:0;color:#cce0e3}.driver-route-head .icon-btn{background:rgba(255,255,255,.12);color:#fff;border-color:rgba(255,255,255,.25);flex:0 0 auto}.driver-route-body{padding:22px 25px;background:#f5f8f8;max-height:calc(96vh - 205px);overflow:auto}.driver-route-body form{padding:0}.driver-route-body textarea{border:1px solid #ccd9dc;border-radius:9px;padding:11px 12px;min-height:90px;resize:vertical;font:inherit}.driver-notice{display:flex;justify-content:space-between;gap:15px;align-items:center;background:#e8f4f1;border:1px solid #b9d9d1;border-radius:11px;padding:13px 15px;margin-bottom:18px}.driver-notice strong{color:#176b5a}.driver-notice span{font-size:.82rem;color:var(--muted);text-align:right}.driver-route-footer{padding:14px 25px;border-top:1px solid var(--line);background:#fff;display:flex;justify-content:flex-end}.active-route-summary{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:16px}.active-route-summary div,.route-result-grid div{border:1px solid var(--line);background:#fff;border-radius:10px;padding:12px}.active-route-summary small,.active-route-summary strong,.route-result-grid small,.route-result-grid strong{display:block}.active-route-summary small,.route-result-grid small{color:var(--muted);font-size:.75rem;margin-bottom:4px}.route-result-title{text-align:center;margin:0 0 15px;color:var(--teal)}.route-result-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.route-result-grid .highlight{background:#e7f5ef;border-color:#add8c5}.driver-route-body .full{grid-column:1/-1}.driver-route-body button.full{width:100%}.driver-route-body .field small{font-size:.76rem}.route-history table{min-width:1050px}
.driver-route-tabs{display:grid;grid-template-columns:1fr 1fr;background:#fff;border-bottom:1px solid var(--line);padding:7px 18px;gap:8px}.driver-route-tabs button{border:1px solid transparent;background:transparent;border-radius:8px;padding:9px;color:var(--muted);font-weight:750}.driver-route-tabs button.active{border-color:#aac8d0;background:#edf6f7;color:var(--teal)}.driver-route-tabs span{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:999px;background:#2767dc;color:#fff;font-size:.66rem;margin-left:4px}.route-type-options{display:grid;grid-template-columns:1fr 1fr;gap:8px}.route-type-options label{display:flex;align-items:center;justify-content:center;gap:7px;border:1px solid #c9d7da;border-radius:9px;padding:11px;background:#fff}.route-type-options label:has(input:checked){border-color:#3b7bea;background:#eef4ff;color:#245dc1}.driver-history-list{display:grid;gap:10px}.driver-history-card{background:#fff;border:1px solid var(--line);border-radius:11px;padding:14px}.driver-history-card header{display:flex;justify-content:space-between;gap:10px;margin-bottom:9px}.driver-history-card h4{margin:0}.driver-history-card p{margin:3px 0;color:var(--muted);font-size:.8rem}.driver-history-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:7px}.driver-history-metrics div{background:#f2f7f8;border-radius:8px;padding:8px}.driver-history-metrics small,.driver-history-metrics strong{display:block}.driver-history-metrics small{font-size:.68rem;color:var(--muted);margin-bottom:3px}
.passenger-total-box{background:#eef6ff;border:1px solid #b9d2ef;border-radius:10px;padding:12px}.passenger-total-box output{display:block;color:#245dc1;font-size:1.35rem;font-weight:850}.captured-time{margin-top:4px;border-radius:8px;padding:9px 11px;background:#edf6f7;border:1px solid #b7d3d7;color:#176b70;font-size:.82rem;font-weight:750}.captured-time.pending{color:#8a650e;background:#fff5df;border-color:#ead39a}
.route-dependent{transition:opacity .18s ease,filter .18s ease}.route-dependent.locked{opacity:.48;filter:grayscale(.25)}#driverRouteStartForm :disabled{cursor:not-allowed}#driverRouteName:disabled{background:#edf1f2;color:#7b8b91}#driverCustomRouteField{padding:12px;border-radius:10px;background:#fff6df;border:1px solid #ead39a}
.route-standard-copy{margin:4px 0 0;color:var(--muted);font-size:.8rem}.route-time-alert{display:inline-flex;flex-direction:column;gap:2px;min-width:145px;border:1px solid;border-radius:9px;padding:7px 9px}.route-time-alert strong{font-size:.77rem}.route-time-alert small{font-size:.68rem}.route-time-alert.early,.route-result-banner.early{color:#8a5a00;background:#fff4d8;border-color:#e7c46d}.route-time-alert.late,.route-result-banner.late{color:#a12634;background:#fce8eb;border-color:#e4a2aa}.route-time-alert.ok,.route-result-banner.ok{color:#17694b;background:#e7f5ee;border-color:#9acdb6}.route-time-alert.pending{color:#53696f;background:#eff4f5;border-color:#cbd8db}.route-result-banner{display:flex;flex-direction:column;gap:4px;border:1px solid;border-radius:11px;padding:13px 15px;margin-bottom:15px}.route-result-banner strong{font-size:1rem}.route-result-banner span{font-size:.8rem}.operational-delete{border-color:#e7bdc2!important;color:#a12634!important;background:#fff7f8!important}.operational-delete:hover{background:#fce8eb!important}.route-history table{min-width:1320px}

.operational-help{border:1px solid #c9dce5;border-radius:10px;background:#f7fbfd;padding:12px 14px}.operational-help p{margin:0 0 10px;font-weight:750;color:var(--navy)}.operational-help>div{display:flex;gap:10px;flex-wrap:wrap}.operational-help span{padding:6px 10px;border-radius:7px;font-size:.76rem;font-weight:800}.legend-ok{background:#e5f5ed;color:#14704f}.legend-obs{background:#fff2ce;color:#896000}.legend-nc{background:#fce5e8;color:#a12634}.legend-na{background:#e9eef1;color:#52666e}.operational-verification .inspection-row{grid-template-columns:minmax(230px,1.25fr) minmax(480px,1.75fr)}.operational-verification .inspection-row>span b{display:inline-block;min-width:24px;color:#0e4d72}.inspection-heading{background:#eaf2f3;padding:10px!important;border-radius:8px;font-size:.76rem;font-weight:800;text-transform:uppercase;color:#315661}.operational-choice{flex:1;justify-content:center;min-width:105px}.operational-choice small{font-size:.68rem;color:var(--muted)}.operational-choice:has(input:checked){box-shadow:inset 0 0 0 2px currentColor}.choice-ok:has(input:checked){background:#e5f5ed;color:#14704f}.choice-obs:has(input:checked){background:#fff2ce;color:#896000}.choice-nc:has(input:checked){background:#fce5e8;color:#a12634}.choice-na:has(input:checked){background:#e9eef1;color:#52666e}.result-banner{grid-column:1/-1;border:1px solid;border-radius:10px;padding:16px;text-align:center;font-size:1.05rem;font-weight:850}.result-banner.pending{background:#eff4f5;border-color:#cbd8db;color:#52666e}.result-banner.safe{background:#e5f5ed;border-color:#8ecab0;color:#14704f}.result-banner.warning{background:#fff2ce;border-color:#e2be5f;color:#896000}.result-banner.danger{background:#fce5e8;border-color:#df9ea7;color:#a12634}.result-explanation{text-align:center;color:var(--muted)}
.novelty-guidance{border:1px solid #c9dce5;border-radius:8px;background:#f4f8f9;color:#526970;padding:11px 13px;font-size:.82rem}.operational-novelty:not(.inactive) .novelty-guidance{background:#fff2ce;border-color:#e2be5f;color:#765300;font-weight:750}.operational-novelty.inactive .form-control:not(.novelty-guidance){opacity:.58}.operational-novelty.inactive input:disabled,.operational-novelty.inactive textarea:disabled{background:#eef3f4;cursor:not-allowed}

@media(max-width:760px){.operational-verification .inspection-row{grid-template-columns:1fr}.inspection-heading{display:none}.operational-verification .radio-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.operational-choice{min-width:0;min-height:58px;flex-direction:column;gap:2px}.operational-help>div{display:grid;grid-template-columns:1fr 1fr}.operational-help span{text-align:center}.result-banner{font-size:.95rem}}
.arrival-supervisor{padding:13px;border:1px solid #9bcac0;border-radius:10px;background:#edf8f5}.pending-exit-notice{background:#fff3d8;border-color:#e2c26e}.pending-exit-notice strong{color:#815b0b}.pending-exit-notice span{color:#674d18}
.supervisor-reception{padding:13px;border:1px solid #c5d8dc;border-radius:10px;background:#fff}.supervisor-reception>.route-type-options{margin-top:8px}
.report-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,220px)) auto;justify-content:start}.report-filters input,.report-filters select{border:1px solid var(--line);border-radius:9px;background:#fff;padding:11px 12px;font:inherit}.report-stats{margin-bottom:18px}#reportRoutesTable .route-time-alert{min-width:135px}@media(max-width:1050px){.report-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.report-filters button{grid-column:1/-1}}@media(max-width:760px){.report-filters{grid-template-columns:1fr}.report-filters button{grid-column:1}.report-stats{grid-template-columns:1fr 1fr}}
.route-incident-field,.route-incident-photo{border:1px solid #e5c875;border-radius:11px;background:#fff9e8;padding:13px}.route-incident-field textarea{min-height:100px}.route-incident-photo input[type="file"]{border:1px dashed #d0a63d;background:#fff;padding:12px}.route-incident-field small,.route-incident-photo small{color:#74591b}.route-incident-badge{display:inline-flex;margin-top:5px;padding:3px 7px;border-radius:999px;background:#fff0cc;color:#875d00;font-size:.68rem;font-weight:800}.route-report-pdf{border:1px solid #bfd1d5;border-radius:7px;padding:6px 10px!important}#reportRoutesTable{min-width:1280px}
.section-actions{display:flex;flex-wrap:wrap;gap:10px}@media(max-width:600px){.section-actions{width:100%;display:grid;grid-template-columns:1fr 1fr}.section-actions button{width:100%}}
@media(max-width:760px){.driver-only-label{grid-column:1}.driver-route-dialog{width:calc(100% - 10px);max-height:98svh}.driver-route-head{padding:18px}.driver-route-head h2{font-size:1.35rem}.driver-route-body{padding:16px;max-height:calc(98svh - 205px)}.driver-notice{align-items:flex-start;flex-direction:column}.driver-notice span{text-align:left}.active-route-summary,.route-result-grid{grid-template-columns:1fr}.driver-route-footer{padding:12px 16px}.driver-route-footer button{width:100%}}

/* Inicio de descanso con evidencia fotográfica y geolocalización */
.rest-access-open{width:100%;border:1px solid #9fc7c3;color:#176b64;background:#edf8f6}.rest-access-open:hover{background:#dff2ee}.rest-access-finish{width:100%;border:1px solid #e3bf73;color:#805a09;background:#fff5dc}.rest-access-finish:hover{background:#ffedbf}.rest-dialog{width:min(520px,calc(100% - 20px))}.rest-shell{padding:28px;display:grid;gap:16px}.rest-shell .dialog-head{padding:0;align-items:flex-start}.rest-shell .dialog-head p{margin:5px 0 0;color:var(--muted)}.rest-camera{min-height:300px;display:grid;place-items:center;border:2px dashed #a9c2c6;border-radius:15px;overflow:hidden;background:#eaf1f2;position:relative}.rest-camera video,.rest-camera img{display:block;width:100%;height:min(54vh,420px);object-fit:cover}.rest-camera video{transform:scaleX(-1)}.rest-camera [hidden]{display:none!important}#driverRestPlaceholder{text-align:center;color:var(--muted);padding:30px}#driverRestPlaceholder span{display:block;font-size:3rem;margin-bottom:8px}.rest-help{font-size:.82rem!important;line-height:1.45}.rest-actions{display:grid}.rest-actions button{width:100%;min-height:48px}.rest-success{display:grid;gap:5px;border:1px solid #8cc9ad;border-radius:11px;padding:14px;background:#e7f6ee;color:#176a4b}.rest-success span,.rest-success small{display:block}.rest-report{margin-top:20px}.rest-report-head{gap:18px;align-items:flex-end}.rest-report-filters{display:flex;gap:8px;flex-wrap:wrap}.rest-report-filters select{min-width:190px}.rest-report-table{min-width:1250px}.rest-evidence-links{display:flex;gap:6px;flex-wrap:wrap}.location-link{color:var(--teal);font-weight:750;text-decoration:none}.location-link:hover{text-decoration:underline}.selfie-link{display:inline-flex;text-decoration:none;white-space:nowrap}
@media(max-width:760px){.rest-report-head{align-items:stretch;flex-direction:column}.rest-report-filters{display:grid;grid-template-columns:1fr}.rest-report-filters select,.rest-report-filters button{width:100%}}
@media(max-width:560px){.rest-dialog{width:calc(100% - 10px);max-height:98svh}.rest-shell{padding:20px 16px}.rest-camera{min-height:250px}.rest-camera video,.rest-camera img{height:min(48vh,360px)}.rest-shell .dialog-head{gap:12px}.rest-shell .dialog-head h2{font-size:1.45rem}}

/* Corrección administrativa de controles de ruta */
.route-edit-dialog{width:min(720px,calc(100% - 24px));max-height:94vh}.route-edit-dialog form{padding:26px;display:grid;gap:18px}.route-edit-dialog .dialog-head{padding:0;align-items:flex-start}.route-edit-dialog .dialog-copy{margin:5px 0 0;color:var(--muted);font-size:.88rem}.route-edit-fields{padding:0}.route-edit-fields textarea{width:100%;border:1px solid #c9d7da;border-radius:9px;padding:11px 12px;resize:vertical;font:inherit;line-height:1.45}.route-edit-fields small{color:var(--muted);font-size:.78rem}.route-control-edit{border-color:#9fc7c3!important;color:#176b64!important;background:#edf8f6!important}.route-control-edit:hover{background:#dff2ee!important}
@media(max-width:600px){.route-edit-dialog{width:calc(100% - 10px);max-height:98svh}.route-edit-dialog form{padding:19px 15px}.route-edit-dialog .dialog-actions{display:grid;grid-template-columns:1fr}.route-edit-dialog .dialog-actions button{width:100%}}

/* Edición por el conductor de su ruta actualmente en curso */
.driver-active-edit-toggle{width:100%;margin:0 0 14px;border-color:#9fc7c3;color:#176b64;background:#edf8f6}.driver-active-edit-toggle:hover{background:#dff2ee}.driver-active-edit{margin:0 0 18px;padding:16px;border:1px solid #9fc7c3;border-radius:12px;background:#fff}.driver-active-edit textarea{width:100%;border:1px solid #c9d7da;border-radius:9px;padding:11px 12px;resize:vertical;font:inherit;line-height:1.45}.driver-active-edit small{color:var(--muted);font-size:.78rem}.driver-active-edit-actions{display:flex;justify-content:flex-end;gap:9px}.driver-active-edit[hidden]{display:none!important}
@media(max-width:560px){.driver-active-edit{padding:13px}.driver-active-edit-actions{display:grid;grid-template-columns:1fr}.driver-active-edit-actions button{width:100%}}
