:root {
    --color-primary: #5eaef8;
    --color-primary-dark: #147cd1;
    --color-primary-soft: #e7f4fe;

    --color-background: #f6f8fa;
    --color-surface: #ffffff;
    --color-surface-soft: #f8fafc;

    --color-text: #1c2430;
    --color-muted: #6f7885;
    --color-border: #dfe5eb;

    --color-success: #247442;
    --color-success-soft: #eaf8ef;

    --color-warning: #956319;
    --color-warning-soft: #fff4df;

    --color-danger: #b52c2c;
    --color-danger-soft: #fff0f0;

    --color-shadow: rgba(28, 36, 48, 0.08);

    --sidebar-width: 270px;
    --content-max-width: 1180px;

    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--color-background);
    color: var(--color-text);
    font-family: "Inter", Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    color: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    display: block;
    max-width: 100%;
}

[hidden] {
    display: none !important;
}

/* =========================================================
   Layout
========================================================= */

.app-layout {
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: 100vh;
}

.main-content {
    min-width: 0;
    width: 100%;
    padding: 52px 40px;
}

.page-header,
.card,
.alert,
.stock-summary,
.stock-grid,
.consumption-form {
    width: 100%;
    max-width: var(--content-max-width);
    margin-right: auto;
    margin-left: auto;
}

/* =========================================================
   Sidebar
========================================================= */

.sidebar {
    position: sticky;
    top: 0;

    display: flex;
    flex-direction: column;

    width: var(--sidebar-width);
    height: 100vh;
    padding: 28px 20px;

    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
}

.sidebar__header {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar__brand {
    display: flex;
    justify-content: center;
    width: 100%;
    padding: 8px 10px 34px;
}

.sidebar__logo {
    width: 100%;
    max-width: 120px;
    height: auto;
    object-fit: contain;
}

.sidebar__toggle {
    display: none;

    width: 44px;
    height: 44px;
    padding: 10px;

    background: var(--color-primary-soft);
    border: 0;
    border-radius: var(--radius-medium);
    cursor: pointer;
}

.sidebar__toggle-line {
    display: block;
    width: 100%;
    height: 2px;
    margin: 4px 0;

    background: var(--color-primary-dark);
    border-radius: 999px;

    transition:
        transform 180ms ease,
        opacity 180ms ease;
}

.sidebar__navigation {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar__link {
    display: flex;
    align-items: center;
    gap: 12px;

    width: 100%;
    min-height: 48px;
    padding: 0 16px;

    border-radius: var(--radius-medium);

    color: var(--color-muted);
    font-size: 14px;
    font-weight: 600;

    transition:
        background-color 150ms ease,
        color 150ms ease,
        transform 150ms ease;
}

.sidebar__link:hover {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    transform: translateX(2px);
}

.sidebar__link--active {
    background: var(--color-primary);
    color: #ffffff;
}

.sidebar__link--active:hover {
    background: var(--color-primary-dark);
    color: #ffffff;
}

.sidebar__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 24px;
    width: 24px;

    font-size: 19px;
    line-height: 1;
}

/* =========================================================
   Encabezados
========================================================= */

.page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;

    margin-bottom: 28px;
}

.page-header__eyebrow {
    margin: 0 0 8px;

    color: var(--color-primary-dark);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.page-header__title {
    margin: 0;

    font-size: clamp(28px, 4vw, 38px);
    line-height: 1.15;
}

.page-header__description {
    max-width: 620px;
    margin: 10px 0 0;

    color: var(--color-muted);

    font-size: 15px;
    line-height: 1.6;
}

/* =========================================================
   Tarjetas
========================================================= */

.card {
    min-width: 0;
    padding: 30px;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-large);

    box-shadow: 0 14px 38px var(--color-shadow);
}

/* =========================================================
   Formularios
========================================================= */

.order-form,
.form-grid,
.form-group {
    min-width: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
}

