:root{--navy:#12213b;--blue:#1769e0;--blue2:#eaf2ff;--bg:#f4f7fb;--text:#223047;--muted:#6b778c;--line:#dce3ee;--green:#d8f5df;--green2:#17823b;--red:#ffe0e0;--red2:#c93636;--yellow:#fff3b7;--purple:#ead9ff;--orange:#ffe1b6;--gray:#e7ebf0;--shadow:0 10px 30px #15243d18}
*{box-sizing:border-box}body{margin:0;font-family:Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}.hidden{display:none!important}button{border:0;border-radius:8px;padding:9px 14px;cursor:pointer;background:var(--blue);color:#fff;font-weight:600}button:hover{filter:brightness(.96)}button.secondary{background:#eef3fb;color:#27415f}button.ghost{background:#ffffff18;border:1px solid #ffffff30}.primary{background:var(--blue)}.wide{width:100%}.login-shell{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#12213b,#244b82)}.login-card{width:min(400px,92vw);background:#fff;border-radius:18px;padding:32px;box-shadow:0 30px 80px #0005}.login-card h1{margin:12px 0 3px}.login-card p{color:var(--muted)}label{display:block;font-weight:600;font-size:14px}input,select,textarea{width:100%;border:1px solid #cfd8e6;border-radius:8px;padding:10px 11px;margin:6px 0 13px;background:#fff;color:var(--text)}textarea{min-height:82px;resize:vertical}.logo{width:56px;height:56px;display:grid;place-items:center;background:linear-gradient(135deg,var(--navy),var(--blue));color:#fff;border-radius:15px;font-weight:800;font-size:21px}.logo.small{width:40px;height:40px;border-radius:10px;font-size:16px}.topbar{height:68px;padding:0 22px;background:linear-gradient(90deg,var(--navy),#1f477c);color:#fff;display:flex;align-items:center;justify-content:space-between}.brand,.top-actions{display:flex;align-items:center;gap:12px}.brand small{display:block;color:#c8d5e7}.workspace{display:grid;grid-template-columns:220px 1fr;min-height:calc(100vh - 68px)}.sidebar{background:#fff;border-right:1px solid var(--line);padding:18px 12px;display:flex;flex-direction:column;gap:5px}.nav-item{background:transparent;color:#40516a;text-align:left;padding:11px 13px}.nav-item.active{background:var(--blue2);color:#1259c3}.sidebar-foot{margin-top:auto;border-top:1px solid var(--line);padding:15px 10px;display:flex;flex-direction:column;gap:7px;color:var(--muted);font-size:12px}.sidebar-foot small{font-weight:700;color:#34445c}.content{padding:22px;min-width:0}.page{max-width:1550px;margin:auto}.page-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:15px}.page-head h2{margin:0 0 4px}.page-head p{margin:0;color:var(--muted)}.head-actions{display:flex;gap:8px;align-items:center}.head-actions input{margin:0;width:auto}.legend{display:flex;flex-wrap:wrap;gap:13px;background:#fff;padding:10px 14px;border-radius:10px;border:1px solid var(--line);margin-bottom:14px;font-size:13px}.legend span{display:flex;align-items:center;gap:6px}.dot{width:13px;height:13px;border-radius:4px;display:inline-block}.dot.free{background:var(--yellow)}.dot.own{background:var(--green)}.dot.other{background:var(--red)}.dot.tentative{background:var(--purple)}.dot.probable{background:var(--orange)}.dot.blocked{background:#8c54b4}.dot.unavailable{background:var(--gray)}.control-grid{display:grid;grid-template-columns:minmax(700px,1fr) 330px;gap:15px}.calendar-card,.info-panel,.card{background:#fff;border:1px solid var(--line);border-radius:14px;box-shadow:var(--shadow)}.calendar-card{padding:12px}.weekday-row,.calgrid{display:grid;grid-template-columns:repeat(7,1fr);gap:7px}.weekday-row{padding:5px 0 9px;text-align:center;color:var(--muted);font-size:13px}.day{min-height:132px;border:1px solid var(--line);border-radius:10px;padding:8px;background:#fff;cursor:pointer;position:relative;transition:.15s}.day:hover{transform:translateY(-1px);box-shadow:0 7px 18px #16243a1d}.day.outside{opacity:.42}.day.unavailable{background:#f0f2f5;color:#7d8794;cursor:not-allowed}.day.free{background:var(--yellow);border-color:#ead77b}.day.own{background:#f1fcf4;border-color:#9ed7ab}.day.other{background:#fff7f7;border-color:#efb6b6}.day.has-container{box-shadow:inset 0 4px 0 #a775d0}.day.confirmed-container{box-shadow:inset 0 4px 0 #744095}.day-num{font-weight:800;font-size:15px;display:flex;justify-content:space-between}.icons{font-size:13px;letter-spacing:2px}.event{margin-top:7px;padding:6px;border-radius:7px;font-size:11px;line-height:1.3;background:#eef3f8}.day.free .event{background:#ffe88a;color:#4d4100;font-weight:600}.event.own{background:var(--green)}.event.other{background:var(--red)}.event.container{background:var(--purple)}.event.probable{background:var(--orange)}.event.blocked{background:#8c54b4;color:#fff}.capacity{height:6px;background:#dfe5ec;border-radius:8px;margin-top:6px;overflow:hidden}.capacity i{height:100%;display:block;background:#2d7be8}.info-panel{padding:18px;min-height:560px;position:sticky;top:15px;align-self:start}.empty-state{text-align:center;color:var(--muted);padding:90px 15px}.empty-state span{font-size:42px}.info-panel h3{margin-top:0}.detail-date{font-size:22px;font-weight:800}.detail-block{border-top:1px solid var(--line);padding:13px 0}.kv{display:grid;grid-template-columns:115px 1fr;gap:6px;font-size:13px}.kv b{color:#66758a}.status{display:inline-block;padding:4px 8px;border-radius:999px;background:#eaf2ff;color:#195db8;font-size:12px;font-weight:700}.panel-actions{display:flex;flex-wrap:wrap;gap:7px;margin-top:12px}.stats{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:13px}.stat-card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:18px;box-shadow:var(--shadow)}.stat-card strong{font-size:29px}.stat-card small{display:block;color:var(--muted);margin-top:4px}.two-col{display:grid;grid-template-columns:1.4fr 1fr;gap:15px;margin-top:15px}.card{padding:18px}.compact{padding:15px;margin-bottom:14px}.list-item{display:grid;grid-template-columns:1fr auto;gap:12px;padding:13px 0;border-bottom:1px solid var(--line)}.list-item:last-child{border-bottom:0}.list-item p{margin:4px 0;color:var(--muted)}.selector{margin-bottom:14px}.selector label{max-width:700px}.tabs{display:flex;gap:5px;border-bottom:1px solid var(--line);margin-bottom:14px}.tabs button{background:transparent;color:#4e5f76;border-radius:8px 8px 0 0}.tabs button.active{background:#fff;color:var(--blue);border:1px solid var(--line);border-bottom-color:#fff;margin-bottom:-1px}.doc-pane{background:#fff;border:1px solid var(--line);border-radius:0 12px 12px 12px;padding:16px}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:9px 10px;border-bottom:1px solid #e5eaf1;text-align:left;white-space:nowrap}th{background:#f5f7fa;color:#536177;position:sticky;top:0}.form-row{display:grid;grid-template-columns:1fr auto;gap:10px}.align-end{align-self:end;margin-bottom:13px}.action-row{display:flex;gap:8px;flex-wrap:wrap}.msg.error{background:#fee8e7;color:#a92922;padding:9px;border-radius:8px}.msg.success{background:#e1f7e7;color:#18723a;padding:9px;border-radius:8px}.modal{position:fixed;inset:0;background:#0d182999;display:grid;place-items:center;padding:20px;z-index:50}.modal-card{width:min(800px,96vw);max-height:92vh;overflow:auto;background:#fff;border-radius:16px;padding:22px;box-shadow:0 30px 80px #0006}.modal-head{display:flex;justify-content:space-between;align-items:start}.modal-head h2{margin-top:0}.close{background:#edf1f6;color:#40516a}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.modal-tabs{margin-top:12px}.conflict-card{border-left:5px solid #ed8a18;margin-bottom:12px}.progress-label{display:flex;justify-content:space-between;font-size:12px}.progress{height:8px;background:#e2e7ed;border-radius:10px;overflow:hidden}.progress i{display:block;height:100%;background:#1d73dc}.timeline{border-left:2px solid #cfd9e8;margin-left:7px;padding-left:17px}.timeline-item{position:relative;margin-bottom:14px}.timeline-item:before{content:"";position:absolute;width:10px;height:10px;border-radius:50%;background:var(--blue);left:-23px;top:4px}.print-title{display:none}@media(max-width:1100px){.control-grid{grid-template-columns:1fr}.info-panel{position:static;min-height:auto}.workspace{grid-template-columns:82px 1fr}.sidebar .nav-item{font-size:0;text-align:center}.sidebar .nav-item:first-letter{font-size:20px}.sidebar-foot{display:none}.stats{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.workspace{display:block}.sidebar{flex-direction:row;overflow:auto;border-right:0;border-bottom:1px solid var(--line);padding:8px}.sidebar .nav-item{font-size:12px;white-space:nowrap}.content{padding:12px}.calgrid,.weekday-row{gap:3px}.day{min-height:95px;padding:5px}.event{font-size:9px}.stats,.two-col,.form-grid{grid-template-columns:1fr}.page-head{align-items:flex-start;flex-direction:column}}@media print{.topbar,.sidebar,.page-head .head-actions,.tabs,.action-row,button{display:none!important}.workspace{display:block}.content{padding:0}.page{display:none!important}#reports{display:block!important}.card{border:0;box-shadow:none}.print-title{display:block}}

/* V5.2 Dashboard interactivo */
.stat-card.clickable{display:block;width:100%;text-align:left;color:var(--text);cursor:pointer}.stat-card.clickable span{display:block;margin-top:10px;color:var(--blue);font-size:12px;font-weight:700}.stat-card.clickable:hover{transform:translateY(-2px);box-shadow:0 14px 32px #15243d25}.dashboard-grid{display:grid;grid-template-columns:1.45fr 1fr;gap:15px;margin-top:15px}.section-title{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.section-title h3{margin:0}.section-title p{margin:4px 0 12px;color:var(--muted)}.work-item{display:grid;grid-template-columns:auto 1fr auto;gap:12px;align-items:center;padding:13px 10px;border-bottom:1px solid var(--line);border-left:4px solid #6d8fbd}.work-item:last-child{border-bottom:0}.work-item p{margin:4px 0;color:var(--muted)}.work-item small{color:#718096}.work-item.critical{border-left-color:#d93636}.work-item.warning{border-left-color:#ed8a18}.work-item.preventive{border-left-color:#d7b51f}.work-item.info{border-left-color:#2975d6}.priority{font-size:17px}.alert-line{padding:11px 10px;border-radius:9px;margin-bottom:8px;background:#f4f7fb;border-left:4px solid #6d8fbd}.alert-line b,.alert-line span{display:block}.alert-line span{color:var(--muted);font-size:12px;margin-top:3px}.alert-line.critical{border-left-color:#d93636;background:#fff1f1}.alert-line.warning{border-left-color:#ed8a18;background:#fff7ea}.alert-line.preventive{border-left-color:#d7b51f;background:#fffbea}.empty-mini{padding:24px;text-align:center;color:var(--muted)}@media(max-width:900px){.dashboard-grid{grid-template-columns:1fr}}

.empty-occupancy{margin-top:14px;padding:12px;border:1px dashed #aab8ca;border-radius:10px;background:#f7f9fc;color:#4f6480}.empty-occupancy p{margin:4px 0 0}.admin-only.hidden{display:none!important}

/* CristaLog 6.0 - Asistente de programación */
.wizard-steps{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin:12px 0 16px}.wizard-steps span{padding:8px 6px;border-radius:8px;background:#eef3f8;color:#607086;text-align:center;font-size:12px;font-weight:700}.wizard-steps span.active{background:#dbeaff;color:#145bbd}.validation-banner,.load-note,.confirm-summary{display:flex;gap:8px;align-items:flex-start;padding:11px 12px;border-radius:10px;margin:10px 0 14px}.validation-banner{background:#eaf7ee;color:#226a3b}.load-note{background:#eef4ff;color:#274b79;flex-direction:column}.confirm-summary{background:#fff8df;color:#6c5700;flex-direction:column}.form-grid small,label small{display:block;color:#718096;font-weight:400;line-height:1.35;margin-top:-8px;margin-bottom:10px}.modal-card input[readonly]{background:#f1f4f8;color:#41526a;cursor:not-allowed}@media(max-width:700px){.wizard-steps{grid-template-columns:1fr 1fr}.wizard-steps span:last-child{grid-column:1/-1}}

.context-focus{animation:contextPulse .8s ease-in-out 3;box-shadow:0 0 0 4px rgba(23,105,224,.28)!important}
@keyframes contextPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.025)}}
.city-menu{display:flex;flex-direction:column;gap:6px}.operational-layout{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(280px,1fr);gap:16px;margin-top:16px}.city-stats .stat-card span{display:none}.next-dispatch-card{min-height:240px}.dispatch-hero{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:start}.dispatch-date{font-size:1.6rem;font-weight:800}.dispatch-route{font-size:1.15rem;font-weight:700;margin:8px 0}.dispatch-meta{display:grid;grid-template-columns:auto 1fr;gap:7px 14px;margin-top:14px}.process-steps{display:grid;grid-template-columns:repeat(6,minmax(110px,1fr));gap:10px;margin-top:16px}.process-step{padding:14px 10px;border-radius:12px;background:#edf2f8;border:1px solid #d9e2ef;text-align:center}.process-step.done{background:#e6f8ee;border-color:#9adbb5}.process-step.active{background:#fff5c9;border-color:#e7c13d;box-shadow:0 0 0 2px rgba(231,193,61,.18)}.process-step.locked{opacity:.55}.process-step b{display:block;margin-bottom:5px}.quick-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}.simple-head{align-items:center}.city-alert{padding:12px;border-left:4px solid #e1b800;background:#fff9df;border-radius:8px;margin-bottom:10px}.city-alert.critical{border-color:#c62828;background:#ffeded}.city-alert.info{border-color:#2474d2;background:#edf5ff}@media(max-width:900px){.operational-layout{grid-template-columns:1fr}.process-steps{grid-template-columns:repeat(2,1fr)}}

.day.urgent-own{background:#fff3cd;border-color:#f0ad00}.urgent-review-btn{margin-left:10px;background:#f0ad00;color:#172b4d;border:0;padding:10px 14px;border-radius:8px;font-weight:700}

/* CristaLog 8.2 - Modal compacto Portal de Centros de Operacion */
.request-modal-card{width:min(920px,96vw);max-height:calc(100vh - 28px);overflow:hidden;padding:18px 22px}
.request-head h2{margin-bottom:3px}.request-head p{margin:0;color:var(--muted)}
.request-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 14px;margin-top:10px}
.request-grid label,.estimate-grid label,.request-notes{margin:0}
.request-grid input,.request-grid select,.estimate-grid input,.request-notes textarea{margin:4px 0 0;padding:8px 10px;min-height:36px}
.request-grid small{margin:3px 0 0;font-size:11px;line-height:1.2}
.estimate-box{border:1px solid var(--line);border-radius:11px;margin:10px 0 8px;padding:8px 12px 7px;background:#f8fafc}
.estimate-box legend{padding:0 7px;font-weight:800;color:#41526a;font-size:13px}
.estimate-box>small{display:block;margin-top:4px;color:#718096;font-size:11px}
.estimate-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.request-notes textarea{min-height:54px;max-height:70px;resize:none}
.compact-banner{margin:8px 0;padding:8px 10px;font-size:12px}
.request-actions{justify-content:flex-end;margin-top:8px}.request-actions button{min-width:145px}
.compact-msg{margin:7px 0 0}
@media(max-height:700px){.request-modal-card{padding:14px 18px}.request-head p,.request-grid small,.estimate-box>small{font-size:10px}.request-grid{gap:5px 12px}.estimate-box{margin:7px 0 5px}.request-notes textarea{min-height:45px}.compact-banner{margin:5px 0;padding:6px 9px}}
@media(max-width:720px){.request-modal-card{overflow:auto;max-height:94vh}.request-grid,.estimate-grid{grid-template-columns:1fr}.request-notes textarea{min-height:70px}.request-actions{position:sticky;bottom:0;background:#fff;padding-top:8px}}

/* V8.2.1: solicitud urgente visible junto a la aprobada */
.urgent-hero{border:1px solid #f2b84b;background:#fff8df;margin-bottom:12px}
.urgent-status{background:#ffe0a8;color:#805000}
.urgent-note{margin:8px 0 0;color:#7a5a16}
.urgent-request-row{border-left:4px solid #f2b84b}
.city-alert.preventive{border-left-color:#e3b800;background:#fff9df}


/* CristaLog 8.3 - Gestión unificada de incidencias */
.incident-filters{display:grid;grid-template-columns:minmax(180px,240px) minmax(180px,240px) 1fr;gap:16px;align-items:end;margin-bottom:16px}
.incident-summary{text-align:right;color:#51627a;padding-bottom:10px}
.incident-card{display:grid;grid-template-columns:1fr minmax(240px,360px);gap:20px;align-items:center;border-left:5px solid #7b8aa0;margin-bottom:12px}
.incident-card.critical{border-left-color:#d9363e}.incident-card.warning{border-left-color:#d7a500}.incident-card.info{border-left-color:#3578d4}
.incident-head{display:flex;gap:10px;align-items:center}.incident-priority{font-size:.8rem;font-weight:700;color:#5d6b7d}
.incident-meta{display:flex;flex-wrap:wrap;gap:10px 20px;color:#52627a;font-size:.92rem}
.incident-actions{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:end}.incident-date-label{min-width:220px;margin:0}
@media(max-width:900px){.incident-filters,.incident-card{grid-template-columns:1fr}.incident-summary{text-align:left}.incident-actions{justify-content:flex-start}}

.focus-pulse{animation:focusPulse .6s ease-in-out 3}@keyframes focusPulse{50%{outline:4px solid #1769e0;box-shadow:0 0 0 5px rgba(23,105,224,.18)}}


/* CristaLog 8.3.5 - Compactacion visual del Inicio de ciudades */
#operativo .page-head{margin-bottom:8px}
#operativo .page-head h2{margin-bottom:2px}
#operativo .page-head p{margin:2px 0}
#operativo .stats{gap:10px;margin-top:8px}
#operativo .stat-card{padding:10px 14px;min-height:66px}
#operativo .stat-card b{font-size:1.45rem;line-height:1}
#operativo .city-home-actions{margin:9px 0 0;display:grid;grid-template-columns:repeat(2,minmax(210px,1fr));gap:10px}
#operativo .city-home-actions button{padding:10px 14px;min-height:40px}
#operativo .operational-layout{margin-top:10px;gap:12px;grid-template-columns:minmax(0,1.55fr) minmax(280px,.95fr)}
#operativo .card{padding:14px}
#operativo .next-dispatch-card{min-height:188px}
#operativo .section-title p{margin:3px 0 8px}
#operativo .dispatch-date{font-size:1.35rem}
#operativo .dispatch-route{font-size:1.05rem;margin:5px 0}
#operativo .dispatch-meta{gap:4px 12px;margin-top:8px}
#operativo .city-alert{padding:9px 10px;margin-bottom:7px}
#operativo .city-alert p{margin:3px 0}
#operativo .process-card{margin-top:10px;padding-top:12px;padding-bottom:12px}
#operativo .process-card h3{margin:0 0 3px}
#operativo .process-card>p{margin:3px 0 7px}
#operativo .process-steps{gap:7px;margin-top:7px;grid-template-columns:repeat(5,minmax(105px,1fr))}
#operativo .process-step{padding:9px 6px}
#operativo .process-step b{margin-bottom:2px;font-size:.91rem}
#operativo .process-step small{font-size:.76rem}
@media(max-height:820px) and (min-width:901px){
  #operativo .page-head{margin-bottom:5px}
  #operativo .stats{margin-top:5px}
  #operativo .stat-card{min-height:58px;padding:8px 12px}
  #operativo .city-home-actions{margin-top:6px}
  #operativo .operational-layout{margin-top:7px}
  #operativo .next-dispatch-card{min-height:165px}
  #operativo .card{padding:11px 13px}
  #operativo .process-card{margin-top:7px;padding-top:9px;padding-bottom:9px}
  #operativo .process-step{padding:7px 5px}
}
@media(max-width:900px){
  #operativo .city-home-actions{grid-template-columns:1fr}
  #operativo .process-steps{grid-template-columns:repeat(2,1fr)}
}

/* CristaLog 8.3.5.1 - Compactacion visual de Mi Calendario */
#control .page-head{margin-bottom:8px}
#control .page-head h2{margin-bottom:1px}
#control .page-head p{font-size:13px}
#control .head-actions{gap:6px}
#control .head-actions input{height:36px;padding:6px 10px}
#control .head-actions button{padding:8px 12px}
#control .legend{gap:9px;padding:6px 10px;margin-bottom:9px;font-size:11px;line-height:1.1}
#control .legend span{gap:4px}
#control .legend .dot{width:11px;height:11px}
#control .control-grid{grid-template-columns:minmax(650px,1fr) 300px;gap:10px}
#control .calendar-card{padding:8px}
#control .weekday-row,#control .calgrid{gap:5px}
#control .weekday-row{padding:2px 0 5px;font-size:12px}
#control .calgrid{grid-auto-rows:minmax(82px,calc((100vh - 268px)/6))}
#control .day{min-height:0;height:auto;padding:5px 6px;border-radius:8px}
#control .day-num{font-size:13px}
#control .icons{font-size:11px;letter-spacing:1px}
#control .event{margin-top:4px;padding:4px 5px;font-size:9.5px;line-height:1.2;border-radius:6px}
#control .capacity{height:4px;margin-top:4px}
#control .info-panel{padding:13px;min-height:calc(100vh - 201px);max-height:calc(100vh - 201px);overflow:auto;top:8px}
#control .empty-state{padding:55px 10px}
#control .empty-state span{font-size:34px}
#control .empty-state h3{margin:9px 0 5px}
#control .empty-state p{margin:0;font-size:13px}
#control .detail-date{font-size:19px}
#control .detail-block{padding:9px 0}
#control .panel-actions{margin-top:8px}
@media(max-height:820px) and (min-width:1101px){
  .content{padding-top:14px;padding-bottom:12px}
  #control .page-head{margin-bottom:5px}
  #control .legend{margin-bottom:6px;padding:5px 9px}
  #control .calendar-card{padding:6px}
  #control .weekday-row{padding-bottom:3px}
  #control .calgrid{grid-auto-rows:minmax(72px,calc((100vh - 238px)/6))}
  #control .day{padding:4px 5px}
  #control .event{margin-top:3px;padding:3px 4px;font-size:9px}
  #control .info-panel{min-height:calc(100vh - 178px);max-height:calc(100vh - 178px);padding:11px}
}
@media(max-width:1100px){
  #control .control-grid{grid-template-columns:1fr}
  #control .calgrid{grid-auto-rows:auto}
  #control .day{min-height:95px}
  #control .info-panel{min-height:auto;max-height:none;overflow:visible}
}

/* CristaLog 8.3.5.2 - Vista previa y marca Cristacryl */
.report-filters{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr)) auto;gap:10px;align-items:end;margin-bottom:12px;padding:13px}
.report-filters input,.report-filters select{margin-bottom:0}
.align-report{margin-bottom:0;height:41px}
.report-summary{display:grid;grid-template-columns:repeat(7,1fr);gap:9px;margin:0 0 12px}
.report-summary>div{background:#fff;border:1px solid var(--line);border-radius:10px;padding:9px 12px;box-shadow:var(--shadow)}
.report-summary strong{display:block;font-size:20px}.report-summary span{font-size:12px;color:var(--muted)}
.report-empty{text-align:center;color:var(--muted);padding:28px!important}
.report-modal-card{width:min(1180px,97vw);max-height:95vh}
.report-modal-head{align-items:center;border-bottom:1px solid var(--line);padding-bottom:10px;margin-bottom:10px}
.report-print-header{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #1e3f6d;padding-bottom:10px;margin-bottom:12px;gap:24px}.report-print-header img{width:150px;max-height:54px;object-fit:contain;flex:0 0 auto}.report-print-header h1,.report-print-header h2,.report-print-header h3,.report-print-header p{margin:0;text-align:right}.report-print-header h1{color:#183b68;font-size:27px;letter-spacing:.3px}.report-print-header h3{font-size:13px;margin-top:1px;color:#40546f}.report-print-header h2{font-size:17px;margin-top:3px}.report-print-header p{font-size:11px;color:#58677b;margin-top:5px;line-height:1.4}
.preview-metrics{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-bottom:14px}.preview-metrics>div{border:1px solid var(--line);border-radius:9px;padding:9px;text-align:center;background:#f8fafc}.preview-metrics b{display:block;font-size:20px;color:#153f77}.preview-metrics span{font-size:11px;color:var(--muted)}
.preview-table{max-height:48vh}.report-footer{text-align:center;border-top:1px solid var(--line);margin-top:12px;padding-top:9px;font-size:11px;color:var(--muted)}.report-preview-actions{justify-content:flex-end;margin-top:14px}
@media(max-width:1050px){.report-filters{grid-template-columns:repeat(3,1fr)}.report-summary,.preview-metrics{grid-template-columns:repeat(3,1fr)}}
@media(max-width:700px){.report-filters{grid-template-columns:1fr 1fr}.report-summary,.preview-metrics{grid-template-columns:repeat(2,1fr)}.report-print-header{display:block}.report-print-header img{width:135px}.report-print-header h1,.report-print-header h2,.report-print-header h3,.report-print-header p{text-align:left}}
@media print{
 body.printing-report .topbar,body.printing-report .workspace,body.printing-report #modal .modal-head,body.printing-report #modal .report-preview-actions{display:none!important}
 body.printing-report #modal{display:block!important;position:static;background:#fff;padding:0}
 body.printing-report #modal .modal-card{display:block!important;width:100%;max-height:none;overflow:visible;box-shadow:none;padding:0}
 body.printing-report #printableReport{display:block!important}
 .preview-table{max-height:none;overflow:visible}.preview-table th{position:static}
}

/* CristaLog 8.4 - Administración y seguridad */
.security-stats{margin-bottom:14px}.admin-pane .table-wrap{max-height:62vh}.form-grid .span-2{grid-column:1/-1}.admin-strict.hidden{display:none!important}

/* CristaLog 8.4.2 - estados administrativos diferenciados */
.security-stats{grid-template-columns:repeat(5,minmax(130px,1fr))}.user-state{display:inline-block;padding:4px 8px;border-radius:999px;font-size:12px;font-weight:700;margin:2px 4px 2px 0}.user-state.active{background:#e1f7e7;color:#18723a}.user-state.inactive{background:#edf0f4;color:#566273}.user-state.blocked{background:#fee8e7;color:#a92922}.user-state.password{background:#fff2c7;color:#8a6500}@media(max-width:1100px){.security-stats{grid-template-columns:repeat(3,1fr)}}@media(max-width:700px){.security-stats{grid-template-columns:1fr 1fr}}

/* CristaLog 8.4.3 - información de bloqueo temporal */
.lock-info{display:inline-block;max-width:190px;color:#9f1239;font-weight:600;line-height:1.25}

/* CristaLog 8.5 */
.page-actions{display:flex;justify-content:flex-end;margin:10px 0}.admin-pane .table-wrap{margin-top:10px}

/* V9.0 RC1.2 - Identificacion de Centros de Operacion en rutas compartidas */
.route-centers-info{margin:8px 0 2px;padding:9px 12px;border:1px solid #cfe0f5;border-radius:10px;background:#f3f8ff;color:#294a72;font-size:12px;line-height:1.35}
.route-centers-info b{display:block;margin-bottom:4px;color:#183b66}
.route-center-chain{font-weight:700;color:#1f4f87;margin:2px 0 4px}
.route-centers-info small{display:block;margin:0;color:#607086;font-size:11px}
.route-arrow{padding:0 4px;color:#6c83a1}

/* V9.0 RC1.3 - Estado de bloqueo sincronizado con el servidor */

/* Boton para acciones de cancelacion */
button.danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}
button.danger:hover {
    background: #bb2d3b;
    border-color: #b02a37;
}

/* ==========================================================
   CristaLog 9.0 RC1.3
   Ajuste responsive movil - 2026-09-10
   NO afecta escritorio
   ========================================================== */

@media (max-width:700px){

  /* ENCABEZADO */
  .topbar{
    height:auto !important;
    min-height:64px;
    padding:8px 10px !important;
    gap:8px;
  }

  .brand{
    min-width:0;
    flex:1 1 auto;
    gap:7px;
  }

  .brand > div{
    min-width:0;
  }

  .brand b{
    font-size:13px;
    line-height:1.15;
    white-space:nowrap;
  }

  .brand small{
    display:block;
    font-size:9px;
    line-height:1.15;
    white-space:normal;
    max-width:150px;
  }

  .logo.small{
    flex:0 0 36px;
    width:36px;
    height:36px;
  }

  .top-actions{
    flex:0 0 auto;
    gap:5px;
    font-size:12px;
  }

  /* ESTRUCTURA */
  .workspace{
    display:block !important;
    width:100%;
  }

  /* MENU HORIZONTAL PARA CELULAR */
  .sidebar{
    display:flex !important;
    flex-direction:row !important;
    align-items:center;
    width:100% !important;
    max-width:100%;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    white-space:nowrap;
    padding:6px 8px !important;
    gap:4px !important;
    border-right:0 !important;
    border-bottom:1px solid var(--line);
    box-sizing:border-box;
    -webkit-overflow-scrolling:touch;
  }

  .sidebar .nav-item{
    display:flex;
    flex:0 0 auto !important;
    width:auto !important;
    margin:0 !important;
    padding:8px 10px !important;
    font-size:11px !important;
    white-space:nowrap !important;
  }

  .sidebar-foot{
    display:none !important;
  }

  /* CONTENIDO */
  .content{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
    padding:12px 10px !important;
    box-sizing:border-box;
  }

  .page{
    width:100%;
    max-width:none;
  }

  .dashboard-grid{
    grid-template-columns:1fr !important;
  }
}


/* CristaLog - menu horizontal movil */
@media (max-width:700px){

  .sidebar .city-menu,
  .sidebar .admin-menu{
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    gap:4px !important;
    width:max-content;
    min-width:100%;
  }

  .sidebar .city-menu .nav-item,
  .sidebar .admin-menu .nav-item{
    flex:0 0 auto !important;
    width:auto !important;
    white-space:nowrap !important;
  }

}


/* ==========================================================
   CristaLog - Calendario responsive movil
   Solo pantallas <= 700px
   ========================================================== */
@media (max-width:700px){

  .calendar-card{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    -webkit-overflow-scrolling:touch;
    box-sizing:border-box;
  }

  .calendar-card .weekday-row,
  .calendar-card .calgrid{
    width:620px;
    min-width:620px;
    grid-template-columns:repeat(7,1fr) !important;
  }

  .calendar-card .day{
    min-width:0;
    overflow:hidden;
  }

}


/* ==========================================================
   CristaLog - Mis solicitudes responsive movil
   Solo pantallas <= 700px
   ========================================================== */
@media (max-width:700px){

  #reservationList > .card.list-item{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:12px !important;
  }

  #reservationList > .card.list-item > div:first-child{
    width:100% !important;
    min-width:0 !important;
  }

  #reservationList > .card.list-item > div:first-child b{
    display:block;
    font-size:14px;
    line-height:1.3;
  }

  #reservationList > .card.list-item > div:first-child p{
    margin:5px 0 0 !important;
    line-height:1.35;
  }

  #reservationList > .card.list-item > div:last-child{
    width:100% !important;
    display:flex !important;
    align-items:center !important;
    justify-content:flex-end !important;
    flex-wrap:wrap !important;
    gap:6px !important;
  }

  #reservationList > .card.list-item .status{
    margin-right:auto !important;
  }

}


/* ==========================================================
   CristaLog - Contenedores responsive movil
   Solo pantallas <= 700px
   ========================================================== */
@media (max-width:700px){

  #containerList > .card.list-item{
    display:flex !important;
    flex-direction:column !important;
    align-items:stretch !important;
    gap:10px !important;
    padding:12px !important;
  }

  #containerList > .card.list-item > div:first-child{
    width:100% !important;
    min-width:0 !important;
  }

  #containerList > .card.list-item > div:last-child{
    width:100% !important;
    display:flex !important;
    justify-content:flex-end !important;
  }

  #containerList > .card.list-item > div:last-child button{
    width:100% !important;
    min-height:42px;
  }

}


/* ==========================================================
   CristaLog - Header Despachos responsive movil
   NO afecta escritorio
   ========================================================== */
@media (max-width:700px){

  /* Despachos tiene un boton adicional en el topbar */
  .topbar:has(#incidentTopButton){
    flex-wrap:wrap !important;
    height:auto !important;
    min-height:64px !important;
    padding:8px 10px !important;
    gap:6px !important;
  }

  .topbar:has(#incidentTopButton) .brand{
    flex:1 1 120px !important;
    min-width:0 !important;
  }

  .topbar:has(#incidentTopButton) .top-actions{
    flex:0 1 auto !important;
    min-width:0 !important;
    gap:5px !important;
  }

  #incidentTopButton{
    order:3 !important;
    flex:0 0 100% !important;
    width:100% !important;
    margin:0 !important;
    padding:8px 10px !important;
    min-height:38px !important;
    white-space:normal !important;
    text-align:center !important;
    line-height:1.2 !important;
  }

}


/* ==========================================================
   CristaLog - Menu Despachos horizontal en movil
   Solo pantallas <= 700px
   ========================================================== */
@media (max-width:700px){

  .sidebar .admin-menu:not(.hidden){
    display:flex !important;
    flex-direction:row !important;
    flex-wrap:nowrap !important;
    gap:4px !important;
    width:max-content !important;
    min-width:100% !important;
    overflow:visible !important;
  }

  .sidebar .admin-menu:not(.hidden) .nav-item{
    display:flex !important;
    flex:0 0 auto !important;
    width:auto !important;
    margin:0 !important;
    padding:8px 10px !important;
    font-size:11px !important;
    white-space:nowrap !important;
  }

}


/* ==========================================================
   CristaLog - Tabs Carga Siesa responsive movil
   Solo pantallas <= 700px
   ========================================================== */
@media (max-width:700px){

  #load .tabs{
    width:100% !important;
    max-width:100% !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    flex-wrap:nowrap !important;
    box-sizing:border-box;
    -webkit-overflow-scrolling:touch;
  }

  #load .tabs button{
    flex:0 0 auto !important;
    white-space:nowrap !important;
  }

  #load .doc-pane{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    box-sizing:border-box;
    overflow-x:hidden !important;
  }

  #load #doc-assigned,
  #load #doc-trs,
  #load #doc-history{
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
  }

  #load textarea,
  #load input,
  #load select{
    max-width:100% !important;
    box-sizing:border-box;
  }

}


/* Fecha y hora actual - Centro de control */
.current-datetime{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  min-height:28px;
  margin:0 0 7px 0;
  padding:4px 10px;
  font-size:13px;
  color:#40516a;
  text-align:right;
}

@media (max-width:700px){
  .current-datetime{
    justify-content:center;
    text-align:center;
    font-size:11px;
    line-height:1.3;
    padding:5px 6px;
  }
}

/* Aviso visual - solicitudes urgentes */
.urgent-deadline-notice{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  margin:-2px 0 8px 0;
  padding:5px 10px;
  font-size:12px;
  font-weight:600;
  color:#9b2c2c;
  text-align:right;
}

@media (max-width:700px){
  .urgent-deadline-notice{
    justify-content:center;
    text-align:center;
    font-size:10px;
    line-height:1.3;
    padding:5px 8px;
    margin:0 0 7px 0;
  }
}

/* ==========================================================
   CristaLog - Ajuste vertical PC
   Evita scroll minimo en Centro de control / Mi calendario
   NO afecta movil
   ========================================================== */
@media (min-width:701px) and (max-height:900px){

  #control .page-head{
    margin-bottom:4px !important;
  }

  #control .legend{
    padding-top:3px !important;
    padding-bottom:3px !important;
    margin-bottom:3px !important;
  }

  #control .current-datetime{
    min-height:20px !important;
    padding:1px 8px !important;
    margin:0 !important;
    line-height:1.2 !important;
  }

  #control .urgent-deadline-notice{
    padding:2px 8px !important;
    margin:0 0 4px 0 !important;
    line-height:1.2 !important;
  }

  #control .control-grid{
    gap:8px !important;
  }

  .sidebar-foot{
    padding-top:8px !important;
    padding-bottom:8px !important;
  }

}


/* Ajuste fino vertical PC - Centro de control */
@media (min-width:701px) and (max-height:900px){

  #control{
    margin-top:-3px !important;
  }

  #control .calendar-card{
    padding-top:7px !important;
    padding-bottom:7px !important;
  }

  #control .weekday-row{
    padding-top:2px !important;
    padding-bottom:2px !important;
  }

  #control .day{
    min-height:0 !important;
  }

  .sidebar-foot{
    margin-top:auto !important;
    padding-top:5px !important;
    padding-bottom:4px !important;
  }

}

/* Ajuste final PC - elimina scroll vertical residual */
@media (min-width:701px) and (max-height:900px){

  .content{
    padding-bottom:2px !important;
  }

}


/* Ajuste final PC - sidebar sin scroll residual */
@media (min-width:701px) and (max-height:900px){

  .sidebar{
    padding-top:10px !important;
    padding-bottom:4px !important;
    gap:3px !important;
  }

  .sidebar .nav-item{
    padding-top:8px !important;
    padding-bottom:8px !important;
  }

  .sidebar-foot{
    padding-top:4px !important;
    padding-bottom:2px !important;
    gap:4px !important;
    font-size:11px !important;
    line-height:1.25 !important;
  }

}

/* ==========================================================
   CristaLog - Centro de control ajustado al alto del PC
   Elimina scroll vertical residual SOLO en calendario
   NO afecta movil ni otras pantallas
   ========================================================== */
@media (min-width:701px) and (max-height:900px){

  .workspace:has(#control:not(.hidden)){
    height:calc(100vh - 68px) !important;
    min-height:0 !important;
    overflow:hidden !important;
  }

  .content:has(#control:not(.hidden)){
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

  #control:not(.hidden){
    height:100% !important;
    min-height:0 !important;
    overflow:hidden !important;
    box-sizing:border-box !important;
  }

}

/* CristaLog - ajuste modal excepcional para PC de altura reducida */
@media (min-width:721px) and (max-height:850px){
  .request-modal-card{
    max-height:calc(100vh - 12px);
    padding:12px 20px;
    overflow:auto;
  }

  .request-modal-card .modal-head{
    margin-bottom:6px;
  }

  .request-modal-card .wizard-steps{
    margin-top:6px;
    margin-bottom:8px;
  }

  .request-modal-card .validation-banner{
    margin:6px 0;
    padding:7px 10px;
  }

  .request-modal-card .form-grid{
    gap:7px 12px;
  }

  .request-modal-card label{
    margin-bottom:3px;
  }

  .request-modal-card input,
  .request-modal-card select{
    padding:7px 10px;
    margin:3px 0 7px;
  }

  .request-modal-card textarea{
    min-height:58px;
    margin:3px 0 7px;
  }

  .request-modal-card .action-row{
    margin-top:6px;
  }
}
