/* Estilos para el Panel Administrativo de Hair Day */

:root {
    --admin-primary: #d07d68;
    --admin-secondary: #f4f4f4;
    --admin-dark: #2c3e50;
    --admin-light: #ffffff;
    --admin-success: #27ae60;
    --admin-warning: #f39c12;
    --admin-danger: #e74c3c;
    --admin-info: #3498db;
    --admin-border: #e0e0e0;
    --admin-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--admin-secondary);
    color: var(--admin-dark);
}

/* Botón de regreso */
.back-button-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    color: white;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-icon {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-button:hover .back-icon {
    transform: translateX(-3px);
}

.back-text {
    font-size: 0.9rem;
    letter-spacing: 0.3px;
}

/* Estilos para información de reserva en modal */
.reserva-info {
    background: #f8f9fa !important;
    padding: 1rem !important;
    border-radius: 8px !important;
    margin-bottom: 1rem !important;
    border-left: 4px solid var(--admin-primary);
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row strong {
    color: var(--admin-dark);
    font-weight: 600;
    min-width: 120px;
}

.estado-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

.estado-activa {
    background: #d4edda;
    color: #155724;
}

.estado-cancelada {
    background: #f8d7da;
    color: #721c24;
}

.estado-reprogramada {
    background: #fff3cd;
    color: #856404;
}

.estado-realizada {
    background: #d1ecf1;
    color: #0c5460;
}

/* Mejorar el modal */
.modal-content {
    max-width: 500px;
    width: 90%;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

/* Responsive para botón de regreso */
@media (max-width: 768px) {
    .back-button-container {
        top: 15px;
        left: 15px;
    }
    
    .back-button {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    .back-text {
        font-size: 0.85rem;
    }
    
    .back-icon {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .back-button-container {
        top: 10px;
        left: 10px;
    }
    
    .back-button {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .back-text {
        font-size: 0.8rem;
    }
}

/* Login Styles */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--admin-primary) 0%, #b86b57 100%);
    position: relative;
}

.login-box {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    width: 100%;
    max-width: 400px;
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    width: 277px;
    margin-bottom: 1rem;
}

.login-box h1 {
    color: var(--admin-primary);
    font-size: 1.5rem;
    font-weight: 600;
}

.login-form .form-group {
    margin-bottom: 1.5rem;
}

.login-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--admin-dark);
}

.login-form input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.btn-login {
    width: 100%;
    padding: 0.75rem;
    background: var(--admin-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: #b86b57;
}

.error-message {
    color: var(--admin-danger);
    font-size: 0.875rem;
    margin-top: 1rem;
    text-align: center;
}

/* Admin Panel Layout */
.admin-panel {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto auto 1fr;
    grid-template-areas: 
        "header"
        "nav"
        "main";
}

/* Header */
.admin-header {
    grid-area: header;
    background: white;
    border-bottom: 1px solid var(--admin-border);
    box-shadow: var(--admin-shadow);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

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

.header-content h1 {
    font-size: 1.25rem;
    color: var(--admin-primary);
    font-weight: 600;
}

.user-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-logout {
    padding: 0.5rem 1rem;
    background: transparent;
    color: var(--admin-danger);
    border: 1px solid var(--admin-danger);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

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

/* Navigation */
.admin-nav {
    grid-area: nav;
    background: white;
    border-bottom: 1px solid var(--admin-border);
}

.nav-menu {
    display: flex;
    list-style: none;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-menu li {
    margin-right: 2rem;
}

.nav-link {
    display: block;
    padding: 1rem 0;
    text-decoration: none;
    color: var(--admin-dark);
    font-weight: 500;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--admin-light);
    border-bottom-color: var(--admin-primary);
}

/* Main Content */
.admin-main {
    grid-area: main;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

.admin-section {
    display: none;
}

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

.admin-section h2 {
    margin-bottom: 2rem;
    color: var(--admin-dark);
    font-size: 1.75rem;
    font-weight: 600;
}

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

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
    padding: 1rem;
    background: var(--admin-secondary);
    border-radius: 50%;
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--admin-primary);
    margin-bottom: 0.25rem;
}

.stat-info p {
    color: #666;
    font-size: 0.875rem;
}

/* Dashboard Content */
.dashboard-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.today-appointments,
.popular-services {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
}

.today-appointments h3,
.popular-services h3 {
    margin-bottom: 1rem;
    color: var(--admin-dark);
    font-weight: 600;
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.service-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--admin-border);
}

/* Section Header */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.filters {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.filters select,
.filters input {
    padding: 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 0.875rem;
}

/* Buttons */
.btn-primary {
    background: var(--admin-primary);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.3s;
}

.btn-primary:hover {
    background: #b86b57;
}

.btn-secondary {
    background: var(--admin-secondary);
    color: var(--admin-dark);
    border: 1px solid var(--admin-border);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background: var(--admin-border);
}

.btn-danger {
    background: var(--admin-danger);
    color: white;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.3s;
}

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

/* Data Table */
.reservas-table-container {
    background: white;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
    margin-bottom: 2rem;
}

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

.data-table th {
    background: var(--admin-secondary);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--admin-dark);
    border-bottom: 2px solid var(--admin-border);
}

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

.data-table tbody tr:hover {
    background: #f8f9fa;
}

/* Estado badges */
.estado-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.estado-activa {
    background: #d4edda;
    color: #155724;
}

.estado-cancelada {
    background: #f8d7da;
    color: #721c24;
}

.estado-reprogramada {
    background: #fff3cd;
    color: #856404;
}

.estado-realizada {
    background: #cce5ff;
    color: #004085;
}

/* Actions */
.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.25rem 0.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-edit {
    background: var(--admin-info);
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2rem;
}

.pagination button {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--admin-border);
    background: white;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination button:hover {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

.pagination button.active {
    background: var(--admin-primary);
    color: white;
    border-color: var(--admin-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-content h3 {
    padding: 1.5rem 2rem 0 2rem;
    margin: 0;
    flex-shrink: 0;
}

.modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 2rem;
    max-height: calc(85vh - 120px);
}

.modal-footer {
    padding: 1rem 2rem 1.5rem 2rem;
    border-top: 1px solid var(--admin-border);
    flex-shrink: 0;
    background: white;
    border-radius: 0 0 12px 12px;
}

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

.close:hover {
    color: var(--admin-dark);
}

.form-group {
    margin-bottom: 1rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--admin-border);
    border-radius: 6px;
    font-size: 1rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin: 0;
}

/* Estilos para campos de reprogramación */
.reprogramacion-section {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--admin-warning);
    margin: 1rem 0;
}

.section-header-small h4 {
    margin: 0 0 0.5rem 0;
    color: var(--admin-dark);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.help-text {
    margin: 0 0 1rem 0;
    color: #666;
    font-size: 0.9rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
}

.form-group.half-width {
    flex: 1;
}

.form-group input[type="date"],
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input[type="date"]:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
}

#motivo-reprogramacion {
    resize: vertical;
    min-height: 60px;
}

/* Reportes Styles */
.report-types {
    margin-bottom: 2rem;
}

.report-type-tabs {
    display: flex;
    border-bottom: 2px solid var(--admin-border);
    margin-bottom: 1rem;
}

.report-tab-btn {
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-tab-btn.active,
.report-tab-btn:hover {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
}

.report-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    margin-bottom: 2rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    min-width: 150px;
}

.filter-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--admin-dark);
    font-size: 0.9rem;
}

