/* Cronogramas — sistema visual. Tokens en :root, tema oscuro por preferencia o data-theme. */
:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --border: #dde1e7;
  --border-strong: #c3c9d2;
  --text: #1b2330;
  --text-2: #4a5568;
  --muted: #6b7584;
  --primary: #2563eb;
  --primary-ink: #ffffff;
  --primary-soft: #e3ecfd;
  --focus: #2563eb;
  --danger: #c62828;
  --danger-soft: #fdecec;
  --warning: #a15c00;
  --warning-soft: #fff4e0;
  --success: #1b7a43;
  --success-soft: #e5f5ec;
  --info: #0e6aa8;
  --info-soft: #e4f2fb;
  /* estados (siempre acompañados de icono/etiqueta, nunca solo color) */
  --st-not-started: #6b7584;
  --st-in-progress: #0e6aa8;
  --st-completed: #1b7a43;
  --st-blocked: #7b3fb3;
  --st-cancelled: #8a8f98;
  --st-overdue: #c62828;
  --st-at-risk: #a15c00;
  --key: #b7791f;
  --input-cell: #f3f7ff;
  --computed-cell: #f7f7f7;
  --radius: 8px;
  --radius-sm: 5px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .18);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --topbar-h: 52px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1419; --surface: #171d24; --surface-2: #1e252e; --border: #2b343f; --border-strong: #3a4552;
    --text: #e6e9ee; --text-2: #b9c1cc; --muted: #8b95a3; --primary: #5b8ff9; --primary-ink: #0b1220; --primary-soft: #1d2b45;
    --focus: #7aa5ff; --danger: #f07070; --danger-soft: #3a1d1f; --warning: #f0b45a; --warning-soft: #3a2c16;
    --success: #5cc98b; --success-soft: #16301f; --info: #5ab3ea; --info-soft: #14283a;
    --st-not-started: #8b95a3; --st-in-progress: #5ab3ea; --st-completed: #5cc98b; --st-blocked: #b48ae0; --st-cancelled: #6d7480;
    --st-overdue: #f07070; --st-at-risk: #f0b45a; --key: #f2c94c; --input-cell: #1a2436; --computed-cell: #1c2127;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1419; --surface: #171d24; --surface-2: #1e252e; --border: #2b343f; --border-strong: #3a4552;
  --text: #e6e9ee; --text-2: #b9c1cc; --muted: #8b95a3; --primary: #5b8ff9; --primary-ink: #0b1220; --primary-soft: #1d2b45;
  --focus: #7aa5ff; --danger: #f07070; --danger-soft: #3a1d1f; --warning: #f0b45a; --warning-soft: #3a2c16;
  --success: #5cc98b; --success-soft: #16301f; --info: #5ab3ea; --info-soft: #14283a;
  --st-not-started: #8b95a3; --st-in-progress: #5ab3ea; --st-completed: #5cc98b; --st-blocked: #b48ae0; --st-cancelled: #6d7480;
  --st-overdue: #f07070; --st-at-risk: #f0b45a; --key: #f2c94c; --input-cell: #1a2436; --computed-cell: #1c2127;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 12px rgba(0,0,0,.3); --shadow-lg: 0 12px 32px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--primary); }
