:root {
    --primary: #1a3a5f;
    --primary-light: #2c5282;
    --secondary: #2c7a7b;
    --accent: #38b2ac;
    --success: #48bb78;
    --warning: #ecc94b;
    --danger: #f56565;
    --bg: #f7fafc;
    --card-bg: rgba(255, 255, 255, 0.9);
    --text: #2d3748;
    --text-light: #718096;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
}

/* Patrón de Fondo con Logo2 */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('logo2.png');
    background-repeat: repeat;
    background-size: 180px; /* Un poco más grande para que se luzca el diseño */
    opacity: 0.12; /* Ajustado para que se vean los colores sin molestar */
    z-index: -1;
    pointer-events: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

/* Glassmorphism Effect */
.glass {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    box-shadow: var(--shadow);
}

/* Navbar */
.navbar {
    background: var(--primary); /* Azul Marino */
    padding: 0.5rem 2rem;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    height: 55px;
    width: auto;
    object-fit: contain;
    mix-blend-mode: screen; /* Este truco elimina el fondo negro de la imagen */
    filter: brightness(1.1); /* Un pequeño ajuste para que el blanco brille más */
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    margin-right: auto;
    margin-left: 2rem;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 0.85;
    transition: opacity 0.3s;
    cursor: pointer;
}

.nav-link:hover {
    opacity: 1;
}

/* Hero Section Compacta y Lateral */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left; /* Texto a la izquierda */
    padding: 1rem 0;
    gap: 2rem;
    animation: fadeIn 0.8s ease-out;
}

.hero-text {
    flex: 1;
}

.hero h1 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.3rem;
    font-weight: 700;
}

.hero p {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
}

.hero-cards {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas pequeñas */
    gap: 0.8rem;
    margin-top: 0;
}

.card {
    padding: 0.8rem;
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: 12px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

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

.card i {
    font-size: 1.2rem;
    color: var(--secondary);
    margin-bottom: 0.3rem;
}

.card h3 {
    font-size: 0.8rem;
    margin-bottom: 0;
    color: var(--primary);
}

.card p {
    display: none; /* Ocultamos la descripción larga en este modo compacto */
}

.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    grid-template-rows: repeat(2, 1fr);
    gap: 1rem;
    max-width: 500px;
}

.highlight-link {
    background: var(--secondary);
    color: var(--white) !important;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    opacity: 1 !important;
    font-size: 0.85rem;
}

.highlight-link:hover {
    filter: brightness(1.1);
}

/* Responsive para Hero */
@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
    }
    .grid-2x2 {
        grid-template-columns: 1fr !important;
        width: 100%;
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 58, 95, 0.2);
}

.btn-block {
    width: 100%;
    padding: 1rem;
    background: var(--secondary);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 1rem;
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.modal.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    width: 90%;
    max-width: 450px;
    padding: 2.5rem;
    position: relative;
}

.close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
}

.form-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

.hidden {
    display: none !important;
}

/* Footer */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
    margin-top: auto;
}

/* Credencial Digital */
.credential-container {
    display: flex;
    justify-content: center;
    padding: 2rem 0;
}

.credential {
    width: 600px;
    max-width: 95vw;
    min-height: 300px;
    height: auto;
    background-color: var(--white);
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.cred-content-wrapper {
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)), 
        url('logo2.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: auto, 350px;
    position: relative;
}

.cred-header {
    background: var(--primary);
    padding: 1.2rem;
    text-align: center;
}

.cred-logo {
    width: 100%;
    max-width: 230px;
    mix-blend-mode: screen;
    filter: brightness(1.1);
}

.cred-body {
    padding: 2.5rem 1.5rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}



