/* =====================================================================
   MandoWeb · Hoja de estilos
   --brand y --brand-2 se sobrescriben desde Ajustes › Imagen de la empresa.
   ===================================================================== */
:root {
  --brand: #E0601B;
  --brand-2: #1F3A5F;
  --brand-ink: #FFFFFF;
  --brand-soft: color-mix(in srgb, var(--brand) 11%, var(--surface));
  --brand-line: color-mix(in srgb, var(--brand) 40%, var(--line));

  --bg: #F2F4F7;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --line: #DFE4EA;
  --text: #17212C;
  --muted: #5B6878;
  --faint: #8A96A5;

  --ok: #15803D;   --ok-soft: #E2F4E8;
  --warn: #A85A06; --warn-soft: #FCEFD9;
  --bad: #C8261B;  --bad-soft: #FCE5E2;
  --info: #1E5FB4; --info-soft: #E2ECF9;
  --tri-1: #DC2626; --tri-2: #EAB308; --tri-3: #16A34A; --tri-4: #1C1917;

  --radius: 14px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 3px 12px rgba(16, 24, 40, .05);
  --shadow-lg: 0 20px 50px rgba(16, 24, 40, .2);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
  --sidebar-w: 268px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E141B; --surface: #161E28; --surface-2: #1C2632; --line: #2B3745;
  --text: #E7EDF3; --muted: #9DABBA; --faint: #6F7E8E;
  --ok: #4ADE80; --ok-soft: #12301F; --warn: #FBBF24; --warn-soft: #33270F;
  --bad: #F87171; --bad-soft: #3A1715; --info: #7DB3F5; --info-soft: #132A44;
  --tri-4: #000000;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 3px 12px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; text-wrap: balance; }
p { margin: 0; }
a { color: var(--brand); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.c { text-align: center; }
.mb { margin-bottom: 16px; }
.mt { margin-top: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.list-gap { display: flex; flex-direction: column; gap: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.print-only { display: none; }

/* ---------- Estructura ---------- */
.app { display: flex; min-height: 100%; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.view { flex: 1; outline: none; width: 100%; max-width: 1480px; margin: 0 auto; padding: 22px max(16px, env(safe-area-inset-right)) 100px max(16px, env(safe-area-inset-left)); }
@media (min-width: 1024px) { .view { padding: 26px 32px 56px; } }

/* ---------- Barra lateral ---------- */
.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--surface); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.brand-txt { min-width: 0; }
.brand-logo { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); font-weight: 800; font-size: 17px; overflow: hidden; }
.brand-logo.has-img { background: #fff; border: 1px solid var(--line); }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; padding: 3px; }
.brand-name { font-weight: 800; font-size: 16px; line-height: 1.15; overflow-wrap: anywhere; }
.brand-sub { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.nav { padding: 12px 12px; display: flex; flex-direction: column; gap: 16px; }
.nav-group-title { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); padding: 0 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none; line-height: 1.2; }
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.nav-txt { flex: 1; min-width: 0; }
.nav-item .hint { display: block; font-size: 11.5px; font-weight: 500; color: var(--faint); margin-top: 1px; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.nav-item[aria-current="page"] .hint { color: color-mix(in srgb, var(--brand) 70%, var(--muted)); }
.sidebar-foot { margin-top: auto; padding: 14px 18px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 10px; }
.mw-mark { display: flex; gap: 10px; align-items: center; }
.mw-mark svg { width: 30px; height: 30px; flex-shrink: 0; }
.mw-mark b { display: block; color: var(--text); font-size: 15px; letter-spacing: -.01em; }
.mw-mark span { font-size: 11px; }
.scrim { position: fixed; inset: 0; background: rgba(10, 15, 22, .45); z-index: 40; }
@media (max-width: 1023px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 50; transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); padding-top: env(safe-area-inset-top); width: min(300px, 86vw); }
  .sidebar.open { transform: none; }
}

/* ---------- Barra superior ---------- */
.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left)); display: flex; align-items: center; gap: 14px; }
@media (min-width: 1024px) { .topbar { padding: 12px 32px; } }
.menu-btn { display: none; }
@media (max-width: 1023px) { .menu-btn { display: inline-flex; } }
.inc-title { min-width: 0; flex: 1; text-decoration: none; color: var(--text); display: flex; flex-direction: column; gap: 3px; border-radius: 10px; padding: 2px 6px; margin-left: -6px; }
.inc-title:hover { background: var(--surface-2); }
.inc-name { font-size: 17px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.inc-switch svg { width: 16px; height: 16px; color: var(--faint); }
.inc-meta { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); }
.clock { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); flex-shrink: 0; }
.clock .num { display: block; font-size: 20px; font-weight: 700; line-height: 1; }
.clock .lbl { display: block; font-size: 11px; color: var(--muted); line-height: 1.3; }
.ring { width: 30px; height: 30px; flex-shrink: 0; }
.top-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 8px 10px; }
  .inc-title { flex-basis: calc(100% - 60px); order: 1; }
  .menu-btn { order: 0; }
  .clock { order: 2; flex: 1; padding: 5px 10px; } .clock .lbl { display: none; } .clock .num { font-size: 18px; }
  .top-actions { order: 3; }
  .btn-label { display: none; }
  .inc-meta .mono { display: none; }
}