h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; }
h1 { font-size: 1.45rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 100; }
.skip-link:focus { left: 8px; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: .92em; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* barra superior */
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 16px;
  padding: 0 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
.demo-badge { flex: none; align-self: center; margin-right: 6px; padding: 2px 8px; border-radius: 999px; background: var(--warning-soft); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent); font-size: .68rem; font-weight: 700; letter-spacing: .08em; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 650; color: var(--primary); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--text); }
.mainnav { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.mainnav a { padding: 6px 10px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; white-space: nowrap; }
.mainnav a:hover { background: var(--surface-2); }
.mainnav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.topbar-actions { display: flex; align-items: center; gap: 6px; }
.search input { width: 220px; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: var(--radius-sm);
  background: transparent; color: var(--text-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg, .btn svg { width: 18px; height: 18px; }
.badge { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--danger); color: #fff; font-size: 10px; line-height: 16px; font-weight: 700; text-align: center; }
.user-btn { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 18px; padding: 4px 10px; cursor: pointer; max-width: 180px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

main { padding: 20px 24px 48px; max-width: 1600px; margin: 0 auto; }
main:focus { outline: none; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 4px; }
.breadcrumb a { color: var(--muted); }

/* controles */
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); padding: 6px 8px; min-height: 32px; max-width: 100%; }
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 30%, transparent); outline-offset: 0; }
input[type="checkbox"], input[type="radio"] { min-height: auto; accent-color: var(--primary); }
label { display: block; font-weight: 550; margin: 10px 0 4px; color: var(--text-2); font-size: .9rem; }
label.inline { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.field-help { font-size: .8rem; color: var(--muted); margin-top: 2px; }
.form-error { color: var(--danger); background: var(--danger-soft); border-radius: var(--radius-sm); padding: 8px 10px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 550; min-height: 32px; padding: 5px 12px;
  border-radius: var(--radius-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, var(--border)); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.small { min-height: 26px; padding: 2px 8px; font-size: .85rem; }
.btn.block { width: 100%; margin-top: 12px; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: not-allowed; }

/* superficies */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; }
.kpi .label { color: var(--muted); font-size: .82rem; }
.kpi .value { font-size: 1.6rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 12px; overflow-x: auto; }
.tabs [role="tab"] { border: 0; background: none; padding: 8px 12px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; font: inherit; white-space: nowrap; }
.drawer .tabs { flex-wrap: wrap; overflow: visible; }
.drawer .tabs [role="tab"] { padding: 7px 10px; font-size: .92rem; }
.tabs [role="tab"][aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
table.simple { width: 100%; border-collapse: collapse; }
table.simple th, table.simple td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.simple th { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty h3 { color: var(--text); }

/* chips, estados, marcas */
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: .82rem; }
.chip button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 0 0 2px; font-size: 1rem; line-height: 1; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: .82rem; font-weight: 550; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.status.NOT_STARTED { color: var(--st-not-started); } .status.IN_PROGRESS { color: var(--st-in-progress); }
.status.COMPLETED { color: var(--st-completed); } .status.BLOCKED { color: var(--st-blocked); } .status.CANCELLED { color: var(--st-cancelled); }
.status.OVERDUE { color: var(--st-overdue); } .status.AT_RISK { color: var(--st-at-risk); }
.status.COMPLETED::before { border-radius: 2px; } .status.BLOCKED::before { border-radius: 0; transform: rotate(45deg); }
.status.OVERDUE::before { content: "!"; width: auto; height: auto; background: none; font-weight: 800; }
.key-star { color: var(--key); font-size: 1rem; line-height: 1; }
.risk { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: .78rem; font-weight: 600; }
.risk.LOW { background: var(--success-soft); color: var(--success); } .risk.MEDIUM { background: var(--warning-soft); color: var(--warning); }
.risk.HIGH { background: var(--danger-soft); color: var(--danger); }
.pill-critical { background: var(--danger-soft); color: var(--danger); border-radius: 10px; padding: 1px 6px; font-size: .75rem; font-weight: 600; }
.alert { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid; margin-bottom: 12px; }
.alert.warning { background: var(--warning-soft); border-color: color-mix(in srgb, var(--warning) 40%, transparent); color: var(--text); }
.alert.error { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 40%, transparent); }
.alert.info { background: var(--info-soft); border-color: color-mix(in srgb, var(--info) 40%, transparent); }
.alert.success { background: var(--success-soft); border-color: color-mix(in srgb, var(--success) 40%, transparent); }
.is-input { background: var(--input-cell); }
.is-computed { background: var(--computed-cell); color: var(--text-2); font-style: italic; }
.manual-lock::after { content: " 🔒"; font-style: normal; }

/* panel lateral, modal, menú, toast */
.drawer-backdrop, .modal-backdrop { position: fixed; inset: 0; background: rgba(10, 14, 20, .35); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: var(--surface); z-index: 41; box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; animation: slidein .16s ease-out; }
.drawer header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.drawer header h2 { flex: 1; margin: 0; font-size: 1.05rem; }
.drawer .body { overflow: auto; padding: 16px; flex: 1; }
@keyframes slidein { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.modal { position: fixed; z-index: 51; left: 50%; top: 8vh; transform: translateX(-50%); width: min(560px, calc(100vw - 32px)); max-height: 84vh; overflow: auto;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 20px; }
.modal.wide { width: min(980px, calc(100vw - 32px)); }
.modal-backdrop { z-index: 50; }
.modal footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.menu { position: absolute; z-index: 60; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); min-width: 200px; padding: 4px; }
.menu button, .menu a { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 7px 10px; border-radius: 4px; color: var(--text); font: inherit; cursor: pointer; text-decoration: none; }
.menu button:hover, .menu a:hover { background: var(--surface-2); }
#toast-root { position: fixed; bottom: 16px; right: 16px; z-index: 70; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); max-width: 420px; }
.toast.error { background: var(--danger); color: #fff; }
.toast.success { background: var(--success); color: #fff; }
.saving { font-size: .8rem; color: var(--muted); }
.spinner { width: 16px; height: 16px; border: 2px solid var(--border-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 8px; align-items: center; color: var(--muted); padding: 24px; }

/* bloque «Ejemplo» del editor de reglas */
.example { background: var(--surface-2); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); padding: 10px 12px; margin-top: 10px; font-size: .9rem; }
.example .phrase { font-weight: 600; margin-bottom: 4px; }
.example .guide { color: var(--muted); font-style: italic; }
.example .steps { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.example .steps span { padding: 1px 6px; border-radius: 4px; background: var(--surface); border: 1px solid var(--border); font-size: .8rem; }
.example .steps span.skip { text-decoration: line-through; color: var(--muted); }

/* configuración */
.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 20px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 16px); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.settings-nav a { display: block; padding: 7px 10px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; }
.settings-nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.locked-field { opacity: .8; }
.locked-field .source { font-size: .78rem; color: var(--muted); }

/* calendario mensual */
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.month-grid .dow { font-size: .75rem; color: var(--muted); text-align: center; padding: 4px; }
.month-grid .day { min-height: 64px; border: 1px solid var(--border); border-radius: 6px; padding: 4px 6px; background: var(--surface); font-size: .8rem; }
.month-grid .day .n { font-weight: 650; }
.day.WORKING { } .day.NON_WORKING { background: var(--surface-2); color: var(--muted); }
.day.HOLIDAY { background: var(--danger-soft); } .day.PARTIAL { background: var(--warning-soft); }
.day.EXCEPTION_OFF { background: var(--surface-2); border-style: dashed; } .day.EXCEPTION_WORK { background: var(--info-soft); }

/* ingreso */
.login-page { display: grid; place-items: center; min-height: 100vh; padding: 16px; }
.login-card { width: min(400px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.login-card h1 { color: var(--primary); }
.login-card input, .login-card select { width: 100%; }
.login-card .divider { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 16px 0 0; }
.login-card .divider::before, .login-card .divider::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.login-card details.breakglass { margin-top: 16px; }

/* Tabulator con tokens */
.tabulator { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); font-size: 13px; color: var(--text); }
.tabulator .tabulator-header { background: var(--surface-2); color: var(--text-2); border-bottom: 1px solid var(--border); }
.tabulator .tabulator-header .tabulator-col { background: var(--surface-2); border-right-color: var(--border); }
.tabulator .tabulator-tableholder .tabulator-table { background: var(--surface); color: var(--text); }
.tabulator-row { background: var(--surface); border-bottom-color: var(--border); }
.tabulator-row.tabulator-row-even { background: color-mix(in srgb, var(--surface-2) 45%, var(--surface)); }
.tabulator-row.tabulator-selected { background: var(--primary-soft) !important; }
.tabulator-row .tabulator-cell { border-right-color: var(--border); }
.tabulator-cell.cell-error { background: var(--danger-soft) !important; box-shadow: inset 0 0 0 1px var(--danger); }
.tabulator-cell.cell-input { background: var(--input-cell); }
.tabulator-cell.cell-computed { background: var(--computed-cell); color: var(--text-2); font-style: italic; }
.tabulator-row .tabulator-cell.tabulator-editing { border: 1px solid var(--focus); }
.tabulator .tabulator-footer { background: var(--surface-2); border-top-color: var(--border); color: var(--text-2); }

@media (max-width: 900px) {
  .topbar { gap: 8px; padding: 0 10px; }
  .search input { width: 120px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; display: flex; overflow-x: auto; }
  .settings-nav a { white-space: nowrap; }
}
@media (max-width: 640px) {
  main { padding: 12px 16px 40px; }
  .brand span, .search { display: none; }
  .mainnav { order: 3; }
  .drawer { width: 100vw; }
}
@media print {
  .topbar, #drawer-root, #toast-root, .no-print { display: none !important; }
  main { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
}

/* === C3 === (Configuración, calendarios y perfil) */
.settings-nav #settings-search { width: 100%; margin-bottom: 6px; }
.settings-search-results { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; max-height: 260px; overflow: auto; background: var(--surface); }
.settings-search-results a { display: block; padding: 6px 10px; color: var(--text); text-decoration: none; font-size: .88rem; }
.settings-search-results a:hover, .settings-search-results a:focus { background: var(--surface-2); }
.settings-search-results p { padding: 6px 10px; margin: 0; }
.settings-screen { margin-top: 16px; }
.settings-screen > .page-head { margin-top: 8px; }
/* Formulario genérico de Configuración: ajustes en filas (nombre + ayuda a la izquierda, control a la derecha) agrupados por tema. */
.settings-fields { padding: 4px 22px 18px; }
.sgroup + .sgroup { margin-top: 6px; }
.sgroup-title { margin: 18px 0 2px; font-size: .74rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.srow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 340px); gap: 6px 36px; align-items: center; padding: 13px 0; border-top: 1px solid var(--border); }
.sgroup-title + .srow { border-top: 0; }
.srow-text label { display: block; margin: 0; font-weight: 600; color: var(--text); font-size: .93rem; }
.srow-text .field-help { margin-top: 3px; line-height: 1.4; max-width: 62ch; }
.srow-text .source { margin-top: 3px; }
.srow-ctl { min-width: 0; }
.srow-ctl input:not([type=checkbox]), .srow-ctl select, .srow-ctl textarea { width: 100%; }
.srow.toggle .srow-ctl { display: flex; justify-content: flex-end; }
.srow.wide { grid-template-columns: minmax(0, 1fr); gap: 8px; align-items: start; }
.srow.wide .srow-ctl textarea { max-width: 640px; }
@media (max-width: 720px) { .srow { grid-template-columns: minmax(0, 1fr); gap: 8px; } .srow.toggle { grid-template-columns: minmax(0, 1fr) auto; gap: 16px; } }
/* interruptor (casilla con role="switch") */
input.switch { appearance: none; -webkit-appearance: none; flex: none; width: 40px; height: 22px; min-height: 0; padding: 0; margin: 0; border-radius: 999px; border: 0; background: var(--border-strong); position: relative; cursor: pointer; transition: background .15s; }
input.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .35); transition: transform .15s; }
input.switch:checked { background: var(--primary); }
input.switch:checked::after { transform: translateX(18px); }
input.switch:disabled { opacity: .55; cursor: not-allowed; }
input.switch:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { input.switch, input.switch::after { transition: none; } }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 14px; }
.inline-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-top: 8px; }
.inline-form label { margin: 0 0 0 4px; }
.card form, form.card { margin: 0; }
.card + form.card, form.card + .card, form.card + form.card { margin-top: 16px; }
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 12px 10px; margin: 12px 0; }
fieldset legend { font-weight: 600; color: var(--text-2); font-size: .9rem; padding: 0 4px; }
fieldset label.inline { margin: 4px 14px 4px 0; }
.radio-row label.inline { display: flex; margin: 6px 0; }
.secret-row { display: flex; align-items: center; gap: 8px; }
.chip.ok { background: var(--success-soft); color: var(--success); border-color: transparent; }
.chip.err { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.plain-list { list-style: none; padding: 0; margin: 0 0 8px; }
.plain-list li { display: flex; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--border); }
.pager { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.key-box { display: block; padding: 10px; background: var(--surface-2); border-radius: var(--radius-sm); word-break: break-all; user-select: all; }
pre.diff { margin: 0; white-space: pre-wrap; word-break: break-word; font: .82rem/1.35 var(--mono); max-height: 240px; overflow: auto; }
.mail-preview { width: 100%; min-height: 280px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: #fff; }
/* calendario */
.month-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.month-head h3 { margin: 0; text-transform: capitalize; }
.month-grid .day { position: relative; }
.month-grid .day .k { font-size: .72rem; color: var(--text-2); }
.month-grid .day .f { position: absolute; top: 4px; right: 6px; font-size: .72rem; font-weight: 650; color: var(--warning); }
.month-grid .day .r { font-size: .7rem; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend { list-style: none; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: .82rem; color: var(--text-2); }
.legend li { display: flex; align-items: center; gap: 6px; }
.legend .sw { display: inline-block; width: 16px; height: 16px; min-height: 0; padding: 0; border: 1px solid var(--border); border-radius: 4px; }
.next-days { padding-left: 22px; margin: 10px 0 0; }
.next-days li { padding: 3px 0; text-transform: none; }
.week-table th[scope=row] { width: 110px; text-transform: capitalize; vertical-align: middle; }
.week-table .day-total { width: 110px; white-space: nowrap; vertical-align: middle; }
.slots { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-right: 6px; }
.slot { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 2px 4px; }
.slot input[type=time] { min-height: 28px; padding: 2px 4px; }
.slot .icon-btn { width: 24px; height: 24px; }
/* perfil */
.totp-setup { display: grid; grid-template-columns: 180px 1fr; gap: 12px; align-items: start; margin-top: 12px; }
.totp-setup .qr { background: #fff; padding: 6px; border-radius: var(--radius-sm); border: 1px solid var(--border); }
.totp-setup .qr svg { width: 100%; height: auto; display: block; }
.totp-setup form, .totp-setup p { grid-column: 2; }
.totp-setup .qr { grid-row: 1 / span 2; }
@media (max-width: 640px) {
  .totp-setup { grid-template-columns: 1fr; }
  .totp-setup form, .totp-setup p, .totp-setup .qr { grid-column: 1; grid-row: auto; max-width: 220px; }
  .week-table th[scope=row], .week-table .day-total { width: auto; }
}

/* === C2 === Gantt, calendario, Kanban, carga masiva, informes y revisiones */
.link-btn { border: 0; background: none; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-decoration: underline; text-underline-offset: 2px; }
.table-wrap { overflow-x: auto; }
.chart-box { position: relative; height: 280px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.num.late { color: var(--danger); font-weight: 600; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 360px; }
.small-note { font-size: .82rem; margin-top: 6px; }

/* Gantt */
.gantt-toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.gantt-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .78rem; }
.gantt-legend i { display: inline-block; width: 18px; height: 8px; border-radius: 2px; vertical-align: middle; margin-right: 3px; }
.lg-bar { background: var(--st-in-progress); } .lg-base { background: var(--muted); height: 3px !important; }
.lg-crit { background: transparent; box-shadow: inset 0 0 0 2px var(--danger); } .lg-nw { background: var(--surface-2); border: 1px solid var(--border); }
.lg-abs { background: repeating-linear-gradient(45deg, var(--warning) 0 2px, transparent 2px 5px); }
.gantt { position: relative; display: grid; grid-template-columns: 300px 1fr; grid-template-rows: 46px minmax(240px, 68vh); border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.gantt-corner { display: flex; align-items: flex-end; padding: 6px 10px; font-size: .78rem; color: var(--muted); font-weight: 600; text-transform: uppercase; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--surface-2); }
.gantt-head { overflow: hidden; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.gantt-labels { overflow: hidden; border-right: 1px solid var(--border); position: relative; }
.gantt-labels-inner { position: relative; }
.gantt-label { position: absolute; left: 0; right: 0; height: 30px; display: flex; align-items: center; gap: 5px; padding: 0 8px; border: 0; background: none; color: var(--text); font: inherit; font-size: .82rem; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; }
.gantt-label:hover, .gantt-label:focus-visible { background: var(--primary-soft); }
.gantt-label .gl-name { overflow: hidden; text-overflow: ellipsis; flex: 1; }
.gantt-label .status { font-size: .7rem; }
.gantt-body { overflow: auto; position: relative; }
.gantt-body-inner { position: relative; }
.gantt-svg, .gantt-head-svg { display: block; }
.gantt-head-svg text { fill: var(--text-2); font-size: 10px; font-family: var(--font); }
.gantt-head-svg .g-month { font-weight: 650; font-size: 11px; fill: var(--text); }
.gantt-head-svg .nw { fill: var(--muted); }
.g-month-line { stroke: var(--border-strong); } .g-week-line { stroke: var(--border); }
.g-nw { fill: var(--surface-2); } .g-nw.HOLIDAY { fill: var(--danger-soft); } .g-nw.PARTIAL { fill: var(--warning-soft); opacity: .7; }
.g-zebra { fill: var(--text); opacity: .025; }
.g-bar-bg { fill: var(--st-not-started); opacity: .55; }
.g-bar-progress { fill: var(--st-not-started); }
.g-bar { cursor: pointer; }
.g-bar.s-IN_PROGRESS .g-bar-bg, .g-bar.s-IN_PROGRESS .g-bar-progress { fill: var(--st-in-progress); }
.g-bar.s-COMPLETED .g-bar-bg, .g-bar.s-COMPLETED .g-bar-progress { fill: var(--st-completed); }
.g-bar.s-BLOCKED .g-bar-bg, .g-bar.s-BLOCKED .g-bar-progress { fill: var(--st-blocked); }
.g-bar.s-OVERDUE .g-bar-bg, .g-bar.s-OVERDUE .g-bar-progress { fill: var(--st-overdue); }
.g-bar.s-AT_RISK .g-bar-bg, .g-bar.s-AT_RISK .g-bar-progress { fill: var(--st-at-risk); }
.g-bar.s-CANCELLED { opacity: .4; }
.g-bar:hover .g-bar-bg { opacity: .75; }
.g-crit-outline { fill: none; stroke: var(--danger); stroke-width: 2.5; }
.g-milestone { fill: var(--st-in-progress); cursor: pointer; } .g-milestone.crit { stroke: var(--danger); stroke-width: 2; }
.g-baseline { fill: var(--muted); }
.g-key { fill: var(--key); font-size: 13px; }
.g-lock { font-size: 9px; }
.g-absence { stroke: none; } .g-hatch-line { stroke: var(--warning); stroke-width: 2; opacity: .55; }
.g-dep { fill: none; stroke: var(--muted); stroke-width: 1.2; } .g-dep.crit { stroke: var(--danger); stroke-width: 1.8; }
.g-arrow-head { fill: var(--muted); } .g-arrow-head.crit { fill: var(--danger); }
.g-dep-label { fill: var(--text-2); font-size: 9px; font-family: var(--mono); }
.g-today { stroke: var(--primary); stroke-width: 2; stroke-dasharray: 4 3; }
.gantt-tip { position: absolute; z-index: 5; max-width: 340px; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: .8rem; pointer-events: none; }
.gantt-tip .tip-warn { color: var(--warning); }
@media (max-width: 640px) { .gantt { grid-template-columns: 150px 1fr; } }

/* calendario de actividades */
.cal-grid .day { min-height: 96px; display: flex; flex-direction: column; gap: 2px; }
.cal-grid .day.out { background: transparent; border-color: transparent; }
.cal-grid .day.weekend { background: var(--surface-2); }
.cal-grid .day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.today-tag { font-size: .68rem; color: var(--primary); font-weight: 600; }
.cal-item { display: flex; gap: 4px; align-items: center; width: 100%; border: 0; border-left: 3px solid var(--st-not-started); background: var(--surface-2); color: var(--text); border-radius: 3px; padding: 1px 4px; font: inherit; font-size: .74rem; text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-item.s-IN_PROGRESS { border-left-color: var(--st-in-progress); } .cal-item.s-COMPLETED { border-left-color: var(--st-completed); }
.cal-item.s-OVERDUE { border-left-color: var(--st-overdue); } .cal-item.s-AT_RISK { border-left-color: var(--st-at-risk); } .cal-item.s-BLOCKED { border-left-color: var(--st-blocked); }
.cal-item.k-mid { opacity: .75; }
.cal-list .cal-item { margin-bottom: 4px; font-size: .85rem; }

/* Kanban */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; align-items: start; }
.kb-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; min-height: 200px; }
.kb-col { transition: background .15s, outline-color .15s; }
.kb-col.over { outline: 2px dashed var(--primary); background: var(--primary-soft); }
.kb-col h3 { display: flex; justify-content: space-between; font-size: .9rem; padding: 2px 4px 6px; }
.kb-list { display: flex; flex-direction: column; gap: 8px; }
.kb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; cursor: default; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease, opacity .14s; }
.kb-card.key { border-left: 3px solid var(--key); }
.kb-card[draggable="true"] { cursor: grab; }
/* «coger» la tarjeta: se levanta y gira un poco; mientras se arrastra, la original queda como un hueco punteado */
.kb-card.picked:not(.dragging), .kb-card[draggable="true"]:active:not(.dragging) { transform: rotate(-2.5deg) scale(1.03); box-shadow: var(--shadow-lg); cursor: grabbing; }
.kb-card.dragging { opacity: .45; transform: none; box-shadow: none; border-style: dashed; }
.kb-card:focus-visible { outline: 2px solid var(--focus); }
/* imagen que acompaña al cursor durante el arrastre (fuera de pantalla; el navegador la captura) */
.kb-ghost-wrap { position: fixed; top: -9999px; left: -9999px; padding: 14px; pointer-events: none; }
.kb-ghost-wrap .kb-card { transform: rotate(3.5deg); box-shadow: var(--shadow-lg); margin: 0; border-color: var(--primary); }
/* columnas vacías: invitan a soltar ahí una tarjeta */
.kb-drop { display: grid; place-items: center; align-content: center; gap: 2px; min-height: 96px; padding: 10px; text-align: center; font-size: .82rem; color: var(--muted);
  border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); transition: background .15s, border-color .15s, color .15s; }
.kb-drop-arrow { font-size: 1.3rem; line-height: 1; }
.kb-drop-over { display: none; font-weight: 650; }
.kanban.drag-active .kb-drop { border-color: var(--primary); color: var(--primary); }
.kanban.drag-active .kb-col:not(.over) { outline: 1px dashed var(--border-strong); }
.kb-col.over .kb-drop { background: var(--primary); border-color: var(--primary); border-style: solid; color: var(--primary-ink); }
.kb-col.over .kb-drop-idle { display: none; } .kb-col.over .kb-drop-over { display: block; }
@media (prefers-reduced-motion: reduce) {
  .kb-card, .kb-col, .kb-drop { transition: none; }
  .kb-card.picked:not(.dragging), .kb-card[draggable="true"]:active:not(.dragging), .kb-ghost-wrap .kb-card { transform: none; }
}
.kb-top { display: flex; gap: 6px; align-items: center; font-size: .8rem; }
.kb-name { font-weight: 550; margin: 2px 0 4px; }
.kb-meta { display: flex; justify-content: space-between; gap: 6px; font-size: .75rem; color: var(--muted); }
.kb-move { width: 100%; margin-top: 6px; font-size: .8rem; min-height: 26px; padding: 2px 4px; }
.kb-empty { font-size: .8rem; text-align: center; }
@media (max-width: 900px) { .kanban { grid-template-columns: repeat(5, 78vw); } }

/* carga masiva */
.bulk-toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 8px; }
.ss-err { color: var(--danger); font-weight: 700; font-size: .78rem; }
.ss-ok { color: var(--success); }
.tabulator-row.row-warning .tabulator-cell:first-child { box-shadow: inset 3px 0 0 var(--warning); }
.bulk-errors { margin: 8px 0 0; padding-left: 18px; max-height: 260px; overflow: auto; font-size: .85rem; }
.bulk-help { margin: 0; padding-left: 18px; font-size: .88rem; color: var(--text-2); }
.chip-error { background: var(--danger-soft); color: var(--danger); }
.map-grid { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(200px, 2fr); gap: 4px 12px; align-items: center; max-height: 50vh; overflow: auto; }
.map-grid label { margin: 0; }
.import-mode, .causes { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 12px; padding: 8px 12px; display: flex; flex-wrap: wrap; gap: 6px 16px; }

/* informes */
.report-filters select[multiple] { width: 100%; }
.heatmap td { text-align: center; min-width: 30px; font-variant-numeric: tabular-nums; }
.heatmap th[scope="row"] { white-space: nowrap; }
.bar-cell { display: inline-block; width: 80px; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--primary) var(--w), var(--surface-2) var(--w)); vertical-align: middle; border: 1px solid var(--border); }

