/* Modern Typography - Google Fonts */
/* Modern Typography - Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
    /* Altius Brand Colors - From Logo */
    --primary-dark: #0f172a;
    --primary-blue: #1e3a8a;
    /* Royal Blue (alas) */
    --accent-blue: #2563eb;
    /* Bright Blue */
    --accent-blue-light: #3b82f6;
    --accent-red: #dc2626;
    /* Red (bordes) */
    --accent-orange: #f97316;
    /* Orange (baloncesto) */
    --white: #ffffff;
    --gray-light: #f1f5f9;
    --gray-medium: #cbd5e1;
    --gray-dark: #64748b;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;

    /* Modern Gradients - Altius Theme */
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #dc2626 100%);
    /* Blue to Red */
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-purple: linear-gradient(135deg, #1e3a8a 0%, #f97316 100%);
    /* Blue to Orange */
    --gradient-pink: linear-gradient(135deg, #dc2626 0%, #f97316 100%);
    /* Red to Orange */
    --gradient-warm: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    /* Orange gradient */

    /* Sombras - Enhanced */
    --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-blue) 100%);
    min-height: 100vh;
    color: var(--white);
    line-height: 1.6;
}

/* Container principal */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: var(--spacing-lg) var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.logo-icon {
    font-size: 2.5rem;
}

.header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--white) 0%, var(--accent-blue-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header p {
    color: var(--gray-medium);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.125rem;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.user-role {
    font-size: 0.75rem;
    color: var(--gray-medium);
    text-transform: capitalize;
}

/* Botones */
.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    text-decoration: none;
    font-family: inherit;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: var(--white);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #34d399 100%);
    color: var(--white);
}

.btn-error {
    background: linear-gradient(135deg, var(--error) 0%, #f87171 100%);
    color: var(--white);
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.btn:disabled,
.btn-sm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Cards */
.card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: var(--spacing-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-xl);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.card-title-icon {
    font-size: 1.5rem;
}

/* Navigation Tabs */
.nav-tabs {
    display: flex;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
}

.nav-tab {
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--gray-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.nav-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.nav-tab.active {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: var(--white);
    border-color: transparent;
}

/* Forms */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-light);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--white);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s ease;
}

/* Fix select dropdown visibility */
select.form-input,
select.form-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23ffffff' d='M10.293 3.293L6 7.586 1.707 3.293A1 1 0 00.293 4.707l5 5a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

/* Fix option colors - critical fix */
select option {
    background-color: #1a2332;
    color: #ffffff;
    padding: 10px;
}

.form-input::placeholder {
    color: var(--gray-dark);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-file {
    display: none;
}

.file-upload-btn {
    display: inline-block;
    padding: var(--spacing-md) var(--spacing-lg);
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.file-upload-btn:hover {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

/* Table */
.table-container {
    overflow-x: auto;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: rgba(255, 255, 255, 0.05);
}

.table th {
    padding: var(--spacing-md);
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--gray-light);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.table td {
    padding: var(--spacing-md);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.875rem;
}

. table tbody tr {
    transition: all var(--transition-base);
    border-left: 3px solid transparent;
}

.table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--accent-blue);
    transform: translateX(2px);
}

/* Grid */
.grid {
    display: grid;
    gap: var(--spacing-lg);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Badges */
.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-error {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Loading */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--white);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Alert */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: 10px;
    margin-bottom: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.875rem;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: #34d399;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: #60a5fa;
}

/* Sections */
.section {
    display: none;
}

.section.active {
    display: block;
    animation: fadeIn var(--transition-slow) ease-in;
}


@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Member Grid */
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--spacing-md);
    max-height: 500px;
    overflow-y: auto;
    padding: var(--spacing-sm);
}

