/* ========== VARIABLES CSS ========== */
:root {
    --negro: #000000;
    --dorado-oscuro: #8C6A3B;
    --dorado: #B08A57;
    --dorado-claro: #D4AF7A;
    --dorado-brillo: #E6C89C;
    --blanco: white;
    --gris-oscuro: #1a1a1a;
    --gris: #333;
    --gris-claro: #f5f5f5;
    --sidebar-width: 280px;
}

/* ========== RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0d0d0d;
    color: var(--blanco);
    overflow-x: hidden;
}

/* ========== SIDEBAR ========== */
.admin-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, var(--negro) 0%, var(--gris-oscuro) 100%);
    border-right: 2px solid var(--dorado-oscuro);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(176, 138, 87, 0.3);
}

.sidebar-header i {
    font-size: 3rem;
    color: var(--dorado);
    margin-bottom: 0.5rem;
}

.sidebar-header h2 {
    font-size: 1.5rem;
    color: var(--dorado);
    margin-bottom: 0.3rem;
    letter-spacing: 2px;
}

.sidebar-header p {
    color: var(--dorado-claro);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Navegación Sidebar */
.sidebar-nav {
    flex: 1;
    padding: 1.5rem 0;
    overflow-y: auto;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    color: var(--dorado-claro);
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(176, 138, 87, 0.1);
    border-left-color: var(--dorado);
    color: var(--dorado);
}

.nav-item.active {
    background: rgba(176, 138, 87, 0.2);
    border-left-color: var(--dorado);
    color: var(--dorado-brillo);
}

.nav-item i {
    font-size: 1.2rem;
    width: 25px;
}

.nav-item span {
    font-weight: 500;
    font-size: 0.95rem;
}

/* Footer Sidebar */
.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(176, 138, 87, 0.3);
}

.btn-logout {
    width: 100%;
    padding: 1rem;
    background: rgba(231, 76, 60, 0.2);
    border: 2px solid #e74c3c;
    border-radius: 10px;
    color: #e74c3c;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: #e74c3c;
    color: white;
    transform: translateY(-2px);
}

/* ========== CONTENIDO PRINCIPAL ========== */
.admin-main {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    background: #0d0d0d;
}

/* Header */
.admin-header {
    background: linear-gradient(135deg, var(--negro), var(--gris-oscuro));
    border-bottom: 2px solid var(--dorado-oscuro);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-menu-mobile {
    display: none;
    background: none;
    border: none;
    color: var(--dorado);
    font-size: 1.5rem;
    cursor: pointer;
}

.admin-header h1 {
    font-size: 1.8rem;
    color: var(--dorado);
    font-weight: 600;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    background: rgba(176, 138, 87, 0.1);
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    border: 1px solid rgba(176, 138, 87, 0.3);
}

.admin-user i {
    font-size: 1.5rem;
    color: var(--dorado);
}

.admin-user span {
    color: var(--dorado-claro);
    font-weight: 500;
}

/* Contenido */
.admin-content {
    padding: 2rem;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== DASHBOARD ========== */
.welcome-banner {
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(176, 138, 87, 0.3);
}

.welcome-banner h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: white;
}

.welcome-banner p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: all 0.3s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(176, 138, 87, 0.3);
    border-color: var(--dorado);
}

.stat-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.stat-info h3 {
    font-size: 2.5rem;
    color: var(--dorado);
    margin-bottom: 0.3rem;
}

.stat-info p {
    color: var(--dorado-claro);
    font-size: 0.95rem;
}

/* Acciones Rápidas */
.quick-actions {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 2rem;
}

.quick-actions h3 {
    color: var(--dorado);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.action-btn {
    background: rgba(176, 138, 87, 0.1);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 10px;
    padding: 1.5rem;
    color: var(--dorado);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
}

.action-btn:hover {
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(176, 138, 87, 0.4);
}

.action-btn i {
    font-size: 2rem;
}

/* ========== SECCIONES ========== */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dorado-oscuro);
}

