/* ==========================================================================
   AllRisk Poligrafía — panel
   Tokens sobrescribibles desde el child theme de Divi (.ar-app { --ar-brand: … })
   ========================================================================== */
.ar-app {
  --ar-brand: #002e5e;      /* azul del logo */
  --ar-brand-600: #0a4180;
  --ar-brand-50: #eaf0f8;
  --ar-gold: #c5822a;       /* dorado del logo */
  --ar-brand-ink: #fff;
  --ar-ink: #16202c;
  --ar-ink-2: #3b4757;
  --ar-muted: #58657a;      /* ≥4.5:1 sobre blanco y fondos suaves */
  --ar-line: #e3e8ee;
  --ar-line-strong: #c9d1db;
  --ar-surface: #fff;
  --ar-soft: #f6f8fb;
  --ar-ok: #13683f;       --ar-ok-bg: #e9f7ef;
  --ar-info: #1d5fa8;     --ar-info-bg: #eaf2fc;
  --ar-warn: #9a5b00;     --ar-warn-bg: #fff4e0;
  --ar-danger: #b42318;   --ar-danger-bg: #fdeeec;
  --ar-neutral: #55606e;  --ar-neutral-bg: #eef1f5;
  --ar-radius: 10px;
  --ar-radius-sm: 6px;
  --ar-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --ar-focus: 0 0 0 3px rgba(14, 76, 137, .22);

  color: var(--ar-ink);
  font-size: 15px;
  line-height: 1.55;
  max-width: 1240px;
  margin: 0 auto;
  padding: 8px 0 48px;
  -webkit-font-smoothing: antialiased;
}
.ar-app *, .ar-app *::before, .ar-app *::after { box-sizing: border-box; }
.ar-app h2, .ar-app h3, .ar-app h4 { color: var(--ar-ink); padding: 0; line-height: 1.25; font-weight: 700; }
.ar-app h2 { font-size: 26px; margin: 0; letter-spacing: -.01em; }
.ar-app h3 { font-size: 17px; margin: 0 0 14px; }
.ar-app h4 { font-size: 16px; margin: 4px 0 16px; }
.ar-app p { padding: 0; }
.ar-app a { transition: color .15s, background-color .15s, border-color .15s; }
.ar-muted { color: var(--ar-muted); }
.ar-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ar-muted); margin: 0 0 4px; }
.ar-req { color: var(--ar-danger); }

/* ---------- Barra superior ---------- */
.ar-nav {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 20px;
  background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: var(--ar-radius);
  padding: 8px 10px 8px 8px; margin-bottom: 28px; box-shadow: var(--ar-shadow);
}
.ar-nav__links { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.ar-nav__links::-webkit-scrollbar { display: none; }
.ar-nav__links a { padding: 8px 14px; border-radius: var(--ar-radius-sm); color: var(--ar-ink-2); text-decoration: none; font-weight: 600; font-size: 14px; white-space: nowrap; }
.ar-nav__links a:hover { background: var(--ar-soft); color: var(--ar-brand); }
.ar-nav__links a.is-active { background: var(--ar-brand-50); color: var(--ar-brand); }
.ar-nav__user { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--ar-muted); }
.ar-avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ar-brand); color: #fff; font-size: 13px; font-weight: 700; flex: none; }
.ar-nav__who { display: flex; flex-direction: column; line-height: 1.2; }
.ar-nav__who strong { color: var(--ar-ink); font-size: 14px; }
.ar-nav__who span { font-size: 12px; }

/* Menú de la cuenta */
.ar-usermenu { position: relative; }
.ar-usermenu__toggle {
  display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 10px 4px 4px; margin: 0;
  background: transparent; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  font: inherit; color: var(--ar-muted); text-align: left; transition: background-color .15s, border-color .15s;
}
.ar-usermenu__toggle:hover, .ar-usermenu.is-open .ar-usermenu__toggle { background: var(--ar-soft); border-color: var(--ar-line); }
.ar-usermenu__toggle.is-active { border-color: var(--ar-brand-50); }
.ar-usermenu__toggle:focus-visible { outline: 2px solid var(--ar-brand); outline-offset: 2px; }
.ar-usermenu__chevron { color: var(--ar-muted); transition: transform .2s; flex: none; }
.ar-usermenu.is-open .ar-usermenu__chevron { transform: rotate(180deg); }
.ar-usermenu__panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 260px; padding: 6px;
  background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: var(--ar-radius);
  box-shadow: 0 12px 32px rgba(16, 24, 40, .14), 0 2px 6px rgba(16, 24, 40, .06);
}
.ar-usermenu__panel[hidden] { display: none; }
.ar-usermenu__head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 12px; border-bottom: 1px solid var(--ar-line); margin-bottom: 6px; line-height: 1.3; }
.ar-usermenu__head strong { color: var(--ar-ink); font-size: 14px; }
.ar-usermenu__head span { color: var(--ar-muted); font-size: 13px; overflow-wrap: anywhere; }
.ar-usermenu__list { list-style: none; margin: 0; padding: 0 !important; }
.ar-usermenu__list li { margin: 0; padding: 0; list-style: none; }
.ar-usermenu__item {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 8px 12px; border-radius: var(--ar-radius-sm);
  color: var(--ar-ink-2) !important; text-decoration: none; font-size: 14px; font-weight: 600;
}
.ar-usermenu__item:hover, .ar-usermenu__item:focus-visible { background: var(--ar-soft); color: var(--ar-brand) !important; outline: none; }
.ar-usermenu__item:focus-visible { box-shadow: inset 0 0 0 2px var(--ar-brand); }
.ar-usermenu__item.is-active { background: var(--ar-brand-50); color: var(--ar-brand) !important; }
.ar-usermenu__icon { flex: none; color: currentColor; opacity: .85; }
.ar-usermenu__foot { border-top: 1px solid var(--ar-line); margin-top: 6px; padding-top: 6px; }
.ar-usermenu__item--danger { color: var(--ar-danger) !important; }
.ar-usermenu__item--danger:hover, .ar-usermenu__item--danger:focus-visible { background: var(--ar-danger-bg); color: var(--ar-danger) !important; }
@media (prefers-reduced-motion: reduce) { .ar-usermenu__chevron { transition: none; } }

/* Perfil */
.ar-app .ar-perfil__resumen { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 16px; text-align: left; }
.ar-perfil__resumen .ar-avatar { width: 56px; height: 56px; font-size: 20px; }
.ar-perfil__resumen p { margin: 0; }
.ar-dl { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; margin: 0; font-size: 14px; }
.ar-dl dt { color: var(--ar-muted); font-weight: 600; }
.ar-dl dd { margin: 0; color: var(--ar-ink); overflow-wrap: anywhere; }
.ar-field small { color: var(--ar-muted); font-size: 13px; }
.ar-field[hidden] { display: none; }

