/* Variables CSS */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --info-color: #17a2b8;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 280px;
    --header-height: 80px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #000000;
    background-image: url('assets/mosaico_la_treinta.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: -1;
}

/* Layout principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-bottom: 1rem;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.sidebar-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.sidebar-header p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 1rem 1.5rem;
    margin: 0.5rem 1rem;
    border-radius: var(--border-radius);
    background: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    text-decoration: none;
    width: calc(100% - 2rem);
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(135deg, var(--secondary-color), var(--info-color));
    color: white;
    transform: translateX(5px);
}

.nav-item i {
    margin-right: 1rem;
    font-size: 1.2rem;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
}

.logout-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--danger-color);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.logout-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.logout-btn i {
    margin-right: 0.5rem;
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 0;
    min-height: 100vh;
}

.content-header {
    height: var(--header-height);
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 999;
}

.header-info h1 {
    font-size: 1.8rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.header-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.search-container {
    position: relative;
}

.search-input {
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 1px solid #dee2e6;
    border-radius: 25px;
    background: white;
    font-size: 0.9rem;
    width: 300px;
    transition: var(--transition);
}

.search-input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
}

.notification-btn {
    position: relative;
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.notification-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger-color);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Módulos */
.module {
    padding: 2rem;
    animation: fadeIn 0.5s ease-in-out;
}

.module.active {
    display: block;
}

.module-header {
    margin-bottom: 2rem;
}

