/* Design system e componentes globais */
:root {
    --color-text-primary: #1f2d42;
    --color-text-muted: #637087;
    --color-border: #dce3ec;
    --color-surface: #fff;
    --color-page: #f4f7fb;
    --color-primary: #2563eb;
    --color-primary-soft: #edf3ff;
    --color-danger: #b5474f;
}

/* Layout */
.app-shell {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    background: var(--color-page);
}

.app-sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: #182235;
    border-bottom: 1px solid #27344a;
}

.app-main {
    min-width: 0;
    flex: 1;
}

.app-content {
    min-height: 100vh;
}

/* Navegação lateral */
.side-nav,
.side-nav * {
    box-sizing: border-box;
}

.side-nav {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    color: #d6deea;
    font-family: "Segoe UI", Arial, sans-serif;
    background: #182235;
}

.side-nav__brand {
    display: flex;
    min-height: 68px;
    padding: 8px 12px;
    align-items: center;
    gap: 8px;
    background: #182235;
    border-bottom: 1px solid #27344a;
}

.side-nav__brand-link {
    display: flex;
    min-width: 0;
    min-height: 52px;
    padding: 0;
    flex: 1;
    align-items: center;
    justify-content: center;
    background: transparent;
    text-decoration: none;
}

.side-nav__logo {
    display: block;
    width: 150px;
    height: 41px;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
}

.side-nav__toggle {
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    flex: 0 0 auto;
    color: #c5cfdd;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid #35445b;
    border-radius: 8px;
    place-items: center;
}

.side-nav__toggle:hover,
.side-nav__toggle:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, 0.09);
    outline: none;
}

.side-nav__toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.side-nav__menu {
    display: flex;
    max-height: calc(100vh - 68px);
    padding: 10px 10px 12px;
    overflow-y: auto;
    flex: 1;
    flex-direction: column;
    background: #182235;
    border-bottom: 1px solid #27344a;
}

.side-nav__menu--collapsed {
    display: none;
}

.side-nav__links {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.side-nav__section-label {
    display: block;
    margin: 12px 10px 5px;
    color: #8290a7;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.side-nav__section-label:first-child {
    margin-top: 4px;
}

.side-nav__link {
    display: flex;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    align-items: center;
    gap: 10px;
    color: #cbd4e1;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.25;
    text-align: left;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-radius: 8px;
    transition: color 120ms ease, background-color 120ms ease;
}

.side-nav__link:hover,
.side-nav__link:focus-visible {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.065);
    outline: none;
}

.side-nav__link.active {
    color: #fff;
    font-weight: 650;
    background: rgba(96, 142, 222, 0.2);
}

.side-nav__icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.side-nav__footer {
    margin-top: auto;
    padding-top: 12px;
}

.side-nav__user {
    padding: 10px;
    background: rgba(255, 255, 255, 0.035);
    border-top: 1px solid #2a374c;
    border-radius: 8px;
}

.side-nav__user-summary {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 9px;
}

.side-nav__user-avatar {
    display: grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    color: #f3f7fd;
    font-size: 13px;
    font-weight: 700;
    background: #344968;
    border: 1px solid #465c7c;
    border-radius: 50%;
    place-items: center;
}

.side-nav__user-identity {
    display: flex;
    min-width: 0;
    flex: 1;
    flex-direction: column;
    gap: 1px;
}

.side-nav__user-identity small {
    color: #8290a7;
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
}

.side-nav__user-identity strong {
    overflow: hidden;
    color: #e4eaf3;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.side-nav__user-actions {
    display: grid;
    margin-top: 9px;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 5px;
}

.side-nav__user-action {
    display: flex;
    min-width: 0;
    min-height: 34px;
    padding: 6px 9px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #bfcada;
    font: inherit;
    font-size: 12px;
    font-weight: 550;
    line-height: 1.2;
    text-decoration: none;
    background: transparent;
    border: 1px solid #344157;
    border-radius: 7px;
    cursor: pointer;
    transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.side-nav__user-action .side-nav__icon {
    width: 16px;
    height: 16px;
}

.side-nav__user-action:hover,
.side-nav__user-action:focus-visible,
.side-nav__user-action.active {
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.07);
    border-color: #465873;
    outline: none;
}

.side-nav__logout {
    padding-inline: 8px;
}

.side-nav__logout:hover,
.side-nav__logout:focus-visible {
    color: #fff;
    background: rgba(205, 87, 99, 0.16);
    outline: none;
}

@media (min-width: 641px) {
    .app-shell {
        flex-direction: row;
    }

    .app-sidebar {
        width: 252px;
        height: auto;
        min-height: 100vh;
        align-self: stretch;
        flex: 0 0 252px;
        position: relative;
        border-right: 1px solid #27344a;
        border-bottom: 0;
    }

    .side-nav {
        position: sticky;
        top: 0;
        height: 100vh;
    }

    .side-nav__brand {
        min-height: 76px;
        padding: 10px 12px;
    }

    .side-nav__brand-link {
        min-height: 56px;
        justify-content: center;
    }

    .side-nav__logo {
        width: 188px;
        height: 51px;
        object-position: center;
    }

    .side-nav__toggle {
        display: none;
    }

    .side-nav__menu,
    .side-nav__menu--collapsed {
        display: flex;
        max-height: none;
        padding: 12px 12px 14px;
        border-bottom: 0;
    }
}

/* Formulários */
.date-field {
    position: relative;
    width: 100%;
    min-width: 150px;
}

