/* Fuente de la marca: MD Nichrome (Mass-Driver). Solo se usan las versiones completas;
   las "Test" no incluyen tildes ni ñ. Cada archivo cubre un rango de grosores. */
@font-face { font-family: "MD Nichrome"; src: url("/fonts/MDNichrome-Thin.woff2") format("woff2"); font-weight: 100 200; font-display: swap; }
@font-face { font-family: "MD Nichrome"; src: url("/fonts/MDNichrome-Regular.woff2") format("woff2"); font-weight: 300 500; font-display: swap; }
@font-face { font-family: "MD Nichrome"; src: url("/fonts/MDNichrome-Bold.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "MD Nichrome"; src: url("/fonts/MDNichrome-Black.woff2") format("woff2"); font-weight: 800 900; font-display: swap; }

/* Marca ORBIT (D-56): Barlow para el texto; MD Nichrome para títulos, indicadores, secciones y botones (D-49).
   Colores del logo C4·4: turquesa #23A394, menta #D4F3EE, sol #FFC94D. El turquesa oscuro #0F6E64 va en textos
   y botones (contraste AA sobre blanco); el turquesa, en acentos, barras e indicadores. */
:root {
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-marca: "MD Nichrome", "Barlow", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Consolas, monospace;

  --bg: #f6fbfa;
  --surface: #ffffff;
  --surface-2: #eef8f6;
  --line: #d8eeea;
  --text: #1c2b29;
  --text-2: #5a6b68;
  --accent: #0f6e64;          /* texto, enlaces y botones: turquesa oscuro (contraste AA sobre blanco) */
  --accent-hover: #14857a;
  --accent-strong: #23a394;   /* turquesa: acentos, barras, indicadores */
  --accent-soft: #e3f6f3;
  --on-accent: #ffffff;
  --ok: #2e7d32; --ok-soft: #e7f5e7;
  --warn: #b45309; --warn-soft: #fff3df;
  --danger: #c0262d; --danger-soft: #fdeaea;
  --info: #0f6e64; --info-soft: #e3f6f3;
  --muted: #6b7280; --muted-soft: #eef2f7;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(15, 110, 100, .07);
  /* Barra lateral en turquesa profundo; el satélite amarillo del logo destaca sobre ella */
  --side-bg: linear-gradient(180deg, #13716a 0%, #0f5c55 55%, #0b4a44 100%);
  --side-text: rgba(255, 255, 255, .92);
  --side-text-2: rgba(255, 255, 255, .72);
  --side-hover: rgba(255, 255, 255, .14);
  --side-active-bg: #ffffff;
  --side-active-text: #0f6e64;
  --side-line: rgba(255, 255, 255, .22);
  --side-card: rgba(255, 255, 255, .12);
  color-scheme: light;
}
/* Tema oscuro: sigue al sistema salvo que el usuario elija uno con el botón (data-theme en <html>). */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12151b; --surface: #1a1e26; --surface-2: #222833; --line: #2d3440;
    --text: #e7eaf0; --text-2: #a2abbb;
    --accent: #5fd4c4; --accent-hover: #7fdfd1; --accent-soft: #16332f;
    --ok: #7cc47f; --ok-soft: #1c2f1d;
    --warn: #e5a54a; --warn-soft: #3a2a12;
    --danger: #f08b80; --danger-soft: #3d1c19;
    --info: #8fd9cf; --info-soft: #142d2a;
    --muted: #9aa3b2; --muted-soft: #262c36;
    --accent-strong: #23a394; --on-accent: #0d1a18; --shadow: none;
    --side-bg: var(--surface); --side-text: var(--text); --side-text-2: var(--text-2); --side-hover: var(--surface-2);
    --side-active-bg: var(--accent-soft); --side-active-text: var(--accent); --side-line: var(--line); --side-card: var(--surface-2);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #12151b; --surface: #1a1e26; --surface-2: #222833; --line: #2d3440;
  --text: #e7eaf0; --text-2: #a2abbb;
  --accent: #5fd4c4; --accent-hover: #7fdfd1; --accent-soft: #16332f;
  --ok: #7cc47f; --ok-soft: #1c2f1d;
  --warn: #e5a54a; --warn-soft: #3a2a12;
  --danger: #f08b80; --danger-soft: #3d1c19;
  --info: #8fd9cf; --info-soft: #142d2a;
  --muted: #9aa3b2; --muted-soft: #262c36;
  --accent-strong: #23a394; --on-accent: #0d1a18; --shadow: none;
  --side-bg: var(--surface); --side-text: var(--text); --side-text-2: var(--text-2); --side-hover: var(--surface-2);
  --side-active-bg: var(--accent-soft); --side-active-text: var(--accent); --side-line: var(--line); --side-card: var(--surface-2);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-family: var(--font-marca); font-weight: 900; font-size: 1.55rem; margin: 0; line-height: 1.2; letter-spacing: .01em; }
h2 { font-family: var(--font-marca); font-weight: 700; font-size: 1rem; margin: 0 0 12px; color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }

.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--side-bg); color: var(--side-text); border-right: 1px solid var(--side-line); padding: 20px 14px; display: flex; flex-direction: column; gap: 24px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.brand strong { display: block; }
.brand strong { font-family: var(--font-marca); font-weight: 900; font-size: 1.35rem; letter-spacing: .06em; line-height: 1; }
.brand small { color: var(--side-text-2); letter-spacing: .3em; font-size: .68rem; }
.logo { width: 40px; height: 40px; flex: none; display: block; }
#nav, .nav-admin { display: flex; flex-direction: column; gap: 2px; }
.nav-admin { margin-top: auto; margin-bottom: -12px; }
.nav-admin .nav-title { margin-top: 0; }
.nav-admin[hidden] { display: none; }
.sidebar nav a { padding: 9px 12px; border-radius: 999px; color: var(--side-text); font-family: var(--font-marca); font-weight: 400; display: flex; justify-content: space-between; align-items: center; }
.sidebar nav a:hover { background: var(--side-hover); text-decoration: none; color: var(--side-text); }
.sidebar nav a.active { background: var(--side-active-bg); color: var(--side-active-text); font-weight: 700; box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.nav-count:not(:empty) { background: var(--side-active-bg); color: var(--side-active-text); border-radius: 999px; font-size: .72rem; padding: 1px 7px; font-weight: 600; }
.nav-title { margin: 14px 10px 4px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--side-text-2); }
.sidebar nav a[hidden] { display: none; }
.nav-admin[hidden] + .user-card { margin-top: auto; }
.user-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 12px; border: 1px solid var(--side-line); background: var(--side-card); color: var(--side-text); }
.user-card:hover, .user-card.active { text-decoration: none; border-color: var(--side-text); }
.user-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.user-info strong, .user-info small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-info small { color: var(--side-text-2); font-size: .78rem; }
.main .user-info small { color: var(--text-2); }
.user-gear { color: var(--side-text-2); display: grid; }
.user-gear svg { width: 18px; height: 18px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: var(--on-accent); border: 2px solid var(--surface); display: grid; place-items: center; font-weight: 700; font-size: .8rem; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell.big { margin-bottom: 10px; }
.user-cell.big .avatar { width: 46px; height: 46px; font-size: 1rem; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; text-align: left; }

.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); position: sticky; top: 0; z-index: 2; }
.env { font-size: .78rem; color: var(--warn); background: var(--warn-soft); padding: 3px 9px; border-radius: 999px; }
.env.env-ok { color: var(--ok); background: var(--ok-soft); }
.topbar-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.theme-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: 999px; cursor: pointer; color: var(--accent); font-family: var(--font-marca); }
.theme-btn:hover { border-color: var(--accent); color: var(--text); }
.theme-btn svg { width: 16px; height: 16px; }
.perfil { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: .85rem; }
#view { padding: 24px 28px 48px; max-width: 1280px; }

