/* ================================================
   FormulariosUAF — Estilos principales
   ================================================ */

html { font-size: 14px; }
body { font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; background-color: #f8f9fa; }

/* ---- SIDEBAR ---- */
.sidebar-nav {
    width: 260px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a3a5c 0%, #0d2137 100%);
    position: sticky;
    top: 0;
    flex-shrink: 0;
}

.sidebar-nav .nav-link {
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    transition: background 0.15s;
    font-size: 0.9rem;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.15);
}

#page-content-wrapper {
    overflow-x: hidden;
    min-height: 100vh;
}

/* ---- CARDS ---- */
.card { border-radius: 12px; }
.card-header { border-radius: 12px 12px 0 0 !important; }

/* ---- BADGES ---- */
.badge { font-size: 0.78rem; font-weight: 500; border-radius: 6px; padding: 0.35em 0.65em; }

/* ---- WIZARD ---- */
.progress { border-radius: 10px; }
.progress-bar { border-radius: 10px; transition: width 0.4s ease; }

/* ---- TABLES ---- */
.table > :not(caption) > * > * { padding: 0.6rem 0.75rem; }
.table-hover > tbody > tr:hover > * { background-color: rgba(13, 110, 253, 0.04); }

/* ---- FORMS ---- */
.form-control, .form-select {
    border-radius: 8px;
    font-size: 0.9rem;
    border-color: #dee2e6;
}
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,.15);
}

/* ---- BUTTONS ---- */
.btn { border-radius: 8px; font-size: 0.9rem; }
.btn-primary { background-color: #1a3a5c; border-color: #1a3a5c; }
.btn-primary:hover { background-color: #0d2137; border-color: #0d2137; }

/* ---- TOAST ---- */
#toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
}

.toast-msg {
    min-width: 280px;
    border-radius: 10px;
    padding: 0.75rem 1rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideIn 0.2s ease;
}

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to   { transform: translateX(0);   opacity: 1; }
}

/* ---- BENEF ROW ---- */
.benef-row, .control-row {
    background: #fff;
    border-radius: 10px;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 767.98px) {
    .sidebar-nav {
        width: 100%;
        min-height: auto;
        position: relative;
    }
    #wrapper { flex-direction: column; }

    .table-responsive { font-size: 0.82rem; }
}

@media (min-width: 768px) {
    html { font-size: 14px; }
}

/* ---- SIDEBAR TOGGLE ---- */
#wrapper.sidebar-hidden .sidebar-nav { display: none !important; }

/* ================================================
   DECLARACIÓN — rediseño v2 (solo presentación)
   Paleta: navy #3a3a3a · azul #e07b20 · azul claro #fff3e0
   Todo va scopeado bajo #formDeclaracion / .decl-v2 para no
   afectar otras páginas. No cambia ningún name/id/clase de JS.
   ================================================ */

/* Encabezado de página */
.decl-page-head h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: .15rem;
}
.decl-page-head p { color: #94a3b8; font-size: .9rem; margin: 0; }

/* Tarjeta de sección */
#formDeclaracion .decl-card {
    border-radius: 16px;
    border: 1px solid #eef2f7;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
#formDeclaracion .decl-card-header {
    background: #fff !important;
    color: #1e293b !important;
    border-bottom: 1px solid #eef2f7;
    border-radius: 16px 16px 0 0 !important;
    padding: 1rem 1.5rem;
}
#formDeclaracion .decl-card .card-body { padding: 1.25rem 1.5rem; }

/* Título de sección con badge de número (I, II, III, IV) */
.decl-sec-title {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .95rem;
    font-weight: 600;
    color: #1e293b;
}
.decl-sec-num {
    width: 1.7rem;
    height: 1.7rem;
    border-radius: 50%;
    background: #e07b20;
    color: #fff;
    font-size: .78rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Botón "ghost" (Editar / Usar datos del representante legal) */
#formDeclaracion .decl-ghost-btn {
    border: 1px solid #e2e8f0;
    background: #fff;
    color: #475569;
    font-weight: 600;
    font-size: .8rem;
}
#formDeclaracion .decl-ghost-btn:hover {
    background: #f8fafc;
    color: #1e293b;
    border-color: #cbd5e1;
}

/* Pie de acciones */
.decl-actions { padding-top: .25rem; }
.decl-actions .decl-required-hint { color: #94a3b8; font-size: .8rem; }
.decl-actions .decl-required-hint .req { color: #e07b20; }
#formDeclaracion .decl-submit {
    background: #3a3a3a;
    border-color: #3a3a3a;
    border-radius: 12px;
    font-weight: 600;
    padding: .7rem 1.6rem;
    box-shadow: 0 8px 20px rgba(58, 58, 58, .25);
}
#formDeclaracion .decl-submit:hover {
    background: #2b2b2b;
    border-color: #2b2b2b;
}

/* ---- Sección I: tarjetitas de datos de empresa ---- */
.decl-info-tile {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: .7rem .9rem;
    height: 100%;
}
.decl-info-label {
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #94a3b8;
    margin-bottom: .15rem;
}
.decl-info-val { font-size: .9rem; font-weight: 600; color: #334155; line-height: 1.3; }

/* ---- Aviso ámbar (Sección II) ---- */
#formDeclaracion .decl-warn {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 12px;
    padding: .85rem 1rem;
    font-size: .85rem;
    line-height: 1.5;
}