/* ---------- Navegación inferior (móvil) ---------- */
.bottom-nav { display: none; }
@media (max-width: 1023px) {
  .bottom-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; background: var(--surface); border-top: 1px solid var(--line); padding: 6px max(6px, env(safe-area-inset-right)) calc(6px + env(safe-area-inset-bottom)) max(6px, env(safe-area-inset-left)); }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 650; color: var(--muted); text-decoration: none; padding: 4px 0; border-radius: 10px; }
  .bottom-nav a svg { width: 22px; height: 22px; }
  .bottom-nav a[aria-current="page"] { color: var(--brand); }
}

/* ---------- Encabezado de página ---------- */
.page-head { display: flex; align-items: flex-end; gap: 14px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head > div:first-child { flex: 1 1 420px; min-width: 0; }
.page-head h2 { font-size: 26px; font-weight: 800; letter-spacing: -.01em; }
.page-head p { color: var(--muted); margin-top: 4px; max-width: 75ch; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form-code { display: inline-block; font: 700 11.5px var(--mono); color: var(--brand); background: var(--brand-soft); padding: 3px 8px; border-radius: 6px; margin-bottom: 7px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.toolbar .input { max-width: 420px; }

/* ---------- Tarjetas y rejillas ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.card-head h3 { font-size: 16px; font-weight: 700; }
.card-head .sp { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.card-body { padding: 16px 18px; }
.card-body.flush { padding: 0; }
.grid { display: grid; gap: 16px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
@media (max-width: 1180px) { .g-main { grid-template-columns: 1fr; } .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .g-2 { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .g-4 { gap: 10px; } }
.hide-sm { }
@media (max-width: 640px) { .hide-sm { display: none; } }

/* ---------- Botones e insignias ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 14px; white-space: nowrap; text-decoration: none; color: var(--text); line-height: 1.2; }
.btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn:hover { border-color: var(--brand-line); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.dark { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.danger { color: var(--bad); }
.btn.primary.danger { color: var(--brand-ink); }
.btn.sm { padding: 6px 10px; font-size: 13px; border-radius: 8px; }
.btn.sm svg { width: 16px; height: 16px; }
.btn.icon { padding: 8px; }
.btn.icon.sm { padding: 5px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; background: var(--surface-2); color: var(--muted); line-height: 1.3; }
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge svg { width: 13px; height: 13px; }
.b-ok { background: var(--ok-soft); color: var(--ok); }
.b-warn { background: var(--warn-soft); color: var(--warn); }
.b-bad { background: var(--bad-soft); color: var(--bad); }
.b-info { background: var(--info-soft); color: var(--info); }
.b-brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- KPI ---------- */
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: inherit; }
a.kpi:hover { border-color: var(--brand-line); }
.kpi .top { display: flex; align-items: center; gap: 8px; color: var(--muted); font-weight: 650; font-size: 13.5px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.kpi .ico svg { width: 19px; height: 19px; }
.kpi .val { font: 700 32px/1 var(--mono); }
.kpi .foot { font-size: 12.5px; color: var(--muted); }
.tri-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--surface-2); }
.tri-legend { display: flex; gap: 12px; }
.tri-legend span { display: inline-flex; align-items: center; gap: 5px; }
.tri-dot { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }

/* ---------- Formularios ---------- */
.form { display: grid; gap: 14px; }
.form-row { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.form-row.three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 650; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.field small { color: var(--muted); font-size: 12px; }
.field.inline { flex-direction: row; align-items: center; gap: 10px; flex-wrap: wrap; }
.field.inline .select { width: auto; min-width: 220px; max-width: 100%; }
.input, .select, .textarea { width: 100%; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 10px 12px; font-size: 14.5px; }
.input.sm { padding: 6px 9px; font-size: 13.5px; border-radius: 8px; }
.textarea { min-height: 70px; resize: vertical; line-height: 1.45; }
.input:focus, .select:focus, .textarea:focus, .cell:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.ro { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); border: 1px dashed var(--line); font-size: 14px; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); margin-top: 6px; display: flex; gap: 8px; align-items: center; }
.step-chip { font: 700 11px var(--font); letter-spacing: 0; text-transform: none; color: var(--brand); background: var(--brand-soft); padding: 2px 8px; border-radius: 99px; text-decoration: none; }
details.meta-fields { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
details.meta-fields summary { cursor: pointer; font-weight: 650; font-size: 13.5px; color: var(--muted); }
details.meta-fields[open] summary { margin-bottom: 12px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.check { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.check:has(input:checked) { border-color: color-mix(in srgb, var(--ok) 50%, var(--line)); background: var(--ok-soft); }

/* ---------- Pestañas y segmentos ---------- */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; margin-bottom: 16px; scrollbar-width: thin; }
.tab { text-decoration: none; padding: 8px 14px; border-radius: 9px; font-weight: 650; color: var(--muted); white-space: nowrap; display: inline-flex; gap: 8px; align-items: center; font-size: 14px; }
.tab .mono { font-size: 11px; padding: 1px 5px; border-radius: 4px; background: var(--surface-2); }
.tab[aria-selected="true"] { background: var(--brand); color: var(--brand-ink); }
.tab[aria-selected="true"] .mono { background: rgba(255, 255, 255, .22); }
.tab:not([aria-selected="true"]):hover { background: var(--surface-2); color: var(--text); }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 8px; font-weight: 650; font-size: 13px; color: var(--muted); }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

/* ---------- Tablas ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; font-weight: 700; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); vertical-align: bottom; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr.new { animation: pulse 1.8s ease-out; }
.empty { text-align: center; padding: 34px 18px; color: var(--muted); }
.empty svg { width: 40px; height: 40px; opacity: .5; }

/* ---------- Formularios oficiales (Anexo 2 NOM-010) ---------- */
.nom-form { overflow: hidden; }
.nom-head { border-bottom: 2px solid var(--brand-2); }
.nom-head-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; flex-wrap: wrap; }
.nom-head-top .brand-logo { width: 40px; height: 40px; font-size: 15px; }
.nom-head-top > div:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.nom-head-top > div:nth-child(2) span { font-size: 12px; color: var(--muted); }
.nom-code { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.nom-code b { font: 800 13px var(--mono); color: var(--brand-2); letter-spacing: .02em; }
:root[data-theme="dark"] .nom-code b { color: var(--text); }
.nom-code span { font-weight: 700; font-size: 15px; }
.nom-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); border-top: 1px solid var(--line); }
.nom-cells > div { padding: 8px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; }
.nom-cells small, .nom-grid small { font-size: 11px; font-weight: 700; color: var(--muted); }
.nom-cells b { font-size: 14px; font-weight: 650; overflow-wrap: anywhere; }
.nom-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.nom-grid > div { display: flex; flex-direction: column; gap: 2px; }
.nom-sub { padding: 10px 18px; font-size: 12.5px; font-weight: 800; color: var(--brand-2); background: color-mix(in srgb, var(--brand-2) 7%, var(--surface)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
:root[data-theme="dark"] .nom-sub { color: var(--text); }
.nom-tbl th { white-space: normal; min-width: 90px; }
.nom-tbl th.grp { text-align: center; background: color-mix(in srgb, var(--brand-2) 9%, var(--surface)); color: var(--text); border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.nom-tbl td { border-right: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.nom-tbl .mark { font: 800 14px var(--mono); color: var(--brand-2); }
:root[data-theme="dark"] .nom-tbl .mark { color: var(--text); }
.tri-th { border-bottom: 3px solid var(--c) !important; min-width: 64px !important; }
.tri-x { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--c); color: #fff; font: 800 12px var(--mono); }
.nom-foot { padding: 16px 18px; border-top: 1px solid var(--line); }
.nom-foot.two, .sig-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.edit-tbl td { padding: 6px; }
.cell { width: 100%; min-width: 120px; border: 1px solid transparent; background: transparent; border-radius: 8px; padding: 7px 8px; font-size: 14px; resize: vertical; line-height: 1.4; }
.cell:hover { border-color: var(--line); background: var(--surface); }
textarea.cell { min-width: 180px; display: block; }
.org-compact, .org-compact ul { list-style: none; margin: 0; padding-left: 18px; font-size: 14px; }
.org-compact { padding-left: 0; }
.org-compact li { padding: 3px 0; position: relative; }
.org-compact ul { border-left: 2px solid var(--line); margin-left: 6px; }
.oc-role { font: 700 11px var(--mono); padding: 1px 5px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); }
.action-form { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px; }
@media (max-width: 640px) { .action-form { grid-template-columns: 1fr; } }
.add-card { width: 100%; border-style: dashed; padding: 22px; display: flex; gap: 8px; justify-content: center; align-items: center; color: var(--muted); font-weight: 700; background: transparent; box-shadow: none; }
.add-card svg { width: 20px; height: 20px; }
.add-card:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- Firma ---------- */
.sigbox { border: 1.5px dashed var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; min-height: 104px; background: var(--surface); }
.sigbox.signed { border-style: solid; border-color: color-mix(in srgb, var(--ok) 40%, var(--line)); }
.sig-label { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.sig-img { max-height: 70px; max-width: 100%; background: #fff; border-radius: 6px; padding: 2px 6px; border-bottom: 1.5px solid #17212C; }
.sig-meta { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.sig-meta b { color: var(--text); }
.pad-wrap { position: relative; border: 2px dashed var(--brand-line); border-radius: 12px; background: #fff; }
.sig-pad { display: block; width: 100%; height: 210px; touch-action: none; cursor: crosshair; border-radius: 10px; }
.pad-hint { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: #9AA5B1; font-weight: 700; pointer-events: none; }
.pad-wrap::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 44px; border-bottom: 1.5px solid #C5CDD6; pointer-events: none; }

/* ---------- Alertas ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; border: 1px solid; font-size: 14px; color: var(--text); text-decoration: none; }
.alert > svg { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; }
.alert > div { flex: 1; min-width: 0; }
.alert b { display: block; }
.alert .btn { flex-shrink: 0; }
.alert.bad { background: var(--bad-soft); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.alert.bad > svg { color: var(--bad); }
.alert.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 30%, transparent); }
.alert.warn > svg { color: var(--warn); }
.alert.ok { background: var(--ok-soft); border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.alert.ok > svg { color: var(--ok); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 30%, transparent); }
.alert.info > svg { color: var(--info); }
a.alert:hover { filter: brightness(.98); }

/* ---------- 8 pasos ---------- */
.rail { position: relative; }
.rail-track { position: absolute; left: 6%; right: 6%; top: 21px; height: 4px; background: var(--line); border-radius: 4px; }
.rail-track i { display: block; height: 100%; background: var(--ok); border-radius: 4px; }
.rail-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; position: relative; }
.rail-step { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; text-decoration: none; color: var(--text); padding: 0 2px; }
.rail-dot { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 2.5px solid var(--line); color: var(--muted); transition: transform .15s; }
.rail-dot svg { width: 22px; height: 22px; }
.rail-step.done .rail-dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.rail-step.next .rail-dot { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 5px var(--brand-soft); }
.rail-step:hover .rail-dot { transform: scale(1.06); }
.rail-n { font: 700 11px var(--mono); color: var(--muted); }
.rail-t { font-size: 12.5px; font-weight: 650; line-height: 1.25; }
@media (max-width: 900px) {
  .rail-track { display: none; }
  .rail-steps { grid-template-columns: repeat(4, 1fr); row-gap: 14px; }
}
@media (max-width: 480px) { .rail.compact .rail-t { display: none; } .rail.compact .rail-steps { grid-template-columns: repeat(8, 1fr); gap: 2px; } .rail.compact .rail-dot { width: 34px; height: 34px; } .rail.compact .rail-dot svg { width: 17px; height: 17px; } .rail.compact .rail-n { font-size: 10px; } }
.step-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1100px) { .step-cards { grid-template-columns: 1fr; } }
.step-card { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 18px; scroll-margin-top: 90px; }
.step-card.done { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }
.step-card.sel { box-shadow: 0 0 0 3px var(--brand); }
@media (max-width: 560px) { .step-card { grid-template-columns: 1fr; } .step-art-wrap { max-width: 220px; } }
.step-art-wrap { position: relative; }
.step-art { width: 100%; height: auto; display: block; }
.step-num { position: absolute; top: -8px; left: -8px; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-2); color: #fff; font: 800 16px var(--mono); display: grid; place-items: center; border: 3px solid var(--surface); }
.step-card.done .step-num { background: var(--ok); }
.step-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.step-title { display: flex; gap: 10px; align-items: flex-start; justify-content: space-between; }
.step-title h3 { font-size: 18px; font-weight: 800; }
.step-list { margin: 0; padding-left: 18px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.step-list li::marker { color: var(--brand); }
.step-go { display: flex; gap: 8px; flex-wrap: wrap; }
.mini-facts { display: flex; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.mini-facts > span { display: inline-flex; gap: 6px; align-items: center; padding: 5px 10px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); }
.mini-facts svg { width: 16px; height: 16px; }
.zdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.transfer { border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.transfer-h { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.transfer-h svg { width: 18px; height: 18px; color: var(--brand); }

/* ---------- Kanban de recursos ---------- */
.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x proximity; }
.col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; min-height: 300px; scroll-snap-align: start; }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 10px; }
.col-head .count { margin-left: auto; font: 700 13px var(--mono); color: var(--muted); }
.col-body { padding: 0 10px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.col-empty { font-size: 13px; color: var(--faint); padding: 18px 8px; text-align: center; border: 1.5px dashed var(--line); border-radius: 10px; }
.col.over { outline: 2px dashed var(--brand); outline-offset: -4px; background: var(--brand-soft); }
.rcard { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: grab; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; }
.rcard:active { cursor: grabbing; }
.rcard.dragging { opacity: .45; }
.rc-top { display: flex; align-items: center; gap: 6px; }
.rc-top b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-type { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.rc-edit { margin-left: auto; margin-right: -6px; }
.rc-meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 4px 10px; flex-wrap: wrap; }
.rc-unit { font-size: 12.5px; font-weight: 700; color: var(--ok); }
.rc-note { font-size: 12.5px; color: var(--warn); }
.rc-act select { width: 100%; font-size: 13px; padding: 6px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); margin-top: 2px; }

/* ---------- Organigrama ---------- */
.org { display: flex; flex-direction: column; gap: 18px; }
.org-top { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(0, 2.2fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .org-top { grid-template-columns: 1fr; } }
.org-staff { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.org-sections { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); align-items: start; }
.org-sec { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.org-sec-title { font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.org-sec-title i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.org-children { margin-left: 12px; padding-left: 12px; border-left: 2px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.node { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 10px 10px 12px; box-shadow: var(--shadow); }
.node.under { border-color: color-mix(in srgb, var(--warn) 60%, var(--line)); }
.node.over { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-soft); }
.node-h { display: flex; gap: 10px; align-items: flex-start; }
.role { font: 700 11px var(--mono); padding: 3px 6px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line); flex-shrink: 0; color: var(--c); }
.node-txt { min-width: 0; flex: 1; }
.node .tt { font-weight: 700; font-size: 14px; line-height: 1.25; }
.node .who { font-size: 12.5px; color: var(--muted); }
.node-actions { display: flex; gap: 0; flex-shrink: 0; margin: -4px -4px 0 0; }
.node-actions .btn { padding: 5px; border-radius: 7px; }
.node-actions svg { width: 16px; height: 16px; }
.span { display: flex; gap: 8px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.span-bar { display: flex; gap: 3px; margin-top: 6px; }
.span-bar i { height: 6px; flex: 1; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); }
.span-bar i.on { border-color: transparent; }
.span-bar i.opt { box-shadow: 0 0 0 1.5px var(--muted); }

/* ---------- Mando ---------- */
.mode-card { display: flex; gap: 14px; align-items: center; text-align: left; padding: 18px; }
.mode-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mode-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); flex-shrink: 0; }
.mode-card.active .mode-ico { background: var(--brand-soft); color: var(--brand); }
.mode-ico svg { width: 24px; height: 24px; }
.mode-txt { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.mode-txt b { font-size: 17px; }
.mode-txt span { font-size: 13px; color: var(--muted); }
.member { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; }
.member > svg { width: 22px; height: 22px; color: var(--brand); flex-shrink: 0; }
.member-txt { flex: 1; min-width: 0; }
.member-act { display: flex; gap: 4px; flex-shrink: 0; }

/* ---------- Triage ---------- */
.triage-btn { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; overflow: hidden; text-align: left; background: var(--surface); box-shadow: var(--shadow); display: flex; flex-direction: column; }
.triage-btn:hover { box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 30%, transparent); }
.tb-h { background: var(--c); color: #fff; padding: 12px 14px; font-weight: 800; font-size: 16px; display: block; }
.tb-h.dark { color: #1c1917; }
.tb-h small { display: block; font-weight: 600; font-size: 12px; opacity: .92; }
.tb-b { display: flex; align-items: flex-end; justify-content: space-between; padding: 10px 14px; }
.tb-b .num { font: 700 32px/1 var(--mono); }
.tb-add { display: inline-flex; gap: 4px; align-items: center; font-size: 13px; font-weight: 700; color: var(--brand); }
.tb-add svg { width: 16px; height: 16px; }
.tri-pick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 480px) { .tri-pick { grid-template-columns: repeat(2, 1fr); } }
.tri-opt { position: relative; }
.tri-opt input { position: absolute; opacity: 0; }
.tri-opt span { display: block; text-align: center; padding: 12px 6px; border-radius: 10px; border: 2px solid var(--c); font-weight: 800; color: var(--text); cursor: pointer; }
.tri-opt input:checked + span { background: var(--c); color: #fff; }
.tri-opt input:focus-visible + span { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); outline-offset: 2px; }

/* ---------- Bitácora ---------- */
.log-form { display: grid; grid-template-columns: 180px 1fr auto; gap: 10px; align-items: end; }
@media (max-width: 640px) { .log-form { grid-template-columns: 1fr; } }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 54px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.timeline .time { font: 700 13px var(--mono); padding-top: 2px; }
.timeline .who { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 2px; }
.timeline li.new { animation: pulse 1.8s ease-out; }
@keyframes pulse { from { background: var(--brand-soft); } to { background: transparent; } }

/* ---------- Mapa ---------- */
.map { height: 560px; z-index: 0; background: var(--surface-2); }
.map.mini { height: 300px; }
.nom-form .map.mini { border-radius: 0; }
.card > .map:last-child { border-radius: 0 0 var(--radius) var(--radius); }
@media (max-width: 760px) { .map { height: 58vh; } .map.mini { height: 240px; } }
.map-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.fac-btn { display: inline-flex; align-items: center; gap: 8px; padding: 5px 11px 5px 5px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 650; font-size: 13px; }
.fac-btn:hover { border-color: var(--brand-line); }
.fac-btn[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); }
.map-search { padding-top: 10px; padding-bottom: 10px; }
.search-row { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.placing-note { margin: 10px 14px; align-items: center; }
.placing .leaflet-container { cursor: crosshair; }
/* Señales: PC rectángulo naranja con letras negras; demás círculo amarillo con letras negras */
.sym { display: inline-grid; place-items: center; font: 800 11px/1 var(--font); color: #17212C; width: 28px; height: 28px; border-radius: 50%; background: #FFD100; border: 2px solid #17212C; flex-shrink: 0; letter-spacing: -.02em; }
.sym.long { font-size: 8.5px; }
.sym.pc { border-radius: 3px; width: 36px; height: 24px; background: #F28C28; font-size: 12px; }
.sym.big { width: 36px; height: 36px; font-size: 14px; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.sym.big.long { font-size: 11px; }
.sym.big.pc { width: 46px; height: 30px; font-size: 16px; }
.leaflet-div-icon.fac-icon { background: none; border: 0; }
.leaflet-container { font: 13px var(--font); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-content b { font-size: 14px; }
.map-legend { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 10px 18px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); }
.map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.map-legend i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; border: 2px solid; }
.zone-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.fac-list { list-style: none; margin: 0; padding: 0; }
.fac-list li { display: grid; grid-template-columns: 48px 1fr auto; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.fac-list li:last-child { border-bottom: 0; }
.fac-sym { display: grid; place-items: center; }
.fac-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.fac-main b { font-size: 14px; }
.fac-act { display: flex; gap: 2px; }

/* ---------- Incidentes ---------- */
.inc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.inc-card { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.inc-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.inc-card h3 { font-size: 18px; font-weight: 800; }
.inc-card-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.inc-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; font-size: 13px; color: var(--muted); }
.inc-stats span { display: inline-flex; gap: 6px; align-items: center; }
.inc-stats svg { width: 16px; height: 16px; }
.inc-card-a { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--line); }
.progress > i { display: block; height: 100%; background: var(--brand); border-radius: 99px; }

/* ---------- Ajustes ---------- */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 40px; height: 40px; border-radius: 10px; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2.5px var(--text); }
.color-row { display: flex; gap: 8px; }
.color-input { width: 48px; height: 42px; padding: 2px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); flex-shrink: 0; }
.logo-drop { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1.5px dashed var(--line); border-radius: 12px; }
.logo-drop .brand-logo { width: 68px; height: 68px; font-size: 22px; border-radius: 14px; }
.logo-drop > div { display: flex; flex-direction: column; gap: 8px; }
.preview { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.preview-top { background: var(--brand-2); color: #fff; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.preview-top .brand-logo { width: 40px; height: 40px; border-radius: 10px; }
.pv-sub { opacity: .8; }
.pv-app { margin-left: auto; font: 700 12px var(--mono); opacity: .85; }
.preview-b { padding: 16px; display: flex; flex-direction: column; gap: 12px; background: var(--surface); }

/* ---------- Modal y avisos ---------- */
.modal-root:empty { display: none; }
.modal-back { position: fixed; inset: 0; background: rgba(10, 15, 22, .5); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: calc(100dvh - 32px); overflow: auto; }
.modal.wide { width: min(780px, 100%); }
.modal-h { display: flex; align-items: center; gap: 10px; padding: 18px 20px 6px; position: sticky; top: 0; background: var(--surface); z-index: 1; }
.modal-h h3 { font-size: 19px; font-weight: 800; }
.modal-h .btn { margin-left: auto; }
.modal-b { padding: 12px 20px 8px; }
.modal-f { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px 20px; flex-wrap: wrap; }
@media (max-width: 560px) { .modal-back { padding: 0; align-items: end; } .modal, .modal.wide { width: 100%; border-radius: 18px 18px 0 0; max-height: 92dvh; } .modal-f .btn { flex: 1; } }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-align: left; }
.quick:hover { border-color: var(--brand); background: var(--brand-soft); }
.quick svg { width: 24px; height: 24px; color: var(--brand); flex-shrink: 0; }
.quick b { display: block; font-size: 14.5px; }
.quick span { font-size: 12.5px; color: var(--muted); }
@media (max-width: 480px) { .quick-grid { grid-template-columns: 1fr; } }
.toast-root { position: fixed; z-index: 70; left: 50%; transform: translateX(-50%); bottom: calc(86px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
@media (min-width: 1024px) { .toast-root { bottom: 24px; } }
.toast { background: var(--text); color: var(--surface); padding: 10px 16px; border-radius: 12px; font-weight: 600; font-size: 14px; box-shadow: var(--shadow-lg); animation: tin .2s ease-out; text-align: center; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Impresión ---------- */
@media print {
  @page { size: letter; margin: 12mm; }
  .sidebar, .topbar, .bottom-nav, .no-print, .tabs, .toast-root, .modal-root, .page-head, .toolbar, .leaflet-control-container { display: none !important; }
  body { background: #fff; color: #000; font-size: 11px; }
  :root { --surface: #fff; --surface-2: #f3f3f3; --line: #999; --text: #000; --muted: #333; }
  .view { padding: 0; max-width: none; }
  .card { box-shadow: none; border-color: #777; break-inside: auto; }
  .page-break { break-before: page; }
  .print-only { display: block; }
  .sig-line { width: 100%; height: 40px; border-bottom: 1px solid #000; }
  .sigbox { border: 1px solid #777; }
  .cell, .input, .select, .textarea { border: 0 !important; padding: 2px 0; resize: none; background: transparent !important; }
  .tbl th, .tbl td { padding: 4px 6px; border: 1px solid #999 !important; }
  .table-wrap { overflow: visible; }
  .map.mini { height: 340px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Portal de inicio de sesión (misma familia visual que los sistemas SST)
   ===================================================================== */
.acceso { --az: #0C1E41; --az2: #173463; --az3: #2B4E8C; --am: #F7A800; --am2: #FFD87A;
  position: fixed; inset: 0; z-index: 900; overflow: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  padding: max(16px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  background: radial-gradient(1200px 600px at 15% -10%, rgba(247, 168, 0, .16), transparent 60%), radial-gradient(900px 500px at 110% 110%, rgba(43, 78, 140, .55), transparent 60%), var(--az);
  font-family: 'Segoe UI', var(--font); color: var(--az); transition: opacity .2s; }
.acceso.saliendo { opacity: 0; }
body.locked .app, body.locked .bottom-nav { display: none; }
.acceso-marco { flex-shrink: 0; width: 100%; max-width: 1010px; display: grid; grid-template-columns: 1.05fr .95fr; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 40px rgba(12, 30, 65, .28), 0 30px 80px rgba(0, 0, 0, .35); }
.acceso-relato { background: linear-gradient(160deg, #0a1836, #16305c); color: #fff; padding: 40px 32px; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; }
.acceso-logos { display: flex; flex-direction: column; gap: 12px; align-items: center; margin-bottom: 22px; }
.acceso-logos .fila { display: flex; gap: 18px; align-items: center; justify-content: center; }
.lg-trigo { height: 66px; width: auto; }
.lg-oleomex { display: inline-flex; align-items: center; background: #fff; border-radius: 5px; padding: 5px 9px; height: 36px; }
.lg-oleomex img { height: 100%; width: auto; display: block; }
.lg-sst { height: 78px; width: auto; border-radius: 5px; display: block; }
.acceso-relato h1 { font-size: 46px; line-height: 1; margin: 6px 0 8px; font-weight: 800; letter-spacing: -.02em; }
.acceso-relato h1 small { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; line-height: 1.5; text-transform: uppercase; color: var(--am); margin-bottom: 10px; }
.acceso-relato .lema { color: var(--am); font-size: 18px; font-weight: 700; margin: 0; }
.acceso-relato .lead { color: #c5d3e8; font-size: 14px; max-width: 42ch; margin: 14px auto 0; line-height: 1.55; }
.acceso-pasos { list-style: none; padding: 0; margin: 22px 0 0; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.acceso-pasos li { display: inline-flex; align-items: center; gap: 7px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14); border-radius: 99px; padding: 5px 12px 5px 5px; font-size: 12.5px; color: #dbe4f3; }
.acceso-pasos span { background: var(--am); color: var(--az); font-weight: 800; border-radius: 99px; min-width: 26px; height: 22px; padding: 0 6px; display: inline-grid; place-items: center; font-size: 11.5px; }
.login-box { background: #fff; padding: 36px 34px; display: flex; flex-direction: column; justify-content: center; text-align: center; color: var(--az); }
.login-box h2 { font-size: 21px; font-weight: 800; margin-bottom: 4px; }
.login-box .sub { color: #5b6770; font-size: 13.5px; margin-bottom: 20px; }
.login-box form { text-align: left; }
.login-box .campo { margin-bottom: 14px; }
.login-box .campo label { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #5b6770; margin-bottom: 5px; }
.login-box .campo input { width: 100%; padding: 11px 12px; border: 1px solid #e2e8e6; border-radius: 7px; background: #fbfdfc; color: var(--az); font-size: 15px; }
.login-box .campo input:focus { outline: none; border-color: var(--az3); box-shadow: 0 0 0 3px rgba(43, 78, 140, .14); background: #fff; }
.login-box .ayuda { font-size: 12px; color: #5b6770; margin-top: 4px; }
.con-boton { display: flex; gap: 6px; }
.con-boton input { flex: 1; min-width: 0; }
.ver-clave { border: 1px solid #e2e8e6; background: #fff; border-radius: 7px; padding: 0 12px; font-size: 12.5px; font-weight: 700; color: var(--az); }
.recordar { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: #5b6770; margin: 2px 0 16px; cursor: pointer; }
.recordar input { width: 17px; height: 17px; accent-color: var(--az); }
.btn-sst { display: inline-flex; align-items: center; justify-content: center; background: var(--am); color: var(--az); border: none; border-radius: 7px; padding: 12px 18px; font-weight: 800; font-size: 15px; box-shadow: 0 1px 2px rgba(12, 30, 65, .18); }
.btn-sst:hover { filter: brightness(1.06); box-shadow: 0 3px 10px rgba(247, 168, 0, .35); }
.btn-sst.ancho { width: 100%; }
.btn-sst:disabled { opacity: .6; cursor: wait; }
.aviso-acceso { background: #FBE9EA; border-left: 3px solid #96131A; color: #6d0f15; padding: 9px 12px; border-radius: 5px; font-size: 13px; margin-bottom: 14px; text-align: left; }
.acceso-nota { font-size: 12.5px; color: #5b6770; margin-top: 16px; }
.acceso-pie { flex-shrink: 0; color: #c5d3e8; font-size: 13px; font-weight: 600; letter-spacing: .04em; text-align: center; border-top: 1px solid rgba(255, 255, 255, .14); padding-top: 12px; width: 100%; max-width: 1010px; }
.acceso :focus-visible { outline: 3px solid var(--am); outline-offset: 2px; }
@media (max-width: 860px) {
  .acceso { justify-content: flex-start; }
  .acceso-marco { grid-template-columns: 1fr; }
  .acceso-relato { padding: 26px 20px; }
  .acceso-relato h1 { font-size: 36px; }
  .acceso-relato .lead, .acceso-pasos { display: none; }
  .lg-trigo { height: 48px; } .lg-oleomex { height: 28px; } .lg-sst { height: 56px; }
  .login-box { padding: 26px 20px; }
}
.foot-user { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.foot-user b { color: var(--text); }

/* ---------- Acceso: estados de instalación ---------- */
.acceso-carga { display: flex; flex-direction: column; align-items: center; gap: 14px; color: #5b6770; padding: 30px 0; }
.spin { width: 34px; height: 34px; border-radius: 50%; border: 4px solid #e2e8e6; border-top-color: #F7A800; animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.pie-acciones { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.btn-sec { background: #fff; border: 1px solid #e2e8e6; color: #0C1E41; border-radius: 7px; padding: 10px 16px; font-weight: 700; font-size: 14px; }
.btn-sec:hover { border-color: #2B4E8C; background: #f7fbff; }
.enlace-sutil { background: none; border: none; color: #2B4E8C; font-size: 13px; text-decoration: underline; padding: 0; }
.aviso-acceso.ok { background: #E4F3EB; border-left-color: #0F7A46; color: #0b5732; }
.pasos-arranque { list-style: none; padding: 0; margin: 0 0 14px; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.pasos-arranque li { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #e2e8e6; border-radius: 8px; padding: 10px 12px; background: #fff; }
.pasos-arranque .marca { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 26px; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 13px; background: #f4f7f6; color: #5b6770; border: 2px solid #e2e8e6; }
.pasos-arranque li.actual { border-color: #F7A800; box-shadow: 0 0 0 3px rgba(247, 168, 0, .18); }
.pasos-arranque li.actual .marca { background: #F7A800; border-color: #F7A800; color: #0C1E41; }
.pasos-arranque b { display: block; font-size: 14px; }
.pasos-arranque span { font-size: 12.5px; color: #5b6770; }
.welcome { max-width: 640px; margin: 40px auto; padding: 32px 28px; text-align: center; display: flex; flex-direction: column; gap: 14px; align-items: center; }
.welcome .brand-logo { width: 64px; height: 64px; font-size: 22px; }
.welcome h2 { font-size: 26px; font-weight: 800; }
.member.off { opacity: .6; }
#syncState { align-self: flex-start; }
