/* Estilos base */
body {
    padding-bottom: 60px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

/* Navbar */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

[data-bs-theme="dark"] .navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Tarjetas */
.card {
    border: none;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
    margin-bottom: 20px;
}

[data-bs-theme="dark"] .card {
    background-color: #2c3034;
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.5);
}

[data-bs-theme="dark"] .card-header {
    background-color: #212529;
    border-bottom: 1px solid #373b3e;
}

/* Gráficos */
.chart-container {
    position: relative;
    width: 100%;
    height: 300px;
    min-height: 300px;
}

/* Estilos para la barra de filtros */
.time-range-buttons {
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.time-btn {
    min-width: 80px;
    height: 80px;
    border-radius: 8px !important;
    border: 1px solid #dee2e6;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    color: #495057;
}

.time-btn:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.time-btn.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.time-amount {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
}

.time-label {
    font-size: 0.75rem;
    opacity: 0.9;
}

.time-btn.active .time-label {
    opacity: 0.8;
}

/* Modo oscuro */
[data-bs-theme="dark"] .time-btn {
    background-color: #2c3034;
    border-color: #495057;
    color: #e9ecef;
}

[data-bs-theme="dark"] .time-btn:hover {
    background-color: #3a3f44;
}

[data-bs-theme="dark"] .time-btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive */
@media (max-width: 768px) {
    .time-btn {
        min-width: 70px;
        height: 70px;
        padding: 8px 4px;
    }
    
    .time-amount {
        font-size: 1.3rem;
    }
    
    .time-label {
        font-size: 0.65rem;
    }
}

/* Modo oscuro */
[data-bs-theme="dark"] {
    background-color: #212529;
    color: #f8f9fa;
}

[data-bs-theme="dark"] .text-muted {
    color: #adb5bd !important;
}

[data-bs-theme="dark"] footer {
    background-color: #2c3034 !important;
}

/* Valores actuales */
.display-4 {
    font-size: 2.5rem;
    font-weight: 300;
}

/* Animaciones */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#refreshBtn:disabled .bi-arrow-clockwise {
    animation: spin 0.7s linear infinite;
}

/* Navbar buttons */
.navbar .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

/* Refresh button animation */
#refreshBtn:disabled .bi-arrow-clockwise {
    animation: spin 0.7s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar .d-flex {
        width: 100%;
        margin-top: 10px;
        justify-content: flex-end;
    }
    
    .navbar .btn {
        margin-bottom: 5px;
    }
}