* {
    box-sizing: border-box;
}

:root {
    --irrewarra-black: #231f20;
    --irrewarra-text: #212529;
    --irrewarra-green: #82bd8f;
    --irrewarra-link: #638d3d;
    --irrewarra-nav-link: #38c172;
    --irrewarra-soft-green: #f0f5f1;
    --irrewarra-border: #cce7d3;
    --irrewarra-muted: #a6b0b9;
}

body {
    margin: 0;
    color: var(--irrewarra-text);
    background: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
    font-size: 1.125rem;
    line-height: 1.6;
}

a {
    color: var(--irrewarra-link);
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 15px;
}

.store-header {
    margin-bottom: 3rem;
    background: var(--irrewarra-soft-green);
}

.store-nav {
    min-height: 122px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.store-logo {
    height: 92px;
    display: block;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--irrewarra-nav-link);
    font-size: 1rem;
}

.link-button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--irrewarra-nav-link);
    font: inherit;
    cursor: pointer;
}

.nav-actions a {
    color: var(--irrewarra-nav-link);
}

.login-panel {
    position: fixed;
    inset: 0;
    border: 40px solid #ffffff;
    background: var(--irrewarra-soft-green);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 20px;
    text-align: center;
}

.login-box {
    width: min(423px, 100%);
    text-align: center;
}

.login-box img {
    height: 240px;
    margin-bottom: 48px;
}

.forgot-password-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--irrewarra-link);
    font-size: 0.95rem;
}

.page-heading {
    text-align: center;
    margin: 0 0 26px;
}

.store-name {
    margin: 0 0 8px;
    font-size: 1.35rem;
    font-weight: 400;
}

.page-title {
    margin: 0;
    font-size: 2.5rem;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: 0;
}

.date-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin: 18px 0 34px;
    font-size: 1.125rem;
}

.date-nav a,
.date-nav span.muted {
    width: 32px;
    height: 32px;
    margin-top: 18px;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0;
    color: var(--irrewarra-black);
    font-size: 1.6rem;
    line-height: 1;
}

.date-nav a:hover {
    color: var(--irrewarra-link);
}

.date-display {
    width: min(340px, 70vw);
    text-align: center;
}

.date-label {
    margin-bottom: 4px;
    color: var(--irrewarra-green);
    font-size: 12px;
    line-height: 1;
    font-weight: 600;
    text-transform: uppercase;
}

.date-nav .current-date {
    font-weight: 600;
}

.muted {
    color: var(--irrewarra-muted) !important;
}

.notice {
    padding: 14px 16px;
    margin: 18px 0;
    border: 1px solid var(--irrewarra-border);
    background: var(--irrewarra-soft-green);
    color: var(--irrewarra-black);
}

.notice.warning {
    border-color: #efc36d;
    background: #fff8e7;
}

.notice.success {
    border-color: var(--irrewarra-green);
}

.alert-list {
    margin: 0 0 20px;
    padding: 14px 18px;
    border: 1px solid #e5a2a2;
    background: #fff5f5;
}

.auth-card-wrap {
    margin-bottom: 70px;
}

.auth-card {
    max-width: 760px;
    margin: 0 auto;
    border: 1px solid rgba(0, 0, 0, 0.125);
    background: #ffffff;
}

.auth-card-header {
    padding: 12px 20px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    background: rgba(0, 0, 0, 0.03);
    color: var(--irrewarra-black);
    font-size: 1rem;
}

.auth-card-body {
    padding: 28px 32px 32px;
}

.auth-card .field-label {
    max-width: 440px;
    margin: 32px auto 18px;
}

.auth-field-gap {
    margin-top: 42px !important;
}

.auth-submit {
    max-width: 440px;
    margin: 30px auto 0;
}

.field-label {
    height: 35px;
    min-height: 35px;
    position: relative;
    display: block;
    color: #8798ab;
    margin-bottom: 0.5rem;
}

