/* ── Variables globales ──────────────────────────────────────── */
:root {
    --brand:          #4a7c59;
    --brand-dark:     #3a6347;
    --brand-darker:   #2f4f39;
    --brand-light:    #f0f7f2;
    --brand-focus:    rgba(74, 124, 89, 0.15);
    --border:         #e5e7eb;
    --border-input:   #ccc;
    --text-muted:     #666;
    --text-soft:      #444;
    --text-subtle:    #777;
    --bg-tag:         #f3f4f6;
    --radius-pill:    999px;
    --radius-card:    12px;
    --radius-btn:     6px;
    --shadow-card:    0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-hover:   0 6px 18px rgba(0, 0, 0, 0.1);
    --wrapper-width:  1200px;

    /* Bootstrap consume estas variables en tiempo real para .text-primary,
       .bg-primary, .border-primary, badges *-subtle, links y accordions */
    --bs-primary:                #4a7c59;
    --bs-primary-rgb:            74, 124, 89;
    --bs-primary-text-emphasis:  #3a6347;
    --bs-primary-bg-subtle:      #f0f7f2;
    --bs-primary-border-subtle:  #bcd7c4;
    --bs-link-color:             #4a7c59;
    --bs-link-color-rgb:         74, 124, 89;
    --bs-link-hover-color:       #3a6347;
    --bs-link-hover-color-rgb:   58, 99, 71;
}

/* .btn-primary / .btn-outline-primary traen sus colores "horneados" en el CSS
   compilado de Bootstrap (no leen --bs-primary), así que se sobreescriben aquí */
.btn-primary {
    --bs-btn-color: #fff;
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-focus-shadow-rgb: 74, 124, 89;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand-darker);
    --bs-btn-active-border-color: var(--brand-darker);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
}

.btn-outline-primary {
    --bs-btn-color: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-focus-shadow-rgb: 74, 124, 89;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: var(--brand);
    --bs-btn-active-border-color: var(--brand);
    --bs-btn-disabled-color: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
}

/* Checkboxes y radios marcados (también hardcoded en azul por Bootstrap) */
.form-check-input:checked,
.form-check-input[type=checkbox]:indeterminate {
    background-color: var(--brand);
    border-color: var(--brand);
}

.form-check-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .25rem var(--brand-focus);
}

/* Foco de inputs y selects (borde y sombra azules por defecto) */
.form-control:focus,
.form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .25rem var(--brand-focus);
}

/* ── Base ────────────────────────────────────────────────────── */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding-top: 76px;
    background: #ffffff;
    color: #1f2937;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    background: linear-gradient(180deg, #ffffff 0%, var(--brand-light) 100%);
    border-top: 1px solid var(--border);
}

.footer-tagline {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-soft);
    margin-bottom: 1.25rem;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 0.9rem;
}

.footer-social-link {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: var(--brand);
    border: 1px solid rgba(74, 124, 89, 0.2);
    box-shadow: var(--shadow-card);
    transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.footer-social-link:hover {
    background: var(--brand);
    color: #fff;
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.6rem 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.85rem;
}

.footer-links a,
.footer-links button {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-links a:hover,
.footer-links button:hover {
    color: var(--brand);
    text-decoration: underline;
}

.footer-copy {
    text-align: center;
    padding: 0.9rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
    background: rgba(74, 124, 89, 0.06);
    border-top: 1px solid var(--border);
}

/* ── Navbar ──────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    width: 100%;
}

.navbar-brand {
    display: flex;
    align-items: center;
    padding: 0.25rem 0;
}

.navbar-brand img {
    height: 42px;
    width: auto;
    object-fit: contain;
    display: block;
    padding: 4px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.navbar-brand:hover img {
    transform: scale(1.04);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
}

/* ── Contenedor general ──────────────────────────────────────── */
.contenedor-general {
    width: min(var(--wrapper-width), 92vw);
    margin: 0 auto;
    padding: 2rem 1.25rem;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* ── Página wrapper (layout de página completa) ──────────────── */
.page-wrapper {
    max-width: var(--wrapper-width);
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.page-titulo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

/* ── Botones globales ────────────────────────────────────────── */
.btn-primario {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-btn);
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-block;
}

.btn-primario:hover {
    background: var(--brand-dark);
    color: #fff;
}

.btn-secundario {
    background: transparent;
    color: var(--brand);
    border: 1px solid var(--brand);
    border-radius: var(--radius-btn);
    padding: 0.45rem 1.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.15s;
    text-decoration: none;
    display: inline-block;
}

.btn-secundario:hover {
    background: var(--brand-light);
    color: var(--brand);
}

/* ── Index / Home ────────────────────────────────────────────── */
.home-hero {
    text-align: center;
    padding: 3.5rem 1.5rem 2rem;
    max-width: var(--wrapper-width);
    margin: 0 auto;
}

.home-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    margin-bottom: 0.6rem;
}

.home-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.home-hero-acciones {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.home-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
    max-width: var(--wrapper-width);
    margin: 0 auto 3rem;
    padding: 0 1.5rem;
}

.home-card {
    flex: 0 1 240px;
}

.home-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s;
    text-decoration: none;
    color: inherit;
}

.home-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    color: inherit;
}