/* ---------- Encabezado de página ---------- */
.ar-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.ar-header__title { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ar-header__title p { margin: 0; }
.ar-header__title > .ar-badge { align-self: flex-start; }
.ar-header__actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* ---------- Botones ---------- */
.ar-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 40px; padding: 8px 16px; border-radius: var(--ar-radius-sm);
  background: var(--ar-brand); color: var(--ar-brand-ink) !important; border: 1px solid var(--ar-brand);
  font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.ar-btn:hover { background: var(--ar-brand-600); border-color: var(--ar-brand-600); }
.ar-btn:focus-visible { outline: none; box-shadow: var(--ar-focus); }
.ar-btn--ghost { background: var(--ar-surface); color: var(--ar-brand) !important; border-color: var(--ar-line-strong); }
.ar-btn--ghost:hover { background: var(--ar-brand-50); border-color: var(--ar-brand); }
.ar-btn--danger { background: var(--ar-surface); color: var(--ar-danger) !important; border-color: #f0b8b2; }
.ar-btn--danger:hover { background: var(--ar-danger-bg); border-color: var(--ar-danger); }
.ar-btn--ok { background: var(--ar-ok); border-color: var(--ar-ok); }
.ar-btn--ok:hover { background: #106139; border-color: #106139; }
.ar-link { color: var(--ar-brand); font-weight: 600; text-decoration: none; white-space: nowrap; }
.ar-link:hover { text-decoration: underline; }

/* ---------- Avisos ---------- */
.ar-notice { display: block; padding: 12px 16px; border-radius: var(--ar-radius); margin: 0 0 20px; border: 1px solid; font-size: 14px; }
.ar-notice a { color: inherit; font-weight: 700; }
.ar-notice--ok { background: var(--ar-ok-bg); border-color: #b6e3c9; color: var(--ar-ok); }
.ar-notice--error { background: var(--ar-danger-bg); border-color: #f3c1bc; color: var(--ar-danger); }
.ar-notice--info { background: var(--ar-info-bg); border-color: #c2d8f2; color: var(--ar-info); }

/* ---------- KPIs ---------- */
.ar-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(135px, 1fr)); gap: 12px; margin-bottom: 20px; }
.ar-kpi {
  position: relative; display: flex; flex-direction: column; gap: 2px; padding: 14px 16px 14px 18px;
  border: 1px solid var(--ar-line); border-radius: var(--ar-radius); background: var(--ar-surface);
  color: var(--ar-ink); text-decoration: none !important; box-shadow: var(--ar-shadow); overflow: hidden;
}
.ar-kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ar-kpi-color, var(--ar-line-strong)); }
.ar-kpi strong { font-size: 28px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ar-kpi span { font-size: 13px; color: var(--ar-muted); font-weight: 600; }
.ar-kpi:hover { border-color: var(--ar-line-strong); }
.ar-kpi.is-active { border-color: var(--ar-brand); box-shadow: 0 0 0 1px var(--ar-brand), var(--ar-shadow); }
.ar-kpi--all { --ar-kpi-color: var(--ar-brand); }
.ar-kpi--pendiente { --ar-kpi-color: #8a94a3; }
.ar-kpi--autorizada { --ar-kpi-color: #16a34a; }
.ar-kpi--en_entrevista { --ar-kpi-color: #2563eb; }
.ar-kpi--en_revision { --ar-kpi-color: #f59e0b; }
.ar-kpi--finalizada { --ar-kpi-color: #7c3aed; }
.ar-kpi--anulada { --ar-kpi-color: #dc2626; }

/* ---------- Filtros ---------- */
.ar-filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.ar-filters input[type=search] { flex: 1 1 280px; }
.ar-filters select { flex: 0 1 230px; }

/* ---------- Tablas ---------- */
.ar-table-wrap { border: 1px solid var(--ar-line); border-radius: var(--ar-radius); background: var(--ar-surface); box-shadow: var(--ar-shadow); overflow-x: auto; }
.ar-app .ar-table { width: 100%; border-collapse: collapse; margin: 0; border: 0; font-size: 14px; }
.ar-app .ar-table th, .ar-app .ar-table td { padding: 12px 16px; text-align: left; border: 0; border-bottom: 1px solid var(--ar-line); vertical-align: middle; }
.ar-app .ar-table th { background: var(--ar-soft); font-size: 12px; color: var(--ar-muted); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.ar-app .ar-table tbody tr:last-child td { border-bottom: 0; }
.ar-app .ar-table tbody tr:hover td { background: #fafbfd; }
.ar-app .ar-table td[data-label="Tipo"], .ar-app .ar-table td[data-label="Fecha"], .ar-app .ar-table td[data-label="Cédula"] { white-space: nowrap; }
.ar-td-num { font-variant-numeric: tabular-nums; color: var(--ar-muted); font-weight: 600; }
.ar-td-main { font-weight: 600; color: var(--ar-ink); }
.ar-td-action { text-align: right !important; }
.ar-app .ar-table .ar-td-check { width: 44px; padding-right: 0; }
.ar-td-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--ar-brand); cursor: pointer; vertical-align: middle; }
.ar-app .ar-table tr.is-selected td { background: var(--ar-danger-bg); }
.ar-td-action .ar-row-actions { flex-wrap: nowrap; }
.ar-bulk__bar {
  position: sticky; top: 12px; z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 10px 12px 10px 16px; border: 1px solid #f0b8b2; border-radius: var(--ar-radius);
  background: var(--ar-danger-bg); color: var(--ar-danger); font-weight: 600; font-size: 14px; box-shadow: var(--ar-shadow);
}
.ar-bulk__bar[hidden] { display: none; }
.ar-icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; padding: 0; margin: 0; border: 1px solid transparent;
  border-radius: var(--ar-radius-sm); background: transparent; color: var(--ar-muted); cursor: pointer; transition: background-color .15s, color .15s, border-color .15s;
}
.ar-icon-btn--danger:hover, .ar-icon-btn--danger:focus-visible { background: var(--ar-danger-bg); color: var(--ar-danger); border-color: #f0b8b2; }
.ar-icon-btn:focus-visible { outline: 2px solid var(--ar-danger); outline-offset: 2px; }
.ar-card__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.ar-card--edit { border-color: var(--ar-brand); box-shadow: 0 0 0 3px var(--ar-brand-50), var(--ar-shadow); scroll-margin-top: 100px; }
.ar-table tr.is-editing td { background: var(--ar-brand-50); }
.ar-empty { padding: 40px 24px; text-align: center; color: var(--ar-muted); border: 1px dashed var(--ar-line-strong); border-radius: var(--ar-radius); background: var(--ar-surface); }

/* ---------- Estados ---------- */
.ar-badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; background: var(--ar-neutral-bg); color: var(--ar-neutral); }
/* Un color por estado: pendiente gris, autorizada verde, en entrevista azul, en revisión naranja, finalizada morado, anulada rojo */
.ar-badge--pendiente { background: #eef1f5; color: #55606e; }
.ar-badge--autorizada { background: #e6f6ec; color: #146c34; }
.ar-badge--en_entrevista { background: #e8f1fd; color: #1d5fa8; }
.ar-badge--en_revision { background: #fff1e0; color: #b45309; }
.ar-badge--finalizada { background: #f1ebfd; color: #6d28d9; }
.ar-badge--anulada { background: #fdeeec; color: #b42318; }
.ar-result { display: inline-block; font-weight: 800; letter-spacing: .02em; }
.ar-result--veraz { color: var(--ar-ok); }
.ar-result--no-veraz { color: var(--ar-danger); }

/* ---------- Tarjetas ---------- */
.ar-card { background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: var(--ar-radius); padding: 24px; margin-bottom: 20px; box-shadow: var(--ar-shadow); }
.ar-card > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ar-card > summary::-webkit-details-marker { display: none; }
.ar-card > summary::after { content: "+"; font-size: 20px; color: var(--ar-muted); line-height: 1; }
.ar-card[open] > summary { margin-bottom: 16px; }
.ar-card[open] > summary::after { content: "−"; }
.ar-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; margin-bottom: 20px; }
.ar-cols > .ar-card { margin-bottom: 0; }
.ar-dl { display: grid; grid-template-columns: minmax(120px, max-content) 1fr; gap: 10px 20px; margin: 0; }
.ar-dl dt { color: var(--ar-muted); font-size: 14px; }
.ar-dl dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.ar-check-item { display: flex; align-items: center; gap: 8px; }
.ar-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ar-line-strong); flex: none; }
.ar-dot--ok { background: var(--ar-ok); }

/* ---------- Formularios ---------- */
.ar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px 24px; }
.ar-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ar-field--wide, .ar-field--html { grid-column: 1 / -1; }
.ar-field--html { color: var(--ar-ink-2); font-weight: 600; border-top: 1px solid var(--ar-line); padding-top: 14px; }
.ar-field--html p { margin: 0; text-align: left !important; }
.ar-field > label, .ar-field > .ar-label { font-weight: 600; font-size: 14px; color: var(--ar-ink-2); margin: 0; }
.ar-app input[type=text], .ar-app input[type=email], .ar-app input[type=date], .ar-app input[type=search], .ar-app input[type=tel], .ar-app input[type=number], .ar-app input[type=url],
.ar-app input[type=password], .ar-app input:not([type]), .ar-app select, .ar-app textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--ar-line-strong); border-radius: var(--ar-radius-sm);
  background: #fff; font: inherit; font-size: 15px; color: var(--ar-ink); box-shadow: none; transition: border-color .15s, box-shadow .15s;
}
.ar-app textarea { min-height: 96px; resize: vertical; }
.ar-app input::placeholder, .ar-app textarea::placeholder { color: #98a2b0; }
.ar-app input:focus, .ar-app select:focus, .ar-app textarea:focus { outline: none; border-color: var(--ar-brand); box-shadow: var(--ar-focus); }
.ar-app .is-invalid { border-color: var(--ar-danger) !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .15) !important; }
.ar-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.ar-choices label { display: inline-flex; gap: 8px; align-items: center; padding: 8px 14px; border: 1px solid var(--ar-line-strong); border-radius: var(--ar-radius-sm); cursor: pointer; font-weight: 500; background: #fff; }
.ar-choices label:has(input:checked) { border-color: var(--ar-brand); background: var(--ar-brand-50); color: var(--ar-brand); font-weight: 600; }
.ar-choices input { accent-color: var(--ar-brand); margin: 0; }
.ar-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin-top: 16px; cursor: pointer; }
.ar-check input { accent-color: var(--ar-brand); margin-top: 4px; }
.ar-value { padding: 9px 0; border-bottom: 1px dashed var(--ar-line); min-height: 42px; overflow-wrap: anywhere; }
.ar-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; align-items: center; }
.ar-actions--end { justify-content: flex-end; }
.ar-inline-form { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.ar-inline-form input { width: auto; min-width: 220px; }

/* Enlaces para el evaluado */
.ar-share { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--ar-line); }
.ar-share label { display: block; font-size: 13px; font-weight: 700; color: var(--ar-ink-2); margin-bottom: 6px; }
.ar-share__row { display: flex; gap: 8px; }
.ar-share__row input { flex: 1; min-width: 0; font-size: 13px !important; color: var(--ar-muted) !important; background: var(--ar-soft) !important; }

/* ---------- Asistente de la entrevista ---------- */
.ar-wizard__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.ar-wizard__head h3 { margin: 0; }
.ar-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--ar-muted); font-weight: 600; }
.ar-progress__bar { width: 160px; height: 8px; border-radius: 999px; background: var(--ar-neutral-bg); overflow: hidden; }
.ar-progress__bar span { display: block; height: 100%; background: var(--ar-ok); border-radius: inherit; }
.ar-steps { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--ar-line); }
.ar-steps a { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border: 1px solid var(--ar-line); border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ar-ink-2); text-decoration: none; white-space: nowrap; background: #fff; }
.ar-steps a:hover { border-color: var(--ar-line-strong); background: var(--ar-soft); }
.ar-steps a span { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--ar-neutral-bg); color: var(--ar-neutral); font-size: 11px; font-weight: 800; }
.ar-steps a.is-done span { background: var(--ar-ok); color: #fff; }
.ar-steps a.is-active { border-color: var(--ar-brand); background: var(--ar-brand-50); color: var(--ar-brand); }
.ar-steps a.is-active span { background: var(--ar-brand); color: #fff; }

/* Historial */
.ar-log { list-style: none; margin: 0; padding: 0; }
.ar-log li { position: relative; padding: 0 0 16px 22px; font-size: 14px; }
.ar-log li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ar-brand); }
.ar-log li::after { content: ""; position: absolute; left: 7px; top: 16px; bottom: 0; width: 2px; background: var(--ar-line); }
.ar-log li:last-child::after { display: none; }
.ar-log strong { text-transform: capitalize; }
.ar-log time { display: block; color: var(--ar-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* ---------- Formularios públicos y login ---------- */
.ar-public { max-width: 780px; margin: 0 auto; }
.ar-public h2 { margin-bottom: 6px; }
.ar-login { max-width: 440px; margin: 24px auto; }
.ar-login .ar-card { padding: 32px; }
.ar-login h2 { margin-bottom: 4px; }
.ar-login form p { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; }
.ar-login label { font-weight: 600; font-size: 14px; color: var(--ar-ink-2); }
.ar-login .login-remember label { display: flex; flex-direction: row; gap: 8px; align-items: center; font-weight: 500; }
.ar-login input[type=submit] { width: 100%; min-height: 44px; background: var(--ar-brand); color: #fff; border: 0; border-radius: var(--ar-radius-sm); font: inherit; font-weight: 700; cursor: pointer; }
.ar-login input[type=submit]:hover { background: var(--ar-brand-600); }
.ar-login__foot { margin: 8px 0 0; text-align: center; font-size: 14px; }
.ar-login--wide { max-width: 640px; }
.ar-login__links { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--ar-line); display: flex; flex-direction: column; gap: 8px; text-align: center; font-size: 14px; }
.ar-login__links a { color: var(--ar-brand); font-weight: 600; text-decoration: none; }
.ar-login__links a:hover { text-decoration: underline; }
.ar-btn--block { width: 100%; min-height: 44px; }
.ar-mt-sm { margin-top: 16px; }
.ar-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.ar-legal { background: var(--ar-soft); border: 1px solid var(--ar-line); border-radius: var(--ar-radius); padding: 16px 18px; margin: 16px 0 24px; font-size: 14px; color: var(--ar-ink-2); }
.ar-legal p { margin: 0 0 8px; }
.ar-legal p:last-child { margin-bottom: 0; }
.ar-legal ol { margin: 0 0 10px; padding-left: 20px; }
.ar-legal li { margin-bottom: 6px; text-align: justify; }
.ar-signature-box { position: relative; }
.ar-signature { display: block; width: 100%; height: 200px; border: 1px dashed #9aa4b1; border-radius: var(--ar-radius-sm); background: #fff; touch-action: none; cursor: crosshair; }
.ar-signature-box::after { content: "Firme aquí"; position: absolute; left: 16px; bottom: 12px; font-size: 12px; color: #98a2b0; pointer-events: none; }
.ar-signature-box .ar-btn { margin-top: 8px; align-self: flex-start; }
.ar-done { text-align: center; padding: 24px 0 8px; }
.ar-done__icon { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ar-ok-bg); color: var(--ar-ok); font-size: 28px; font-weight: 800; margin-bottom: 12px; }

/* ---------- Divi: páginas del panel ---------- */
body.ar-page #main-content .container { padding-top: 32px; }
body.ar-page #main-content .container::before { display: none; }
body.ar-page .main_title { display: none; }
body.ar-page #left-area { width: 100%; padding: 0; float: none; }
body.ar-page #sidebar { display: none; }
body.ar-page #main-content { background: #f3f5f8; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .ar-cols { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .ar-app { font-size: 15px; padding-bottom: 88px; }
  .ar-app h2 { font-size: 22px; }
  .ar-card { padding: 18px 16px; border-radius: var(--ar-radius-sm); }
  .ar-nav { padding: 6px; margin-bottom: 20px; }
  .ar-nav__links { order: 2; width: 100%; }
  .ar-usermenu { order: 1; width: 100%; padding-bottom: 6px; border-bottom: 1px solid var(--ar-line); }
  .ar-usermenu__toggle { width: 100%; }
  .ar-usermenu__chevron { margin-left: auto; }
  .ar-usermenu__panel { left: 0; right: 0; width: auto; }
  .ar-header { align-items: stretch; flex-direction: column; }
  .ar-header__actions { width: 100%; }
  .ar-header__actions > .ar-btn, .ar-header__actions > form { flex: 1 1 auto; }
  .ar-header__actions > form .ar-btn { width: 100%; }

  .ar-kpis { display: flex; overflow-x: auto; gap: 10px; margin: 0 -16px 16px; padding: 2px 16px 4px; scroll-snap-type: x mandatory; scrollbar-width: none; }
  .ar-kpis::-webkit-scrollbar { display: none; }
  .ar-kpi { flex: 0 0 132px; scroll-snap-align: start; padding: 12px 12px 12px 16px; }
  .ar-kpi strong { font-size: 24px; }
  .ar-filters select, .ar-filters .ar-btn { flex: 1 1 100%; }

  /* Tablas como tarjetas */
  .ar-table-wrap { border: 0; background: none; box-shadow: none; overflow: visible; }
  .ar-app .ar-table--cards thead { display: none; }
  .ar-app .ar-table--cards, .ar-app .ar-table--cards tbody, .ar-app .ar-table--cards tr, .ar-app .ar-table--cards td { display: block; width: 100%; }
  .ar-app .ar-table--cards tr { position: relative; background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: var(--ar-radius); padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--ar-shadow); }
  .ar-app .ar-table--cards tbody tr:hover td { background: none; }
  .ar-app .ar-table--cards td { display: flex; justify-content: space-between; gap: 16px; padding: 5px 0; border: 0; text-align: right; font-size: 14px; }
  .ar-app .ar-table--cards td::before { content: attr(data-label); color: var(--ar-muted); font-weight: 600; text-align: left; flex: none; }
  .ar-app .ar-table--cards td.ar-td-num { position: absolute; top: 14px; right: 16px; width: auto; padding: 0; font-size: 13px; }
  .ar-app .ar-table--cards td.ar-td-num::before { content: "N.º "; font-weight: 600; }
  .ar-app .ar-table--cards td.ar-td-main { display: block; text-align: left; font-size: 16px; padding: 0 64px 6px 0; }
  .ar-app .ar-table--cards td.ar-td-main::before { display: none; }
  .ar-app .ar-table--cards td.ar-td-action { justify-content: flex-end; margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--ar-line); }
  .ar-app .ar-table--cards td.ar-td-action::before { display: none; }
  .ar-app .ar-table--cards td:empty { display: none; }
  .ar-app .ar-table--cards td.ar-td-check { justify-content: flex-start; width: auto; padding: 0 0 8px; }
  .ar-app .ar-table--cards td.ar-td-check::before { display: none; }

  .ar-dl { grid-template-columns: 1fr; gap: 2px; }
  .ar-dl dd { margin-bottom: 10px; }
  .ar-grid { grid-template-columns: 1fr; gap: 16px; }
  .ar-choices label { flex: 1 1 auto; justify-content: center; }
  .ar-inline-form { width: 100%; }
  .ar-inline-form input { min-width: 0; flex: 1 1 100%; }
  .ar-inline-form .ar-btn { flex: 1 1 auto; }

  /* Pasos en carrusel horizontal */
  .ar-steps { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 16px; padding: 0 16px 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
  .ar-steps::-webkit-scrollbar { display: none; }
  .ar-steps a { scroll-snap-align: start; }
  .ar-progress { width: 100%; }
  .ar-progress__bar { flex: 1; }

  /* Acciones del paso fijas abajo */
  .ar-wizard .ar-actions--sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--ar-line); box-shadow: 0 -4px 16px rgba(16, 24, 40, .08); backdrop-filter: blur(6px); }
  .ar-wizard .ar-actions--sticky .ar-btn { flex: 1 1 0; }

  .ar-signature { height: 170px; }
  .ar-login .ar-card { padding: 24px 20px; }
  body.ar-page #main-content .container { width: auto; padding: 20px 16px 0; }
}

/* ---------- Ingreso, registro y recuperación ---------- */
.ar-auth { max-width: 980px; margin: 16px auto 40px; }
.ar-auth__card { display: grid; grid-template-columns: 5fr 6fr; background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 32px rgba(16, 24, 40, .08); }
.ar-auth__brand { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 22px; padding: 56px 44px; background: linear-gradient(165deg, #f8fafd 0%, #edf1f7 100%); border-right: 1px solid var(--ar-line); }
.ar-auth__brand::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--ar-brand), var(--ar-gold)); }
.ar-auth__logo { display: block; width: 230px; max-width: 100%; height: auto; }
.ar-auth__name { font-size: 22px; font-weight: 800; color: var(--ar-brand); margin: 0; }
.ar-auth__tagline { margin: 0 !important; font-size: 19px; line-height: 1.35; font-weight: 700; color: var(--ar-ink); }
.ar-app ul.ar-auth__points { list-style: none !important; margin: 0 !important; padding: 0 !important; display: grid; gap: 12px; }
.ar-app ul.ar-auth__points li { position: relative; list-style: none !important; margin: 0; padding: 0 0 0 30px !important; font-size: 14px; color: var(--ar-ink-2); line-height: 1.45; }
.ar-app ul.ar-auth__points li::before { content: "✓"; position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--ar-gold); color: #fff; font-size: 11px; font-weight: 800; }
.ar-auth__main { padding: 48px 52px; min-width: 0; }
.ar-auth__logo--mobile { display: none; }
.ar-auth h2 { font-size: 26px; margin-bottom: 4px; }
.ar-auth__lead, .ar-auth__main > .ar-muted { margin: 0 0 24px !important; }
.ar-auth .ar-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px 18px; }
.ar-auth .ar-notice { margin-bottom: 20px; }

