:root{--navy:#0b2948;--navy-2:#123d68;--blue:#1672c4;--sky:#eaf4fc;--ink:#172536;--muted:#607187;--line:#d5dee8;--paper:#fff;--canvas:#edf1f5;--green:#18734a}*{box-sizing:border-box}body{margin:0;background:var(--canvas);color:var(--ink);font-family:"Avenir Next",Avenir,Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;letter-spacing:.005em}.app-shell{max-width:760px;min-height:100vh;margin:0 auto;background:var(--paper);padding:0 28px 48px;box-shadow:0 0 50px rgba(12,38,67,.08)}.topbar{display:flex;align-items:center;justify-content:space-between;min-height:86px;border-bottom:3px solid var(--navy)}.topbar>div:first-child{position:relative;padding-left:16px}.topbar>div:first-child:before{content:"";position:absolute;inset:3px auto 3px 0;width:4px;background:var(--blue)}h1,h2,h3,p{margin-top:0}h1{font-size:1.14rem;letter-spacing:.01em;margin:2px 0 0}.eyebrow{display:block;color:var(--blue);font-size:.8125rem;font-weight:800;letter-spacing:.12em}.header-actions{display:flex;align-items:center;gap:13px}.text-button{border:0;background:transparent;color:var(--blue);font:inherit;font-size:.8125rem;font-weight:800;cursor:pointer;padding:8px 4px}.status{display:inline-flex;align-items:center;gap:6px;font-size:.8125rem;font-weight:750;color:var(--green)}.status i{width:7px;height:7px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px #ddf3e7}.screen{display:none;padding-top:30px}.screen.active{display:block}.hero-card{border:1px solid #cad9e8;border-radius:4px;overflow:hidden;background:#f7fafc;margin-bottom:20px;padding:29px 28px 26px;position:relative}.hero-card:after{content:"CONTROL OPERATIVO";position:absolute;right:0;bottom:0;background:var(--navy);color:#c6e4ff;font-size:.8125rem;font-weight:800;letter-spacing:.13em;padding:8px 12px}.hero-card h2{max-width:480px;font-size:1.72rem;letter-spacing:-.035em;line-height:1.12;margin:9px 0 10px}.hero-card p{max-width:445px;margin:0;color:var(--muted);font-size:.94rem;line-height:1.5}.primary,.secondary{font:inherit;font-weight:800;border-radius:3px;padding:13px 16px;cursor:pointer;transition:background .15s ease,transform .15s ease}.primary:hover,.secondary:hover{transform:translateY(-1px)}.primary{background:var(--navy);color:#fff;border:1px solid var(--navy)}.secondary{color:var(--navy);background:#fff;border:1px solid #aabed1}.wide{width:100%;margin:2px 0 24px}.summary-card{border-left:4px solid var(--blue);background:#f5f8fb;padding:16px 17px;display:grid;grid-template-columns:1fr auto;gap:4px}.summary-card span,.summary-card small{color:var(--muted);font-size:.8125rem}.summary-card strong{font-size:1.65rem;line-height:1;color:var(--navy)}.summary-card small{grid-column:1/-1}.stepper{display:flex;gap:0;justify-content:space-between;margin:0 0 28px;border-bottom:1px solid var(--line);padding-bottom:16px;color:#8391a1;font-size:.8125rem}.stepper span{display:grid;place-items:center;width:28px;height:28px;border:1px solid #c5d2de;border-radius:50%;font-weight:800}.stepper .done{color:#fff;background:var(--navy);border-color:var(--navy)}.form-section{position:relative;padding:0 0 23px 17px;margin:0 0 22px;border-bottom:1px solid var(--line)}.form-section:before{content:"";position:absolute;left:0;top:0;width:3px;height:20px;background:var(--blue)}.form-section h2{font-size:1rem;letter-spacing:-.01em;margin-bottom:11px}label{display:block;font-size:.8125rem;font-weight:800;color:#33465b;margin:14px 0}input,textarea{width:100%;font:inherit;font-size:.93rem;color:var(--ink);border:1px solid #bdcbd9;border-radius:3px;padding:12px;margin-top:6px;background:#fff}input:focus,textarea:focus{outline:2px solid #b6daf6;border-color:var(--blue)}textarea{min-height:92px;resize:vertical}.muted{font-size:.8125rem;color:var(--muted);margin:10px 0}.rating-group{border:1px solid #d7e1ea;border-radius:3px;background:#f8fafc;padding:14px;font-size:.83rem;font-weight:800}.ratings{display:flex;gap:7px;margin-top:11px}.ratings button{width:38px;height:34px;border-radius:3px;border:1px solid #b7c7d6;background:#fff;color:var(--navy);font-weight:850}.ratings button.selected{background:var(--navy);border-color:var(--navy);color:#fff}.upload{padding:17px;border:1px dashed #8baac8;border-radius:3px;text-align:center;color:var(--navy);background:#f7fbff}.upload input{display:none}.preview{width:100%;max-height:220px;object-fit:cover;border-radius:3px;margin-top:8px}.report-success{display:grid;place-items:center;width:68px;height:68px;background:#e2f2e9;color:var(--green);font-size:2rem;border-radius:50%;margin:12px 0 17px}.report-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:25px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:9px;margin:23px 0}.metrics article{background:#f7f9fb;border:1px solid var(--line);border-top:3px solid var(--navy);padding:15px 12px}.metrics span,.metrics small{display:block;color:var(--muted);font-size:.8125rem}.metrics strong{display:block;font-size:1.45rem;color:var(--navy);margin:6px 0}.admin-section{padding:20px 0;border-top:1px solid var(--line)}.admin-section h3{font-size:.94rem;margin:0}.visit-item,.post-item{padding:13px 14px;border:1px solid var(--line);border-radius:3px;margin-bottom:8px;background:#fff}.visit-item strong,.post-item strong{display:block;font-size:.86rem}.visit-item span,.post-item span{color:var(--muted);font-size:.8125rem}.post-form{display:grid;grid-template-columns:1fr 1fr auto;gap:8px;margin:14px 0 12px}.post-form input{margin:0}.post-form .secondary{padding:10px 12px;font-size:.8125rem}@media(max-width:560px){.app-shell{padding:0 18px 36px}.hero-card{padding:24px 20px}.hero-card h2{font-size:1.5rem}.post-form{grid-template-columns:1fr}.post-form .secondary{width:100%}}@media print{body{background:#fff}.topbar,.report-actions{display:none}.app-shell{max-width:none;box-shadow:none}.screen{display:none!important}#report-screen{display:block!important}}
:root #start-screen :is(#shift-open,#vehicle-control-open,#start-visit,#deliveries-open,.enterprise-actions button) {background:#176de5;color:#fff;border:1px solid #789ff0;margin:0 0 10px;min-height:48px;border-radius:10px;font-size:1rem;font-weight:600;white-space:normal;line-height:1.4;width:100%}
:root #start-screen #start-visit {background:#176de5;border-color:#789ff0}
:root #start-screen #deliveries-open {margin-bottom:24px}
#shift-screen [hidden] {display:none!important}
#shift-screen :is(input,select) {width:100%;background:#333e4e;color:#fff;border:1px solid #697689;border-radius:10px;padding:12px}
#shift-screen label {color:#c0cfe0}
#shift-screen #shift-submit {margin-top:20px;background:#176de5;min-height:48px;border-radius:10px}
:root #start-screen :is(#shift-open,#start-visit,#deliveries-open):hover {background:#285bc4;transform:none}
#delivery-count-badge {margin-left:8px}
#delivery-count-badge[hidden] {display:none!important}
#deliveries-screen .section-title {flex-wrap:wrap}
#deliveries-screen .section-title h2 {font-size:1.25rem}
#deliveries-screen .muted {color:#c0cfe0}
.supervisor-dotations-tabs {display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0 16px}
.supervisor-dotations-tabs .ops-filter-tab {margin:0;min-height:48px;font-size:0.78rem;font-weight:700;padding:10px 8px;text-align:center;border-radius:8px;background:#333e4e;color:#fff;border:1px solid #697689;cursor:pointer;line-height:1.3}
.supervisor-dotations-tabs .ops-filter-tab.active:not(.btn-alert-beacon) {background:#176de5!important;color:#fff!important;border-color:#789ff0!important}
#tab-sup-pending:not(.btn-alert-beacon) {background:#333e4e!important;border:1px solid #697689!important;color:#fff!important;box-shadow:none!important;animation:none!important}
#tab-sup-pending.active:not(.btn-alert-beacon) {background:#176de5!important;border-color:#789ff0!important}
#tab-sup-pending.btn-alert-beacon {position:relative!important;background:#111d30!important;border:1.5px solid #ef4444!important;color:#fff!important;box-shadow:none!important;animation:beaconPulse 1.8s ease-in-out infinite!important}
:root #start-screen > button.wide {text-transform:uppercase}
:root #admin-posts-open {background:#176de5;color:#fff;min-height:52px;border-radius:10px;font-weight:700;margin-bottom:14px}
.admin-tool-screen [hidden] {display:none!important}
.admin-tool-screen .section-title,#posts-screen .section-title {flex-wrap:wrap;margin-bottom:20px}
.admin-tool-screen .ops-filters-box {background:#111d30;padding:14px;border-radius:10px}
.admin-tool-screen [data-range].active {background:#176de5;outline:2px solid #aac9ff}
.admin-tool-screen :is(label,.muted,.text-button),#posts-screen :is(label,.muted,.text-button) {color:#c0cfe0}
#posts-screen #post-search {background:#111d30;color:white;min-height:44px;border-radius:8px;padding:10px 14px;margin-bottom:16px}
#posts-screen .post-form {display:flex;flex-direction:column;gap:10px}
#posts-screen .post-item {background:#111d30;color:#fff;border-color:#4a5568;border-radius:8px}
#posts-screen .post-item span {color:#c0cfe0}
body:has(:is(.admin-tool-screen,#posts-screen).active) .app-shell {background:#0b1525;color:#fff}
body:has(:is(.admin-tool-screen,#posts-screen).active) .topbar {display:flex;flex-direction:column;align-items:center;padding:24px 18px;gap:10px;background:transparent}
body:has(:is(.admin-tool-screen,#posts-screen).active) .brand-logo {order:-1;width:238px;max-width:70vw}
body:has(:is(.admin-tool-screen,#posts-screen).active) .header-actions {display:none}
body:has(:is(.admin-tool-screen,#posts-screen).active) {overflow-y:auto!important;height:auto!important}
#btn-logistics-dotations {min-height:52px;border-radius:10px;font-weight:700;margin-bottom:20px;font-size:16px;background:#176de5;color:#fff}
#pending-badge-count {margin-left:8px;background:#e53e3e;color:#fff}
#pending-badge-count[hidden] {display:none!important}
.dotations-tabs {display:flex;flex-direction:column;gap:10px;margin:20px 0}
.ops-filter-tab {background:#333e4e;color:white;min-height:48px;border-radius:10px;white-space:normal}
.ops-filter-tab.active {background:#176de5;border-color:#aac9ff}
.dotation-progress {display:flex;gap:6px;list-style:none;padding:0;flex-wrap:wrap;font-size:.75rem;margin:16px 0}
.dotation-progress li {flex:1;min-width:85px;padding:10px 6px;border:1px solid #697689;border-radius:8px;color:#c0cfe0}
.dotation-progress .current {background:#176de5;color:#fff;border-color:#aac9ff}
.dotation-progress .done {background:#18543f;color:#c5ffe5}
#dotations-management-screen .ops-card button {min-height:44px;border-radius:8px;white-space:normal}
.btn-city-push {position:relative;isolation:isolate;overflow:hidden;background:linear-gradient(135deg,#176de5 0%,#123d68 100%)!important;border:1px solid #789ff0!important;color:#fff!important;touch-action:manipulation;transition:transform .16s ease,box-shadow .2s ease;-webkit-tap-highlight-color:transparent}
.btn-city-push.secondary {background:linear-gradient(135deg,#333e4e 0%,#1c2633 100%)!important;border-color:#697689!important}
.btn-city-push.alert {background:linear-gradient(135deg,#e53e3e 0%,#9b2c2c 100%)!important;border-color:#feb2b2!important}
.btn-city-push > span {position:relative;z-index:2}
.btn-city-push::before {content:"";position:absolute;z-index:1;top:-30%;left:-70%;width:45%;height:160%;pointer-events:none;background:linear-gradient(90deg,transparent,rgba(255,255,255,.3),transparent);transform:translateX(0) skew(-25deg);transition:transform .55s ease}
.btn-city-push:not(:disabled):is(:active,:focus-visible)::before {transform:translateX(420%) skew(-25deg)}
.btn-city-push:not(:disabled):active {transform:scale(.96)!important}
.btn-city-push:focus-visible {outline:2px solid #aac9ff;outline-offset:3px}
.btn-city-push:disabled {opacity:.6;cursor:default}
@media(hover:hover){.btn-city-push:not(:disabled):hover::before{transform:translateX(420%) skew(-25deg)}}
@media(prefers-reduced-motion:reduce){.btn-city-push{transition:none}.btn-city-push::before{display:none}.btn-city-push:not(:disabled):active{transform:none!important}}
/* ==========================================================================
   A) INPUTS CON LÍNEA EXPANDIBLE ANIMADA (City Security)
   ========================================================================== */
.city-input-wrap {
  position: relative;
  width: 100%;
  margin: 6px 0 16px 0;
}

.city-input-wrap input,
.city-input-wrap textarea {
  color: #ffffff !important;
  font-size: 0.95rem !important;
  background-color: #111d30 !important;
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border: none !important;
  border-bottom: 2px solid #697689 !important;
  border-radius: 8px 8px 0 0;
  transition: background 0.3s;
}

.city-input-wrap input:hover,
.city-input-wrap textarea:hover {
  background: rgba(23, 109, 229, 0.08) !important;
}

.city-input-wrap input:focus,
.city-input-wrap textarea:focus {
  outline: none !important;
  background: rgba(23, 109, 229, 0.14) !important;
}

.city-input-border {
  position: absolute;
  background: #176de5;
  width: 0%;
  height: 2px;
  bottom: 0;
  left: 0;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 10px rgba(23, 109, 229, 0.7);
  pointer-events: none;
}

.city-input-wrap input:focus ~ .city-input-border,
.city-input-wrap textarea:focus ~ .city-input-border {
  width: 100%;
}

/* ==========================================================================
   B) SPINNER DE CARGA DOMINÓ PARA DESCARGA DE PDF
   ========================================================================== */
#pdf-loading-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 21, 37, 0.88);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.domino-spinner {
  position: relative;
  width: 60px;
  height: 60px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}

.domino-spinner span {
  position: absolute;
  top: 50%;
  left: var(--left);
  width: 32px;
  height: 6px;
  background: #176de5;
  border-radius: 3px;
  animation: dominos 1s ease infinite;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.5);
}

.domino-spinner span:nth-child(1) { --left: 70px; animation-delay: 0.125s; }
.domino-spinner span:nth-child(2) { --left: 60px; animation-delay: 0.25s; }
.domino-spinner span:nth-child(3) { --left: 50px; animation-delay: 0.375s; }
.domino-spinner span:nth-child(4) { --left: 40px; animation-delay: 0.5s; }
.domino-spinner span:nth-child(5) { --left: 30px; animation-delay: 0.625s; }
.domino-spinner span:nth-child(6) { --left: 20px; animation-delay: 0.75s; }
.domino-spinner span:nth-child(7) { --left: 10px; animation-delay: 0.875s; }

@keyframes dominos {
  50% { opacity: 0.6; }
  75% { transform: rotate(90deg); }
  80% { opacity: 1; }
}

/* ==========================================================================
   C) BOTONES CON EFECTO TÁCTIL PUSH (scale 0.96)
   ========================================================================== */
.btn-city-push {
  position: relative;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  letter-spacing: 0.03em;
  border-radius: 10px;
  cursor: pointer;
  background: linear-gradient(135deg, #176de5 0%, #123d68 100%);
  border: 1px solid #789ff0;
  color: #ffffff;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  width: 100%;
  box-shadow: 0 4px 14px rgba(11, 41, 72, 0.35);
  transition: transform 0.12s ease, box-shadow 0.15s ease;
}

.btn-city-push span {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.btn-city-push::before {
  content: "";
  position: absolute;
  top: 0;
  left: -15%;
  width: 130%;
  height: 100%;
  background: rgba(255, 255, 255, 0.16);
  transform: skew(-25deg) translate3d(-100%, 0, 0);
  transition: transform 0.45s cubic-bezier(0.3, 1, 0.8, 1);
  z-index: 1;
}

.btn-city-push:hover::before {
  transform: skew(-25deg) translate3d(100%, 0, 0);
}

.btn-city-push:active {
  transform: scale(0.96);
  box-shadow: 0 2px 6px rgba(11, 41, 72, 0.2);
}

.btn-city-push.secondary {
  background: linear-gradient(135deg, #333e4e 0%, #1c2633 100%);
  border: 1px solid #697689;
}

.btn-city-push.alert {
  background: linear-gradient(135deg, #e53e3e 0%, #9b2c2c 100%);
  border: 1px solid #feb2b2;
  box-shadow: 0 4px 14px rgba(229, 62, 62, 0.4);
}
.btn-city-push .ops-badge {width:auto;flex:none}
.city-input-wrap input,.city-input-wrap textarea {margin-bottom:0!important;display:block}
.city-input-wrap:has(.missing-field) {outline:2px solid #e53e3e}
@media(prefers-reduced-motion:reduce){.domino-spinner span{animation:none}.city-input-border{transition:none}.btn-city-push{transition:none}.btn-city-push::before{display:none}}
/* Mobile touch feedback: override older desktop and push rules. */
* {-webkit-tap-highlight-color:transparent}
.btn-city-push {touch-action:manipulation;-webkit-user-select:none;user-select:none;transition:transform .12s ease,box-shadow .12s ease}
.btn-city-push::before {top:0;left:-15%;width:130%;height:100%;background:rgba(255,255,255,.18);transform:skew(-25deg) translate3d(-100%,0,0);transition:transform .4s cubic-bezier(.3,1,.8,1)}
@media(hover:hover){.btn-city-push:not(:disabled):hover::before {transform:skew(-25deg) translate3d(100%,0,0)}}
.btn-city-push:not(:disabled):active {transform:scale(.95)!important;box-shadow:0 2px 5px rgba(11,41,72,.3)!important}
.btn-city-push:not(:disabled):active::before {transform:skew(-25deg) translate3d(100%,0,0)!important;transition:transform .25s ease-out!important}
.city-input-wrap input,.city-input-wrap textarea {font-size:16px!important}
.city-input-border {transition:width .3s ease}
.btn-city-push .ops-badge {width:auto;flex:none}
@media(hover:none){.btn-city-push:not(:active)::before {transform:skew(-25deg) translate3d(-100%,0,0)!important}}
@media(prefers-reduced-motion:reduce){.btn-city-push,.city-input-border{transition:none}.btn-city-push::before{display:none}.btn-city-push:not(:disabled):active{transform:none!important}}
/* Shared institutional palette. Important layered rules take precedence over
   legacy screen-specific overrides, including styles loaded after this file. */
@layer city-institutional {
  html,body {background:radial-gradient(130% 75% at 50% -5%, #16367e 0%, #0c1b42 35%, #050b1d 70%, #02040a 100%) fixed!important;color:#fff!important;margin:0;padding:0;min-height:100vh;min-height:100dvh}
  .app-shell {background:radial-gradient(130% 75% at 50% -5%, #16367e 0%, #0c1b42 35%, #050b1d 70%, #02040a 100%) fixed!important;color:#fff!important;box-shadow:none!important;min-height:100vh;min-height:100dvh}
  #welcome-screen,.screen {background:#0b1525!important;color:#fff!important}
  .app-shell::before,.app-shell::after,#role-screen::before,#role-screen::after {display:none!important;animation:none!important}
  .topbar {background:#0b1525!important;border-bottom:0!important;padding:20px 18px 14px!important}
  .brand-title h1,.topbar .brand-title {color:#c0cfe0!important;font-size:.95rem!important;margin-top:4px!important}
  :is(#start-screen button.wide,#start-screen .enterprise-actions button,.enterprise-actions button,.enterprise-screen button.wide,#start-visit,#shift-open,#vehicle-control-open,#deliveries-open,.login-enter,.primary:not(#role-screen *),.btn-city-push:not(.secondary):not(.alert)):not(#role-screen *):not(.role-choices *):not(.area-card):not(.area-navigation button):not(.btn-alert-beacon):not(.alert):not(.text-button):not(.ops-filter-tab):not(.ratings button) {
    background:#176de5!important;border:1px solid #789ff0!important;color:#fff!important;border-radius:10px!important;font-weight:700!important;font-size:.95rem!important;min-height:48px!important;box-shadow:0 4px 14px rgba(23,109,229,.25)!important;
  }
  :is(#role-screen .role-choices button.secondary:not(.area-card),.secondary:not(#start-screen button):not(.enterprise-actions button):not(.enterprise-screen button):not(.area-card),.ops-select-toggle,.ops-select-menu button,.ratings button,#presentation-toggle,#criterion-toggle,#presentation-menu button,#criterion-menu button) {
    background:#333e4e!important;border:1px solid #697689!important;color:#fff!important;border-radius:10px!important;font-weight:700!important;font-size:.95rem!important;min-height:48px!important;box-shadow:0 2px 6px rgba(0,0,0,.2)!important;
  }
  .ops-filter-tab.active,.secondary.active,.secondary[aria-pressed="true"],.secondary[aria-selected="true"],.ratings button.selected,.ops-select-toggle.completed,.ops-select-menu button.completed,#presentation-toggle.completed,#criterion-toggle.completed,#presentation-menu button.completed,#criterion-menu button.completed,.dotation-progress .current {
    background:#176de5!important;border-color:#789ff0!important;color:#fff!important;
  }
  #visit-screen :is(button.selected,.ops-select-toggle.completed,.ops-select-menu button.completed,#presentation-toggle.completed,#criterion-toggle.completed,#presentation-menu button.completed,#criterion-menu button.completed,[data-ammo][aria-pressed="true"]) {
    background:#176de5!important;border-color:#a6c7ff!important;color:#fff!important;box-shadow:inset 0 0 0 1px #a6c7ff!important;
  }
  .btn-city-push.alert {background:#111d30!important;border-color:#ef4444!important;color:#fff!important;animation:beaconPulse 1.8s ease-in-out infinite!important}
  .primary:not(:disabled):active,.secondary:not(:disabled):active,.btn-city-push:not(:disabled):active,.login-enter:not(:disabled):active {transform:scale(.96)!important}
  #supervisor-back,.text-button {color:#789ff0!important;font-weight:600!important}
  .summary-card,.hero-card,.ops-filters-box,.visit-item,.post-item,.ops-card,.login-card,.metrics article,.rating-group,.upload,.issue-evidence,.report-client-filter-box,#shift-form {
    background:#111d30!important;border:1px solid #23374e!important;color:#fff!important;border-radius:10px!important;
  }
  .summary-card strong,.metrics strong,.visit-item strong,.post-item strong {color:#fff!important}
  label,.muted,.hero-card p,.summary-card span,.summary-card small,.visit-item span,.post-item span,.metrics span,.metrics small {color:#c0cfe0!important}
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),textarea {background:#111d30!important;color:#fff!important;border-color:#697689!important}
  select {background:#333e4e!important;color:#fff!important;border-color:#697689!important}
  @media(prefers-reduced-motion:reduce){.primary:not(:disabled):active,.secondary:not(:disabled):active,.btn-city-push:not(:disabled):active,.login-enter:not(:disabled):active{transform:none!important}}
  .dotation-photos-group {display:flex;flex-direction:column;gap:8px;margin:14px 0 10px}
  .dotation-photos-group button {width:100%;background:#1e2c40!important;color:#fff!important;border:1px solid #455a75!important;border-radius:8px!important;padding:12px 14px!important;font-weight:700!important;font-size:.92rem!important;text-align:center!important;cursor:pointer;transition:transform .1s ease,background .15s ease}
  .dotation-photos-group button:active {transform:scale(.97)!important;background:#293d59!important}
  .dotation-photos-group img {width:100%;max-height:280px;object-fit:cover;border-radius:8px;margin:6px 0 10px;border:1px solid #334d6e}
  .dotation-closed-box {margin-top:14px;padding-top:10px;border-top:1px solid rgba(255,255,255,.12)}
  .dotation-closed-status {color:#fff!important;font-weight:700!important;font-size:.95rem!important;margin:0 0 4px!important}
  .dotation-closed-date {color:#a2b7cf!important;font-size:.88rem!important;margin:0!important}
  @media(prefers-reduced-motion:reduce){.dotation-photos-group button:active{transform:none!important}}
  @media print {html,body,.app-shell,#report-screen,.summary-card{background:#fff!important;color:#172536!important}.summary-card span,.summary-card small{color:#33465b!important}}
}

/* Efecto táctil institucional para todos los botones actuales y futuros. */
@layer city-button-motion {
  button:not(:disabled) {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  }
  button:not(:disabled)::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: -35%;
    left: -65%;
    width: 42%;
    height: 170%;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.34), transparent);
    transform: skew(-25deg) translate3d(0,0,0);
    transition: transform .5s cubic-bezier(.3,1,.8,1);
  }
  button:not(:disabled) > * {position: relative; z-index: 2;}
  button:not(:disabled):is(:hover,:focus-visible)::before {transform: skew(-25deg) translate3d(360%,0,0);}
  button:not(:disabled):active {transform: scale(.96)!important;}
  button:not(:disabled):active::before {transform: skew(-25deg) translate3d(360%,0,0);transition-duration:.22s;}
  @media(prefers-reduced-motion:reduce){button:not(:disabled){transition:none}button:not(:disabled)::before{display:none}button:not(:disabled):active{transform:none!important}}
}

/* Presentación recuperada del formulario anterior de turno de Supervisión. */
@layer shift-screen-style {
  #shift-screen {padding-top:24px;}
  #shift-screen > .text-button {margin-bottom:8px;}
  #shift-screen #shift-title {font-size:1.35rem;line-height:1.3;font-weight:700;margin:8px 0 20px;color:#fff;}
  #shift-screen > div:not(#shift-summary) {margin-top:4px;background:#111d30;border:1px solid #496079;border-radius:14px;padding:18px;}
  #shift-screen .enterprise-form {display:flex;flex-direction:column;gap:8px;}
  #shift-screen .enterprise-form > label {color:#c0cfe0;margin:6px 0;font-weight:700;}
  #shift-screen .enterprise-form select,
  #shift-screen .enterprise-form input,
  #shift-screen .enterprise-form textarea {margin-top:7px;min-height:46px;background:#0c192c!important;border:1px solid #697689!important;border-radius:10px!important;color:#fff!important;}
  #shift-screen .enterprise-form input[type="file"] {padding:9px;}
  #shift-screen .enterprise-form input[type="file"]::file-selector-button {background:#176de5;color:#fff;border:0;border-radius:8px;padding:10px 12px;margin-right:8px;}
  #shift-screen .ops-card {background:#0d1b2e;border-color:#2b4664;}
  #shift-screen .enterprise-error {margin-top:10px;}
}
/* Tactical confirmation and elapsed visit time. */
.slider-track{position:relative;height:48px;background:#0d1829;border:1px solid #22374e;border-radius:24px;overflow:hidden;margin:12px 0;user-select:none;-webkit-user-select:none;touch-action:pan-y}
.slider-progress{position:absolute;left:0;top:0;bottom:0;width:0;background:rgba(23,109,229,.35);pointer-events:none;transition:background .2s ease}
.slider-text{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;font-size:.8rem;font-weight:700;letter-spacing:.05em;color:#94a3b8;pointer-events:none;z-index:1}
.slider-track .slider-thumb{position:absolute;left:3px;top:0;bottom:0;margin:auto 0!important;width:42px!important;height:42px!important;min-height:42px!important;padding:0!important;border-radius:50%!important;background:linear-gradient(135deg,#176de5,#103d70)!important;border:1px solid #789ff0!important;display:flex;align-items:center;justify-content:center;cursor:grab;color:#fff;font-size:.85rem;font-weight:bold;box-shadow:0 0 12px #176de580;z-index:2;touch-action:none}
.slider-track .slider-thumb:active{cursor:grabbing;transform:scale(.96)}
.slider-thumb:focus-visible{outline:2px solid #fff;outline-offset:-4px}
.dotation-camera{box-sizing:border-box;width:min(100% - 24px,680px);max-height:calc(100dvh - 24px);padding:18px;border:1px solid #89a8c5;border-radius:16px;color:#fff;overflow:auto}
.dotation-camera::backdrop{background:#000c}
.dotation-camera video,.dotation-camera img{display:block;width:100%;max-height:60dvh;object-fit:contain;background:#000;border-radius:10px}
.dotation-camera [hidden]{display:none!important}
.dotation-camera-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.dotation-camera-actions button{flex:1 1 140px;min-height:48px}
.slider-track.confirmed .slider-thumb,.slider-track.confirmed .slider-progress{background:#18734a!important}
.slider-track.confirmed .slider-text{color:#fff}
.hud-timer-container{display:flex;align-items:center;gap:16px;background:#111d30;border:1px solid #22374e;border-radius:14px;padding:12px 16px;margin:12px 0 18px;box-shadow:0 4px 14px #0b15254d}
.hud-timer-container[hidden]{display:none!important}
.hud-ring-wrap{position:relative;width:64px;height:64px;flex-shrink:0;display:flex;align-items:center;justify-content:center}
.hud-ring-svg{width:64px;height:64px;transform:rotate(-90deg)}
.hud-circle-bg{stroke:#162438;stroke-width:5;fill:transparent}
.hud-circle-progress{stroke:#4bb1ff;stroke-width:5;fill:transparent;stroke-dasharray:201.06193;stroke-dashoffset:201.06193;stroke-linecap:round;filter:drop-shadow(0 0 5px #4bb1ff);transition:stroke-dashoffset .5s ease,stroke .3s ease}
.hud-timer-text{position:absolute;font-family:monospace;font-size:.85rem;font-weight:700;color:#cbf3ff}
.hud-timer-info h4{margin:0;font-size:.92rem;font-weight:700;color:#fff}
.hud-timer-info p{margin:2px 0 0;font-size:.78rem;color:#94a3b8}
.hud-target-met{color:#5ce39a!important;font-weight:700}
@media(prefers-reduced-motion:reduce){.hud-circle-progress,.slider-progress{transition:none}.slider-track .slider-thumb:active{transform:none}}
/* Diffused blue direction across the full application, retaining City blue. */
@layer city-institutional {
  html,body,.app-shell,.screen,#welcome-screen,.topbar,nav,dialog{background:#0b1525!important}
  .topbar{border-bottom:0!important}
  .summary-card,.hero-card,.ops-filters-box,.visit-item,.post-item,.ops-card,.login-card,.metrics article,.rating-group,.upload,.issue-evidence,.report-client-filter-box,#shift-form{background:#111d30!important;border-color:#22374e!important;border-radius:12px!important;box-shadow:none!important}
  :is(#start-screen button.wide,#start-screen .enterprise-actions button,.enterprise-actions button,.enterprise-screen button.wide,#start-visit,#shift-open,#vehicle-control-open,#deliveries-open,.login-enter,.primary:not(#role-screen *),.btn-city-push:not(.secondary):not(.alert)):not(#role-screen *):not(.role-choices *):not(.area-card):not(.area-navigation button):not(.btn-alert-beacon):not(.alert):not(.text-button):not(.ops-filter-tab):not(.ratings button){background:linear-gradient(110deg,#176de5 0%,#2c83ed 55%,#176de5 100%)!important;border-color:#789ff0!important;color:#fff!important;box-shadow:0 5px 20px rgba(23,109,229,.24)!important}
  :is(#start-screen button.wide,#start-screen .enterprise-actions button,.enterprise-actions button,.enterprise-screen button.wide,#start-visit,#shift-open,#vehicle-control-open,#deliveries-open,.login-enter,.primary:not(#role-screen *),.btn-city-push:not(.secondary):not(.alert)):not(#role-screen *):not(.role-choices *):not(.area-card):not(.area-navigation button):not(.btn-alert-beacon):not(:disabled):hover{background:#285bc4!important;border-color:#789ff0!important;transform:none!important}
  .secondary:not(#start-screen button):not(.enterprise-actions button):not(.enterprise-screen button):not(.btn-alert-beacon):not(.area-card),.btn-city-push.secondary:not(.btn-alert-beacon){background:linear-gradient(140deg,#303f55,#1a2a40)!important;border-color:#596d88!important}
  .secondary.active,.secondary[aria-pressed="true"],.secondary[aria-selected="true"]{background:#176de5!important}
  #role-screen .role-choices .area-card{background:linear-gradient(145deg,#183d68,#0a1931)!important;border:1px solid #466d99!important;color:#edf5ff!important;border-radius:24px!important;font-size:1.1rem!important;min-height:220px!important;box-shadow:none!important}
  #role-screen .role-choices .area-card.is-current{border-color:#87bfff!important}
  #role-screen .role-choices .area-navigation button{background:#19365a!important;color:#cee5ff!important;border-radius:50%!important;font-size:28px!important;min-height:44px!important;width:44px!important;box-shadow:none!important}
  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),textarea,select{background:#0c192c!important;border-color:#435a77!important}
  @media print{html,body,.app-shell,.screen,.ops-card,.summary-card{background:#fff!important;color:#172536!important;box-shadow:none!important}}
}
/* Both pending controls share the same calm and beacon states. */
@layer city-institutional {
#btn-logistics-dotations::before,#btn-logistics-dotations::after,#tab-pending::before,#tab-pending::after,.ops-filter-tab::before,.ops-filter-tab::after{display:none!important;content:none!important}
#btn-logistics-dotations,#tab-pending,.ops-filter-tab[data-tab-state="PENDIENTE"]{transition:background .3s ease,border-color .3s ease,box-shadow .3s ease!important}
#btn-logistics-dotations:not(.btn-alert-beacon),#tab-pending:not(.btn-alert-beacon),.ops-filter-tab[data-tab-state="PENDIENTE"]:not(.btn-alert-beacon){background:#333e4e!important;border:1px solid #697689!important;color:#fff!important;box-shadow:none!important;animation:none!important}
#tab-pending.btn-alert-beacon,#btn-logistics-dotations.btn-alert-beacon,.ops-filter-tab.btn-alert-beacon[data-tab-state="PENDIENTE"],.btn-alert-beacon{position:relative!important;background:#111d30!important;border:1.5px solid #ef4444!important;color:#fff!important;box-shadow:none!important;animation:beaconPulse 1.8s ease-in-out infinite!important}
/* Filter animates independently of the legacy important box-shadow rules. */
@keyframes beaconPulse{0%,100%{filter:drop-shadow(0 0 0 rgba(239,68,68,0))}50%{filter:drop-shadow(0 0 11px rgba(239,68,68,.75))}}
#pending-badge-count{background:transparent!important;color:#fff!important;margin-left:6px;font-weight:700}
@media(prefers-reduced-motion:reduce){#tab-pending.btn-alert-beacon,#btn-logistics-dotations.btn-alert-beacon,.ops-filter-tab.btn-alert-beacon[data-tab-state="PENDIENTE"],#tab-pending.btn-alert-beacon::before,#btn-logistics-dotations.btn-alert-beacon::before,.ops-filter-tab.btn-alert-beacon[data-tab-state="PENDIENTE"]::before{animation:none!important}}
}
/* Enterprise working surfaces: no hidden overflow or decorative page backgrounds. */
@layer city-institutional {
  body:has(#role-screen.active),body:has(.enterprise-screen.active){overflow:auto!important;height:auto!important}
  body:has(#role-screen.active) .app-shell{height:auto!important;min-height:100dvh!important;display:block!important}
  #role-screen.active{display:block!important;padding:18px 0!important;min-height:0!important}
  #role-screen .role-choices{display:block!important;max-width:420px!important;width:100%;padding:0!important;margin:18px auto!important}
  #role-screen .role-choices button{white-space:normal!important}
  #role-screen .role-choices button::after{display:none!important}
  .enterprise-screen:not(.active),[hidden]{display:none!important}
  .enterprise-screen.active{display:block!important}
  #pdf-loading-modal,.deadman-overlay,dialog,.modal,.modal-overlay{background:#0b1525!important}
  .btn-alert-beacon::before,.btn-alert-beacon::after{display:none!important;content:none!important}
  .enterprise-screen .section-title{align-items:flex-start;gap:14px;margin-bottom:24px}
  .enterprise-screen .section-title h2{font-size:1.4rem;line-height:1.3;margin:0}
  .enterprise-screen .section-title .text-button{white-space:nowrap;min-height:44px}
  .enterprise-screen label,.enterprise-screen p,.enterprise-screen input,.enterprise-screen select,.enterprise-screen textarea{font-size:1rem!important}
  .enterprise-screen input,.enterprise-screen select,.enterprise-screen textarea{width:100%;padding:12px;min-height:46px;border:1px solid #697689;border-radius:8px}
  input[type=checkbox]{width:22px!important;min-height:22px!important;height:22px;vertical-align:middle;margin-right:10px}
  .enterprise-screen .ops-card{padding:16px;margin:12px 0;overflow-wrap:anywhere}
  .enterprise-screen summary{cursor:pointer;font-weight:700;min-height:44px;padding:10px 0;color:#c0cfe0}
  .enterprise-screen button{touch-action:manipulation}
  .enterprise-form{display:grid;gap:10px;margin:14px 0}
  .enterprise-form label{display:flex;flex-direction:column-reverse;gap:6px;margin:0}
  .enterprise-form :is(input,textarea,select):focus{border-color:#4bb1ff!important;outline:2px solid #176de5;box-shadow:0 3px 8px #4bb1ff66;transition:box-shadow .2s ease}
  .enterprise-notice,.field-network-status{font-size:.875rem!important;padding:12px;background:#111d30!important;color:#c0cfe0;border:1px solid #22374e;border-radius:8px}
  .enterprise-error{color:#ffb2b2!important}
  :root .btn-city-push.btn-alert-beacon,:root button.alert{background:#111d30!important;border:1.5px solid #ef4444!important;box-shadow:none!important;color:#fff!important;animation:beaconPulse 1.8s ease-in-out infinite!important}
  .enterprise-badge{display:inline-block;padding:6px 10px;border:1px solid #697689;border-radius:20px;font-size:.875rem}
  .enterprise-badge.valid,.patrol-timeline .done{color:#5ce39a!important;border-color:#18734a}
  .enterprise-badge.warning,.service-warning,.fleet-km{color:#fbbf24!important}
  .enterprise-badge.expired{color:#ffb2b2!important;border-color:#ef4444}
  .fleet-km{font-family:monospace;font-size:1.5rem}
  .service-warning{border:1px solid #fbbf24;border-radius:10px;padding:12px;animation:servicePulse 2s ease-in-out infinite}
  .signature-pad{display:block;width:100%;height:120px;border:1px dashed #4bb1ff;border-radius:10px;background:#0b1525;touch-action:none}
  .ammo-counter-wrap{display:flex;align-items:center;justify-content:center;gap:24px;margin:16px 0}
  .ammo-counter-wrap output{font-size:2rem;font-family:monospace}
  .enterprise-logo{width:150px;height:auto;object-fit:contain}
  .patrol-timeline{padding:0;list-style:none}
  .patrol-timeline li{padding:14px;border-left:3px solid #4bb1ff;margin:8px 0;background:#111d30}
  .patrol-timeline .waiting{border-left-color:#697689}
  .deadman-overlay{border:1px solid #176de5;border-radius:16px;padding:0;color:#fff;max-width:min(92vw,400px)}
  .deadman-overlay::backdrop{background:#0b1525}
  .deadman-box{padding:24px 20px;text-align:center}
  .deadman-beacon{width:14px;height:14px;border-radius:50%;background:#4bb1ff;margin:0 auto 16px;animation:deadmanPulse 1.2s infinite}
  @keyframes servicePulse{50%{filter:drop-shadow(0 0 5px #fbbf2466)}}
  @keyframes deadmanPulse{0%,100%{box-shadow:0 0 0 0 #4bb1ff88}70%{box-shadow:0 0 0 14px #4bb1ff00}}
  @media(prefers-reduced-motion:reduce){.btn-alert-beacon,.btn-city-push.alert,:root .btn-city-push.btn-alert-beacon,:root button.alert,.service-warning,.deadman-beacon{animation:none!important}.enterprise-form :focus{transition:none}}
}
/* Local palette extension: appearance only, excluding welcome/login and semantic states. */
@layer city-institutional {
  @media screen {
    body .screen:not(#login-screen):not(#welcome-screen):not(#role-screen) {
      background:transparent!important;
      color:#f4f8ff!important;
      --fw-ink:#f4f8ff;--fw-muted:#c0cfe0;--fw-line:rgba(193,224,255,.45);--fw-green:#286cb7;
    }
    body .screen:not(#login-screen):not(#welcome-screen):not(#role-screen) :is(.summary-card,.hero-card,.ops-card,.ops-filters-box,.visit-item,.post-item,.metrics article,.form-section,.rating-group,.upload,.report-client-filter-box,.fw-workspace,.fw-vehicle,.fw-section,.fw-list-filters) {
      background:linear-gradient(145deg,rgba(13,39,76,.35),rgba(3,16,29,.22))!important;
      border-color:rgba(182,220,255,.65)!important;
      color:#f4f8ff!important;
    }
    body .screen:not(#login-screen):not(#welcome-screen):not(#role-screen) :is(.primary,.secondary,.admin-executive-card,#admin-clients-open,.fw-button):not(.alert):not(.btn-alert-beacon):not(.danger):not(:disabled):not([aria-pressed=true]):not([aria-selected=true]):not([aria-current=page]):not(.active):not(.completed) {
      background:linear-gradient(145deg,rgba(55,101,163,.38),rgba(3,16,29,.3))!important;
      border-color:rgba(193,224,255,.75)!important;
      color:#fff!important;
    }
    body .screen:not(#login-screen):not(#welcome-screen):not(#role-screen) :is(input:not([type=checkbox]):not([type=radio]):not([type=file]),textarea,select):not([aria-invalid=true]) {
      background:rgba(3,16,29,.65)!important;
      border-color:rgba(193,224,255,.65)!important;
      color:#fff!important;
    }
    body .screen:not(#login-screen):not(#welcome-screen):not(#role-screen) select option {background:#0c1b32;color:#fff;}
    body #fleet-screen .fw-workspace {--fw-ink:#f4f8ff;--fw-muted:#c0cfe0;--fw-line:rgba(193,224,255,.45);--fw-green:#286cb7;}
    body #fleet-screen .fw-plate {color:#fff!important;}
    body .screen:not(#login-screen):not(#welcome-screen):not(#role-screen) :is(label,.muted,.hero-card p,.fw-list-filters label) {color:#c0cfe0!important;}
  }
}
/* Supervisión: separación uniforme entre todas las acciones principales. */
#start-screen > :is(#shift-open, #vehicle-control-open, #start-visit, #deliveries-open) {
  display: flex;
  width: 100%;
  margin: 0 0 12px !important;
}

#start-screen > #deliveries-open {
  margin-bottom: 24px !important;
}
/* Operational form presentation; select values retain their domain identifiers. */
.city-uppercase,
.screen:not(#login-screen) select,
.screen:not(#login-screen) select option {
  text-transform: uppercase;
}
/* Expanded shift form only: no changes to other module forms. */
#shift-screen .shift-expanded-form fieldset {min-width:0;border:1px solid #23374e;border-radius:10px;padding:16px;margin:0 0 16px}
#shift-screen .shift-expanded-form legend {font-weight:700;font-size:.85rem;padding:0 6px;color:#c0cfe0}
#shift-screen .shift-expanded-form label {display:flex;flex-direction:column;gap:6px;margin:12px 0}
#shift-screen .shift-expanded-form label[hidden] {display:none}
#shift-screen .shift-expanded-form input[type=number] {padding-left:14px}
#shift-screen .shift-expanded-form input[type=checkbox] {width:22px;height:22px;align-self:flex-start;accent-color:#176de5}
#shift-screen .shift-expanded-form .slider-track[aria-disabled=true] {opacity:.5}
body, .app-shell {
  background: radial-gradient(130% 75% at 50% -5%, #16367e 0%, #0c1b42 35%, #050b1d 70%, #02040a 100%) fixed !important;
}
@layer city-institutional {
  :root :is(#deliveries-screen .supervisor-dotations-tabs > button,#dotations-management-screen > .ops-tabs > button,#tab-pending,#tab-dispatched,#tab-delivered,#admin-screen > button.wide,#logistics-screen > button.wide,.enterprise-screen > button[data-screen],#start-screen .enterprise-actions > button):not(#role-screen):not(#visit-screen):not(#shift-screen):not(#login-screen):not(.text-button):not(.btn-alert-beacon):not(.alert):not(form button) {
    background:linear-gradient(110deg,#176de5 0%,#2c83ed 55%,#176de5 100%)!important;
    border-color:#789ff0!important;
    color:#fff!important;
  }
}