/* ---- Bloque Persona ---- */
#formDeclaracion .decl-persona {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
}
#formDeclaracion .decl-persona-head {
    background: #f8fafc;
    padding: .75rem 1.25rem;
    border-bottom: 1px solid #eef2f7;
}
#formDeclaracion .decl-persona-badge {
    width: 1.45rem;
    height: 1.45rem;
    border-radius: 50%;
    background: #3a3a3a;
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
#formDeclaracion .decl-remove-btn {
    color: #c2410c;
    border: none;
    background: transparent;
    font-weight: 500;
    font-size: .85rem;
}
#formDeclaracion .decl-remove-btn:hover { color: #dc2626; background: #fef2f2; }
#formDeclaracion .decl-persona-body { padding: 1.25rem; }
#formDeclaracion .decl-persona-body .form-label { font-size: .85rem; font-weight: 500; color: #334155; margin-bottom: .35rem; }
#formDeclaracion .decl-persona-body .form-check-label { font-size: .9rem; color: #334155; }
#formDeclaracion .decl-persona .req { color: #dc2626; }
#formDeclaracion .decl-persona-sep { border-top: 1px solid #eef2f7; margin-top: 1.25rem; padding-top: 1rem; }
#formDeclaracion .decl-control-panel {
    border-left: 3px solid #c7d2fe;
    padding: .25rem 0 .25rem .9rem;
    margin-top: .75rem;
}
#formDeclaracion .decl-help { font-size: .78rem; color: #64748b; margin-top: .35rem; }

/* ---- Panel PEP ---- */
#formDeclaracion .decl-pep-panel {
    border: 1px solid #ffe0b2;
    background: #fff;
    border-radius: 12px;
    padding: 1rem;
}
#formDeclaracion .decl-pep-toggle .form-check-label { color: #e07b20; }

/* ---- Botón "Agregar persona" punteado ---- */
#formDeclaracion .decl-add-btn {
    border: 2px dashed #ffd180;
    color: #e07b20;
    background: transparent;
    font-weight: 600;
    border-radius: 12px;
    padding: .6rem 1rem;
}
#formDeclaracion .decl-add-btn:hover { background: #fff3e0; color: #b35e10; }

/* ================================================
   DECLARACIÓN — rediseño v3 (más moderno y ancho)
   Solo presentación; sobrescribe lo anterior dentro de #formDeclaracion.
   ================================================ */

/* Encabezado de página */
.decl-page-head h1 { font-size: 2rem; font-weight: 800; letter-spacing: -.02em; color: #0f172a; }
.decl-page-head p { font-size: .95rem; color: #64748b; }

/* Tarjetas de sección: más aire, esquinas más redondas, sombra suave */
#formDeclaracion .decl-card {
    border: 1px solid #e8edf3;
    border-radius: 20px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .05);
    overflow: hidden;
}
#formDeclaracion .decl-card-header {
    border-radius: 20px 20px 0 0 !important;
    padding: 1.25rem 2rem;
    border-bottom: 1px solid #f1f5f9;
}
#formDeclaracion .decl-card .card-body { padding: 1.75rem 2rem !important; }
#formDeclaracion .decl-sec-title { font-size: 1.08rem; font-weight: 700; color: #0f172a; }
#formDeclaracion .decl-sec-num {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 10px;
    background: linear-gradient(135deg, #f59e0b 0%, #e07b20 60%, #c2410c 100%);
    box-shadow: 0 4px 10px rgba(224, 123, 32, .3);
    font-size: .8rem;
}

/* Campos: más altos, bordes suaves, foco naranja */
#formDeclaracion .form-label { font-size: .85rem; font-weight: 600; color: #334155; margin-bottom: .4rem; }
#formDeclaracion .form-control,
#formDeclaracion .form-select {
    min-height: 2.75rem;
    border-radius: 10px;
    border: 1px solid #dbe3ec;
    background-color: #fff;
    font-size: .95rem;
    color: #0f172a;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
#formDeclaracion .form-control-sm,
#formDeclaracion .form-select-sm { min-height: 2.4rem; font-size: .9rem; }
#formDeclaracion .form-control:hover,
#formDeclaracion .form-select:hover { border-color: #c3cfdc; }
#formDeclaracion .form-control::placeholder { color: #a0aec0; }
#formDeclaracion .form-control[readonly],
#formDeclaracion .form-control.bg-light { background-color: #f8fafc !important; color: #64748b; }
#formDeclaracion .form-check-input { width: 1.15em; height: 1.15em; margin-top: .15em; border-color: #cbd5e1; }

/* Datos de empresa */
#formDeclaracion .decl-info-tile {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 14px;
    padding: .9rem 1.1rem;
    transition: border-color .15s;
}
#formDeclaracion .decl-info-tile:hover { border-color: #fcd9b0; }
#formDeclaracion .decl-info-val { font-size: .95rem; color: #0f172a; }

/* Aviso */
#formDeclaracion .decl-warn { border-radius: 14px; padding: 1rem 1.25rem; font-size: .9rem; }

/* Persona */
#formDeclaracion .decl-persona {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .03);
    transition: box-shadow .2s, border-color .2s;
}
#formDeclaracion .decl-persona:focus-within {
    border-color: #fcd9b0;
    box-shadow: 0 8px 24px rgba(224, 123, 32, .08);
}
#formDeclaracion .decl-persona-head {
    background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
    padding: .9rem 1.5rem;
}
#formDeclaracion .decl-persona-badge { width: 1.75rem; height: 1.75rem; font-size: .78rem; }
#formDeclaracion .decl-persona-body { padding: 1.5rem; }
#formDeclaracion .decl-remove-btn { border-radius: 8px; padding: .3rem .7rem; }