.date-input {
    width: 100%;
    height: 38px;
    padding: 0 40px 0 11px;
    color: #1f2d42;
    font-family: inherit;
    font-size: 14px;
    background: #fff;
    border: 1px solid #d9dee7;
    border-radius: 7px;
    outline: none;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

.date-input:hover {
    border-color: #b8c0cc;
}

.date-input:focus {
    border-color: #0f9f81;
    box-shadow: 0 0 0 3px rgba(15, 159, 129, 0.12);
}

.date-input.is-invalid {
    border-color: #c95858;
    box-shadow: 0 0 0 3px rgba(201, 88, 88, 0.10);
}

.date-input:disabled {
    color: #7c8796;
    background: #f2f4f6;
    cursor: not-allowed;
}

.date-calendar-button {
    position: absolute;
    top: 0;
    right: 0;
    display: grid;
    width: 40px;
    height: 100%;
    padding: 0;
    color: #6e7a8b;
    background: transparent;
    border: 0;
    cursor: pointer;
    place-items: center;
}

.date-calendar-button:hover:not(:disabled),
.date-calendar-button:focus-visible {
    color: #344258;
    outline: none;
}

.date-calendar-button:disabled {
    color: #98a2b3;
    cursor: not-allowed;
}

.date-calendar-icon {
    display: grid;
    width: 17px;
    height: 17px;
    pointer-events: none;
    place-items: center;
}

.date-calendar-icon svg {
    display: block;
    width: 100%;
    height: 100%;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.date-calendar-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 80;
    width: 258px;
    padding: 10px;
    color: #344258;
    background: #fff;
    border: 1px solid #d6dee8;
    border-radius: 9px;
    box-shadow: 0 16px 34px rgba(27, 40, 62, 0.16);
}

.date-calendar-popover__header {
    display: grid;
    height: 34px;
    align-items: center;
    grid-template-columns: 30px 1fr 30px;
    gap: 6px;
}

.date-calendar-popover__header strong {
    overflow: hidden;
    color: #26364d;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.date-calendar-popover__nav {
    display: grid;
    width: 30px;
    height: 30px;
    padding: 0;
    color: #667489;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    place-items: center;
}

.date-calendar-popover__nav:hover:not(:disabled),
.date-calendar-popover__nav:focus-visible {
    color: #315f9e;
    background: #edf3fa;
    border-color: #d7e1ed;
    outline: none;
}

.date-calendar-popover__nav:disabled {
    color: #b4bdca;
    cursor: not-allowed;
}

.date-calendar-popover__nav svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.9;
}

.date-calendar-popover__weekdays,
.date-calendar-popover__days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.date-calendar-popover__weekdays {
    margin-top: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid #edf1f5;
}

.date-calendar-popover__weekdays span {
    color: #7a8798;
    font-size: 10px;
    font-weight: 700;
    text-align: center;
    text-transform: uppercase;
}

.date-calendar-popover__days {
    margin-top: 7px;
    gap: 3px;
}

.date-calendar-popover__day {
    display: grid;
    width: 100%;
    height: 29px;
    padding: 0;
    color: #3c4b60;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    place-items: center;
}

.date-calendar-popover__day:hover:not(:disabled),
.date-calendar-popover__day:focus-visible {
    color: #315f9e;
    background: #edf3fa;
    outline: none;
}

.date-calendar-popover__day.is-outside {
    color: #a3adba;
}

.date-calendar-popover__day.is-today {
    border-color: #b9cbe2;
}

.date-calendar-popover__day.is-selected {
    color: #fff;
    background: #315f9e;
    border-color: #315f9e;
}

.date-calendar-popover__day.is-disabled,
.date-calendar-popover__day:disabled {
    color: #c4cbd5;
    background: transparent;
    border-color: transparent;
    cursor: not-allowed;
}

.percentage-input {
    position: relative;
    display: flex;
    width: 112px;
    margin-left: auto;
    align-items: center;
}

.percentage-input input {
    width: 100%;
    height: 30px;
    padding: 0 30px 0 9px;
    color: #344258;
    font: inherit;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
    background: #fff;
    border: 1px solid #d8e0e9;
    border-radius: 6px;
    outline: none;
}

.percentage-input input:hover:not(:disabled) {
    border-color: #b9c5d4;
}

.percentage-input input:focus {
    border-color: #6d91c9;
    box-shadow: 0 0 0 3px rgba(68, 110, 176, 0.12);
}

.percentage-input.is-invalid input {
    border-color: #c95858;
    box-shadow: 0 0 0 3px rgba(201, 88, 88, 0.1);
}

.percentage-input input:disabled {
    color: #7c8796;
    background: #f2f4f6;
}

.percentage-input__suffix,
.percentage-input > .loading-spinner {
    position: absolute;
    right: 9px;
    pointer-events: none;
}

.percentage-input__suffix {
    color: #7a8798;
    font-size: 11px;
    font-weight: 650;
}

.percentage-input > .loading-spinner {
    width: 13px;
    height: 13px;
}

/* Dashboard */
.dashboard-page,
.dashboard-page * {
    box-sizing: border-box;
}

.dashboard-page {
    position: relative;
    width: calc(100% + 3rem);
    min-height: 100vh;
    margin: -1.1rem -1.5rem 0;
    padding: 12px 16px 20px;
    color: var(--color-text-primary);
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    background: var(--color-page);
}

.dashboard-header {
    display: flex;
    min-height: 56px;
    padding: 8px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.dashboard-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 8px;
}

.dashboard-title-icon {
    display: grid;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    color: #6c7a90;
    place-items: center;
}

