.ezerff-dashboard {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 12px 12px 16px;
    border-radius: 0;
    background: var(--ezerff-bg-color, #f4f4f8);
    color: var(--ezerff-text-color, #222222);
    box-shadow: none;
}

.ezerff-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ezerff-user-icon {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.35);
}

.ezerff-header-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}

.ezerff-header-label {
    font-size: 12px;
    color: var(--ezerff-muted-color, #6b7280);
}

.ezerff-header-balance {
    font-size: 22px;
    font-weight: 700;
    margin-top: 2px;
}

.ezerff-theme-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 4px;
    border-radius: 999px;
    font-size: 16px;
}

.ezerff-header-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 12px;
}

.ezerff-arrow {
    border: none;
    background: transparent;
    cursor: default;
    color: var(--ezerff-muted-color, #6b7280);
    font-size: 18px;
    padding: 6px 8px;
}

.ezerff-date-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(129, 140, 248, 0.18);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ezerff-date-day {
    display: inline-flex;
    width: 24px;
    height: 24px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #ffffff;
    color: #4b5563;
    font-weight: 700;
}

.ezerff-verse-card {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.03);
}

.ezerff-verse-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--ezerff-muted-color, #6b7280);
    margin-bottom: 4px;
}

.ezerff-verse-text {
    font-size: 13px;
    line-height: 1.4;
    margin-bottom: 4px;
}

.ezerff-verse-ref {
    font-size: 12px;
    font-weight: 600;
    color: #6366f1;
}

.ezerff-main {
    margin-top: 16px;
}

.ezerff-section-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.ezerff-summary-card {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.03);
}