.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.sub { margin: 4px 0 0; color: var(--text-2); }
.back { display: inline-block; margin-bottom: 10px; font-size: .85rem; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; margin-bottom: 16px; min-width: 0; box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.grid-2 > .card, .stack > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 16px; }
.stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }

.kpis { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 2px; color: var(--text); border-top: 4px solid var(--line); box-shadow: var(--shadow); }
.kpi:hover { text-decoration: none; border-color: var(--accent-strong); }
.kpi-label { font-size: .8rem; color: var(--text-2); }
.kpi-valor { font-family: var(--font-marca); font-size: 1.8rem; font-weight: 900; font-variant-numeric: tabular-nums; }
.kpi-nota { font-size: .75rem; color: var(--text-2); }
.k-accent { border-top-color: var(--accent-strong); }
.k-danger { border-top-color: var(--danger); }
.k-warn { border-top-color: var(--warn); }
.k-ok { border-top-color: var(--ok); }

.bars { display: flex; flex-direction: column; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 190px 1fr 32px; align-items: center; gap: 10px; }
.bar { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent-strong); }
.bar-fill.t-accent { background: var(--accent-strong); } .bar-fill.t-ok { background: var(--ok); } .bar-fill.t-warn { background: var(--warn); } .bar-fill.t-danger { background: var(--danger); }
.bar-fill.t-info { background: var(--info); } .bar-fill.t-muted, .bar-fill.t-neutral { background: var(--muted); }
.bar-num { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.filters input, .filters select, .perfil select, textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.filters input:focus, .filters select:focus, .perfil select:focus, textarea:focus { outline: 2px solid var(--accent-strong); outline-offset: 1px; }
.filters input { min-width: 240px; flex: 1 1 240px; }
.count { color: var(--text-2); font-size: .85rem; margin: 0 0 8px; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-weight: 700; font-size: .78rem; color: var(--accent); background: var(--surface-2); text-transform: uppercase; letter-spacing: .03em; padding: 9px 12px; white-space: nowrap; }
td { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; }
tr[data-href] { cursor: pointer; }
tr[data-href]:hover td { background: var(--surface-2); }

.badge, .chip { display: inline-block; font-size: .75rem; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.t-ok { background: var(--ok-soft); color: var(--ok); }
.t-warn { background: var(--warn-soft); color: var(--warn); }
.t-danger { background: var(--danger-soft); color: var(--danger); }
.t-info { background: var(--info-soft); color: var(--info); }
.t-accent { background: var(--accent-soft); color: var(--accent); }
.t-muted { background: var(--muted-soft); color: var(--muted); }
.t-neutral { background: var(--surface-2); color: var(--text-2); }
.chip-ok { background: var(--ok-soft); color: var(--ok); }
.chip-warn { background: var(--warn-soft); color: var(--warn); }
.chip-danger { background: var(--danger-soft); color: var(--danger); }
.chip-info { background: var(--info-soft); color: var(--info); }

.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--text-2); }
.kv strong { font-weight: 500; text-align: right; }
blockquote { margin: 12px 0 0; padding: 10px 12px; background: var(--surface-2); border-left: 3px solid var(--line); border-radius: 6px; color: var(--text-2); }