.dashboard-title-icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.dashboard-title h1 {
    margin: 0;
    color: #172b4d;
    font-size: 20px;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.dashboard-title p {
    margin: 2px 0 0;
    color: var(--color-text-muted);
    font-size: 11px;
}

.dashboard-filters {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.dashboard-date-context {
    display: inline-flex;
    height: 34px;
    padding: 0 10px;
    align-items: center;
    gap: 6px;
    color: #526178;
    font-size: 11px;
    font-weight: 650;
    white-space: nowrap;
    background: #f5f7fa;
    border: 1px solid #e0e5eb;
    border-radius: 7px;
}

.dashboard-date-context svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #6c7a90;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.dashboard-date-field {
    width: 144px;
}

.dashboard-date-field label {
    display: block;
    margin: 0 0 3px 1px;
    color: #53627a;
    font-size: 11px;
    font-weight: 650;
}

.dashboard-date-field .date-input {
    height: 34px;
    font-size: 13px;
}

.dashboard-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 10px;
    gap: 10px;
}

.metric-card {
    --metric-color: #0f9f81;
    --metric-background: #e6f7f3;
    min-width: 0;
    padding: 12px 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(31, 41, 55, 0.03);
}

.metric-card--blue {
    --metric-color: #367bf5;
    --metric-background: #eaf1ff;
}

.metric-card--violet {
    --metric-color: #7c5ce7;
    --metric-background: #f0edff;
}

.metric-card--amber {
    --metric-color: #e58a16;
    --metric-background: #fff3df;
}

.metric-card__header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.metric-card__icon {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    color: var(--metric-color);
    background: var(--metric-background);
    border-radius: 7px;
    place-items: center;
}

.metric-card__icon svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.metric-card__title {
    color: #53627a;
    font-size: 12px;
    font-weight: 650;
}

.metric-card__value {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    color: #253044;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-card__breakdown {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 8px 0 0;
    padding: 7px 0 0;
    border-top: 1px solid #edf0f3;
}

.metric-card__breakdown > div:last-child {
    padding-left: 12px;
    border-left: 1px solid #edf0f3;
}

.metric-card__breakdown dt,
.metric-card__breakdown dd {
    margin: 0;
    font-size: 11px;
}

.metric-card__breakdown dt {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #718096;
}

.metric-card__breakdown dd {
    margin-top: 4px;
    color: #34445d;
    font-size: 12px;
    font-weight: 700;
}

.metric-card__dot {
    width: 6px;
    height: 6px;
    background: #0f9f81;
    border-radius: 50%;
}

.metric-card__dot--retail {
    background: #367bf5;
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 16px;
    gap: 12px;
}

.content-panel {
    min-width: 0;
    overflow: hidden;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(31, 41, 55, 0.025);
}

.content-panel--wide {
    grid-column: 1 / -1;
}

.content-panel__header {
    display: flex;
    min-height: 58px;
    padding: 15px 17px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #e9ecf0;
}

.content-panel__heading h2 {
    margin: 0;
    color: #203453;
    font-size: 15px;
    font-weight: 700;
}

.content-panel__body {
    min-width: 0;
    padding: 6px 8px 3px;
}

.content-panel__empty {
    display: flex;
    min-height: 300px;
    padding: 30px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #8b95a4;
    text-align: center;
}

.content-panel__empty svg {
    width: 26px;
    height: 26px;
    margin-bottom: 9px;
    fill: none;
    stroke: #a9b1bc;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.content-panel__empty strong {
    color: #687486;
    font-size: 14px;
}

.content-panel__empty span {
    margin-top: 3px;
    font-size: 12px;
}

.dashboard-page .apexcharts-canvas,
.dashboard-page .apexcharts-svg {
    max-width: 100% !important;
}

.dashboard-page .apexcharts-tooltip {
    color: #344054;
    background: #fff !important;
    border: 1px solid #dfe3e8 !important;
    border-radius: 7px !important;
    box-shadow: 0 4px 12px rgba(31, 41, 55, 0.08) !important;
}

.chart-tooltip {
    display: flex;
    min-width: 150px;
    padding: 9px 11px;
    flex-direction: column;
    gap: 3px;
    color: #536075;
    font-size: 12px;
}

.chart-tooltip strong {
    color: #2f3a4d;
    font-size: 13px;
    font-weight: 700;
}

.dashboard-page .apexcharts-legend-text {
    color: #4d5d75 !important;
    font-size: 12px !important;
}

.product-list {
    margin-top: 12px;
}

.product-list__tools {
    display: flex;
    align-items: center;
    gap: 10px;
}

.product-list .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.product-list__count {
    color: #7c8797;
    font-size: 12px;
    white-space: nowrap;
}

.product-list__search {
    position: relative;
    width: 230px;
}

.product-list__search svg {
    position: absolute;
    top: 50%;
    left: 10px;
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #7f8a99;
    stroke-linecap: round;
    stroke-width: 1.7;
    transform: translateY(-50%);
}

.product-list__search input {
    width: 100%;
    height: 34px;
    padding: 0 31px 0 32px;
    color: #344054;
    font: inherit;
    font-size: 13px;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 7px;
    outline: none;
}

.product-list__search input:focus {
    border-color: #0f9f81;
    box-shadow: 0 0 0 3px rgba(15, 159, 129, 0.11);
}

.product-list__clear {
    position: absolute;
    top: 50%;
    right: 6px;
    width: 22px;
    height: 22px;
    padding: 0;
    color: #7b8695;
    background: transparent;
    border: 0;
    cursor: pointer;
    transform: translateY(-50%);
}

.product-list__table-wrap {
    max-height: 440px;
    overflow: auto;
}

.product-list__table {
    width: 100%;
    border-collapse: collapse;
}