/* revisiones */
.review-table tr.needs-just td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.lesson-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

/* === C1 === núcleo: pendientes, cronograma, panel de actividad, editor de reglas */
.linklike { border: 0; background: none; padding: 0; color: var(--primary); cursor: pointer; font: inherit; text-align: left; }
.linklike:hover { text-decoration: underline; }
.pending-list, .inbox-list { list-style: none; margin: 0; padding: 0; }
.pending-list li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.pending-list li:last-child { border-bottom: 0; }
.pending-list .meta { font-size: .85rem; margin: 2px 0 6px; }
.inbox-list li { padding: 10px 4px; border-bottom: 1px solid var(--border); }
.inbox-list li.unread { border-left: 3px solid var(--primary); padding-left: 10px; }
.inbox-list li.read { opacity: .8; }
.filters, .filterbar { margin-bottom: 12px; }
.filterbar .fb-q { width: min(320px, 100%); }
.filterbar .fb-chips:empty { display: none; }
.filterbar .fb-chips { margin-top: 6px; }
.selbar { margin-bottom: 8px; position: sticky; top: calc(var(--topbar-h) + 4px); z-index: 5; }
.selbar .card { padding: 8px 12px; }
.sch-meta { margin-top: 4px; }
.tbl-saving { min-height: 1.2em; text-align: right; }
.tabulator-cell progress, td progress { width: 52px; height: 8px; vertical-align: middle; }
.ap-head { margin-bottom: 8px; }
.ap-dates { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 6px; }
.ap-date { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; }
.ap-date .label { font-size: .8rem; color: var(--muted); }
.ap-date .is-input, .ap-date .is-computed { padding: 2px 6px; border-radius: 4px; display: inline-flex; align-items: center; gap: 4px; }
.ap-date .explain { margin-top: 4px; }
.explain-box { font-size: .85rem; color: var(--text-2); background: var(--surface-2); border-radius: var(--radius-sm); padding: 6px 8px; margin: 6px 0; }
.explain-box:empty { display: none; }
.ap-key, .ap-form fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-top: 12px; }
.ap-danger { margin-top: 16px; }
.ap-choice { display: grid; gap: 6px; margin: 8px 0; }
.drawer section + section { margin-top: 16px; }
.comment { border-bottom: 1px solid var(--border); padding: 6px 0; }
.lessons li { margin-bottom: 8px; }
.assignee-list { list-style: none; padding: 0; margin: 0 0 8px; }
.assignee-list li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 4px; background: var(--surface); flex-wrap: wrap; }
.assignee-list li.primary { border-color: var(--primary); }
.assignee-list li.dragging { opacity: .5; }
.assignee-list .drag { cursor: grab; color: var(--muted); }
.assignee-list .who { flex: 1; min-width: 160px; }
.assignee-add input { width: min(360px, 100%); }
.rule-editor .re-anchor { display: flex; gap: 6px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.rule-editor .re-advanced { margin-top: 8px; }
.ae-months label { margin-right: 10px; }
.wiz-summary { margin-top: 12px; }
.tp-preview-bar { padding: 10px 14px; }
@media (max-width: 640px) {
  .filterbar .chips { gap: 4px; }
  .ap-dates { grid-template-columns: 1fr; }
}

/* Ventanas emergentes de Tabulator (tooltips, menús y listas de edición): la librería fija fondo
   blanco pero hereda el color de letra; en tema oscuro quedaba letra clara sobre fondo claro.
   Ahora siguen el tema activo (oscuras en tema oscuro, claras en tema claro). */
.tabulator-popup-container { background: var(--surface); color: var(--text); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.tabulator-popup-container.tabulator-tooltip { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-lg); font-size: 12.5px; line-height: 1.4; padding: 5px 8px; border-radius: var(--radius-sm); white-space: pre-line; }
.tabulator-edit-list { background: var(--surface); color: var(--text); }
.tabulator-edit-list .tabulator-edit-list-item { color: var(--text); }
.tabulator-edit-list .tabulator-edit-list-item.active, .tabulator-edit-list .tabulator-edit-list-item:hover { background: var(--primary-soft); color: var(--text); }
.tabulator-menu .tabulator-menu-item { color: var(--text); }
.tabulator-menu .tabulator-menu-item:not(.tabulator-menu-item-disabled):hover { background: var(--surface-2); }

/* Espaciado y alineación de paneles: «.card + .card» separa paneles apilados, pero dentro de una
   cuadrícula corría hacia abajo del segundo panel en adelante (desalineación y paneles que parecían
   de distinto tamaño). En la cuadrícula la separación la da «gap». */
.grid > .card + .card, .grid > .card + form.card, .grid > form.card + .card, .grid > form.card + form.card { margin-top: 0; }
.grid > * { min-width: 0; } /* tablas o textos largos no ensanchan una columna sobre las demás */
.grid > .card { display: flex; flex-direction: column; }
.card + .grid, .grid + .card, .grid + .grid, .grid + form.card, .alert + .grid { margin-top: 16px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.table-wrap { overflow-x: auto; max-width: 100%; }

/* Revisión visual (capturas en tema claro y oscuro) */
.tabulator-row.tabulator-selectable:hover { background: var(--surface-2) !important; cursor: default; }
.tabulator-row.tabulator-selectable:hover .tabulator-cell { color: var(--text); }
.tabulator-row.tabulator-selected, .tabulator-row.tabulator-selected:hover { background: var(--primary-soft) !important; }
.tabulator-row.tabulator-selected .tabulator-cell { color: var(--text); }
.tabulator-row .tabulator-cell.tabulator-frozen { background: inherit; }
.report-filters { margin-bottom: 16px; }
table.simple td { vertical-align: middle; }
table.simple td.nowrap .btn + .btn { margin-left: 4px; }
.card .form-grid input, .card .form-grid select, .card .form-grid textarea { width: 100%; }
.card > footer.form-actions, form.card footer.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 12px; }
form.card.report-filters { margin-bottom: 16px; }
.form-grid label.inline { display: flex; align-items: flex-start; gap: 8px; margin: 10px 0 4px; font-weight: 550; color: var(--text-2); }
.form-grid label.inline input[type="checkbox"] { margin: 2px 0 0; flex: none; }
.card .form-grid input[type="checkbox"], .card .form-grid input[type="radio"] { width: auto; }

/* ayuda integrada */
.help-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; align-items: start; }
.help-nav { position: sticky; top: calc(var(--topbar-h) + 12px); max-height: calc(100vh - var(--topbar-h) - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.help-nav input { width: 100%; margin-bottom: 8px; }
.help-toc { list-style: none; margin: 0; padding: 0; }
.help-toc a, .help-results a { display: block; padding: 4px 8px; border-radius: var(--radius-sm); color: var(--text-2); text-decoration: none; font-size: .9rem; }
.help-toc a:hover, .help-results a:hover { background: var(--surface-2); }
.help-toc a[aria-current] { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.help-toc .lvl2 { margin-top: 6px; } .help-toc .lvl2 a { font-weight: 600; color: var(--text); }
.help-toc .lvl3 a { padding-left: 20px; font-size: .85rem; }
.help-results small { display: block; color: var(--muted); font-weight: 400; margin-top: 2px; }
.help-content { padding: 8px 28px 28px; line-height: 1.6; min-width: 0; }
.help-content:focus { outline: none; }
.help-content h1 { font-size: 1.7rem; margin-top: 16px; }
.help-content h2 { font-size: 1.3rem; margin: 2em 0 .6em; padding-bottom: 6px; border-bottom: 1px solid var(--border); scroll-margin-top: calc(var(--topbar-h) + 12px); }
.help-content h3 { font-size: 1.08rem; margin: 1.6em 0 .5em; scroll-margin-top: calc(var(--topbar-h) + 12px); }
.help-content img { max-width: 100%; height: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); margin: 6px 0 12px; cursor: zoom-in; display: block; background: #fff; }
.help-content table { border-collapse: collapse; width: 100%; margin: 10px 0 16px; font-size: .92rem; display: block; overflow-x: auto; }
.help-content th, .help-content td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; vertical-align: top; }
.help-content th { background: var(--surface-2); }
.help-content code { font-family: var(--mono); background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .9em; }
.help-content pre { background: #0f172a; color: #e2e8f0; padding: 12px 14px; border-radius: var(--radius-sm); overflow-x: auto; }
.help-content pre code { background: none; padding: 0; color: inherit; }
.help-content blockquote { margin: 12px 0; padding: 8px 14px; border-left: 3px solid var(--primary); background: var(--primary-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.help-content blockquote p { margin: 0; }
.help-content .flash { animation: help-flash 1.6s ease-out; }
@keyframes help-flash { from { background: var(--primary-soft); } to { background: transparent; } }
.help-zoom img { max-width: 100%; height: auto; display: block; }
kbd { font: .85em var(--mono); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--surface-2); }
@media (max-width: 900px) { .help-layout { grid-template-columns: 1fr; } .help-nav { position: static; max-height: 260px; } .help-content { padding: 4px 14px 20px; } }
@media print { .help-nav { display: none; } .help-layout { display: block; } }

/* mapa de calor: celdas interactivas y tooltip con actividades */
.heat-cell { cursor: pointer; }
.heat-cell:hover, .heat-cell:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.heat-tip { position: fixed; z-index: 60; max-width: 360px; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 8px 10px; font-size: .85rem; pointer-events: none; }
.heat-tip ul { margin: 6px 0 4px; padding-left: 16px; }
.heat-tip .hint { margin-top: 6px; color: var(--muted); font-size: .78rem; }
.heatmap th[scope="row"] { position: sticky; left: 0; background: var(--surface); z-index: 1; }

/* configuración de IA */
.ai-block { margin: 12px 0; } .ai-block legend { font-weight: 650; padding: 0 6px; }
.ai-block input { width: 100%; max-width: 520px; }
.ai-model-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .ai-model-row input { flex: 1; min-width: 220px; }
.ai-form select { max-width: 320px; }

/* contenido bilingüe (es / en) */
.bilingual { margin: 8px 0; }
.bl-en { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 6px 10px 10px; }
.bl-en > summary { cursor: pointer; font-weight: 600; color: var(--text-2); }
.bl-state { font-weight: 400; font-size: .85em; margin-left: 6px; }
.bl-state.is-done { color: var(--ok, #15803d); }
.bl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.bl-actions[hidden] { display: none; }
.bilingual .suggested { border-color: var(--info); background: var(--info-soft); }
.lang-btn { font-size: .78rem; font-weight: 700; letter-spacing: .02em; }

.lang-toggle { margin-top: 14px; display: block; margin-left: auto; margin-right: auto; }

/* logo de la organización */
.brand-logo { max-height: 30px; max-width: 160px; width: auto; height: auto; object-fit: contain; }
.login-logo { display: block; max-height: 64px; max-width: 240px; margin: 0 auto 12px; object-fit: contain; }
.branding-preview { display: grid; place-items: center; min-height: 110px; margin-bottom: 14px; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm);
  background: repeating-conic-gradient(var(--surface-2) 0% 25%, var(--surface) 0% 50%) 0 0 / 16px 16px; }
.palette-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.palette-swatch { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 8px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.palette-swatch:hover:not(:disabled) { background: var(--surface-2); }
.palette-swatch[aria-checked="true"] { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); font-weight: 600; }
.palette-swatch:disabled { opacity: .6; cursor: default; }
.palette-dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .15); }
.branding-preview img { max-height: 90px; max-width: 90%; object-fit: contain; }

/* resumen con IA en el informe */
.ai-summary { margin-bottom: 16px; border-left: 3px solid var(--info); }
.ai-summary h2 { display: flex; align-items: center; gap: 8px; }
.ai-summary h2 svg { width: 18px; height: 18px; }
.ai-text p { margin: 0 0 .5em; } .ai-text ul { margin: 0 0 .8em; padding-left: 20px; }
@media print { .ai-summary { break-inside: avoid; } }

/* Filtros del informe: selectores desplegables y píldoras (sin barras de desplazamiento) */
.report-filters { padding: 16px 18px; }
.rf-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px 16px; align-items: start; }
.rf-row + .rf-row { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.rf-pills { display: flex; flex-wrap: wrap; gap: 14px 32px; }
.rf-field > label, .rf-label { display: block; margin-top: 0 !important; line-height: 1.2; font-size: .78rem; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.rf-field input[type="search"], .rf-field input[type="datetime-local"], .rf-field select { width: 100%; }
.rf-field .field-help { margin-top: 4px; }
.rf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.rf-spacer { flex: 1; }
.mp { position: relative; }
.mp > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); min-height: 36px; }
.mp > summary::-webkit-details-marker { display: none; }
.mp > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); flex: none; }
.mp[open] > summary { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.mp[open] > summary::after { transform: rotate(-135deg); }
.mp > summary span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-panel { position: absolute; z-index: 30; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(420px, 90vw); max-height: 280px; overflow: auto; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }
.mp-opt { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-weight: 450; }
.mp-opt:hover { background: var(--surface-2); }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { position: relative; cursor: pointer; }
.pill input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.pill span { display: inline-block; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: .85rem; transition: background .12s, border-color .12s; }
.pill:hover span { border-color: var(--primary); }
.pill input:checked + span { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); font-weight: 600; }
.pill input:focus-visible + span { outline: 2px solid var(--primary); outline-offset: 2px; }
.report-filters label { margin: 0 !important; }
.report-filters .rf-field > label, .report-filters .rf-label { margin-bottom: 6px !important; }
.ai-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.ai-head .chip { flex: none; font-weight: 650; padding: 4px 12px; }
.ai-head .chip.warn { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.ai-headline { margin: 0; font-size: 1.02rem; line-height: 1.45; }
.ai-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 12px 0; }
.ai-metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; display: flex; flex-direction: column; }
.ai-metric b { font-size: 1.25rem; }
.ai-metric span { font-size: .78rem; color: var(--muted); }
.ai-metric.warn { background: var(--warning-soft); } .ai-metric.warn b { color: var(--warning); }
.ai-metric.err { background: var(--danger-soft); } .ai-metric.err b { color: var(--danger); }
.ai-line { margin: 6px 0; }
.ai-summary h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 16px 0 6px; }
.ai-list { margin: 0; padding-left: 20px; } .ai-list li { margin-bottom: 6px; }
.ai-actions { margin: 0; padding: 0; list-style: none; counter-reset: ai; display: grid; gap: 8px; }
.ai-actions li { counter-increment: ai; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; padding: 10px 12px 10px 42px; position: relative; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.ai-actions li::before { content: counter(ai); position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: .8rem; display: grid; place-items: center; }
.chip.owner { background: var(--info-soft); color: var(--info); border-color: transparent; }
.code-chip { cursor: pointer; font-family: var(--mono); } .code-chip:hover { border-color: var(--primary); }

/* retrospectiva: notas generales con espacio para escribir y sugerencias de IA */
.notes-read { max-width: 80ch; }
/* Markdown renderizado (notas, vista previa) */
.md { line-height: 1.55; overflow-wrap: break-word; }
.md > :first-child { margin-top: 0; } .md > :last-child { margin-bottom: 0; }
.md p { margin: 0 0 .7em; }
.md h3, .md h4, .md h5, .md h6 { margin: 1em 0 .4em; line-height: 1.25; } .md h3 { font-size: 1.1rem; } .md h4 { font-size: 1rem; } .md h5, .md h6 { font-size: .95rem; }
.md ul, .md ol { margin: 0 0 .7em; padding-left: 1.4em; } .md li { margin: .15em 0; } .md li > ul, .md li > ol { margin: .15em 0 0; }
.md blockquote { margin: 0 0 .7em; padding: 2px 12px; border-left: 3px solid var(--border-strong); color: var(--text-2); }
.md code { font-family: var(--mono); font-size: .9em; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.md pre { margin: 0 0 .7em; padding: 10px 12px; background: var(--surface-2); border-radius: var(--radius-sm); overflow-x: auto; } .md pre code { background: none; padding: 0; }
.md hr { border: 0; border-top: 1px solid var(--border); margin: 1em 0; }
.md a { color: var(--primary); }
/* editor de Markdown */
.md-editor { border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); position: relative; }
.md-editor:focus-within { border-color: var(--focus); outline: 2px solid color-mix(in srgb, var(--focus) 30%, transparent); }
.md-bar { display: flex; flex-wrap: wrap; gap: 6px 12px; justify-content: space-between; align-items: center; padding: 6px 8px; border-bottom: 1px solid var(--border); background: var(--surface-2); border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.md-tools { display: flex; flex-wrap: wrap; gap: 4px; }
.md-btn { min-height: 28px; min-width: 30px; padding: 2px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font: inherit; font-size: .82rem; cursor: pointer; }
.md-btn:hover:not(:disabled) { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); } .md-btn:disabled { opacity: .45; cursor: default; }
.md-tabs { display: flex; gap: 2px; } .md-tabs button { border: 0; background: none; padding: 4px 10px; border-radius: var(--radius-sm); font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; }
.md-tabs button[aria-selected="true"] { background: var(--surface); color: var(--primary); font-weight: 650; box-shadow: inset 0 0 0 1px var(--border); }
.md-write { position: relative; }
.md-input { display: block; width: 100%; max-width: none; min-height: 11rem; border: 0; border-radius: 0; outline: 0; resize: vertical; line-height: 1.55; padding: 10px 12px; background: transparent; }
.md-preview { min-height: 11rem; padding: 10px 12px; }
.md-mentions { padding: 6px 12px; border-top: 1px solid var(--border); font-size: .85rem; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; } .md-mentions:empty { display: none; }
.md-help { margin: 0; padding: 6px 12px; border-top: 1px solid var(--border); }
.md-suggest { position: absolute; left: 12px; right: 12px; bottom: 8px; z-index: 20; margin: 0; padding: 4px; list-style: none; max-height: 14rem; overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); }
.md-suggest li { padding: 5px 8px; border-radius: var(--radius-sm); cursor: pointer; display: flex; gap: 8px; align-items: baseline; }
.md-suggest li[aria-selected="true"] { background: var(--primary-soft); } .md-suggest li.md-none { color: var(--muted); cursor: default; }
.ai-sug-list { list-style: none; margin: 8px 0 12px; padding: 0; display: grid; gap: 8px; }
.ai-sug { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; font-weight: 400; margin: 0; color: var(--text); }
.ai-sug:hover { background: var(--surface-2); } .ai-sug input { margin-top: 3px; flex: none; }

