/* =====================================================================
   Estilos base de las aplicaciones de TFS (TFS Ecosystem).
   Es el mismo estilo del TFS Project Management System. No cambies los
   colores ni los componentes de aquí: agrega lo propio de tu app al final,
   en la sección "Propio de esta aplicación".
   ===================================================================== */
:root {
  /* Marca (muestreados del logo de TFS) */
  --navy: #1E233B; --navy-2: #2A3150; --green: #75A748; --green-d: #48722A; --blue: #8CB9CA; --blue-d: #3C6E80;
  /* Superficies y texto */
  --bg: #F4F6F3; --card: #FFFFFF; --soft: #F4F6F8; --input: #FFFFFF; --line: #DDE2E6; --line-2: #EDF0F2;
  --text: #1E233B; --ink: #1E233B; --muted: #5F6875;
  /* Estados */
  --red: #B42318; --red-bg: #FDECEA; --amber: #9A5B00; --amber-bg: #FFF4E0; --ok-bg: #EAF3E2; --dev-bg: #E6F0F4;
  --radius: 8px; --font: "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #10131C; --card: #191D2A; --soft: #202536; --input: #141826; --line: #2D3446; --line-2: #232838;
  --text: #E3E8EF; --ink: #E9EEF5; --muted: #98A3B3; --blue-d: #8CB9CA;
  --red: #FF9A85; --red-bg: #3A1F1F; --amber: #F1D9A0; --amber-bg: #3A2F17; --ok-bg: #1F3020; --dev-bg: #1C2D36;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.45; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--blue-d); }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: 22px; } h2 { font-size: 17px; }
h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
[hidden] { display: none !important; }
.boot { padding: 40px; color: var(--muted); }
.sub { color: var(--muted); font-size: 13px; margin-top: 3px; }
.mono { font-family: Consolas, "SFMono-Regular", monospace; font-size: 12.5px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { color: var(--muted); padding: 10px 0; font-size: 13px; }

/* ---------- Estructura: barra lateral navy + contenido ---------- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: #E8ECF0; display: flex; flex-direction: column; padding: 16px 12px; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.side .brand { display: block; margin-bottom: 10px; text-decoration: none; }
.side .app-name { color: #fff; font-weight: 700; font-size: 15px; padding: 2px 8px 0; }
.side .app-sub { color: var(--blue); font-size: 12px; padding: 0 8px 10px; letter-spacing: .03em; }
.nav-link { display: flex; align-items: center; justify-content: space-between; padding: 9px 10px; border-radius: 6px; color: #E8ECF0; text-decoration: none; }
.nav-link:hover { background: var(--navy-2); }
.nav-link.active { background: var(--navy-2); box-shadow: inset 3px 0 0 var(--green); }
.badge { background: var(--green); color: #1E233B; font-weight: 700; border-radius: 10px; padding: 0 7px; font-size: 12px; }
.side .spacer { flex: 1; }
.side .back-link { color: var(--blue); font-size: 12.5px; text-decoration: none; padding: 4px 8px 10px; }
.side .back-link:hover { text-decoration: underline; }
.side .who { border-top: 1px solid var(--navy-2); padding: 12px 8px 0; font-size: 12px; color: #BFCBD6; }
.side .who b { color: #fff; display: block; font-size: 13px; }
.side .who button { background: none; border: none; color: var(--blue); padding: 6px 0 0; cursor: pointer; margin-right: 12px; }
main { padding: 22px 28px 40px; min-width: 0; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }

/* ---------- Logo TFS: siempre sobre blanco, también en modo nocturno ---------- */
.tfs-mark { display: inline-flex; background: #fff; border-radius: 8px; padding: 6px 10px; line-height: 1; }
.tfs-mark img { display: block; height: 40px; width: auto; }
.side .brand .tfs-mark { width: 100%; justify-content: center; padding: 12px; }
.side .brand .tfs-mark img { width: 100%; height: auto; max-width: 150px; }

/* ---------- Tarjetas, rejillas e indicadores ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; min-width: 0; overflow-x: auto; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; border-top: 4px solid var(--blue); }
.kpi .v { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: 12px; margin-top: 4px; }
.kpi.good { border-top-color: var(--green); } .kpi.warn { border-top-color: #E0A030; }
.kpi.bad { border-top-color: #B42318; } .kpi.bad .v { color: var(--red); }

/* ---------- Tablas ---------- */
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 8px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr.click { cursor: pointer; } .t tr.click:hover td { background: rgba(140, 185, 202, .12); }

/* ---------- Chips de estado (siempre con texto, nunca solo color) ---------- */
.chip { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.chip.gray { background: var(--soft); color: var(--muted); border: 1px solid var(--line-2); }
.chip.info { background: var(--dev-bg); color: var(--blue-d); }
.chip.ok { background: var(--ok-bg); color: var(--green-d); }
.chip.warn { background: var(--amber-bg); color: var(--amber); }
.chip.bad { background: var(--red-bg); color: var(--red); }
:root[data-theme="dark"] .chip.ok { color: #A9D58A; }

/* ---------- Avance ---------- */
.bar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.bar .track { flex: 1; height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; background: var(--green); }
.bar .pct { width: 38px; text-align: right; font-variant-numeric: tabular-nums; font-size: 12.5px; }

/* ---------- Avisos en línea ---------- */
.info-line, .warn-line, .err-line { border-radius: 6px; padding: 8px 10px; font-size: 13px; margin: 8px 0; }
.info-line { background: var(--dev-bg); color: var(--blue-d); }
.warn-line { background: var(--amber-bg); color: var(--amber); }
.err-line { background: var(--red-bg); color: var(--red); }
:root[data-theme="dark"] .info-line { color: var(--text); }

/* ---------- Botones ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--text); border-radius: 6px; padding: 7px 12px; cursor: pointer; white-space: nowrap; text-decoration: none; }
.btn:hover { border-color: #B9C1C8; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.green { background: var(--green); border-color: var(--green); color: #1E233B; font-weight: 600; }
.btn.danger { color: var(--red); }
.btn.small { padding: 4px 9px; font-size: 12.5px; }
.btn.link { border: none; background: none; color: var(--blue-d); padding: 2px 4px; }
.btn:disabled { opacity: .5; cursor: default; }
:root[data-theme="dark"] .btn { background: var(--soft); }
:root[data-theme="dark"] .btn.primary { background: #3C4A7A; border-color: #3C4A7A; }
:root[data-theme="dark"] .btn.green { background: var(--green); border-color: var(--green); }
:root[data-theme="dark"] .btn.link { background: none; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Formularios: obligatorio con *, opcional con "(opcional)" ---------- */
.f { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.f > .lbl { display: block; font-size: 12px; font-weight: 600; color: var(--muted); }
.rq { color: var(--red); font-weight: 700; margin-left: 2px; }
.opt { font-weight: 400; color: var(--muted); }
.req-note { font-size: 12px; color: var(--muted); margin: 0 0 8px; }
input[type=text], input[type=email], input[type=date], input[type=number], input[type=url], input[type=search], select, textarea {
  border: 1px solid var(--line); border-radius: 6px; padding: 7px 9px; background: var(--input); font-weight: 400; color: var(--text); min-width: 0; width: 100%; }
input:focus, select:focus, textarea:focus, .btn:focus-visible, .nav-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 1px; }
textarea { resize: vertical; min-height: 70px; }
input:disabled, select:disabled, textarea:disabled { background: var(--soft); color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.form-grid .span2 { grid-column: 1 / -1; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.check input { margin-top: 3px; accent-color: var(--green); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.seg button { border: none; background: none; padding: 6px 12px; cursor: pointer; font-size: 13px; color: var(--text); }
.seg button.on { background: var(--navy); color: #fff; }
:root[data-theme="dark"] .seg button.on { background: #3C4A7A; }

/* ---------- Inicio de sesión ---------- */
.login { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 20px; position: relative; }
.login .box { background: var(--card); border-radius: 12px; padding: 28px; width: 100%; max-width: 400px; }
.login-logo { display: flex; justify-content: center; margin-bottom: 12px; }
.login-logo .tfs-mark { box-shadow: 0 0 0 1px var(--line); padding: 12px 16px; }
.login-logo .tfs-mark img { height: 64px; }
.login-theme { position: absolute; top: 16px; right: 16px; }
.ms-btn { width: 100%; justify-content: center; padding: 12px 16px; font-size: 15px; }
.preview-hint { margin-top: 14px; background: #FFF7E6; border: 1px solid #EBCB8B; border-radius: 8px; padding: 10px 12px; font-size: 12.5px; color: #6B4A00; text-align: left; }
:root[data-theme="dark"] .preview-hint { background: rgba(235,203,139,.12); border-color: #8A6A2A; color: #F1D9A6; }
.legal { white-space: pre-wrap; background: var(--soft); border: 1px solid var(--line); border-radius: 8px; padding: 12px; max-height: 260px; overflow: auto; font-size: 13px; }

/* ---------- Ventanas, avisos y notificaciones ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 24, 40, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
:root[data-theme="dark"] .modal-bg { background: rgba(0, 0, 0, .68); }
.modal { background: var(--card); color: var(--text); border-radius: 10px; padding: 20px; width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; }
.modal h2 { margin-bottom: 12px; }
.modal form { display: flex; flex-direction: column; gap: 12px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 60; max-width: 90vw; }
#toast.show { opacity: 1; } #toast.err { background: #B42318; }
.notif { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-2); align-items: start; }
.notif.unread .msg { font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin-top: 6px; flex: none; }
.dot.off { background: transparent; }
.hist { font-size: 12.5px; } .hist div { padding: 6px 0; border-bottom: 1px solid var(--line-2); } .hist .when { color: var(--muted); }

/* ---------- Botón de tema claro / nocturno ---------- */
.theme-btn { border: 1px solid rgba(255,255,255,.25); background: transparent; color: #E8ECF0; border-radius: 16px; padding: 4px 10px; cursor: pointer; font-size: 12.5px; white-space: nowrap; }
.theme-btn:hover { background: var(--navy-2); }
.side .theme-btn { align-self: flex-start; margin: 0 0 8px 8px; }

/* ---------- Celular y pantallas angostas ---------- */
@media (max-width: 1000px) { .kpis { grid-template-columns: repeat(2, 1fr); } .grid-2, .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 820px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 6px;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .side .brand { width: 120px; margin: 0 8px 0 0; } .side .app-sub, .side .spacer { display: none; }
  .side .who { width: 100%; }
  main { padding-block: 16px 32px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .form-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Propio de esta aplicación (agrega aquí tus estilos)
   ===================================================================== */
/* --- HSE Near Miss --- */
.nm-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; vertical-align: 0; }
.r-bajo { background: #75A748; } .r-medio { background: #D99A1E; } .r-alto { background: #C2561A; } .r-critico { background: #B42318; }
.chip.rk-bajo { background: var(--ok-bg); color: var(--green-d); } .chip.rk-medio { background: var(--amber-bg); color: var(--amber); }
.chip.rk-alto { background: #FBE7DC; color: #9A3E12; } .chip.rk-critico { background: var(--red-bg); color: var(--red); }
:root[data-theme="dark"] .chip.rk-bajo { color: #A9D58A; } :root[data-theme="dark"] .chip.rk-alto { background: #3D2A20; color: #F4A274; }
.nm-cta { display: flex; align-items: center; gap: 16px; background: var(--navy); color: #fff; text-decoration: none; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.nm-cta:hover { background: var(--navy-2); }
.nm-cta-ic { width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #1E233B; display: grid; place-items: center; flex: none; }
.nm-cta b { display: block; font-size: 17px; } .nm-cta span span { color: #BFCBD6; font-size: 13px; } .nm-cta-go { margin-left: auto; font-size: 22px; color: var(--blue); }
.nm-desc { max-width: 360px; } .nm-text { white-space: pre-wrap; margin: 0; }
.nm-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.nm-grid form { display: flex; flex-direction: column; gap: 14px; }
.nm-side ol { margin: 0 0 10px; padding-left: 18px; color: var(--muted); } .nm-side li { margin-bottom: 6px; } .nm-side b { color: var(--text); }
.nm-seg { display: flex; flex-wrap: wrap; gap: 8px; } .nm-seg input, .nm-risk input { position: absolute; opacity: 0; pointer-events: none; }
.nm-seg label { border: 1px solid var(--line); border-radius: 18px; padding: 7px 14px; cursor: pointer; background: var(--card); font-size: 13.5px; }
.nm-seg input:checked + label { background: var(--navy); border-color: var(--navy); color: #fff; }
:root[data-theme="dark"] .nm-seg input:checked + label { background: #3C4A7A; border-color: #3C4A7A; }
.nm-seg input:focus-visible + label, .nm-risk input:focus-visible + label { outline: 2px solid var(--blue); outline-offset: 1px; }
.nm-risk { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.nm-risk label { border: 2px solid var(--line); border-radius: var(--radius); padding: 10px 8px; cursor: pointer; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; background: var(--card); }
.nm-risk label b { font-size: 14px; } .nm-risk label small { font-size: 11.5px; color: var(--muted); line-height: 1.3; } .nm-risk .nm-dot { margin: 0 0 2px; width: 11px; height: 11px; }
.nm-risk input:checked + label[data-r="Bajo"] { border-color: #75A748; background: var(--ok-bg); }
.nm-risk input:checked + label[data-r="Medio"] { border-color: #D99A1E; background: var(--amber-bg); }
.nm-risk input:checked + label[data-r="Alto"] { border-color: #C2561A; background: #FBE7DC; }
.nm-risk input:checked + label[data-r="Crítico"] { border-color: #B42318; background: var(--red-bg); }
:root[data-theme="dark"] .nm-risk input:checked + label[data-r="Alto"] { background: #3D2A20; }
.nm-photo { display: flex; align-items: center; gap: 12px; border: 2px dashed var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; color: var(--muted); background: var(--card); }
.nm-photo:hover { border-color: var(--blue); } .nm-photo input { display: none; } .nm-photo-ic { display: flex; }
.nm-thumbs { display: flex; gap: 8px; flex-wrap: wrap; } .nm-thumbs span { position: relative; } .nm-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; display: block; }
.nm-thumbs button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--navy); color: #fff; cursor: pointer; line-height: 1; }
.nm-send { width: 100%; justify-content: center; padding: 12px; font-size: 15px; }
.nm-ok { text-align: center; padding: 32px 20px; max-width: 560px; margin: 20px auto; }
.nm-ok-ic { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-bg); color: var(--green-d); display: grid; place-items: center; font-size: 30px; margin: 0 auto 12px; }
.nm-folio { font-size: 22px; font-weight: 700; margin: 8px 0; }
.nm-dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; margin: 12px 0 0; font-size: 13.5px; } .nm-dl dt { color: var(--muted); } .nm-dl dd { margin: 0; }
.nm-gallery { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; } .nm-gallery img { width: 120px; height: 90px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.nm-acc { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.nm-acc .sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; } .nm-acc.done b { color: var(--muted); }
.nm-ev { font-size: 13px; margin-top: 4px; } .nm-ev-img { width: 80px; height: 60px; object-fit: cover; border-radius: 6px; margin-top: 6px; }
.kpis-6 { grid-template-columns: repeat(6, 1fr); } @media (max-width: 1200px) { .kpis-6 { grid-template-columns: repeat(3, 1fr); } }
.hb { display: grid; grid-template-columns: 170px 1fr 34px; gap: 10px; align-items: center; padding: 4px 0; font-size: 13px; }
.hb-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hb-t { height: 14px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.hb-t i { display: block; height: 100%; background: var(--navy); border-radius: 0 4px 4px 0; } :root[data-theme="dark"] .hb-t i:not([class]) { background: var(--blue); }
.hb-t i.r-bajo { background: #75A748; } .hb-t i.r-medio { background: #D99A1E; } .hb-t i.r-alto { background: #C2561A; } .hb-t i.r-critico { background: #B42318; }
.hb b { text-align: right; font-variant-numeric: tabular-nums; }
.vb { display: flex; align-items: flex-end; gap: 12px; height: 170px; padding-top: 18px; }
.vb-c { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; font-size: 12px; }
.vb-bar { width: 100%; max-width: 44px; min-height: 2px; background: var(--navy); border-radius: 4px 4px 0 0; } :root[data-theme="dark"] .vb-bar { background: var(--blue); }
.vb-l { color: var(--muted); }
@media (max-width: 820px) { .nm-grid { grid-template-columns: 1fr; } .nm-risk { grid-template-columns: 1fr 1fr; } .hb { grid-template-columns: 110px 1fr 30px; } .kpis-6 { grid-template-columns: repeat(2, 1fr); } .nm-dl { grid-template-columns: 1fr; } .nm-dl dt { margin-top: 6px; } }
/* reconocimiento */
.nm-stars { display: inline-flex; gap: 1px; font-size: 16px; line-height: 1; vertical-align: -2px; } .nm-stars i { font-style: normal; color: var(--line); } .nm-stars i.on { color: #D99A1E; }
.nm-award { display: inline-flex; align-items: center; gap: 6px; background: var(--navy); color: #fff; border-radius: 12px; padding: 3px 10px 3px 6px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.nm-award svg { color: var(--green); } :root[data-theme="dark"] .nm-award { background: #3C4A7A; }
.nm-mystars { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: -6px 0 16px; text-decoration: none; color: var(--text); }
.nm-mystars:hover { border-color: var(--blue); } .nm-mystars .nm-stars { font-size: 20px; } .nm-mystars .nm-cta-go { margin-left: auto; color: var(--blue-d); }
.nm-ok-stars { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 4px 0 16px; } .nm-ok-stars .nm-stars { font-size: 26px; }
.nm-me h3 { margin-bottom: 8px; } .nm-me-big .nm-stars { font-size: 34px; } .nm-me-big .nm-award { font-size: 15px; padding: 6px 14px 6px 10px; }
.nm-escala td { padding: 6px 8px; }
.nm-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; background: radial-gradient(ellipse at 20% 0%, #2A3366 0%, #1E233B 55%, #141831 100%); color: #fff; border-radius: 12px; padding: 22px 24px; margin-bottom: 16px; }
.nm-hero h1 { font-size: 26px; color: #fff; text-transform: capitalize; } .nm-hero p { margin: 6px 0 0; color: #BFCBD6; max-width: 620px; }
.nm-hero-k { color: var(--green); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 12px; margin-bottom: 4px; }
.nm-hero select { width: auto; min-width: 180px; background: #2A3150; color: #fff; border-color: #3A4366; }
.nm-podio { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 12px; align-items: end; margin-bottom: 16px; }
.nm-p { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px; border-top: 4px solid var(--blue); }
.nm-p.p1 { order: 2; border-top-color: var(--green); padding: 22px 16px; } .nm-p.p2 { order: 1; } .nm-p.p3 { order: 3; }
.nm-p-n { width: 34px; height: 34px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; } .nm-p.p1 .nm-p-n { background: var(--green); color: #1E233B; width: 42px; height: 42px; font-size: 18px; }
.nm-p-c { font-size: 13px; color: var(--muted); }
:root[data-theme="dark"] .nm-p-n { background: #3C4A7A; }
.nm-win { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; } .nm-win > span:first-child { text-transform: capitalize; color: var(--muted); min-width: 120px; }
tr.nm-yo td { background: rgba(140,185,202,.14); }
@media (max-width: 820px) { .nm-podio { grid-template-columns: 1fr; } .nm-p.p1, .nm-p.p2, .nm-p.p3 { order: 0; } }
.nm-best { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--green); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 6px; }
.nm-best-k { display: flex; align-items: center; gap: 6px; color: var(--green-d); font-weight: 700; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }
:root[data-theme="dark"] .nm-best-k { color: #A9D58A; }
.nm-best-b { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; } .nm-best-b p { margin: 8px 0 4px; }
.nm-best .btn { align-self: flex-start; margin-top: 4px; }
.nm-best-mini { display: flex; align-items: center; gap: 6px; color: var(--green-d); font-weight: 600; margin: 8px 0 0; }
.nm-cands { display: flex; flex-direction: column; gap: 8px; max-height: 46vh; overflow: auto; }
.nm-cand { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; font-size: 13.5px; }
.nm-cand:has(input:checked) { border-color: var(--green); background: var(--ok-bg); } .nm-cand input { margin-top: 3px; accent-color: var(--green); }
.modal:has(.nm-cands) { max-width: 680px; }
/* logo Safety in Sync arriba a la derecha */
.nm-col { min-width: 0; display: flex; flex-direction: column; }
.nm-topbar { display: flex; justify-content: flex-end; align-items: center; padding: 10px 28px 0; }
.nm-sis { display: block; line-height: 0; border-radius: 8px; } .nm-sis:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.nm-sis img { height: 96px; width: auto; filter: drop-shadow(0 2px 4px rgba(30,35,59,.18)); transition: transform .15s; } .nm-sis:hover img { transform: scale(1.04); }
.nm-col main { padding-top: 0; margin-top: -96px; }
.nm-col main > .page-head:first-child, .nm-col main > .nm-hero:first-child, .nm-col main > .card:first-child { margin-right: 112px; }
.nm-hero-logo { height: 120px; width: auto; flex: none; }
.nm-hero { align-items: center; }
@media (max-width: 820px) { .nm-topbar { position: absolute; top: 12px; right: max(12px, env(safe-area-inset-right, 0px)); padding: 0; }
  .nm-sis img { height: 58px; } .nm-col main { margin-top: 0; padding-top: 16px; } .nm-col main > .page-head:first-child, .nm-col main > .nm-hero:first-child, .nm-col main > .card:first-child { margin-right: 0; }
  .side { padding-right: 84px; } .nm-hero-logo { height: 84px; } }
.nm-col main > .page-head:first-child { min-height: 92px; align-items: flex-start; }
@media (max-width: 820px) { .nm-col main > .page-head:first-child { min-height: 0; } }
/* ayuda (manual de uso) */
.ayuda-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ayuda-head h1 { font-size: 22px; margin: 0; }
.ayuda-head .sub { margin: 4px 0 0; }
.ayuda-head a.btn { text-decoration: none; }
.ayuda-cols { display: grid; grid-template-columns: 260px 1fr; gap: 16px; align-items: start; margin-top: 16px; }
.ayuda-nav { display: flex; flex-direction: column; gap: 2px; padding: 10px; position: sticky; top: 12px; }
.ayuda-nav a { display: block; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; line-height: 1.35; }
.ayuda-nav a:hover { background: var(--line-2); }
.ayuda-nav a.on { background: var(--line-2); box-shadow: inset 3px 0 0 var(--green); font-weight: 600; }
.ayuda-doc { min-width: 0; line-height: 1.6; }
.ayuda-doc h2 { font-size: 19px; margin: 0 0 10px; }
.ayuda-doc h3 { font-size: 15.5px; margin: 20px 0 6px; }
.ayuda-doc p, .ayuda-doc li { font-size: 14.5px; }
.ayuda-doc img.cap { display: block; max-width: 100%; height: auto; margin: 12px auto 18px; border: 1px solid var(--line); border-radius: 10px; }
.ayuda-doc img.cap.cel { max-width: 300px; }
.ayuda-doc blockquote { margin: 12px 0; padding: 8px 14px; border-left: 4px solid var(--green); background: var(--line-2); border-radius: 0 8px 8px 0; }
.ayuda-doc table { border-collapse: collapse; width: 100%; font-size: 14px; margin: 10px 0; display: block; overflow-x: auto; }
.ayuda-doc th, .ayuda-doc td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.ayuda-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-top: 14px; }
.ayuda-tema { display: block; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; color: var(--text); text-decoration: none; background: var(--card); }
.ayuda-tema:hover { border-color: var(--green); }
.rol-tag { display: inline-block; font-size: 11px; font-weight: 600; background: var(--navy); color: #fff; border-radius: 99px; padding: 1px 8px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }
:root[data-theme="dark"] .rol-tag { background: #3C4A7A; }
@media (max-width: 760px) { .ayuda-cols { grid-template-columns: 1fr; } .ayuda-nav { position: static; } .ayuda-head .btn { width: 100%; justify-content: center; } }