.product-list__table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 10px 16px;
    color: #788394;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-align: left;
    text-transform: uppercase;
    background: #f7f8fa;
    border-bottom: 1px solid #e4e7eb;
}

.product-list__table th:last-child,
.product-list__table td:last-child {
    text-align: right;
}

.product-list__table td {
    padding: 11px 16px;
    color: #596579;
    font-size: 13px;
    border-bottom: 1px solid #eceff2;
}

.product-list__table tbody tr:last-child td {
    border-bottom: 0;
}

.product-list__code {
    color: #087d69;
    font-size: 12px;
    font-weight: 700;
}

.product-list__description {
    color: #374256;
}

.product-list__value {
    color: #2d394c;
    font-weight: 700;
    white-space: nowrap;
}

.product-list__empty {
    padding: 40px 16px !important;
    color: #8792a1 !important;
    text-align: center !important;
}

.dashboard-refresh-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    padding-top: 130px;
    align-items: flex-start;
    justify-content: center;
    gap: 8px;
    color: #526074;
    font-size: 13px;
    font-weight: 600;
    background: rgba(244, 247, 251, 0.76);
}

.loading-spinner {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid #d3d9e1;
    border-top-color: #0f9f81;
    border-radius: 50%;
    animation: loading-spin 700ms linear infinite;
}

.dashboard-loading {
    display: flex;
    width: calc(100% + 3rem);
    min-height: calc(100vh - 1.1rem);
    margin: -1.1rem -1.5rem 0;
    align-items: center;
    justify-content: center;
    gap: 9px;
    color: #526074;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 14px;
    background: #f4f7fb;
}

.dashboard-loading strong {
    font-weight: 600;
}

.dashboard-load-error {
    display: flex;
    min-height: 240px;
    margin-top: 18px;
    padding: 30px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    color: #778295;
    text-align: center;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.dashboard-load-error strong {
    color: #3d485a;
    font-size: 15px;
}

.dashboard-load-error span {
    margin-top: 4px;
    font-size: 13px;
}

.dashboard-load-error button {
    margin-top: 14px;
    padding: 8px 12px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    background: #087d69;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
}

.dashboard-load-error button:disabled {
    opacity: 0.55;
    cursor: wait;
}

@keyframes loading-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 1450px) {
    .dashboard-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 1100px) {
    .dashboard-chart-grid {
        grid-template-columns: 1fr;
    }

    .content-panel--wide {
        grid-column: auto;
    }
}

@media (max-width: 720px) {
    .dashboard-page,
    .dashboard-loading {
        width: calc(100% + 1.5rem);
        margin-right: -0.75rem;
        margin-left: -0.75rem;
    }

    .dashboard-page {
        padding: 16px;
    }

    .dashboard-header,
    .dashboard-filters,
    .content-panel__header,
    .product-list__tools {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-date-field,
    .dashboard-date-context,
    .product-list__search {
        width: 100%;
    }

    .dashboard-date-context {
        justify-content: center;
    }

    .dashboard-filters {
        padding-top: 4px;
        padding-left: 0;
        border-left: 0;
    }

    .dashboard-metrics {
        grid-template-columns: 1fr;
    }

    .product-list__table {
        min-width: 600px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .loading-spinner {
        animation: none;
    }
}

/* Listas de pedidos */
.orders-page,
.orders-page * {
    box-sizing: border-box;
}

.orders-page {
    position: relative;
    display: flex;
    width: calc(100% + 3rem);
    min-height: 100vh;
    margin: -1.1rem -1.5rem 0;
    padding: 12px 16px 20px;
    flex-direction: column;
    gap: 10px;
    color: var(--color-text-primary);
    font-family: "Segoe UI", Arial, sans-serif;
    background: var(--color-page);
}

.orders-header {
    display: flex;
    min-height: 56px;
    padding: 8px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
}

.orders-header__title {
    display: flex;
    min-width: 170px;
    align-items: center;
    gap: 8px;
}

.orders-header__icon {
    display: grid;
    width: 28px;
    height: 28px;
    flex: 0 0 auto;
    color: #426cae;
    background: #eef3fa;
    border-radius: 8px;
    place-items: center;
}

.orders-header__icon svg,
.orders-refresh-button svg,
.orders-message svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.orders-header__title h1 {
    margin: 0;
    color: #27364b;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.2;
}

.orders-header__title span {
    display: block;
    margin-top: 2px;
    color: #758196;
    font-size: 12px;
}

.orders-header__filters {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    justify-content: flex-end;
    gap: 8px;
}

.orders-date-field,
.orders-select-field {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 4px;
}

.orders-date-field > span,
.orders-select-field > span {
    color: #68758a;
    font-size: 11px;
    font-weight: 650;
}

.orders-date-field .date-field {
    width: 142px;
}

.orders-date-field .date-input,
.orders-select-field select {
    height: 34px;
    color: #344258;
    font-size: 13px;
    background-color: #fff;
    border-color: #d6dde7;
    border-radius: 7px;
}

.orders-select-field select {
    width: 144px;
    padding: 0 30px 0 10px;
    border: 1px solid #d6dde7;
    outline: none;
}

.orders-situation-field select {
    width: 126px;
}

.orders-date-type-field select {
    width: 138px;
}

.orders-date-field .date-input:focus,
.orders-select-field select:focus {
    border-color: #6d91c9;
    box-shadow: 0 0 0 3px rgba(68, 110, 176, 0.12);
}

.orders-refresh-button {
    display: inline-flex;
    height: 34px;
    padding: 0 13px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #fff;
    font: inherit;
    font-size: 13px;
    font-weight: 650;
    background: #315f9e;
    border: 1px solid #315f9e;
    border-radius: 7px;
}

.orders-refresh-button:hover:not(:disabled),
.orders-refresh-button:focus-visible {
    background: #284f86;
    border-color: #284f86;
    outline: none;
}

.orders-refresh-button:disabled {
    opacity: 0.62;
    cursor: wait;
}

.orders-message {
    display: flex;
    min-height: 40px;
    padding: 9px 12px;
    align-items: center;
    gap: 9px;
    font-size: 12px;
    border: 1px solid;
    border-radius: 8px;
}

.orders-message svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
}

.orders-message--warning {
    color: #735d2a;
    background: #fffaf0;
    border-color: #eadbb5;
}

.orders-message--error {
    color: #8d3e46;
    background: #fff5f6;
    border-color: #ebcbd0;
}

/* Componente de lista reutilizável */
.data-list {
    position: relative;
    min-width: 0;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 10px;
    overflow: hidden;
}

.data-list__toolbar {
    display: flex;
    min-height: 58px;
    padding: 10px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid #e4e9f0;
}

.data-list__summary {
    display: flex;
    min-width: 130px;
    flex-direction: column;
    gap: 1px;
}

.data-list__summary strong {
    color: #2d3b50;
    font-size: 14px;
    font-weight: 650;
}

.data-list__summary span {
    color: #7c8798;
    font-size: 11px;
}

.data-list__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 7px;
}