.cred-name {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.cred-id {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.cred-status {
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-debt {
    background: #fed7d7;
    color: #822727;
}

.cred-footer {
    padding: 1.2rem;
    background: #f7fafc;
    border-top: 1px solid #eee;
    text-align: center;
    margin-top: auto;
}

.qr-code {
    width: 130px;
    height: 130px;
    margin: 0 auto;
    display: block;
    border: 4px solid var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow);
    background: var(--white);
}

/* Sección de Novedades */
.events-container {
    padding: 1rem 0; /* Reducido */
}

.section-title {
    font-size: 1.6rem; /* Reducido */
    color: var(--primary);
    margin-bottom: 1.5rem;
    text-align: center;
}

.news-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.event-card {
    display: flex;
    padding: 1.5rem;
    gap: 1.5rem;
    align-items: center;
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--primary);
    color: var(--white);
    min-width: 70px;
    height: 70px;
    border-radius: 12px;
    font-weight: 700;
}

.event-date .day {
    font-size: 1.5rem;
    line-height: 1;
}

.event-date .month {
    font-size: 0.8rem;
}

.event-info {
    flex-grow: 1;
}

.event-info h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.event-info p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1rem;
}

.event-tags {
    display: flex;
    gap: 0.5rem;
}

.tag {
    font-size: 0.7rem;
    padding: 0.2rem 0.6rem;
    background: #edf2f7;
    border-radius: 4px;
    color: var(--text-light);
    font-weight: 600;
}

.btn-enroll {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--success);
    color: var(--white);
    padding: 0.6rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-enroll:hover {
    background: #276749;
    transform: scale(1.05);
}

/* Ajustes Responsive */
@media (max-width: 600px) {
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    .event-date {
        width: 100%;
    }
    .event-tags {
        justify-content: center;
    }
}

/* Administración */
.table-container {
    overflow-x: auto;
    padding: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
/* Finanzas */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    padding: 2rem;
    text-align: center;
}

.stat-card h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-value.danger { color: var(--danger); }
.stat-value.success { color: var(--success); }

.charts-container {
    min-height: 400px;
    width: 100%;
}

.admin-table th {
    padding: 1rem;
    border-bottom: 2px solid #edf2f7;
    color: var(--text-light);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: background 0.2s;
}

.admin-table th:hover {
    background: #f7fafc;
    color: var(--primary);
}

.grid-2x2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    padding: 1.5rem;
    text-align: center;
    border-radius: 1rem;
    border: 1px solid rgba(255,255,255,0.2);
}

.stat-card h3 {
    font-size: 0.9rem;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-value.success { color: #38a169; }
.stat-value.danger { color: #e53e3e; }

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid #edf2f7;
    font-size: 0.95rem;
}

.role-select {
    padding: 0.4rem;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    background: #f8f9fa;
    font-family: inherit;
    cursor: pointer;
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.status-active {
    background: #c6f6d5;
    color: #22543d;
}

.status-badge.status-warn {
    background: #fefcbf;
    color: #744210;
}

.status-badge.status-orange {
    background: #feebc8;
    color: #7b341e;
}

.status-badge.status-debt {
    background: #fed7d7;
    color: #822727;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    color: var(--text-light);
    padding: 0.5rem;
    transition: color 0.2s;
}

.btn-icon:hover {
    color: var(--primary);
}

.btn-icon.danger:hover {
    color: var(--danger);
}

.actions-cell {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Sistema de Tabs */
.tabs-container, .sub-tabs-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 0.5rem;
}

.tab-btn, .sub-tab-btn, .about-tab-btn {
    background: none;
    border: none;
    padding: 0.8rem 1.5rem;
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.3s;
    border-radius: 8px;
}

.tab-btn.active, .about-tab-btn.active {
    background: var(--primary);
    color: var(--white);
}

.sub-tab-btn.active {
    background: var(--secondary);
    color: var(--white);
}

.tab-content.hidden {
    display: none;
}

/* Buscador */
.search-box {
    flex-grow: 1;
}

.search-box input {
    width: 100%;
    padding: 0.8rem 1.2rem;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    background: var(--white);
    font-family: inherit;
}

.btn-pay {
    background: var(--success);
    color: var(--white);
    border: none;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-pay:hover {
    transform: scale(1.05);
}

/* Switch de Edición */
.edit-mode-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 1rem;
}

.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 20px;
}

.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #4a5568;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--success);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

.slider.round {
    border-radius: 34px;
}

.slider.round:before {
    border-radius: 50%;
}

/* Controles de Edición en Novedades */
.btn-delete-event {
    background: var(--danger);
    color: var(--white);
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    margin-top: 0.5rem;
}

.add-event-card {
    border: 2px dashed var(--secondary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: var(--secondary);
    min-height: 150px;
}

/* Grilla del Resumen General */
.resumen-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}
