.ref-dashboard {
    --ref-dashboard-title: light-dark(#113d3d, var(--ref-text));
    --ref-dashboard-muted: light-dark(#536d70, var(--ref-text-muted));
    --ref-dashboard-border: light-dark(#dae7e4, var(--ref-border));
    --ref-dashboard-radius: 18px;
    width: 100%;
    padding: 22px clamp(10px, 2vw, 28px) 40px;
    container-type: inline-size;
    background: light-dark(#f2f6f5, var(--ref-bg));
    font: 14px/1.5 Arial, Helvetica, sans-serif;
}

.ref-dashboard .ref-dashboard-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 132px;
    padding: 24px clamp(20px, 3vw, 33px);
    border-radius: var(--ref-dashboard-radius);
    background: linear-gradient(110deg, #00594f, #056e66 62%, #0a8373);
    box-shadow: var(--ref-shadow-sm);
    color: var(--ref-header-text);
}

.ref-dashboard .ref-dashboard-hero h1 {
    margin: 6px 0;
    font-size: clamp(25px, 2.25vw, 33px);
    line-height: 1.14;
    font-weight: 800;
    letter-spacing: -1px;
    color: inherit;
}

.ref-dashboard .ref-dashboard-hero p {
    margin: 0;
    font-size: 13px;
    opacity: .9;
}

.ref-dashboard .ref-dashboard-kicker {
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.ref-dashboard .ref-dashboard-date {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 10px 13px;
    border: 1px solid rgb(255 255 255 / .2);
    border-radius: 8px;
    background: rgb(255 255 255 / .1);
    font-size: 11px;
    font-weight: 700;
}

.ref-dashboard .ref-dashboard-panel {
    min-width: 0;
    border: 1px solid var(--ref-dashboard-border);
    border-radius: var(--ref-dashboard-radius);
    background: var(--ref-surface);
    box-shadow: var(--ref-shadow-sm);
}

.ref-dashboard .ref-dashboard-filter {
    margin-top: 18px;
    padding: 18px 22px;
}

.ref-dashboard .ref-dashboard-filter h2 {
    margin: 0 0 13px;
    color: var(--ref-dashboard-title);
    font-size: 13px;
    font-weight: 800;
}

.ref-dashboard .ref-dashboard-filter h2 i {
    margin-right: 5px;
    color: var(--ref-primary);
}

.ref-dashboard .ref-dashboard-filter-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr)) minmax(0, 1.35fr);
    gap: 12px;
}

.ref-dashboard .ref-dashboard-field {
    min-width: 0;
}

.ref-dashboard .ref-dashboard-field label {
    display: block;
    margin: 0 0 5px;
    color: var(--ref-dashboard-muted);
    font-weight: 700;
}

.ref-dashboard .ref-dashboard-field select,
.ref-dashboard .ref-dashboard-field input {
    height: var(--ref-control-height);
    min-width: 0;
}

.ref-dashboard .ref-dashboard-filter-bottom {
    display: flex;
    justify-content: space-between;
    align-items: end;
    flex-wrap: wrap;
    gap: 14px 20px;
    margin-top: 13px;
}

.ref-dashboard .ref-dashboard-filter-dates {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.ref-dashboard .ref-dashboard-filter-dates fieldset {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 145px));
    gap: 8px;
    margin: 0;
    padding: 0;
    min-width: 0;
    border: 0;
}

.ref-dashboard .ref-dashboard-filter-dates legend {
    margin: 0 0 3px;
    padding: 0;
    color: var(--ref-dashboard-title);
    font-size: 12px;
    font-weight: 700;
}

.ref-dashboard .ref-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ref-dashboard .ref-button {
    min-height: 42px;
    font-size: 12px;
    font-weight: 800;
}

.ref-dashboard .ref-dashboard-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 24px 0 14px;
}

.ref-dashboard .ref-dashboard-heading h2,
.ref-dashboard .ref-dashboard-reports h2 {
    margin: 0;
    color: var(--ref-dashboard-title);
    font-size: 18px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -.35px;
}

.ref-dashboard .ref-dashboard-heading span,
.ref-dashboard .ref-dashboard-stat > span,
.ref-dashboard .ref-dashboard-chart p {
    color: var(--ref-dashboard-muted);
    font-size: 11px;
}

.ref-dashboard .ref-dashboard-stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
}

.ref-dashboard .ref-dashboard-stat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 147px;
    padding: 19px 20px;
}

