/* Diseño compartido de Safety Assistant. Los estados operativos conservan sus colores. */
@media screen {
  :root {
    --sms-navy:#152d46; --sms-blue:#205f94; --sms-accent:#157b78;
    --sms-ink:#20354b; --sms-muted:#65788c; --sms-line:#dfe7ef;
    --sms-canvas:#f3f6fa; --sms-radius:16px;
  }
  html {color-scheme:light; scroll-padding-top:24px}
  body {background:var(--sms-canvas);color:var(--sms-ink);font-family:'Segoe UI',Arial,sans-serif;font-size:14px;line-height:1.5;-webkit-font-smoothing:antialiased}
  *,*::before,*::after {box-sizing:border-box}
  [hidden] {display:none!important}
  body :is(h1,h2,h3) {line-height:1.25;text-wrap:balance}
  body h1 {font-size:clamp(26px,2.4vw,36px);font-weight:650;letter-spacing:-.8px}
  body h2 {font-size:20px;letter-spacing:-.35px;font-weight:650}
  body h3 {font-size:16px;font-weight:650}
  body :is(.hero,.topbar) {border-radius:var(--sms-radius);box-shadow:0 7px 24px #152d4609;border:1px solid var(--sms-line)}
  body .hero:has(>.hero-top) {background:white;padding:0;color:var(--sms-ink);border-bottom:1px solid var(--sms-line)}
  body :is(.hero-top,.topbar,.hero:not(:has(>.hero-top))) {background:linear-gradient(115deg,var(--sms-navy),#214e70);color:#fff;border-bottom:3px solid #318e92}
  body :is(.hero-top,.topbar) {padding:28px 30px;gap:20px}
  body :is(.hero-top,.topbar,.hero:not(:has(>.hero-top))) :is(h1,h2) {color:#fff}
  body :is(.hero-top,.topbar,.hero:not(:has(>.hero-top))) p {color:#d4e1ed;line-height:1.65;max-width:90ch}
  body .hero-bottom {background:#fff;padding:20px 28px;border-top:1px solid #e8edf3}
  body :is(.hero-meta,.user-box) {font-size:12px;line-height:1.7}
  body :is(.hero-top,.topbar) :is(.chip,.meta-badge,.usuario-badge) {border:1px solid #ffffff36;background:#ffffff10;color:#fff;box-shadow:none}
  body :is(.hero-top,.topbar) :is(.usuario-badge,.user-box) :is(strong,span) {color:#edf4fa}
  body :is(.hero-top,.topbar) .logout-link {color:#c0e7e9;text-decoration:underline;text-underline-offset:3px}
  body .hero-bottom .btn:not(.btn-danger) {background:#edf3f8;color:#285271;border:1px solid #d5e1ec}
  body .hero-bottom .btn:not(.btn-danger):hover {background:#e0ecf5;border-color:#a8bfce}
  body .hero-bottom.modulos-colores a.btn {background:var(--modulo-color,#205f94);border-color:var(--modulo-color,#205f94);color:#fff}
  body .hero-bottom.modulos-colores a.btn:nth-child(6n+1) {--modulo-color:#205f94}
  body .hero-bottom.modulos-colores a.btn:nth-child(6n+2) {--modulo-color:#925318}
  body .hero-bottom.modulos-colores a.btn:nth-child(6n+3) {--modulo-color:#18765b}
  body .hero-bottom.modulos-colores a.btn:nth-child(6n+4) {--modulo-color:#6c5098}
  body .hero-bottom.modulos-colores a.btn:nth-child(6n+5) {--modulo-color:#a23f61}
  body .hero-bottom.modulos-colores a.btn:nth-child(6n) {--modulo-color:#157b78}
  body .hero-bottom.modulos-colores a.btn:hover {background:var(--modulo-color,#205f94);border-color:var(--modulo-color,#205f94);filter:brightness(.9)}
  body :is(.card,.panel,.seccion,.login-card) {border:1px solid var(--sms-line);border-radius:var(--sms-radius);box-shadow:0 4px 18px #152d4606}
  body :is(.card-header,.card-head) {padding:20px 24px;background:#fff;border-bottom:1px solid #e8edf3;gap:14px}
  body :is(.card-header,.card-head) h2 {margin:0;color:var(--sms-navy)}
  body :is(.card-header,.card-head) p {color:var(--sms-muted);font-size:13px;margin:6px 0 0}
  body :is(.card-body,.editor-body) {padding:24px}
  body :is(.kpi,.kpi-card,.metric,.stat-card) {border:1px solid var(--sms-line);border-radius:14px;background:#fff;box-shadow:0 3px 14px #152d4605;padding:20px 22px}
  body :is(.kpi-titulo,.metric>span,.kpi>span) {color:var(--sms-muted);font-size:12px;font-weight:600;letter-spacing:.15px}
  body :is(.kpi-valor,.metric>strong,.kpi>strong) {font-size:32px;line-height:1.3;letter-spacing:-1px;font-variant-numeric:tabular-nums}
  body :is(.kpi-texto,.ayuda,.helper,.daily-help,.help-text) {font-size:12px;line-height:1.6;color:var(--sms-muted)}
  body :is(.btn,.mini-btn,.btn-mini,.btn-sec,.btn-small,.btn-sm) {display:inline-flex;align-items:center;justify-content:center;gap:7px;border-radius:9px;padding:10px 16px;min-height:40px;font:600 13px/1.3 'Segoe UI',Arial,sans-serif;text-decoration:none;vertical-align:middle;cursor:pointer;box-shadow:none;transition:background-color .15s,box-shadow .15s}
  body :is(.btn-primary,.btn-edit) {background:var(--sms-blue);color:#fff;border:1px solid var(--sms-blue)}
  body :is(.btn-secondary,.btn-sec,.btn-light,.btn.secondary) {background:#fff;color:#315671;border:1px solid #cfdae5}
  body :is(.hero,.topbar) .btn-secondary {background:#fff;color:#315671}
  body :is(.btn-success) {background:#18765b;color:#fff;border-color:#18765b}
  body .btn-info {background:#256c82;color:#fff;border-color:#256c82}
  body :is(.btn-danger) {background:#b3424c;color:#fff;border-color:#b3424c}
  body :is(.btn-warning) {background:#9d5a11;color:#fff;border-color:#9d5a11}
  body :is(.btn,.mini-btn,.btn-mini):hover {box-shadow:0 3px 9px #152d4619;filter:brightness(.97)}
  body :is(button,input,select,textarea) {font-family:inherit}
  body :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=range]):not([type=color]):not([type=submit]):not([type=button]),select,textarea) {border:1px solid #ccd8e4;border-radius:9px;background:#fff;color:var(--sms-ink);padding:10px 12px;font-size:14px;max-width:100%;min-height:42px;box-shadow:inset 0 1px 2px #152d4603}
  body textarea {line-height:1.6;resize:vertical}
  body input[type=file] {font-size:12px}
  body input[type=file]::file-selector-button {border:0;border-radius:6px;padding:7px 10px;margin-right:10px;background:#eaf1f7;color:#315671;font:600 12px 'Segoe UI',Arial,sans-serif;cursor:pointer}
  body :is(input[type=checkbox],input[type=radio]) {accent-color:var(--sms-accent)}
  body :is(input,select,textarea):focus-visible {outline:3px solid #157b782d;outline-offset:1px;border-color:var(--sms-accent)}
  body :is(a,button,summary):focus-visible {outline:3px solid #2e939e;outline-offset:3px}
  body :is(input,textarea)[readonly] {background:#f3f6f9;color:#62768a}
  body :is(input,select,textarea):disabled {background:#edf2f6;color:#778899;cursor:not-allowed}
  body button:disabled {opacity:.55;cursor:not-allowed}
  body label {font-size:13px;font-weight:600;color:#344e67}
  body :is(.form-grid,.form-row) {gap:18px}
  body :is(.campo,.form-group,.field) {min-width:0}
  body :is(.grid,.form-grid,.layout)>* {min-width:0}
  body :is(.actions,.acciones,.actions-top,.card-actions,.botones) {gap:10px;flex-wrap:wrap}
  body :is(.tabla-wrap,.table-wrap,.table-scroll,.table-container,.table-responsive) {border:1px solid var(--sms-line);border-radius:12px;overflow:auto;max-width:100%;background:#fff}
  body table {font-size:13px}
  body th {background:#edf3f8;color:#526a80;font-size:11px;font-weight:650;letter-spacing:.5px;padding:13px 16px;border-bottom:1px solid #dce5ee;line-height:1.4}
  body td {padding:14px 16px;border-bottom-color:#e8edf3;line-height:1.5}
  body tbody tr:hover {background-color:#f4f8fb}
  body :is(.badge,.status) {font-size:11px;font-weight:650;line-height:1.4;border-radius:20px}
  body :is(.alert,.msg) {border-radius:12px;padding:16px 20px;line-height:1.6}
  body :is(.empty,.sin-datos) {padding:24px;color:var(--sms-muted);line-height:1.7}
  body .breadcrumb {font-size:12px;gap:10px;flex-wrap:wrap;line-height:1.6}
  body .breadcrumb a {color:#315f85;text-underline-offset:3px}
  body :is(.menu-opciones a,.module-card,.modulo-card) {transition:border-color .15s,box-shadow .15s}
  body :is(.menu-opciones a,.module-card,.modulo-card):hover {border-color:#9fb9ca;box-shadow:0 7px 20px #152d4610}
  body .menu-opciones a h2 {color:var(--sms-navy)}
  body:has(.login-container) {background:radial-gradient(ellipse at 20% 10%,#28597c 0,transparent 55%),var(--sms-navy)}
  body .login-card {box-shadow:0 22px 60px #06142340;border-top:4px solid #318e92}
  body .login-card button[type=submit] {background:var(--sms-blue);border-radius:9px;min-height:44px}
  @media(max-width:760px) {
    body :is(.metrics,.kpis) {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    body .hero-bottom:has(>a.btn:nth-of-type(6)):not(:has(>:not(a))) {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
    body .hero-bottom:has(>a.btn:nth-of-type(6)):not(:has(>:not(a)))>.btn {width:100%;margin:0}
    body :is(.hero-top,.topbar,.hero:not(:has(>.hero-top))) {padding:22px 20px}
    body :is(.hero-bottom,.card-body,.editor-body,.card-header,.card-head) {padding:18px}
    body :is(.card,.panel,.seccion) {border-radius:12px}
    body :is(.btn,.btn-mini,.mini-btn) {min-height:42px;white-space:normal;text-align:center}
    body :is(.card-body,.body-pad):has(>table) {overflow-x:auto}
    body :is(.grid,.form-grid)>* {min-width:0}
    body :is(.kpi,.kpi-card,.metric,.stat-card) {padding:16px}
    body th,body td {padding:12px}
  }
  @media(prefers-reduced-motion:reduce) {body :is(.btn,.mini-btn,.btn-mini,.menu-opciones a,.module-card,.modulo-card) {transition:none}}
}
