.dashboard-main .layout {
    align-items: flex-start;
}

.dashboard-content {
    width: 100%;
    max-width: none;
    margin: 0;
    display: grid;
    gap: 24px;
    min-width: 0;
}

.dashboard-hero {
    background: linear-gradient(135deg, var(--dashboard-hero-from, #0a2647) 0%, var(--dashboard-hero-to, #14467e) 100%);
    color: #fff;
    border-radius: var(--radius, 12px);
    padding: 24px;
    box-shadow: 0 10px 24px rgba(10, 38, 71, 0.2);
}

.dashboard-hero h1 {
    margin: 0 0 6px 0;
}

.dashboard-hero p {
    margin: 0;
    opacity: 0.92;
}

.dashboard-period-toolbar {
    margin-top: 14px;
}

.dashboard-period-card .dashboard-period-toolbar {
    margin-top: 0;
}

.dashboard-period-tabs {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    border: 1px solid #d0d5dd;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.dashboard-period-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px 12px;
    border-right: 1px solid #d0d5dd;
    border-top: 0;
    border-bottom: 0;
    border-left: 0;
    background: transparent;
    color: #475467;
    font-size: 0.9em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    appearance: none;
    transition: background-color .15s ease, color .15s ease;
}

.dashboard-period-tab:last-child {
    border-right: 0;
}

.dashboard-period-tab:not(.is-active):hover {
    background: #f2f8fb;
    text-decoration: none;
}

.dashboard-period-tab.is-active {
    background: #0f8db3;
    color: #ffffff;
    text-decoration: none;
}

.dashboard-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.dashboard-column {
    display: grid;
    gap: 20px;
    align-content: start;
}

.dashboard-column--recent {
    align-self: start;
    grid-auto-rows: max-content;
    order: 1;
}

.dashboard-column--stats {
    order: 2;
}

.dashboard-card {
    background: var(--clr-surface, #fff);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius, 12px);
    padding: 18px;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.08);
}

.dashboard-card h2,
.dashboard-card h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.dashboard-card-intro {
    margin: 0 0 14px 0;
    color: rgba(15, 23, 42, 0.72);
}

.dashboard-card canvas {
    max-height: 240px;
}

.dashboard-kpis {
    display: grid;
    gap: .6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.kpi {
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: .65rem .55rem .75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: .2rem;
}

.kpi-label {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    color: #64748b;
    line-height: 1.25;
}

.kpi-value {
    color: var(--clr-primary, #0a2647);
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.dashboard-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.dashboard-list {
    display: grid;
    gap: 10px;
}

.dashboard-item {
    display: grid;
    grid-template-columns: 104px 1fr;
    gap: 10px;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    background: var(--clr-bg, #f9fafb);
    padding: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.dashboard-item:hover {
    transform: translateY(-1px);
    border-color: var(--clr-accent, #2b9ed3);
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.1);
}

.dashboard-item__thumb {
    width: 104px;
    height: 68px;
    border-radius: 8px;
    object-fit: cover;
    background: #eef2f7;
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.dashboard-item__body {
    min-width: 0;
    display: grid;
    gap: 8px;
}

.dashboard-item.is-new {
    background: var(--dashboard-new-bg, rgba(245, 158, 11, 0.12));
    border-color: var(--dashboard-new-border, rgba(245, 158, 11, 0.4));
}

.dashboard-item__title {
    font-weight: 700;
    color: var(--clr-primary, #0a2647);
}

.dashboard-item__meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: rgba(15, 23, 42, 0.72);
}

.dashboard-badge {
    display: inline-block;
    background: var(--dashboard-badge-bg, #f59e0b);
    color: var(--dashboard-badge-text, #0f172a);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
}

.dashboard-empty {
    margin: 0;
    color: rgba(15, 23, 42, 0.72);
}

.dashboard-chart-empty {
    margin: 8px 0 0;
}

@media (max-width: 980px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-column--recent {
        order: 1;
    }

    .dashboard-column--stats {
        order: 2;
    }
}

@media (max-width: 640px) {
    .dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .dashboard-period-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-period-tab {
        border-right: 1px solid #d0d5dd;
        border-bottom: 1px solid #d0d5dd;
    }

    .dashboard-period-tab:nth-child(2n) {
        border-right: 0;
    }

    .dashboard-period-tab:nth-last-child(-n+2) {
        border-bottom: 0;
    }

    .dashboard-item {
        grid-template-columns: 96px 1fr;
    }

    .dashboard-item__thumb {
        width: 96px;
        height: 64px;
    }
}