/* Casillas como "chips" (control efectivo, fondos, ≥10%) */
#formDeclaracion .decl-persona-sep .d-flex > .form-check {
    margin: 0;
    padding: .55rem .9rem .55rem 2.3rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #fff;
    transition: border-color .15s, background-color .15s;
}
#formDeclaracion .decl-persona-sep .d-flex > .form-check:has(.form-check-input:checked) {
    border-color: #f4a84a;
    background: #fff7ed;
}
#formDeclaracion .decl-persona-sep .d-flex { gap: .6rem !important; }
#formDeclaracion .decl-control-panel { border-left-color: #f4a84a; }
#formDeclaracion .decl-pep-panel { background: #fffaf3; border-radius: 14px; }

/* Botón agregar persona */
#formDeclaracion .decl-add-btn { padding: .75rem 1.25rem; border-radius: 14px; width: 100%; }

/* Barra de acciones fija abajo mientras se completa el formulario */
#formDeclaracion .decl-actions {
    position: sticky;
    bottom: 1rem;
    z-index: 10;
    padding: .9rem 1.25rem !important;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid #e8edf3;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .1);
}
#formDeclaracion .decl-submit { padding: .75rem 1.75rem; }

@media (max-width: 767.98px) {
    #formDeclaracion .decl-card-header { padding: 1rem 1.25rem; }
    #formDeclaracion .decl-card .card-body { padding: 1.25rem !important; }
    #formDeclaracion .decl-persona-body { padding: 1.1rem; }
    #formDeclaracion .decl-actions { flex-direction: column; gap: .75rem; align-items: stretch !important; }
}

/* ================================================
   DECLARACIÓN — ayudas para el cliente
   [data-help] → botón (i) con popover; .decl-term → término con definición;
   details.decl-why → "¿Por qué le pedimos esto?" desplegable.
   ================================================ */