.home-card-icono {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.home-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.home-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.45;
}

.home-card-tag {
    margin-top: auto;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.04em;
}

/* ── Pautas ──────────────────────────────────────────────────── */
.pautas-wrapper {
    max-width: var(--wrapper-width);
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.pautas-titulo {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.pautas-filtros {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.pauta-filtro {
    padding: 0.35rem 1rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-input);
    background: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.15s, border-color 0.15s;
}

.pauta-filtro.activo,
.pauta-filtro:hover {
    background: var(--brand);
    color: #fff;
    border-color: var(--brand);
}

.pauta-buscador {
    display: block;
    width: 100%;
    padding: 0.5rem 1.25rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-input);
    font-size: 0.875rem;
    outline: none;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.pauta-buscador:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-focus);
}

.pautas-conteo {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.pautas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.pauta-card {
    background: #fff;
    border: 1px solid rgba(17, 24, 39, 0.08);
    border-radius: 18px;
    padding: 1rem 1rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    position: relative;
    overflow: hidden;
}

.pauta-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, var(--brand) 0%, rgba(74, 124, 89, 0.6) 100%);
}

.pauta-card:hover {
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.1);
    border-color: rgba(74, 124, 89, 0.22);
    transform: translateY(-2px);
}

.pauta-card-header {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding-top: 0.25rem;
}

.pauta-icono {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 1px solid rgba(74, 124, 89, 0.12);
}

.pauta-categoria {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--brand);
    letter-spacing: 0.05em;
    display: inline-block;
    margin-bottom: 0.35rem;
    padding: 0.22rem 0.55rem;
    background: rgba(74, 124, 89, 0.08);
    border-radius: 999px;
}

.pauta-nombre {
    font-size: 1.05rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.3;
    color: #1f2937;
}

.pauta-subtitulo {
    font-size: 0.78rem;
    color: var(--text-subtle);
    margin: 0.22rem 0 0;
    line-height: 1.45;
}

.pauta-meta {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
    font-size: 0.72rem;
    color: #555;
    margin-top: 0.1rem;
}

.pauta-meta span {
    background: rgba(17, 24, 39, 0.03);
    border: 1px solid rgba(17, 24, 39, 0.06);
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.pauta-descripcion {
    font-size: 0.8rem;
    color: var(--text-soft);
    margin: 0;
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 3.2em;
}

.pauta-acciones {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: auto;
}

.btn-aplicar {
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 0.78rem 0.9rem;
    font-size: 0.83rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 8px 18px rgba(74, 124, 89, 0.18);
}

.btn-aplicar:hover {
    background: var(--brand-dark);
    transform: translateY(-1px);
}

.btn-detalle {
    background: transparent;
    color: var(--brand);
    border: 1px solid rgba(74, 124, 89, 0.35);
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
}

.btn-detalle:hover {
    background: var(--brand-light);
    border-color: rgba(74, 124, 89, 0.55);
}

/* ── Mis evaluaciones ────────────────────────────────────────── */
.evaluaciones-lista {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.evaluacion-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-card);
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.evaluacion-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
    border-color: rgba(74, 124, 89, 0.3);
    color: inherit;
}

.evaluacion-card-icono {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    font-size: 1.3rem;
    flex-shrink: 0;
    border: 1px solid rgba(74, 124, 89, 0.12);
}

.evaluacion-card-info {
    flex: 1;
    min-width: 0;
}

.evaluacion-card-titulo {
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.15rem;
}

.evaluacion-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.evaluacion-card-puntaje {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--brand-light);
    border-radius: 12px;
    padding: 0.4rem 0.9rem;
    flex-shrink: 0;
}

.evaluacion-card-puntaje-valor {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--brand-dark);
    line-height: 1.1;
}