.form-grid--three {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.form-group--full {
    grid-column: 1 / -1;
}

.form-label {
    color: var(--color-text);
    font-size: 14px;
    font-weight: 600;
}

.form-label__optional {
    margin-left: 4px;

    color: var(--color-muted);

    font-size: 12px;
    font-weight: 400;
}

.form-control {
    display: block;

    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 11px 14px;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    outline: none;

    color: var(--color-text);

    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.form-control::placeholder {
    color: #9da6b1;
}

.form-control:hover {
    border-color: #bdc9d5;
}

.form-control:focus {
    border-color: var(--color-primary-dark);
    box-shadow: 0 0 0 4px rgba(94, 174, 248, 0.2);
}

.form-control--textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.5;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 16px;

    margin-top: 28px;
    padding-top: 24px;

    border-top: 1px solid var(--color-border);
}

.form-actions--between {
    align-items: center;
    justify-content: space-between;
}

.form-actions--end {
    justify-content: flex-end;
}

/* =========================================================
   Botones
========================================================= */

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 46px;
    padding: 0 20px;

    border: 0;
    border-radius: 10px;
    cursor: pointer;

    font-size: 14px;
    font-weight: 700;

    transition:
        background-color 150ms ease,
        color 150ms ease,
        transform 150ms ease,
        box-shadow 150ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible {
    outline: 3px solid rgba(20, 124, 209, 0.22);
    outline-offset: 2px;
}

.button--primary {
    background: var(--color-primary);
    color: #ffffff;

    box-shadow: 0 8px 20px rgba(20, 124, 209, 0.2);
}

.button--primary:hover {
    background: var(--color-primary-dark);
}

.button--secondary {
    background: var(--color-primary-soft);
    color: var(--color-primary-dark);
    box-shadow: none;
}

.button--secondary:hover {
    background: #d5edfd;
}

.button--success {
    background: var(--color-success-soft);
    color: var(--color-success);
    box-shadow: none;
}

.button--success:hover {
    background: #d5f0df;
}

.button--danger {
    background: var(--color-danger-soft);
    color: var(--color-danger);
    box-shadow: none;
}

.button--danger:hover {
    background: #ffdede;
}

.button--delivered,
.button--delivered:hover {
    background: var(--color-success-soft);
    color: var(--color-success);
    cursor: default;
    box-shadow: none;
    opacity: 1;
    transform: none;
}

.button--small {
    min-height: 36px;
    padding: 0 13px;

    border-radius: var(--radius-small);

    font-size: 12px;
}

/* =========================================================
   Alertas
========================================================= */

.alert {
    margin-bottom: 22px;
    padding: 16px 18px;

    border: 1px solid transparent;
    border-radius: var(--radius-medium);

    font-size: 14px;
    line-height: 1.5;
}

.alert--success {
    background: var(--color-success-soft);
    border-color: #b8e3c5;
    color: var(--color-success);
}

.alert--error {
    background: var(--color-danger-soft);
    border-color: #f0c2c2;
    color: #9b2929;
}

.alert__list {
    margin: 8px 0 0;
    padding-left: 20px;
}

/* =========================================================
   Estados vacíos
========================================================= */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;

    padding: 48px 20px;

    text-align: center;
}

.empty-state--small,
.empty-state--compact {
    padding: 34px 20px;
}

.empty-state__icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 64px;
    height: 64px;
    margin-bottom: 20px;

    background: var(--color-primary-soft);
    border-radius: 18px;

    color: var(--color-primary-dark);
    font-size: 30px;
}

.empty-state__title {
    margin: 0;
    font-size: 20px;
}

.empty-state__description {
    max-width: 460px;
    margin: 10px 0 24px;

    color: var(--color-muted);

    font-size: 14px;
    line-height: 1.6;
}

/* =========================================================
   Toolbar de tablas
========================================================= */

.table-toolbar {
    display: grid;
    grid-template-columns:
        minmax(240px, 1fr) minmax(180px, 260px) auto;
    align-items: center;
    gap: 12px;

    margin-bottom: 20px;
}

.table-search,
.table-toolbar__search {
    width: 100%;
}

.table-count {
    margin: 0;

    color: var(--color-muted);

    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.table-toolbar__count {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 5px;

    color: var(--color-muted);

    font-size: 13px;
    white-space: nowrap;
}

.table-toolbar__count strong {
    color: var(--color-text);
    font-size: 16px;
}

/* =========================================================
   Tablas
========================================================= */

.table-wrapper,
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table,
.orders-table,
.consumption-table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td,
.orders-table th,
.orders-table td,
.consumption-table th,
.consumption-table td {
    padding: 15px 13px;

    border-bottom: 1px solid var(--color-border);

    text-align: left;
    vertical-align: middle;
}

.table th,
.orders-table th,
.consumption-table th {
    background: var(--color-surface-soft);

    color: var(--color-muted);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.table td,
.orders-table td,
.consumption-table td {
    font-size: 14px;
    line-height: 1.5;
}

.table tbody tr,
.orders-table tbody tr,
.consumption-table tbody tr {
    transition: background-color 150ms ease;
}

.table tbody tr:hover,
.orders-table tbody tr:hover,
.consumption-table tbody tr:hover {
    background: #f7fbfe;
}

.table tbody tr:last-child td,
.orders-table tbody tr:last-child td,
.consumption-table tbody tr:last-child td {
    border-bottom: 0;
}

.orders-table__actions-heading {
    text-align: right !important;
}

.orders-table__actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;

    white-space: nowrap;
}

.orders-table__row--delivered {
    background: #fbfdfb;
}

.orders-table__row--delivered:hover {
    background: #f4faf6;
}

.sort-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 0;

    background: transparent;
    border: 0;
    cursor: pointer;

    color: inherit;
    font: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
}