.module-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.module-header p {
    color: #6c757d;
    font-size: 1rem;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard de estadísticas */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    display: flex;
    align-items: center;
    transition: var(--transition);
    border-left: 4px solid var(--secondary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--info-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.5rem;
}

.stat-icon.confirmed {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
}

.stat-icon.pending {
    background: linear-gradient(135deg, var(--warning-color), #f1c40f);
}

.stat-icon.cancelled {
    background: linear-gradient(135deg, var(--danger-color), #e67e22);
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Filtros */
.filters-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.filter-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: white;
    font-size: 0.9rem;
    min-width: 200px;
    transition: var(--transition);
}

.filter-select:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

/* Formularios */
.reservation-form-section,
.attendance-form-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.form-header h2,
.form-header h3 {
    margin: 0;
    font-weight: 600;
}

.toggle-form-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-form-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(180deg);
}

.reservation-form,
.attendance-form {
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.form-group label i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

input[type="text"],
input[type="date"],
input[type="time"],
input[type="number"],
input[type="tel"],
input[type="email"],
select,
textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: var(--transition);
    background: white;
    font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #dee2e6;
}

.btn-primary,
.btn-secondary,
.btn-danger {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary {
    background: var(--success-color);
    color: white;
}

.btn-primary:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

/* Listas y tablas */
.reservations-list,
.attendance-list {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.list-header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.list-header h2,
.list-header h3 {
    margin: 0;
    font-weight: 600;
}

.list-header i {
    margin-right: 0.5rem;
}

.list-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.table-container {
    overflow-x: auto;
    padding: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

th {
    background: rgba(0, 0, 0, 0.05);
    font-weight: 600;
    color: var(--primary-color);
    position: sticky;
    top: 0;
}

th i {
    margin-right: 0.5rem;
    color: var(--secondary-color);
}

tr {
    transition: var(--transition);
}

tr:hover {
    background: rgba(52, 152, 219, 0.05);
    transform: scale(1.01);
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Estados */
.status {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.status::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.status.pending {
    background: rgba(241, 196, 15, 0.1);
    color: var(--warning-color);
}

.status.pending::before {
    background: var(--warning-color);
}

.status.confirmed {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.status.confirmed::before {
    background: var(--success-color);
}

.status.cancelled {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.status.cancelled::before {
    background: var(--danger-color);
}

/* Acciones en tablas */
.actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.actions button {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.confirm-btn {
    background: var(--success-color);
    color: white;
}

.confirm-btn:hover {
    background: #229954;
    transform: translateY(-2px);
}

.edit-btn {
    background: var(--warning-color);
    color: white;
}

.edit-btn:hover {
    background: #d68910;
    transform: translateY(-2px);
}

.cancel-btn {
    background: var(--danger-color);
    color: white;
}

.cancel-btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.whatsapp-btn {
    background: #25D366;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition);
    font-weight: 500;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}
/* Módulos adicionales */
.attendance-reports {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 2rem;
}

.reports-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 2rem;
}

.report-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
}

.report-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
}

.report-controls {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-output {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    min-height: 200px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-height: 500px;
    overflow-y: auto;
}

/* Estilos para reportes mejorados */
.comprehensive-report {
    font-family: inherit;
}

.report-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

.report-section h5 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-section h6 {
    color: var(--secondary-color);
    margin: 1rem 0 0.5rem 0;
    font-weight: 500;
}

.report-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 1rem 0;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-size: 0.9rem;
}

.stat-item.success {
    border-left: 4px solid var(--success-color);
}

.stat-item.warning {
    border-left: 4px solid var(--warning-color);
}

.stat-item.danger {
    border-left: 4px solid var(--danger-color);
}

.stat-item.info {
    border-left: 4px solid var(--info-color);
}

.stat-icon {
    font-size: 1.1rem;
    min-width: 20px;
}

.department-report {
    margin: 0.5rem 0;
    padding: 0.75rem;
    background: white;
    border-radius: 6px;
    border-left: 3px solid var(--secondary-color);
}

.department-report ul {
    margin: 0.5rem 0 0 1rem;
    list-style-type: none;
}

.department-report li {
    padding: 0.25rem 0;
    color: #6c757d;
}

.department-report li:before {
    content: "👤 ";
    margin-right: 0.5rem;
}

.summary-stats {
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.summary-stats p {
    margin: 0.5rem 0;
    color: #495057;
}

/* Configuración y reportes */
.settings-content {
    display: grid;
    gap: 2rem;
}

.settings-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
}

.settings-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.data-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Responsive design */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 240px;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .reports-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-header {
        padding: 0 1rem;
    }
    
    .header-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-input {
        width: 100%;
    }
    
    .module {
        padding: 1rem;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .filter-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-select {
        min-width: auto;
    }
    
    .table-container {
        font-size: 0.8rem;
    }
    
    th, td {
        padding: 0.5rem;
    }
    
    .actions {
        flex-direction: column;
    }
    
    .actions button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .form-header {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-danger {
        width: 100%;
        justify-content: center;
    }
}

/* Animaciones adicionales */
@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(52, 152, 219, 0); }
    100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0); }
}

.notification-btn.active {
    animation: pulse 2s infinite;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.5);
}

/* Modales */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease-out;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header h3 {
    margin: 0;
    font-weight: 600;
}

.close-modal {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 2rem;
}

.reservation-details h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.detail-item {
    padding: 1rem;
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
}

.detail-item.full-width {
    grid-column: 1 / -1;
}

.detail-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.detail-item span {
    color: #6c757d;
    font-size: 0.9rem;
}

/* Notificaciones */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    color: white;
    font-weight: 500;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: var(--box-shadow);
    transform: translateX(100%);
    transition: var(--transition);
    max-width: 400px;
    min-width: 300px;
}

.notification-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    transition: var(--transition);
}

.notification-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    background: linear-gradient(135deg, var(--success-color), #2ecc71);
}

.notification.error {
    background: linear-gradient(135deg, var(--danger-color), #e67e22);
}

.notification.warning {
    background: linear-gradient(135deg, var(--warning-color), #f1c40f);
    color: var(--primary-color);
}

.notification.info {
    background: linear-gradient(135deg, var(--info-color), #5bc0de);
}

.notification i {
    font-size: 1.2rem;
}

/* Estados de carga */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tema oscuro (opcional) */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #3498db;
        --secondary-color: #2980b9;
        --success-color: #27ae60;
        --warning-color: #f39c12;
        --danger-color: #e74c3c;
        --info-color: #17a2b8;
        --light-color: #2c3e50;
        --dark-color: #ecf0f1;
    }
}

/* Impresión */
@media print {
    .sidebar,
    .content-header,
    .modal,
    .notification {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .module {
        padding: 0 !important;
    }
    
    .table-container {
        overflow: visible !important;
    }
    
    table {
        font-size: 12px;
    }
    
    th, td {
        padding: 8px;
    }
}

/* Estados hover mejorados */
.nav-item:focus,
.btn-primary:focus,
.btn-secondary:focus,
.btn-danger:focus,
.filter-select:focus,
.search-input:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Tooltips */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-color);
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Estilos del módulo de ayuda */
.help-content {
    max-width: 1200px;
    margin: 0 auto;
}

.help-navigation {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--box-shadow);
}

.help-navigation h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-nav-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.help-nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1.5rem 1rem;
    background: linear-gradient(135deg, var(--secondary-color), var(--info-color));
    color: white;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
    text-decoration: none;
}