.filter-group input,
.filter-group select {
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: flex-end;
}

.report-results {
    background: white;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    overflow: hidden;
}

.report-placeholder {
    text-align: center;
    padding: 3rem;
    color: #666;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.report-placeholder h3 {
    margin-bottom: 0.5rem;
    color: var(--admin-dark);
}

.report-summary {
    padding: 2rem;
    border-bottom: 1px solid var(--admin-border);
}

.report-summary h3 {
    margin-bottom: 1.5rem;
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.stat {
    background: var(--admin-secondary);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.5rem;
    color: var(--admin-primary);
    margin-bottom: 0.5rem;
}

.report-table {
    padding: 2rem;
}

.report-table h4 {
    margin-bottom: 1rem;
    color: var(--admin-dark);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.report-chart {
    background: white;
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    padding: 2rem;
    margin-top: 2rem;
}

/* Export button específico */
#export-report {
    background: var(--admin-success);
    color: white;
}

#export-report:hover {
    background: #229954;
}

/* Responsive reportes */
@media (max-width: 768px) {
    .report-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    .filter-actions {
        width: 100%;
        justify-content: stretch;
    }
    
    .filter-actions button {
        flex: 1;
    }
    
    .report-type-tabs {
        flex-wrap: wrap;
    }
    
    .report-tab-btn {
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }
    
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* Tabs */
.config-tabs {
    display: flex;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--admin-border);
}