.data-list__search {
    position: relative;
    display: flex;
    width: min(330px, 31vw);
    min-width: 220px;
    margin: 0;
    align-items: center;
}

.data-list__search > svg {
    position: absolute;
    left: 10px;
    width: 16px;
    height: 16px;
    color: #7d899a;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
    pointer-events: none;
}

.data-list__search input {
    width: 100%;
    height: 36px;
    padding: 0 34px 0 34px;
    color: #344258;
    font: inherit;
    font-size: 13px;
    background: #f9fafc;
    border: 1px solid #d9e0e9;
    border-radius: 7px;
    outline: none;
}

.data-list__search input:focus {
    background: #fff;
    border-color: #7897c4;
    box-shadow: 0 0 0 3px rgba(68, 110, 176, 0.11);
}

.data-list__search button {
    position: absolute;
    right: 5px;
    display: grid;
    width: 27px;
    height: 27px;
    padding: 0;
    color: #798598;
    background: transparent;
    border: 0;
    border-radius: 5px;
    place-items: center;
}

.data-list__search button:hover {
    color: #344258;
    background: #edf1f6;
}

.data-list__search button svg {
    width: 15px;
    height: 15px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.data-list__tool-button {
    display: inline-flex;
    height: 36px;
    padding: 0 11px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #516178;
    font: inherit;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    background: #fff;
    border: 1px solid #d7dee8;
    border-radius: 7px;
}

.data-list__tool-button svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.data-list__tool-button:hover:not(:disabled),
.data-list__tool-button:focus-visible,
.data-list__tool-button.is-active {
    color: #315f9e;
    background: #f2f6fb;
    border-color: #b9c9df;
    outline: none;
}

.data-list__tool-button--export {
    color: #28705b;
}

.data-list__tool-button--export:hover:not(:disabled),
.data-list__tool-button--export:focus-visible {
    color: #205d4b;
    background: #f0f8f5;
    border-color: #b7d6cb;
}

.data-list__tool-button:disabled {
    opacity: 0.48;
    cursor: default;
}

.data-list__filter-count {
    display: inline-grid;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    color: #fff;
    font-size: 10px;
    background: #426cae;
    border-radius: 9px;
    place-items: center;
}

.data-list__columns-control {
    position: relative;
    flex: 0 0 auto;
}

.data-list__columns-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 12;
    width: 240px;
    padding: 8px;
    color: #435167;
    background: #fff;
    border: 1px solid #d8e0e9;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(36, 51, 74, 0.14);
}

.data-list__columns-menu > header {
    display: flex;
    padding: 3px 4px 8px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-bottom: 1px solid #e8ecf1;
}

.data-list__columns-menu > header strong {
    color: #2f3d51;
    font-size: 12px;
    font-weight: 650;
}

.data-list__columns-menu > header span {
    color: #7b8798;
    font-size: 10px;
}

.data-list__columns-options {
    display: flex;
    max-height: 252px;
    padding: 5px 0;
    overflow-y: auto;
    flex-direction: column;
}

.data-list__columns-options label {
    display: flex;
    min-height: 31px;
    margin: 0;
    padding: 5px 6px;
    align-items: center;
    gap: 8px;
    color: #4d5b70;
    font-size: 12px;
    border-radius: 5px;
    cursor: pointer;
}

.data-list__columns-options label:hover {
    background: #f4f7fa;
}

.data-list__columns-options input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: #315f9e;
}

.data-list__columns-options label:has(input:disabled) {
    color: #8993a2;
    cursor: default;
}

.data-list__columns-reset {
    width: 100%;
    min-height: 30px;
    padding: 5px 8px;
    color: #53657e;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    background: #f7f9fb;
    border: 1px solid #e0e6ed;
    border-radius: 6px;
}

.data-list__columns-reset:hover,
.data-list__columns-reset:focus-visible {
    color: #315f9e;
    background: #eef3f9;
    outline: none;
}

.data-list__filters {
    display: flex;
    padding: 12px;
    align-items: flex-end;
    gap: 12px;
    background: #f7f9fc;
    border-bottom: 1px solid #e3e8ef;
}

.data-list__filter-grid {
    display: grid;
    min-width: 0;
    flex: 1;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 9px;
}