.stepper { list-style: none; display: flex; padding: 0; margin: 0 0 16px; gap: 4px; overflow-x: auto; }
.stepper li { flex: 1; min-width: 110px; padding: 8px 10px; font-size: .78rem; background: var(--surface); border: 1px solid var(--line); color: var(--text-2); border-radius: 6px; text-align: center; }
.stepper li.done { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.stepper li.now { background: var(--accent); color: var(--on-accent); border-color: transparent; font-weight: 600; }
.stepper li.stop { background: var(--danger-soft); color: var(--danger); border-color: transparent; font-weight: 600; }

.rules { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.rules li { display: flex; gap: 10px; }
.rules li div { display: flex; flex-direction: column; }
.rules li span:not(.r-icon) { color: var(--text-2); font-size: .85rem; }
.r-icon { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: .75rem; font-weight: 700; }
.r-ok .r-icon { background: var(--ok-soft); color: var(--ok); }
.r-falta .r-icon { background: var(--warn-soft); color: var(--warn); }
.r-error .r-icon { background: var(--danger-soft); color: var(--danger); }
.r-info .r-icon { background: var(--info-soft); color: var(--info); }

.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.files li { display: flex; gap: 10px; align-items: center; }
.files li div { display: flex; flex-direction: column; }
.file-icon { width: 26px; height: 32px; border-radius: 4px; background: var(--surface-2); border: 1px solid var(--line); flex: none; }

.audit { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.audit li { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 14px 16px; display: flex; flex-direction: column; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-strong); }
.tl-fecha { font-size: .78rem; color: var(--text-2); }
.tl-tipo { font-weight: 600; }

.card-actions { border-color: var(--accent); }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 6px; }
.btn { border: 1px solid var(--line); background: var(--surface); padding: 8px 16px; border-radius: 999px; cursor: pointer; font-family: var(--font-marca); font-weight: 400; color: var(--accent); }
.btn:hover:not(:disabled) { border-color: var(--accent-strong); background: var(--accent-soft); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
textarea { width: 100%; resize: vertical; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; }
.a-info { background: var(--info-soft); color: var(--info); }
.a-warn { background: var(--warn-soft); color: var(--warn); }
.a-muted { background: var(--muted-soft); color: var(--text-2); }
.empty { color: var(--text-2); margin: 0; }
.muted { color: var(--text-2); }
.small { font-size: .8rem; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 8px; z-index: 10; max-width: calc(100% - 32px); }

@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px 16px; border-right: 0; border-bottom: 1px solid var(--side-line); }
  #nav, .nav-admin { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .nav-admin { margin: 0; align-items: center; }
  .nav-admin .nav-title { margin: 0 6px 0 10px; }
  .user-card { margin-top: 0; width: 100%; }
  .topbar { padding: 10px 16px; position: static; flex-wrap: wrap; }
  #view { padding: 16px; }
  .grid-2 { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bar-row { grid-template-columns: 150px 1fr 28px; }
  .filters input { min-width: 0; }
}

/* Administración */
.form-card { border-color: var(--accent); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.form-grid label { display: flex; flex-direction: column; gap: 4px; font-size: .85rem; color: var(--text-2); }
.form-grid input:not([type="checkbox"]), .form-grid select, .matrix select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; color: var(--text); }
.form-grid label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.small-btn { padding: 5px 10px; font-size: .82rem; }
.profile-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.profile-cards .card { margin: 0; }
.profile-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.profile-card p { margin: 4px 0 8px; }
.matrix td.center, .matrix th.center { text-align: center; }
.matrix input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.matrix input:disabled { cursor: not-allowed; }
.row-group td { background: var(--surface-2); font-weight: 600; font-size: .78rem; color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; }
h3 { font-size: .85rem; margin: 16px 0 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btn { border: 0; background: var(--surface); padding: 8px 14px; cursor: pointer; color: var(--text-2); font-family: var(--font-marca); }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
@media (max-width: 860px) { .form-grid { grid-template-columns: 1fr; } }

/* Inicio de sesión y avisos de administración (F2) */
.login-card { max-width: 460px; margin: 64px auto; display: grid; gap: 12px; }
.login-card h1 { font-size: 1.6rem; letter-spacing: .04em; }
.login-card h1 small { font-family: var(--font); font-weight: 500; font-size: .7rem; letter-spacing: .3em; color: var(--text-2); margin-left: 6px; }
.login-logo { display: block; }
.alert.dirty { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.alert.dirty .btn-row { margin: 0; }
.user-card[hidden], .perfil[hidden] { display: none; }
.card label.small { display: grid; gap: 4px; margin-top: 12px; }

/* Bandeja priorizada, notificaciones y confirmaciones (F3) */
.head-badges { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.bandeja td .muted.small { display: block; margin-top: 2px; }
.bell { position: relative; display: inline-grid; place-items: center; width: 36px; height: 36px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); background: var(--surface); }
.bell:hover, .bell.active { border-color: var(--accent); color: var(--text); text-decoration: none; }
.bell[hidden] { display: none; }
.bell svg { width: 18px; height: 18px; }
.bell-n:not(:empty) { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: var(--surface); font-size: .7rem; font-weight: 700; display: grid; place-items: center; }
.notifs { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.notif { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: start; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.notif:hover { border-color: var(--accent); }
.notif-texto { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-texto .muted { white-space: pre-line; }
.notif-punto { width: 10px; height: 10px; margin-top: 5px; border-radius: 50%; background: transparent; }
.nueva .notif { border-left: 3px solid var(--accent); }
.nueva .notif-punto { background: var(--accent); }
.leida .notif { color: var(--text-2); }
.dialog { border: 1px solid var(--line); border-radius: var(--radius); padding: 0; max-width: min(520px, calc(100% - 32px)); background: var(--surface); color: var(--text); }
.dialog::backdrop { background: rgb(0 0 0 / .4); }
.dialog-body { padding: 20px; display: grid; gap: 6px; }
.dialog-body p { margin: 8px 0 0; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .notif { grid-template-columns: 10px 1fr; } .notif > .nowrap { grid-column: 2; } }

/* Validaciones y detector de firmas (F5) */
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.inline-form input { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; flex: 1 1 140px; min-width: 0; }
.files li div > span + span { margin-top: 4px; }
.profile-head select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; }

/* Planilla: archivos leídos antes de cargarlos */
.card-sub { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.card-sub ul { margin: 8px 0; padding-left: 18px; }
.txt-danger { color: var(--danger); }
#pla-archivo { margin: 8px 0 12px; max-width: 100%; }
.card-sub label { display: inline-flex; align-items: center; gap: 8px; }
.card-sub label select { width: auto; }

/* Ejecución en RMS (D-55) */
.rms-panel .rms-cab { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.rms-panel .rms-cab h2 { margin: 0; }
.rms-ordenes { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.rms-ordenes li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 0.9rem; }