/* Formulario de WordPress (wp_login_form) */
#ar-loginform p { display: flex; flex-direction: column; gap: 6px; margin: 0 0 18px; padding: 0; }
#ar-loginform label { font-weight: 600; font-size: 14px; color: var(--ar-ink-2); }
#ar-loginform .login-remember { margin: -4px 0 18px; }
#ar-loginform .login-remember label { display: inline-flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
#ar-loginform .login-remember input { accent-color: var(--ar-brand); width: 16px; height: 16px; margin: 0; }
#ar-loginform .login-submit { margin-bottom: 0; }
#ar-loginform input[type=submit] { width: 100%; min-height: 48px; border: 0; border-radius: var(--ar-radius-sm); background: var(--ar-brand); color: #fff; font: inherit; font-size: 16px; font-weight: 700; cursor: pointer; transition: background-color .15s, box-shadow .15s; }
#ar-loginform input[type=submit]:hover { background: var(--ar-brand-600); }
#ar-loginform input[type=submit]:focus-visible { outline: none; box-shadow: var(--ar-focus); }

/* Mostrar / ocultar contraseña */
.ar-pass { position: relative; display: block; }
.ar-pass input { padding-right: 88px !important; }
.ar-pass__toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); border: 0; background: transparent; color: var(--ar-brand); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 10px; border-radius: 6px; cursor: pointer; }
.ar-pass__toggle:hover { background: var(--ar-brand-50); }
.ar-pass__toggle:focus-visible { outline: none; box-shadow: var(--ar-focus); }

