/*
 * SGD Components — paleta visual alineada con research-web
 * Paleta: #0a2e4c (navy), #ffb90b (gold), Montserrat
 *
 * Componentes reutilizables entre módulos:
 *   .sgd-tabs              — pestañas con paleta SGD (úsalo junto a `nav nav-tabs`)
 *   .teacher-selector-card — card de selector de docente (admin opera sobre HV ajena)
 *   .target-user-badge     — badge "Cargando para: <uid>"
 *   .btn-own-profile       — botón de regreso a "Mi perfil"
 */

/* ── Pestañas ────────────────────────────────────────────── */
/* Patrón replicado de research-web: tabs en navy, activa/hover en dorado */
.sgd-tabs .nav-link {
    background-color: #0a2e4c;
    color: #ffb90b;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.875rem;
    border: none;
    border-radius: 6px 6px 0 0;
    padding: 0.55rem 1.1rem;
    margin-right: 5px;
}
.sgd-tabs.nav-tabs .nav-link.active,
.sgd-tabs.nav-tabs .nav-link.active:focus {
    background-color: #ffb90b !important;
    color: #0a2e4c !important;
    border: none !important;
    font-weight: 700;
}
.sgd-tabs .nav-link:hover:not(.active) {
    background-color: #ffb90b !important;
    color: #0a2e4c !important;
}

/* ── Acciones dentro de la barra de tabs ─────────────────── */
/* Botón outline (enlace externo a otro módulo, p.ej. "Documentos") */
.sgd-tabs .nav-link-action {
    background-color: #fff !important;
    color: #0a2e4c !important;
    border: 1.5px solid #0a2e4c !important;
    border-radius: 20px !important;
    padding: 0.4rem 1rem !important;
    margin: 0.2rem 0.3rem 0.2rem 0;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s;
}
.sgd-tabs .nav-link-action:hover {
    background-color: #0a2e4c !important;
    color: #ffb90b !important;
    border-color: #0a2e4c !important;
}

