/* theme-dashboard.css — Solo dashboard (Home): barra superior, tarjetas, placeholders.
   Modo oscuro con html.theme-dark. Cargar después de theme-layout. */

/* ========== Base: área principal y barra superior del dashboard ========== */
.main-layout {
    background-color: #f1f5f9;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* evita que .main-layout scrollee; delega scroll a .content-dashboard */
}

.dashboard-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 3.5rem;
    padding: 0 1.5rem;
    flex-shrink: 0;
    border-bottom: 2px solid #e2e8f0;
    background-color: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.dashboard-topbar-heading {
    font-weight: 500;
    font-size: 1.125rem;
    color: #0f172a;
}

.dashboard-topbar-period,
.dashboard-topbar-sep {
    color: #64748b;
    font-size: 0.875rem;
}

.dashboard-topbar-btn {
    color: #64748b;
}

.dashboard-topbar-btn:hover {
    color: #0f172a;
    background-color: rgba(0, 0, 0, 0.06);
}

/* Tarjetas del dashboard (Home) */
.dashboard .dashboard-card,
.main-layout .dashboard-card {
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.dashboard .dashboard-card:hover,
.main-layout .dashboard-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 8px 24px rgba(0, 0, 0, 0.08);
    border-color: #cbd5e0;
}

.dashboard-chart-placeholder {
    border: 2px dashed #cbd5e0;
    border-radius: 0.5rem;
    background-color: rgba(0, 0, 0, 0.04);
}

.dashboard {
    color: #0f172a;
}

.content-dashboard {
    flex: 1;
    overflow-y: auto;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
    min-height: 0; /* permite que el hijo flex se encoja por debajo de su contenido */
}

/* ========== Modo oscuro: dashboard ========== */
html.theme-dark .main-layout {
    background-color: #0f1419;
}

html.theme-dark .dashboard-topbar {
    background-color: #1a202c;
    border-bottom-color: #2d3748;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

html.theme-dark .dashboard-topbar-heading {
    color: #e2e8f0;
}

html.theme-dark .dashboard-topbar-period,
html.theme-dark .dashboard-topbar-sep {
    color: #718096;
}

html.theme-dark .dashboard-topbar-company {
    color: #e2e8f0;
}

html.theme-dark .dashboard-topbar-btn {
    color: #718096;
}

html.theme-dark .dashboard-topbar-btn:hover {
    color: #e2e8f0;
    background-color: rgba(255, 255, 255, 0.08);
}

html.theme-dark .dashboard-topbar-avatar {
    background-color: rgba(99, 102, 241, 0.25);
    color: #6366f1;
}

html.theme-dark .dashboard .dashboard-card,
html.theme-dark .main-layout .dashboard-card {
    background-color: #1a202c;
    border-color: #2d3748;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

html.theme-dark .dashboard .dashboard-card:hover,
html.theme-dark .main-layout .dashboard-card:hover {
    border-color: #4a5568;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.2);
}

html.theme-dark .dashboard-card-label,
html.theme-dark .dashboard-card-title {
    color: #e2e8f0;
}

html.theme-dark .dashboard-card-value {
    color: #f8fafc;
}

html.theme-dark .dashboard .text-muted,
html.theme-dark .dashboard-card-change-neutral {
    color: #718096;
}

html.theme-dark .dashboard-chart-placeholder {
    border-color: #4a5568;
    background-color: rgba(0, 0, 0, 0.2);
    color: #718096;
}

html.theme-dark .dashboard {
    color: #e2e8f0;
}

html.theme-dark .dashboard-progress-label,
html.theme-dark .dashboard-activity-message {
    color: #e2e8f0;
}

html.theme-dark .dashboard-activity-meta,
html.theme-dark .dashboard-progress-budget {
    color: #718096;
}

html.theme-dark .dashboard-progress-bar {
    background-color: rgba(0, 0, 0, 0.3);
}