/* bandeja: avisos persistentes */
.notice-list { display: grid; gap: 10px; margin-bottom: 16px; }
.notice.alert { margin: 0; display: grid; gap: 6px; }

/* códigos de actividad dentro de textos libres: enlace con ayuda emergente (nombre y responsable) */
.act-text { white-space: pre-wrap; overflow-wrap: break-word; }
.act-ref { font: inherit; font-family: var(--mono); font-size: .92em; font-weight: 600; padding: 0 4px; margin: 0 1px; border: 0; border-radius: 4px; background: var(--primary-soft); color: var(--primary); cursor: pointer; white-space: nowrap; }
.act-ref:hover { background: var(--primary); color: var(--primary-ink); }
.act-ref[data-nolink] { cursor: help; }
.act-ref:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; }
.act-tip { position: fixed; z-index: 90; max-width: 300px; padding: 7px 10px; border-radius: var(--radius-sm); background: var(--text); color: var(--bg); box-shadow: var(--shadow-lg); font-size: .82rem; line-height: 1.35; pointer-events: none; }
.act-tip b { font-family: var(--mono); }
.act-tip .act-tip-owner { display: block; opacity: .8; margin-top: 1px; }
/* retrospectiva: la columna «Acción» no debe quedar aplastada por el botón de la última columna */
#actions table td:first-child { min-width: 11em; }
#actions .btn { white-space: normal; text-align: left; }