.section-header h2 {
    color: var(--dorado);
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Botones */
.btn-primary {
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    color: white;
    border: none;
    padding: 0.9rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(176, 138, 87, 0.5);
}

.btn-secondary {
    background: rgba(176, 138, 87, 0.1);
    color: var(--dorado);
    border: 2px solid var(--dorado-oscuro);
    padding: 0.9rem 1.8rem;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: rgba(176, 138, 87, 0.2);
    border-color: var(--dorado);
}

/* ========== GRIDS DE SERVICIOS Y BARBEROS ========== */
.servicios-grid,
.barberos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.servicio-item,
.barbero-item {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 1.5rem;
    transition: all 0.3s;
}

.servicio-item:hover,
.barbero-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(176, 138, 87, 0.3);
    border-color: var(--dorado);
}

.servicio-header,
.barbero-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
}

.servicio-header h3,
.barbero-header h3 {
    color: var(--dorado);
    font-size: 1.3rem;
    flex: 1;
}

.servicio-precio {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dorado-brillo);
}

.servicio-info,
.barbero-info {
    color: var(--dorado-claro);
    margin-bottom: 1rem;
}

.servicio-info p,
.barbero-info p {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.badge-promo {
    background: var(--dorado);
    color: var(--negro);
}

.badge-categoria {
    background: rgba(176, 138, 87, 0.2);
    color: var(--dorado-claro);
    border: 1px solid var(--dorado-oscuro);
}

.item-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.btn-edit,
.btn-delete {
    flex: 1;
    padding: 0.7rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-edit {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
}

.btn-edit:hover {
    background: #3498db;
    color: white;
}

.btn-delete {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.btn-delete:hover {
    background: #e74c3c;
    color: white;
}

/* ========== GALERÍA ========== */
.galeria-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-galeria {
    background: rgba(176, 138, 87, 0.1);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 25px;
    padding: 0.8rem 1.5rem;
    color: var(--dorado);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-galeria:hover {
    background: rgba(176, 138, 87, 0.2);
}

.tab-galeria.active {
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    color: white;
    border-color: var(--dorado);
}

.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.galeria-item {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s;
}

.galeria-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(176, 138, 87, 0.3);
    border-color: var(--dorado);
}

.galeria-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.galeria-item-info {
    padding: 1rem;
}

.galeria-item-info h4 {
    color: var(--dorado);
    margin-bottom: 0.5rem;
}

.galeria-item-info p {
    color: var(--dorado-claro);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* ========== FORMULARIOS ========== */
.form-contacto,
.textos-form {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 2rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--dorado);
    margin-bottom: 0.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.5);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 10px;
    color: var(--blanco);
    font-size: 1rem;
    transition: all 0.3s;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--dorado);
    box-shadow: 0 0 15px rgba(176, 138, 87, 0.3);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ========== TABLA DE RESERVAS ========== */
.reservas-tabla {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 1.5rem;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(176, 138, 87, 0.2);
}

thead th {
    padding: 1rem;
    text-align: left;
    color: var(--dorado);
    font-weight: 600;
    border-bottom: 2px solid var(--dorado-oscuro);
}

tbody tr {
    border-bottom: 1px solid rgba(176, 138, 87, 0.1);
    transition: all 0.3s;
}

tbody tr:hover {
    background: rgba(176, 138, 87, 0.1);
}

tbody td {
    padding: 1rem;
    color: var(--dorado-claro);
}

.estado-badge {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-block;
}

.estado-pendiente {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

.estado-confirmada {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.estado-cancelada {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* ========== MODALES ========== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado);
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid var(--dorado-oscuro);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    color: var(--dorado);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--dorado);
    font-size: 1.5rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.btn-close:hover {
    background: rgba(176, 138, 87, 0.2);
    transform: rotate(90deg);
}

.modal-body {
    padding: 2rem;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    justify-content: flex-end;
}

/* Preview de imagen */
.image-preview {
    margin-top: 1rem;
    border: 2px dashed var(--dorado-oscuro);
    border-radius: 10px;
    padding: 1rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 10px;
}

/* ========== NOTIFICACIONES ========== */
.notification {
    position: fixed;
    top: 100px;
    right: -400px;
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    color: white;
    padding: 1.2rem 1.8rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(176, 138, 87, 0.5);
    z-index: 3000;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: right 0.4s ease;
    font-weight: 600;
}

.notification.show {
    right: 30px;
}

.notification i {
    font-size: 1.5rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    :root {
        --sidebar-width: 250px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.active {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }

    .btn-menu-mobile {
        display: block;
    }

    .admin-header h1 {
        font-size: 1.3rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .servicios-grid,
    .barberos-grid,
    .galeria-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .actions-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1.5rem;
    }

    table {
        font-size: 0.85rem;
    }

    thead th,
    tbody td {
        padding: 0.7rem;
    }
}

@media (max-width: 480px) {
    .admin-header {
        padding: 1rem;
    }

    .admin-content {
        padding: 1rem;
    }

    .welcome-banner {
        padding: 1.5rem;
    }

    .welcome-banner h2 {
        font-size: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .stat-info h3 {
        font-size: 2rem;
    }

    .notification {
        right: -100%;
        left: 0;
        width: calc(100% - 30px);
        margin: 0 15px;
    }

    .notification.show {
        right: 0;
    }
}

/* ========== SCROLLBAR PERSONALIZADO ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #0d0d0d;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--dorado), var(--dorado-brillo));
}

/* ========== ANIMACIONES ========== */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.stat-card:hover .stat-icon {
    animation: pulse 1s ease-in-out;
}

/* ========== DASHBOARD CONTABLE ========== */

/* Tarjetas de métricas mejoradas */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-tendencia {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.stat-tendencia i {
    font-size: 0.75rem;
}

.stat-tendencia.positivo {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.stat-tendencia.negativo {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.stat-tendencia.neutral {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

/* Contenedores de gráficas */
.chart-container {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s;
}

.chart-container:hover {
    border-color: var(--dorado);
    box-shadow: 0 10px 30px rgba(176, 138, 87, 0.3);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(176, 138, 87, 0.2);
}

.chart-header h3 {
    color: var(--dorado);
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.chart-legend {
    display: flex;
    gap: 1.5rem;
    font-size: 0.85rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--dorado-claro);
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Canvas de gráficas */
canvas {
    max-height: 300px;
    width: 100% !important;
}

/* Tablas de rendimiento */
.tabla-rendimiento,
.tabla-servicios-detalle {
    overflow-x: auto;
}

.tabla-rendimiento table,
.tabla-servicios-detalle table {
    width: 100%;
    border-collapse: collapse;
}

.tabla-rendimiento thead,
.tabla-servicios-detalle thead {
    background: rgba(176, 138, 87, 0.15);
}

.tabla-rendimiento th,
.tabla-servicios-detalle th {
    padding: 1rem;
    text-align: left;
    color: var(--dorado);
    font-weight: 600;
    border-bottom: 2px solid var(--dorado-oscuro);
    font-size: 0.9rem;
}

.tabla-rendimiento td,
.tabla-servicios-detalle td {
    padding: 1rem;
    color: var(--dorado-claro);
    border-bottom: 1px solid rgba(176, 138, 87, 0.1);
}

.tabla-rendimiento tr:hover,
.tabla-servicios-detalle tr:hover {
    background: rgba(176, 138, 87, 0.05);
}

.barbero-nombre {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    color: var(--dorado);
}

.barbero-avatar-small {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.ingreso-valor {
    font-weight: 700;
    color: #2ecc71;
    font-size: 1.1rem;
}

.comision-valor {
    font-weight: 600;
    color: var(--dorado-brillo);
}

.tendencia-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tendencia-badge.subida {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
}

.tendencia-badge.bajada {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
}

.tendencia-badge.estable {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
}

/* Tarjetas de métricas adicionales */
.metric-card {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
}

.metric-card:hover {
    border-color: var(--dorado);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(176, 138, 87, 0.3);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.metric-info {
    flex: 1;
}

.metric-info h4 {
    color: var(--dorado-claro);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dorado);
    margin: 0;
    line-height: 1;
}

.metric-description {
    font-size: 0.75rem;
    color: rgba(176, 138, 87, 0.7);
    margin-top: 0.3rem;
    display: block;
}

/* Barra de progreso en métricas */
.metric-progress {
    width: 100%;
    height: 6px;
    background: rgba(176, 138, 87, 0.2);
    border-radius: 10px;
    margin-top: 0.8rem;
    overflow: hidden;
}

.metric-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 10px;
    transition: width 1s ease;
}

/* Porcentaje en tabla */
.porcentaje-total {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.porcentaje-bar {
    flex: 1;
    height: 8px;
    background: rgba(176, 138, 87, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.porcentaje-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 10px;
    transition: width 0.5s ease;
}

.porcentaje-numero {
    font-weight: 600;
    color: var(--dorado);
    min-width: 45px;
    text-align: right;
}

/* Animación de carga para gráficas */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    color: var(--dorado);
}

.chart-loading i {
    font-size: 3rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Tooltips personalizados para gráficas */
.chart-tooltip {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado);
    border-radius: 10px;
    padding: 0.8rem 1rem;
    color: var(--dorado-claro);
    font-size: 0.85rem;
    box-shadow: 0 5px 20px rgba(176, 138, 87, 0.4);
}

.chart-tooltip strong {
    color: var(--dorado);
    display: block;
    margin-bottom: 0.3rem;
}

/* Mensaje de datos vacíos */
.empty-data {
    text-align: center;
    padding: 3rem;
    color: var(--dorado-claro);
}

.empty-data i {
    font-size: 4rem;
    color: var(--dorado-oscuro);
    margin-bottom: 1rem;
    display: block;
}

.empty-data h3 {
    color: var(--dorado);
    margin-bottom: 0.5rem;
}

.empty-data p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Filtros de período */
#filtroContabilidad {
    background: linear-gradient(145deg, #252525, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    color: var(--dorado-claro);
    padding: 0.7rem 1rem;
    border-radius: 10px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

#filtroContabilidad:hover {
    border-color: var(--dorado);
}

#filtroContabilidad:focus {
    outline: none;
    border-color: var(--dorado);
   box-shadow: 0 0 15px rgba(176, 138, 87, 0.3);
}

#filtroContabilidad option {
    background: #0d0d0d;
    color: var(--dorado-claro);
}

/* Rango de fechas personalizado */
#rangoPersonalizado {
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Badges de estado */
.badge-estado {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-excelente {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid #2ecc71;
}

.badge-bueno {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid #3498db;
}

.badge-regular {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid #f1c40f;
}

.badge-bajo {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

/* Resaltado de números importantes */
.numero-destacado {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--dorado-brillo), var(--dorado-oscuro));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Indicadores de comparación */
.comparacion-periodo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--dorado-claro);
    margin-top: 0.5rem;
}

.comparacion-periodo i {
    font-size: 1rem;
}

.comparacion-periodo.mejor {
    color: #2ecc71;
}

.comparacion-periodo.peor {
    color: #e74c3c;
}

/* ========== RESPONSIVE DASHBOARD CONTABLE ========== */
@media (max-width: 1400px) {
    .chart-container canvas {
        max-height: 250px;
    }
}

@media (max-width: 1024px) {
    /* Cambiar grid de gráficas a columna única */
    #section-contabilidad > div[style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    #section-contabilidad > div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
    
    #section-contabilidad > div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    #filtroContabilidad {
        width: 100% !important;
    }
    
   #rangoPersonalizado > div {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .chart-container {
        padding: 1.5rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .chart-legend {
        flex-wrap: wrap;
    }
    
    /* Tablas responsive */
    .tabla-rendimiento,
    .tabla-servicios-detalle {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tabla-rendimiento table,
    .tabla-servicios-detalle table {
        min-width: 600px;
    }
    
    .tabla-rendimiento th,
    .tabla-rendimiento td,
    .tabla-servicios-detalle th,
    .tabla-servicios-detalle td {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .metric-card {
        padding: 1.2rem;
    }
    
    .metric-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 1rem;
    }
    
    .chart-header h3 {
        font-size: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.8rem;
    }
    
    .barbero-nombre {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tendencia-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ========== ESTILOS ADICIONALES DASHBOARD CONTABLE ========== */

/* Animación de números cambiantes */
.stat-info h3 {
    transition: all 0.3s ease;
}

.stat-tendencia {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    margin-top: 0.5rem;
}

.stat-tendencia i {
    font-size: 0.75rem;
}

.stat-tendencia.positivo {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.stat-tendencia.negativo {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.stat-tendencia.neutral {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

/* Contenedor de canvas con altura fija */
.chart-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

/* Tabla responsive */
.tabla-rendimiento,
.tabla-servicios-detalle {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tabla-rendimiento table,
.tabla-servicios-detalle table {
    width: 100%;
    min-width: 700px;
}

/* Spinner de carga */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* Tarjetas métricas mejoradas */
.metric-card {
    background: linear-gradient(145deg, #1a1a1a, #0d0d0d);
    border: 2px solid var(--dorado-oscuro);
    border-radius: 15px;
    padding: 1.5rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    transition: all 0.3s;
}

.metric-card:hover {
    border-color: var(--dorado);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(176, 138, 87, 0.3);
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    flex-shrink: 0;
}

.metric-info {
    flex: 1;
}

.metric-info h4 {
    color: var(--dorado-claro);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.metric-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dorado);
    margin: 0;
    line-height: 1;
}

.metric-description {
    font-size: 0.75rem;
    color: rgba(176, 138, 87, 0.7);
    margin-top: 0.3rem;
    display: block;
}

/* Barra de progreso en porcentaje */
.porcentaje-total {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.porcentaje-bar {
    flex: 1;
    height: 8px;
    background: rgba(176, 138, 87, 0.2);
    border-radius: 10px;
    overflow: hidden;
}

.porcentaje-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.porcentaje-numero {
    font-weight: 600;
    color: var(--dorado);
    min-width: 45px;
    text-align: right;
}

/* Números destacados */
.numero-destacado {
    font-size: 1.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--dorado-brillo), var(--dorado-oscuro));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Badges de tendencia */
.tendencia-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tendencia-badge.subida {
    background: rgba(46, 204, 113, 0.2);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.tendencia-badge.bajada {
    background: rgba(231, 76, 60, 0.2);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.tendencia-badge.estable {
    background: rgba(241, 196, 15, 0.2);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}

/* Avatar pequeño de barbero */
.barbero-avatar-small {
    width: 35px;
    height: 35px;
    background: linear-gradient(135deg, var(--dorado-oscuro), var(--dorado));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: white;
}

.barbero-nombre {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-weight: 600;
    color: var(--dorado);
}

/* Valores monetarios destacados */
.ingreso-valor {
    font-weight: 700;
    color: #2ecc71;
    font-size: 1.1rem;
}

.comision-valor {
    font-weight: 600;
    color: var(--dorado-brillo);
}

/* Responsive para dashboard contable */
@media (max-width: 1400px) {
    .chart-container canvas {
        max-height: 250px;
    }
}

@media (max-width: 1024px) {
    /* Cambiar grids a columna única */
    #section-contabilidad > div[style*="grid-template-columns: 2fr 1fr"],
    #section-contabilidad > div[style*="grid-template-columns: 1fr 1fr"],
    #section-contabilidad > div[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-actions {
        width: 100%;
        flex-direction: column;
    }
    
    #filtroContabilidad {
        width: 100% !important;
    }
    
    #rangoPersonalizado > div {
        grid-template-columns: 1fr !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    
    .chart-container {
        padding: 1.5rem;
    }
    
    .chart-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .tabla-rendimiento th,
    .tabla-rendimiento td,
    .tabla-servicios-detalle th,
    .tabla-servicios-detalle td {
        padding: 0.8rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .metric-card {
        padding: 1.2rem;
    }
    
    .metric-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .metric-value {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .chart-container {
        padding: 1rem;
    }
    
    .chart-header h3 {
        font-size: 1rem;
    }
    
    .stat-info h3 {
        font-size: 1.8rem;
    }
    
    .barbero-nombre {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .tendencia-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}