/* Alternative for entry point one; other workflows remain unchanged. */
body:has(#role-screen.active) {background:#e9edf2;}
body:has(#role-screen.active) .app-shell {background:#f7f9fc;}
body:has(#role-screen.active) .topbar {
  min-height:150px;padding-bottom:24px;border-bottom:1px solid #31517a;
  background:#102e52;gap:18px;
}
body:has(#role-screen.active) .brand-title .eyebrow {
  font-size:1.15rem;letter-spacing:.12em;word-spacing:.12em;line-height:1.5;
}
body:has(#role-screen.active) .brand-title h1 {font-size:.7rem;letter-spacing:.06em;line-height:1.6;}
body:has(#role-screen.active) .brand-logo {width:120px;}
#role-screen.active {min-height:calc(100dvh - 198px);}
.role-choices {max-width:340px;}
.role-choices h2 {font-size:1.55rem;letter-spacing:-.025em;color:#142e4b;margin-bottom:34px;}
.role-choices button {
  display:block;text-align:left;position:relative;
  background:white;color:#142e4b;border:1px solid #d8e0ea;
  border-radius:12px;padding:23px 42px 23px 22px;margin:0 0 15px;
  font-size:1.05rem;box-shadow:0 5px 16px #102e5205;
}
.role-choices button::after {content:'→';position:absolute;right:20px;top:25px;color:#446d9a;}
.role-choices button::before {display:block;font-size:.65rem;color:#61768e;letter-spacing:.12em;margin-bottom:8px;}
#supervisor-open::before, #administration-open::before {display:none;content:none;}
.role-choices button:hover {background:#edf3fa;border-color:#809ab9;transform:none;}
.role-choices button:focus-visible {outline:3px solid #6e99c7;outline-offset:3px;}
.role-disclaimer {font-size:.69rem;color:#63758a;max-width:290px;}
/* Institutional solid background; global palette is owned by styles.css. */
body:has(#role-screen.active) .app-shell {
  background:#0b1525;
  color:#f4f7ff;
}
body:has(#role-screen.active) .topbar {
  background:transparent;
  border-bottom:1px solid rgba(216,231,255,.2);
}
.role-choices h2 {color:#fff;}
.role-choices button {
  background:rgba(14,24,43,.88);color:#fff;
  border-color:#526780;box-shadow:0 8px 24px #0003;
}
.role-choices button::before {color:#bbcee8;}
.role-choices button::after {color:#a4c8ff;}
.role-choices button:hover {background:#19385e;border-color:#a4c8ff;}
.role-disclaimer {color:#becbdd;}
body:has(#visit-screen.active) .topbar {
  display:flex;flex-direction:column;
  align-items:center;justify-content:center;gap:6px;text-align:center;
}
body:has(#visit-screen.active) .brand-logo {
  order:-1;align-self:center;
  width:170px;height:96px;object-fit:fill;clip-path:inset(0 0 18% 0);margin-bottom:-15px;display:block;
}
body:has(#visit-screen.active) .brand-title {
  text-align:center;padding-bottom:2px;
}
body:has(#visit-screen.active) .brand-title .eyebrow {
  font-size:1.12rem;line-height:1.15;letter-spacing:.02em;
}
body:has(#visit-screen.active) .brand-title h1 {
  margin-top:3px;font-size:.75rem;line-height:1.2;
}
body:has(#report-screen.active) .app-shell {
  background:#0b1525;
  color:#f4f7ff;
}
body:has(#report-screen.active) .topbar {
  display:flex;flex-direction:column;justify-content:center;gap:12px;
  text-align:center;background:transparent;border-bottom:1px solid #ffffff20;
  padding:38px 18px 24px;
}
body:has(#report-screen.active) .header-actions {display:none;}
body:has(#report-screen.active) .brand-logo {
  order:-1;width:170px;height:96px;object-fit:fill;clip-path:inset(0 0 18% 0);margin-bottom:-15px;
}
body:has(#report-screen.active) .brand-title .eyebrow {
  font-size:1.2rem;font-weight:400;letter-spacing:.08em;
}
body:has(#report-screen.active) .brand-title h1 {font-weight:400;font-size:.8rem;}
#report-screen {text-align:center;}
#report-screen .report-success {margin:0 auto 18px;background:#183b58;color:#c3e1ff;width:52px;height:52px;}
#report-screen > .eyebrow {color:#bed5f2;font-weight:400;line-height:1.6;}
#report-screen h2 {font-weight:400;font-size:1.5rem;margin:12px 0;}
#report-summary {font-size:.9rem;color:#cedbec;line-height:1.6;}
#report-screen .summary-card {
  display:flex;flex-direction:column;gap:14px;text-align:left;
  border:1px solid #496079;background:#152c46;border-radius:14px;padding:22px;margin-top:24px;
}
#report-screen .summary-card span,#report-screen .summary-card small {color:#d5e1f0;line-height:1.5;font-weight:400;}
#report-screen .report-actions {display:grid;gap:12px;}
#report-screen button {border-radius:10px;min-height:48px;font-weight:400;}
#report-screen .primary {background:#e8f0fc;color:#102e52;}
#report-screen .secondary {background:transparent;color:#d5e1f0;border-color:#68819e;}
#report-screen button:disabled {opacity:.65;cursor:not-allowed;transform:none;}
#report-screen .issue-evidence {background:#e8f0fc;color:#234e7b;border-radius:10px;text-align:left;line-height:1.5;}
body:has(#visit-screen.active) .app-shell {
  background:#0b1525;
  color:#f4f7ff;
}
body:has(#visit-screen.active) .topbar {background:transparent;border-bottom:1px solid #ffffff20;}
body:has(#visit-screen.active) .header-actions {display:none;}
#visit-screen #visit-back {color:#d6e6fc;margin-bottom:18px;}
#visit-screen .stepper {border-color:#496079;}
#visit-screen .stepper span {color:#d6e6fc;border-color:#6984a1;}
#visit-screen .stepper .done {background:#e8f0fc;color:#102e52;}
#visit-screen .form-section {
  background:#f4f7fc;color:#142e4b;border:1px solid #d8e3ef;
  border-radius:14px;padding:22px 18px;margin-bottom:18px;
}
#visit-screen .form-section::before {display:none;}
#visit-screen .form-section h2 {font-weight:500;font-size:1.05rem;margin-bottom:18px;}
#visit-screen input,#visit-screen select,#visit-screen textarea {
  border-radius:8px;border-color:#b8c9dc;min-height:46px;font-weight:400;
}
#visit-screen .rating-group {border-radius:9px;background:#e8f0fc;padding:14px;}
#visit-screen .ratings {justify-content:space-between;}
#visit-screen .ratings button {width:42px;height:42px;border-radius:8px;font-weight:400;}
#visit-screen [data-group="agent-rating"] .ratings {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
#visit-screen [data-group="agent-rating"] .ratings button {width:100%;min-width:0;height:auto;min-height:44px;padding:10px 4px;font:inherit;font-weight:400;line-height:1.25;white-space:normal;overflow-wrap:anywhere;}
#visit-screen .secondary {border-radius:8px;min-height:44px;}
#visit-screen .issue-evidence {border-radius:8px;background:#e8f0fc;border-left-color:#376fae;}
#visit-screen .issue-label {color:#234e7b;font-weight:400;}
#visit-screen .upload {border-radius:9px;}
#visit-screen .primary {background:#e8f0fc;color:#102e52;border-radius:10px;min-height:52px;}
#visit-screen h2,#visit-screen label,#visit-screen button,
#visit-screen .rating-group,#visit-screen .stepper span,
body:has(#visit-screen.active) .brand-title .eyebrow,
body:has(#visit-screen.active) .brand-title h1 {
  font-weight:400;font-family:Arial,Helvetica,sans-serif;
}
body:has(#start-screen.active) .app-shell {
  background:#0b1525;
  color:#f4f7ff;
}
body:has(#start-screen.active) .topbar {
  background:transparent;border-bottom:1px solid #ffffff20;
}
#start-screen .hero-card {
  background:#111d30;border:0;border-radius:18px;
  padding:28px 24px;margin-top:12px;margin-bottom:20px;color:#142e4b;
}
#start-screen .hero-card::after {display:none;}
#start-screen .hero-card h2 {font-size:1.6rem;font-weight:500;line-height:1.2;letter-spacing:-.025em;}
#start-screen .hero-card p {font-size:.9rem;color:#4f637b;}
#start-screen #start-visit {
  background:#326be0;color:#fff;border:1px solid #789ff0;
  border-radius:12px;min-height:58px;font-size:1rem;
}
#start-screen #start-visit:hover {background:#285bc4;transform:none;}
#start-screen .summary-card {
  border:1px solid #496079;border-radius:12px;background:#152c46;padding:20px;
}
#start-screen .summary-card span,#start-screen .summary-card small {color:#c0cfe0;}
#start-screen .summary-card strong {color:#fff;font-weight:500;}
body:has(#start-screen.active) .topbar {
  display:flex;flex-direction:column;justify-content:center;gap:6px;align-items:center;text-align:center;
}
body:has(#start-screen.active) .brand-logo {
  order:-1;align-self:center;
  width:170px;height:96px;object-fit:fill;clip-path:inset(0 0 18% 0);margin-bottom:-15px;display:block;
}
body:has(#start-screen.active) .brand-title .eyebrow {
  font-size:1.12rem;line-height:1.15;letter-spacing:.02em;
}
body:has(#start-screen.active) .brand-title h1 {
  margin-top:3px;font-size:.75rem;line-height:1.2;
}
body:has(#role-screen.active) .app-shell {
  position:relative;isolation:isolate;overflow:hidden;height:100dvh;min-height:100dvh;
}
body:has(#role-screen.active) .app-shell::before,
body:has(#role-screen.active) .app-shell::after {
  content:none;display:none;
}
body:has(#role-screen.active) .app-shell > * {position:relative;z-index:1;}
@keyframes ambient-light {
  from {transform:translate3d(-12%,-10%,0);}
  to {transform:translate3d(18%,14%,0);}
}
@keyframes ambient-light-second {
  from {transform:translate3d(14%,-12%,0);}
  to {transform:translate3d(-18%,12%,0);}
}
@media(prefers-reduced-motion:reduce) {
  body:has(#role-screen.active) .app-shell::before,
  body:has(#role-screen.active) .app-shell::after {animation:none;opacity:.55;}
}
body:has(#role-screen.active) .topbar {
  display:flex;flex-direction:column;justify-content:center;
  gap:10px;padding:26px 18px 20px;min-height:190px;
  text-align:center;border-bottom:0;
}
body:has(#role-screen.active) .brand-logo {
  order:-1;width:132px;height:auto;margin:0 auto;
}
body:has(#role-screen.active) .brand-title .eyebrow {
  font-size:1.05rem;letter-spacing:.09em;word-spacing:.12em;
  line-height:1.25;
}
body:has(#role-screen.active) .brand-title h1 {
  margin-top:6px;font-size:.68rem;letter-spacing:.04em;
}
#role-screen.active {min-height:calc(100dvh - 238px);}
body:has(#role-screen.active){overflow:hidden;}
body:has(#role-screen.active) #role-screen.active{min-height:0;flex:1;justify-content:center;padding:0;}
body:has(#role-screen.active) .role-choices{margin:auto;padding:8px 0;}
body:has(#role-screen.active) .role-choices h2{margin:0 0 14px;font-size:1.25rem;}
body:has(#role-screen.active) .role-choices button{min-height:62px;margin:0;padding:18px 42px 18px 22px;}
body:has(#role-screen.active) .role-choices button::after{top:50%;transform:translateY(-50%);}
body:has(#role-screen.active) .role-choices{display:grid;gap:12px;width:100%;max-width:380px;}
body:has(#role-screen.active) .app-shell{display:flex;flex-direction:column;padding:28px 18px 12px;}
body:has(#role-screen.active) .app-shell>.window-label{position:absolute;}
body:has(#role-screen.active) .app-shell>p{flex:none;font-size:11px!important;padding:6px!important;text-align:center;}
body:has(#role-screen.active) #area-message:empty{display:none;}
body:has(#role-screen.active) .role-disclaimer{margin:5px auto 10px;}
/* Window 2.2: dark operational cards inspired by the supplied reference. */
body:has(#visit-screen.active) .app-shell {
  background:#0b1525;
}
#visit-screen .form-section {
  background:#111d30;
  border:1px solid #35415b;border-radius:18px;
  color:#edf3ff;box-shadow:0 8px 20px #0002;
}
#visit-screen .form-section h2 {color:#f5f7ff;}
#visit-screen label,#visit-screen .rating-group {color:#dce7fa;}
#visit-screen input,#visit-screen select,#visit-screen textarea {
  color:#f1f5ff;background:#0d162a;border:1px solid #536381;
  border-radius:10px;color-scheme:dark;
}
#visit-screen input::placeholder,#visit-screen textarea::placeholder {color:#9daec9;}
#visit-screen select:disabled {opacity:1;color:#c5d5ee;-webkit-text-fill-color:#c5d5ee;}
#visit-screen input:focus,#visit-screen textarea:focus,#visit-screen select:focus {
  outline:2px solid #82b1ff;outline-offset:2px;border-color:#82b1ff;
}
#visit-screen .muted {color:#b9c8e0;}
#visit-screen .rating-group {background:#101a30;border-color:#35415b;}
#visit-screen .ratings button {background:#192742;color:#dce7fa;border-color:#586c90;}
#visit-screen .ratings button.selected {background:#326be0;color:#fff;border-color:#a6c7ff;box-shadow:inset 0 0 0 1px #a6c7ff;}
#visit-screen .is-complete {border-color:#438aff!important;box-shadow:0 0 0 1px #438aff!important;}
#presentation-toggle {width:100%;padding:12px;text-align:left;background:#192742;color:#dce7fa;border:1px solid #586c90;border-radius:8px;font:inherit;min-height:44px;}
#presentation-menu:not([hidden]) {display:grid;gap:6px;margin:8px 0;}
#presentation-menu button, #criterion-menu button {padding:12px;border-radius:8px;background:#303541;color:#dce7fa;border:1px solid #586c90;font:inherit;min-height:44px;}
#presentation-menu button.completed, #criterion-menu button.completed {background:#326be0!important;border-color:#438aff!important;color:white!important;}
#presentation-toggle.completed {background:#326be0!important;border-color:#438aff!important;color:white!important;}
#criterion-toggle.completed {background:#326be0!important;border-color:#438aff!important;color:white!important;}
#visit-screen :is(#presentation-menu button,#criterion-menu button,.ops-select-menu button,#presentation-toggle,#criterion-toggle,.ops-select-toggle).completed::after {content:'✓';float:right;margin-left:12px;font-weight:700;color:#d8fbea;}
.screen-back-footer {position:sticky;bottom:0;z-index:10;margin-top:24px;padding:12px 0 max(12px,env(safe-area-inset-bottom));background:#0b1525;border-top:1px solid #496079;}
.screen-back-footer > button, #visit-screen .screen-back-footer #visit-back {display:flex;justify-content:center;align-items:center;width:100%;min-height:48px;margin:0;text-align:center;border:1px solid #657fa7;border-radius:10px;background:#142642;color:#d6e6fc;}
@media print {.screen-back-footer {display:none!important;}}
#visit-screen .ratings[hidden] {display:none!important;}
#visit-screen #weapon-serial-field[hidden] {display:none!important;}
#report-screen.active .report-success {position:relative;isolation:isolate;background:#173b65;color:#9fd4ff;border:1px solid #498eff;box-shadow:0 0 24px rgb(55 135 255 / .22);animation:confirmation-check .8s cubic-bezier(.16,1,.3,1) both;}
#report-screen.active .report-success::after {content:'';position:absolute;inset:-3px;border:2px solid #72b7ff;border-radius:50%;pointer-events:none;animation:confirmation-ring 1.1s ease-out both;}
@keyframes confirmation-check {0%{opacity:0;transform:scale(.55) rotate(-12deg)}60%{opacity:1;transform:scale(1.1) rotate(3deg)}100%{opacity:1;transform:scale(1) rotate(0)}}
@keyframes confirmation-ring {0%{opacity:.8;transform:scale(.85)}100%{opacity:0;transform:scale(1.7)}}
@media(prefers-reduced-motion:reduce){#report-screen.active .report-success,#report-screen.active .report-success::after{animation:none}#report-screen.active .report-success::after{display:none}}
#visit-screen .needs-attention {outline:2px solid #ef555f!important;outline-offset:4px;border-radius:8px;animation:missing-field-pulse .65s ease-in-out 3;}
@keyframes missing-field-pulse {50% {outline-color:#ff9aa0;box-shadow:0 0 0 6px rgb(239 85 95 / .22);}}
@media(prefers-reduced-motion:reduce) {#visit-screen .needs-attention {animation:none;}}
#visit-screen [data-group="post-rating"] .ratings {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}
#visit-screen [data-group="post-rating"] .ratings button {width:100%;min-width:0;height:auto;min-height:44px;padding:10px 4px;font:inherit;font-weight:400;line-height:1.25;white-space:normal;overflow-wrap:anywhere;}
#visit-screen .secondary {background:#233d6a;color:#f3f7ff;border-color:#657fa7;}
#visit-screen .issue-evidence {background:#142642;border-left-color:#83b3ff;}
#visit-screen .issue-label {color:#c9ddff;}
#visit-screen .upload {background:#101d35;color:#dce7fa;border-color:#7892b8;}
#visit-screen .primary {background:#326be0;color:#fff;border-color:#789ff0;}
#visit-screen #location-status {color:#ffaaaa;}
#visit-screen #location-status[data-state="approved"] {color:#9bc4ff;}
/* One brand name only: hide the lettering baked into the raster logo. */
body:has(#role-screen.active) .brand-logo,
body:has(#role-screen.active) .brand-title {
  transform:translateY(44px);
}
body:has(#role-screen.active) .brand-logo {
  width:238px;max-width:70vw;
  transform:translateY(44px) scaleX(.94);
  clip-path:inset(0 0 18% 0);
  margin-bottom:-20px;
}
body:has(#role-screen.active) .brand-title h1 {display:none;}
body:has(#role-screen.active) .brand-title .eyebrow {
  font-size:1.25rem;font-weight:600;letter-spacing:.1em;
}
body:has(#role-screen.active) .topbar {
  gap:12px;padding-top:24px;padding-bottom:18px;
}
/* Keep the larger choices visible by reclaiming empty header space. */
body:has(#role-screen.active) .topbar{min-height:0;flex:none;padding:14px 0;gap:6px;}
body:has(#role-screen.active) .brand-logo{width:180px;transform:scaleX(.94);}
body:has(#role-screen.active) .brand-title{transform:none;}
@media(max-height:740px){body:has(#role-screen.active) .brand-logo{width:140px;}body:has(#role-screen.active) .topbar{padding:8px 0;}body:has(#role-screen.active) .role-choices{gap:9px;}body:has(#role-screen.active) .role-choices button{min-height:56px;padding:15px 42px 15px 22px;}body:has(#role-screen.active) .role-choices h2{margin-bottom:3px;}}
body:has(#role-screen.active) .topbar{flex:1;min-height:160px;justify-content:center;align-items:center;padding:10px 0;gap:4px;}
body:has(#role-screen.active) .brand-logo{width:310px;max-width:88vw;height:auto;object-fit:contain;transform:none;margin:0 auto -26px;}
body:has(#role-screen.active) .brand-title{padding-left:0;text-align:center;}
body:has(#role-screen.active) .brand-title::before{display:none;}
body:has(#role-screen.active) .brand-title .eyebrow{font-size:clamp(1.3rem,5.5vw,1.65rem);line-height:1.2;letter-spacing:.08em;}
body:has(#role-screen.active) #role-screen.active{flex:0 0 auto;}
body:has(#start-screen.active) .brand-logo{width:240px;max-width:82vw;height:auto;object-fit:contain;transform:none;margin:0 auto -22px;}
/* Capa visual 2026-10-12 · Profundidad azul noche común a todas las pantallas.
   Reemplaza el #0b1525 plano por el mismo tono con un brillo institucional en la parte alta.
   Solo en pantalla: las reglas de impresión (fondo blanco) no se tocan. */
@layer city-institutional {
  @media screen {
    html body {
      background:
        radial-gradient(120% 52% at 50% -8%, rgba(23,109,229,.17) 0%, rgba(18,61,104,.15) 40%, transparent 72%) no-repeat,
        #0b1525 !important;
    }
    html body .app-shell,
    html body .app-shell > .screen,
    html body .app-shell > .topbar {background:transparent !important;}
    /* Pantallas de área (Operaciones, Flota, Finanzas, RRHH, Consola): sin banda vacía entre
       «Cambiar de área» y «Volver». */
    html body .app-shell > .screen.enterprise-screen.active {padding-top:14px !important;}
  }
}
