﻿/* C:\Users\Exequiel Bernal\.gemini\antigravity\scratch\assets\css\styles.css */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary-red: #A31D1D;
    --dark-bg: #1A1A1A;
    --sidebar-bg: #111827;
    --light-gray: #F3F4F6;
    --silver-text: #E5E7EB;
    --accent-silver: #9CA3AF;
    --white: #FFFFFF;
    --border-color: #374151;
    --text-color: #1A1A1A;
    --card-bg: #FFFFFF;
}

[data-theme="dark"] {
    --primary-red: #C53030;
    --dark-bg: #111827;
    --sidebar-bg: #0B0F19;
    --light-gray: #1F2937;
    --silver-text: #F3F4F6;
    --accent-silver: #D1D5DB;
    --white: #1F2937;
    --border-color: #4B5563;
    --text-color: #F3F4F6;
    --card-bg: #1F2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    height: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 14.5px;
    background-color: var(--light-gray);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    max-width: 100vw;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Typography Consistency */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.5rem;
}
h1 { font-size: 1.8rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }

/* Sidebar Styling */
.sidebar {
    width: 260px;
    height: 100vh;
    background-color: var(--sidebar-bg);
    color: var(--white);
    position: fixed;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 20px;
    box-shadow: 4px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto; /* Permite scroll vertical si el contenido es mÃƒÆ’Ã‚Â¡s alto que la pantalla */
}

.logo-container {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container h1 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 1px;
}

.logo-container span {
    color: var(--primary-red);
}

.nav-links {
    list-style: none;
    flex-grow: 1;
}

.nav-links li {
    margin-bottom: 10px;
}

.nav-links a {
    text-decoration: none;
    color: var(--accent-silver);
    padding: 12px 15px;
    display: flex;
    align-items: center;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-links a:hover, .nav-links a.active {
    background-color: var(--primary-red);
    color: var(--white);
}

/* AnimaciÃƒÆ’Ã‚Â³n cuando pasas el dedo o el mouse por el menÃƒÆ’Ã‚Âº */
.nav-links a:hover {
    transform: translateX(8px);
}

/* AnimaciÃƒÆ’Ã‚Â³n de "pulsaciÃƒÆ’Ã‚Â³n" cuando presionas el botÃƒÆ’Ã‚Â³n del menÃƒÆ’Ã‚Âº */
.nav-links a:active {
    transform: scale(0.95);
}

/* Contenedor fluido para grÃƒÆ’Ã‚Â¡ficos */
.chart-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
}

/* Main Content Area */
.main-content {
    margin-left: 260px;
    padding: 30px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: var(--white);
    padding: 15px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-profile .role {
    font-size: 0.8rem;
    background: var(--primary-red);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 4px;
}

/* Cards & Dashboard */
.grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, background-color 0.3s ease;
    min-width: 0; /* Previene desbordamientos en grid/flex */
}

.card:hover {
    transform: translateY(-5px);
}

.card h2, .card h3 {
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.kpi-card h3 {
    font-size: 0.9rem;
    color: var(--accent-silver);
    text-transform: uppercase;
    margin-bottom: 10px;
    border-bottom: none;
    padding-bottom: 0;
}

.card .value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-color);
}

/* Table Styling */
.table-container {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 12px;
    margin-top: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    overflow-x: auto; /* Permite hacer scroll a la tabla en celulares sin romper la pantalla */
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    padding: 15px;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    white-space: nowrap;
}

td {
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-color);
    white-space: nowrap;
}

/* Modales Globales (Centrado y scroll en computadora) */
[id^="modal"] > div {
    margin: 5vh auto !important;
    max-height: 90vh;
    overflow-y: auto;
}

/* Efecto Hover Individual en Filas (Global) */
tbody tr {
    transition: all 0.2s ease;
}

tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
    /* Se eliminÃƒÆ’Ã‚Â³ transform: scale(1.01) porque causa saltos y bugs con los scrollbars */
}

[data-theme="dark"] tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

input[type="checkbox"] {
    transform: scale(1.6);
    margin: 5px;
    cursor: pointer;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #8a1818;
}