.sort-button:hover,
.sort-button--active {
    color: var(--color-primary-dark);
}

.sort-button__icon {
    font-size: 14px;
    line-height: 1;
}

/* =========================================================
   Badges y etiquetas
========================================================= */

.size-badge,
.status-badge,
.movement-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 999px;

    font-weight: 700;
}

.size-badge {
    min-width: 36px;
    min-height: 30px;
    padding: 4px 9px;

    background: var(--color-primary-soft);
    color: var(--color-primary-dark);

    font-size: 12px;
}

.status-badge {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 12px;
}

.status-badge--pending {
    background: var(--color-warning-soft);
    color: var(--color-warning);
}

.status-badge--delivered {
    background: var(--color-success-soft);
    color: var(--color-success);
}

.movement-badge {
    min-width: 78px;
    padding: 6px 10px;
    font-size: 11px;
}

.movement-badge--entrada {
    background: rgba(36, 116, 66, 0.12);
    color: var(--color-success);
}

.movement-badge--salida {
    background: rgba(181, 44, 44, 0.12);
    color: var(--color-danger);
}

.movement-badge--ajuste {
    background: rgba(185, 124, 20, 0.14);
    color: #8d5d0d;
}

.material-label {
    font-weight: 700;
}

.table-link {
    color: var(--color-primary-dark);
    font-weight: 700;
}

.table-link:hover {
    text-decoration: underline;
}

.table-secondary-text {
    display: block;
    margin-top: 3px;

    color: var(--color-muted);

    font-size: 11px;
}

.text-muted {
    color: var(--color-muted);
}

.delete-form,
.ready-form,
.delivery-form {
    margin: 0;
}

/* =========================================================
   Resumen de stock
========================================================= */

.stock-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;

    margin-bottom: 24px;
}

.stock-summary__item {
    display: flex;
    flex-direction: column;
    gap: 8px;

    padding: 20px;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;

    box-shadow: 0 10px 28px var(--color-shadow);
}

.stock-summary__label {
    color: var(--color-muted);
    font-size: 13px;
    font-weight: 600;
}

.stock-summary__value {
    font-size: 24px;
    line-height: 1.2;
}

/* =========================================================
   Tarjetas de stock
========================================================= */

.stock-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.stock-card {
    position: relative;
    overflow: hidden;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;

    box-shadow: 0 14px 38px var(--color-shadow);
}

.stock-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;

    height: 6px;

    background: var(--stock-color);

    content: "";
}

.stock-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 26px 24px 20px;

    border-bottom: 1px solid var(--color-border);
}

.stock-card__color {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
}

.stock-card__color-sample {
    flex: 0 0 42px;

    width: 42px;
    height: 42px;

    background: var(--stock-color);
    border: 3px solid #ffffff;
    border-radius: 50%;

    box-shadow:
        0 0 0 1px var(--color-border),
        0 5px 14px rgba(0, 0, 0, 0.12);
}

