/* Reset y Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #D4AF37;
    --primary-dark: #B8941F;
    --secondary-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1a1a1a;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --sidebar-width: 280px;
    --header-height: 70px;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--light-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: rotate 30s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-box {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 0 40px rgba(212, 175, 55, 0.2);
    padding: 40px;
    width: 100%;
    max-width: 520px;
    border: 2px solid rgba(212, 175, 55, 0.2);
    position: relative;
    z-index: 1;
}

/* Responsive para login box */
@media (max-width: 768px) {
    .login-box {
        padding: 30px 25px;
        max-width: 90%;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .login-box {
        padding: 25px 20px;
        max-width: 95%;
        border-radius: 10px;
    }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    max-width: 100%;
    width: 100%;
    max-height: 150px;
    height: auto;
    margin: 0 auto 25px;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Responsive para el logo */
@media (max-width: 1024px) {
    .login-logo {
        max-height: 130px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .login-logo {
        max-height: 110px;
        margin-bottom: 18px;
    }
}

@media (max-width: 480px) {
    .login-logo {
        max-height: 90px;
        margin-bottom: 15px;
    }
}

@media (max-width: 360px) {
    .login-logo {
        max-height: 75px;
        margin-bottom: 12px;
    }
}

.login-header i {
    font-size: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Responsive para textos del login */
@media (max-width: 768px) {
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-header p {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .login-header h1 {
        font-size: 18px;
    }
    
    .login-header p {
        font-size: 12px;
    }
}

.login-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, rgba(212, 175, 55, 0.1) 100%);
    border-radius: 8px;
    padding: 15px;
    margin-top: 25px;
}

.login-footer p {
    margin: 8px 0;
    line-height: 1.6;
}

.login-footer strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Responsive para login footer */
@media (max-width: 480px) {
    .login-footer {
        font-size: 12px;
        padding: 12px;
    }
    
    .login-footer p {
        margin: 6px 0;
        line-height: 1.5;
    }
}

.login-footer p {
    margin: 5px 0;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark-color);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
}

.sidebar-header i {
    font-size: 28px;
    color: var(--primary-color);
    text-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

.sidebar-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
}

.user-info {
    padding: 20px;
    border-bottom: 2px solid rgba(212, 175, 55, 0.2);
    display: flex;
    gap: 15px;
    align-items: center;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.05) 0%, transparent 100%);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: #1a1a1a;
    box-shadow: 0 4px 6px rgba(212, 175, 55, 0.3);
}

.user-details h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 5px;
}

.user-details .badge {
    display: inline-block;
    margin-right: 5px;
    margin-top: 3px;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 25px;
}

.nav-section h4 {
    padding: 0 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
    position: relative;
}

.nav-item:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--primary-color);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.05) 100%);
    color: var(--primary-color);
    border-left: 3px solid var(--primary-color);
    font-weight: 600;
}

.nav-item i {
    width: 20px;
    font-size: 18px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 2px solid rgba(212, 175, 55, 0.2);
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.05) 100%);
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.content-header {
    background: white;
    padding: 20px 30px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 15px;
}

.content-header h1 {
    font-size: 28px;
    font-weight: 700;
    flex: 1;
}

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    display: none;
    border-radius: 6px;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: var(--light-color);
}

.menu-toggle:active {
    transform: scale(0.95);
}

.header-actions {
    display: flex;
    gap: 10px;
}

.content-body {
    flex: 1;
    padding: 30px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
}

.stat-icon.blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.stat-icon.green { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.stat-icon.orange { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.stat-icon.purple { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); }

.stat-details h3 {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 5px;
}

.stat-details p {
    color: var(--text-secondary);
    font-size: 14px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.dashboard-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-container {
    max-height: 300px;
    overflow-y: auto;
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
}

/* Table */
.table-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--light-color);
    border-bottom: 2px solid var(--border-color);
}

.data-table th {
    padding: 15px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
}

.data-table td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.data-table tbody tr:hover {
    background: var(--light-color);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* Form Controls */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="date"],
input[type="time"],
select,
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
    color: #000000 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #000000 !important;
}

.form-control:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

/* Placeholders visibles */
input::placeholder,
textarea::placeholder {
    color: #9ca3af !important;
    opacity: 1 !important;
}

input::-webkit-input-placeholder {
    color: #9ca3af !important;
}

input:-ms-input-placeholder {
    color: #9ca3af !important;
}

input::-ms-input-placeholder {
    color: #9ca3af !important;
}