/* Resumen de la actividad: formulario compacto en 3 columnas (2 en pantallas angostas) */
.ap-form .form-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 12px; }
.ap-form .form-grid .span2 { grid-column: span 2; }
.ap-form .form-grid > div > * { max-width: 100%; }
.ap-form .form-grid select, .ap-form .form-grid input { width: 100%; }
.ap-form label { margin-top: 10px; }
.ap-keyrow { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.ap-keyrow label { margin: 0; white-space: nowrap; }
.ap-keyrow input[name="key_reason"] { flex: 1; min-width: 0; }
@media (max-width: 700px) { .ap-form .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Barra de avance: relleno explícito hasta el valor (igual en todos los navegadores y temas) */
input[type="range"][data-progress] { -webkit-appearance: none; appearance: none; height: 18px; width: 180px; background: transparent; border: 0; padding: 0; box-shadow: none; cursor: pointer; accent-color: var(--primary); }
input[type="range"][data-progress]::-webkit-slider-runnable-track { height: 8px; border-radius: 4px; border: 1px solid var(--border);
  background: linear-gradient(to right, var(--primary) calc(8px + (100% - 16px) * var(--p, 0) / 100), var(--surface-2, #e5e7eb) 0); }
input[type="range"][data-progress]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%;
  background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--primary); }
input[type="range"][data-progress]::-moz-range-track { height: 8px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2, #e5e7eb); }
input[type="range"][data-progress]::-moz-range-progress { height: 8px; border-radius: 4px; background: var(--primary); }
input[type="range"][data-progress]::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--primary); }
input[type="range"][data-progress]:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* logo por tema: se muestra el claro o el oscuro según el tema activo (manual o del sistema) */
.brand .brand-logos { display: inline-flex; align-items: center; }
.logo-dark { display: none; }
:root[data-theme="dark"] .logo-light { display: none; }
:root[data-theme="dark"] .logo-dark { display: inline-block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .logo-light { display: none; }
  :root:not([data-theme="light"]) .logo-dark { display: inline-block; }
  :root:not([data-theme="light"]) .login-logo.logo-dark { display: block; }
}
:root[data-theme="dark"] .login-logo.logo-dark { display: block; }
.branding-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.branding-slot .branding-preview { min-height: 84px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: var(--radius-sm); padding: 12px; }
.branding-slot .branding-preview.on-light { background: #ffffff; }
.branding-slot .branding-preview.on-dark { background: #11161d; }
.branding-slot .branding-preview img { max-height: 48px; max-width: 100%; }
.branding-grid > .card { margin-top: 0; }

/* aviso con acción a la derecha (texto + botón alineados, el botón no baja si hay espacio) */
.alert-action { display: flex; gap: 12px 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 14px 0 16px; }
.alert-action .alert-sub { font-size: .9em; opacity: .85; margin-top: 2px; }
.alert-action .btn { flex: none; }
.grid.hol-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
@media (max-width: 900px) { .grid.hol-grid { grid-template-columns: 1fr; } }
.hol-grid .alert-action .btn { white-space: nowrap; }
.alert-action > div { flex: 1 1 240px; min-width: 0; }

/* evaluación del cronograma */
.eval-head { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.eval-verdict { font-weight: 700; padding: 4px 12px; border-radius: 999px; border: 1px solid transparent; }
.eval-verdict.ok { background: var(--success-soft, #dcfce7); color: var(--success, #15803d); border-color: var(--success, #15803d); }
.eval-verdict.warn { background: var(--warning-soft, #fef3c7); color: var(--warning, #b45309); border-color: var(--warning, #b45309); }
.eval-verdict.bad { background: var(--danger-soft, #fee2e2); color: var(--danger, #b91c1c); border-color: var(--danger, #b91c1c); }
.eval-message { background: var(--surface-2, #f1f5f9); border-radius: var(--radius-sm); padding: 10px 14px; max-width: 80ch; }
.eval-findings { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.eval-findings li { border: 1px solid var(--border); border-left-width: 4px; border-radius: var(--radius-sm); padding: 8px 12px; }
.eval-findings li.sev-high { border-left-color: var(--danger, #b91c1c); }
.eval-findings li.sev-medium { border-left-color: var(--warning, #b45309); }
.eval-findings li.sev-low { border-left-color: var(--info, #2563eb); }
.eval-sev { font-size: .75rem; }
.eval-codes { margin-top: 4px; display: flex; gap: 6px; flex-wrap: wrap; }
.eval-oncreate { margin-top: 12px; }

.kb-top { display: flex; align-items: center; gap: 6px; }
.kb-open { margin-left: auto; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 1rem; line-height: 1; padding: 2px 6px; border-radius: 4px; opacity: .65; }
.kb-card:hover .kb-open, .kb-open:focus-visible { opacity: 1; }
.kb-open:hover { background: var(--surface-2); color: var(--primary); }
.kb-card { user-select: none; }

/* permisos por módulo */
.perm-matrix th.perm-col, .perm-matrix td.perm-col { text-align: center; width: 120px; }
.perm-check { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; min-height: 28px; }
.perm-check input { width: 18px; height: 18px; }
.perm-changed { background: var(--primary-soft); }
.perm-actions { margin-top: 12px; align-items: center; }
.perm-deny { background: var(--danger-soft); color: var(--danger); }
.perm-add { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 4px; }
.table-scroll { overflow-x: auto; }

/* Autocompletado de predecesoras */
.code-suggest { position: fixed; z-index: 10000; margin: 0; padding: 4px 0; list-style: none; max-height: 260px; overflow: auto; background: var(--surface, #fff); color: inherit; border: 1px solid var(--border, #ccc); border-radius: 6px; box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.code-suggest li { display: flex; gap: 10px; padding: 5px 10px; cursor: pointer; white-space: nowrap; }
.code-suggest li b { min-width: 64px; }
.code-suggest li span { color: var(--muted, #666); overflow: hidden; text-overflow: ellipsis; max-width: 420px; }
.code-suggest li.on, .code-suggest li:hover { background: var(--info-soft, #e8f0fe); }

/* Regla en lenguaje natural */
.re-nl { margin-bottom: 10px; }
.re-nl[hidden] { display: none; }
.re-nl-bar { margin-bottom: 6px; }
.re-nl-row { display: flex; gap: 8px; }
.re-nl-row input { flex: 1; min-width: 0; }