.tab-btn {
    padding: 1rem 2rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s;
}

.tab-btn.active {
    color: var(--admin-primary);
    border-bottom-color: var(--admin-primary);
}

.tab-content {
    display: none;
}

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

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255,255,255,0.8);
    z-index: 9999;
}

.spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 5px solid var(--admin-border);
    border-top: 5px solid var(--admin-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Menu hamburguesa para móvil */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--admin-dark);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.mobile-menu-toggle:hover {
    background-color: var(--admin-secondary);
}

/* Responsive Design */
@media (max-width: 768px) {
    .admin-panel {
        grid-template-areas: 
            "header"
            "nav"
            "main";
    }
    
    .header-content {
        padding: 1rem;
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .logo-section {
        flex: 1;
    }
    
    .user-section {
        gap: 0.5rem;
    }
    
    .mobile-menu-toggle {
        display: block;
        order: -1;
        margin-right: 1rem;
    }
    
    .admin-nav {
        background: white;
        border-bottom: 1px solid var(--admin-border);
        position: relative;
        overflow: hidden;
        max-height: 0;
        transition: max-height 0.3s ease;
    }
    
    .admin-nav.nav-open {
        max-height: 300px;
    }
    
    .nav-menu {
        flex-direction: column;
        position: initial;
        padding: 0;
        margin: 0;
        background: white;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu li {
        margin: 0;
        border-bottom: 1px solid var(--admin-border);
    }
    
    .nav-menu li:last-child {
        border-bottom: none;
    }
    
    .nav-link {
        padding: 1rem 1.5rem;
        display: block;
        border-bottom: none;
        border-left: 3px solid transparent;
        background: white;
    }
    
    .nav-link:hover,
    .nav-link.active {
        background: var(--admin-secondary);
        border-left-color: var(--admin-primary);
        border-bottom-color: transparent;
    }
    
    .admin-main {
        padding: 0.5rem;
    }
    
    .admin-section h2 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .section-header {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .filters {
        width: 100%;
        gap: 0.5rem;
        justify-content: stretch;
    }
    
    .filters select,
    .filters input {
        flex: 1;
        min-width: 100px;
        font-size: 0.9rem;
    }
    
    .filters .btn-primary,
    .filters .btn-secondary {
        flex: none;
        min-width: 70px;
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .stat-icon {
        font-size: 1.5rem;
        padding: 0.75rem;
    }
    
    .stat-info h3 {
        font-size: 1.5rem;
    }
    
    .dashboard-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .today-appointments,
    .popular-services {
        padding: 1rem;
    }
    
    .reservas-table-container {
        margin-bottom: 1rem;
    }
    
    .data-table {
        font-size: 0.8rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.4rem 0.2rem;
        word-wrap: break-word;
    }
    
    .data-table th {
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    .actions {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .btn-action {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
    
    .modal-content {
        margin: 3% auto;
        width: 95%;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .login-box {
        margin: 0.5rem;
        padding: 1rem;
    }
    
    .header-content h1 {
        font-size: 1rem;
    }
    
    .mobile-menu-toggle {
        font-size: 1.2rem;
        padding: 0.4rem;
    }
    
    .user-section {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-end;
    }
    
    .user-section span {
        font-size: 0.8rem;
    }
    
    .btn-logout {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .admin-main {
        padding: 0.25rem;
    }
    
    .admin-section h2 {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }
    
    .stats-grid {
        gap: 0.75rem;
    }
    
    .stat-card {
        padding: 0.75rem;
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .stat-icon {
        font-size: 1.25rem;
        padding: 0.5rem;
    }
    
    .stat-info h3 {
        font-size: 1.25rem;
    }
    
    .stat-info p {
        font-size: 0.8rem;
    }
    
    .filters {
        gap: 0.25rem;
    }
    
    .filters select,
    .filters input {
        font-size: 0.8rem;
        padding: 0.4rem;
        min-width: 80px;
    }
    
    .filters .btn-primary,
    .filters .btn-secondary {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
        min-width: 60px;
    }
    
    .reservas-table-container {
        overflow-x: auto;
        margin: 0 -0.25rem;
    }
    
    .data-table {
        min-width: 700px;
        font-size: 0.7rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.3rem 0.1rem;
        font-size: 0.7rem;
    }
    
    .modal-content {
        margin: 2% auto;
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-content h3 {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .modal-body {
        padding: 0.5rem 1rem;
        max-height: calc(95vh - 100px);
    }
    
    .modal-footer {
        padding: 0.5rem 1rem 1rem 1rem;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .form-group.half-width {
        flex: none;
    }
    
    .reprogramacion-section {
        padding: 1rem;
        margin: 0.5rem 0;
    }
    
    .section-header-small h4 {
        font-size: 1rem;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .modal-actions button {
        width: 100%;
    }
}

/* ==========================================
   ESTILOS PARA INTERFACES CRUD
   ========================================== */

/* Header de CRUD */
.crud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--admin-light);
    border-radius: 8px;
    box-shadow: var(--admin-shadow);
}

.crud-header h4 {
    color: var(--admin-dark);
    font-size: 1.3rem;
    margin: 0;
}

/* Lista de items CRUD */
.crud-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.crud-item {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: var(--admin-light);
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
    border-left: 4px solid var(--admin-success);
    transition: all 0.3s ease;
}

.crud-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.crud-item.inactive {
    border-left-color: var(--admin-danger);
    opacity: 0.7;
}

/* Avatar para estilistas */
.item-avatar {
    width: 60px;
    height: 60px;
    margin-right: 1rem;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.item-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Información del item */
.item-info {
    flex: 1;
}

.item-info h5 {
    color: var(--admin-dark);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.item-info .specialty {
    color: var(--admin-primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.item-info .description {
    color: #666;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.service-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.price {
    color: var(--admin-success);
    font-weight: 600;
}

.duration {
    color: var(--admin-info);
    font-weight: 500;
}

.stats {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
}

.stat {
    color: #666;
}

/* Estado del item */
.item-status {
    margin: 0 1rem;
}

.status-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-badge.active {
    background-color: rgba(39, 174, 96, 0.1);
    color: var(--admin-success);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.status-badge.inactive {
    background-color: rgba(231, 76, 60, 0.1);
    color: var(--admin-danger);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Acciones del item */
.item-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-action {
    padding: 0.6rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.btn-action:hover {
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--admin-primary);
    color: white;
    padding: 0.7rem 1.2rem;
    font-weight: 500;
}

.btn-primary:hover {
    background: #b86b56;
}

.btn-edit {
    background: var(--admin-info);
    color: white;
}

.btn-edit:hover {
    background: #2980b9;
}

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

.btn-toggle:hover {
    background: #e67e22;
}

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

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

/* Estado vacío */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: var(--admin-light);
    border-radius: 12px;
    box-shadow: var(--admin-shadow);
}

.empty-state p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Modal CRUD */
.crud-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.crud-modal .modal-content {
    background: var(--admin-light);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--admin-border);
    background: linear-gradient(135deg, var(--admin-primary), #b86b56);
    color: white;
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
}

/* Formularios CRUD */
.crud-modal form {
    padding: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--admin-dark);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--admin-primary);
    box-shadow: 0 0 0 3px rgba(208, 125, 104, 0.1);
}

.form-group small {
    display: block;
    margin-top: 0.3rem;
    color: #666;
    font-size: 0.85rem;
}

.form-row {
    display: flex;
    gap: 1rem;
}

.form-row .form-group {
    flex: 1;
}

/* Checkbox estilo moderno */
.form-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
}

/* Acciones del modal */
.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--admin-border);
}

.modal-actions button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.modal-actions button:not(.primary) {
    background: #f8f9fa;
    color: var(--admin-dark);
    border: 1px solid var(--admin-border);
}

.modal-actions button:not(.primary):hover {
    background: #e9ecef;
}

.modal-actions button.primary {
    background: var(--admin-primary);
    color: white;
}

.modal-actions button.primary:hover {
    background: #b86b56;
    transform: translateY(-1px);
}

/* Responsive para CRUD */
@media (max-width: 768px) {
    .crud-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .crud-item {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .item-avatar {
        align-self: center;
        margin: 0;
    }
    
    .item-info {
        width: 100%;
        text-align: center;
    }
    
    .item-actions {
        align-self: center;
    }
    
    .form-row {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .crud-modal .modal-content {
        width: 95%;
        margin: 1rem;
    }
    .stats{
        justify-content: center;
    }
    .service-details{
        justify-content: center;
    }
}
/* Estilos para configuración de disponibilidad */
.disponibilidad-config {
    max-width: 800px;
    margin: 2rem auto;
}

.config-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid var(--admin-primary);
}

.config-card h4 {
    margin-bottom: 1rem;
    color: var(--admin-dark);
    font-size: 1.1rem;
}

.toggle-container {
    display: flex;
    align-items: center;
}

.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.toggle-label input[type="checkbox"] {
    display: none;
}

.toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 34px;
    margin-right: 12px;
    transition: background 0.3s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider {
    background: var(--admin-success);
}

.toggle-label input[type="checkbox"]:checked + .toggle-slider::before {
    transform: translateX(24px);
}

.toggle-text {
    font-weight: 500;
    color: var(--admin-dark);
}

.form-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--admin-border);
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--admin-primary);
}

.help-text {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.help-text-small {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.date-range {
    display: flex;
    gap: 1rem;
}

.date-input-group {
    flex: 1;
}

.date-input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--admin-dark);
}

.config-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.config-status {
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}

.config-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.config-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@media (max-width: 768px) {
    .date-range {
        flex-direction: column;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .disponibilidad-config {
        margin: 1rem;
    }
}

/* Estilos adicionales para botones de acción CRUD */
.btn-edit {
    background-color: #3498db !important;
    color: white !important;
}

.btn-edit:hover {
    background-color: #2980b9 !important;
}

.btn-toggle {
    background-color: #f39c12 !important;
    color: white !important;
}

.btn-toggle:hover {
    background-color: #e67e22 !important;
}

.btn-danger {
    background-color: #e74c3c !important;
    color: white !important;
}

.btn-danger:hover {
    background-color: #c0392b !important;
}

.item-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
}

.item-info .specialty {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.item-info .description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.item-info .stats {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.item-info .stat {
    font-size: 0.85rem;
    color: #95a5a6;
}

.service-details {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-weight: 600;
}

.service-details .price {
    color: var(--admin-success);
}

.service-details .duration {
    color: var(--admin-info);
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #95a5a6;
}

.empty-state p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}