.data-list__filter-field {
    display: flex;
    margin: 0;
    flex-direction: column;
    gap: 4px;
}

.data-list__filter-field span {
    color: #69768a;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.data-list__filter-field input {
    width: 100%;
    height: 34px;
    padding: 0 9px;
    color: #37465a;
    font: inherit;
    font-size: 12px;
    background: #fff;
    border: 1px solid #d9e0e9;
    border-radius: 6px;
    outline: none;
}

.data-list__filter-field input:focus {
    border-color: #7897c4;
    box-shadow: 0 0 0 3px rgba(68, 110, 176, 0.1);
}

.data-list__clear-filters {
    height: 34px;
    padding: 0 10px;
    flex: 0 0 auto;
    color: #596a80;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    background: #fff;
    border: 1px solid #d8dfe8;
    border-radius: 6px;
}

.data-list__clear-filters:disabled {
    opacity: 0.45;
}

.data-list__table-wrap {
    position: relative;
    width: 100%;
    min-height: 250px;
    max-height: calc(100vh - 238px);
    overflow: auto;
}

.data-list__table {
    width: max-content;
    min-width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.data-list__table th,
.data-list__table td {
    padding: 9px 10px;
    vertical-align: middle;
    border-bottom: 1px solid #e8ecf1;
}

.data-list__table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: 39px;
    color: #667489;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.035em;
    text-transform: uppercase;
    background: #f5f7fa;
    border-bottom-color: #dce2ea;
}

.data-list__table tbody td {
    height: 43px;
    color: #48566a;
    font-size: 12px;
    white-space: nowrap;
}

.data-list__table tbody td > span:not(.data-list__status) {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
}

.data-list__row {
    background: #fff;
    transition: background-color 100ms ease;
}

.data-list__row:hover,
.data-list__row.is-expanded {
    background: #f8fafc;
}

.data-list__sort-button {
    display: flex;
    width: 100%;
    padding: 0;
    align-items: center;
    justify-content: inherit;
    gap: 5px;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-align: inherit;
    text-transform: inherit;
    background: transparent;
    border: 0;
}

.data-list__sort-button:hover,
.data-list__sort-button.is-sorted {
    color: #315f9e;
}

.data-list__sort-icon {
    display: inline-grid;
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    place-items: center;
}

.data-list__sort-icon svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.45;
}

.data-list__header-label {
    display: block;
}

.data-list__align-left {
    text-align: left;
}

.data-list__align-center {
    text-align: center;
}

.data-list__align-center .data-list__sort-button {
    justify-content: center;
}

.data-list__align-right {
    text-align: right;
}

.data-list__align-right .data-list__sort-button {
    justify-content: flex-end;
}

.data-list__expand-column,
.data-list__expand-cell {
    width: 42px;
    min-width: 42px;
    text-align: center;
}

.data-list__expand-button {
    display: inline-grid;
    width: 26px;
    height: 26px;
    padding: 0;
    color: #68768a;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    place-items: center;
}

.data-list__expand-button:hover,
.data-list__expand-button:focus-visible,
.data-list__expand-button.is-expanded {
    color: #315f9e;
    background: #edf3fa;
    outline: none;
}

.data-list__expand-button svg {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
    transition: transform 120ms ease;
}

.data-list__expand-button.is-expanded svg {
    transform: rotate(90deg);
}

.data-list__actions-column,
.data-list__actions-cell {
    width: 98px;
    min-width: 98px;
    text-align: center;
}

.data-list__row-actions {
    display: flex;
    justify-content: center;
    gap: 5px;
}

.data-list__row-actions button {
    min-height: 28px;
    padding: 4px 8px;
    color: #315f9e;
    font: inherit;
    font-size: 10px;
    font-weight: 700;
    background: #f2f6fb;
    border: 1px solid #d1ddec;
    border-radius: 6px;
}

.data-list__row-actions button:hover:not(:disabled) {
    background: #e8f0f9;
    border-color: #b9cbe2;
}

.data-list__row-actions button:disabled {
    opacity: 0.55;
}

.data-list__detail-row > td {
    padding: 0;
    white-space: normal;
    background: #f4f7fb;
    border-bottom-color: #dce3ec;
}

.data-list__table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 3;
    height: 40px;
    color: #344258;
    font-size: 12px;
    font-weight: 700;
    background: #f4f7fa;
    border-top: 1px solid #d9e0e8;
    border-bottom: 0;
}

.data-list__empty {
    height: 250px !important;
    padding: 46px 18px !important;
    color: #7b8798 !important;
    text-align: center !important;
    white-space: normal !important;
}

.data-list__empty svg {
    display: block;
    width: 30px;
    height: 30px;
    margin: 0 auto 9px;
    color: #9ba6b5;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.4;
}

.data-list__empty strong,
.data-list__empty span {
    display: block;
}

.data-list__empty strong {
    color: #59677b;
    font-size: 13px;
    font-weight: 650;
}

.data-list__empty span {
    margin-top: 3px;
    font-size: 11px;
}

.data-list__loading {
    position: absolute;
    inset: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #506078;
    font-size: 12px;
    font-weight: 650;
    background: rgba(247, 249, 252, 0.78);
}

.data-list__status {
    display: inline-flex;
    min-width: 82px;
    min-height: 24px;
    padding: 3px 8px;
    align-items: center;
    justify-content: center;
    color: #596779;
    font-size: 10px;
    font-weight: 700;
    background: #edf0f4;
    border-radius: 12px;
}

.data-list__status--confirmed {
    color: #25604d;
    background: #e4f3ed;
}

.data-list__status--invoiced {
    color: #28558f;
    background: #e7eef9;
}