.help-nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
}

.help-nav-btn i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.help-sections {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.help-section {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--box-shadow);
    scroll-margin-top: 100px;
}

.help-section h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 0.5rem;
}

.help-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--secondary-color);
}

.help-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.1rem;
}

.help-card ol,
.help-card ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.help-card li {
    margin: 0.5rem 0;
    color: #495057;
    line-height: 1.6;
}

.help-card li strong {
    color: var(--primary-color);
}

.help-tip {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.3);
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
    color: var(--secondary-color);
    font-size: 0.9rem;
}

.problem-solution {
    background: white;
    border-radius: 6px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 3px solid var(--warning-color);
}

.problem-solution strong {
    color: var(--danger-color);
    display: block;
    margin-bottom: 0.5rem;
}

.shortcuts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.shortcut-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.shortcut-item kbd {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 0.25rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.contact-item i {
    color: var(--secondary-color);
    font-size: 1.2rem;
    width: 24px;
    text-align: center;
}

.contact-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

.contact-item span {
    color: #6c757d;
}

/* Responsive para el módulo de ayuda */
@media (max-width: 768px) {
    .help-nav-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .help-nav-btn {
        padding: 1rem 0.5rem;
    }
    
    .help-nav-btn i {
        font-size: 1.5rem;
    }
    
    .help-section {
        padding: 1rem;
    }
    
    .help-card {
        padding: 1rem;
    }
    
    .shortcuts-grid {
        grid-template-columns: 1fr;
    }
    
    .shortcut-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .help-nav-grid {
        grid-template-columns: 1fr;
    }
}

/* Estilos para el sistema de nube */
.cloud-status-section {
    display: grid;
    gap: 2rem;
    grid-template-columns: 1fr 1fr;
}

.cloud-status-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--info-color);
}

.cloud-status-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sync-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 500;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.sync-status.online {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.sync-status.offline {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.sync-status.loading {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.sync-status.disabled {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
    border: 1px solid rgba(108, 117, 125, 0.3);
}

.cloud-stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cloud-stats .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-label {
    font-weight: 500;
    color: var(--primary-color);
}

.status-indicator {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-indicator.online {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.status-indicator.offline {
    background: rgba(231, 76, 60, 0.1);
    color: var(--danger-color);
}

.status-indicator.enabled {
    background: rgba(39, 174, 96, 0.1);
    color: var(--success-color);
}

.status-indicator.disabled {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.status-indicator.recent {
    background: rgba(52, 152, 219, 0.1);
    color: var(--secondary-color);
}

.status-indicator.never {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

.cloud-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--box-shadow);
    border-left: 4px solid var(--secondary-color);
}

.cloud-actions button {
    width: 100%;
    justify-content: center;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Estilos para la lista de respaldos */
.backups-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 400px;
    overflow-y: auto;
}

.backup-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.backup-info {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.backup-info strong {
    color: var(--primary-color);
}

/* Responsive para sistema de nube */
@media (max-width: 768px) {
    .cloud-status-section {
        grid-template-columns: 1fr;
    }
    
    .backup-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .cloud-actions button {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}

/* Animaciones para el sistema de nube */
@keyframes cloudSync {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
    100% { transform: translateY(0px); }
}

.sync-status.online i {
    animation: cloudSync 2s ease-in-out infinite;
}

.sync-status.loading i {
    animation: spin 1s linear infinite;
}

/* Indicador de sincronización en tiempo real */
.cloud-indicator {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(52, 152, 219, 0.9);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cloud-indicator.show {
    opacity: 1;
}