/* Fix extra para login y formularios - asegurar texto negro */
#loginEmail,
#loginPassword,
.login-box input,
.login-box input[type="email"],
.login-box input[type="password"],
.login-box input[type="text"],
#loginScreen input,
#loginScreen input[type="email"],
#loginScreen input[type="password"],
#loginScreen input[type="text"] {
    color: #000000 !important;
    background-color: #ffffff !important;
    -webkit-text-fill-color: #000000 !important;
}

/* Fix para autocompletar del navegador */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active,
#loginEmail:-webkit-autofill,
#loginPassword:-webkit-autofill {
    -webkit-text-fill-color: #000000 !important;
    -webkit-box-shadow: 0 0 0 30px white inset !important;
    box-shadow: 0 0 0 30px white inset !important;
    color: #000000 !important;
    background-color: #ffffff !important;
}

/* Forzar color negro en TODOS los inputs del login */
.login-box *,
#loginScreen * {
    color: inherit;
}

.login-box input::placeholder,
#loginScreen input::placeholder {
    color: #9ca3af !important;
    opacity: 0.7 !important;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #1a1a1a;
    font-weight: 600;
    box-shadow: 0 4px 6px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(212, 175, 55, 0.4);
    color: #000;
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-success {
    background: var(--secondary-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn-outline-light {
    background: transparent;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-icon {
    width: 40px;
    height: 40px;
    padding: 0;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

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

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
}

.badge-primary {
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary-color);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--secondary-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.badge-secondary {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-secondary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active,
.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: var(--light-color);
}

.modal-content form {
    padding: 25px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Mensajes Layout */
.mensajes-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 20px;
    height: calc(100vh - 200px);
}

.mensajes-sidebar {
    background: white;
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
}

.mensajes-list {
    margin-top: 20px;
}

.mensaje-item {
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.mensaje-item:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.mensaje-item.unread {
    background: rgba(79, 70, 229, 0.05);
    border-left: 3px solid var(--primary-color);
}

.mensaje-item h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 5px;
}

.mensaje-item p {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 5px;
}

.mensaje-item small {
    font-size: 12px;
    color: var(--text-secondary);
}

.mensajes-content {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
    overflow-y: auto;
}

.mensaje-viewer .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-secondary);
}

.mensaje-viewer .empty-state i {
    font-size: 64px;
    margin-bottom: 15px;
}

.mensaje-detail h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.mensaje-meta {
    display: flex;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-secondary);
}

.mensaje-body {
    line-height: 1.8;
}

/* Asistencia Container */
.asistencia-container {
    background: white;
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-sm);
}

.asistencia-list {
    display: grid;
    gap: 10px;
}

.asistencia-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.asistencia-estudiante {
    display: flex;
    align-items: center;
    gap: 15px;
}

.asistencia-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(212, 175, 55, 0.3);
}

.asistencia-info h4 {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 3px;
}

.asistencia-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.asistencia-actions {
    display: flex;
    gap: 10px;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-muted { color: var(--text-secondary); }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Botón de WhatsApp para Sedes */
.whatsapp-support {
    padding: 15px;
    margin: 15px 0;
    background: #f8f9fa;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
}

.btn-whatsapp:hover {
    background: var(--primary-dark);
    color: white;
}

.btn-whatsapp i {
    font-size: 20px;
}

.btn-whatsapp span {
    font-size: 14px;
}

/* Animación pulse-whatsapp removida - v3.8.0 */

/* Responsive */
@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .mensajes-layout {
        grid-template-columns: 1fr;
        height: auto;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .section-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        max-width: 100%;
        flex-direction: column;
    }
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-secondary);
}