/* Login Page Specific */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background-color: var(--dark-bg);
    background-image: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.7)), url('../img/fondo_final.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.2);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 30px;
    color: var(--dark-bg);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--accent-silver);
    border-radius: 8px;
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-red);
}

/* Responsive Design (Mobile) */
@media (max-width: 768px) {
    /* Ajuste tipogrÃƒÆ’Ã‚Â¡fico global para mÃƒÆ’Ã‚Â³viles (reduce todo proporcionalmente un ~10%) */
    html, body {
        font-size: 14px !important;
    }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1050; /* Por encima de todo */
    }
    
    .chart-wrapper {
        height: 180px !important; /* GrÃƒÆ’Ã‚Â¡ficos mÃƒÆ’Ã‚Â¡s agradables y compactos en celular */
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 20px rgba(0,0,0,0.5);
    }
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        padding: 15px;
    }
    .header-top-row {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .menu-toggle-btn {
        display: block !important;
        background: none;
        border: none;
        color: var(--text-color);
        cursor: pointer;
        padding: 5px;
    }
    .table-container {
        overflow-x: auto;
    }
    
    /* SoluciÃƒÆ’Ã‚Â³n a desbordamientos en Dashboard */
    .grid-container {
        grid-template-columns: 1fr !important;
    }
    
    /* SoluciÃƒÆ’Ã‚Â³n a superposiciÃƒÆ’Ã‚Â³n de botones en cabeceras de pÃƒÆ’Ã‚Â¡gina */
    .main-content div[style*="display: flex; justify-content: space-between; align-items: center;"] {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 10px;
    }
    
    /* Si hay un contenedor interno de botones (ej: Asistencia QR) */
    .main-content div[style*="display: flex; justify-content: space-between; align-items: center;"] > div {
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 10px;
    }
    
    .main-content div[style*="display: flex; justify-content: space-between; align-items: center;"] button,
    .main-content div[style*="display: flex; justify-content: space-between; align-items: center;"] a {
        width: 100%;
        text-align: center;
    }

    /* SoluciÃƒÆ’Ã‚Â³n a ventanas modales muy anchas en telÃƒÆ’Ã‚Â©fono */
    [id^="modal"] > div {
        width: 90% !important;
        max-width: none !important;
        margin: 5vh auto !important;
        padding: 20px !important;
    }

    /* SoluciÃƒÆ’Ã‚Â³n a Dropdown de notificaciones fuera de pantalla */
    #notif-dropdown {
        position: fixed !important;
        top: 130px !important;
        left: 5% !important;
        width: 90% !important;
        right: auto !important;
        z-index: 9999 !important;
    }
}

@media (min-width: 769px) {
    .menu-toggle-btn {
        display: none !important;
    }
}


/* =========================================
   SCROLLBARS PERSONALIZADOS (Evitar Saltos)
   ========================================= */