.ezerff-summary-label {
    display: block;
    font-size: 11px;
    color: var(--ezerff-muted-color, #6b7280);
    margin-bottom: 4px;
}

.ezerff-summary-value {
    font-size: 16px;
    font-weight: 700;
}

.ezerff-summary-income {
    color: #16a34a;
}

.ezerff-summary-expense {
    color: #dc2626;
}

.ezerff-section-placeholder {
    font-size: 12px;
    color: var(--ezerff-muted-color, #6b7280);
    padding: 10px 2px 0;
}

.ezerff-footer {
    margin-top: 14px;
    display: flex;
    justify-content: flex-end;
}

.ezerff-powered {
    font-size: 10px;
    color: var(--ezerff-muted-color, #9ca3af);
    display: flex;
    align-items: center;
    gap: 4px;
}

.ezerff-powered img {
    height: 18px;
    width: auto;
    display: block;
}

.ezerff-dashboard.ezerff-theme-dark {
    --ezerff-donut-center-bg: #020617;
    --ezerff-donut-center-text: #e5e7eb;
    --ezerff-bg-color: #111827;
    --ezerff-text-color: #f9fafb;
    --ezerff-muted-color: #9ca3af;
    background: var(--ezerff-bg-color);
    color: var(--ezerff-text-color);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-date-pill {
    background: rgba(129, 140, 248, 0.35);
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-date-day {
    background: #0f172a;
    color: #e5e7eb;
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-verse-card,
.ezerff-dashboard.ezerff-theme-dark .ezerff-summary-card {
    background: rgba(15, 23, 42, 0.75);
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-verse-ref {
    color: #a5b4fc;
}

@media (max-width: 600px) {
    .ezerff-dashboard {
        max-width: 100%;
        border-radius: 0;
        box-shadow: none;
    }
}


.ezerff-header-sub {
    margin-top: 2px;
    font-size: 11px;
    color: var(--ezerff-muted-color, #6b7280);
}



.ezerff-header-sub-label {
    margin-top: 2px;
    font-size: 11px;
    color: var(--ezerff-muted-color, #6b7280);
    display: block;
}
.ezerff-header-sub-amount {
    font-size: 13px;
    font-weight: 600;
    display: block;
}
.ezerff-header-sub-amount.ezerff-positive {
    color: #16a34a; /* verde */
}
.ezerff-header-sub-amount.ezerff-negative {
    color: #dc2626; /* rojo */
}
.ezerff-header-sub-amount.ezerff-neutral {
    color: var(--ezerff-muted-color, #6b7280);
}



.ezerff-section-categories {
    margin-top: 16px;
}

.ezerff-categories-layout {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ezerff-donut-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.ezerff-donut {
    width: 180px;
    height: 180px;
    border-radius: 999px;
    position: relative;
    background: #e5e7eb;
}




/* Centro de la dona: por defecto lo dejamos oscuro (para dark) */
.ezerff-donut-center {
    position: absolute;
    inset: 24px;
    border-radius: 999px;
    background: #050816; /* mismo tono que el fondo dark */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #e5e7eb;
}

/* En modo claro lo “pintamos” de claro */
.ezerff-dashboard.ezerff-theme-light .ezerff-donut-center {
    background: #f9fafb !important;
    color: #111827 !important;
}

/* En modo oscuro lo aseguramos al fondo dark */
.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-center {
    background: #050816 !important;
    color: #e5e7eb !important;
}










.ezerff-donut-label {
    font-size: 12px;
    color: var(--ezerff-muted-color, #6b7280);
}

.ezerff-donut-amount {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 700;
}

.ezerff-categories-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
}

.ezerff-category-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ezerff-category-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.ezerff-category-text {
    display: flex;
    flex-direction: column;
}

.ezerff-category-name {
    font-size: 12px;
}

.ezerff-category-amount {
    font-size: 12px;
    font-weight: 600;
}

.ezerff-empty-categories {
    margin-top: 8px;
    font-size: 12px;
    color: var(--ezerff-muted-color, #6b7280);
}

/* Responsive: en pantallas anchas, donut a la izquierda y grid a la derecha */
@media (min-width: 768px) {
    .ezerff-categories-layout {
        flex-direction: row;
        align-items: center;
    }

    .ezerff-donut-wrapper {
        flex: 0 0 auto;
    }

    .ezerff-categories-grid {
        flex: 1 1 auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}



/* Forzar el contenedor a ocupar el 100% del viewport, incluso dentro de themes con content-width limitado */
.ezerff-dashboard {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}



.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-center {
    background: #020617 !important;
    color: #e5e7eb !important;
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-label {
    color: #9ca3af !important;
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-amount {
    color: #f9fafb !important;
}


.ezerff-category-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(15, 23, 42, 0.18);
}

.ezerff-category-icon-char {
    font-size: 20px;
    line-height: 1;
}



/* Hard override for donut center in dark mode to ensure text is visible */
.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-center {
    background: #020617 !important;
    color: #e5e7eb !important;
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-label {
    color: #9ca3af !important;
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-donut-amount {
    color: #f9fafb !important;
}




/* Tabs: each panel hidden by default */
.ezerff-tab-panel {
    display: none;
}

.ezerff-tab-panel--active {
    display: block;
}

/* Bottom navigation bar */
.ezerff-bottom-nav {
    margin-top: 16px;
    padding: 8px 12px 4px;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
    display: flex;
    justify-content: space-between;
    gap: 4px;
}

.ezerff-bottom-nav-button {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px 4px 4px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.2;
    color: var(--ezerff-muted-color, #6b7280);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    cursor: pointer;
}

.ezerff-bottom-nav-button-icon {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    background: rgba(148, 163, 184, 0.15);
}

.ezerff-bottom-nav-button span {
    pointer-events: none;
}

.ezerff-bottom-nav-button.ezerff-bottom-nav-button--active {
    color: #1f2937;
    background: rgba(129, 140, 248, 0.16);
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-bottom-nav-button.ezerff-bottom-nav-button--active {
    color: #e5e7eb;
    background: rgba(129, 140, 248, 0.35);
}

/* Simple budgets layout */
.ezerff-budgets {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.ezerff-budgets-group {
    border-radius: 16px;
    padding: 10px 12px;
    background: rgba(15, 23, 42, 0.03);
}

.ezerff-dashboard.ezerff-theme-dark .ezerff-budgets-group {
    background: rgba(15, 23, 42, 0.8);
}

.ezerff-budgets-group-title {
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 4px;
}

.ezerff-budgets-group-sub {
    font-size: 12px;
    margin-bottom: 4px;
}

.ezerff-budgets-group-note {
    font-size: 11px;
    color: var(--ezerff-muted-color, #6b7280);
}

/* Barra de progreso de presupuesto */
.ezerff-budget-progress {
    margin-top: 4px;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: rgba(148, 163, 184, 0.3);
    overflow: hidden;
}

.ezerff-budget-progress-inner {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
}

/* Layout full-height para que la barra inferior quede pegada abajo */
.ezerff-dashboard {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* El contenido principal crece y puede hacer scroll */
.ezerff-main {
    margin-top: 16px;
    flex: 1;
}

/* Barra inferior fija al fondo del viewport dentro del dashboard */
.ezerff-bottom-nav {
    position: sticky;
    bottom: 0;
    z-index: 20;
    background: var(--ezerff-bg-color, #f4f4f8);
}

/* Ajuste para modo oscuro */
.ezerff-dashboard.ezerff-theme-dark .ezerff-bottom-nav {
    background: var(--ezerff-bg-color, #020617);
}

@media (max-width: 600px) {
    .ezerff-bottom-nav {
        padding-bottom: 8px;
    }

    .ezerff-bottom-nav-button {
        font-size: 10px;
    }
}