.member-card {
    background: rgba(255, 255, 255, 0.05);
    padding: var(--spacing-md);
    border-radius: 10px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.member-card:hover {
    border-color: var(--accent-blue);
    background: rgba(255, 255, 255, 0.08);
}

.member-card.present {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.member-card.absent {
    border-color: var(--error);
    background: rgba(239, 68, 68, 0.05);
}

.member-name {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.member-category {
    font-size: 0.75rem;
    color: var(--gray-medium);
}

/* Scrollbar personalizado */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: var(--spacing-md);
    }

    .header h1 {
        font-size: 1.25rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-tabs {
        overflow-x: auto;
    }

    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
}

/* Utilities */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 {
    margin-top: var(--spacing-sm);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

.mb-1 {
    margin-bottom: var(--spacing-sm);
}

.mb-2 {
    margin-bottom: var(--spacing-md);
}

.mb-3 {
    margin-bottom: var(--spacing-lg);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gap-1 {
    gap: var(--spacing-sm);
}

.gap-2 {
    gap: var(--spacing-md);
}

.gap-3 {
    gap: var(--spacing-lg);
}

/* Statistics Cards */
.stat-card {
    background: rgba(255, 255, 255, 0.08);
    padding: var(--spacing-md);
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-blue);
    box-shadow: var(--shadow-lg);
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue-light) 0%, var(--white) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-medium);
    font-weight: 500;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Category Tabs */
.category-tabs {
    display: flex;
    gap: var(--spacing-xs);
    flex-wrap: wrap;
    padding: var(--spacing-sm);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}

.category-tab {
    padding: var(--spacing-sm) var(--spacing-md);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--gray-medium);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 0.875rem;
}

.category-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-color: rgba(255, 255, 255, 0.2);
}

.category-tab.active {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    color: var(--white);
    border-color: transparent;
}

/* Category action buttons (edit/delete) */
.category-action-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--white);
}

.category-action-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.category-delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

/* Attendance Category Checkboxes */
.categories-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.category-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.category-checkbox-label:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--accent-blue);
}

.category-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-blue);
}

.category-checkbox-label.selected {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-light) 100%);
    border-color: transparent;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background: var(--primary-blue);
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: scale(0.9) translateY(-20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: var(--spacing-lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--gray-medium);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.modal-body {
    padding: var(--spacing-lg);
}

.modal-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: var(--spacing-sm);
    justify-content: flex-end;
}

/* Toggle Switch Styles */

   / *   T o g g l e   S w i t c h   S t y l e s   * /     . t o g g l e - s w i t c h    {
                 p o s i t i o n :    r e l a t i v e ;
                 d i s p l a y :    i n l i n e - b l o c k ;
                 w i d t h :    5 0 p x ;
                 h e i g h t :    2 6 p x ;
         
}

         . t o g g l e - s w i t c h   i n p u t    {
                 o p a c i t y :    0 ;
                 w i d t h :    0 ;
                 h e i g h t :    0 ;
         
}

         . t o g g l e - s l i d e r    {
                 p o s i t i o n :    a b s o l u t e ;
                 c u r s o r :    p o i n t e r ;
                 t o p :    0 ;
                 l e f t :    0 ;
                 r i g h t :    0 ;
                 b o t t o m :    0 ;
                 b a c k g r o u n d - c o l o r :    r g b a ( 2 5 5 ,    2 5 5 ,    2 5 5 ,    0 . 2 ) ;
                 t r a n s i t i o n :    0 . 3 s ;
                 b o r d e r - r a d i u s :    2 6 p x ;
         
}

         . t o g g l e - s l i d e r : b e f o r e    {
                 p o s i t i o n :    a b s o l u t e ;
                 c o n t e n t :    " "  ;
                 h e i g h t :    2 0 p x ;
                 w i d t h :    2 0 p x ;
                 l e f t :    3 p x ;
                 b o t t o m :    3 p x ;
                 b a c k g r o u n d - c o l o r :    w h i t e ;
                 t r a n s i t i o n :    0 . 3 s ;
                 b o r d e r - r a d i u s :    5 0 % ;
         
}

         . t o g g l e - s w i t c h   i n p u t : c h e c k e d   +   . t o g g l e - s l i d e r    {
                 b a c k g r o u n d - c o l o r :    v a r ( - - a c c e n t - b l u e ) ;
         
}

         . t o g g l e - s w i t c h   i n p u t : c h e c k e d   +   . t o g g l e - s l i d e r : b e f o r e    {
                 t r a n s f o r m :    t r a n s l a t e X ( 2 4 p x ) ;
         
}

         . t o g g l e - s l i d e r : h o v e r    {
                 b a c k g r o u n d - c o l o r :    r g b a ( 2 5 5 ,    2 5 5 ,    2 5 5 ,    0 . 3 ) ;
         
}

         . t o g g l e - s w i t c h   i n p u t : c h e c k e d   +   . t o g g l e - s l i d e r : h o v e r    {
                 b a c k g r o u n d - c o l o r :    v a r ( - - a c c e n t - b l u e - l i g h t ) ;
         
}

     