.ref-dashboard .ref-dashboard-stat-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.ref-dashboard .ref-dashboard-stat h3 {
    margin: 0;
    color: var(--ref-dashboard-muted);
    font-size: 12px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ref-dashboard .ref-dashboard-icon,
.ref-dashboard .ref-dashboard-chart-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--ref-primary-soft);
    color: var(--ref-primary);
    font-size: 16px;
}

.ref-dashboard .ref-dashboard-icon--diretos,
.ref-dashboard .ref-dashboard-report:nth-child(2) .ref-dashboard-icon {
    color: var(--ref-info);
    background: var(--ref-info-soft);
}

.ref-dashboard .ref-dashboard-icon--atrasados {
    color: var(--ref-warning);
    background: var(--ref-warning-soft);
}

.ref-dashboard .ref-dashboard-stat > strong {
    color: var(--ref-dashboard-title);
    font-size: clamp(24px, 2.2vw, 36px);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -.04em;
    overflow-wrap: anywhere;
}

.ref-dashboard .ref-dashboard-stat > span {
    margin-top: auto;
}

.ref-dashboard .ref-dashboard-charts,
.ref-dashboard .ref-dashboard-report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.ref-dashboard .ref-dashboard-chart {
    display: flex;
    flex-direction: column;
    min-height: 332px;
    padding: 21px 22px 19px;
}

.ref-dashboard .ref-dashboard-chart > header,
.ref-dashboard .ref-dashboard-reports > header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.ref-dashboard .ref-dashboard-chart h3,
.ref-dashboard .ref-dashboard-report h3 {
    margin: 0 0 5px;
    color: var(--ref-dashboard-title);
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
}

.ref-dashboard .ref-dashboard-chart p {
    margin: 0;
}

.ref-dashboard .ref-dashboard-chart-icon {
    width: 29px;
    height: 29px;
    border: 1px solid var(--ref-dashboard-border);
    border-radius: 7px;
    background: var(--ref-surface-muted);
    color: var(--ref-dashboard-muted);
    font-size: 13px;
}

.ref-dashboard .ref-dashboard-plot {
    flex: 1;
    min-width: 0;
}

.ref-dashboard .ref-dashboard-plot[data-ref-dashboard-chart="evolucao"],
.ref-dashboard .ref-dashboard-plot[data-ref-dashboard-chart="refeicoes"] {
    min-height: 236px;
    overflow: auto;
}

.ref-dashboard .ref-dashboard-plot svg {
    display: block;
}

.ref-dashboard .ref-dashboard-gridline {
    stroke: var(--ref-dashboard-border);
}

.ref-dashboard .ref-dashboard-axis,
.ref-dashboard .ref-dashboard-bar-label {
    fill: var(--ref-dashboard-muted);
    color: var(--ref-dashboard-muted);
    font: 11px/1.2 Arial, sans-serif;
}

.ref-dashboard .ref-dashboard-bar-label {
    padding: 0 4px;
    overflow-wrap: anywhere;
    text-align: center;
}

.ref-dashboard .ref-dashboard-point {
    stroke: var(--ref-surface);
    stroke-width: 1.5;
}

.ref-dashboard .ref-dashboard-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 17px;
    color: var(--ref-dashboard-muted);
    font-size: 11px;
}

.ref-dashboard .ref-dashboard-legend span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.ref-dashboard .ref-dashboard-swatch {
    display: inline-block;
    flex: 0 0 9px;
    width: 9px;
    height: 9px;
    border-radius: 2px;
}

.ref-dashboard .ref-dashboard-swatch--pedido {
    background: #16877f;
}

.ref-dashboard .ref-dashboard-swatch--retirada {
    background: #63b7dd;
}

.ref-dashboard .ref-dashboard-chart .ref-dashboard-chart-note {
    margin-top: auto;
    padding-top: 10px;
    text-align: right;
}

.ref-dashboard .ref-dashboard-plot[data-ref-dashboard-chart="categorias"] {
    display: flex;
    align-items: center;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 20px;
    min-height: 228px;
}

.ref-dashboard .ref-dashboard-donut {
    position: relative;
    display: grid;
    place-items: center;
    width: 190px;
    aspect-ratio: 1;
    flex: 0 0 auto;
}

.ref-dashboard .ref-dashboard-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--ref-dashboard-border);
}

.ref-dashboard .ref-dashboard-donut-total {
    position: relative;
    display: grid;
    place-content: center;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: var(--ref-surface);
    color: var(--ref-dashboard-muted);
    font-size: 11px;
    text-align: center;
}

