/* ==========================================================================
   SISTEMA DE NOTIFICACIONES Y BOLSA LABORAL - SENATI 2026
   Hoja de Estilos Institucional, Moderna y 100% Responsiva
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --senati-navy: #001733;
    --senati-blue-dark: #002244;
    --senati-blue: #003875;
    --senati-blue-light: #0056b3;
    --senati-accent: #0072ce;
    --senati-gold: #f59e0b;
    --senati-gold-hover: #d97706;
    
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-light: #94a3b8;
    
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 22px;
    
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 34, 68, 0.12);
    --shadow-xl: 0 20px 45px rgba(0, 23, 51, 0.22);
}

/* Reset y caja flexible */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body.senati-app {
    background-color: var(--bg-page);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* ==========================================================================
   1. BARRA DE NAVEGACIÓN INSTITUCIONAL SENATI
   ========================================================================== */
.senati-header {
    background: var(--senati-blue-dark);
    color: #ffffff;
    padding: 12px 24px;
    border-bottom: 2px solid var(--senati-blue-light);
    box-shadow: 0 4px 16px rgba(0, 23, 51, 0.35);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    max-width: 1350px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
}

.brand-senati {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-senati-badge {
    background: linear-gradient(135deg, #0056b3, #0080ff);
    color: #ffffff;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-weight: 900;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(0, 128, 255, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.brand-texts {
    display: flex;
    flex-direction: column;
}

.senati-title {
    font-size: 19px;
    font-weight: 900;
    color: #ffffff;
    letter-spacing: 0.6px;
    line-height: 1.2;
}

.senati-subtitle {
    font-size: 11px;
    color: #93c5fd;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.8px;
}

/* Botón Hamburguesa Móvil */
.mobile-menu-btn {
    display: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-size: 22px;
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

/* Enlaces de Navegación */
.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-item {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    padding: 9px 15px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-item:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
}

.nav-item.active {
    color: #ffffff;
    background: var(--senati-blue-light);
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.4);
}

.nav-admin-item {
    background: rgba(245, 158, 11, 0.18);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.nav-admin-item:hover {
    background: rgba(245, 158, 11, 0.3);
    color: #ffffff;
}

/* Acciones de Usuario & Campana */
.user-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-pill {
    background: rgba(255, 255, 255, 0.08);
    padding: 6px 14px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    gap: 9px;
}

.user-avatar-icon {
    font-size: 16px;
}

.user-pill-texts {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.user-pill-name {
    font-size: 12.5px;
    color: #f8fafc;
    line-height: 1.2;
    white-space: nowrap;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.role-badge-tag {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    display: inline-block;
    width: fit-content;
}

.role-admin {
    background: #f59e0b;
    color: #78350f;
}

.role-reclutador {
    background: #3b82f6;
    color: #ffffff;
}

.role-estudiante {
    background: #10b981;
    color: #ffffff;
}

.btn-logout-senati {
    background: #ef4444;
    color: #ffffff;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.btn-logout-senati:hover {
    background: #dc2626;
    transform: translateY(-1px);
}

/* ==========================================================================
   2. CENTRO DE NOTIFICACIONES (DROPDOWN Y CAMPANA)
   ========================================================================== */
.notification-wrapper {
    position: relative;
}

.btn-notification {
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: all 0.2s ease;
}

.btn-notification:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.05);
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    min-width: 19px;
    height: 19px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--senati-blue-dark);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.5);
    animation: pulseBadge 2s infinite;
}

@keyframes pulseBadge {
    0% { transform: scale(1); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.notifications-dropdown {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;
    width: 370px;
    max-width: 90vw;
    background: #ffffff;
    border-radius: var(--radius-md);
    box-shadow: 0 15px 40px rgba(0, 23, 51, 0.28);
    border: 1px solid var(--border-color);
    z-index: 2000;
    overflow: hidden;
    animation: slideDownFade 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    background: #f8fafc;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header h4 {
    font-size: 14px;
    color: var(--senati-blue-dark);
    font-weight: 800;
}

.mark-read-btn {
    background: none;
    border: none;
    font-size: 11.5px;
    color: var(--senati-blue-light);
    font-weight: 700;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
}

.mark-read-btn:hover {
    background: #e0f2fe;
}

.notif-filter-bar {
    display: flex;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    border-bottom: 1px solid #f1f5f9;
}

.notif-filter-chip {
    background: #f1f5f9;
    border: none;
    padding: 4px 10px;
    border-radius: 14px;
    font-size: 11px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
}

.notif-filter-chip.active {
    background: var(--senati-blue-light);
    color: #ffffff;
}

.notification-list {
    list-style: none;
    max-height: 330px;
    overflow-y: auto;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 16px;
    border-bottom: 1px solid #f1f5f9;
    cursor: pointer;
    transition: background 0.15s ease;
}

.notif-item:hover {
    background: #f8fafc;
}

.notif-item.unread {
    background: #eff6ff;
    border-left: 4px solid var(--senati-blue-light);
}

.notif-icon-col {
    font-size: 18px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.notif-content {
    flex: 1;
}

.notif-item-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.3;
    margin-bottom: 2px;
}

.notif-item-msg {
    font-size: 11.5px;
    color: #475569;
    line-height: 1.4;
    margin-bottom: 4px;
}

.notif-item-time {
    font-size: 10.5px;
    color: #94a3b8;
    font-weight: 500;
}

.notif-empty {
    padding: 30px 20px;
    text-align: center;
    font-size: 12.5px;
    color: #94a3b8;
}

.dropdown-footer {
    padding: 10px 14px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.btn-broadcast-notif {
    width: 100%;
    background: #ffffff;
    border: 1px dashed var(--senati-blue-light);
    color: var(--senati-blue-light);
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-broadcast-notif:hover {
    background: var(--senati-blue-light);
    color: #ffffff;
    border-style: solid;
}

/* ==========================================================================
   3. BANNER HERO INSTITUCIONAL
   ========================================================================== */
.hero-senati {
    background: linear-gradient(135deg, rgba(0, 23, 51, 0.94) 0%, rgba(0, 56, 117, 0.90) 55%, rgba(0, 86, 179, 0.82) 100%),
                url('assets/img/hero_banner.jpg') center/cover no-repeat;
    color: #ffffff;
    padding: 60px 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 -10px 25px rgba(0, 0, 0, 0.2);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
}

.badge-hero-wrapper {
    margin-bottom: 14px;
}

.badge-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.8px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(4px);
}

.pulse-indicator {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4);
    display: inline-block;
}

.hero-senati h1 {
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
    line-height: 1.2;
}

.hero-senati p {
    font-size: 16px;
    color: #cbd5e1;
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto 28px auto;
}

.hero-actions-row {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

.btn-publish-hero {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 15px;
    font-weight: 800;
    padding: 13px 28px;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-publish-hero:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.5);
}

.btn-broadcast-hero {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 13px 24px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-broadcast-hero:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

/* ==========================================================================
   4. BARRA DE BÚSQUEDA Y FILTROS INTERACTIVOS
   ========================================================================== */
.search-filter-section {
    max-width: 1300px;
    width: 100%;
    margin: -28px auto 26px auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    position: relative;
    z-index: 20;
    flex-wrap: wrap;
}

.search-container {
    flex: 1;
    min-width: 290px;
    background: #ffffff;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border-color);
}

.search-icon {
    font-size: 17px;
    color: var(--text-light);
}

.search-container input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 14px;
    color: var(--text-main);
    background: transparent;
}

.search-clear-btn {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 50%;
}

.search-clear-btn:hover {
    color: var(--text-main);
    background: #f1f5f9;
}

.filter-pills-row {
    display: flex;
    gap: 8px;
    background: #ffffff;
    padding: 6px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    border: 1.5px solid var(--border-color);
    overflow-x: auto;
}

.filter-pill {
    background: transparent;
    border: none;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.filter-pill:hover {
    color: var(--senati-blue-light);
    background: #f1f5f9;
}

.filter-pill.active {
    background: var(--senati-blue-light);
    color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 86, 179, 0.3);
}

/* ==========================================================================
   5. CONTENEDOR Y GRID DE ANUNCIOS
   ========================================================================== */
.container-anuncios {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px 40px 20px;
    flex: 1;
}

.anuncios-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}

.anuncios-header-row h2 {
    font-size: 22px;
    color: var(--senati-blue-dark);
    font-weight: 900;
}

.anuncios-subheading {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 3px;
}

.sort-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
}

.sort-wrapper select {
    padding: 6px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--text-main);
    outline: none;
    background: #ffffff;
}

.anuncios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 22px;
}