.field,
.select-field,
.textarea-field {
    width: 100%;
    min-height: 36px;
    padding: 1px 2px 3px;
    border: 0;
    outline: none;
    background: transparent;
    color: #000000;
    font: inherit;
    font-weight: 300;
    line-height: 32px;
    cursor: text;
}

.textarea-field {
    min-height: 84px;
    resize: vertical;
}

.field-label > span {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    color: var(--irrewarra-black);
    border-bottom: 1px solid var(--irrewarra-border);
    font-weight: 300;
    line-height: 32px;
    transform-origin: 0 50%;
    transition: transform 200ms ease-in-out, color 200ms ease-in-out, border-bottom-color 200ms ease-in-out;
    pointer-events: none;
}

.field-label > span > span {
    position: absolute;
    top: 0;
    left: 0;
    transform-origin: 0 50%;
    transition: transform 200ms ease-in-out, color 200ms ease-in-out;
}

.field:focus + span,
.textarea-field:focus + span,
.field.is-focused + span {
    border-bottom-color: var(--irrewarra-green);
}

.field:focus + span > span,
.field.is-focused + span > span,
.field:not(:placeholder-shown) + span > span,
.textarea-field:focus + span > span,
.textarea-field:not(:placeholder-shown) + span > span {
    transform: scale(0.68) translateY(-36px);
    color: var(--irrewarra-green);
    font-weight: 600;
}

.field.is-empty:not(.is-focused) {
    opacity: 0;
}

.select-label span {
    transform: scale(0.68) translateY(-36px);
    color: var(--irrewarra-green);
    font-weight: 600;
}

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

.name-row {
    width: min(540px, 100%);
    margin: 44px auto 34px;
}

.product-group {
    margin: 0 0 18px;
    font-size: 1.75rem;
    font-weight: 800;
}

.product-table-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
}

.product-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0 20px;
}

.code-column {
    width: 96px;
}

.quantity-column {
    width: 132px;
}

.product-table th,
.product-table td {
    padding: 14px 18px;
    vertical-align: middle;
}

.product-table th {
    color: #65737c;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.product-table td {
    border-top: 1px solid var(--irrewarra-green);
    border-bottom: 1px solid var(--irrewarra-green);
    background: #ffffff;
    font-size: 1rem;
}

.product-table td:first-child {
    border-left: 1px solid var(--irrewarra-green);
    border-radius: 8px 0 0 8px;
}

.product-table td:last-child {
    border-right: 1px solid var(--irrewarra-green);
    border-radius: 0 8px 8px 0;
}

.product-table tbody tr:hover td {
    background: var(--irrewarra-soft-green);
}

.product-name-cell {
    color: var(--irrewarra-black);
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.product-table th:nth-child(2),
.product-code-cell {
    color: var(--irrewarra-green);
    font-weight: 600;
    text-transform: uppercase;
    text-align: center;
}

.quantity-heading,
.product-quantity-cell {
    text-align: center;
}

.quantity-field {
    width: 78px;
    min-height: 36px;
    padding: 1px 2px 3px;
    border: 0;
    border-bottom: 1px solid var(--irrewarra-border);
    border-radius: 0;
    background: transparent;
    color: var(--irrewarra-black);
    font: inherit;
    font-weight: 300;
    line-height: 32px;
    font-variant-numeric: tabular-nums;
    text-align: center;
}

.quantity-field:focus {
    border-bottom-color: var(--irrewarra-green);
    outline: 0;
}

.quantity-field:disabled {
    background: transparent;
    color: #78838c;
}

.button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin: 32px 0 70px;
}

.btn {
    display: inline-flex;
    width: 100%;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    padding: 1px 6px;
    border: 0;
    border-radius: 2px;
    background: var(--irrewarra-black);
    color: #ffffff;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    line-height: 36px;
    text-transform: uppercase;
    cursor: pointer;
}