.data-list__status--pending {
    color: #785f25;
    background: #f7edcf;
}

.data-list__status--cancelled {
    color: #8b424a;
    background: #f7e5e7;
}

/* Detalhe expandido dos pedidos */
.order-items {
    padding: 12px 52px 16px;
}

.order-items__header {
    display: flex;
    padding: 0 2px 9px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-items__header > div {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.order-items__header strong {
    color: #344258;
    font-size: 12px;
    font-weight: 700;
}

.order-items__header span {
    color: #788599;
    font-size: 10px;
}

.order-items__table-wrap {
    overflow: hidden;
    background: #fff;
    border: 1px solid #dce3eb;
    border-radius: 7px;
}

.order-items__table {
    width: 100%;
    border-collapse: collapse;
}

.order-items__table th,
.order-items__table td {
    height: auto !important;
    padding: 8px 10px !important;
    border-bottom: 1px solid #e8ecf1 !important;
}

.order-items__table th {
    color: #6f7c8f;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: #f8f9fb;
}

.order-items__table td {
    color: #4c596c;
    font-size: 11px;
    white-space: normal !important;
}

.order-items__table tbody tr:last-child td {
    border-bottom: 0 !important;
}

.order-items__code {
    color: #315f9e;
    font-weight: 700;
}

.order-items__empty {
    padding: 20px !important;
    color: #7e8a9b !important;
    text-align: center !important;
}

/* Seleção múltipla */
.multi-select {
    position: relative;
    width: 100%;
    font-family: "Segoe UI", Arial, sans-serif;
}

.multi-select__trigger {
    display: flex;
    width: 100%;
    height: 34px;
    padding: 0 9px 0 10px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #344258;
    font: inherit;
    text-align: left;
    background: #fff;
    border: 1px solid #d6dde7;
    border-radius: 7px;
    outline: none;
}

.multi-select__trigger:hover:not(:disabled),
.multi-select__trigger:focus-visible,
.multi-select__trigger.is-open {
    border-color: #6d91c9;
    box-shadow: 0 0 0 3px rgba(68, 110, 176, 0.1);
}

.multi-select__trigger > span {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
}

.multi-select__trigger strong {
    overflow: hidden;
    color: #344258;
    font-size: 13px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select__trigger small {
    color: #8490a1;
    font-size: 10px;
    white-space: nowrap;
}

.multi-select__trigger svg {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    fill: none;
    stroke: #758299;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
    transition: transform 120ms ease;
}

.multi-select__trigger.is-open svg {
    transform: rotate(180deg);
}

.multi-select__popover {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 40;
    width: min(340px, calc(100vw - 32px));
    padding: 8px;
    color: #344258;
    background: #fff;
    border: 1px solid #d5dde8;
    border-radius: 9px;
    box-shadow: 0 14px 34px rgba(28, 43, 65, 0.16);
}

.multi-select__search {
    display: flex;
    height: 34px;
    padding: 0 9px;
    align-items: center;
    gap: 7px;
    border: 1px solid #dce2ea;
    border-radius: 7px;
}

.multi-select__search svg {
    width: 15px;
    height: 15px;
    flex: 0 0 auto;
    fill: none;
    stroke: #7c899b;
    stroke-width: 1.7;
}

.multi-select__search input {
    width: 100%;
    min-width: 0;
    padding: 0;
    color: #344258;
    font: inherit;
    font-size: 12px;
    background: transparent;
    border: 0;
    outline: 0;
}

.multi-select__actions,
.multi-select__footer {
    display: flex;
    padding: 7px 2px;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.multi-select__actions button,
.multi-select__footer button {
    padding: 2px;
    color: #315f9e;
    font: inherit;
    font-size: 11px;
    font-weight: 650;
    background: transparent;
    border: 0;
}

.multi-select__actions button:disabled {
    color: #a6afbb;
}

.multi-select__options {
    max-height: 260px;
    padding: 2px;
    overflow-y: auto;
    border-top: 1px solid #edf0f4;
    border-bottom: 1px solid #edf0f4;
}

.multi-select__option {
    display: flex;
    min-height: 42px;
    margin: 0;
    padding: 6px 7px;
    align-items: center;
    gap: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.multi-select__option:hover {
    background: #f4f7fb;
}

.multi-select__option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.multi-select__check {
    display: grid;
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    color: transparent;
    background: #fff;
    border: 1px solid #cbd4df;
    border-radius: 4px;
    place-items: center;
}

.multi-select__option input:checked + .multi-select__check {
    color: #fff;
    background: #315f9e;
    border-color: #315f9e;
}

.multi-select__check svg {
    width: 12px;
    height: 12px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.multi-select__option-text {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.multi-select__option-text strong {
    overflow: hidden;
    color: #3f4e63;
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.multi-select__option-text small,
.multi-select__footer span,
.multi-select__empty {
    color: #7c899b;
    font-size: 10px;
}

.multi-select__empty {
    display: block;
    padding: 22px 10px;
    text-align: center;
}

.multi-select.is-disabled {
    opacity: 0.65;
}

/* Área administrativa V2 */
.admin-page {
    gap: 10px;
}

.admin-header__filters {
    min-width: 0;
}

.admin-collection-field,
.admin-client-field {
    display: flex;
    width: 230px;
    margin: 0;
    flex-direction: column;
    gap: 4px;
}

.admin-collection-field > span,
.admin-client-field > span {
    color: #68758a;
    font-size: 11px;
    font-weight: 650;
}

.admin-tabs {
    display: flex;
    min-height: 42px;
    padding: 4px;
    align-items: center;
    gap: 2px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 9px;
}

.admin-tabs__button {
    height: 32px;
    padding: 0 13px;
    flex: 0 0 auto;
    color: #647287;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    background: transparent;
    border: 0;
    border-radius: 6px;
}

.admin-tabs__button:hover {
    color: #33445b;
    background: #f4f6f9;
}

.admin-tabs__button.is-active {
    color: #284f86;
    background: #eaf0f8;
}

.admin-filter-bar,
.admin-section-filters {
    display: flex;
    padding: 9px 12px;
    align-items: flex-end;
    gap: 9px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 9px;
}

.admin-filter-bar--compact {
    justify-content: flex-end;
}

.admin-filter-bar .orders-select-field select,
.admin-section-filters .orders-select-field select {
    width: 176px;
}

.admin-section-filters .admin-field--wide select {
    width: 280px;
}

.admin-section-filters--analytical .admin-client-field {
    width: min(480px, 45vw);
}

.admin-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.admin-summary-card {
    min-width: 0;
    padding: 14px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(31, 41, 55, 0.03);
}

.admin-summary-card header {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.admin-summary-card header span {
    color: #53627a;
    font-size: 12px;
    font-weight: 650;
}

.admin-summary-card header small {
    max-width: 100%;
    overflow: hidden;
    color: #8490a1;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-summary-card__header {
    align-items: flex-start !important;
    flex-direction: row !important;
    justify-content: space-between;
}

.admin-summary-card__header > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}

.admin-summary-card__date-select {
    width: 116px;
    height: 30px;
    flex: 0 0 auto;
    border: 1px solid var(--color-border);
    border-radius: 7px;
    background: var(--color-surface);
    color: var(--color-text-muted);
    font-size: 11px;
    font-weight: 600;
    padding: 0 24px 0 8px;
}

.admin-summary-card__date-select:focus {
    border-color: var(--color-primary);
    outline: 2px solid color-mix(in srgb, var(--color-primary) 16%, transparent);
    outline-offset: 1px;
}

.admin-summary-card > strong {
    display: block;
    margin-top: 8px;
    overflow: hidden;
    color: #253044;
    font-size: clamp(19px, 1.45vw, 23px);
    font-weight: 700;
    letter-spacing: -0.03em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-summary-card dl {
    display: grid;
    margin: 10px 0 0;
    padding: 8px 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    background: #f7f9fc;
    border: 1px solid #edf1f5;
    border-radius: 8px;
}

.admin-summary-card dl div {
    min-width: 0;
    padding: 0 9px;
    border-left: 1px solid #e5eaf0;
}

.admin-summary-card dl div:first-child {
    padding-left: 0;
    border-left: 0;
}

.admin-summary-card dt {
    overflow: hidden;
    color: #78869a;
    font-size: 10px;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-summary-card dd {
    margin: 2px 0 0;
    overflow: hidden;
    color: #34445d;
    font-size: 12px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-detail {
    padding: 13px 16px 15px;
}

.admin-detail > strong {
    display: block;
    margin-bottom: 9px;
    color: #536278;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.025em;
    text-transform: uppercase;
}

.admin-size-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.admin-size-grid > span {
    display: flex;
    min-width: 68px;
    height: 42px;
    padding: 5px 9px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #fff;
    border: 1px solid #dce3eb;
    border-radius: 7px;
}

.admin-size-grid small {
    color: #7b8797;
    font-size: 10px;
}

.admin-size-grid strong {
    color: #34445a;
    font-size: 13px;
}

.admin-abc--a {
    color: #176b55;
    background: #e8f5f0;
}

.admin-abc--b {
    color: #7a5b19;
    background: #fff6dc;
}

.admin-abc--c {
    color: #8c4b50;
    background: #fbecef;
}

@media (max-width: 1100px) {
    .orders-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .orders-header__filters {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .data-list__toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .data-list__tools {
        width: 100%;
        justify-content: flex-start;
    }

    .data-list__search {
        width: min(100%, 420px);
        flex: 1;
    }

    .admin-overview {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    .admin-header__filters,
    .admin-filter-bar,
    .admin-section-filters {
        flex-wrap: wrap;
    }
}

@media (max-width: 720px) {
    .orders-page {
        width: calc(100% + 1.5rem);
        margin-right: -0.75rem;
        margin-left: -0.75rem;
        padding: 12px 12px 20px;
    }

    .orders-header__filters,
    .data-list__tools,
    .data-list__filters {
        align-items: stretch;
        flex-direction: column;
    }

    .orders-date-field,
    .orders-select-field,
    .orders-date-field .date-field,
    .orders-select-field select,
    .orders-refresh-button,
    .data-list__search,
    .data-list__tool-button,
    .data-list__columns-control {
        width: 100%;
    }

    .data-list__columns-menu {
        right: auto;
        left: 0;
        width: min(100%, 280px);
    }

    .order-items {
        padding: 10px;
    }

    .order-items__table {
        min-width: 620px;
    }

    .order-items__table-wrap {
        overflow-x: auto;
    }

    .admin-collection-field,
    .admin-client-field,
    .admin-section-filters--analytical .admin-client-field,
    .admin-filter-bar .orders-select-field,
    .admin-section-filters .orders-select-field,
    .admin-filter-bar .orders-select-field select,
    .admin-section-filters .orders-select-field select,
    .admin-section-filters .admin-field--wide select {
        width: 100%;
    }

    .admin-filter-bar--compact {
        justify-content: stretch;
    }

    .admin-overview {
        grid-template-columns: 1fr;
    }

    .admin-summary-card > strong {
        font-size: 22px;
    }

    .multi-select__popover {
        right: auto;
        left: 0;
    }
}
