/* GDH · Evaluaciones — estilos del producto Path B SSR (2026-05-20 v2 brand).
 *
 * Paleta extraída del proyecto original (/new-projects/new_app_2_ops):
 *   Manual de Marca Natu Peru Seeds — naranja #ef9a49 + marrón #70614e.
 *   Tipografía: Poppins (cuerpo) + Helvetica Neue Condensed Black (display).
 *
 * Reusa custom.css del monolito para layout sidebar/wrapper. Agrega encima:
 *   1. @font-face Poppins + Helvetica Neue Condensed Black
 *   2. Paleta de marca (CSS variables --brand-* + --app-*)
 *   3. Override de Bootstrap (--bs-primary, --bs-body-bg, etc.)
 *   4. Sidebar accents propios (sub-headers crema sobre marrón oscuro)
 *   5. Role accents (5 tipos de relación)
 *   6. Autosave indicator (chip Guardando / Guardado / Error)
 *   7. Onboarding wizard (blobs naranja/cream + dot progress)
 *   8. Cards GDH (hover, role-left-border)
 *   9. Toast + Confirm dialog
 *  10. Dark mode (.app-dark + data-bs-theme=dark)
 *  11. Transiciones fade entre páginas
 *  12. Variantes Likert (sección final, Fase C)
 */

/* ── 1. Tipografía de marca ──────────────────────────────────────────── */
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 300; font-display: swap; src: url('/static/fonts/gdh/Poppins-Light.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 400; font-display: swap; src: url('/static/fonts/gdh/Poppins-Regular.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 500; font-display: swap; src: url('/static/fonts/gdh/Poppins-Medium.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 600; font-display: swap; src: url('/static/fonts/gdh/Poppins-SemiBold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 700; font-display: swap; src: url('/static/fonts/gdh/Poppins-Bold.ttf') format('truetype'); }
@font-face { font-family: 'Poppins'; font-style: normal; font-weight: 900; font-display: swap; src: url('/static/fonts/gdh/Poppins-Black.ttf') format('truetype'); }
@font-face { font-family: 'Helvetica Neue Condensed'; font-style: normal; font-weight: 900; font-display: swap; src: url('/static/fonts/gdh/HelveticaNeueCondensedBlack.ttf') format('truetype'); }

/* ── 2. Paleta de marca (CSS variables) ──────────────────────────────── */
:root {
    --brand-orange:       #ef9a49;
    --brand-orange-deep:  #bf7b3a;
    --brand-orange-soft:  #f2ae6d;
    --brand-orange-pale:  #f7cda4;
    --brand-orange-cream: #fcebdb;
    --brand-orange-alt:   #ec8d34;
    --brand-brown:        #70614e;
    --brand-brown-deep:   #5a4e3e;
    --brand-brown-dark:   #383127;
    --brand-brown-soft:   #8d8171;
    --brand-brown-pale:   #b8b0a7;
    --brand-cream:        #f2e2d3;
    --brand-olive:        #a7b239;
    --brand-forest:       #0e2207;
    --brand-yellow:       #fcc30d;

    /* Aliases app */
    --app-bg:             #f7f3ee;
    --app-surface:        #ffffff;
    --app-border:         #e7ddd2;
    --app-text:           #383127;
    --app-text-muted:     #8d8171;
    --app-sidebar-bg:     #383127;
    --app-sidebar-text:   #d6cbbb;
    --app-sidebar-active: #ffffff;
    --app-accent:         var(--brand-orange);
}

/* Override Bootstrap colors para que TODO el sistema use la paleta */
:root {
    --bs-primary:         #ef9a49;
    --bs-primary-rgb:     239, 154, 73;
    --bs-primary-text-emphasis: #5a3a1a;
    --bs-primary-bg-subtle:     #fcebdb;
    --bs-primary-border-subtle: #f7cda4;
    --bs-body-bg:         #f7f3ee;
    --bs-body-color:      #383127;
    --bs-body-font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-link-color:      #bf7b3a;
    --bs-link-hover-color: #5a3a1a;
}

body {
    font-family: 'Poppins', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--app-bg);
    color: var(--app-text);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Tipografía display — Helvetica Neue Condensed Black para titulares */
.font-display {
    font-family: 'Helvetica Neue Condensed', 'Helvetica Neue', 'Arial Narrow', sans-serif;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
}

/* Headings reciben el peso Poppins-SemiBold por default */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', ui-sans-serif, system-ui, sans-serif;
    font-weight: 600;
    color: var(--app-text);
}

/* Layout principal (override Bootstrap bg de page-content) */
#page-content-wrapper { background-color: var(--app-bg) !important; }
.main-content { padding: 1.75rem; }

/* ── 3. Sidebar de marca (override del custom.css del monolito) ──────── */
.sidebar {
    background: var(--app-sidebar-bg) !important;
    color: var(--app-sidebar-text);
    box-shadow: 0 0 0 1px rgba(255,255,255,.03), inset -1px 0 0 rgba(0,0,0,.2);
}
.sidebar .sidebar-brand,
.sidebar .nav-link {
    color: var(--app-sidebar-text) !important;
    font-weight: 500;
}
.sidebar .nav-link:hover {
    background: rgba(239, 154, 73, .08);
    color: var(--brand-orange-pale) !important;
}
.sidebar .nav-link.gdh-active {
    background: rgba(239, 154, 73, .18) !important;
    color: var(--app-sidebar-active) !important;
    border-left: 3px solid var(--brand-orange);
    padding-left: calc(1rem - 3px);
}
/* En modo colapsado, neutralizamos el border-left y padding-left del active para
   que los íconos del activo e inactivos queden todos centrados sin desfase, y
   agregamos una barrita vertical absoluta como indicador (estilo Vue original). */
#wrapper.sidebar-collapsed .sidebar .nav-link.gdh-active {
    border-left: none;
    padding-left: 0;
    padding-right: 0;
    position: relative;
}
#wrapper.sidebar-collapsed .sidebar .nav-link.gdh-active::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 3px;
    background: var(--brand-orange);
    border-radius: 0 3px 3px 0;
}
.sidebar-header { border-bottom-color: rgba(255, 255, 255, .06) !important; }
.sidebar .text-info { color: var(--brand-orange-pale) !important; }

/* Sub-headers del sidebar (Administración / Configuración / Reportes) */
.gdh-sb-section {
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: var(--brand-orange-soft);
    font-weight: 700;
    padding: .85rem .25rem .35rem;
    display: block;
    margin-top: .35rem;
    border-top: 1px solid rgba(255, 255, 255, .06);
}
#wrapper.sidebar-collapsed .gdh-sb-section { display: none; }

/* Logo del sidebar */
.gdh-sidebar-logo {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);  /* logo SVG en blanco sobre marrón */
}

/* ── 4. Navbar override (más limpio + acento naranja) ────────────────── */
nav.navbar {
    background: var(--app-surface) !important;
    border-bottom: 1px solid var(--app-border) !important;
    box-shadow: 0 1px 0 rgba(15, 23, 42, .03) !important;
}
nav.navbar .badge.bg-info-subtle {
    background: var(--brand-orange-cream) !important;
    color: var(--brand-brown-deep) !important;
}
nav.navbar .badge.bg-light {
    background: var(--brand-cream) !important;
    color: var(--brand-brown-deep) !important;
}
nav.navbar .dropdown-toggle { color: var(--app-text) !important; }
nav.navbar .bi-tag-fill { color: var(--brand-orange) !important; }