.decl-help-hint {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-top: .85rem;
    padding: .45rem .9rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #fde2c4;
    color: #7c4a16;
    font-size: .82rem;
}
.decl-help-hint > i:first-child { color: #e07b20; }

.decl-help-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.15rem;
    margin-left: .3rem;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #b6c2d1;
    font-size: .8rem;
    line-height: 1;
    vertical-align: -.1em;
    cursor: help;
    transition: color .15s, transform .15s;
}
.decl-help-btn:hover,
.decl-help-btn:focus-visible,
.decl-help-btn[aria-describedby] { color: #e07b20; transform: scale(1.15); outline: none; }
.decl-info-label .decl-help-btn { font-size: .72rem; width: 1rem; height: 1rem; }

.decl-term {
    text-decoration: underline dotted #e07b20;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    cursor: help;
    font-weight: 600;
}
.decl-term:focus-visible { outline: 2px solid #fcd9b0; border-radius: 4px; }

.decl-popover {
    --bs-popover-max-width: 320px;
    --bs-popover-border-color: #fde2c4;
    --bs-popover-border-radius: 14px;
    --bs-popover-inner-border-radius: 13px;
    --bs-popover-header-bg: #fff7ed;
    --bs-popover-header-color: #9a4d0c;
    --bs-popover-header-font-size: .85rem;
    --bs-popover-header-padding-y: .6rem;
    --bs-popover-header-padding-x: .9rem;
    --bs-popover-body-color: #334155;
    --bs-popover-body-padding-y: .7rem;
    --bs-popover-body-padding-x: .9rem;
    --bs-popover-box-shadow: 0 12px 32px rgba(15, 23, 42, .14);
    box-shadow: var(--bs-popover-box-shadow);
    font-size: .84rem;
    line-height: 1.5;
}
.decl-popover .popover-header { font-weight: 700; border-bottom-color: #fde2c4; }
.decl-popover .popover-header:empty { display: none; }

.decl-why {
    margin-bottom: 1.1rem;
    border: 1px solid #fde2c4;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffaf3 0%, #fff 100%);
    overflow: hidden;
}
.decl-why > summary {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .65rem 1rem;
    font-size: .88rem;
    font-weight: 600;
    color: #9a4d0c;
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.decl-why > summary::-webkit-details-marker { display: none; }
.decl-why > summary::after {
    content: "\f078"; /* fa-chevron-down */
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: .7rem;
    margin-left: auto;
    transition: transform .2s;
}
.decl-why[open] > summary::after { transform: rotate(180deg); }
.decl-why > summary:hover { background: #fff3e0; }
.decl-why > p { padding: 0 1rem; margin: 0 0 .75rem; font-size: .88rem; color: #475569; line-height: 1.6; }
.decl-why > p:first-of-type { padding-top: .1rem; }
.decl-why > p:last-child { margin-bottom: .9rem; }

/* ================================================
   _ClientLayout — sidebar de pasos (rediseño v2)
   ================================================ */
body.decl-shell { background: #f0f4f9; }
.decl-layout { display: flex; min-height: 100vh; }

.decl-sidebar {
    width: 16rem;
    flex-shrink: 0;
    background: #3a3a3a;
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.decl-sidebar-head {
    padding: 1.5rem 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.decl-sidebar-logo {
    width: 2rem; height: 2rem; border-radius: .6rem;
    background: #e07b20; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
}
.decl-steps { padding: 1.25rem; }
.decl-steps-label {
    font-size: .68rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: .12em; color: rgba(255,255,255,.3); margin-bottom: 1rem;
}
.decl-step { display: flex; align-items: flex-start; gap: .75rem; padding: .35rem 0; }
.decl-step-dot {
    width: 1.75rem; height: 1.75rem; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .75rem; font-weight: 700; flex-shrink: 0;
}
.decl-step.done    .decl-step-dot { background: #22c55e; color: #fff; }
.decl-step.active  .decl-step-dot { background: #e07b20; color: #fff; }
.decl-step.pending .decl-step-dot { background: rgba(255,255,255,.12); color: rgba(255,255,255,.4); }
.decl-step-name { font-size: .85rem; font-weight: 600; }
.decl-step.done    .decl-step-name { color: #86efac; }
.decl-step.active  .decl-step-name { color: #fff; }
.decl-step.pending .decl-step-name { color: rgba(255,255,255,.35); }
.decl-step-sub { font-size: .72rem; }
.decl-step.active  .decl-step-sub { color: rgba(255,255,255,.6); }
.decl-step.pending .decl-step-sub { color: rgba(255,255,255,.25); }
.decl-step.done    .decl-step-sub { color: rgba(255,255,255,.4); }
.decl-step-line { width: 1px; flex: 1; min-height: 1.2rem; margin: .25rem auto 0; }
.decl-step.done .decl-step-line { background: #22c55e; }
.decl-step:not(.done) .decl-step-line { background: rgba(255,255,255,.1); }

.decl-progress-box {
    margin: auto 1.25rem 1.5rem; padding: 1rem;
    border-radius: 12px; background: rgba(255,255,255,.06);
}
.decl-progress-box .lbl { font-size: .72rem; font-weight: 600; color: #fff; }
.decl-progress-box .pct { font-size: .72rem; font-weight: 700; color: #fff3e0; }
.decl-progress-track { height: 4px; border-radius: 4px; background: rgba(255,255,255,.1); overflow: hidden; }
.decl-progress-fill { height: 100%; border-radius: 4px; background: #f4a84a; }

.decl-main { flex: 1; min-width: 0; padding: 2.5rem 2.5rem; }
.decl-main-inner { max-width: 82rem; margin: 0 auto; }

@media (max-width: 1199.98px) {
    .decl-main { padding: 2rem 1.5rem; }
}
@media (max-width: 991.98px) {
    .decl-sidebar { display: none; }
    .decl-main { padding: 1.5rem 1rem; }
}

/* ================================================
   Cliente/Inicio — bienvenida (rediseño v2)
   ================================================ */
.decl-welcome { display: flex; justify-content: center; padding: 2rem 0; }
.decl-welcome-card {
    width: 100%;
    max-width: 32rem;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
    padding: 2.5rem 2rem;
    text-align: center;
}
.decl-welcome-logo {
    width: 4rem; height: 4rem; border-radius: 1rem;
    background: #e07b20; color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 8px 20px rgba(224, 123, 32, .3);
}
.decl-welcome-logo.is-error { background: #ef4444; box-shadow: 0 8px 20px rgba(239, 68, 68, .3); }
.decl-welcome-title { margin-top: 1.25rem; font-weight: 700; color: #1e293b; }
.decl-welcome-sub { color: #94a3b8; font-size: .9rem; }
.decl-welcome-company {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    padding: 1rem;
    margin: 1.25rem 0;
}
.decl-welcome-company .name { font-size: 1.1rem; font-weight: 700; color: #1e293b; }
.decl-welcome-company .rut { color: #64748b; font-size: .85rem; }
.decl-welcome-expiry { font-size: .8rem; color: #94a3b8; }
.decl-welcome-note {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
    border-radius: 12px;
    padding: .85rem 1rem;
    font-size: .82rem;
    line-height: 1.5;
    text-align: left;
    display: flex;
    gap: .6rem;
    margin-top: 1rem;
}
.decl-welcome-btn {
    background: #3a3a3a;
    border: none;
    color: #fff;
    font-weight: 600;
    border-radius: 12px;
    padding: .8rem 2rem;
    box-shadow: 0 8px 20px rgba(58, 58, 58, .25);
    transition: background .15s;
}
.decl-welcome-btn:hover { background: #2b2b2b; color: #fff; }

/* ---- Declaración: selector de modo (automática / manual) ---- */
.decl-modo-intro { font-weight: 600; color: #1e293b; margin-bottom: .75rem; }
.decl-modo-card {
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #eef2f7;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
    padding: 1.5rem;
    transition: border-color .15s, box-shadow .15s;
}
.decl-modo-card:not(.is-disabled):hover { border-color: #e07b20; box-shadow: 0 6px 18px rgba(224, 123, 32, .15); }
.decl-modo-card h5 { font-weight: 700; color: #1e293b; margin: .75rem 0 .4rem; }
.decl-modo-card p { color: #64748b; font-size: .9rem; flex-grow: 1; }
.decl-modo-card.is-disabled { background: #f8fafc; }
.decl-modo-card.is-disabled .decl-modo-icon { background: #e2e8f0; color: #94a3b8; }
.decl-modo-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
    background: rgba(224, 123, 32, .12);
    color: #e07b20;
    font-size: 1.3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.decl-modo-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: #fef3c7;
    color: #92400e;
    font-size: .72rem;
    font-weight: 600;
    border-radius: 999px;
    padding: .2rem .65rem;
}
.decl-modo-btn {
    align-self: flex-start;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid #cbd5e1;
    color: #475569;
    background: #fff;
}
.decl-modo-btn.is-primary { background: #3a3a3a; border-color: #3a3a3a; color: #fff; }
.decl-modo-btn.is-primary:hover { background: #2b2b2b; color: #fff; }

/* ---- Tema UAF: foco y checkboxes en naranja (solo en el formulario) ---- */
#formDeclaracion .form-control:focus,
#formDeclaracion .form-select:focus {
    border-color: #e07b20;
    box-shadow: 0 0 0 .2rem rgba(224, 123, 32, .18);
}
#formDeclaracion .form-check-input:checked {
    background-color: #e07b20;
    border-color: #e07b20;
}
#formDeclaracion .form-check-input:focus {
    border-color: #e07b20;
    box-shadow: 0 0 0 .2rem rgba(224, 123, 32, .18);
}

/* ================================================
   PANEL INTERNO (vendedor/cumplimiento/admin) — rediseño v2 (azul/navy)
   ================================================ */
:root {
    --uaf-navy: #1a2b4a;
    --uaf-blue: #1565C0;
    --uaf-blue2: #1976D2;
    --uaf-light: #e8f0fe;
    --uaf-bg: #f0f4f9;
}
body.uaf-shell { background: var(--uaf-bg); }

/* ── Sidebar ── */
.uaf-sidebar {
    width: 240px; background: var(--uaf-navy);
    display: flex; flex-direction: column;
    position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; overflow-y: auto;
}
.uaf-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 20px 20px 18px; border-bottom: 1px solid rgba(255,255,255,.08);
    text-decoration: none;
}
.uaf-brand-icon {
    width: 34px; height: 34px; background: var(--uaf-blue); border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 15px; flex-shrink: 0;
}
.uaf-brand-name { color: #fff; font-weight: 700; font-size: .88rem; line-height: 1.2; }
.uaf-brand-sub  { color: rgba(255,255,255,.4); font-size: .66rem; }

.uaf-nav { padding: 10px; flex: 1; }
.uaf-section-lbl {
    font-size: .63rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .08em; color: rgba(255,255,255,.28); padding: 14px 10px 5px;
}
.uaf-nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 8px;
    color: rgba(255,255,255,.6); font-size: .8rem; font-weight: 500;
    text-decoration: none; transition: background .15s, color .15s; margin-bottom: 2px;
}
.uaf-nav-link i { width: 16px; text-align: center; font-size: .82rem; }
.uaf-nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.uaf-nav-link.active { background: rgba(21,101,192,.35); color: #fff; font-weight: 600; }
.uaf-nav-link.active i { color: #60a5fa; }

.uaf-sidebar-footer { padding: 14px 14px 18px; border-top: 1px solid rgba(255,255,255,.08); }
.uaf-user {
    display: flex; align-items: center; gap: 10px;
    padding: 8px; border-radius: 8px; cursor: pointer; transition: background .15s;
    text-decoration: none;
}
.uaf-user:hover { background: rgba(255,255,255,.07); }
.uaf-avatar {
    width: 32px; height: 32px; background: var(--uaf-blue); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: .7rem; font-weight: 700; flex-shrink: 0;
}
.uaf-user-name { color: rgba(255,255,255,.85); font-size: .77rem; font-weight: 500; }

/* ── Layout ── */
.uaf-main { margin-left: 240px; min-height: 100vh; display: flex; flex-direction: column; }
.uaf-topbar {
    background: #fff; border-bottom: 1px solid #e8edf3;
    padding: 0 28px; height: 52px; display: flex; align-items: center;
    position: sticky; top: 0; z-index: 50;
}
.uaf-topbar .uaf-crumb { margin: 0; font-size: .78rem; color: #64748b; }
.uaf-body { padding: 28px; flex: 1; }

/* ── Page header ── */
.uaf-page-title {
    font-size: 1.2rem; font-weight: 700; color: #0f172a;
    display: flex; align-items: center; gap: 10px; margin: 0;
}
.uaf-page-title i { color: var(--uaf-blue); font-size: 1rem; }

/* ── Buttons ── */
.btn-uaf-primary {
    background: var(--uaf-navy); border: none; color: #fff;
    font-weight: 600; font-size: .8rem; padding: 9px 18px; border-radius: 9px;
    display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none; cursor: pointer;
    box-shadow: 0 2px 8px rgba(26,43,74,.2); transition: background .15s, box-shadow .15s;
}
.btn-uaf-primary:hover { background: #243859; color: #fff; box-shadow: 0 4px 16px rgba(26,43,74,.28); }
.btn-uaf-ghost {
    background: #f1f5f9; color: #475569; border: 1.5px solid #e2e8f0;
    font-size: .8rem; font-weight: 500; padding: 9px 16px; border-radius: 9px;
    cursor: pointer; transition: background .15s; display: inline-flex; align-items: center; gap: 7px;
    text-decoration: none;
}
.btn-uaf-ghost:hover { background: #e2e8f0; color: #334155; }

/* ── Stat chips ── */
.stat-chip {
    background: #fff; border: 1px solid #e8edf3; border-radius: 12px;
    padding: 12px 16px; display: flex; align-items: center; gap: 10px; height: 100%;
}
.stat-icon {
    width: 34px; height: 34px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0;
}
.stat-num { font-size: 1.2rem; font-weight: 700; color: #0f172a; line-height: 1; }
.stat-lbl { font-size: .68rem; color: #64748b; margin-top: 1px; }

/* ── Filter card ── */
.filter-card {
    background: #fff; border: 1px solid #e8edf3; border-radius: 14px;
    padding: 16px 20px;
}
.filter-card .form-control, .filter-card .form-select {
    border-radius: 9px; border: 1.5px solid #e2e8f0; font-size: .8rem;
    height: 38px; color: #334155; background: #f8fafc;
    transition: border-color .15s, box-shadow .15s;
}
.filter-card .form-control:focus, .filter-card .form-select:focus {
    border-color: var(--uaf-blue); box-shadow: 0 0 0 3px rgba(21,101,192,.1);
    background: #fff; outline: none;
}

/* ── Table ── */
.table-card { background: #fff; border: 1px solid #e8edf3; border-radius: 14px; overflow: hidden; }
.table-uaf { margin: 0; width: 100%; border-collapse: collapse; }
.table-uaf thead tr { background: #f8fafc; border-bottom: 1.5px solid #e8edf3; }
.table-uaf thead th {
    font-size: .7rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .06em; color: #64748b; padding: 13px 16px; white-space: nowrap; border: none;
}
.table-uaf tbody tr { border-bottom: 1px solid #f1f5f9; transition: background .12s; }
.table-uaf tbody tr:last-child { border-bottom: none; }
.table-uaf tbody tr:hover { background: #f8fafc; }
.table-uaf tbody tr.row-overdue { background: #fff8f8; }
.table-uaf td { padding: 13px 16px; font-size: .8rem; color: #334155; vertical-align: middle; border: none; }
.folio-link { font-weight: 600; color: var(--uaf-blue); text-decoration: none; font-family: Consolas, monospace; font-size: .78rem; }
.folio-link:hover { text-decoration: underline; }
.rut-text { font-family: Consolas, monospace; font-size: .78rem; color: #475569; }
.razon-social { font-weight: 500; color: #1e293b; }
.date-text { font-size: .76rem; color: #64748b; }
.date-overdue { font-size: .76rem; color: #dc2626; font-weight: 600; }

/* ── Badges (estado) ── */
.badge-uaf {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 99px;
    font-size: .7rem; font-weight: 600; white-space: nowrap;
}
.badge-uaf::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-borrador  { background: #f1f5f9; color: #64748b; }
.badge-enviada   { background: #d1fae5; color: #065f46; }
.badge-abierta   { background: #dbeafe; color: #1d4ed8; }
.badge-revision  { background: #fef9c3; color: #854d0e; }
.badge-observada { background: #ffedd5; color: #9a3412; }
.badge-aprobada  { background: #dcfce7; color: #14532d; }
.badge-rechazada { background: #fee2e2; color: #991b1b; }

/* ── Action buttons ── */
.btn-action {
    width: 30px; height: 30px; border-radius: 7px;
    border: 1.5px solid #e2e8f0; background: #fff; color: #64748b;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: .72rem; cursor: pointer; transition: all .15s; text-decoration: none;
}
.btn-action:hover { border-color: var(--uaf-blue); color: var(--uaf-blue); background: var(--uaf-light); }
.btn-action.send:hover { border-color: #0891b2; color: #0891b2; background: #e0f2fe; }
.btn-action.doc:hover  { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }

/* ── Form cards ── */
.form-card { background: #fff; border: 1px solid #e8edf3; border-radius: 14px; overflow: hidden; margin-bottom: 16px; }
.form-card-header { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid #f1f5f9; }
.form-card-icon {
    width: 30px; height: 30px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center; font-size: .82rem; flex-shrink: 0;
    background: var(--uaf-light); color: var(--uaf-blue);
}
.form-card-title { font-size: .85rem; font-weight: 700; color: #1e293b; }
.form-card-body { padding: 20px; }

/* ── Ayudas al pasar el mouse (tooltips) ── */
.section-help { font-size: .8rem; color: #94a3b8; cursor: help; }
.section-help:hover { color: var(--uaf-blue); }
.uaf-field > label .field-help { font-size: .62rem; color: #cbd5e1; margin-left: 2px; }
.uaf-field:hover > label .field-help { color: var(--uaf-blue); }
.tooltip-inner { max-width: 300px; text-align: left; font-size: .76rem; line-height: 1.4; padding: 8px 10px; }

/* ── /Vendedor/Crear: tipo de solicitud en tarjetas ── */
.tipo-sol-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.tipo-sol-label { font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #94a3b8; }
.tipo-sol-sub { font-size: .78rem; color: #64748b; }
.tipo-sol-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 767.98px) { .tipo-sol-grid { grid-template-columns: 1fr; } }

.tipo-sol-card {
    position: relative; display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 40px 14px 14px; margin: 0;
    border: 1.5px solid #e2e8f0; border-radius: 12px; background: #f8fafc;
    cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s, opacity .15s;
}
.tipo-sol-card:hover { border-color: #bfd3ea; background: #fff; }
.tipo-sol-radio { position: absolute; opacity: 0; pointer-events: none; }
.tipo-sol-icon {
    width: 34px; height: 34px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; font-size: .85rem;
    background: #e2e8f0; color: #64748b; transition: background .15s, color .15s;
}
.tipo-sol-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tipo-sol-title { font-size: .86rem; font-weight: 700; color: #1e293b; }
.tipo-sol-desc { font-size: .76rem; color: #64748b; line-height: 1.45; }
.tipo-sol-ej { font-size: .72rem; color: #94a3b8; font-style: italic; }
.tipo-sol-ej i, .tipo-sol-lock i { margin-right: 5px; }
.tipo-sol-lock { display: none; font-size: .72rem; font-weight: 600; color: #b45309; }
.tipo-sol-check {
    position: absolute; top: 12px; right: 12px; width: 20px; height: 20px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: .6rem;
    border: 1.5px solid #cbd5e1; color: transparent; background: #fff; transition: all .15s;
}

/* Seleccionada */
.tipo-sol-card:has(.tipo-sol-radio:checked) {
    border-color: var(--uaf-blue); background: #fff; box-shadow: 0 0 0 3px rgba(21,101,192,.1);
}
.tipo-sol-card:has(.tipo-sol-radio:checked) .tipo-sol-icon { background: var(--uaf-blue); color: #fff; }
.tipo-sol-card:has(.tipo-sol-radio:checked) .tipo-sol-check { background: var(--uaf-blue); border-color: var(--uaf-blue); color: #fff; }
.tipo-sol-card:has(.tipo-sol-radio:focus-visible) { outline: 2px solid var(--uaf-blue); outline-offset: 2px; }

/* Bloqueada (la empresa ya tiene solicitud previa) */
.tipo-sol-card.is-locked { cursor: not-allowed; opacity: .55; background: #f1f5f9; border-style: dashed; }
.tipo-sol-card.is-locked:hover { border-color: #e2e8f0; background: #f1f5f9; }
.tipo-sol-card.is-locked .tipo-sol-ej { display: none; }
.tipo-sol-card.is-locked .tipo-sol-lock { display: block; }
.tipo-sol-card.is-locked .tipo-sol-check { display: none; }

/* Aviso de solicitudes previas */
.previas-alert {
    margin-bottom: 12px; padding: 12px 14px; border-radius: 12px;
    background: #fffbeb; border: 1px solid #fde68a; color: #78350f;
}
.previas-alert-head { display: flex; gap: 10px; align-items: flex-start; font-size: .82rem; }
.previas-alert-head > i { margin-top: 3px; color: #d97706; }
.previas-alert-sub { font-size: .76rem; color: #92400e; margin-top: 2px; }
.previas-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.previas-list li {
    display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
    padding: 6px 10px; border-radius: 8px; background: #fff; border: 1px solid #fef3c7; font-size: .76rem; color: #475569;
}
.previas-list li strong { color: #1e293b; }

/* ── Floating inputs ── */
.uaf-field { position: relative; }
.uaf-field .form-control, .uaf-field .form-select {
    height: 52px; padding: 22px 12px 6px;
    border-radius: 10px; border: 1.5px solid #e2e8f0;
    font-size: .84rem; color: #1e293b; background: #f8fafc;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.uaf-field .form-control:focus, .uaf-field .form-select:focus {
    border-color: var(--uaf-blue); box-shadow: 0 0 0 3px rgba(21,101,192,.1);
    background: #fff; outline: none;
}
.uaf-field > label {
    position: absolute; top: 7px; left: 13px;
    font-size: .62rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: .05em; color: #94a3b8; pointer-events: none; margin: 0;
}
.uaf-field .form-control::placeholder { color: #94a3b8; font-size: .82rem; }
.uaf-field textarea.form-control { height: auto; padding: 24px 12px 10px; }
.uaf-field .input-btn {
    position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
    background: var(--uaf-light); color: var(--uaf-blue);
    border: none; border-radius: 6px; width: 30px; height: 30px;
    display: flex; align-items: center; justify-content: center; font-size: .78rem; cursor: pointer;
}

/* ── Info box (¿Cómo funciona?) ── */
.info-box { background: #fff; border: 1px solid #e8edf3; border-radius: 14px; padding: 20px; }
.info-box-title { font-size: .82rem; font-weight: 700; color: var(--uaf-blue); display: flex; align-items: center; gap: 7px; margin-bottom: 12px; }
.info-steps { list-style: none; padding: 0; margin: 0; }
.info-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; color: #475569; margin-bottom: 10px; line-height: 1.45; }
.info-steps li .step-num {
    width: 20px; height: 20px; border-radius: 50%; background: var(--uaf-blue);
    color: #fff; font-size: .62rem; font-weight: 700; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center; margin-top: 1px;
}
.info-note { background: #fffbeb; border: 1px solid #fde68a; border-radius: 9px; padding: 10px 14px; font-size: .76rem; color: #92400e; margin-top: 12px; display: flex; gap: 8px; align-items: flex-start; }

/* ── Responsive ── */
@media (max-width: 991.98px) {
    .uaf-sidebar { transform: translateX(-100%); transition: transform .2s; }
    .uaf-sidebar.show { transform: translateX(0); }
    .uaf-main { margin-left: 0; }
}

/* ================================================
   LOGIN — pantalla completa dividida (split-screen)
   ================================================ */
.login-wrap { min-height: 100vh; display: flex; font-family: 'Segoe UI', system-ui, -apple-system, sans-serif; }

/* Panel izquierdo (marca) */
.login-left {
    width: 52%; position: relative; overflow: hidden; color: #fff; padding: 48px;
    background: linear-gradient(155deg, #0b2042 0%, #0f2d5c 45%, #163d7a 100%);
    display: flex; flex-direction: column; justify-content: space-between;
}
.login-left-svg { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .06; z-index: 0; }
.login-left > *:not(.login-left-svg) { position: relative; z-index: 1; }
.login-brand { display: flex; align-items: center; gap: 12px; }
.login-brand-ic {
    width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); font-size: 1.1rem;
}
.login-brand-name { font-weight: 600; font-size: 1.1rem; letter-spacing: .02em; }
.login-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px;
    font-size: .68rem; font-weight: 500; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 28px;
    background: rgba(255,255,255,.1); color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.15);
}
.login-badge .dot { width: 6px; height: 6px; border-radius: 50%; background: #34d399; display: inline-block; }
.login-h1 { font-size: 2.3rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; margin: 0 0 18px; }
.login-h1 span { color: #93c5fd; }
.login-lead { font-size: 1rem; line-height: 1.6; max-width: 24rem; color: rgba(255,255,255,.55); margin: 0; }
.login-feats { margin-top: 36px; }
.login-feat { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.login-feat-ic {
    width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    background: rgba(59,130,246,.3); border: 1px solid rgba(59,130,246,.5); color: #93c5fd; font-size: .58rem; flex-shrink: 0;
}
.login-feat span { font-size: .85rem; color: rgba(255,255,255,.5); }
.login-foot { font-size: .72rem; color: rgba(255,255,255,.3); }
.login-foot-line { height: 1px; background: rgba(255,255,255,.08); margin-bottom: 20px; }

/* Panel derecho (formulario) */
.login-right { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; background: #fff; }
.login-form { width: 100%; max-width: 400px; }
.login-title { font-size: 1.6rem; font-weight: 700; letter-spacing: -.02em; color: #0d1b2e; margin: 0 0 6px; }
.login-sub { font-size: .9rem; color: #5a6a82; margin: 0 0 32px; }
.login-label { display: block; font-size: .85rem; font-weight: 500; color: #0d1b2e; margin-bottom: 8px; }
.login-field { position: relative; }
.login-field .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .9rem; }
.login-field .form-control {
    width: 100%; padding: 12px 14px 12px 40px; font-size: .9rem; border-radius: 10px;
    background: #f5f7fb; border: 1.5px solid rgba(15,45,92,.14); color: #0d1b2e;
}
.login-field .form-control:focus { border-color: #1849a9; box-shadow: 0 0 0 3px rgba(24,73,169,.1); background: #fff; outline: none; }
.login-field .eye {
    position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: #5a6a82; cursor: pointer; font-size: .9rem; padding: 4px;
}
.login-check { display: flex; align-items: center; gap: 10px; }
.login-check .form-check-input { width: 18px; height: 18px; margin: 0; cursor: pointer; }
.login-check .form-check-input:checked { background-color: #0f2d5c; border-color: #0f2d5c; }
.login-check label { font-size: .88rem; color: #5a6a82; cursor: pointer; margin: 0; }
.login-btn {
    width: 100%; padding: 13px; border: none; border-radius: 10px; color: #fff; font-weight: 600; font-size: .9rem;
    background: linear-gradient(135deg, #0f2d5c 0%, #1849a9 100%); box-shadow: 0 4px 16px rgba(15,45,92,.35);
    cursor: pointer; transition: transform .15s, box-shadow .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(15,45,92,.45); color: #fff; }
.login-notice {
    margin-top: 28px; display: flex; gap: 10px; align-items: flex-start; padding: 14px; border-radius: 10px;
    background: rgba(15,45,92,.05); border: 1px solid rgba(15,45,92,.08); color: #5a6a82; font-size: .78rem; line-height: 1.5;
}
.login-mobile-brand { display: none; align-items: center; gap: 12px; margin-bottom: 32px; }
.login-mobile-brand .ic { width: 36px; height: 36px; border-radius: 10px; background: #0f2d5c; display: flex; align-items: center; justify-content: center; color: #fff; }
.login-mobile-brand .name { font-weight: 600; color: #0d1b2e; }

@media (max-width: 991.98px) {
    .login-left { display: none; }
    .login-mobile-brand { display: flex; }
}

/* ── Gestión RegCheq (compartido por Regcheq/Gestion y Regcheq/Detalle) ── */
.gs-caso { display: inline-block; font-size: .72rem; font-weight: 600; border-radius: 999px; padding: .2rem .6rem; white-space: nowrap; }
.gs-caso-pep { background: var(--bs-danger-bg-subtle); color: var(--bs-danger-text-emphasis); }
.gs-caso-dof { background: var(--bs-warning-bg-subtle); color: var(--bs-warning-text-emphasis); }
.gs-caso-ambos { background: #ede2fe; color: #5a2ca0; }
.gs-doc { display: inline-flex; align-items: center; gap: .25rem; font-size: .72rem; border-radius: .35rem; padding: .1rem .4rem; border: 1px solid var(--bs-border-color); margin-right: .2rem; white-space: nowrap; }
.gs-doc.pend { border-color: var(--bs-danger-border-subtle); color: var(--bs-danger-text-emphasis); background: var(--bs-danger-bg-subtle); }
.gs-doc.ok { border-color: var(--bs-success-border-subtle); color: var(--bs-success-text-emphasis); background: var(--bs-success-bg-subtle); }
.gs-avatar { width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 700; background: var(--bs-primary-bg-subtle); color: var(--bs-primary-text-emphasis); flex-shrink: 0; }
.gs-avatar.yo { background: var(--bs-primary); color: #fff; }
.gs-timeline { list-style: none; margin: 0; padding: 0 0 0 1.1rem; border-left: 2px solid var(--bs-border-color); max-height: 340px; overflow: auto; }
.gs-timeline li { position: relative; padding: 0 0 .9rem .6rem; }
.gs-timeline li::before { content: ""; position: absolute; left: -1.48rem; top: .3rem; width: 11px; height: 11px; border-radius: 50%; background: var(--bs-primary); border: 2px solid var(--gs-tl-fondo, var(--bs-body-bg)); }
.gs-timeline li.sistema::before { background: var(--bs-secondary-color); }
.gs-timeline .gs-meta { font-size: .72rem; color: var(--bs-secondary-color); }
.gs-timeline .gs-texto { font-size: .875rem; white-space: pre-wrap; word-break: break-word; }
.gs-timeline li.sistema .gs-texto { font-style: italic; color: var(--bs-secondary-color); }
/* Encabezados ordenables (Regcheq/Index y Regcheq/Gestion) */
.gs-orden { color: inherit; text-decoration: none; white-space: nowrap; }
.gs-orden i { font-size: .75em; opacity: .35; }
.gs-orden:hover i, .gs-orden.activa i { opacity: 1; }
.gs-orden.activa { color: var(--bs-primary); }