/* Camada adicional. Não substitui estilos, autenticação ou regras de negócio. */
@media screen {
  html[data-frota-ui="surgical-v1"] { --ui-blue: 105,192,255; }
  html[data-frota-ui="surgical-v1"] body :is(.shell,.modal,.card,.subtle,.stack,.row,.grid2,.grid3,.field,.vehicle,.media-slot,fieldset,label) {
    min-inline-size:0; box-sizing:border-box;
  }
  html[data-frota-ui="surgical-v1"] body :is(.card,.subtle,.modal,.shell) :is(h1,h2,h3,p,span,strong,small,legend,dt,dd,label,td,th) {
    white-space:normal!important; overflow-wrap:anywhere!important; word-break:normal!important;
    text-overflow:clip!important; -webkit-line-clamp:unset!important;
  }
  html[data-frota-ui="surgical-v1"] body :is(.card,.subtle,.vehicle) :is(h1,h2,h3,p,dd,dt,legend) {
    height:auto!important; max-height:none!important; overflow:visible!important;
  }
  html[data-frota-ui="surgical-v1"] body :is(.shell,.modal) :is(.hint,.muted,small,dt) {color:#c5d5e9; line-height:1.5;}
  html[data-frota-ui="surgical-v1"] body :is(.shell,.modal) :is(h1,h2,h3,strong,button,.button,summary) {text-shadow:0 1px 2px #03101f!important;}
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) :is(button,.button,summary) {
    --ui-accent:105,192,255;
    min-width:0!important; max-width:100%!important; height:auto!important; max-height:none!important;
    min-height:44px!important; padding:11px 14px!important; line-height:1.4!important;
    white-space:normal!important; overflow-wrap:anywhere!important; word-break:normal!important;
    text-overflow:clip!important; overflow:visible!important; font-size:1rem!important;
    border-radius:16px!important; border:1px solid rgba(var(--ui-accent),.85)!important;
    color:#f6faff!important;
    background:radial-gradient(ellipse at 10% 0%,rgba(255,255,255,.22),transparent 58%),linear-gradient(145deg,rgba(var(--ui-accent),.22),rgba(5,26,53,.90))!important;
    box-shadow:inset 0 1px 0 #ffffffb3,inset 0 -14px 23px #020d2066,0 5px 0 rgba(var(--ui-accent),.25),0 14px 24px #00081677,0 0 17px rgba(var(--ui-accent),.22)!important;
    transform:none!important; scale:none!important; translate:none!important; filter:none!important;
    transition:box-shadow .16s ease,background .16s ease!important;
  }
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) :is(.primary,.success,.success-small) {--ui-accent:91,238,180;}
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) :is(.quiet,.audit-exit,.delete-action,.danger,.danger-small) {--ui-accent:245,151,182;}
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) :is(.warn-small,.attention) {--ui-accent:255,211,116;}
  html[data-frota-ui="surgical-v1"] body #admin-screen [data-access-target="route"] {--ui-accent:91,238,180;}
  html[data-frota-ui="surgical-v1"] body #admin-screen [data-access-target="audit"] {--ui-accent:255,211,116;}
  html[data-frota-ui="surgical-v1"] body #admin-screen [data-access-target="fleet"] {--ui-accent:203,167,255;}
  html[data-frota-ui="surgical-v1"] body #admin-screen #access-page-recent {--ui-accent:245,151,182;}
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) :is(button,.button,summary):active:not(:disabled) {
    /* Afundamento interno: não desloca nem afina as bordas. */
    box-shadow:inset 0 5px 14px #000b2499,inset 0 -1px 0 #ffffff66,0 1px 0 rgba(var(--ui-accent),.6),0 6px 14px #00081666,0 0 25px rgba(var(--ui-accent),.65)!important;
    border-color:#effaff!important; background-color:rgba(var(--ui-accent),.23)!important;
  }
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) :is(button,.button,summary):focus-visible {outline:3px solid #d4f0ff!important;outline-offset:3px!important;}
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen,#login-screen,.modal) button:disabled {opacity:.55!important;cursor:not-allowed!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen :is(.card,.media-slot,.check-card) {
    background:radial-gradient(ellipse at top left,#90caff18,transparent 65%),linear-gradient(145deg,#193852ed,#0b1c30ef)!important;
    border:1px solid #82b9e577!important;
    box-shadow:inset 0 1px #ffffff55,inset 0 -18px 28px #020e2444,0 12px 26px #00081966,0 0 18px #55b7ff1f!important;
    animation:none!important;
  }
  html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen) :is(input,select,textarea) {font-size:1rem!important;line-height:1.5!important;text-overflow:clip!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen :is(input,select,textarea) {transform:none!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen :is(.row,.options) {gap:14px!important;align-items:stretch!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .options {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));}
  html[data-frota-ui="surgical-v1"] body #driver-screen .choice {
    min-height:48px!important;min-width:0!important;margin:0!important;padding:10px!important;line-height:1.45!important;
    color:#edf6ff!important;font-size:.9375rem!important;border-radius:12px!important;gap:8px!important;
    background:linear-gradient(145deg,#3d739333,#071b30dd)!important;
    border:1px solid #8ebbd17d!important;box-shadow:inset 0 1px #ffffff55,0 4px 10px #00071955!important;
  }
  html[data-frota-ui="surgical-v1"] body #driver-screen .choice:has(input:checked) {background:linear-gradient(145deg,#286a59,#10372f)!important;border-color:#78f5c1!important;box-shadow:inset 0 1px #ffffff77,0 0 14px #44e6a544!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .choice.attention:has(input:checked) {background:#513c22!important;border-color:#ffce77!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .choice:has(input:focus-visible) {outline:2px solid #d4f0ff;outline-offset:3px;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .choice:has(input:disabled) {opacity:.6;cursor:not-allowed;}
  html[data-frota-ui="surgical-v1"] body #driver-screen :is(.choice,.consent) input {width:20px!important;height:20px!important;min-height:20px!important;flex:0 0 20px!important;padding:0!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .check-card legend {line-height:1.5;padding:0 5px;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .media-slot {align-content:start;gap:14px;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .media-slot>.row {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));margin-top:auto;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .media-slot>.row>button:only-child {grid-column:1/-1;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .media-slot>.row>button {width:100%!important;align-self:stretch;font-size:.9375rem!important;padding:10px 8px!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .form-footer {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:14px!important;position:static!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .form-footer>.row {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%;}
  html[data-frota-ui="surgical-v1"] body #driver-screen .form-footer button {width:100%!important;margin:0!important;}
  html[data-frota-ui="surgical-v1"] body :is(.screen-actions,.audit-exit-footer) {gap:12px!important;}
  html[data-frota-ui="surgical-v1"] body .audit-exit-footer {grid-template-columns:repeat(3,minmax(0,1fr))!important;}
  html[data-frota-ui="surgical-v1"] body .screen-actions {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  html[data-frota-ui="surgical-v1"] body .screen-actions>button {width:100%!important;}
  html[data-frota-ui="surgical-v1"] body .audit-toolbar {align-items:stretch;}
  html[data-frota-ui="surgical-v1"] body .audit-toolbar summary {height:100%!important;}
  html[data-frota-ui="surgical-v1"] body .access-page-head {display:grid!important;grid-template-columns:minmax(0,1fr) auto auto!important;gap:12px!important;}
  html[data-frota-ui="surgical-v1"] body .access-page-head>div {grid-column:1!important;grid-row:1!important;}
  html[data-frota-ui="surgical-v1"] body #admin-access-back {grid-column:2!important;grid-row:1!important;width:auto!important;min-width:70px!important;margin:0!important;}
  html[data-frota-ui="surgical-v1"] body #admin-access-close {grid-column:3!important;grid-row:1!important;width:auto!important;min-width:70px!important;margin:0!important;}
  html[data-frota-ui="surgical-v1"] body .access-title {min-width:0!important;}
  html[data-frota-ui="surgical-v1"] body #release-form :is(#official-data,#substitute-data) {overflow:visible!important;}
  html[data-frota-ui="surgical-v1"] body .media-empty {height:auto;min-height:110px;padding:12px;text-align:center;}
  html[data-frota-ui="surgical-v1"] body :is(.media-slot,.vehicle,.card) {max-width:100%;}
  html[data-frota-ui="surgical-v1"] body .ui-full-value {display:block;margin-top:6px;font-size:.875rem;line-height:1.5;color:#d3e5f8;overflow-wrap:anywhere;}
  html[data-frota-ui="surgical-v1"] body .ui-full-value[hidden] {display:none!important;}

  /* Mostrador vetorial: o valor continua pertencendo aos radios originais. */
  html[data-frota-ui="surgical-v1"] body #driver-screen .fuel-dashboard {
    width:100%;max-width:420px;margin:8px auto 18px;padding:12px;border-radius:22px;
    background:radial-gradient(ellipse at 20% 0%,#b5e5ff24,transparent 60%),linear-gradient(150deg,#18334a,#071525);
    border:1px solid #8bc8ef8c;box-shadow:inset 0 1px #ffffffaa,inset 0 -18px 25px #00081766,0 8px 20px #00091b88,0 0 22px #4db8ff22;
  }
  html[data-frota-ui="surgical-v1"] body #driver-screen .fuel-dashboard svg {display:block;width:100%;height:auto;overflow:visible;}
  .fuel-dashboard .fuel-needle {stroke:#f4faff;stroke-width:4;stroke-linecap:round;filter:drop-shadow(0 0 3px #61d8ff);}
  .fuel-dashboard text {font:600 14px system-ui,sans-serif;fill:#e9f4ff;text-anchor:middle;}
  .fuel-dashboard .fuel-readout {display:block;text-align:center;font-weight:700;line-height:1.5;color:#effaff;}
  html[data-frota-ui="surgical-v1"] body #driver-screen #fuel-options {grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;}
  html[data-frota-ui="surgical-v1"] body #driver-screen #fuel-options .choice {display:flex;flex-direction:column;justify-content:center;padding:8px 4px!important;text-align:center;}
  @media (max-width:700px) {
    html[data-frota-ui="surgical-v1"] body .shell {padding-inline:12px!important;}
    html[data-frota-ui="surgical-v1"] body :is(#driver-screen,#admin-screen) .card {padding:16px!important;}
    html[data-frota-ui="surgical-v1"] body :is(.photos,.videos,.grid2,.grid3,.recent-all-records) {grid-template-columns:minmax(0,1fr)!important;gap:20px!important;}
    html[data-frota-ui="surgical-v1"] body #driver-screen h1 {font-size:1.65rem;line-height:1.25;}
    html[data-frota-ui="surgical-v1"] body #driver-screen h2 {font-size:1.25rem;line-height:1.4;}
    html[data-frota-ui="surgical-v1"] body #driver-screen .topbar {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;}
    html[data-frota-ui="surgical-v1"] body #driver-screen .progress-box {position:static;}
    html[data-frota-ui="surgical-v1"] body #driver-screen .vehicle dl {grid-template-columns:minmax(0,1fr);}
    html[data-frota-ui="surgical-v1"] body .access-page-head {grid-template-columns:repeat(2,minmax(0,1fr))!important;}
    html[data-frota-ui="surgical-v1"] body .access-page-head>div {grid-column:1/-1!important;grid-row:2!important;}
    html[data-frota-ui="surgical-v1"] body #admin-access-back {grid-column:1!important;}
    html[data-frota-ui="surgical-v1"] body #admin-access-close {grid-column:2!important;}
    html[data-frota-ui="surgical-v1"] body .modal-head {position:relative;}
    html[data-frota-ui="surgical-v1"] body #audit-dialog .audit-menu-panel {max-width:calc(100vw - 40px);}
    html[data-frota-ui="surgical-v1"] body #driver-screen .check-card {padding:12px;}
  }
  @media (prefers-reduced-motion:reduce) {html[data-frota-ui="surgical-v1"] body :is(button,.button,summary) {transition:none!important;}}
}