.loading i {
    font-size: 48px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.empty-state p {
    font-size: 15px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 5px;
}

.action-buttons .btn {
    padding: 6px 10px;
    font-size: 13px;
}

/* ============================================
   ESTILOS PARA SISTEMA DE PAGOS E INSCRIPCIONES
   ============================================ */

/* Tabs Container */
.tabs-container {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 20px;
}

.tab-btn {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background: rgba(79, 70, 229, 0.05);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Modal Large */
.modal-large {
    max-width: 800px;
    width: 90%;
}

/* Stats List (para dashboard de pagos) */
.stats-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 18px;
    font-weight: 600;
}

.stat-value.green {
    color: var(--secondary-color);
}

.stat-value.orange {
    color: var(--warning-color);
}

.stat-value.blue {
    color: var(--info-color);
}

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

/* Text Colors */
.text-danger {
    color: var(--danger-color) !important;
    font-weight: 600;
}

.text-success {
    color: var(--secondary-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

/* Badge Variants */
.badge-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

.badge-success {
    background-color: #d1fae5;
    color: #065f46;
}

.badge-warning {
    background-color: #fef3c7;
    color: #92400e;
}

.badge-info {
    background-color: #dbeafe;
    color: #1e40af;
}

.badge-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}

/* Checkbox personalizados para cuotas */
.cuota-checkbox {
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Form Text Helper */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: var(--text-secondary);
}

/* Responsive para modales grandes */
@media (max-width: 768px) {
    .modal-large {
        max-width: 95%;
    }

    .tabs-container {
        overflow-x: auto;
        white-space: nowrap;
    }

    .tab-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .stat-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* Estilos para Vista de Estudiante - Mis Cuotas */
.alert {
    padding: 15px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.alert i {
    font-size: 20px;
}

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

.alert-info {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.alert strong {
    font-weight: 600;
}

.alert ul {
    margin-bottom: 0;
}

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

.text-muted {
    color: var(--text-secondary);
}

/* Mostrar/Ocultar elementos según rol */
.show-for-estudiante {
    display: none;
}

/* Mejoras para tabla de cuotas de estudiantes */
#tablaMisCuotas tbody tr:hover {
    background-color: #f9fafb;
}

#tablaMisCuotas .badge-danger {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Estilos para botones de rol en gestión de usuarios */
#section-usuarios button[onclick*="verPorRol"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

#section-usuarios button[onclick*="verPorRol"]:active {
    transform: translateY(0);
}

/* Animación suave para las tarjetas de rol */
#section-usuarios button[onclick*="verPorRol"] {
    transition: all 0.3s ease;
}

/* Estilos para cards de estadísticas de pagos */
#section-estadisticas-pagos .stat-card[onclick] {
    cursor: pointer;
    transition: all 0.3s ease;
}

#section-estadisticas-pagos .stat-card[onclick]:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

#section-estadisticas-pagos .stat-card[onclick]:active {
    transform: translateY(-2px);
}

/* ==================================
   CLASES EN VIVO
   ================================== */

/* Animación de pulso para borde */
@keyframes pulse-border {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
    }
    50% {
        box-shadow: 0 4px 20px rgba(220, 38, 38, 0.4);
    }
}

/* Animación de pulso para botón */
@keyframes pulse-button {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(220, 38, 38, 0);
    }
}

/* Animación de pulso para badge */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Card de clase en vivo */
.clase-vivo-card {
    transition: all 0.3s ease;
}

.clase-vivo-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

.clase-vivo-card.activa {
    position: relative;
}

/* Botón de clase en vivo */
.btn-danger.pulse {
    position: relative;
    overflow: hidden;
    animation: pulse-button 1.5s infinite;
}

.btn-danger.pulse::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    animation: ripple 1.5s infinite;
}

@keyframes ripple {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 300px;
        height: 300px;
        opacity: 0;
    }
}

/* Botones de Instituto/Tabs */
.instituto-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

.instituto-tab {
    padding: 12px 24px;
    border: 2px solid #e5e7eb;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instituto-tab:hover {
    border-color: #667eea;
    background: #f0f4ff;
    transform: translateY(-2px);
}

.instituto-tab.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
    box-shadow: 0 4px 6px rgba(102, 126, 234, 0.3);
}

.instituto-tab i {
    font-size: 1.1em;
}

/* Estilos para stat-icon adicionales */
.stat-icon.purple {
    background: linear-gradient(135deg, #a855f7 0%, #9333ea 100%);
}

.stat-icon.yellow {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}

/* Tabla de detalles mejorada */
.data-table tbody tr:hover {
    background: #f9fafb;
}

.data-table tbody tr.warning-row {
    background: #fef3c7;
}

.data-table tbody tr.danger-row {
    background: #fee2e2;
}

/* Badges de estado */
.badge-meses {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.badge-meses.low {
    background: #fef3c7;
    color: #92400e;
}

.badge-meses.medium {
    background: #fed7aa;
    color: #9a3412;
}

.badge-meses.high {
    background: #fecaca;
    color: #991b1b;
}

.badge-meses.critical {
    background: #dc2626;
    color: white;
}

/* Modal Footer */
.modal-footer {
    padding: 20px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #f9fafb;
}

/* Form Text Pequeño */
.form-text {
    display: block;
    margin-top: 5px;
    font-size: 0.85em;
    color: #6b7280;
}

/* Resaltado de montos modificados */
.monto-modificado {
    background: #fef3c7;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 600;
    color: #92400e;
}

/* Responsive */
@media (max-width: 768px) {
    .clase-vivo-card > div {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .clase-vivo-card button {
        width: 100%;
        margin-top: 10px;
    }
    
    .instituto-tabs {
        flex-direction: column;
    }
    
    .instituto-tab {
        width: 100%;
        justify-content: center;
    }
}