.karya-dashboard {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 22px;
}
.karya-dashboard-header {
    margin-bottom: 0;
}
.karya-dashboard-header h1 {
    color: #481322;
    font: 700 clamp(25px, 3vw, 34px)/1.2 Literata, serif;
}
.karya-dashboard-header .page-description {
    margin-top: 8px;
}
.dashboard-updated {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #76666b;
    font-size: 12px;
}
.dashboard-updated i {
    color: #6f1d32;
}
.dashboard-filter {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 13px;
    padding: 18px;
}
.dashboard-filter-field {
    display: flex;
    min-width: 140px;
    flex: 1 1 150px;
    flex-direction: column;
    gap: 7px;
    color: #51454a;
    font-size: 12px;
    font-weight: 600;
}
.dashboard-filter-category {
    flex-basis: 210px;
}
.dashboard-filter-field select {
    width: 100%;
    min-height: 42px;
    padding: 0 12px;
    border: 1px solid #e1d3d8;
    border-radius: 9px;
    background: #fff;
    color: #39232b;
    font: 400 13px Roboto, sans-serif;
}
.dashboard-filter-field select:focus {
    border-color: #6f1d32;
    outline: 3px solid rgb(111 29 50 / 12%);
}
.dashboard-filter-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.dashboard-filter-actions .action-btn {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 14px;
    border-radius: 9px;
    text-decoration: none;
}
.dashboard-filter-actions .action-btn.primary {
    background: #6f1d32;
    color: #fff;
}
.dashboard-filter-actions .action-btn.primary:hover {
    background: #481322;
}
.dashboard-total-card {
    display: flex;
    min-height: 128px;
    align-items: center;
    gap: 18px;
    padding: 23px 26px;
    border: 1px solid #e5cfd6;
    border-radius: 16px;
    background: linear-gradient(115deg, #6f1d32 0%, #481322 100%);
    color: #fff;
    box-shadow: 0 9px 24px rgb(72 19 34 / 15%);
}
.dashboard-total-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 1px solid rgb(255 255 255 / 27%);
    border-radius: 17px;
    background: rgb(255 255 255 / 11%);
    font-size: 22px;
}
.dashboard-total-card p {
    margin-bottom: 4px;
    color: rgb(255 255 255 / 78%);
    font-size: 13px;
}
.dashboard-total-card strong {
    font: 700 34px/1.1 Literata, serif;
}
.dashboard-total-card > span {
    margin-left: auto;
    padding: 8px 11px;
    border: 1px solid rgb(255 255 255 / 25%);
    border-radius: 999px;
    color: rgb(255 255 255 / 88%);
    font-size: 11px;
}
.dashboard-category-section,
.dashboard-visual-grid,
.dashboard-recent-panel {
    min-width: 0;
}
.dashboard-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}
.dashboard-section-heading h2 {
    margin-top: 5px;
    color: #481322;
    font: 600 19px/1.35 Literata, serif;
}
.dashboard-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.dashboard-category-card {
    position: relative;
    display: grid;
    min-height: 150px;
    grid-template-columns: 42px minmax(0, 1fr);
    grid-template-rows: auto auto 1fr;
    align-items: center;
    gap: 5px 12px;
    padding: 16px;
    overflow: hidden;
    border: 1px solid #eadfe2;
    border-top: 3px solid var(--category-color, #6f1d32);
    border-radius: 13px;
    background: #fff;
    color: #36272c;
    text-decoration: none;
    box-shadow: 0 4px 14px rgb(72 19 34 / 4%);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.dashboard-category-card:hover,
.dashboard-category-card:focus-visible {
    transform: translateY(-2px);
    border-color: #d7b6c0;
    box-shadow: 0 8px 20px rgb(72 19 34 / 10%);
}
.dashboard-category-card:focus-visible,
.dashboard-composition-row:focus-visible,
.dashboard-recent-item:focus-visible {
    outline: 3px solid rgb(111 29 50 / 22%);
    outline-offset: 2px;
}
.dashboard-category-icon {
    display: grid;
    width: 40px;
    height: 40px;
    grid-row: 1 / 3;
    place-items: center;
    border-radius: 12px;
    background: color-mix(in srgb, var(--category-color, #6f1d32) 10%, white);
    color: var(--category-color, #6f1d32);
}
.dashboard-category-label {
    color: #65575b;
    font-size: 12px;
    font-weight: 600;
}
.dashboard-category-card > strong {
    align-self: start;
    color: var(--category-color, #6f1d32);
    font: 700 24px/1.1 Literata, serif;
}
.dashboard-category-link {
    display: flex;
    grid-column: 1 / -1;
    align-items: center;
    justify-content: space-between;
    align-self: end;
    padding-top: 10px;
    border-top: 1px solid #f1e8eb;
    color: #7a5a64;
    font-size: 11px;
}
.dashboard-category-link i {
    color: var(--category-color, #6f1d32);
}
.dashboard-visual-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(310px, .85fr);
    align-items: stretch;
    gap: 18px;
}
.dashboard-chart-panel,
.dashboard-composition-panel,
.dashboard-recent-panel {
    min-width: 0;
    padding: 21px;
}
.dashboard-chart-scroll {
    max-width: 100%;
    overflow-x: auto;
    border-bottom: 1px solid #eadfe2;
}
.dashboard-trend-chart {
    display: flex;
    min-width: max-content;
    min-height: 254px;
    align-items: stretch;
    gap: 14px;
    padding: 5px 5px 0;
}
.dashboard-trend-column {
    display: flex;
    width: 42px;
    flex: 0 0 42px;
    flex-direction: column;
    align-items: center;
    justify-content: end;
}
.dashboard-trend-total {
    min-height: 18px;
    color: #6c555d;
    font-size: 10px;
    font-weight: 600;
}
.dashboard-trend-track {
    display: flex;
    width: 26px;
    height: 205px;
    align-items: end;
    justify-content: center;
    border-bottom: 1px solid #e9dfe2;
    background: repeating-linear-gradient(to top, #f8f2f4 0 1px, transparent 1px 51px);
}
.dashboard-trend-stack {
    display: flex;
    width: 100%;
    flex-direction: column-reverse;
    overflow: hidden;
    border-radius: 5px 5px 0 0;
    min-height: 3px;
    height: var(--stack-height, auto);
}
.dashboard-trend-segment {
    display: block;
    min-height: 1px;
    height: var(--segment-height, auto);
    background: var(--segment-bg, transparent);
}
.dashboard-trend-year {
    padding: 8px 0 10px;
    color: #705e63;
    font-size: 10px;
}
.dashboard-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 14px;
    padding-top: 14px;
}
.dashboard-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #6e5e62;
    font-size: 10px;
}
.dashboard-chart-legend i {
    width: 9px;
    height: 9px;
    border-radius: 3px;
    background: var(--legend-color);
}
.dashboard-composition-list {
    display: flex;
    flex-direction: column;
    gap: 13px;
}
.dashboard-composition-row {
    display: grid;
    grid-template-columns: minmax(100px, 1fr) minmax(60px, 1.25fr) auto;
    align-items: center;
    gap: 10px;
    color: #51444a;
    text-decoration: none;
}
.dashboard-composition-label {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-composition-track {
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #f3e9ec;
}
.dashboard-composition-track i {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    width: var(--track-width, 0%);
    background: var(--track-bg, transparent);
}
.dashboard-composition-row strong {
    min-width: 22px;
    color: #5b2637;
    font-size: 11px;
    text-align: right;
}
.dashboard-empty-state {
    display: flex;
    min-height: 210px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 24px;
    color: #806873;
    text-align: center;
}
.dashboard-empty-state i {
    color: #a64d62;
    font-size: 27px;
}
.dashboard-empty-state p {
    font-size: 13px;
    line-height: 1.5;
}
.dashboard-recent-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.dashboard-recent-item {
    display: grid;
    min-width: 0;
    grid-template-columns: 54px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    padding: 13px;
    border: 1px solid #eee3e6;
    border-radius: 11px;
    color: #3c2b31;
    text-decoration: none;
    transition: border-color .16s ease, background .16s ease;
}
.dashboard-recent-item:hover {
    border-color: #d9b8c2;
    background: #fdf8fa;
}
.dashboard-recent-year {
    display: grid;
    min-height: 38px;
    place-items: center;
    border-radius: 9px;
    background: #f8edf0;
    color: #6f1d32;
    font-size: 11px;
    font-weight: 700;
}
.dashboard-recent-copy {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
}
.dashboard-recent-copy strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.dashboard-recent-copy small {
    color: #806873;
    font-size: 10px;
}
.dashboard-recent-item > i {
    color: #8d5362;
    font-size: 12px;
}
.dashboard-recent-empty {
    min-height: 130px;
}
@media (max-width: 1120px) {
    .dashboard-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .dashboard-visual-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 700px) {
    .karya-dashboard {
        gap: 16px;
    }
    .karya-dashboard-header {
        align-items: flex-start;
    }
    .dashboard-updated {
        align-self: flex-start;
        margin-top: 8px;
    }
    .dashboard-total-card {
        min-height: 110px;
        padding: 18px;
    }
    .dashboard-total-card > span {
        display: none;
    }
    .dashboard-category-grid {
        gap: 10px;
    }
    .dashboard-category-card {
        min-height: 138px;
        padding: 13px;
    }
    .dashboard-chart-panel,
    .dashboard-composition-panel,
    .dashboard-recent-panel {
        padding: 16px;
    }
    .dashboard-recent-list {
        grid-template-columns: minmax(0, 1fr);
    }
}
@media (max-width: 480px) {
    .dashboard-filter-field,
    .dashboard-filter-category {
        min-width: 100%;
        flex-basis: 100%;
    }
    .dashboard-filter-actions {
        width: 100%;
    }
    .dashboard-filter-actions .action-btn {
        flex: 1;
    }
    .dashboard-category-card {
        grid-template-columns: 34px minmax(0, 1fr);
        gap: 4px 9px;
        padding: 10px;
    }
    .dashboard-category-icon {
        width: 34px;
        height: 34px;
    }
    .dashboard-category-label {
        font-size: 11px;
    }
    .dashboard-category-card > strong {
        font-size: 21px;
    }
    .dashboard-composition-row {
        grid-template-columns: minmax(88px, .9fr) minmax(50px, 1fr) auto;
        gap: 7px;
    }
}