.btn.secondary {
    background: var(--irrewarra-soft-green);
    color: var(--irrewarra-black);
    border: 1px solid var(--irrewarra-border);
}

.btn.compact {
    min-height: 34px;
    padding: 0 12px;
    font-size: 12px;
}

.btn:disabled {
    background: #c0c0c0;
    cursor: not-allowed;
}

.modal {
    width: min(760px, calc(100% - 32px));
    border: 0;
    padding: 0;
}

.modal::backdrop {
    background: rgb(35 31 32 / 48%);
}

.modal-body {
    padding: 28px;
    background: #ffffff;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.modal-header h2 {
    margin: 0;
}

.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 20px 0 24px;
}

.checkbox-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 34px;
}

.admin-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 232px 1fr;
    background: #f6f7f8;
}

.admin-sidebar {
    background: #23272b;
    color: #ffffff;
}

.admin-brand {
    min-height: 86px;
    display: grid;
    place-items: center;
    padding: 18px;
}

.admin-brand img {
    max-width: 142px;
}

.admin-menu {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
}

.admin-menu a {
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    color: #ffffff;
    font-weight: 700;
}

.admin-menu .thumb {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    background: #343a40;
    color: #cce7d3;
    font-size: 13px;
}

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

.admin-topbar {
    height: 64px;
    padding: 0 28px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    border-bottom: 1px solid #e6e8eb;
    background: #ffffff;
}

.admin-hero {
    padding: 28px;
    background: #eceff1;
}

.admin-hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 500;
}

.admin-content {
    padding: 28px;
}

.breadcrumbs {
    margin: 0 0 18px;
    color: #78838c;
    font-size: 13px;
}

.card {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #e1e5e8;
    border-radius: 4px;
    background: #ffffff;
}

.filter-grid,
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.metric {
    padding: 18px;
    border: 1px solid #e1e5e8;
    background: #ffffff;
}

.metric strong {
    display: block;
    font-size: 30px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 11px 10px;
    border-bottom: 1px solid #edf0f2;
    text-align: left;
    vertical-align: top;
    font-size: 14px;
}

th {
    color: #68747d;
    font-size: 12px;
    text-transform: uppercase;
}

.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    background: #f0f5f1;
    color: #386846;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.bar-list {
    display: grid;
    gap: 10px;
}

.bar-row {
    display: grid;
    grid-template-columns: 160px 1fr 56px;
    gap: 12px;
    align-items: center;
}

.bar-track {
    height: 12px;
    background: #edf0f2;
}

.bar-fill {
    height: 100%;
    background: #82bd8f;
}

.pagination {
    margin-top: 18px;
}

@media (max-width: 820px) {
    .store-nav {
        min-height: 96px;
    }

    .store-logo {
        height: 72px;
    }

    .page-title {
        font-size: 34px;
    }

    .login-panel {
        border: 20px solid var(--irrewarra-border);
    }

    .login-box img {
        height: 160px;
    }

    .button-row,
    .checkbox-grid,
    .metric-grid,
    .filter-grid,
    .form-grid {
        grid-template-columns: 1fr;
    }

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

    .admin-sidebar {
        position: static;
    }

    .admin-menu {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        margin: 0;
    }

    .admin-menu a {
        padding: 10px;
        font-size: 12px;
    }
}

@media (max-width: 520px) {
    body {
        font-size: 1rem;
    }

    .container {
        padding: 0 12px;
    }

    .date-nav {
        gap: 10px;
    }

    .date-display {
        width: min(280px, 72vw);
    }

    .product-table th,
    .product-table td {
        padding: 12px 8px;
        font-size: 12px;
    }

    .product-name-cell {
        font-size: 13px;
        line-height: 1.3;
    }

    .code-column {
        width: 46px;
    }

    .quantity-column {
        width: 74px;
    }

    .quantity-field {
        width: 58px;
        min-height: 36px;
        padding: 4px 6px;
    }
}