.card-anuncio {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border-color);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    position: relative;
}

.card-anuncio:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: #93c5fd;
}

.card-top {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 14px;
}

.company-badge-icon {
    background: linear-gradient(135deg, #003875, #0072ce);
    color: white;
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 16px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 114, 206, 0.3);
}

.card-title-group {
    flex: 1;
}

.puesto-title {
    font-size: 17px;
    font-weight: 800;
    color: var(--text-main);
    line-height: 1.3;
    margin-bottom: 4px;
}

.empresa-name {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.badge-modalidad {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.badge-remoto {
    background: #e0e7ff;
    color: #3730a3;
}

.badge-hibrido, .badge-híbrido {
    background: #f3e8ff;
    color: #6b21a8;
}

.badge-presencial {
    background: #e0f2fe;
    color: #0369a1;
}

.anuncio-desc {
    font-size: 13.5px;
    color: #475569;
    line-height: 1.55;
    margin-bottom: 18px;
    flex: 1;
}

.anuncio-metadata {
    background: #f8fafc;
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 12.5px;
    margin-bottom: 18px;
    border: 1px solid #f1f5f9;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #334155;
}

.meta-salary strong {
    color: #166534;
}

.card-footer {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-postular {
    flex: 1;
    background: var(--senati-blue-light);
    color: white;
    border: none;
    padding: 11px 16px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 13.5px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.btn-postular:hover {
    background: var(--senati-blue);
    transform: translateY(-1px);
}

.btn-delete-anuncio {
    background: #fee2e2;
    color: #dc2626;
    border: none;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-anuncio:hover {
    background: #dc2626;
    color: white;
}

/* Estado Vacío */
.empty-state {
    grid-column: 1 / -1;
    background: #ffffff;
    padding: 50px 20px;
    border-radius: var(--radius-md);
    text-align: center;
    border: 1.5px dashed var(--border-color);
}

.empty-state-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.empty-state h3 {
    font-size: 18px;
    color: var(--text-main);
    font-weight: 800;
}

.empty-state p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ==========================================================================
   6. MODALES Y DIÁLOGOS EMERGENTES
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.7);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    backdrop-filter: blur(5px);
    padding: 20px;
}

.modal-card {
    background: #ffffff;
    width: 100%;
    max-width: 580px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 28px;
    max-height: 90vh;
    overflow-y: auto;
    animation: zoomModal 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes zoomModal {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-large {
    max-width: 860px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 14px;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--senati-blue-dark);
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    font-weight: 700;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
}

.modal-body-two-cols {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.job-details h4 {
    font-size: 14px;
    color: var(--senati-blue-dark);
    margin-bottom: 6px;
    font-weight: 800;
}

.job-details p {
    font-size: 13.5px;
    line-height: 1.6;
    color: #334155;
    margin-bottom: 16px;
}

.job-meta-box {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.apply-form-box {
    background: #eff6ff;
    border: 1.5px solid #bfdbfe;
    border-radius: var(--radius-md);
    padding: 20px;
}

.apply-form-header h4 {
    font-size: 15px;
    color: var(--senati-blue);
    font-weight: 800;
    margin-bottom: 4px;
}

.apply-form-header p {
    font-size: 12.5px;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.4;
}

/* Formularios */
.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 700;
    color: #334155;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    outline: none;
    background: #ffffff;
    color: var(--text-main);
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--senati-blue-light);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.15);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.modal-actions-btn {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

/* Botones universales */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 18px;
    font-size: 13.5px;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary {
    background: var(--senati-blue-light);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--senati-blue);
}

.btn-secondary {
    background: #e2e8f0;
    color: #475569;
}

.btn-secondary:hover {
    background: #cbd5e1;
}

/* ==========================================================================
   7. DASHBOARD PANEL Y GESTIÓN DE TABLAS
   ========================================================================== */
.container {
    max-width: 1350px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #ffffff;
    border-radius: var(--radius-md);
    padding: 20px;
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.stat-title {
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
}

.stat-value {
    font-size: 28px;
    font-weight: 900;
    color: var(--senati-blue-dark);
}

.card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 24px;
    border: 1.5px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.card-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.dashboard-controls-row {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.table-select {
    padding: 9px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    outline: none;
    background: #ffffff;
    color: var(--text-main);
}

.search-input {
    padding: 9px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    outline: none;
    width: 220px;
}

.search-input:focus {
    border-color: var(--senati-blue-light);
}

/* Tablas Responsivas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    text-align: left;
    white-space: nowrap;
}

thead {
    background: #f8fafc;
    border-bottom: 2px solid var(--border-color);
}

th {
    padding: 12px 16px;
    font-size: 11.5px;
    font-weight: 800;
    color: #475569;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}

tr:hover td {
    background: #fbfcfe;
}

.badge-pill {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
}

/* Alertas */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* ==========================================================================
   8. TOAST NOTIFICACIONES FLOTANTES
   ========================================================================== */
.toast-notification {
    position: fixed;
    bottom: -100px;
    right: 24px;
    background: #0f172a;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 13.5px;
    font-weight: 600;
    z-index: 4000;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 5px solid var(--success);
    max-width: 420px;
}

.toast-notification.show {
    bottom: 24px;
}

/* ==========================================================================
   9. PIE DE PÁGINA INSTITUCIONAL
   ========================================================================== */
.senati-footer {
    background: #ffffff;
    border-top: 1px solid var(--border-color);
    padding: 30px 20px;
    margin-top: auto;
    color: var(--text-muted);
}

.footer-inner {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand p {
    font-size: 13px;
    color: #334155;
    margin-top: 2px;
}

.footer-brand small {
    font-size: 11.5px;
    color: var(--text-light);
}

.footer-copy {
    text-align: right;
    font-size: 12.5px;
}

/* ==========================================================================
   10. MEDIA QUERIES RESPONSIVAS (MÓVIL Y TABLET)
   ========================================================================== */
@media (max-width: 1024px) {
    .anuncios-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 820px) {
    .mobile-menu-btn {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        background: var(--senati-blue-dark);
        flex-direction: column;
        padding: 16px;
        gap: 8px;
        border-radius: var(--radius-sm);
        box-shadow: var(--shadow-xl);
        border: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-links.mobile-open {
        display: flex;
    }

    .nav-item {
        width: 100%;
        justify-content: flex-start;
    }

    .modal-body-two-cols {
        grid-template-columns: 1fr;
    }

    .hero-senati {
        padding: 44px 18px;
    }

    .hero-senati h1 {
        font-size: 26px;
    }

    .search-filter-section {
        margin-top: -16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-copy {
        text-align: center;
    }
}

@media (max-width: 540px) {
    .user-pill-name {
        display: none;
    }

    .anuncios-grid {
        grid-template-columns: 1fr;
    }

    .search-container {
        min-width: 100%;
    }

    .filter-pills-row {
        width: 100%;
    }

    .notifications-dropdown {
        width: 320px;
        right: -50px;
    }
}