.ref-dashboard .ref-dashboard-donut-total strong {
    color: var(--ref-dashboard-title);
    font-size: 28px;
    line-height: 1.2;
}

.ref-dashboard .ref-dashboard-category-legend,
.ref-dashboard .ref-dashboard-status-list {
    display: grid;
    gap: 13px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.ref-dashboard .ref-dashboard-category-legend {
    flex: 1 1 150px;
    max-width: 245px;
}

.ref-dashboard .ref-dashboard-category-legend li,
.ref-dashboard .ref-dashboard-status-label {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: var(--ref-text);
    font-size: 12px;
}

.ref-dashboard .ref-dashboard-category-legend li > span,
.ref-dashboard .ref-dashboard-status-label > span {
    flex: 1;
    overflow-wrap: anywhere;
}

.ref-dashboard .ref-dashboard-status-list {
    gap: 17px;
}

.ref-dashboard .ref-dashboard-track {
    height: 10px;
    margin-top: 6px;
    overflow: hidden;
    border-radius: 8px;
    background: var(--ref-surface-muted);
}

.ref-dashboard .ref-dashboard-track span {
    display: block;
    height: 100%;
    border-radius: inherit;
}

.ref-dashboard .ref-dashboard-chart .ref-dashboard-empty {
    display: grid;
    place-items: center;
    min-height: 200px;
    padding: 16px;
    font-size: 13px;
    text-align: center;
}

.ref-dashboard .ref-dashboard-reports {
    margin-top: 25px;
    padding: 23px 24px 24px;
}

.ref-dashboard .ref-dashboard-reports .ref-dashboard-kicker {
    display: block;
    margin-bottom: 5px;
    color: var(--ref-primary);
}

.ref-dashboard .ref-dashboard-reports h2 {
    margin-bottom: 5px;
}

.ref-dashboard .ref-dashboard-reports p {
    margin: 0;
    color: var(--ref-dashboard-muted);
    font-size: 12px;
}

.ref-dashboard .ref-dashboard-report-filters {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 12px;
    border: 1px solid var(--ref-primary-border);
    border-radius: 8px;
    color: var(--ref-primary);
    background: var(--ref-primary-soft);
    font-size: 11px;
    font-weight: 700;
}

.ref-dashboard .ref-dashboard-report {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 21px 19px;
    border: 1px solid var(--ref-dashboard-border);
    border-radius: 12px;
    background: var(--ref-surface-muted);
}

.ref-dashboard .ref-dashboard-report .ref-dashboard-icon {
    width: 49px;
    height: 49px;
    border-radius: 12px;
    font-size: 23px;
}

.ref-dashboard .ref-dashboard-report h3 {
    font-size: 16px;
}

.ref-dashboard .ref-dashboard-report .ref-button {
    align-self: center;
    white-space: nowrap;
}

.ref-dashboard .ref-dashboard-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 11px;
}

.ref-dashboard .ref-dashboard-tags span {
    padding: 4px 8px;
    border: 1px solid var(--ref-dashboard-border);
    border-radius: 6px;
    background: var(--ref-surface);
    color: var(--ref-dashboard-muted);
    font-size: 10px;
    font-weight: 700;
}

.ref-dashboard .ref-dashboard-message {
    margin: 14px 0 0;
    color: var(--ref-dashboard-muted);
    font-size: 13px;
}

@container (max-width: 1120px) {
    .ref-dashboard .ref-dashboard-filter-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ref-dashboard .ref-dashboard-report {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ref-dashboard .ref-dashboard-report .ref-button {
        grid-column: 2;
        justify-self: start;
    }
}

@container (max-width: 820px) {
    .ref-dashboard .ref-dashboard-stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ref-dashboard .ref-dashboard-charts,
    .ref-dashboard .ref-dashboard-report-grid {
        grid-template-columns: 1fr;
    }
}

@container (max-width: 540px) {
    .ref-dashboard .ref-dashboard-filter-grid,
    .ref-dashboard .ref-dashboard-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ref-dashboard .ref-dashboard-filter,
    .ref-dashboard .ref-dashboard-stat,
    .ref-dashboard .ref-dashboard-chart,
    .ref-dashboard .ref-dashboard-reports,
    .ref-dashboard .ref-dashboard-report {
        padding: 14px;
    }

    .ref-dashboard .ref-dashboard-filter-dates,
    .ref-dashboard .ref-dashboard-reports > header {
        flex-direction: column;
    }

    .ref-dashboard .ref-dashboard-filter-dates {
        width: 100%;
    }

    .ref-dashboard .ref-dashboard-filter-dates fieldset {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