/* Botón primario (call-to-action / cierre de flujo, p.ej. "Enviar a revisión") */
/* Diferenciado del tab activo (que es dorado plano) usando verde de "envío" */
.sgd-tabs .nav-link-action-primary {
    background: linear-gradient(135deg, #198754 0%, #146c43 100%) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 0.4rem 1.1rem !important;
    margin: 0.2rem 0.3rem 0.2rem 0;
    font-weight: 700;
    font-size: 0.8rem;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(25, 135, 84, 0.3);
}
.sgd-tabs .nav-link-action-primary:hover,
.sgd-tabs .nav-link-action-primary.active {
    background: linear-gradient(135deg, #146c43 0%, #0f5132 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(25, 135, 84, 0.45);
}

/* ── Selector de docente (admin/sub-admin) ───────────────── */
.teacher-selector-card {
    background: linear-gradient(135deg, #0a2e4c 0%, #1e3c72 100%);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.teacher-selector-card label {
    color: #ffb90b;
    font-weight: 700;
    font-size: 0.875rem;
    margin: 0;
    white-space: nowrap;
}
.teacher-selector-card .form-select {
    border-radius: 20px;
    border: 2px solid #ffb90b;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
    max-width: 350px;
    flex: 1;
}
.teacher-selector-card .btn-own-profile {
    background: transparent;
    border: 2px solid rgba(255, 185, 11, 0.5);
    border-radius: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding: 0.4rem 1rem;
    white-space: nowrap;
    transition: all 0.2s;
}
.teacher-selector-card .btn-own-profile:hover {
    border-color: #ffb90b;
    color: #ffb90b;
}
.target-user-badge {
    background: rgba(255, 185, 11, 0.15);
    border: 1px solid rgba(255, 185, 11, 0.4);
    border-radius: 20px;
    color: #ffb90b;
    font-size: 0.8rem;
    padding: 0.3rem 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

/* ── Toasts SGD (notificaciones efímeras estilo research-web) ── */
.sgd-toast {
    box-shadow: 0 4px 16px rgba(10, 46, 76, 0.25);
    border: none;
    margin-bottom: 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.875rem;
}
.sgd-toast .toast-header {
    border-bottom: none;
    font-weight: 600;
    padding: 0.6rem 0.9rem;
}
.sgd-toast .toast-body {
    padding: 0.85rem 1rem;
    color: #0a2e4c;
    line-height: 1.4;
}

/* ─────────────────────────────────────────────────────────────────────
   Patrón sgd-cv-card — tarjetas con header navy + dorado tipo pestaña
   institucional. Adoptado 2026-05-08 para `revisarHojaVida` y replicado
   en `teacherevaluation` (planMejoramiento, gestionEvaluacionDocente,
   resumenDocente, detalleEvaluacion).
   Doc canónico: `.claude/patron-homogenizacion-hv-cards.md`.
   ───────────────────────────────────────────────────────────────────── */
.sgd-cv-card .sgd-cv-card-header {
    background: #0a2e4c;
    color: #ffb90b;
    cursor: pointer;
    user-select: none;
    padding: 0.7rem 1.15rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 6px 6px 0 0;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.sgd-cv-card .sgd-cv-card-header:hover { background: #0e3960; }
/* Variante --static: cards de acción cuyo contenido siempre está visible. */
.sgd-cv-card .sgd-cv-card-header--static { cursor: default; }
.sgd-cv-card .sgd-cv-card-header--static:hover { background: #0a2e4c; }
.sgd-cv-card .sgd-cv-card-header[aria-expanded="false"],
.sgd-cv-card .sgd-cv-card-header.collapsed { border-radius: 6px; }
.sgd-cv-card .sgd-chevron { transition: transform 0.2s; }
.sgd-cv-card .sgd-cv-card-header[aria-expanded="false"] .sgd-chevron,
.sgd-cv-card .sgd-cv-card-header.collapsed .sgd-chevron { transform: rotate(-90deg); }

/* Campo read-only (label uppercase + valor con fallback "No registrado"). */
.sgd-cv-field {
    border-left: 3px solid #0a2e4c;
    padding: 0.45rem 0.7rem;
    background: #f8f9fa;
    border-radius: 4px;
    height: 100%;
}
.sgd-cv-field-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #6c757d;
    margin-bottom: 0.1rem;
    letter-spacing: 0.4px;
}
.sgd-cv-field-value {
    font-size: 0.92rem;
    color: #212529;
    word-break: break-word;
    min-height: 1.2em;
}
.sgd-cv-field-value.is-empty {
    color: #adb5bd;
    font-style: italic;
}

/* Sub-sección dentro de un card (heading navy + border-bottom dorado). */
.sgd-cv-subsection {
    color: #0a2e4c;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1rem 0 0.6rem 0;
    padding-bottom: 0.3rem;
    border-bottom: 2px solid #ffb90b;
}
.sgd-cv-subsection:first-child { margin-top: 0; }

/* Botones de soporte/documento (pill outline navy → solid navy + gold). */
.sgd-doc-btn {
    border-radius: 20px;
    border: 1px solid;
    padding: 0.5rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 500;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    transition: all 0.15s;
    line-height: 1.25;
}
.sgd-doc-btn--available { background: #fff; border-color: #0a2e4c; color: #0a2e4c; }
.sgd-doc-btn--available:hover,
.sgd-doc-btn--available:focus { background: #0a2e4c; border-color: #0a2e4c; color: #ffb90b; }
.sgd-doc-btn--missing {
    background: #f8f9fa; border-color: #dee2e6; color: #94999e;
    cursor: not-allowed; pointer-events: none; opacity: 0.85;
}
.sgd-doc-btn .sgd-doc-btn-label {
    flex: 1 1 auto; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sgd-doc-btn-toolbar {
    display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 0.75rem;
    align-items: center;
}