.evaluacion-card-puntaje-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-subtle);
}

.evaluacion-card-flecha {
    font-size: 1.2rem;
    color: var(--brand);
    flex-shrink: 0;
    transition: transform 0.15s ease;
}

.evaluacion-card:hover .evaluacion-card-flecha {
    transform: translateX(3px);
}

@media (max-width: 640px) {
    .evaluacion-card {
        flex-wrap: wrap;
    }

    .evaluacion-card-flecha {
        display: none;
    }
}

/* ── Detalle de evaluación ───────────────────────────────────── */
.evaluacion-volver {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand);
    text-decoration: none;
    margin-bottom: 1rem;
}

.evaluacion-volver:hover {
    color: var(--brand-dark);
    text-decoration: underline;
}

.evaluacion-detalle-header {
    background: linear-gradient(135deg, var(--brand-light) 0%, #fff 100%);
    border: 1px solid rgba(74, 124, 89, 0.15);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    margin-bottom: 1.75rem;
}

.evaluacion-detalle-titulo {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 0.2rem;
}

.evaluacion-detalle-version {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.evaluacion-detalle-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.evaluacion-meta-pill {
    background: #fff;
    border: 1px solid rgba(74, 124, 89, 0.2);
    color: var(--text-soft);
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.evaluacion-meta-pill-destacado {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

.evaluacion-seccion-titulo {
    font-weight: 700;
    color: #1f2937;
    margin: 1.5rem 0 0.9rem;
}

.evaluacion-resultado-badge {
    background: var(--brand-light);
    border: 1px solid rgba(74, 124, 89, 0.2);
    color: var(--brand-dark);
    border-radius: var(--radius-pill);
    padding: 0.4rem 0.9rem;
    font-weight: 600;
    font-size: 0.85rem;
}

.evaluacion-campo-card {
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.evaluacion-campo-card .card-header {
    background: var(--brand-light);
    border-bottom: 1px solid rgba(74, 124, 89, 0.15);
    color: var(--brand-dark);
}

.evaluacion-respuesta-item {
    transition: background 0.15s ease;
}

.evaluacion-respuesta-item:hover {
    background: rgba(74, 124, 89, 0.04);
}

/* ── AdminHub Sidebar ─────────────────────────────────────── */
body.admin-layout {
    margin: 0;
    padding-top: 0;
    min-height: 100vh;
    display: block;
    background: #f8fafc;
}

body.admin-layout *,
body.admin-layout *::before,
body.admin-layout *::after {
    box-sizing: border-box;
}

.admin-layout {
    min-height: 100vh;
    display: flex;
    background: #f8fafc;
    width: 100%;
    overflow-x: hidden;
}

.admin-sidebar {
    width: 260px;
    min-height: 100vh;
    background: #fff;
    border-right: 1px solid var(--border);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.05);
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1030;
}

.sidebar-brand a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #111;
    font-weight: 700;
}

.sidebar-brand img {
    height: 42px;
    width: auto;
    object-fit: contain;
    border-radius: 14px;
    background: var(--brand-light);
    padding: 6px;
}

.sidebar-toggle {
    display: none;
    width: 100%;
    background: var(--brand);
    color: #fff;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1rem;
    font-weight: 700;
    cursor: pointer;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sidebar-link {
    display: block;
    color: var(--text-soft);
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 0.95rem;
    transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover,
.sidebar-link.active {
    background: var(--brand-light);
    color: var(--brand);
}

.sidebar-footer {
    margin-top: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.sidebar-workspace-button {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.8rem 0.85rem;
    border: 1px solid var(--brand);
    border-radius: 0.85rem;
    background: var(--brand);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 6px 14px rgba(74, 124, 89, 0.18);
    transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.sidebar-workspace-button:hover {
    background: var(--brand-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(74, 124, 89, 0.24);
}

.sidebar-workspace-icon {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.6rem;
    background: rgba(255, 255, 255, 0.18);
    font-size: 1.2rem;
    font-weight: 700;
}

.sidebar-workspace-button strong,
.sidebar-workspace-button small {
    display: block;
}

.sidebar-workspace-button strong {
    font-size: 0.9rem;
}

.sidebar-workspace-button small {
    margin-top: 0.1rem;
    opacity: 0.8;
}

.admin-content {
    margin-left: 260px;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-left: 1rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem 0;
}

.admin-header h1 {
    margin: 0;
    font-size: clamp(1.8rem, 2vw, 2.5rem);
    line-height: 1.2;
    color: #111827;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-subtitle {
    color: var(--text-muted);
    margin: 0.25rem 0 0;
}

.admin-main {
    flex: 1;
    padding: 1.5rem 2rem 2rem;
}

.admin-message-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.admin-alert {
    border-radius: 0.9rem;
    border: 1px solid transparent;
    padding: 0.9rem 1rem;
    margin: 0;
    box-shadow: 0 10px 22px rgba(17, 24, 39, 0.06);
}

.admin-main > *:first-child {
    margin-top: 0;
}

.admin-panel-overview {
    max-width: var(--wrapper-width);
}

.admin-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.5rem;
    box-shadow: var(--shadow-card);
}

.admin-btn-primary,
.admin-btn-secondary,
.admin-btn-danger {
    border-radius: 0.75rem;
    padding: 0.55rem 0.9rem;
    font-size: 0.82rem;
    font-weight: 600;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.admin-btn-primary {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
}

.admin-btn-primary:hover {
    background: var(--brand-dark);
    color: #fff;
}

.admin-btn-secondary {
    background: #fff;
    color: var(--brand);
    border: 1px solid rgba(74, 124, 89, 0.28);
}

.admin-btn-secondary:hover {
    background: var(--brand-light);
    color: var(--brand);
}

.admin-btn-danger {
    background: #fff;
    border: 1px solid rgba(220, 53, 69, 0.25);
    color: #b42318;
}

.admin-btn-danger:hover {
    background: #fff5f5;
    color: #991b1b;
}

.admin-card-table {
    overflow: hidden;
    border-radius: 0.9rem;
    border: 1px solid var(--border);
}

.admin-card-table .table {
    margin-bottom: 0;
}

.modal {
    overflow: hidden;
}

.modal-dialog {
    max-height: calc(100dvh - 1rem);
    display: flex;
    align-items: center;
    overflow: visible;
}

.modal-content {
    border: 0;
    border-radius: 1rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: calc(100dvh - 1rem);
    background: #fff;
}

.modal-content,
.modal-body,
.modal-footer {
    -webkit-overflow-scrolling: touch;
}

.modal-evaluacion .modal-dialog {
    max-height: calc(100dvh - 1rem);
    margin: 0.5rem auto;
}

.modal-evaluacion .modal-content {
    max-height: calc(100dvh - 1rem);
}

.modal-evaluacion .modal-body {
    overflow-y: auto;
    overflow-x: visible;
    flex: 1 1 auto;
    min-height: 0;
    max-height: calc(100dvh - 180px);
    padding-bottom: 2rem;
}

.modal-evaluacion .modal-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
    padding-top: 0.9rem;
    padding-bottom: 0.9rem;
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(6px);
    border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.modal-evaluacion .modal-footer > * {
    margin: 0;
}

.modal-evaluacion .modal-footer .btn {
    min-width: 120px;
    border-radius: 0.8rem;
    padding: 0.72rem 1.1rem;
    font-weight: 600;
}

.admin-footer {
    padding: 1rem 2rem;
    background: #fff;
    border-top: 1px solid var(--border);
    color: var(--text-subtle);
}

.toast-container {
    width: min(92vw, 380px);
}

.toast {
    border-radius: 16px !important;
    overflow: hidden;
}

.toast-body {
    width: 100%;
    border-radius: 16px;
    padding: 0.9rem 1rem !important;
    font-size: 0.92rem;
}

.nav-user-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #1f2937;
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;
    background: #fff;
    font-weight: 600;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    min-width: 0;
}

.nav-user-button:hover,
.nav-user-button:focus,
.nav-user-button:active,
.nav-user-button.show {
    color: #111827;
    border-color: rgba(74, 124, 89, 0.4);
    background: #f8fcf9;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

.nav-user-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 4px var(--brand-focus), 0 10px 20px rgba(15, 23, 42, 0.12);
}

.nav-user-avatar {
    display: inline-grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: var(--brand-light);
    color: var(--brand);
    font-weight: 700;
}

.nav-user-name {
    max-width: min(34vw, 190px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-user-menu {
    border: 1px solid rgba(148, 163, 184, 0.4);
    border-radius: 0.8rem;
    padding: 0.45rem;
    min-width: 240px;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.nav-user-menu .dropdown-item-text,
.nav-user-menu .dropdown-item {
    border-radius: 0.6rem;
    padding: 0.55rem 0.7rem;
}

.nav-user-menu-title {
    color: #64748b !important;
    font-weight: 600;
}

.nav-user-menu .dropdown-item {
    color: #1f2937;
    font-weight: 500;
}

.nav-user-menu .dropdown-item:hover,
.nav-user-menu .dropdown-item:focus {
    color: #123327;
    background: #edf7f0;
}

.nav-user-menu .dropdown-divider {
    margin: 0.45rem 0;
}

@media (max-width: 991px) {
    .nav-user-dropdown {
        width: 100%;
    }

    .nav-user-button {
        width: 100%;
        justify-content: space-between;
    }

    .nav-user-name {
        max-width: none;
        flex: 1;
        text-align: left;
    }

    .nav-user-button + .dropdown-menu {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }
}

@media (max-width: 420px) {
    .nav-user-name {
        max-width: min(52vw, 180px);
    }
}

.auth-page {
    min-height: calc(100vh - 160px);
    display: grid;
    place-items: center;
    padding: 4rem 1rem;
    background: linear-gradient(135deg, #f8fbf9 0%, #ffffff 58%, #f1f7f3 100%);
}

.auth-panel {
    width: min(100%, 430px);
    padding: 2.4rem;
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.1);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1.8rem;
    color: var(--brand-dark);
    font-size: 1.1rem;
    font-weight: 800;
}

.auth-brand img {
    width: 2.4rem;
    height: 2.4rem;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.12);
}

.auth-eyebrow {
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auth-panel h1 {
    margin: 0.45rem 0 0.6rem;
    font-size: 2rem;
    letter-spacing: -0.02em;
}

.auth-intro {
    margin-bottom: 1.8rem;
    color: var(--text-muted);
}

.auth-panel .form-label {
    font-size: 0.88rem;
    font-weight: 600;
}

.auth-input {
    min-height: 3rem;
    border-radius: 0.7rem;
    padding: 0.75rem 0.9rem;
}

.auth-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 0.2rem var(--brand-focus);
}

.auth-submit {
    min-height: 3rem;
    margin-top: 0.5rem;
    border-radius: 0.7rem;
    font-weight: 700;
}

.auth-register {
    margin-top: 1.5rem;
    color: var(--text-muted);
    text-align: center;
}

.auth-register a {
    color: var(--brand-dark);
    font-weight: 700;
}

@media (max-width: 991px) {
    .admin-layout {
        flex-direction: column;
    }

    .admin-sidebar {
        position: relative;
        width: 100%;
        min-height: auto;
        box-shadow: none;
        border-right: none;
    }

    .sidebar-toggle {
        display: block;
    }

    .admin-content {
        margin-left: 0;
        padding-left: 0;
    }

    .admin-header,
    .admin-main,
    .admin-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 72px;
    }

    .navbar {
        min-height: 72px;
    }

    .navbar-brand img {
        height: 36px;
    }

    .pautas-wrapper {
        margin: 1rem auto;
        padding: 0 0.7rem;
    }

    .pautas-titulo {
        font-size: 1.45rem;
        margin-bottom: 0.9rem;
    }

    .pauta-buscador {
        padding: 0.8rem 0.95rem;
        font-size: 0.9rem;
        margin-bottom: 0.6rem;
    }

    .pautas-filtros {
        gap: 0.4rem;
        margin-bottom: 0.65rem;
    }

    .pauta-filtro {
        flex: 1 1 112px;
        min-width: 112px;
        padding: 0.38rem 0.7rem;
        font-size: 0.75rem;
    }

    .pautas-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .pauta-card {
        padding: 0.8rem 0.8rem 0.75rem;
        border-radius: 16px;
        gap: 0.6rem;
    }

    .pauta-card-header {
        display: grid;
        grid-template-columns: 42px 1fr;
        align-items: center;
        gap: 0.65rem;
    }

    .pauta-icono {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }

    .pauta-categoria {
        margin-bottom: 0.2rem;
        padding: 0.2rem 0.45rem;
        font-size: 0.62rem;
    }

    .pauta-nombre {
        font-size: 1.1rem;
    }

    .pauta-subtitulo {
        font-size: 0.72rem;
        margin-top: 0.15rem;
    }

    .pauta-meta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 0.35rem;
        margin-top: 0.1rem;
    }

    .pauta-meta span {
        width: 100%;
        justify-content: center;
        text-align: center;
        padding: 0.22rem 0.4rem;
        font-size: 0.68rem;
    }

    .pauta-descripcion {
        font-size: 0.74rem;
        line-height: 1.5;
        min-height: 0;
    }

    .pauta-acciones {
        width: 100%;
    }

    .btn-aplicar {
        width: 100%;
        padding: 0.72rem 0.85rem;
        font-size: 0.8rem;
    }

    .modal-dialog {
        margin: 0.5rem;
        max-height: calc(100dvh - 1rem);
        overflow: visible;
    }

    .modal-content {
        border-radius: 18px;
        max-height: calc(100dvh - 1rem);
        display: flex;
        flex-direction: column;
        overflow: visible;
    }

    .modal-header {
        position: sticky;
        top: 0;
        z-index: 2;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 0.9rem 1rem;
    }

    .modal-body {
        overflow-y: auto;
        overflow-x: visible;
        max-height: calc(100dvh - 170px);
        padding: 1rem;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        z-index: 2;
        background: #fff;
        border-top: 1px solid var(--border);
        padding: 0.9rem 1rem;
    }

    .modal-header,
    .modal-body,
    .modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .accordion-button {
        font-size: 0.96rem;
        padding: 0.8rem 1rem;
    }

    .accordion-body {
        padding: 0.9rem;
    }

    .form-check {
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .toast-container {
        right: 12px !important;
        left: auto !important;
        top: 10px !important;
    }
}

@media (max-width: 480px) {
    .pautas-wrapper {
        padding: 0 0.75rem;
    }

    .pautas-titulo {
        font-size: 1.3rem;
    }

    .pauta-buscador {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
    }

    .pauta-categoria {
        padding: 0.2rem 0.45rem;
    }

    .home-hero h1,
    .sobre-hero h1,
    .sobre-cta-inner h2 {
        font-size: 2rem;
    }

    .home-card,
    .sobre-card {
        flex-basis: 100%;
    }
}

/* ── Sobre NodoTO ────────────────────────────────────────────── */
.sobre-hero {
    text-align: center;
    padding: 4rem 1.5rem 3rem;
    max-width: 800px;
    margin: 0 auto;
}

.sobre-eyebrow {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--brand);
    text-transform: uppercase;
    margin-bottom: 1rem;
    background: var(--brand-light);
    padding: 0.25rem 0.85rem;
    border-radius: var(--radius-pill);
}

.sobre-hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.sobre-hero p {
    font-size: 1.05rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.sobre-section {
    padding: 3rem 0;
}

.sobre-wrapper {
    max-width: var(--wrapper-width);
    margin: 0 auto;
    padding: 0 1.5rem;
}

.sobre-label {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--brand);
    text-transform: uppercase;
    margin-bottom: 0.6rem;
}

.sobre-label-claro {
    color: var(--brand-light);
}

.sobre-texto-bloque h2 {
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.sobre-texto-bloque p {
    font-size: 1rem;
    color: var(--text-soft);
    line-height: 1.7;
    max-width: 640px;
}

.sobre-subtitulo-centrado {
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 2rem;
}

.sobre-cards {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.25rem;
}

.sobre-card {
    flex: 0 1 260px;
}

.sobre-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-card);
    padding: 1.5rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    box-shadow: var(--shadow-card);
    transition: box-shadow 0.2s, transform 0.2s;
}

.sobre-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-3px);
}

.sobre-card-icono {
    font-size: 2rem;
    margin-bottom: 0.25rem;
}

.sobre-card h5 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
}

.sobre-card p {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
}

.sobre-vision {
    background: var(--brand);
    border-radius: 20px;
    margin: 0 1.5rem;
    color: #fff;
}

.sobre-vision-inner {
    display: flex;
    gap: 3rem;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.sobre-vision-texto {
    flex: 1;
    min-width: 280px;
}

.sobre-vision-texto h2 {
    font-size: 1.7rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}

.sobre-vision-texto p {
    font-size: 0.97rem;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 0.75rem;
}

.sobre-vision-cita {
    flex: 0 0 280px;
    border-left: 3px solid rgba(255, 255, 255, 0.35);
    padding-left: 1.5rem;
}

.sobre-vision-cita blockquote {
    font-size: 1.15rem;
    font-style: italic;
    color: #fff;
    margin: 0 0 0.75rem;
    line-height: 1.5;
}

.sobre-cita-autor {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
}

.sobre-cta {
    text-align: center;
    padding: 4rem 1.5rem;
}

.sobre-cta-inner h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
}

.sobre-cta-inner p {
    font-size: 1rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}