.ar-auth__help { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin: 16px 0 28px; font-size: 14px; }
.ar-auth__help a, .ar-login__foot a { color: var(--ar-brand); font-weight: 600; text-decoration: none; }
.ar-auth__help a:hover, .ar-login__foot a:hover { text-decoration: underline; }
.ar-auth__signup { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--ar-line); text-align: center; font-size: 14px; color: var(--ar-muted); }
.ar-login__foot { margin: 20px 0 0 !important; text-align: center; font-size: 14px; }

@media (max-width: 820px) {
  .ar-auth { margin: 0 auto 24px; }
  .ar-auth__card { grid-template-columns: 1fr; border-radius: 12px; }
  .ar-auth__brand { display: none; }
  .ar-auth__main { padding: 28px 20px 32px; border-top: 4px solid var(--ar-gold); }
  .ar-auth__logo--mobile { display: block; width: 130px; margin: 0 auto 20px; }
  .ar-auth h2 { font-size: 23px; }
  .ar-auth__help { justify-content: center; }
}

/* ---------- Firma: dibujar / escribir / subir imagen ---------- */
.ar-sig-tabs { display: inline-flex; gap: 4px; padding: 4px; margin: 4px 0 10px; background: var(--ar-neutral-bg); border-radius: 8px; }
.ar-sig-tabs button { border: 0; background: transparent; padding: 7px 14px; border-radius: 6px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ar-ink-2); cursor: pointer; }
.ar-sig-tabs button[aria-selected="true"] { background: var(--ar-surface); color: var(--ar-brand); box-shadow: var(--ar-shadow); }
.ar-sig-tabs button:focus-visible { outline: none; box-shadow: var(--ar-focus); }
.ar-signature-box.is-preview .ar-signature { cursor: default; border-style: solid; background: #fcfcfd; }
.ar-signature-box.is-preview::after { content: "Vista previa de la firma"; }
.ar-sig-panel { margin: 10px 0 4px; }
.ar-sig-panel[hidden] { display: none !important; }
.ar-sig-hint { margin: 0 0 8px !important; font-size: 13px; color: var(--ar-muted); }
.ar-app .ar-sig-text { font-size: 16px; }
.ar-sig-confirm { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-weight: 600; cursor: pointer; }
.ar-sig-confirm input { accent-color: var(--ar-brand); width: 18px; height: 18px; margin: 0; }
.ar-sig-file { display: block; width: 100%; padding: 10px; border: 1px dashed var(--ar-line-strong); border-radius: var(--ar-radius-sm); background: var(--ar-soft); font: inherit; font-size: 14px; }
/* Pestañas de firma dentro de Gravity Forms: el tema Orbital pinta todos los botones de azul */
.ar-app .gform-theme--framework .ar-sig-tabs button,
.ar-app .ar-sig-tabs button {
  background: transparent !important; color: var(--ar-ink-2) !important; border: 0 !important; box-shadow: none !important;
  min-height: 0 !important; padding: 7px 14px !important; border-radius: 6px !important;
  font: inherit !important; font-size: 14px !important; font-weight: 600 !important; line-height: 1.3 !important; text-transform: none !important;
}
.ar-app .gform-theme--framework .ar-sig-tabs button[aria-selected="true"],
.ar-app .ar-sig-tabs button[aria-selected="true"] { background: #fff !important; color: var(--ar-brand) !important; box-shadow: var(--ar-shadow) !important; }
.ar-app .gform-theme--framework .ar-sig-tabs button:hover:not([aria-selected="true"]),
.ar-app .ar-sig-tabs button:hover:not([aria-selected="true"]) { color: var(--ar-brand) !important; background: rgba(255, 255, 255, .6) !important; }

/* Firma registrada del poligrafista (vista previa con la línea de firma, como en el informe) */
.ar-firma-actual { display: flex; flex-direction: column; align-items: center; padding: 20px 16px 16px; margin-bottom: 12px; background: var(--ar-soft); border: 1px solid var(--ar-line); border-radius: var(--ar-radius-sm); }
.ar-firma-img { width: 100%; max-width: 360px; height: 110px; margin-bottom: -6px; background: center / contain no-repeat;
  -webkit-user-select: none; user-select: none; -webkit-user-drag: none; -webkit-touch-callout: none; }
.ar-firma-actual__linea { min-width: 240px; padding-top: 6px; border-top: 1px solid var(--ar-ink); text-align: center; font-weight: 700; color: var(--ar-ink); line-height: 1.3; }
.ar-firma-actual__linea small { font-weight: 500; color: var(--ar-muted); }

/* Barra bajo el lienzo: estado + "Borrar firma" (con prioridad sobre el tema Orbital de Gravity Forms) */
.ar-sig-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 8px 0 4px; min-height: 36px; }
.ar-sig-status { flex: 1; min-width: 0; margin: 0 !important; font-size: 13px; font-weight: 600; color: var(--ar-brand); }
.ar-app .ar-sig-toolbar .ar-sig-clear,
.ar-app .gform-theme--framework .ar-sig-toolbar button.ar-sig-clear {
  display: inline-flex !important; align-items: center; gap: 6px; flex: none;
  min-height: 34px !important; padding: 6px 12px !important; margin: 0 !important;
  background: #fff !important; color: var(--ar-ink-2) !important;
  border: 1px solid var(--ar-line-strong) !important; border-radius: 6px !important; box-shadow: none !important;
  font: inherit !important; font-size: 13px !important; font-weight: 600 !important; line-height: 1.2 !important;
  text-transform: none !important; letter-spacing: 0 !important; cursor: pointer; transition: color .15s, border-color .15s, background-color .15s;
}
.ar-app .ar-sig-toolbar .ar-sig-clear svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ar-app .ar-sig-toolbar .ar-sig-clear:hover:not(:disabled),
.ar-app .gform-theme--framework .ar-sig-toolbar button.ar-sig-clear:hover:not(:disabled) { color: var(--ar-danger) !important; border-color: #f0b8b2 !important; background: var(--ar-danger-bg) !important; }
.ar-app .ar-sig-toolbar .ar-sig-clear:focus-visible { outline: none !important; box-shadow: var(--ar-focus) !important; }
.ar-app .ar-sig-toolbar .ar-sig-clear:disabled,
.ar-app .gform-theme--framework .ar-sig-toolbar button.ar-sig-clear:disabled { opacity: .45; cursor: not-allowed; }
.ar-signature.is-invalid + .ar-sig-status, .ar-signature-box:has(.is-invalid) ~ .ar-sig-status { color: var(--ar-danger); }
@media (max-width: 720px) {
  .ar-sig-tabs { display: flex; width: 100%; }
  .ar-sig-tabs button { flex: 1; padding: 8px 6px; font-size: 13px; }
}

/* ---------- Gravity Forms dentro del sitio (autorización) ---------- */
.ar-gf .gform_wrapper { --gf-color-primary: #002e5e !important; --gf-color-primary-rgb: 0, 46, 94 !important; --gf-color-primary-darker: #00224a !important; --gf-color-primary-lighter: #0a4180 !important; --gf-ctrl-border-color: #c3ccd7 !important; --gf-radius: 8px !important; --gf-ctrl-size: 46px !important; margin: 0; }
.ar-gf .gform_title { font-size: 26px !important; color: var(--ar-ink); margin: 0 0 6px !important; }
.ar-gf .gform_description { color: var(--ar-muted); margin-bottom: 20px !important; }
.ar-gf .gfield--type-html .ar-legal ol { padding-left: 20px; }
.ar-gf .ar-gf-inline .gfield_radio { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.ar-gf .gform_footer .gform_button { min-height: 46px; padding: 0 28px !important; border-radius: 6px !important; background: var(--ar-brand) !important; font-weight: 700 !important; }
.ar-gf .ar-signature-box { margin: 8px 0; }

/* ---------- Agendamiento ---------- */
.ar-mt { margin-top: 24px !important; }
.ar-field--end { justify-content: flex-end; }
.ar-slots label { min-width: 110px; justify-content: center; font-variant-numeric: tabular-nums; }
.ar-slots label.is-disabled { opacity: .45; cursor: not-allowed; text-decoration: line-through; background: var(--ar-soft); }
.ar-tabs { display: inline-flex; gap: 4px; padding: 4px; background: var(--ar-neutral-bg); border-radius: 8px; margin-bottom: 16px; }
.ar-tabs a { padding: 6px 14px; border-radius: 6px; font-size: 14px; font-weight: 600; color: var(--ar-ink-2); text-decoration: none; }
.ar-tabs a.is-active { background: var(--ar-surface); color: var(--ar-brand); box-shadow: var(--ar-shadow); }
.ar-btn--sm { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.ar-row-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.ar-row-actions .ar-inline-form { width: auto; }
.ar-app .ar-table select { min-height: 34px; padding: 4px 8px; font-size: 14px; width: auto; }
.ar-badge--cita-solicitada { background: var(--ar-warn-bg); color: var(--ar-warn); }
.ar-badge--cita-confirmada { background: var(--ar-info-bg); color: var(--ar-info); }
.ar-badge--cita-atendida { background: var(--ar-ok-bg); color: var(--ar-ok); }
.ar-badge--cita-cancelada { background: var(--ar-danger-bg); color: var(--ar-danger); }
@media (max-width: 720px) {
  .ar-row-actions { justify-content: stretch; width: 100%; }
  .ar-row-actions .ar-inline-form, .ar-row-actions .ar-btn { flex: 1 1 auto; }
  .ar-slots label { flex: 1 1 calc(50% - 8px); min-width: 0; }
  .ar-tabs { display: flex; }
  .ar-tabs a { flex: 1; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .ar-app * { transition: none !important; scroll-behavior: auto !important; }
}

/* Qué falta, avisos de sección incompleta y estado del autoguardado */
.ar-missing { margin: 0 0 14px; padding: 10px 14px; border: 1px solid #e8c36a; background: #fff8e6; border-radius: 8px; }
.ar-missing summary { cursor: pointer; font-weight: 600; color: #6b4a00; }
.ar-missing ul { margin: 8px 0 0; padding-left: 18px; }
.ar-missing li { margin: 4px 0; }
.ar-steps__miss { display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 6px; border-radius: 9px; background: #9a5b00; color: #fff; font-size: 11px; font-style: normal; font-weight: 700; line-height: 18px; text-align: center; }
.ar-autosave { margin-right: auto; align-self: center; font-size: 13px; color: #4a5565; }
.ar-autosave.is-error { color: #a61b1b; font-weight: 600; }

.ar-result--inconcluso { color: #7a5a00; }

/* Estadísticas y filtros por fecha */
.ar-filters__date { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #3b4655; }
.ar-bars { list-style: none; margin: 0; padding: 0; }
.ar-bars li { display: grid; grid-template-columns: minmax(90px, 30%) 1fr auto; gap: 10px; align-items: center; margin: 6px 0; font-size: 14px; }
.ar-bars__track { height: 12px; background: #e8edf3; border-radius: 6px; overflow: hidden; }
.ar-bars__fill { display: block; height: 100%; background: #1d3f6e; border-radius: 6px; }
.ar-bars__fill.is-ok { background: #187a42; }
.ar-bars__n { font-weight: 700; white-space: nowrap; }
.ar-bars__n small { font-weight: 400; color: #4a5565; }
.ar-kpis--stats .ar-kpi { cursor: default; }

/* Orden por columna, paginación y verificación en dos pasos */
.ar-sort { color: inherit; text-decoration: none; font-weight: inherit; white-space: nowrap; }
.ar-sort:hover, .ar-sort:focus-visible { text-decoration: underline; }
.ar-sort.is-active { color: #1d3f6e; }
.ar-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 14px 0; }
.ar-pager__count { margin: 0 auto 0 0; color: #4a5565; font-size: 14px; }
.ar-pager a, .ar-pager span.is-current { min-width: 36px; padding: 6px 10px; border: 1px solid #c9d1db; border-radius: 6px; text-align: center; text-decoration: none; color: #1d3f6e; background: #fff; }
.ar-pager span.is-current { background: #1d3f6e; color: #fff; border-color: #1d3f6e; font-weight: 700; }
.ar-2fa__codes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; list-style: none; margin: 8px 0 0; padding: 0; }
.ar-2fa__codes code, .ar-2fa__secret { display: inline-block; padding: 6px 10px; background: #f3f6fa; border: 1px solid #d9dee5; border-radius: 6px; font-size: 15px; letter-spacing: .08em; }
.ar-2fa__steps li { margin-bottom: 10px; }

/* Foto del evaluado (informe) */
.ar-foto { display: flex; gap: 16px; align-items: center; margin: 0 0 20px; padding: 14px 18px; border: 1px solid var(--ar-line); border-radius: var(--ar-radius); background: var(--ar-soft); }
.ar-foto__img { width: 84px; height: auto; border-radius: var(--ar-radius-sm); border: 1px solid var(--ar-line-strong); flex: none; }
.ar-foto__cuerpo { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; min-width: 0; flex: 1; }
.ar-foto__cuerpo > strong { color: var(--ar-ink); font-size: 15px; }
.ar-foto__cuerpo > .ar-muted { font-size: 13px; }
.ar-foto__form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 4px; max-width: 100%; }
.ar-foto__form input[type=file] { max-width: 100%; padding: 4px; border: 1px dashed var(--ar-line-strong); border-radius: var(--ar-radius-sm); background: var(--ar-surface); color: var(--ar-ink-2); font-size: 14px; }
.ar-foto__form input[type=file]::file-selector-button { margin-right: 10px; padding: 7px 14px; border: 0; border-radius: var(--ar-radius-sm); background: var(--ar-brand-50); color: var(--ar-brand); font: inherit; font-weight: 600; cursor: pointer; }
.ar-foto__form input[type=file]::file-selector-button:hover { background: var(--ar-line); }
.ar-foto__form input[type=file]:focus-visible { outline: none; box-shadow: var(--ar-focus); }
@media (max-width: 600px) { .ar-foto { flex-direction: column; align-items: flex-start; } }

/* ==========================================================================
   Tablero: menú a la izquierda y contenido a la derecha (pantalla completa)
   ========================================================================== */
body.ar-shell { margin: 0; background: #f6f8fb; }
.ar-app.ar-dash { max-width: none; margin: 0; padding: 0; display: grid; grid-template-columns: 268px minmax(0, 1fr); min-height: 100vh; background: var(--ar-soft); }
.ar-topbar, .ar-scrim { display: none; }
.ar-side { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; padding: 20px 14px 84px; background: var(--ar-brand); color: #fff; }
.ar-side__brand { display: flex; flex-direction: column; gap: 8px; text-decoration: none; padding: 0 4px 14px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.ar-side__brand img { display: block; width: 100%; max-width: 176px; height: auto; }
.ar-side__brand span { color: #c9d8ea; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.ar-main { min-width: 0; width: 100%; max-width: none; padding: 32px 40px 64px; }

.ar-dash .ar-nav { flex: 1; flex-direction: column; flex-wrap: nowrap; align-items: stretch; justify-content: flex-start; gap: 12px; margin: 0; padding: 0; background: none; border: 0; box-shadow: none; border-radius: 0; }
.ar-dash .ar-nav__links { flex-direction: column; overflow: visible; gap: 2px; }
.ar-dash .ar-nav__links a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--ar-radius-sm); color: #d6e3f3; font-size: 15px; white-space: normal; }
.ar-dash .ar-nav__links a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ar-dash .ar-nav__links a:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ar-dash .ar-nav__links a.is-active { background: rgba(255, 255, 255, .16); color: #fff; box-shadow: inset 3px 0 0 var(--ar-gold); }
.ar-nav__icon { flex: none; opacity: .9; }
.ar-dash .ar-usermenu { margin-top: auto; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .16); }
.ar-dash .ar-usermenu__toggle { width: 100%; color: #fff; border-radius: var(--ar-radius-sm); }
.ar-dash .ar-usermenu__toggle:hover, .ar-dash .ar-usermenu.is-open .ar-usermenu__toggle { background: rgba(255, 255, 255, .1); border-color: transparent; }
.ar-dash .ar-usermenu__toggle:focus-visible { outline-color: #fff; }
.ar-dash .ar-nav__who { min-width: 0; }
.ar-dash .ar-nav__who strong { color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-dash .ar-nav__who span { color: #c9d8ea; }
.ar-dash .ar-usermenu__chevron { color: #c9d8ea; margin-left: auto; transform: rotate(180deg); }
.ar-dash .ar-usermenu.is-open .ar-usermenu__chevron { transform: none; }
.ar-dash .ar-avatar { background: #fff; color: var(--ar-brand); }
.ar-dash .ar-usermenu__panel { top: auto; bottom: calc(100% + 8px); left: 0; right: 0; width: auto; }

@media (max-width: 900px) {
  .ar-app.ar-dash { grid-template-columns: minmax(0, 1fr); padding-bottom: 0; }
  .ar-topbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 900; height: 56px; padding: 0 12px; background: var(--ar-brand); color: #fff; }
  .ar-topbar__btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; padding: 0; background: transparent; border: 0; border-radius: var(--ar-radius-sm); color: #fff; cursor: pointer; }
  .ar-topbar__btn:hover { background: rgba(255, 255, 255, .12); }
  .ar-topbar__btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
  .ar-topbar__brand { font-weight: 700; font-size: 16px; }
  .ar-side { position: fixed; z-index: 1000; top: 0; left: 0; bottom: 0; width: 288px; max-width: 86vw; height: auto; visibility: hidden; transform: translateX(-100%); transition: transform .22s ease, visibility 0s .22s; box-shadow: 8px 0 24px rgba(0, 0, 0, .25); }
  .ar-dash.is-menu-open .ar-side { visibility: visible; transform: none; transition: transform .22s ease; }
  .ar-scrim { position: fixed; z-index: 950; inset: 0; background: rgba(10, 20, 35, .5); }
  .ar-dash.is-menu-open .ar-scrim { display: block; }
  .ar-main { padding: 20px 16px 48px; }
  .ar-dash .ar-usermenu { order: 0; width: auto; padding-bottom: 0; border-bottom: 0; }
  .ar-dash .ar-nav__links { order: 0; width: auto; }
}
@media (prefers-reduced-motion: reduce) { .ar-side { transition: none !important; } }

/* Enlaces dentro de un texto: siempre subrayados (no dependen solo del color) */
.ar-app p a:not([class]), .ar-app small a:not([class]), .ar-app li > a:not([class]) { color: var(--ar-brand); text-decoration: underline; }

/* Menú lateral contraído / expandido */
.ar-side__mono { display: none; }
.ar-side__collapse { display: flex; align-items: center; gap: 12px; width: 100%; margin: -6px 0 0; padding: 8px 12px; background: transparent; border: 0; border-radius: var(--ar-radius-sm); color: #c9d8ea; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: left; }
.ar-side__collapse:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.ar-side__collapse:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.ar-side__collapse svg { flex: none; transition: transform .2s; }
@media (min-width: 901px) {
  .ar-app.ar-dash.is-collapsed { grid-template-columns: 76px minmax(0, 1fr); }
  .is-collapsed .ar-side { padding-left: 10px; padding-right: 10px; overflow: visible; }
  .is-collapsed .ar-side__brand { align-items: center; padding: 0 0 14px; }
  .is-collapsed .ar-side__brand img, .is-collapsed .ar-side__brand > span { display: none; }
  .is-collapsed .ar-side__mono { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: #fff; color: var(--ar-brand); font-size: 16px; letter-spacing: .02em; }
  .is-collapsed .ar-nav__label, .is-collapsed .ar-nav__who { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; padding: 0; }
  .is-collapsed .ar-dash .ar-nav__links a, .is-collapsed .ar-nav__links a, .is-collapsed .ar-side__collapse { justify-content: center; padding-left: 0; padding-right: 0; }
  .is-collapsed .ar-side__collapse svg { transform: rotate(180deg); }
  .is-collapsed .ar-nav__links a.is-active { box-shadow: inset 3px 0 0 var(--ar-gold); }
  .is-collapsed .ar-usermenu__toggle { justify-content: center; padding: 4px; }
  .is-collapsed .ar-usermenu__chevron { display: none; }
  .is-collapsed .ar-usermenu__panel { left: calc(100% + 14px); right: auto; bottom: 0; width: 260px; }
}
@media (prefers-reduced-motion: reduce) { .ar-side__collapse svg { transition: none; } }
@media (max-width: 900px) { .ar-side__collapse { display: none; } }

/* Botón «Abrir» de las tablas */
.ar-app .ar-open { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 5px 12px 5px 14px; border-radius: 999px; background: var(--ar-brand-50); color: var(--ar-brand); font-size: 14px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .15s, color .15s; }
.ar-app .ar-open svg { flex: none; transition: transform .15s; }
.ar-app .ar-open:hover, .ar-app .ar-open:focus-visible { background: var(--ar-brand); color: #fff; text-decoration: none; }
.ar-app .ar-open:hover svg, .ar-app .ar-open:focus-visible svg { transform: translateX(2px); }
.ar-app .ar-open:focus-visible { outline: 2px solid var(--ar-brand); outline-offset: 2px; }
@media (max-width: 720px) { .ar-app .ar-open { justify-content: center; min-height: 40px; } }
@media (prefers-reduced-motion: reduce) { .ar-app .ar-open, .ar-app .ar-open svg { transition: none; } }

/* Las tarjetas del panel miden lo que miden sus datos (una regla general del sitio las estiraba al 100 % de alto) */
.ar-app .ar-card { height: auto; }

/* ==========================================================================
   Entrevista: pasos a la izquierda, secciones con subtítulo y cuadrícula de 12 columnas
   ========================================================================== */
.ar-gsec { margin: 0 0 30px; }
.ar-gsec[hidden], .ar-pair[hidden] { display: none; }
.ar-app .ar-group { margin: 0 0 16px; padding: 0 0 8px; border-bottom: 1px solid var(--ar-line); color: var(--ar-muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; }
.ar-fgrid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px 22px; align-items: start; }
.ar-fgrid > .ar-field { grid-column: span 4; }
.ar-w-1 { grid-column: span 1; } .ar-w-2 { grid-column: span 2; } .ar-w-3 { grid-column: span 3; } .ar-w-4 { grid-column: span 4; }
.ar-w-5 { grid-column: span 5; } .ar-w-6 { grid-column: span 6; } .ar-w-7 { grid-column: span 7; } .ar-w-8 { grid-column: span 8; }
.ar-w-9 { grid-column: span 9; } .ar-w-10 { grid-column: span 10; } .ar-w-11 { grid-column: span 11; } .ar-w-12 { grid-column: 1 / -1; }
.ar-fgrid > .ar-field.ar-w-1 { grid-column: span 1; } .ar-fgrid > .ar-field.ar-w-2 { grid-column: span 2; } .ar-fgrid > .ar-field.ar-w-3 { grid-column: span 3; }
.ar-fgrid > .ar-field.ar-w-4 { grid-column: span 4; } .ar-fgrid > .ar-field.ar-w-5 { grid-column: span 5; } .ar-fgrid > .ar-field.ar-w-6 { grid-column: span 6; }
.ar-fgrid > .ar-field.ar-w-7 { grid-column: span 7; } .ar-fgrid > .ar-field.ar-w-8 { grid-column: span 8; } .ar-fgrid > .ar-field.ar-w-9 { grid-column: span 9; }
.ar-fgrid > .ar-field.ar-w-10 { grid-column: span 10; } .ar-fgrid > .ar-field.ar-w-11 { grid-column: span 11; } .ar-fgrid > .ar-field.ar-w-12 { grid-column: 1 / -1; }
.ar-pair { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px 22px; align-items: start; padding-bottom: 20px; border-bottom: 1px dashed var(--ar-line); }
.ar-fgrid > .ar-pair:last-child { padding-bottom: 0; border-bottom: 0; }
.ar-pair > .ar-field { grid-column: auto; }
.ar-pair textarea { min-height: 72px; }
.ar-fgrid .ar-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ar-fgrid .ar-choices label { width: 100%; }

@media (min-width: 1100px) {
  .ar-wizard__layout { display: grid; grid-template-columns: 224px minmax(0, 1fr); gap: 36px; align-items: start; }
  .ar-wizard__layout > .ar-steps { position: sticky; top: 20px; flex-direction: column; flex-wrap: nowrap; gap: 2px; margin: 0; padding: 0; border-bottom: 0; max-height: calc(100vh - 40px); overflow-x: hidden; overflow-y: auto; scrollbar-width: none; }
  .ar-wizard__layout > .ar-steps::-webkit-scrollbar { display: none; }
  .ar-wizard__layout > .ar-steps a { border: 0; border-radius: var(--ar-radius-sm); padding: 7px 10px 7px 8px; white-space: normal; background: transparent; }
  .ar-wizard__layout > .ar-steps a:hover { background: var(--ar-soft); }
  .ar-wizard__layout > .ar-steps a.is-active { background: var(--ar-brand-50); }
  .ar-wizard__layout > .ar-steps a .ar-steps__miss { margin-left: auto; }
}
@media (max-width: 1099px) {
  .ar-fgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ar-fgrid > .ar-field.ar-w-1, .ar-fgrid > .ar-field.ar-w-2, .ar-fgrid > .ar-field.ar-w-3 { grid-column: span 3; }
  .ar-fgrid > .ar-field.ar-w-4, .ar-fgrid > .ar-field.ar-w-5, .ar-fgrid > .ar-field.ar-w-6, .ar-fgrid > .ar-field.ar-w-7, .ar-fgrid > .ar-field.ar-w-8, .ar-fgrid > .ar-field.ar-w-9,
  .ar-fgrid > .ar-field.ar-w-10, .ar-fgrid > .ar-field.ar-w-11, .ar-fgrid > .ar-field.ar-w-12, .ar-fgrid > .ar-field { grid-column: 1 / -1; }
  .ar-fgrid > .ar-field.ar-w-1, .ar-fgrid > .ar-field.ar-w-2, .ar-fgrid > .ar-field.ar-w-3 { grid-column: span 3; }
}
@media (max-width: 720px) {
  .ar-fgrid { grid-template-columns: 1fr; gap: 16px; }
  .ar-fgrid > .ar-field, .ar-fgrid > .ar-field[class*="ar-w-"] { grid-column: 1 / -1 !important; }
  .ar-pair { grid-template-columns: 1fr; }
}

/* Formularios cortos (clientes, usuarios, nueva evaluación): misma cuadrícula de 12 columnas */
.ar-form > .ar-fgrid, .ar-form .ar-gsec .ar-fgrid { margin-top: 4px; }
.ar-fgrid > .ar-actions { grid-column: 1 / -1; margin-top: 4px; }
.ar-check--box { padding: 12px 14px; border: 1px solid var(--ar-line); border-radius: var(--ar-radius-sm); background: var(--ar-soft); margin-top: 20px; }
.ar-check--box:has(input:checked) { border-color: var(--ar-brand); background: var(--ar-brand-50); }
.ar-card > .ar-gsec:last-of-type { margin-bottom: 0; }
.ar-field .ar-check--box { margin-top: 0; min-height: 44px; align-items: center; }
.ar-field .ar-check--box input { margin-top: 0; }
.ar-fgrid > .ar-field--end { align-self: end; }

/* El aviso es un <p>: la regla general «.ar-app p { padding: 0 }» le quitaba el relleno */
.ar-app .ar-notice { padding: 14px 18px; line-height: 1.5; }
.ar-btn--block { width: 100%; }

/* Texto solo para lectores de pantalla: no ocupa espacio ni genera barras de desplazamiento */
.ar-app .screen-reader-text { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; word-wrap: normal; }
.ar-steps a { position: relative; }

/* Paginador del listado */
.ar-pager { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin: 18px 0 4px; padding: 10px 14px; background: var(--ar-surface); border: 1px solid var(--ar-line); border-radius: var(--ar-radius); }
.ar-pager__count { margin: 0 auto 0 0; color: var(--ar-muted); font-size: 14px; }
.ar-pager__pages { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0 !important; list-style: none; }
.ar-pager__pages li { margin: 0; padding: 0; list-style: none; }
.ar-pager__pages a, .ar-pager__pages span.is-current { display: inline-flex; align-items: center; justify-content: center; gap: 4px; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--ar-line-strong); border-radius: var(--ar-radius-sm); font-size: 14px; font-weight: 600; text-decoration: none; color: var(--ar-brand); background: var(--ar-surface); }
.ar-pager__pages a:hover { background: var(--ar-brand-50); }
.ar-pager__pages a:focus-visible { outline: 2px solid var(--ar-brand); outline-offset: 2px; }
.ar-pager__pages span.is-current { background: var(--ar-brand); color: #fff; border-color: var(--ar-brand); }
.ar-pager__gap { color: var(--ar-muted); padding: 0 2px !important; }
.ar-pager__size { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 14px; color: var(--ar-muted); }
.ar-pager__size select { width: auto; min-height: 36px; padding: 4px 28px 4px 10px; }
@media (max-width: 720px) { .ar-pager { justify-content: center; } .ar-pager__count { width: 100%; text-align: center; margin: 0; } .ar-pager__nav span { display: none; } }