/* ── 5. Role accents — 5 tipos de relación ───────────────────────────── */
.role-indigo  { --gdh-role: #6366f1; --gdh-role-bg: #eef2ff; --gdh-role-text: #3730a3; }
.role-emerald { --gdh-role: #10b981; --gdh-role-bg: #d1fae5; --gdh-role-text: #065f46; }
.role-fuchsia { --gdh-role: #c026d3; --gdh-role-bg: #fae8ff; --gdh-role-text: #86198f; }
.role-amber   { --gdh-role: var(--brand-orange); --gdh-role-bg: var(--brand-orange-cream); --gdh-role-text: var(--brand-orange-deep); }
.role-sky     { --gdh-role: #0284c7; --gdh-role-bg: #e0f2fe; --gdh-role-text: #075985; }
.role-slate   { --gdh-role: var(--brand-brown); --gdh-role-bg: var(--brand-cream); --gdh-role-text: var(--brand-brown-dark); }

.role-accent-bar { border-left: 3px solid var(--gdh-role, #6c757d); padding-left: .75rem; }
.role-accent-badge {
    background: var(--gdh-role-bg, #f1f5f9);
    color: var(--gdh-role-text, #334155);
    border: 1px solid color-mix(in srgb, var(--gdh-role) 22%, transparent);
    padding: .2rem .55rem;
    border-radius: .35rem;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* ── 6. Autosave indicator ───────────────────────────────────────────── */
.autosave-indicator {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .15rem .55rem;
    border-radius: 1rem;
    font-size: .7rem;
    font-weight: 500;
    color: var(--app-text-muted);
    background: var(--brand-cream);
    border: 1px solid var(--app-border);
    transition: all .2s;
    line-height: 1;
}
.autosave-indicator.saving { color: #0c4d77; background: #d6f0ff; border-color: #b6e0ff; }
.autosave-indicator.saved  { color: #1d6f2c; background: #d6efce; border-color: #a8d99a; }
.autosave-indicator.error  { color: #8c2d2d; background: #f8d7da; border-color: #f5c2c7; }
.autosave-indicator .spinner-border-sm { width: .7rem; height: .7rem; border-width: 1.5px; }

/* ── 7. Onboarding wizard (port 1:1 OnboardingView.vue / Fase G) ─────── */
.gdh-onboarding-body { margin: 0; height: 100vh; overflow: hidden; }
.font-display { font-family: 'Helvetica Neue Condensed', 'Poppins', sans-serif; letter-spacing: -0.01em; }

.onboarding-bg {
    position: relative;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(at 20% 30%, rgba(239, 154, 73, 0.10), transparent 60%),
        radial-gradient(at 80% 70%, rgba(112, 97, 78, 0.10), transparent 60%),
        var(--app-bg);
    font-family: 'Poppins', sans-serif;
}
.blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
    opacity: 0.35;
    animation: blob-float 22s ease-in-out infinite;
    pointer-events: none;
}
.blob-1 {
    width: 460px; height: 460px; top: -160px; left: -120px;
    background: radial-gradient(circle, var(--brand-orange), transparent 70%);
}
.blob-2 {
    width: 420px; height: 420px; bottom: -160px; right: -120px;
    background: radial-gradient(circle, var(--brand-brown), transparent 70%);
    animation-delay: -10s;
}
@keyframes blob-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.07); }
}

.onboarding-shell {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
}

/* Progress dots */
.onboarding-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding-top: 2rem;
}
.brand-dot {
    display: inline-block;
    height: 6px;
    width: 24px;
    border-radius: 9999px;
    background: rgba(0, 0, 0, 0.10);
    transition: all 500ms ease;
}
.brand-dot-active {
    width: 40px;
    background: var(--brand-orange);
    box-shadow: 0 0 0 4px rgba(239, 154, 73, 0.12);
}
.brand-dot-done {
    background: var(--brand-orange-soft);
}

/* Step content area (flex grow, centered) */
.onboarding-content {
    flex: 1;
    display: grid;
    place-items: center;
    padding: 0 1.5rem;
    overflow-y: auto;
}
.onboarding-content-inner {
    width: 100%;
    max-width: 42rem;
}
.step-section { display: flex; flex-direction: column; align-items: center; gap: 1.5rem; }
.step-section .ready-card,
.step-section .ready-tip,
.step-section .welcome-line { margin-top: 0; }

/* Slide transitions (direction-aware) */
.step-forward .step-section { animation: slide-forward 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }
.step-backward .step-section { animation: slide-backward 380ms cubic-bezier(0.22, 1, 0.36, 1) both; }
@keyframes slide-forward {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes slide-backward {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Logo wrap */
.logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    width: 120px;
    padding: 12px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 16px 40px -16px rgba(15, 23, 42, 0.14);
    animation: logo-in 600ms ease-out both;
}
.logo-img {
    display: block;
    height: 100%;
    width: 100%;
    padding-left: 8px;
    padding-bottom: 7px;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center center;
}
@keyframes logo-in {
    0% { opacity: 0; transform: translateY(6px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Banner mark decorativo */
.banner-mark {
    display: block;
    height: 140px;
    width: auto;
    background: transparent;
    animation: fade-up 600ms cubic-bezier(0.22, 1, 0.36, 1) both;
    animation-delay: 120ms;
}

/* Step typography */
.step-eyebrow {
    margin: 0;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    opacity: 0.6;
    color: var(--brand-brown-dark);
}
.step-title {
    margin: 0;
    font-size: 3rem;
    line-height: 1.1;
    font-weight: 900;
    color: var(--brand-brown-dark);
}
.step-title-md {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.15;
    font-weight: 900;
    color: var(--brand-brown-dark);
}
.brand-heading { color: var(--brand-brown-dark); }
.step-subtitle {
    margin: 0;
    max-width: 32rem;
    font-size: 1rem;
    line-height: 1.55;
    opacity: 0.72;
    color: var(--brand-brown-dark);
}
.step-periodo-dates {
    margin-top: 0.75rem;
    font-size: 0.875rem;
    opacity: 0.7;
    font-variant-numeric: tabular-nums;
    color: var(--brand-brown-dark);
}
.step-periodo-dates .arrow-sep { opacity: 0.4; margin: 0 0.5rem; }

/* Welcome line (italic + bold) */
.welcome-line {
    max-width: 36rem;
    margin: 0 auto;
    padding-block: 14px;
    font-size: 1rem;
    font-weight: 700;
    font-style: italic;
    line-height: 1.6;
    color: var(--brand-brown-dark);
}
.welcome-emphasis {
    color: var(--brand-orange-deep);
    font-weight: 800;
    font-style: italic;
}

/* Ready-card con emoji */
.ready-card {
    position: relative;
    max-width: 36rem;
    padding: 26px 28px 26px 78px;
    text-align: left;
    border-radius: 18px;
    background: linear-gradient(135deg, #ffffff 0%, var(--brand-orange-cream) 100%);
    border: 1px solid rgba(239, 154, 73, 0.22);
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 18px 38px -22px rgba(239, 154, 73, 0.55);
}
.ready-card-emoji {
    position: absolute;
    left: 18px;
    top: 22px;
    display: grid;
    place-items: center;
    height: 46px;
    width: 46px;
    font-size: 26px;
    line-height: 1;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-deep) 100%);
    box-shadow: 0 6px 18px -6px rgba(239, 154, 73, 0.6);
}
.ready-card-text {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--brand-brown-dark);
}
.ready-card-text strong { color: var(--brand-orange-deep); font-weight: 700; }

/* Tip secundario con bookmark */
.ready-tip {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 36rem;
    padding: 10px 16px;
    font-size: 0.875rem;
    border-radius: 12px;
    color: var(--brand-brown-dark);
    background: rgba(112, 97, 78, 0.06);
    border: 1px dashed rgba(112, 97, 78, 0.25);
}
.ready-tip-icon { font-size: 14px; color: var(--brand-orange-deep); }

/* Fade-up con --delay opcional */
.fade-up {
    opacity: 0;
    animation: fade-up 600ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: var(--delay, 0ms);
}
@keyframes fade-up {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Check SVG animado */
.check-wrap { display: inline-flex; }
.check-svg { width: 96px; height: 96px; }
.check-circle {
    fill: none;
    stroke: rgb(34, 197, 94);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: check-stroke 700ms cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
.check-mark {
    fill: none;
    stroke: rgb(34, 197, 94);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: check-stroke 500ms 600ms cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
@keyframes check-stroke { to { stroke-dashoffset: 0; } }

/* Footer nav */
.onboarding-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 2rem 2rem;
    gap: 1rem;
}
.nav-side { display: flex; align-items: center; min-width: 9rem; }
.nav-right { justify-content: flex-end; }
.nav-counter {
    font-size: 0.75rem;
    opacity: 0.5;
    font-variant-numeric: tabular-nums;
    color: var(--brand-brown-dark);
}
.btn-nav-back {
    color: var(--brand-brown-soft) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 500;
    padding: 0.55rem 0.9rem;
}
.btn-nav-back:hover { color: var(--brand-brown-dark) !important; background: rgba(112, 97, 78, 0.06); border-radius: 8px; }
.btn-nav-next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    font-weight: 600;
    border-radius: 10px;
}

@media (max-width: 640px) {
    .step-title { font-size: 2.1rem; }
    .step-title-md { font-size: 1.75rem; }
    .logo-wrap { height: 96px; width: 96px; }
    .banner-mark { height: 110px; }
    .ready-card { padding: 22px 22px 22px 70px; }
}

/* ── 8. Cards GDH ────────────────────────────────────────────────────── */
.gdh-card {
    border: 1px solid var(--app-border);
    border-radius: .75rem;
    transition: box-shadow .18s, transform .18s, border-color .18s;
    background: var(--app-surface);
}
.gdh-card:hover {
    box-shadow: 0 8px 20px rgba(56, 49, 39, .08);
    transform: translateY(-1px);
    border-color: var(--brand-orange-pale);
}
.gdh-card.role-card { border-left: 3px solid var(--gdh-role, var(--brand-orange)); }

.gdh-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--gdh-role-bg, var(--brand-orange-cream));
    color: var(--gdh-role-text, var(--brand-brown-deep));
    font-weight: 600; font-size: .95rem;
    display: inline-flex; align-items: center; justify-content: center;
    text-transform: uppercase; flex-shrink: 0;
}
.gdh-avatar.sm { width: 28px; height: 28px; font-size: .75rem; }
.gdh-avatar.lg { width: 54px; height: 54px; font-size: 1.25rem; }

/* Área como tag minimalista debajo del cargo en los cards de evaluación */
.gdh-area-tag {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    margin-top: .35rem;
    padding: .15rem .55rem;
    max-width: 100%;
    font-size: .7rem;
    font-weight: 600;
    line-height: 1.2;
    color: #475569;
    background: rgba(15, 23, 42, .05);
    border: 1px solid rgba(15, 23, 42, .06);
    border-radius: .35rem;
    letter-spacing: .02em;
}
.gdh-area-tag i { font-size: .68rem; color: #94a3b8; flex-shrink: 0; }
.gdh-area-tag-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
}

/* Botones marca */
.btn-primary {
    background: var(--brand-orange) !important;
    border-color: var(--brand-orange) !important;
    color: #fff !important;
    font-weight: 500;
    letter-spacing: .01em;
}
.btn-primary:hover, .btn-primary:focus {
    background: var(--brand-orange-deep) !important;
    border-color: var(--brand-orange-deep) !important;
    box-shadow: 0 4px 10px -2px rgba(239, 154, 73, .35) !important;
}
.btn-outline-primary { color: var(--brand-orange-deep); border-color: var(--brand-orange); }
.btn-outline-primary:hover { background: var(--brand-orange); border-color: var(--brand-orange); color: #fff; }
.btn-success { background: var(--brand-olive) !important; border-color: var(--brand-olive) !important; }
.btn-success:hover { background: #8c9930 !important; border-color: #8c9930 !important; }

/* Badges */
.badge.bg-primary-subtle { background: var(--brand-orange-cream) !important; color: var(--brand-orange-deep) !important; }
.badge.bg-success-subtle { background: #e9f1d4 !important; color: #4f5e15 !important; }
.badge.bg-warning-subtle { background: #fff3cd !important; color: #92670f !important; }

/* ── 9. Confirm dialog ───────────────────────────────────────────────── */
.gdh-confirm-dialog {
    border: none;
    border-radius: .85rem;
    padding: 0;
    width: min(420px, 90vw);
    box-shadow: 0 20px 50px rgba(56, 49, 39, .25);
    font-family: 'Poppins', sans-serif;
}
.gdh-confirm-dialog::backdrop { background: rgba(56, 49, 39, .35); backdrop-filter: blur(2px); }
.gdh-confirm-dialog .gdh-cd-body { padding: 1.5rem; }
.gdh-confirm-dialog .gdh-cd-title { font-size: 1rem; font-weight: 600; color: var(--app-text); margin-bottom: .5rem; }
.gdh-confirm-dialog .gdh-cd-msg { font-size: .9rem; color: var(--app-text-muted); margin-bottom: 1.25rem; }
.gdh-confirm-dialog .gdh-cd-actions { display: flex; justify-content: flex-end; gap: .5rem; }

/* ── 10. Toast ───────────────────────────────────────────────────────── */
.gdh-toast-container {
    position: fixed; top: 1rem; right: 1rem; z-index: 1100;
    display: flex; flex-direction: column; gap: .5rem; pointer-events: none;
}
.gdh-toast {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: .55rem;
    padding: .75rem 1rem; min-width: 280px; max-width: 380px;
    box-shadow: 0 8px 20px rgba(56, 49, 39, .12);
    pointer-events: auto;
    animation: gdh-toast-in .25s ease-out;
    display: flex; align-items: flex-start; gap: .6rem;
}
.gdh-toast.success { border-left: 3px solid var(--brand-olive); }
.gdh-toast.error   { border-left: 3px solid #ef4444; }
.gdh-toast.info    { border-left: 3px solid var(--brand-orange); }
.gdh-toast.warn    { border-left: 3px solid var(--brand-yellow); }
.gdh-toast .gdh-toast-msg { font-size: .85rem; color: var(--app-text); flex: 1; }
.gdh-toast .gdh-toast-close {
    background: transparent; border: none; color: var(--app-text-muted);
    cursor: pointer; padding: 0; line-height: 1; font-size: 1.1rem;
}
@keyframes gdh-toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

/* ── 11. Dark mode (.app-dark + data-bs-theme="dark") ────────────────── */
.app-dark, [data-bs-theme="dark"] {
    --app-bg:             #1a1410;
    --app-surface:        #221b14;
    --app-border:         #383127;
    --app-text:           #f4ece1;
    --app-text-muted:     #b8b0a7;
    --app-sidebar-bg:     #0e0a06;
    --app-sidebar-text:   #b8b0a7;
    --app-sidebar-active: #ffffff;
    --app-accent:         var(--brand-orange-soft);
    --bs-body-bg:         #1a1410;
    --bs-body-color:      #f4ece1;
}
[data-bs-theme="dark"] .gdh-card { background: #221b14; color: var(--app-text); }
[data-bs-theme="dark"] nav.navbar { background: #221b14 !important; }
[data-bs-theme="dark"] .autosave-indicator { background: #221b14; color: var(--app-text-muted); }

/* ── 12. Transiciones globales + fade entre páginas ──────────────────── */
* {
    transition:
        background-color 180ms ease,
        border-color 180ms ease,
        color 180ms ease;
}
@keyframes gdh-page-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}
.main-content > .container-fluid,
.main-content > .container-xl,
.main-content > .container-xxl {
    animation: gdh-page-fade-in 220ms ease both;
}

/* Sidebar nav legacy active state (compatibilidad si quedó algún template viejo) */
.sidebar .nav-link.gdh-active { background: rgba(239, 154, 73, .18) !important; }
/* ──────────────────────────────────────────────────────────────────────
 * 9. Variantes Likert (Fase C) — portadas literal de PreguntaInput.vue
 *    Cada `.likert-variant-N` (1-9) es un look visualmente distinto que se
 *    asigna por posición global de pregunta (idx % 9 + 1). El layout base
 *    `.likert-scale` es una grilla horizontal 4-col (col mobile cae a 2).
 * ────────────────────────────────────────────────────────────────────── */
  .likert-scale {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
  }
  .likert-cell {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    cursor: pointer;
    transition:
      background 180ms ease,
      border-color 180ms ease,
      color 180ms ease,
      box-shadow 180ms ease,
      transform 180ms ease;
  }
  .likert-cell.disabled {
    cursor: default;
    opacity: 0.7;
  }
  /* Estado pendiente: autosave en vuelo. La celda NO cuenta como marcada hasta
     que el server confirma (pasa a .active). Anillo punteado + pulso para
     distinguir "guardando" de "guardado". Ver gdh.js §5b. */
  .likert-cell.saving {
    background: color-mix(in srgb, currentColor 6%, transparent);
  }
  .likert-cell.saving .likert-bullet {
    border-style: dashed;
    animation: gdh-bullet-pulse 0.9s ease-in-out infinite;
  }
  @keyframes gdh-bullet-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.35; }
  }
  .likert-label {
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.25;
    color: inherit;
    word-break: break-word;
  }
  .likert-num {
    display: none;
  }
  .likert-emoji {
    display: none;
  }
  
  /* ============================================================
     Variante 1 — Pills separadas (naranja sólido al seleccionar)
     ============================================================ */
  .likert-variant-1 .likert-cell {
    padding: 14px 12px;
    min-height: 76px;
    background: var(--app-surface);
    border: 1.5px solid var(--app-border);
    border-radius: 12px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  }
  .likert-variant-1 .likert-cell:hover:not(.disabled) {
    border-color: var(--brand-orange, #ef9a49);
    transform: translateY(-1px);
  }
  .likert-variant-1 .likert-cell.active {
    background: var(--brand-orange, #ef9a49);
    border-color: var(--brand-orange-deep, #bf7b3a);
    color: #ffffff;
    box-shadow: 0 8px 20px -10px rgba(239, 154, 73, 0.7);
  }
  .likert-variant-1 .likert-cell.active .likert-label {
    font-weight: 600;
  }
  .likert-variant-1 .likert-bullet {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid var(--app-border);
    background: var(--app-surface);
    transition:
      border-color 180ms ease,
      background 180ms ease;
  }
  .likert-variant-1 .likert-cell:hover:not(.disabled) .likert-bullet {
    border-color: var(--brand-orange, #ef9a49);
  }
  .likert-variant-1 .likert-cell.active .likert-bullet {
    border-color: #ffffff;
    background: #ffffff;
  }
  .likert-variant-1 .likert-bullet-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-orange, #ef9a49);
    animation: pop 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  
  /* ============================================================
     Variante 2 — Semáforo de color (grid unida, color por nivel)
     ============================================================ */
  .likert-variant-2 {
    border: 1px solid var(--app-border);
    border-radius: 12px;
    overflow: hidden;
    gap: 0;
    background: var(--app-surface);
  }
  /* Cells pegadas: borde en el fieldset + separador único entre celdas
     (sin doble línea, sin border-radius). */
  .likert-variant-2 {
    border: 1px solid var(--app-border);
    border-radius: 0;
    overflow: hidden;
    background: var(--app-surface);
  }
  .likert-variant-2 .likert-cell {
    padding: 18px 14px 20px;
    min-height: 96px;
    border: none;
    border-right: 1px solid var(--app-border);
    background: var(--app-surface);
    border-radius: 0;
  }
  .likert-variant-2 .likert-cell:last-of-type {
    border-right: none;
  }
  .likert-variant-2 .likert-cell::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
  }
  .likert-variant-2 .likert-cell[data-pos='0'] {
    color: rgb(34, 197, 94);
  }
  .likert-variant-2 .likert-cell[data-pos='1'] {
    color: rgb(132, 204, 22);
  }
  .likert-variant-2 .likert-cell[data-pos='2'] {
    color: rgb(245, 158, 11);
  }
  .likert-variant-2 .likert-cell[data-pos='3'] {
    color: rgb(239, 68, 68);
  }
  .likert-variant-2 .likert-cell:hover:not(.disabled) {
    background: color-mix(in srgb, currentColor 6%, transparent);
  }
  .likert-variant-2 .likert-cell.active {
    background: color-mix(in srgb, currentColor 14%, transparent);
  }
  .likert-variant-2 .likert-label {
    color: var(--app-text);
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.3;
  }
  .likert-variant-2 .likert-cell.active .likert-label {
    font-weight: 700;
    color: currentColor;
  }
  .likert-variant-2 .likert-bullet {
    display: inline-grid;
    place-items: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 2px solid currentColor;
    background: var(--app-surface);
  }
  .likert-variant-2 .likert-cell.active .likert-bullet {
    background: currentColor;
  }
  .likert-variant-2 .likert-bullet-inner {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ffffff;
    animation: pop 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  
  /* ============================================================
     Variante 3 — Slider con marcas
     ============================================================ */
  .likert-variant-3 {
    position: relative;
    padding: 6px 8px 14px;
    gap: 0;
  }
  .likert-variant-3::before {
    content: '';
    position: absolute;
    left: 8%;
    right: 8%;
    top: 32px;
    height: 4px;
    background: var(--app-border);
    border-radius: 9999px;
    z-index: 0;
  }
  .likert-variant-3 .likert-cell {
    position: relative;
    z-index: 1;
    padding: 4px 6px;
    background: transparent;
    border: none;
    min-height: 0;
    gap: 12px;
  }
  .likert-variant-3 .likert-bullet {
    order: -1;
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid var(--app-border);
    background: var(--app-surface);
    transition: all 180ms ease;
  }
  .likert-variant-3 .likert-cell:hover:not(.disabled) .likert-bullet {
    border-color: var(--brand-orange, #ef9a49);
    transform: scale(1.1);
  }
  .likert-variant-3 .likert-cell.active .likert-bullet {
    background: var(--brand-orange, #ef9a49);
    border-color: var(--brand-orange-deep, #bf7b3a);
    box-shadow: 0 0 0 5px rgba(239, 154, 73, 0.18);
  }
  .likert-variant-3 .likert-bullet-inner {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    animation: pop 180ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }
  .likert-variant-3 .likert-label {
    font-size: 0.78rem;
    color: var(--app-text);
    opacity: 0.7;
  }
  .likert-variant-3 .likert-cell.active .likert-label {
    opacity: 1;
    font-weight: 600;
    color: var(--brand-orange-deep, #bf7b3a);
  }
  
  /* ============================================================
     Variante 4 — Tarjetas con número grande
     ============================================================ */
  .likert-variant-4 .likert-cell {
    padding: 14px 10px 12px;
    min-height: 110px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    gap: 4px;
  }
  .likert-variant-4 .likert-num {
    display: block;
    font-size: 1.65rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 1;
    color: var(--brand-orange-deep, #bf7b3a);
    margin-bottom: 4px;
  }
  .likert-variant-4 .likert-cell::after {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: var(--app-border);
    border-radius: 9999px;
    margin: 2px 0 6px;
    transition: background 180ms ease, width 180ms ease;
  }
  .likert-variant-4 .likert-cell:hover:not(.disabled) {
    border-color: var(--brand-orange, #ef9a49);
    transform: translateY(-2px);
    box-shadow: 0 8px 18px -10px rgba(239, 154, 73, 0.35);
  }
  .likert-variant-4 .likert-cell.active {
    border-color: var(--brand-orange, #ef9a49);
    background: rgba(239, 154, 73, 0.06);
    box-shadow: 0 10px 22px -10px rgba(239, 154, 73, 0.5);
  }
  .likert-variant-4 .likert-cell.active::after {
    background: var(--brand-orange, #ef9a49);
    width: 44px;
  }
  .likert-variant-4 .likert-label {
    font-size: 0.78rem;
    font-weight: 500;
  }
  .likert-variant-4 .likert-cell.active .likert-label {
    color: var(--brand-orange-deep, #bf7b3a);
    font-weight: 700;
  }
  .likert-variant-4 .likert-bullet {
    display: none;
  }
  
  /* ============================================================
     Variante 5 — Caritas / Emojis
     ============================================================ */
  .likert-variant-5 .likert-cell {
    padding: 14px 10px 12px;
    min-height: 110px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 14px;
    gap: 6px;
  }
  .likert-variant-5 .likert-emoji {
    display: block;
    font-size: 2rem;
    line-height: 1;
    filter: saturate(0.6);
    transition: filter 180ms ease, transform 180ms ease;
  }
  .likert-variant-5 .likert-cell:hover:not(.disabled) .likert-emoji,
  .likert-variant-5 .likert-cell.active .likert-emoji {
    filter: saturate(1.2);
    transform: scale(1.12);
  }
  .likert-variant-5 .likert-cell:hover:not(.disabled) {
    border-color: var(--brand-orange, #ef9a49);
  }
  .likert-variant-5 .likert-cell.active {
    border-color: var(--brand-orange, #ef9a49);
    background: rgba(239, 154, 73, 0.08);
  }
  .likert-variant-5 .likert-label {
    font-size: 0.78rem;
    font-weight: 500;
  }
  .likert-variant-5 .likert-cell.active .likert-label {
    font-weight: 700;
    color: var(--brand-orange-deep, #bf7b3a);
  }
  .likert-variant-5 .likert-bullet {
    display: none;
  }
  
  /* ============================================================
     Variante 6 — Outlined / Ghost (solo borde grueso al seleccionar)
     ============================================================ */
  .likert-variant-6 .likert-cell {
    padding: 16px 12px;
    min-height: 78px;
    background: transparent;
    border: 2px solid var(--app-border);
    border-radius: 999px;
    font-weight: 500;
  }
  .likert-variant-6 .likert-cell:hover:not(.disabled) {
    border-color: var(--brand-orange, #ef9a49);
  }
  .likert-variant-6 .likert-cell.active {
    border-color: var(--brand-orange-deep, #bf7b3a);
    border-width: 3px;
    background: transparent;
    color: var(--brand-orange-deep, #bf7b3a);
  }
  .likert-variant-6 .likert-cell.active .likert-label {
    font-weight: 700;
  }
  .likert-variant-6 .likert-bullet {
    display: none;
  }
  
  /* ============================================================
     Variante 7 — Color-coded sólidos (color fijo por opción)
     ============================================================ */
  .likert-variant-7 .likert-cell {
    padding: 16px 12px;
    min-height: 82px;
    border: none;
    border-radius: 12px;
    color: var(--app-text);
    background: var(--app-surface);
    border: 1px solid var(--app-border);
  }
  .likert-variant-7 .likert-cell[data-pos='0'] { --acc: rgb(34, 197, 94); }
  .likert-variant-7 .likert-cell[data-pos='1'] { --acc: rgb(132, 204, 22); }
  .likert-variant-7 .likert-cell[data-pos='2'] { --acc: rgb(245, 158, 11); }
  .likert-variant-7 .likert-cell[data-pos='3'] { --acc: rgb(239, 68, 68); }
  .likert-variant-7 .likert-cell:hover:not(.disabled) {
    border-color: var(--acc);
    background: color-mix(in srgb, var(--acc) 8%, var(--app-surface));
  }
  .likert-variant-7 .likert-cell.active {
    background: var(--acc);
    border-color: var(--acc);
    color: #ffffff;
    box-shadow: 0 8px 20px -10px var(--acc);
  }
  .likert-variant-7 .likert-cell.active .likert-label {
    font-weight: 700;
  }
  .likert-variant-7 .likert-bullet {
    display: none;
  }
  
  /* ============================================================
     Variante 8 — Stripe vertical (acento lateral de marca)
     ============================================================ */
  .likert-variant-8 .likert-cell {
    padding: 14px 12px 14px 18px;
    min-height: 78px;
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-left: 4px solid var(--app-border);
    border-radius: 10px;
    align-items: flex-start;
    text-align: left;
    flex-direction: column;
    gap: 4px;
  }
  .likert-variant-8 .likert-cell:hover:not(.disabled) {
    border-left-color: var(--brand-orange-soft, #f2ae6d);
  }
  .likert-variant-8 .likert-cell.active {
    border-left-color: var(--brand-orange, #ef9a49);
    background: rgba(239, 154, 73, 0.05);
  }
  .likert-variant-8 .likert-cell.active .likert-label {
    font-weight: 700;
    color: var(--brand-brown-dark, #383127);
  }
  .likert-variant-8 .likert-bullet {
    display: none;
  }
  
  /* ============================================================
     Variante 9 — Big number circle (círculo con número)
     ============================================================ */
  .likert-variant-9 .likert-cell {
    padding: 12px 10px;
    min-height: 110px;
    background: transparent;
    border: none;
    gap: 8px;
  }
  .likert-variant-9 .likert-num {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    background: var(--app-surface);
    border: 2px solid var(--app-border);
    color: var(--app-text);
    transition:
      background 180ms ease,
      border-color 180ms ease,
      color 180ms ease,
      transform 180ms ease,
      box-shadow 180ms ease;
  }
  .likert-variant-9 .likert-cell:hover:not(.disabled) .likert-num {
    border-color: var(--brand-orange, #ef9a49);
    transform: scale(1.06);
  }
  .likert-variant-9 .likert-cell.active .likert-num {
    background: var(--brand-orange, #ef9a49);
    border-color: var(--brand-orange-deep, #bf7b3a);
    color: #ffffff;
    box-shadow: 0 8px 18px -8px rgba(239, 154, 73, 0.6);
  }
  .likert-variant-9 .likert-label {
    font-size: 0.78rem;
    color: var(--app-text);
    opacity: 0.7;
  }
  .likert-variant-9 .likert-cell.active .likert-label {
    opacity: 1;
    font-weight: 700;
    color: var(--brand-orange-deep, #bf7b3a);
  }
  .likert-variant-9 .likert-bullet {
    display: none;
  }
  
  /* En pantallas chicas, todas las variantes pasan a 2 columnas */
  @media (max-width: 640px) {
    .likert-scale {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }
    .likert-variant-2 .likert-cell {
      border-left: none;
      border-top: 1px solid var(--app-border);
    }
    .likert-variant-3::before {
      display: none;
    }
  }

/* ── 13. Home (Fase G) ───────────────────────────────────────────────── */
.gdh-home { padding: 0.5rem 0.25rem; }
.gdh-home-eyebrow {
    margin: 0 0 0.5rem;
    font-size: 0.78rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--brand-brown-soft);
    font-weight: 500;
}
.gdh-home-title {
    margin: 0 0 0.65rem;
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 900;
    color: var(--brand-brown-dark);
}
.gdh-home-sub {
    margin: 0 0 0.25rem;
    font-size: 0.98rem;
    color: var(--brand-brown-deep);
    max-width: 60ch;
    line-height: 1.5;
}
.gdh-home-sub strong { color: var(--brand-orange-deep); font-weight: 600; }
.gdh-home-periodo {
    margin: 0;
    font-size: 0.9rem;
    color: var(--brand-brown-soft);
}
.gdh-periodo-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-orange) 0%, var(--brand-orange-deep) 100%);
    border-radius: 999px;
    box-shadow: 0 4px 12px -4px rgba(239, 154, 73, 0.45);
    white-space: nowrap;
}

.gdh-info-card {
    background: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: 16px;
    padding: 1.5rem 1.6rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 32px -20px rgba(56, 49, 39, 0.15);
}
.gdh-info-card-recom { border-top: 3px solid var(--brand-yellow); }
.gdh-info-card-instr { border-top: 3px solid var(--brand-orange); }
.gdh-info-card-head {
    display: flex; align-items: center; gap: 0.7rem;
    margin-bottom: 1rem;
}
.gdh-info-card-emoji {
    font-size: 1.5rem;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    width: 44px; height: 44px;
    border-radius: 12px;
    background: var(--brand-orange-cream);
}
.gdh-info-card-recom .gdh-info-card-emoji {
    background: rgba(252, 195, 13, 0.18);
}
.gdh-info-card-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-brown-dark);
}
.gdh-info-card-lead {
    margin: 0 0 0.85rem;
    font-size: 0.92rem;
    color: var(--brand-brown-deep);
}
.gdh-info-list, .gdh-info-list-numbered {
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--brand-brown-dark);
}
.gdh-info-list li, .gdh-info-list-numbered li { margin-bottom: 0.55rem; }
.gdh-info-list li::marker, .gdh-info-list-numbered li::marker { color: var(--brand-orange); font-weight: 700; }
.gdh-info-list strong, .gdh-info-list-numbered strong { color: var(--brand-orange-deep); font-weight: 600; }
.gdh-info-list-opts {
    list-style: none;
    padding-left: 0;
    margin: 0.5rem 0 0;
    display: grid;
    #grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 1rem;
}
.gdh-info-list-opts li {
    position: relative;
    padding-left: 1.2rem;
    font-size: 0.88rem;
}
.gdh-info-list-opts li::before {
    content: "";
    position: absolute;
    left: 0; top: 0.5rem;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--brand-olive);
}

/* ── 14. Vista "Gracias por participar" ──────────────────────────────── */
.gdh-thanks-wrap {
    min-height: calc(100vh - 100px);
    display: grid;
    place-items: center;
    padding: 2rem 1rem;
}
.gdh-thanks-card {
    text-align: center;
    max-width: 480px;
    padding: 2rem;
}
.gdh-thanks-title {
    margin: 0 0 0.5rem;
    font-size: 2rem;
    font-weight: 900;
    color: var(--brand-brown-dark);
    letter-spacing: -0.01em;
}
.gdh-thanks-sub {
    margin: 0;
    font-size: 0.98rem;
    color: var(--brand-brown-deep);
}
.gdh-thanks-sub strong { color: var(--brand-orange-deep); font-weight: 600; }
.gdh-thanks-arrow { margin: 1.2rem 0 0.5rem; display: flex; justify-content: center; }
.gdh-thanks-tag {
    margin: 0 0 0.3rem;
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--brand-orange);
    letter-spacing: 0.05em;
}
.gdh-thanks-pgm {
    margin: 0 0 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--brand-brown-deep);
}
.gdh-thanks-foot {
    margin: 0;
    font-size: 0.8rem;
    color: var(--brand-brown-soft);
    line-height: 1.5;
}

/* ── 15. Card "Mi rol" ───────────────────────────────────────────────── */
.gdh-mi-rol {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.7rem;
    background: var(--brand-orange-cream);
    border-radius: 8px;
    font-size: 0.82rem;
    color: var(--brand-brown-deep);
    align-self: flex-start;
}
.gdh-mi-rol-label { color: var(--brand-brown-soft); }
.gdh-mi-rol strong { color: var(--brand-orange-deep); font-weight: 700; }

/* ── 16. Responder — footer fijo Guardar/Enviar ──────────────────────── */
.gdh-responder-footer {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: var(--app-surface);
    border-top: 1px solid var(--app-border);
    box-shadow: 0 -4px 18px -8px rgba(15, 23, 42, 0.12);
    z-index: 100;
    padding: 0.85rem 1.5rem;
}
.gdh-responder-footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}
.gdh-responder-status { font-size: 0.92rem; }
.gdh-responder-status .status-lista {
    color: var(--brand-olive);
    font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.gdh-responder-status .status-lista i { color: var(--brand-olive); font-size: 1.05rem; }
.gdh-responder-status .status-progreso {
    color: var(--brand-brown-soft);
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.gdh-responder-status .status-completada {
    color: #198754;
    font-weight: 600;
    display: inline-flex; align-items: center; gap: 0.4rem;
}
.gdh-responder-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}
.btn-guardar {
    color: var(--brand-brown-deep) !important;
    border-color: var(--brand-brown-pale) !important;
    background: var(--app-surface) !important;
}
.btn-guardar:hover {
    background: var(--brand-cream) !important;
    border-color: var(--brand-brown-soft) !important;
    color: var(--brand-brown-dark) !important;
}
.btn-enviar {
    background: var(--brand-olive) !important;
    border-color: var(--brand-olive) !important;
    color: #fff !important;
    font-weight: 600;
    padding-inline: 1.2rem;
}
.btn-enviar:disabled {
    background: var(--brand-brown-pale) !important;
    border-color: var(--brand-brown-pale) !important;
    opacity: 0.65;
}
.btn-enviar:hover:not(:disabled) {
    background: #8c9930 !important;
    border-color: #8c9930 !important;
}

@media (max-width: 720px) {
    .gdh-responder-footer-inner { flex-wrap: wrap; gap: 0.6rem; }
    .gdh-responder-status { width: 100%; text-align: center; order: 0; }
}

/* ── 17. Modal "Enviar evaluación" — usa <dialog> nativo (top layer) ─── */
dialog.gdh-dialog {
    width: 100%;
    max-width: 520px;
    padding: 0;
    border: none;
    border-radius: 14px;
    background: var(--app-surface);
    box-shadow: 0 24px 64px -24px rgba(15, 23, 42, 0.45);
    color: var(--brand-brown-dark);
    overflow: hidden;
}
dialog.gdh-dialog::backdrop {
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}
dialog.gdh-dialog[open] {
    animation: gdh-modal-pop 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
dialog.gdh-dialog[open]::backdrop {
    animation: gdh-modal-fade 180ms ease;
}
@keyframes gdh-modal-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes gdh-modal-pop {
    from { opacity: 0; transform: translateY(12px) scale(.96); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.gdh-modal-content {
    background: var(--app-surface);
    border-radius: 14px;
    box-shadow: 0 24px 64px -24px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}
.gdh-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
}
.gdh-modal-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-brown-dark);
}
.gdh-modal-close {
    background: transparent;
    border: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--brand-brown-soft);
    font-size: 1rem;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    transition: background .15s;
}
.gdh-modal-close:hover { background: var(--brand-cream); color: var(--brand-brown-dark); }
.gdh-modal-body { padding: 1.5rem 1.25rem; color: var(--brand-brown-dark); }
.gdh-modal-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem 1.25rem;
}
.gdh-modal-enviar-icon {
    font-size: 1.5rem;
    color: var(--brand-brown-soft);
    line-height: 1;
    margin-top: 0.15rem;
}
.gdh-modal-enviar .btn-secondary {
    background: #fff !important;
    border: 1px solid var(--app-border) !important;
    color: var(--brand-brown-dark) !important;
    font-weight: 500;
}
.gdh-modal-enviar .btn-secondary:hover { background: var(--brand-cream) !important; }
.gdh-modal-enviar .btn-success {
    background: var(--brand-olive) !important;
    border-color: var(--brand-olive) !important;
    font-weight: 600;
    padding-inline: 1.4rem;
}
.gdh-modal-enviar .btn-success:hover {
    background: #8c9930 !important; border-color: #8c9930 !important;
}

/* Warning dentro del modal "Enviar" cuando faltan respuestas */
.gdh-modal-warning {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: #fff5e6;
    border: 1px solid #f5d1a1;
    border-left: 3px solid var(--brand-orange);
    border-radius: 8px;
    font-size: 0.85rem;
    line-height: 1.45;
    color: var(--brand-brown-dark);
}
.gdh-modal-warning i { color: var(--brand-orange-deep); font-size: 1.1rem; margin-top: 0.05rem; }
.gdh-modal-warning strong { color: var(--brand-orange-deep); }

/* Layout interno del <dialog> */
.gdh-dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--app-border);
}
.gdh-dialog-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brand-brown-dark);
}
.gdh-dialog-close {
    background: transparent;
    border: 0;
    width: 32px; height: 32px;
    border-radius: 8px;
    color: var(--brand-brown-soft);
    font-size: 1rem;
    cursor: pointer;
    display: inline-grid;
    place-items: center;
    transition: background .15s;
}
.gdh-dialog-close:hover { background: var(--brand-cream); color: var(--brand-brown-dark); }
.gdh-dialog-body {
    padding: 1.5rem 1.25rem;
    color: var(--brand-brown-dark);
}
.gdh-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.6rem;
    padding: 0.75rem 1.25rem 1.25rem;
}

/* ============================================================
   19. Pantalla de cierre — Gracias por participar (port Vue)
   ============================================================ */
.thanks-page {
    position: relative;
    min-height: calc(100vh - 56px);
    margin: -1.75rem;
    padding: 4rem 1.5rem 5rem;
    display: grid;
    place-items: center;
    overflow: hidden;
    border-radius: 0;
    background:
        radial-gradient(at 20% 30%, rgba(239, 154, 73, 0.12), transparent 60%),
        radial-gradient(at 80% 70%, rgba(112, 97, 78, 0.10), transparent 60%),
        #faf6f0;
}
.thanks-blob {
    position: absolute;
    border-radius: 9999px;
    filter: blur(100px);
    opacity: 0.35;
    pointer-events: none;
    animation: thanks-float 22s ease-in-out infinite;
}
.thanks-blob-1 {
    width: 460px;
    height: 460px;
    top: -160px;
    left: -120px;
    background: radial-gradient(circle, #ef9a49, transparent 70%);
}
.thanks-blob-2 {
    width: 420px;
    height: 420px;
    bottom: -160px;
    right: -120px;
    background: radial-gradient(circle, #70614e, transparent 70%);
    animation-delay: -10s;
}
@keyframes thanks-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(40px, -30px) scale(1.07); }
}

.thanks-content {
    position: relative;
    z-index: 2;
    max-width: 40rem;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    padding: 2.5rem 1.5rem;
}

.thanks-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    width: 140px;
    padding: 14px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, 0.04),
        0 16px 40px -16px rgba(15, 23, 42, 0.14);
}
.thanks-logo img {
    display: block;
    height: 100%;
    width: 100%;
    box-sizing: border-box;
    object-fit: contain;
    object-position: center;
}

.thanks-check svg {
    width: 64px;
    height: 64px;
}
.thanks-circle {
    fill: none;
    stroke: rgb(34, 197, 94);
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: thanks-stroke 700ms cubic-bezier(0.65, 0, 0.45, 1) forwards;
    animation-delay: 200ms;
}
.thanks-mark {
    fill: none;
    stroke: rgb(34, 197, 94);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: thanks-stroke 500ms 800ms cubic-bezier(0.65, 0, 0.45, 1) forwards;
}
@keyframes thanks-stroke {
    to { stroke-dashoffset: 0; }
}

.thanks-title {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    font-size: 2.5rem;
    line-height: 1.05;
    color: #383127;
    margin: 0;
}
.thanks-lead {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.5;
    color: #383127;
    opacity: 0.85;
    max-width: 32rem;
}
.thanks-lead strong {
    color: #bf7b3a;
    font-weight: 700;
}

.thanks-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    max-width: 14rem;
    color: #ef9a49;
    margin: 0.25rem 0;
}
.thanks-divider::before,
.thanks-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(239, 154, 73, 0.5), transparent);
}
.thanks-divider span {
    font-size: 1.5rem;
    line-height: 1;
}

.thanks-brand {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.thanks-brand-line {
    font-family: 'Poppins', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 1.5rem;
    color: #bf7b3a;
}
.thanks-brand-sub {
    font-size: 0.85rem;
    font-weight: 500;
    color: #383127;
    opacity: 0.7;
    letter-spacing: 0.02em;
}

.thanks-foot {
    margin: 1rem 0 0;
    font-size: 0.85rem;
    color: #383127;
    opacity: 0.55;
    max-width: 30rem;
    line-height: 1.5;
}

.fade-up {
    animation: thanks-fade-up 600ms ease-out both;
}
@keyframes thanks-fade-up {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   20. Pill de estado "Completada" — chip verde de "hecho"
   ============================================================ */
.gdh-estado-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.6rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.gdh-estado-completada {
    background: rgba(34, 197, 94, 0.12);
    color: rgb(21, 128, 61);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.gdh-estado-completada i {
    font-size: 0.9rem;
    line-height: 1;
}

/* ── 18. Notificaciones — Picker + Editor WYSIWYG ─────────────────────── */

.notif-picker-wrap {
    max-width: 1200px;
    margin: 0 auto;
}
.notif-picker-header { margin-bottom: 2rem; }
.notif-eyebrow {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #94a3b8;
    margin: 0 0 .25rem;
    font-weight: 600;
}
.notif-title {
    font-size: 1.85rem;
    font-weight: 600;
    margin: 0 0 .5rem;
    color: #0f172a;
}
.notif-subtitle {
    color: #475569;
    max-width: 640px;
    line-height: 1.55;
    font-size: .95rem;
    margin: 0;
}
.notif-section-title {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #64748b;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Grid de cards */
.tpl-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}

/* Card de plantilla */
.tpl-card {
    position: relative;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .75rem;
    overflow: hidden;
    transition: transform .18s, border-color .18s, box-shadow .18s;
    text-align: left;
    text-decoration: none;
    color: inherit;
    display: block;
    cursor: pointer;
    width: 100%;
    padding: 0;
}
.tpl-card-button {
    appearance: none;
    font: inherit;
    color: inherit;
    background: #fff;
}
.tpl-card-form { margin: 0; }
.tpl-card-link { text-decoration: none; color: inherit; display: block; }
.tpl-card:hover {
    transform: translateY(-2px);
    border-color: rgba(239, 154, 73, .35);
    box-shadow: 0 8px 24px -8px rgba(15, 23, 42, .12);
}

/* Preview thumbnail: contenedor de tamaño fijo, contenido escalado */
.tpl-preview {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(180deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    pointer-events: none;
}
.email-thumb {
    transform: scale(.45);
    transform-origin: top center;
    width: 222%;
    height: auto;
    padding-top: 8px;
    pointer-events: none;
}
.blank-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
}
.blank-preview i { font-size: 2.5rem; opacity: .4; }
.blank-preview span { font-size: .8rem; margin-top: .5rem; opacity: .7; }

/* Info inferior — layout vertical para evitar desbordes con nombres/tags largos */
.tpl-info { padding: .85rem 1rem 1rem; min-width: 0; }
.tpl-info-name {
    font-weight: 600;
    font-size: .9rem;
    color: #0f172a;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tpl-info-desc {
    font-size: .78rem;
    color: #64748b;
    margin: .35rem 0 .5rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.tpl-info-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}

/* Tags (tipo/badge) */
.tpl-tag {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .65rem;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
    flex-shrink: 0;
}
.tpl-tag-pendientes { background: rgba(245, 158, 11, .12); color: #b45309; }
.tpl-tag-en_proceso { background: rgba(99, 102, 241, .12); color: #4338ca; }
.tpl-tag-bienvenida { background: rgba(16, 185, 129, .12); color: #047857; }
.tpl-tag-manual { background: rgba(15, 23, 42, .06); color: #475569; }
.tpl-tag-badge { background: rgba(99, 102, 241, .15); color: #4338ca; }

/* Botón eliminar en card de plantilla guardada (esquina sup. derecha) */
.tpl-card-del {
    position: absolute;
    top: .5rem;
    right: .5rem;
    margin: 0;
    z-index: 2;
}
.tpl-card-del-btn {
    background: rgba(255, 255, 255, .92);
    border: 1px solid rgba(15, 23, 42, .08);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ef4444;
    cursor: pointer;
    opacity: 0;
    transition: opacity .18s, transform .18s;
}
.tpl-card:hover .tpl-card-del-btn { opacity: 1; }
.tpl-card-del-btn:hover { transform: scale(1.1); background: #fff; }

/* ── Editor WYSIWYG ───────────────────────────────────────────────────── */

.notif-editor-wrap { max-width: 1200px; margin: 0 auto; }
.notif-editor-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
    flex-wrap: wrap;
}
.notif-editor-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.25rem;
    align-items: start;
}
@media (max-width: 900px) {
    .notif-editor-grid { grid-template-columns: 1fr; }
}

/* Shell de email editable */
.email-shell {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .75rem;
    overflow: hidden;
}
.email-meta {
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    padding: .85rem 1rem;
    font-size: .85rem;
}
.email-meta-row { display: flex; align-items: center; gap: .5rem; padding: .25rem 0; }
.email-meta-label {
    min-width: 60px;
    color: #64748b;
    font-weight: 600;
    font-size: .8rem;
}
.email-meta-value { color: #0f172a; flex: 1; }
.email-meta-asunto[contenteditable="true"] {
    outline: none;
    padding: .25rem .5rem;
    border-radius: .25rem;
    border: 1px dashed transparent;
    transition: border-color .15s, background .15s;
    cursor: text;
}
.email-meta-asunto[contenteditable="true"]:hover,
.email-meta-asunto[contenteditable="true"]:focus {
    border-color: #c7d2fe;
    background: rgba(99, 102, 241, .04);
}
.editor-hint {
    background: rgba(99, 102, 241, .05);
    border-top: 1px solid rgba(99, 102, 241, .12);
    padding: .55rem 1rem;
    font-size: .78rem;
    color: #4338ca;
}
.editor-hint i { margin-right: .35rem; }

/* Canvas del cuerpo */
.email-canvas {
    background: #fff;
    padding: 0;
    min-height: 400px;
    max-height: 70vh;
    overflow-y: auto;
}

/* Regiones editables (data-field-edit) */
.email-canvas [data-field-edit] {
    outline: 1px dashed transparent;
    outline-offset: 2px;
    transition: outline-color .15s, background .15s;
    cursor: text;
    border-radius: 3px;
}
.email-canvas [data-field-edit]:hover {
    outline-color: rgba(99, 102, 241, .35);
}
.email-canvas [data-field-edit]:focus {
    outline: 2px solid #6366f1;
    background: rgba(99, 102, 241, .04);
}

/* Chips de variables (.ph-var) */
.ph-var {
    display: inline-flex;
    align-items: center;
    gap: .2rem;
    background: rgba(99, 102, 241, .12);
    color: #4338ca;
    padding: 0 .35rem;
    border-bottom: 1.5px dotted #6366f1;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.95em;
    line-height: 1.25;
    transition: background .12s;
}
.ph-var:hover { background: rgba(99, 102, 241, .22); }
.ph-var::after {
    content: "⌄";
    font-size: .65em;
    opacity: .7;
    margin-left: .1rem;
}

/* Popover para cambiar variable */
.ph-popover {
    position: absolute;
    z-index: 1000;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: .55rem;
    box-shadow: 0 12px 32px -8px rgba(15, 23, 42, .25);
    max-height: 280px;
    overflow-y: auto;
    width: 260px;
}
.ph-popover-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: .55rem .75rem;
    border: none;
    background: transparent;
    color: #1e293b;
    cursor: pointer;
    font-size: .82rem;
    border-bottom: 1px solid rgba(15, 23, 42, .04);
}
.ph-popover-item:last-child { border-bottom: none; }
.ph-popover-item:hover { background: rgba(99, 102, 241, .06); }
.ph-popover-item code {
    color: #6366f1;
    font-weight: 600;
    font-size: .78rem;
}
.ph-popover-item .ph-popover-desc {
    display: block;
    color: #64748b;
    font-size: .72rem;
    margin-top: .15rem;
}

/* Sidebar derecho */
.notif-sidebar { position: sticky; top: 0; }
.notif-sidebar-card {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .75rem;
    padding: 1rem;
    margin-bottom: .85rem;
}
.notif-sidebar-card-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    margin-bottom: .55rem;
    font-weight: 600;
}
.notif-sidebar-recipients {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1;
    color: #0f172a;
}
.notif-sidebar-recipients-sub {
    font-size: .75rem;
    color: #64748b;
    margin-top: .35rem;
}
.notif-var-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.notif-var-chip {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    padding: .25rem .55rem;
    background: rgba(99, 102, 241, .08);
    color: #4338ca;
    border: 1px solid rgba(99, 102, 241, .18);
    border-radius: .35rem;
    font-size: .75rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .12s;
}
.notif-var-chip:hover { background: rgba(99, 102, 241, .15); }
.notif-var-chip code { color: inherit; font-size: .72rem; }

/* Estado dirty */
.notif-dirty-tag {
    background: rgba(245, 158, 11, .15);
    color: #b45309;
    padding: .15rem .55rem;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    display: none;
}
.notif-dirty .notif-dirty-tag { display: inline-flex; }

/* Stats post-envío */
.notif-stats-result {
    background: rgba(16, 185, 129, .08);
    border: 1px solid rgba(16, 185, 129, .25);
    border-radius: .55rem;
    padding: .85rem 1rem;
    color: #065f46;
    font-size: .85rem;
    margin-top: .75rem;
}
.notif-stats-result .notif-stat { display: inline-block; margin-right: 1rem; }
.notif-stats-result .notif-stat strong { font-size: 1.1rem; display: block; }

/* ── 19. Notificaciones: filtro por tipo (pills) ──────────────────────── */
.notif-tipo-filter {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    padding: .35rem;
    background: #f1f5f9;
    border-radius: .55rem;
    border: 1px solid rgba(15, 23, 42, .06);
}
.notif-tipo-btn {
    appearance: none;
    border: 1px solid transparent;
    background: transparent;
    color: #475569;
    padding: .55rem .9rem;
    border-radius: .4rem;
    font-size: .82rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    transition: background .15s, color .15s, border-color .15s;
    line-height: 1.2;
}
.notif-tipo-btn i { font-size: .9rem; opacity: .75; }
.notif-tipo-btn:hover {
    background: rgba(15, 23, 42, .04);
    color: #0f172a;
}
.notif-tipo-btn.active {
    background: #fff;
    color: #b45309;
    border-color: rgba(245, 158, 11, .25);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.notif-tipo-btn.active i { opacity: 1; color: #ef9a49; }

/* Empty state cuando filtro no encuentra cards */
.tpl-empty-msg {
    padding: 2rem;
    text-align: center;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px dashed rgba(15, 23, 42, .12);
    border-radius: .55rem;
    font-size: .85rem;
}
.tpl-empty-msg i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: .35rem;
    opacity: .6;
}

/* ── 20. Notificaciones: Pantalla 0 (selector de tipo) ────────────────── */
.tipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    max-width: 900px;
    margin: 0 auto;
}
.tipo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .75rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    position: relative;
    transition: transform .18s, border-color .18s, box-shadow .18s;
    --tipo-color: #6366f1;
}
.tipo-card:hover {
    transform: translateY(-2px);
    border-color: var(--tipo-color);
    box-shadow: 0 10px 28px -8px rgba(15, 23, 42, .14);
}
.tipo-card-icon {
    width: 52px;
    height: 52px;
    border-radius: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--tipo-color) 14%, transparent);
    color: var(--tipo-color);
    flex-shrink: 0;
}
.tipo-card-icon i { font-size: 1.6rem; }
.tipo-card-body { flex: 1; min-width: 0; }
.tipo-card-title {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 .15rem;
    color: #0f172a;
    line-height: 1.3;
}
.tipo-card-desc {
    margin: 0;
    color: #64748b;
    font-size: .82rem;
    line-height: 1.45;
}
.tipo-card-arrow {
    color: #cbd5e1;
    font-size: 1.1rem;
    flex-shrink: 0;
    transition: transform .15s, color .15s;
}
.tipo-card:hover .tipo-card-arrow {
    color: var(--tipo-color);
    transform: translateX(3px);
}

/* Header del picker cuando ya hay tipo elegido (Pantalla 1) */
.notif-picker-header-with-back { position: relative; }
.notif-back-link {
    display: inline-flex;
    align-items: center;
    color: #64748b;
    font-size: .85rem;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color .15s;
}
.notif-back-link:hover { color: #0f172a; }

.notif-picker-tipo-active {
    --tipo-color: #6366f1;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--tipo-color);
    background: color-mix(in srgb, var(--tipo-color) 5%, transparent);
    border-radius: 0 .55rem .55rem 0;
    margin-bottom: 1rem;
    position: relative;
}
.notif-picker-tipo-active > i {
    color: var(--tipo-color);
    font-size: 1.3rem;
    margin-right: .35rem;
    vertical-align: middle;
}
.notif-picker-tipo-active .notif-eyebrow { display: inline-block; vertical-align: middle; margin: 0; }
.notif-picker-tipo-active .notif-title { font-size: 1.4rem; margin-top: .25rem; }
.notif-picker-tipo-active .notif-subtitle { margin-top: .35rem; font-size: .88rem; }

/* ── 21. Notificaciones: modales simulación + progress ─────────────────── */
.notif-modal-simular { max-width: 800px; width: 90vw; }
.notif-modal-progress { max-width: 540px; width: 90vw; }

.notif-sim-item {
    border: 1px solid rgba(15, 23, 42, .08);
    border-radius: .5rem;
    margin-bottom: .6rem;
    background: #fff;
    overflow: hidden;
}
.notif-sim-item summary {
    cursor: pointer;
    padding: .65rem .85rem;
    background: #f8fafc;
    list-style: none;
    user-select: none;
}
.notif-sim-item summary::-webkit-details-marker { display: none; }
.notif-sim-item summary::before {
    content: "▸";
    display: inline-block;
    margin-right: .35rem;
    transition: transform .15s;
    color: #94a3b8;
}
.notif-sim-item[open] summary::before { transform: rotate(90deg); }
.notif-sim-asunto {
    font-size: .78rem;
    color: #475569;
    margin-top: .25rem;
    font-weight: 500;
}
.notif-sim-cuerpo {
    padding: 1rem;
    max-height: 320px;
    overflow-y: auto;
    background: #fafbfc;
    font-size: .85rem;
}
.notif-sim-error {
    padding: .65rem .85rem;
    background: rgba(239, 68, 68, .04);
    border-color: rgba(239, 68, 68, .25);
}

/* ── 22. Notificaciones: Modal Preview de envío ──────────────────────── */
.notif-modal-preview { max-width: 760px; width: 92vw; }

.preview-summary {
    text-align: center;
    padding: 1.25rem 1rem 1rem;
    background: linear-gradient(180deg, #f8fafc, #fff);
    border-radius: .55rem;
    border: 1px solid rgba(15, 23, 42, .06);
    margin-bottom: 1rem;
}
.preview-big-number {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1;
    color: #ef9a49;
    margin-top: .35rem;
}
.preview-section-title {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #64748b;
    margin: 0 0 .65rem;
    font-weight: 600;
}

.preview-config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .5rem;
}
.preview-cfg-item {
    padding: .65rem .8rem;
    background: #f8fafc;
    border: 1px solid rgba(15, 23, 42, .05);
    border-radius: .4rem;
}
.preview-cfg-item.preview-cfg-highlight {
    background: rgba(239, 154, 73, .08);
    border-color: rgba(239, 154, 73, .25);
}
.preview-cfg-label {
    font-size: .7rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.preview-cfg-value {
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: .2rem;
}

.preview-email-shell {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, .1);
    border-radius: .5rem;
    overflow: hidden;
}
.preview-email-asunto {
    padding: .65rem .85rem;
    background: #f8fafc;
    border-bottom: 1px solid rgba(15, 23, 42, .06);
    font-size: .85rem;
}
.preview-email-asunto .text-muted {
    text-transform: uppercase;
    font-size: .7rem;
    letter-spacing: .08em;
    margin-right: .4rem;
}
.preview-email-cuerpo {
    padding: 1rem;
    max-height: 360px;
    overflow-y: auto;
    font-size: .85rem;
    background: #fafbfc;
}