.stock-card__eyebrow {
    margin: 0 0 3px;

    color: var(--color-muted);

    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.stock-card__title {
    overflow: hidden;

    margin: 0;

    font-size: 20px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.stock-card__hex {
    flex-shrink: 0;

    padding: 6px 9px;

    background: var(--color-background);
    border-radius: 999px;

    color: var(--color-muted);

    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

.stock-card__materials {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stock-material {
    min-width: 0;
    padding: 22px 24px 24px;
}

.stock-material+.stock-material {
    border-left: 1px solid var(--color-border);
}

.stock-material__header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stock-material__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    flex: 0 0 44px;

    width: 44px;
    height: 44px;

    background: color-mix(in srgb,
            var(--stock-color) 12%,
            white);

    border-radius: var(--radius-medium);

    color: var(--stock-color);
}

.stock-material__icon svg {
    width: 28px;
    height: 28px;
}

.stock-material__type {
    margin: 0;

    color: var(--color-text);

    font-size: 14px;
    font-weight: 700;
}

.stock-material__description {
    margin: 3px 0 0;

    color: var(--color-muted);

    font-size: 12px;
}

.stock-material__quantity {
    display: flex;
    align-items: baseline;
    gap: 6px;

    margin-top: 22px;
}

.stock-material__quantity strong {
    font-size: clamp(25px, 3vw, 34px);
    line-height: 1;
}

.stock-material__quantity span {
    color: var(--color-muted);
    font-size: 12px;
    font-weight: 600;
}

.stock-material__updated {
    min-height: 34px;
    margin: 12px 0 18px;

    color: var(--color-muted);

    font-size: 11px;
    line-height: 1.5;
}

.stock-material__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.stock-material__actions .button {
    width: 100%;
}

/* =========================================================
   Consumos
========================================================= */

.consumption-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.consumption-list {
    display: grid;
    gap: 24px;
}

.consumption-card {
    overflow: hidden;
    padding: 0;
}

.consumption-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;

    padding: 20px 24px;

    background: var(--color-primary-soft);
    border-bottom: 1px solid var(--color-border);
}

.consumption-card__eyebrow {
    margin: 0 0 4px;

    color: var(--color-primary-dark);

    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.consumption-card__title {
    margin: 0;

    color: var(--color-text);

    font-size: 19px;
    font-weight: 700;
}

.consumption-input {
    position: relative;

    width: 100%;
    max-width: 190px;
}

.consumption-input .form-control {
    padding-right: 40px;
    text-align: right;
}

.consumption-input__unit {
    position: absolute;
    top: 50%;
    right: 14px;

    color: var(--color-muted);

    font-size: 14px;
    pointer-events: none;

    transform: translateY(-50%);
}

/* =========================================================
   SweetAlert
========================================================= */

.swal2-popup {
    border-radius: 18px;
    font-family: "Inter", Arial, sans-serif;
}

.swal2-title {
    color: var(--color-text);
}

.swal2-confirm,
.swal2-cancel {
    border-radius: 9px !important;
    font-weight: 700 !important;
}

.sweetalert-error-list {
    margin: 0;
    padding-left: 22px;
    text-align: left;
}

.sweetalert-error-list li+li {
    margin-top: 6px;
}

.stock-alert {
    text-align: left;
}

.stock-alert__description {
    margin: 0 0 6px;

    color: var(--color-text);

    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.stock-alert__current {
    margin: 0 0 22px;

    color: var(--color-muted);

    font-size: 13px;
    text-align: center;
}

.stock-alert__label {
    display: block;

    margin: 14px 0 7px;

    color: var(--color-text);

    font-size: 13px;
    font-weight: 700;
}

.stock-alert__label span {
    color: var(--color-muted);
    font-size: 11px;
    font-weight: 400;
}

.stock-alert__input,
.stock-alert__textarea {
    width: 100% !important;
    margin: 0 !important;

    border: 1px solid var(--color-border) !important;
    border-radius: 10px !important;
    box-shadow: none !important;

    font-size: 14px !important;
}

.stock-alert__input:focus,
.stock-alert__textarea:focus {
    border-color: var(--color-primary-dark) !important;
    box-shadow:
        0 0 0 4px rgba(94, 174, 248, 0.2) !important;
}

.stock-alert__textarea {
    min-height: 90px;
    resize: vertical;
}

/* =========================================================
   Utilidades
========================================================= */

.sr-only {
    position: absolute;

    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;

    overflow: hidden;
    clip: rect(0, 0, 0, 0);

    border: 0;

    white-space: nowrap;
}

/* =========================================================
   Responsive
========================================================= */

@media (max-width: 1050px) {
    .stock-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .main-content {
        padding: 34px 20px;
    }

    .page-header {
        flex-direction: column;
        gap: 16px;
    }

    .page-header>.button {
        width: 100%;
    }

    .form-grid,
    .form-grid--three {
        grid-template-columns: 1fr;
    }

    .form-group--full {
        grid-column: auto;
    }

    .card {
        padding: 20px;
    }

    .table-toolbar {
        grid-template-columns: 1fr;
    }

    .table-toolbar__count {
        justify-content: flex-start;
    }

    .table-wrapper,
    .table-responsive {
        border: 1px solid var(--color-border);
        border-radius: var(--radius-medium);
    }

    .orders-table {
        min-width: 760px;
    }

    .table {
        min-width: 900px;
    }

    .orders-table th,
    .orders-table td,
    .table th,
    .table td {
        padding: 11px 9px;
        white-space: nowrap;
    }

    .orders-table th,
    .table th {
        font-size: 10px;
    }

    .orders-table td,
    .table td {
        font-size: 12px;
    }

    .button--small {
        min-height: 32px;
        padding: 0 10px;
        font-size: 11px;
    }
}

@media (max-width: 820px) {
    .app-layout {
        display: block;
    }

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 100;

        width: 100%;
        height: auto;
        padding: 12px 16px;

        border-right: 0;
        border-bottom: 1px solid var(--color-border);

        box-shadow: 0 5px 18px rgba(28, 36, 48, 0.08);
    }

    .sidebar__header {
        justify-content: space-between;
    }

    .sidebar__brand {
        justify-content: flex-start;
        width: auto;
        padding: 0;
    }

    .sidebar__logo {
        max-width: 86px;
    }

    .sidebar__toggle {
        display: block;
    }

    .sidebar__navigation {
        display: flex;
        flex-direction: column;
        gap: 6px;

        max-height: 0;
        margin-top: 0;

        overflow: hidden;
        opacity: 0;
        visibility: hidden;

        transition:
            max-height 250ms ease,
            margin-top 250ms ease,
            opacity 180ms ease,
            visibility 180ms ease;
    }

    .sidebar--open .sidebar__navigation {
        max-height: 420px;
        margin-top: 12px;

        opacity: 1;
        visibility: visible;
    }

    .sidebar--open .sidebar__toggle-line:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .sidebar--open .sidebar__toggle-line:nth-child(2) {
        opacity: 0;
    }

    .sidebar--open .sidebar__toggle-line:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .sidebar__link {
        min-height: 44px;
        padding: 0 14px;
    }

    .main-content {
        padding-top: 28px;
    }
}

@media (max-width: 760px) {
    .stock-summary {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .stock-summary__item {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;

        padding: 15px 17px;
    }

    .stock-summary__value {
        font-size: 20px;
    }

    .stock-card__materials {
        grid-template-columns: 1fr;
    }

    .stock-material+.stock-material {
        border-top: 1px solid var(--color-border);
        border-left: 0;
    }

    .consumption-table thead {
        display: none;
    }

    .consumption-table tbody tr:last-child {
        border-bottom: 0;
    }

    .consumption-table td::before {
        content: attr(data-label);

        color: var(--color-muted);

        font-size: 12px;
        font-weight: 700;
    }
}

@media (max-width: 620px) {
    .main-content {
        padding: 24px 12px;
    }

    .page-header {
        margin-bottom: 18px;
    }

    .page-header__eyebrow {
        margin-bottom: 4px;
        font-size: 10px;
    }

    .page-header__title {
        font-size: 26px;
    }

    .page-header__description {
        margin-top: 6px;
        font-size: 13px;
    }

    .card {
        padding: 16px;
        border-radius: 14px;
    }

    .form-actions,
    .form-actions--between,
    .form-actions--end {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .button {
        width: 100%;
    }

    .stock-card__header {
        align-items: flex-start;
        padding: 22px 17px 17px;
    }

    .stock-card__hex {
        display: none;
    }

    .stock-material {
        padding: 18px 17px 20px;
    }

    .stock-material__actions {
        grid-template-columns: 1fr;
    }

    .consumption-card__header {
        padding: 16px;
    }
}

@media (max-width: 760px) {
    .consumption-card .table-responsive {
        overflow: visible;
        border: 0;
        border-radius: 0;
    }

    .consumption-table {
        display: block;
        width: 100%;
        min-width: 0;
    }

    .consumption-table tbody {
        display: block;
        width: 100%;
    }

    .consumption-table tr {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;

        width: 100%;
        padding: 14px;

        background: var(--color-surface);
        border-bottom: 1px solid var(--color-border);
    }

    .consumption-table tr:nth-child(even) {
        background: var(--color-surface-soft);
    }

    .consumption-table td {
        display: grid;
        grid-template-columns: minmax(90px, 1fr) minmax(110px, 150px);
        align-items: center;
        gap: 12px;

        width: 100%;
        padding: 0;
        border: 0;
    }

    .consumption-table td::before {
        content: attr(data-label);

        color: var(--color-muted);

        font-size: 12px;
        font-weight: 700;
    }

    .consumption-table td[data-label="Talle"] {
        padding-bottom: 4px;
    }

    .consumption-input {
        width: 100%;
        max-width: none;
    }

    .consumption-input .form-control {
        min-height: 42px;
        padding: 8px 36px 8px 10px;

        font-size: 14px;
        text-align: right;
    }

    .consumption-input__unit {
        right: 12px;
        font-size: 12px;
    }

    .size-badge {
        justify-self: end;
    }
}