::-webkit-scrollbar {
    width: 8px;
    height: 8px; /* Para scroll horizontal */
}
::-webkit-scrollbar-track {
    background: transparent;
}
::-webkit-scrollbar-thumb {
    background: rgba(163, 29, 29, 0.4);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(163, 29, 29, 0.8);
}
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(163, 29, 29, 0.4) transparent;
}


 @ m e d i a   ( m a x - w i d t h :   6 0 0 p x )   {   . u s e r - i n f o - t e x t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   }   } 
 
 
 / *   = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = 
       E S T I L O S   D E   I M P R E S I O N   ( N A T I V O   D E L   N A V E G A D O R ) 
       = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =   * / 
 @ m e d i a   p r i n t   { 
         @ p a g e   {   s i z e :   l a n d s c a p e ;   m a r g i n :   1 c m ;   } 
         . s i d e b a r ,   . m e n u - t o g g l e - b t n ,   . s e a r c h - c o n t a i n e r ,   . h e a d e r - t o p - r o w ,   b u t t o n ,   a . b t n ,   f o r m ,   i n p u t ,   s e l e c t   {   d i s p l a y :   n o n e   ! i m p o r t a n t ;   } 
         . m a i n - c o n t e n t   {   m a r g i n - l e f t :   0   ! i m p o r t a n t ;   w i d t h :   1 0 0 %   ! i m p o r t a n t ;   p a d d i n g :   0   ! i m p o r t a n t ;   } 
         b o d y ,   h t m l   {   b a c k g r o u n d :   # f f f f f f   ! i m p o r t a n t ;   c o l o r :   # 0 0 0 0 0 0   ! i m p o r t a n t ;   } 
         . c a r d ,   . t a b l e - c o n t a i n e r ,   d i v [ s t y l e * = " o v e r f l o w - x " ]   {   
                 b o x - s h a d o w :   n o n e   ! i m p o r t a n t ;   
                 b o r d e r :   n o n e   ! i m p o r t a n t ;   
                 b a c k g r o u n d :   t r a n s p a r e n t   ! i m p o r t a n t ;   
                 p a d d i n g :   0   ! i m p o r t a n t ;   
                 o v e r f l o w :   v i s i b l e   ! i m p o r t a n t ;   
                 m a r g i n :   0   ! i m p o r t a n t ;   
         } 
         t a b l e   {   w i d t h :   1 0 0 %   ! i m p o r t a n t ;   m i n - w i d t h :   a u t o   ! i m p o r t a n t ;   b o r d e r - c o l l a p s e :   c o l l a p s e   ! i m p o r t a n t ;   } 
         t h ,   t d   {   p a d d i n g :   8 p x   ! i m p o r t a n t ;   f o n t - s i z e :   1 1 p t   ! i m p o r t a n t ;   b o r d e r :   1 p x   s o l i d   # c c c c c c   ! i m p o r t a n t ;   c o l o r :   # 0 0 0 0 0 0   ! i m p o r t a n t ;   } 
         t h   {   b a c k g r o u n d - c o l o r :   # f 1 f 1 f 1   ! i m p o r t a n t ;   - w e b k i t - p r i n t - c o l o r - a d j u s t :   e x a c t ;   p r i n t - c o l o r - a d j u s t :   e x a c t ;   } 
         h 3   {   c o l o r :   # 0 0 0   ! i m p o r t a n t ;   f o n t - s i z e :   1 8 p t   ! i m p o r t a n t ;   t e x t - a l i g n :   c e n t e r ;   m a r g i n - b o t t o m :   2 0 p x ;   } 
         . p r i n t - l o g o   {   d i s p l a y :   b l o c k   ! i m p o r t a n t ;   t e x t - a l i g n :   c e n t e r ;   m a r g i n - b o t t o m :   2 0 p x ;   } 
 } 
 
 
/* =========================================
   ESTILOS DE IMPRESION (NATIVO DEL NAVEGADOR)
   ========================================= */
@media print {
    @page { size: landscape; margin: 1cm; }
    .sidebar, .menu-toggle-btn, .search-container, .header-top-row, button, a.btn, form, input, select { display: none !important; }
    .main-content { margin-left: 0 !important; width: 100% !important; padding: 0 !important; }
    body, html { background: #ffffff !important; color: #000000 !important; }
    .card, .table-container, div[style*="overflow-x"] { 
        box-shadow: none !important; 
        border: none !important; 
        background: transparent !important; 
        padding: 0 !important; 
        overflow: visible !important; 
        margin: 0 !important; 
    }
    table { width: 100% !important; min-width: auto !important; border-collapse: collapse !important; }
    th, td { padding: 8px !important; font-size: 11pt !important; border: 1px solid #cccccc !important; color: #000000 !important; }
    th { background-color: #f1f1f1 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    h3 { color: #000 !important; font-size: 18pt !important; text-align: center; margin-bottom: 20px; }
    .print-logo { display: block !important; text-align: center; margin-bottom: 20px; }
}


/* Fix for modal headers on mobile (prevents X from wrapping) */
[id^="modal"] div[style*="display: flex; justify-content: space-between; align-items: center;"] {
    flex-direction: row !important;
    align-items: center !important;
}

