.dashboard-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: #000000cc;
    backdrop-filter: blur(1px);
    transition: right 0.4s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.dashboard-panel.open {
    right: 0;
}

.dashboard-header {
    background: var(--grape);
    color: white;
    padding: 10px 20px 22px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 33px;
    font-family: "Odibee Sans", sans-serif;
    letter-spacing: 2px;
}

.btn-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.6rem;
    cursor: pointer;
}

.dashboard-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
}

.dashboard-content {
    padding: 20px;
    margin-top: 10px;
    overflow-y: auto;
    height: calc(100vh - 70px);
}

.dashboard-balance {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.balance-value {
    font-size: 2.4rem;
    font-weight: 700;
    margin: 8px 0;
    color: var(--green);
}

.balance-change {
    font-size: 1rem;
    font-weight: 500;
}

.positive {
    color: var(--green);
}

.negative {
    color: #e74c3c;
}

.dashboard-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.95rem;
}

.filter-btn.active {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.dashboard-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 24px auto;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.dashboard-card h3 {
    margin-bottom: 16px;
    color: #333;
    font-size: 1.15rem;
}

.week-summary {
    display: flex;
    justify-content: space-between;
}

.day {
    text-align: center;
}

.day strong {
    display: block;
    margin-top: 6px;
    font-size: 1.1rem;
}

.insight {
    background: #f0f8ff;
    border-left: 5px solid var(--blue);
}

.last-transactions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.negative {
    color: #e74c3c;
}

.positive {
    color: var(--green);
}

/* Placeholder para gráficos */
.chart-placeholder {
    height: 260px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    border-radius: 12px;
}


.dashboard-balance {
    text-align: center;
    padding: 25px 20px;
    background: white;
    border-radius: 16px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
}

.dashboard-tabs {
    width: 360px;
    margin: 0 auto;
    border-radius: 0 0 30px 30px;
    overflow: hidden;
}

.tab-btn {
    width: calc(25% - 1.2px);
    border: 0;
    margin: 0 -3px 0 0px;
    padding: 13px 0px;
    font-size: 16px;
    background-color: var(--grape-light);
    transition: 1s;
}

.tab-btn.active {
    background-color: var(--green);
}

.balance-value {
    font-size: 2.8rem;
    font-weight: 700;
    margin: 8px 0;
    color: var(--green);
}

.balance-label {
    font-size: 0.95rem;
    color: #666;
}

.summary-card {
    background: white;
    padding: 18px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 14px;
}

.summary-card .icon {
    font-size: 2rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.last-transactions {
    max-height: 320px;
    overflow-y: auto;
}

.transaction-item {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.insights-card {
    background: #f8f9ff;
    border-left: 5px solid var(--blue);
}

.planning-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.planning-permission-badge {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 8px;
    border-radius: 999px;
}

.planning-permission-badge.ok {
    background: #ddf9ea;
    color: #0f8a4c;
}

.planning-permission-badge.warning {
    background: #fff2dd;
    color: #ad6800;
}

.planning-permission-badge.neutral {
    background: #eef2f6;
    color: #526175;
}

.planning-overview-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.planning-mini-btn {
    border: 1px solid #d7dde5;
    background: #fff;
    border-radius: 10px;
    padding: 9px 10px;
    font-size: 0.84rem;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
}

.planning-mini-btn:hover {
    background: #f7fafc;
}

.planning-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.planning-stat-item {
    background: #f8fafc;
    border: 1px solid #e5e9ef;
    border-radius: 10px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.planning-stat-label {
    font-size: 0.75rem;
    color: #64748b;
}

.planning-stat-item strong {
    color: #1e293b;
    font-size: 0.98rem;
}

.planning-status-list,
.planning-boxes-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.planning-status-row,
.planning-box-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 9px 10px;
}

.planning-status-row.warning {
    border-color: #f6cf87;
    background: #fffaf1;
}

.planning-status-row.danger {
    border-color: #f4b2b2;
    background: #fff5f5;
}

.planning-row-label {
    display: block;
    font-size: 0.78rem;
    color: #64748b;
}

.planning-row-value {
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
}

.btn-delete-transaction {
    background: none;
    border: none;
    color: #ef4444;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0 8px 0 0;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-transaction:hover {
    color: #b91c1c;
}

/* =========================================
   PERSISTENT DASHBOARD SPLIT ON DESKTOP
 ========================================= */
@media(min-width: 992px) {
    #dashboard-panel {
        position: relative !important;
        top: 0 !important;
        right: 0 !important;
        width: 100% !important;
        height: 100% !important;
        background-color: var(--ctx-bg) !important;
        backdrop-filter: none !important;
        transition: none !important;
        z-index: 10 !important;
        display: flex !important;
        border-left: 1px solid rgba(255, 255, 255, 0.08);
        padding-top: 65px !important;
    }

    #dashboard-panel .btn-close {
        display: none !important;
    }

    .dashboard-header {
        background: var(--ctx-bg) !important;
        color: #ffffff !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08) !important;
        padding: 15px 20px !important;
        font-size: 22px !important;
    }

    .dashboard-content {
        flex: 1 !important;
        height: auto !important;
        overflow-y: auto !important;
    }

    #btn-dashboard {
        display: none !important;
    }
}