:root {
    color-scheme: dark;
    --erp-bg: #111715;
    --erp-bg-elevated: #151d1a;
    --erp-surface: #1b2420;
    --erp-surface-muted: #22302b;
    --erp-text: #eef5f1;
    --erp-text-soft: #a9b8b1;
    --erp-border: #31433b;
    --erp-primary: #55c2a9;
    --erp-primary-strong: #7bd8c2;
    --erp-primary-soft: #1d3932;
    --erp-accent: #e1ad55;
    --erp-danger: #ef7777;
    --erp-success: #69d19e;
    --erp-shadow: 0 18px 45px rgba(0, 0, 0, 0.22);
    --erp-radius-lg: 28px;
    --erp-radius-md: 18px;
    --erp-radius-sm: 12px;
    --erp-field-bg: #151d1a;
    --erp-field-border: #3a4d44;
    --erp-field-border-focus: rgba(85, 194, 169, 0.62);
    --erp-field-focus-ring: 0 0 0 0.22rem rgba(85, 194, 169, 0.22);
    --erp-field-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
    --erp-btn-radius: 14px;
    --erp-btn-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
    --erp-btn-shadow-hover: 0 14px 28px rgba(0, 0, 0, 0.28);
    --erp-btn-focus-ring: 0 0 0 0.2rem rgba(85, 194, 169, 0.22);
}

.sales-customer-picker {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: end;
}

.sales-customer-picker__add {
    position: relative;
    z-index: 45;
    min-width: 2.25rem;
    min-height: 2.25rem;
    padding-inline: 0;
    font-weight: 700;
}

.sales-quick-customer-form {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.sales-quick-customer-dialog-backdrop {
    position: fixed;
    inset: 0;
    z-index: 3200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(8, 16, 14, 0.58);
    backdrop-filter: blur(4px);
}

.sales-quick-customer-dialog {
    width: min(34rem, 100%);
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid rgba(85, 194, 169, 0.35);
    border-radius: 18px;
    background: var(--erp-surface, #fff);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.26);
}

.sales-quick-customer-dialog__header,
.sales-quick-customer-dialog__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.sales-quick-customer-dialog__header h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
}

.sales-quick-customer-dialog__actions {
    justify-content: flex-end;
}

.purchase-attachments-upload {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.purchase-attachment-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    align-items: center;
}

.purchase-attachment-links a,
.purchase-attachment-links span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

@media (max-width: 768px) {
    .sales-quick-customer-form {
        grid-template-columns: 1fr;
    }
}

.product-online-images {
    border: 1px solid var(--erp-border);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(85, 194, 169, 0.04);
}

.product-online-images__header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.product-online-images__empty {
    margin-top: 0.75rem;
    color: var(--erp-text-soft);
}

.product-online-images__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(7.5rem, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-online-images__item {
    display: grid;
    gap: 0.5rem;
}

.product-online-images__item img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--erp-border);
    background: #101816;
}

.shop-shell {
    min-height: 100dvh;
    padding: clamp(1rem, 2vw, 2rem);
    background: radial-gradient(circle at top left, rgba(85, 194, 169, 0.18), transparent 30%), #101614;
    color: var(--erp-text);
    direction: rtl;
}

.shop-login-card,
.shop-header,
.shop-catalog,
.shop-cart {
    background: #17211d;
    border: 1px solid #33483f;
    border-radius: 24px;
    box-shadow: var(--erp-shadow);
}

.shop-login-card {
    width: min(100%, 42rem);
    margin: 8dvh auto;
    padding: 1.5rem;
}

.shop-login-card h1,
.shop-header h1,
.shop-cart h2 {
    margin: 0;
    color: #fff7e8;
    font-weight: 900;
}

.shop-login-card p,
.shop-header p,
.shop-cart p {
    color: #b9c9c2;
}

.shop-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.shop-header span {
    color: var(--shop-primary, var(--erp-primary));
    font-weight: 800;
}

.shop-storefront-header {
    align-items: center;
}

.shop-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
}

.shop-brand img {
    width: 4.5rem;
    height: 4.5rem;
    object-fit: contain;
    border-radius: 16px;
    border: 1px solid #33483f;
    background: #101816;
    padding: 0.3rem;
}

.shop-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.shop-header-actions strong {
    color: #fff7e8;
}

.shop-notice,
.shop-login-inline {
    display: grid;
    gap: 0.4rem;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid rgba(225, 173, 85, 0.36);
    border-radius: 18px;
    background: rgba(225, 173, 85, 0.1);
    color: #ffe2ae;
}

.shop-notice strong,
.shop-notice span,
.shop-login-inline h2,
.shop-login-inline p {
    margin: 0;
}

.shop-notice--danger {
    border-color: rgba(239, 119, 119, 0.45);
    background: rgba(239, 119, 119, 0.12);
    color: #ffc4c4;
}

.shop-login-inline {
    background: #17211d;
    border-color: #33483f;
    color: var(--erp-text);
}

.shop-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scroll-snap-type: x proximity;
}

.shop-tab {
    flex: 0 0 auto;
    min-width: 7rem;
    min-height: 2.75rem;
    padding: 0.55rem 1rem;
    border: 1px solid #33483f;
    border-radius: 999px;
    background: #101816;
    color: #b9c9c2;
    font-weight: 900;
    scroll-snap-align: start;
}

.shop-tab.is-active {
    border-color: var(--shop-primary, #5ec8b4);
    background: var(--shop-primary, #5ec8b4);
    color: #07110e;
}

.shop-tab:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.shop-tab--cart {
    display: none;
}

.shop-account {
    display: grid;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.shop-account__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.shop-account-tile,
.shop-account-panel {
    border: 1px solid #33483f;
    border-radius: 18px;
    background: #17211d;
    box-shadow: var(--erp-shadow);
}

.shop-account-tile {
    display: grid;
    gap: 0.3rem;
    min-height: 7.25rem;
    padding: 0.9rem;
}

.shop-account-tile span,
.shop-account-panel h2 {
    color: #b9c9c2;
    font-size: 0.88rem;
    font-weight: 800;
}

.shop-account-tile strong,
.shop-account-row span {
    color: #8ee4d0;
    font-size: 1.15rem;
    font-weight: 900;
}

.shop-account-tile small,
.shop-account-panel p,
.shop-account-row small {
    color: #b9c9c2;
}

.shop-debt-list {
    display: grid;
    gap: 0.2rem;
}

.shop-account__sections {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.shop-account-panel {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    padding: 0.85rem;
}

.shop-account-panel h2,
.shop-account-panel p {
    margin: 0;
}

.shop-account-row {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
    padding: 0.65rem;
    border: 1px solid #283a33;
    border-radius: 14px;
    background: #101816;
}

.shop-account-row strong,
.shop-account-row small {
    display: block;
}

.shop-account-row span {
    direction: ltr;
    white-space: nowrap;
}

.shop-tab-panel {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid #33483f;
    border-radius: 24px;
    background: #17211d;
    box-shadow: var(--erp-shadow);
}

.shop-tab-panel h2,
.shop-tab-panel p {
    margin: 0;
}

.shop-tab-panel h2 {
    color: #fff7e8;
    font-size: 1.35rem;
    font-weight: 900;
}

.shop-tab-panel p {
    color: #b9c9c2;
}

.shop-tab-panel--cart {
    display: none;
}

.shop-ledger-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.85rem;
    border: 1px solid #2f463d;
    border-radius: 18px;
    background: #101816;
}

.shop-ledger-card__head,
.shop-ledger-line,
.shop-receipt-purpose {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
}

.shop-ledger-card__head strong,
.shop-ledger-card__head small,
.shop-ledger-line strong,
.shop-ledger-line small {
    display: block;
}

.shop-ledger-card__head strong,
.shop-ledger-line strong {
    color: #fff7e8;
}

.shop-ledger-card__head small,
.shop-ledger-line small,
.shop-receipt-purpose span,
.shop-ledger-note {
    color: #b9c9c2;
}

.shop-ledger-card__head > span,
.shop-ledger-line > span {
    direction: ltr;
    color: #8ee4d0;
    font-weight: 900;
    white-space: nowrap;
}

.shop-ledger-badge {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(85, 194, 169, 0.16);
    color: #8ee4d0 !important;
    font-size: 0.85rem;
}

.shop-ledger-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.shop-ledger-totals div,
.shop-receipt-purpose {
    padding: 0.65rem;
    border: 1px solid #283a33;
    border-radius: 14px;
    background: #17211d;
}

.shop-ledger-totals span,
.shop-ledger-totals strong,
.shop-receipt-purpose span,
.shop-receipt-purpose strong {
    display: block;
}

.shop-ledger-totals span {
    color: #b9c9c2;
    font-size: 0.82rem;
}

.shop-ledger-totals strong,
.shop-receipt-purpose strong {
    color: #8ee4d0;
    font-weight: 900;
}

.shop-ledger-section {
    display: grid;
    gap: 0.5rem;
}

.shop-ledger-section h3 {
    margin: 0;
    color: #fff7e8;
    font-size: 1rem;
}

.shop-ledger-line {
    padding: 0.65rem;
    border: 1px solid #283a33;
    border-radius: 14px;
    background: #17211d;
}

.shop-ledger-note {
    padding: 0.65rem;
    border-radius: 14px;
    background: rgba(225, 173, 85, 0.09);
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(20rem, 24rem);
    gap: 1rem;
    align-items: start;
}

.shop-catalog,
.shop-cart {
    padding: 1rem;
}

.shop-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(12rem, 16rem) minmax(12rem, 16rem);
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.shop-banner-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(18rem, 28rem);
    gap: 0.75rem;
    overflow-x: auto;
    margin-bottom: 1rem;
}

.shop-banner {
    position: relative;
    min-height: 9rem;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 1rem;
    border: 1px solid #33483f;
    border-radius: 18px;
    background: linear-gradient(135deg, #18241f, #101816);
}

.shop-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.55;
}

.shop-banner span {
    position: relative;
    display: grid;
    gap: 0.25rem;
    color: #fff7e8;
}

.shop-banner strong {
    font-size: 1.15rem;
    font-weight: 900;
}

.shop-banner small {
    color: #d7e8e1;
    font-weight: 700;
}

.shop-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1rem 0 0.75rem;
}

.shop-section-heading h2 {
    margin: 0;
    color: #fff7e8;
    font-size: 1.25rem;
    font-weight: 900;
}

.shop-section-heading button {
    border: 0;
    background: transparent;
    color: var(--shop-primary, #8ee4d0);
    font-weight: 900;
}

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.shop-product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #33483f;
    border-radius: 20px;
    background: #121c18;
}

.shop-favorite-button {
    position: absolute;
    top: 0.7rem;
    inset-inline-end: 0.7rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.45rem;
    height: 2.45rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(16, 24, 22, 0.82);
    color: #d0ded8;
}

.shop-favorite-button.is-active {
    color: #ff7f9b;
    border-color: rgba(255, 127, 155, 0.45);
    background: rgba(54, 20, 30, 0.86);
}

.shop-product-card__image {
    display: grid;
    place-items: center;
    aspect-ratio: 4 / 3;
    background: #0f1714;
    color: #90a89e;
}

.shop-product-card__image-button {
    width: 100%;
    border: 0;
    padding: 0;
    cursor: zoom-in;
    overflow: hidden;
}

.shop-product-card__image-button:disabled {
    cursor: default;
}

.shop-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.shop-product-card__image-button:not(:disabled):hover img {
    transform: scale(1.04);
}

.shop-product-card__body {
    display: grid;
    gap: 0.65rem;
    padding: 1rem;
}

.shop-product-card__body small {
    color: var(--erp-primary);
    font-weight: 800;
}

.shop-product-card__body h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #fff7e8;
}

.shop-product-card__unit {
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid rgba(142, 228, 208, 0.32);
    border-radius: 999px;
    background: rgba(142, 228, 208, 0.1);
    color: #d7fff5;
    font-size: 0.82rem;
    line-height: 1;
}

.shop-product-card__unit span {
    color: #8ee4d0;
    font-weight: 700;
}

.shop-product-card__unit strong {
    color: #fff7e8;
    font-weight: 900;
}

.shop-product-card__body p {
    margin: 0;
    color: #b9c9c2;
    line-height: 1.6;
}

.shop-product-card__stock {
    width: max-content;
    max-width: 100%;
    padding: 0.3rem 0.5rem;
    border-radius: 999px;
    background: rgba(225, 173, 85, 0.12);
    color: #ffd99a;
    font-size: 0.82rem;
    font-weight: 800;
}

.shop-product-card__thumbs {
    display: flex;
    gap: 0.35rem;
}

.shop-product-card__thumbs button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.shop-product-card__thumbs img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #33483f;
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.shop-product-card__thumbs button:hover img {
    border-color: var(--erp-primary);
    transform: translateY(-1px);
}

.shop-product-card__meta,
.shop-cart-total {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
}

.shop-product-card__meta strong,
.shop-cart-total strong {
    color: var(--shop-primary, #8ee4d0);
    font-size: 1.2rem;
}

.shop-product-card__meta del {
    color: #ffb8b8;
    font-weight: 800;
}

.shop-product-card__meta span {
    color: #b9c9c2;
    font-size: 0.9rem;
    font-weight: 800;
}

.shop-product-card__actions {
    display: grid;
    gap: 0.5rem;
}

.shop-product-card__actions .btn {
    min-height: 2.75rem;
}

.shop-product-card__actions .btn-outline-secondary {
    display: none;
}

.shop-image-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(3px);
}

.shop-image-modal__panel {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    width: min(96vw, 60rem);
    max-height: 92vh;
    padding: 1rem;
    border: 1px solid #33483f;
    border-radius: 24px;
    background: #17211d;
    box-shadow: var(--erp-shadow);
}

.shop-image-modal__panel img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 18px;
    background: #0f1714;
}

.shop-image-modal__panel strong {
    color: #fff7e8;
}

.shop-image-modal__close {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid #4f6a5f;
    border-radius: 999px;
    background: rgba(15, 23, 20, 0.92);
    color: #fff7e8;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

.shop-cart {
    position: sticky;
    top: 1rem;
    display: grid;
    gap: 0.85rem;
}

.shop-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.5rem auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.6rem;
    border: 1px solid #33483f;
    border-radius: 16px;
    background: #101816;
}

.shop-coupon-box {
    display: grid;
    gap: 0.4rem;
}

.shop-coupon-box > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
}

.shop-cart-total--discount strong {
    color: #ffd99a;
}

.shop-cart-total--final {
    padding-top: 0.65rem;
    border-top: 1px solid #33483f;
}

.shop-cart-total--final strong {
    color: var(--shop-accent, #ffd99a);
}

.online-store-admin-card {
    display: grid;
    gap: 1rem;
}

.online-store-admin-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.online-store-admin-header h1,
.online-store-admin-header h2,
.online-store-admin-header p,
.online-store-admin-card h2 {
    margin: 0;
}

.online-store-admin-search {
    width: min(100%, 20rem);
}

.online-store-products-table {
    min-width: 118rem;
}

.online-store-products-table td {
    vertical-align: middle;
}

.online-store-products-table td strong,
.online-store-products-table td small {
    display: block;
}

.online-store-products-table td small {
    color: var(--erp-text-soft);
}

.online-store-section-picks {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 16rem;
}

.online-store-section-picks label,
.online-store-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.55rem;
    border: 1px solid var(--erp-border);
    border-radius: 999px;
    background: rgba(85, 194, 169, 0.08);
    color: var(--erp-text);
    font-size: 0.85rem;
    font-weight: 800;
}

.online-store-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.online-store-chip {
    border-radius: 12px;
}

.online-store-chip span {
    color: var(--erp-text-soft);
}

.store-banner-upload {
    display: grid;
    grid-template-columns: minmax(18rem, 1.35fr) minmax(14rem, 0.65fr);
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-md);
    background: rgba(85, 194, 169, 0.05);
}

.store-banner-upload__preview {
    display: grid;
    place-items: center;
    min-height: 13rem;
    overflow: hidden;
    border: 1px dashed rgba(85, 194, 169, 0.45);
    border-radius: var(--erp-radius-md);
    background: var(--erp-surface-muted);
    aspect-ratio: 16 / 6;
}

.store-banner-upload__image-button {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.store-banner-upload__image-button:focus-visible {
    outline: 3px solid var(--erp-primary);
    outline-offset: -3px;
}

.store-banner-upload__image-button img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.store-banner-upload__placeholder {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    max-width: 30rem;
    padding: 1.5rem;
    color: var(--erp-text-soft);
    text-align: center;
}

.store-banner-upload__placeholder i {
    color: var(--erp-primary);
    font-size: 2rem;
}

.store-banner-upload__placeholder strong {
    color: var(--erp-text);
}

.store-banner-upload__actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 0.75rem;
}

.store-banner-upload__actions .btn {
    min-height: 44px;
}

.store-banner-upload__help {
    color: var(--erp-text-soft);
    line-height: 1.7;
}

.shop-cart-line strong,
.shop-cart-line small {
    display: block;
}

.shop-cart-line small {
    color: #b9c9c2;
}

.shop-empty {
    display: grid;
    place-items: center;
    min-height: 16rem;
    color: #b9c9c2;
    border: 1px dashed #33483f;
    border-radius: 20px;
}

.online-orders-table {
    min-width: 82rem;
}

.whatsapp-settings-card,
.store-builder-card {
    display: grid;
    gap: 1rem;
}

.store-builder-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.store-builder-header h1,
.store-builder-header p,
.store-builder-section h2,
.store-builder-result span {
    margin: 0;
}

.store-builder-sections {
    display: grid;
    gap: 1rem;
}

.store-builder-section {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.025);
}

.store-builder-section h2 {
    font-size: 1rem;
}

.store-builder-note,
.store-builder-result {
    display: grid;
    gap: 0.25rem;
}

.store-builder-note {
    align-self: end;
    min-height: 2.85rem;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(85, 194, 169, 0.22);
    border-radius: 8px;
    background: rgba(85, 194, 169, 0.08);
}

.store-builder-note span {
    color: var(--erp-muted);
    font-size: 0.88rem;
}

@media (max-width: 768px) {
    .store-builder-header {
        display: grid;
    }

    .store-builder-header .btn {
        justify-self: start;
    }
}

.whatsapp-settings-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.whatsapp-settings-header h1,
.whatsapp-settings-header p,
.whatsapp-qr-panel h2 {
    margin: 0;
}

.whatsapp-status {
    display: inline-flex;
    align-items: center;
    min-height: 2.25rem;
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--erp-border);
    border-radius: 999px;
    background: rgba(225, 173, 85, 0.1);
    color: #ffd99a;
    font-weight: 900;
    white-space: nowrap;
}

.whatsapp-status--connected {
    background: rgba(85, 194, 169, 0.16);
    color: #8ee4d0;
}

.whatsapp-status--waiting {
    background: rgba(225, 173, 85, 0.14);
    color: #ffd99a;
}

.whatsapp-status--disconnected {
    background: rgba(239, 119, 119, 0.14);
    color: #ffc4c4;
}

.whatsapp-setup-layout {
    display: grid;
    grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
    gap: 1rem;
    align-items: start;
}

.whatsapp-qr-panel,
.whatsapp-settings-form {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--erp-border);
    border-radius: 18px;
    background: rgba(85, 194, 169, 0.05);
}

.whatsapp-qr-panel img {
    width: min(100%, 22rem);
    justify-self: center;
    border-radius: 14px;
    background: #fff;
    padding: 0.65rem;
}

.whatsapp-empty-qr,
.whatsapp-connected-state {
    display: grid;
    place-items: center;
    min-height: 18rem;
    gap: 0.35rem;
    padding: 1rem;
    border: 1px dashed var(--erp-border);
    border-radius: 16px;
    text-align: center;
}

.whatsapp-connected-state strong {
    color: var(--erp-primary);
    font-size: 1.8rem;
}

.whatsapp-empty-qr--disconnected {
    border-color: rgba(239, 119, 119, 0.45);
    background: rgba(239, 119, 119, 0.08);
}

.whatsapp-empty-qr--disconnected strong {
    color: #ffc4c4;
    font-size: 1.45rem;
}

.whatsapp-empty-qr span,
.whatsapp-connected-state span {
    color: var(--erp-text-soft);
}

.whatsapp-toggle {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 3rem;
}

@media (max-width: 980px) {
    .shop-shell {
        padding: 0.75rem;
    }

    .shop-header {
        align-items: stretch;
        flex-direction: column;
        border-radius: 18px;
    }

    .shop-tabs {
        margin-inline: -0.15rem;
    }

    .shop-tab {
        min-width: max-content;
        padding-inline: 1rem;
    }

    .shop-tab--cart,
    .shop-tab-panel--cart {
        display: grid;
    }

    .shop-account__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-account__sections {
        grid-template-columns: 1fr;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-cart {
        display: none;
    }

    .shop-product-card__actions .btn-outline-secondary {
        display: block;
    }

    .shop-toolbar {
        grid-template-columns: 1fr;
    }

    .shop-brand {
        align-items: flex-start;
    }

    .whatsapp-setup-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .whatsapp-settings-header {
        display: grid;
    }

    .shop-account__summary,
    .shop-product-grid {
        grid-template-columns: 1fr;
    }

    .shop-account-row,
    .shop-ledger-card__head,
    .shop-ledger-line,
    .shop-receipt-purpose,
    .shop-cart-line {
        display: grid;
        grid-template-columns: 1fr;
    }

    .shop-cart-line {
        display: grid;
    }

    .shop-ledger-totals {
        grid-template-columns: 1fr;
    }
}

html,
body {
    min-height: 100%;
    margin: 0;
    background:
        radial-gradient(circle at top right, rgba(216, 232, 247, 0.9), transparent 32%),
        linear-gradient(180deg, #fbfcfe 0%, #f2f6fb 100%);
    color: var(--erp-text);
    font-family: "Aptos", "Segoe UI", Tahoma, sans-serif;
}

* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    width: 0;
    height: 0;
}

a {
    color: inherit;
    text-decoration: none;
}

main {
    min-width: 0;
}

h1:focus {
    outline: none;
}

.erp-shell {
    min-height: 100dvh;
    height: 100dvh;
    display: block;
}

.erp-shell__main {
    max-width: none;
    width: 98%;
    margin: 0 auto;
    padding: 1rem 1.25rem 1.25rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.erp-shell__content {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 1rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding-inline-end: 0.25rem;
    animation: erp-page-fade 0.22s ease;
}

.erp-shell__content>.content-card,
.erp-shell__content>.table-card,
.erp-shell__content>.permission-card,
.erp-shell__content>.migration-card {
    flex: 1 1 420px;
    max-width: 100%;
    min-width: 0;
}

/* Dark theme corrections for legacy page styles */
html[data-theme="dark"] body {
    background: #101614;
}

html[data-theme="dark"] .erp-topbar,
html[data-theme="dark"] .content-card,
html[data-theme="dark"] .table-card,
html[data-theme="dark"] .permission-card,
html[data-theme="dark"] .migration-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .purchase-audit-row,
html[data-theme="dark"] .purchase-audit-queue__header {
    background: #17211d;
    border-color: #33483f;
    color: var(--erp-text);
}

html[data-theme="dark"] .products-page-card,
html[data-theme="dark"] .products-page-toolbar,
html[data-theme="dark"] .erp-table-card {
    background: #17211d;
}

html[data-theme="dark"] .section-lead,
html[data-theme="dark"] .table-card__description,
html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .small,
html[data-theme="dark"] .metric-card__label,
html[data-theme="dark"] .metric-card__caption {
    color: #b9c9c2 !important;
}

html[data-theme="dark"] .metric-card {
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(85, 194, 169, 0.08), transparent 52%),
        #17211d;
}

html[data-theme="dark"] .metric-card::before,
html[data-theme="dark"] .metric-card::after {
    opacity: 0.18;
    background: rgba(85, 194, 169, 0.22);
}

html[data-theme="dark"] .metric-card__value,
html[data-theme="dark"] .dashboard-home__summary-item span {
    color: #7bd8c2 !important;
    text-shadow: none;
}

html[data-theme="dark"] .erp-table-scroll {
    border-color: #33483f;
    background: #14201b;
}

html[data-theme="dark"] .erp-table-scroll .table-card__table thead th,
html[data-theme="dark"] .table-card__table th {
    background: #e9eee9 !important;
    color: #24332e !important;
    border-color: #d6ded8 !important;
}

html[data-theme="dark"] .table-card__table td {
    background: #14201b;
    color: #eef5f1;
    border-color: #2c4038;
}

html[data-theme="dark"] .table-card__table tbody tr:hover td {
    background: #1b2a24;
}

html[data-theme="dark"] input.form-control,
html[data-theme="dark"] textarea.form-control,
html[data-theme="dark"] .form-control {
    background-color: #101816 !important;
    border-color: #587068 !important;
    color: #eef5f1 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] input.form-control::placeholder,
html[data-theme="dark"] textarea.form-control::placeholder,
html[data-theme="dark"] .form-control::placeholder {
    color: #8ea39a !important;
    opacity: 1;
}

/* Prevent Chromium autofill from painting a light field over the dark theme. */
html[data-theme="dark"] input.form-control:-webkit-autofill,
html[data-theme="dark"] input.form-control:-webkit-autofill:hover,
html[data-theme="dark"] input.form-control:-webkit-autofill:focus,
html[data-theme="dark"] input.form-control:-webkit-autofill:active {
    -webkit-text-fill-color: #eef5f1 !important;
    caret-color: #eef5f1;
    -webkit-box-shadow: 0 0 0 1000px #101816 inset !important;
    box-shadow: 0 0 0 1000px #101816 inset !important;
    border-color: #587068 !important;
}

html[data-theme="dark"] input.form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #101816 inset, 0 0 0 0.2rem rgba(88, 112, 104, 0.28) !important;
    box-shadow: 0 0 0 1000px #101816 inset, 0 0 0 0.2rem rgba(88, 112, 104, 0.28) !important;
}

html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-secondary {
    background: #e9f4f1 !important;
    border-color: #cde2db !important;
    color: #176b5d !important;
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-secondary:hover {
    background: #55c2a9 !important;
    border-color: #55c2a9 !important;
    color: #10211c !important;
}

html[data-theme="dark"] .btn-primary {
    background: #55c2a9 !important;
    border-color: #55c2a9 !important;
    color: #10211c !important;
}

html[data-theme="dark"] .status-pill {
    border-color: rgba(123, 216, 194, 0.25);
}

html[data-theme="dark"] .status-pill--paid {
    background: rgba(85, 194, 169, 0.16);
    color: #9de8d5;
}

html[data-theme="dark"] .erp-sidebar__profile {
    background: #20332c;
    border-color: #33483f;
}

html[data-theme="dark"] .erp-nav-link.active {
    background: #1f4037;
    color: #9de8d5;
}

html[data-theme="dark"] .erp-nav-link:hover {
    background: #20332c;
}

/* Keep normal ERP pages dark even when returning from the POS blank layout. */
.erp-shell {
    background: #101614;
    color: #eef5f1;
}

.erp-shell .erp-topbar,
.erp-shell .content-card,
.erp-shell .table-card,
.erp-shell .permission-card,
.erp-shell .migration-card,
.erp-shell .metric-card,
.erp-shell .purchase-audit-row,
.erp-shell .purchase-audit-queue__header {
    background: #17211d !important;
    border-color: #33483f !important;
    color: #eef5f1 !important;
}

.erp-shell .section-lead,
.erp-shell .table-card__description,
.erp-shell .text-muted,
.erp-shell .small,
.erp-shell .metric-card__label,
.erp-shell .metric-card__caption {
    color: #b9c9c2 !important;
}

.erp-shell .metric-card {
    overflow: hidden;
    background:
        linear-gradient(135deg, rgba(85, 194, 169, 0.08), transparent 52%),
        #17211d !important;
}

.erp-shell .metric-card::before,
.erp-shell .metric-card::after {
    opacity: 0.18;
    background: rgba(85, 194, 169, 0.22);
}

.erp-shell .metric-card__value,
.erp-shell .dashboard-home__summary-item span {
    color: #7bd8c2 !important;
    text-shadow: none !important;
}

.erp-shell .erp-table-scroll,
.erp-shell .table-responsive {
    border-color: #33483f !important;
    background: #121c18 !important;
}

.erp-shell .table-card__table,
.erp-shell .table {
    --bs-table-bg: #121c18;
    --bs-table-color: #eef5f1;
    --bs-table-border-color: #2e453c;
    --bs-table-striped-bg: #16231e;
    --bs-table-striped-color: #eef5f1;
    --bs-table-hover-bg: #1a2a24;
    --bs-table-hover-color: #eef5f1;
    color: #eef5f1 !important;
    border-color: #2e453c !important;
}

.erp-shell .erp-table-scroll .table-card__table thead th,
.erp-shell .table-card__table thead th,
.erp-shell .table-card__table th {
    background: #20332c !important;
    color: #d9eee7 !important;
    border-color: #355046 !important;
}

.erp-shell .table-card__table td {
    background: #121c18 !important;
    color: #eef5f1 !important;
    border-color: #2e453c !important;
}

.erp-shell .table-card__table tbody tr:hover td {
    background: #1a2a24 !important;
}

.erp-shell input.form-control,
.erp-shell textarea.form-control,
.erp-shell .form-control {
    background-color: #101816 !important;
    border-color: #587068 !important;
    color: #eef5f1 !important;
    box-shadow: none !important;
}

.erp-shell input.form-control::placeholder,
.erp-shell textarea.form-control::placeholder,
.erp-shell .form-control::placeholder {
    color: #8ea39a !important;
    opacity: 1;
}

.erp-shell__content>.erp-alert,
.erp-shell__content>.purchase-lines-card {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

.erp-shell__content>.dashboard-grid,
.erp-shell__content>.sales-fullscreen-shell,
.erp-shell__content>.erp-workbench,
.erp-shell__content>.products-page-stack,
.erp-shell__content>.product-editor-page,
.erp-shell__content>.audit-simple-page,
.erp-shell__content>.purchase-audit-shell,
.erp-shell__content>.purchase-audit-toolbar,
.erp-shell__content>.login-shell,
.erp-shell__content>.stock-transfer-layout,
.erp-shell__content>.cash-transfer-layout,
.erp-shell__content>.pos-session-cash-movements-page,
.erp-shell__content>.settings-currencies-tables,
.erp-shell__content>.voucher-details-layout,
.erp-shell__content>.purchase-details-page,
.erp-shell__content>.sales-details-page,
.erp-shell__content>.sales-return-page,
.erp-shell__content>.purchase-return-page,
.erp-shell__content>.stock-adjustment-layout,
.erp-shell__content>.stock-overview-layout,
.erp-shell__content>.stock-opening-layout {
    flex: 1 1 100%;
    min-width: 0;
}

.purchase-details-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.sales-details-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.sales-return-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.purchase-return-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.purchase-details-page>.content-card,
.purchase-details-page>.table-card,
.purchase-details-page>.dashboard-grid,
.sales-details-page>.content-card,
.sales-details-page>.table-card,
.sales-details-page>.dashboard-grid,
.sales-return-page>.content-card,
.sales-return-page>.table-card,
.sales-return-page>.dashboard-grid,
.sales-return-page>.erp-alert,
.purchase-return-page>.content-card,
.purchase-return-page>.table-card,
.purchase-return-page>.dashboard-grid,
.purchase-return-page>.erp-alert {
    width: 100%;
    min-width: 0;
}

.purchase-return-page>.dashboard-grid {
    order: 10;
}

.purchase-return-page>.table-card {
    order: 20;
}

.purchase-return-page>.content-card:last-child {
    order: 30;
}

.pos-session-cash-movements-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.settings-currencies-tables {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.voucher-details-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 30rem);
    grid-template-areas: "left right";
    gap: 1rem;
    align-items: start;
    width: 100%;
    min-width: 0;
}

.voucher-details-layout__right {
    grid-area: right;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

.voucher-details-layout__left {
    grid-area: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

@media (max-width: 1100px) {
    .voucher-details-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "right"
            "left";
    }
}

.erp-shell__content> :only-child {
    flex-basis: 100%;
}

.erp-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
    position: relative;
    min-height: 3.2rem;
}

.erp-topbar__actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.erp-topbar__center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
}

.erp-topbar__page-title {
    margin: 0;
    color: #0f4c81;
    font-weight: 900;
    font-size: 1.2rem;
    line-height: 1.25;
    white-space: nowrap;
    text-align: center;
}

.erp-topbar__actions form {
    margin: 0;
}

.erp-fullscreen-button {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.erp-topbar__title {
    margin: 0;
    font-size: 1.8rem;
    font-weight: 700;
}

.erp-topbar__subtitle {
    margin: 0;
    max-width: 30rem;
    color: var(--erp-text-soft);
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: left;
}

@keyframes erp-page-fade {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.erp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    height: 100%;
    padding: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(238, 243, 255, 0.96));
    border: 1px solid rgba(220, 228, 242, 0.95);
    border-radius: 32px;
    box-shadow: var(--erp-shadow);
}

.erp-sidebar__brand h1 {
    margin: 0.35rem 0;
    font-size: 1.55rem;
    font-weight: 800;
}

.erp-sidebar__brand p {
    margin: 0;
    color: var(--erp-text-soft);
    line-height: 1.7;
    font-size: 0.94rem;
}

.erp-sidebar__profile {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid var(--erp-border);
    border-radius: 22px;
}

.erp-sidebar__profile strong,
.erp-sidebar__profile small {
    display: block;
}

.erp-sidebar__profile small {
    color: var(--erp-text-soft);
    margin-top: 0.2rem;
}

.erp-sidebar__avatar {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--erp-primary) 0%, #1b75bc 100%);
    color: white;
    font-weight: 800;
    font-size: 1.1rem;
}

.erp-nav-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.erp-nav-link {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.95rem 1rem;
    border: 1px solid transparent;
    border-radius: 18px;
    transition: 0.2s ease;
}

.erp-nav-link:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: var(--erp-border);
}

.erp-nav-link.active {
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.12), rgba(255, 179, 71, 0.12));
    border-color: rgba(15, 76, 129, 0.15);
    box-shadow: inset 0 0 0 1px rgba(15, 76, 129, 0.05);
}

.erp-nav-link__title {
    font-weight: 700;
}

.erp-nav-link__description {
    color: var(--erp-text-soft);
    font-size: 0.82rem;
}

.erp-sidebar__logout {
    margin-top: auto;
}

.content-card,
.metric-card,
.table-card,
.permission-card,
.migration-card,
.login-card,
.login-panel {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 228, 242, 0.92);
    border-radius: var(--erp-radius-lg);
    box-shadow: var(--erp-shadow);
}

.content-card,
.table-card,
.permission-card,
.migration-card {
    padding: 1.6rem;
}

/* Hide simple per-page title cards (only h1) to free space for active controls */
.erp-shell__content>.content-card:has(> h1:only-child) {
    display: none;
}

.section-lead {
    margin: 0.9rem 0 0;
    color: var(--erp-text-soft);
    line-height: 1.8;
    max-width: 56rem;
}

.dashboard-home {
    min-height: calc(100vh - 10.5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
    padding: 1.25rem 0;
}

.dashboard-home__intro {
    text-align: center;
}

.dashboard-home__intro h1 {
    margin: 0;
    font-size: clamp(1.8rem, 2.8vw, 2.4rem);
    font-weight: 800;
}

.dashboard-home__intro .section-lead {
    margin-top: 0.55rem;
    margin-inline: auto;
    max-width: 38rem;
}

.dashboard-home__grid {
    width: min(100%, 1040px);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.dashboard-home__button {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 0.4rem;
    min-height: 112px;
    width: 100%;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: 22px;
    background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(243, 248, 255, 0.98));
    box-shadow: 0 14px 34px rgba(17, 42, 79, 0.09);
    color: var(--erp-text);
    text-align: right;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background-color 0.18s ease;
}

.dashboard-home__button:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: rgba(15, 76, 129, 0.28);
    box-shadow: 0 20px 42px rgba(17, 42, 79, 0.15);
}

.dashboard-home__button:focus-visible {
    outline: 0;
    border-color: var(--erp-field-border-focus);
    box-shadow: var(--erp-field-focus-ring), 0 20px 42px rgba(17, 42, 79, 0.15);
}

.dashboard-home__button.is-current {
    border-color: rgba(15, 76, 129, 0.42);
    background: linear-gradient(180deg, rgba(216, 232, 247, 0.9), rgba(236, 244, 254, 0.98));
    box-shadow: 0 14px 34px rgba(17, 42, 79, 0.13);
    opacity: 0.88;
}

.dashboard-home__button-title {
    font-size: 1.05rem;
    font-weight: 800;
}

.dashboard-home__button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 0.8rem;
    background: rgba(15, 76, 129, 0.12);
    color: #0f4c81;
    font-size: 1rem;
}

.dashboard-home__button.is-current .dashboard-home__button-icon {
    background: rgba(15, 76, 129, 0.18);
}

.dashboard-home__button-icon i {
    line-height: 1;
}

.dashboard-home__button-description {
    display: block;
    color: var(--erp-text-soft);
    font-size: 0.88rem;
    line-height: 1.6;
}

.dashboard-home__empty {
    max-width: 46rem;
    margin: 0 auto;
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.dashboard-grid>.metric-card {
    height: 100%;
}

.erp-workbench {
    min-height: calc(100dvh - 10.75rem);
    display: grid;
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
    gap: 1rem;
}

.erp-workbench__sidebar,
.erp-workbench__main {
    min-height: 0;
}

.erp-workbench__sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    overflow: auto;
    padding-inline-end: 0.25rem;
}

.erp-workbench__main {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1rem;
}

.erp-workbench__metrics {
    margin-top: 0;
}

.erp-table-card {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.erp-table-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.erp-table-scroll {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-md);
}

.erp-table-scroll .table-card__table {
    margin: 0;
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.erp-table-scroll .table-card__table thead th {
    position: sticky;
    top: 0;
    z-index: 3;
    background: #fff;
}

.erp-table-scroll .table-card__table th,
.erp-table-scroll .table-card__table td {
    white-space: normal;
    overflow-wrap: anywhere;
}

.erp-form {
    margin-top: 1.4rem;
}

.erp-form--stack {
    margin-top: 1.6rem;
}

.erp-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.erp-form-grid__full {
    grid-column: 1 / -1;
}

.erp-form-grid__checkbox {
    display: flex;
    align-items: end;
}

.products-page-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
    min-width: 0;
}

.products-page-stack>.content-card,
.products-page-stack>.table-card,
.products-page-stack>.dashboard-grid {
    width: 100%;
    min-width: 0;
}

.products-page-card {
    padding: 1.05rem 1.25rem;
}

.products-page-toolbar {
    display: grid;
    gap: 0.9rem;
}

.products-page-toolbar__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.products-page-toolbar__header h1 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.25;
}

.products-page-toolbar__header .section-lead {
    margin-top: 0.35rem;
    max-width: 58rem;
    line-height: 1.65;
}

.products-page-toolbar__actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
    flex: 0 0 auto;
}

.products-page-toolbar__actions .btn {
    min-height: 2.65rem;
    padding-block: 0.45rem;
}

.products-page-metrics.dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.products-page-stack .erp-table-card {
    min-height: 34rem;
}

.products-filter-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "search search"
        "category apply"
        "reset reset";
    gap: 0.85rem 1rem;
    align-items: end;
}

.products-filter-form--compact {
    grid-template-columns: minmax(18rem, 1.4fr) minmax(16rem, 1fr) auto auto;
    grid-template-areas: "search category apply reset";
    gap: 0.7rem;
    align-items: end;
}

.products-filter-form--compact .form-label {
    margin-bottom: 0.3rem;
    font-weight: 800;
}

.products-filter-form--compact .products-filter-form__apply,
.products-filter-form--compact .products-filter-form__reset {
    justify-content: stretch;
}

.products-filter-form--compact .products-filter-form__apply>.btn,
.products-filter-form--compact .products-filter-form__reset>a.btn {
    min-height: 3rem;
}

.products-filter-form__search {
    grid-area: search;
    min-width: 0;
}

.products-filter-form__category {
    grid-area: category;
    min-width: 0;
}

.products-filter-form__apply {
    grid-area: apply;
    display: flex;
    align-items: end;
    justify-content: flex-end;
}

.products-filter-form__apply>.btn {
    width: auto !important;
    min-width: 6.4rem;
    white-space: nowrap;
}

.products-filter-form__reset {
    grid-area: reset;
    display: flex;
    justify-content: flex-start;
}

.products-filter-form__reset>.btn,
.products-filter-form__reset>a.btn {
    width: auto !important;
}

@media (max-width: 900px) {
    .products-page-metrics.dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .products-page-toolbar__header {
        flex-direction: column;
    }

    .products-page-toolbar__actions {
        justify-content: flex-start;
        width: 100%;
    }

    .products-page-toolbar__actions .btn {
        flex: 1 1 10rem;
    }

    .products-filter-form,
    .products-filter-form--compact {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "search"
            "category"
            "apply"
            "reset";
    }

    .products-filter-form__apply,
    .products-filter-form__reset {
        justify-content: stretch;
    }

    .products-filter-form__apply>.btn,
    .products-filter-form__reset>.btn,
    .products-filter-form__reset>a.btn {
        width: 100% !important;
    }
}

@media (max-width: 640px) {
    .products-page-metrics.dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.erp-form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.25rem;
    flex-wrap: wrap;
    width: 100%;
    min-width: 0;
}

.erp-form-actions>.btn,
.erp-form-actions>a.btn {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

.erp-inline-actions {
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

.erp-inline-actions>.btn,
.erp-inline-actions>a.btn {
    flex: 1 1 8.25rem;
    width: auto !important;
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
}

@media (max-width: 575.98px) {

    .erp-inline-actions>.btn,
    .erp-inline-actions>a.btn {
        flex-basis: 100%;
    }
}

.erp-inline-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-top: 1rem;
    color: var(--erp-text-soft);
    font-size: 0.9rem;
}

.erp-alert {
    margin: 0;
}

.erp-toast-host {
    position: fixed;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: min(24rem, calc(100vw - 2rem));
    pointer-events: none;
}

.erp-toast {
    border: 1px solid transparent;
    border-radius: 16px;
    padding: 0.8rem 0.95rem;
    box-shadow: 0 14px 30px rgba(13, 24, 45, 0.22);
    backdrop-filter: blur(8px);
    transform: translateY(-12px) scale(0.98);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    font-size: 0.94rem;
    line-height: 1.45;
}

.erp-toast.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.erp-toast__text {
    overflow-wrap: anywhere;
}

.erp-toast--success {
    background: linear-gradient(135deg, rgba(17, 110, 75, 0.95), rgba(38, 158, 107, 0.93));
    color: #f5fffb;
    border-color: rgba(138, 255, 214, 0.35);
}

.erp-toast--danger {
    background: linear-gradient(135deg, rgba(157, 35, 35, 0.96), rgba(206, 65, 65, 0.93));
    color: #fff8f8;
    border-color: rgba(255, 194, 194, 0.4);
}

.erp-toast--warning {
    background: linear-gradient(135deg, rgba(156, 106, 23, 0.96), rgba(204, 141, 34, 0.93));
    color: #fffaf1;
    border-color: rgba(255, 227, 172, 0.45);
}

.erp-toast--info,
.erp-toast--neutral {
    background: linear-gradient(135deg, rgba(22, 56, 102, 0.96), rgba(34, 87, 160, 0.93));
    color: #f5f9ff;
    border-color: rgba(176, 210, 255, 0.38);
}

.metric-card {
    --metric-accent: #0f4c81;
    --metric-soft: rgba(15, 76, 129, 0.16);
    padding: 1.05rem 1.15rem 1rem;
    position: relative;
    overflow: hidden;
    min-height: 122px;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    border-color: rgba(15, 76, 129, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(245, 250, 255, 0.98));
    box-shadow: 0 6px 16px rgba(17, 42, 79, 0.06);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.metric-card:hover {
    transform: translateY(-2px);
    border-color: rgba(15, 76, 129, 0.28);
    box-shadow: 0 10px 22px rgba(17, 42, 79, 0.09);
}

.metric-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent 0%, var(--metric-accent) 52%, transparent 100%);
}

.metric-card::after {
    content: "";
    position: absolute;
    inset: auto -28px -32px auto;
    width: 128px;
    height: 128px;
    border-radius: 999px;
    background: radial-gradient(circle at center, var(--metric-soft), rgba(255, 255, 255, 0));
    pointer-events: none;
    z-index: 0;
}

.metric-card:nth-child(4n + 2) {
    --metric-accent: #1f8f6a;
    --metric-soft: rgba(31, 143, 106, 0.14);
}

.metric-card:nth-child(4n + 3) {
    --metric-accent: #c78310;
    --metric-soft: rgba(199, 131, 16, 0.15);
}

.metric-card:nth-child(4n + 4) {
    --metric-accent: #475569;
    --metric-soft: rgba(71, 85, 105, 0.16);
}

.metric-card__label {
    display: block;
    color: #5c6a84;
    font-size: 0.81rem;
    font-weight: 700;
    line-height: 1.45;
    word-break: normal;
    position: relative;
    z-index: 1;
}

.metric-card__value {
    display: block;
    margin-top: 0.1rem;
    color: #102340;
    font-size: clamp(1.35rem, 2.1vw, 2.05rem);
    line-height: 1.2;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    overflow-wrap: normal;
    word-break: normal;
    position: relative;
    z-index: 1;
}

.metric-card__caption {
    margin: auto 0 0;
    color: #6d7890;
    font-size: 0.8rem;
    line-height: 1.45;
    overflow-wrap: break-word;
    word-break: normal;
    position: relative;
    z-index: 1;
}

.table-card__table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
}

.table-card__table th,
.table-card__table td {
    padding: 0.9rem 0.75rem;
    border-bottom: 1px solid var(--erp-border);
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
}

.table-card__table th {
    color: var(--erp-text-soft);
    font-size: 0.85rem;
    font-weight: 700;
}

.stock-transfer-layout {
    display: grid;
    grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: start;
}

.stock-transfer-layout__form {
    min-width: 0;
}

.stock-transfer-layout__right {
    min-width: 0;
    display: grid;
    gap: 1rem;
    align-content: start;
}

.stock-transfer-layout__filters {
    min-width: 0;
}

.stock-transfer-layout__history {
    min-width: 0;
}

.stock-transfer-filter-form {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(11rem, 1fr) auto;
    gap: 0.9rem 1rem;
    align-items: end;
}

.stock-transfer-filter-form__field {
    min-width: 0;
}

.stock-transfer-filter-form__actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.stock-transfer-filter-form__actions>.btn,
.stock-transfer-filter-form__actions>a.btn {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 6.4rem;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .stock-transfer-layout {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 900px) {
    .stock-transfer-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .stock-transfer-filter-form__actions {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .stock-transfer-filter-form__actions>.btn,
    .stock-transfer-filter-form__actions>a.btn {
        flex: 1 1 8rem;
    }
}

.stock-overview-layout {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
}

.stock-overview-layout__actions {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-self: stretch;
}

.stock-overview-layout__actions>.btn,
.stock-overview-layout__actions>a.btn {
    min-width: 9.8rem;
    width: 100%;
    white-space: nowrap;
}

.stock-overview-layout__filters {
    min-width: 0;
}

.stock-row-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    align-items: center;
    justify-content: flex-start;
}

.stock-row-actions>.btn,
.stock-row-actions>a.btn {
    white-space: nowrap;
    flex: 0 0 auto;
}

.stock-table__actions-col {
    width: 16.5rem;
    min-width: 16.5rem;
}

@media (max-width: 1100px) {
    .stock-overview-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .stock-overview-layout__actions {
        order: 2;
    }

    .stock-overview-layout__actions>.btn,
    .stock-overview-layout__actions>a.btn {
        min-width: 0;
    }

    .stock-row-actions {
        flex-wrap: wrap;
    }

    .stock-table__actions-col {
        width: auto;
        min-width: 0;
    }
}

.stock-opening-layout {
    display: grid;
    grid-template-columns: minmax(22rem, 28rem) minmax(0, 1fr);
    grid-template-areas:
        "entry current"
        "save current";
    gap: 1rem;
    align-items: start;
}

.stock-opening-layout__entry {
    grid-area: entry;
    min-width: 0;
}

.stock-opening-entry-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.85rem;
    align-items: stretch;
}

.stock-opening-entry-form__field,
.stock-opening-entry-form__action {
    min-width: 0;
}

.stock-opening-entry-form__action>.btn {
    width: 100% !important;
}

.stock-opening-layout__save {
    grid-area: save;
    min-width: 0;
}

.stock-opening-layout__current {
    grid-area: current;
    min-width: 0;
}

@media (max-width: 1200px) {
    .stock-opening-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "entry"
            "save"
            "current";
    }
}

.cash-transfer-layout {
    display: grid;
    grid-template-columns: minmax(20rem, 26rem) minmax(0, 1fr);
    grid-template-areas:
        "filters filters"
        "form history";
    gap: 1rem;
    align-items: start;
}

.cash-transfer-layout__filters {
    grid-area: filters;
    min-width: 0;
}

.cash-transfer-layout__form {
    grid-area: form;
    min-width: 0;
}

.cash-transfer-layout__history {
    grid-area: history;
    min-width: 0;
}

.cash-transfer-filter-form {
    display: grid;
    grid-template-columns: minmax(11rem, 1fr) minmax(11rem, 1fr) auto;
    gap: 0.9rem 1rem;
    align-items: end;
}

.cash-transfer-filter-form__field {
    min-width: 0;
}

.cash-transfer-filter-form__actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.cash-transfer-filter-form__actions>.btn,
.cash-transfer-filter-form__actions>a.btn {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 6.4rem;
    white-space: nowrap;
}

@media (max-width: 1200px) {
    .cash-transfer-layout {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "filters"
            "form"
            "history";
    }
}

@media (max-width: 900px) {
    .cash-transfer-filter-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .cash-transfer-filter-form__actions {
        justify-content: stretch;
        flex-wrap: wrap;
    }

    .cash-transfer-filter-form__actions>.btn,
    .cash-transfer-filter-form__actions>a.btn {
        flex: 1 1 8rem;
    }
}

.stock-adjustment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
        "header"
        "form"
        "history";
    gap: 1rem;
    align-items: start;
}

.stock-adjustment-layout__header {
    grid-area: header;
    min-width: 0;
}

.stock-adjustment-layout__form {
    grid-area: form;
    min-width: 0;
}

.stock-adjustment-layout__history {
    grid-area: history;
    min-width: 0;
}

.stock-adjustment-layout--single {
    grid-template-areas:
        "header"
        "form";
}

.status-pill {
    display: inline-flex;
    padding: 0.28rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
}

.status-pill--paid {
    background: rgba(31, 143, 106, 0.12);
    color: var(--erp-success);
}

.status-pill--pending {
    background: rgba(255, 179, 71, 0.2);
    color: #9b6200;
}

.status-pill--danger {
    background: rgba(220, 53, 69, 0.12);
    color: #b02a37;
}

.migration-card__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 1.25rem;
}

.migration-card__meta {
    padding: 1rem;
    background: var(--erp-surface-muted);
    border-radius: var(--erp-radius-md);
}

.migration-card__meta strong {
    display: block;
    margin-bottom: 0.55rem;
    font-size: 0.9rem;
}

.migration-card__meta ul {
    margin: 0;
    padding-right: 1.15rem;
    color: var(--erp-text-soft);
}

.migration-card__footer {
    margin-top: 1.25rem;
    padding: 1rem 1.1rem;
    background: rgba(216, 232, 247, 0.55);
    border-radius: var(--erp-radius-md);
    color: var(--erp-text);
}

.permission-card {
    text-align: center;
}

.permission-card h1 {
    margin-top: 0.75rem;
}

.permission-card p {
    color: var(--erp-text-soft);
    line-height: 1.8;
}

.login-shell {
    --login-primary: #0f4c81;
    --login-accent: #0d8d8a;
    --login-card-bg: rgba(255, 255, 255, 0.9);
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(22rem, 0.94fr) minmax(40rem, 1.56fr);
    align-items: stretch;
    gap: 1.4rem;
    padding: clamp(1rem, 1.8vw, 2rem);
    background:
        radial-gradient(circle at 10% 12%, rgba(88, 197, 213, 0.24), rgba(88, 197, 213, 0) 35%),
        radial-gradient(circle at 88% 80%, rgba(15, 76, 129, 0.2), rgba(15, 76, 129, 0) 45%),
        linear-gradient(145deg, #edf8ff 0%, #e5f1fa 46%, #f5f9ff 100%);
    font-family: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;
    position: relative;
    overflow: hidden;
}

.login-shell::before,
.login-shell::after {
    content: "";
    position: absolute;
    width: clamp(260px, 26vw, 420px);
    height: clamp(260px, 26vw, 420px);
    border-radius: 999px;
    pointer-events: none;
    z-index: 0;
}

.login-shell::before {
    inset: -130px auto auto -110px;
    background: radial-gradient(circle at center, rgba(27, 138, 168, 0.3), rgba(27, 138, 168, 0));
}

.login-shell::after {
    inset: auto -100px -140px auto;
    background: radial-gradient(circle at center, rgba(67, 127, 201, 0.2), rgba(67, 127, 201, 0));
}

.login-panel,
.login-card {
    padding: clamp(1.25rem, 2.3vw, 2.4rem);
    border-radius: clamp(1.2rem, 2.3vw, 2rem);
    position: relative;
    z-index: 1;
}

.login-panel {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1.35rem;
    background: linear-gradient(154deg, #0f5f8d 0%, #0d8d8a 100%);
    border: 1px solid rgba(205, 241, 255, 0.4);
    box-shadow: 0 26px 45px rgba(7, 56, 84, 0.24);
    color: white;
    overflow: hidden;
}

.login-panel::after {
    content: "";
    position: absolute;
    inset: auto -92px -110px auto;
    width: 270px;
    height: 270px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(145, 219, 255, 0.34), rgba(145, 219, 255, 0));
    pointer-events: none;
    animation: login-float 5.8s ease-in-out infinite;
}

.login-panel::before {
    content: "";
    position: absolute;
    inset: -70px auto auto -70px;
    width: 220px;
    height: 220px;
    border-radius: 999px;
    background: radial-gradient(circle at center, rgba(201, 243, 255, 0.26), rgba(201, 243, 255, 0));
    pointer-events: none;
}

.login-panel__content {
    max-width: 31rem;
    position: relative;
    z-index: 1;
    display: grid;
    gap: 0.85rem;
}

.login-panel h1 {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 3.2rem);
    font-weight: 900;
    line-height: 1.2;
}

.login-panel__lead {
    margin: 0;
    color: rgba(235, 248, 255, 0.95);
    font-size: 1rem;
    line-height: 1.8;
}

.login-panel__branches {
    list-style: none;
    margin: 0.2rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.55rem;
}

.login-panel__branches li {
    color: rgba(240, 250, 255, 0.96);
    line-height: 1.85;
    font-size: 1.01rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.login-panel__branches li::before {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.8rem;
    color: rgba(224, 250, 255, 0.95);
    transform: translateY(-1px);
}

.login-panel__branches li strong {
    font-size: 1.18rem;
    font-weight: 800;
}

.login-panel__illustration {
    position: relative;
    z-index: 1;
    margin-top: auto;
    border: 1px solid rgba(203, 236, 255, 0.38);
    border-radius: 1.2rem;
    background: rgba(183, 227, 255, 0.17);
    padding: 0.75rem;
    backdrop-filter: blur(5px);
}

.login-panel__lottie {
    width: min(100%, 460px);
    height: 180px;
    margin: 0 auto;
    direction: ltr;
}

.login-card {
    display: grid;
    align-content: center;
    gap: 1rem;
    background: linear-gradient(158deg, var(--login-card-bg) 0%, rgba(245, 252, 255, 0.86) 100%);
    border: 1px solid rgba(225, 241, 255, 0.9);
    box-shadow: 0 24px 44px rgba(13, 58, 91, 0.15);
    backdrop-filter: blur(14px);
}

.login-card__logo-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 0.3rem;
}

.login-card__logo {
    width: clamp(96px, 12vw, 130px);
    height: clamp(96px, 12vw, 130px);
    object-fit: contain;
}

.login-card__header {
    text-align: center;
    display: grid;
    gap: 0.35rem;
}

.login-card__header h2 {
    margin: 0;
    font-size: clamp(1.45rem, 2vw, 1.8rem);
    color: #12486f;
    font-weight: 900;
}

.login-card__header p {
    margin: 0;
    color: #5e7890;
    line-height: 1.65;
    font-size: 0.96rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.25rem;
}

.login-form__group {
    display: grid;
    gap: 0.5rem;
}

.login-form label {
    display: block;
    margin: 0;
    color: #4a6076;
    font-weight: 700;
    font-size: 0.95rem;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-wrap__icon {
    position: absolute;
    inset-inline-start: 0.95rem;
    color: #7b95ac;
    font-size: 1rem;
    pointer-events: none;
    z-index: 3;
    transition: color 0.15s ease;
}

.login-form .form-control {
    position: relative;
    z-index: 1;
    min-height: 3.25rem;
    border-radius: 1rem;
    border: 1px solid #c8d9ea;
    background: #f9fcff;
    color: #26435a;
    padding-inline-start: 2.65rem;
    padding-inline-end: 1rem;
    font-size: 1rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.login-input-wrap--password .form-control {
    padding-inline-end: 5.9rem;
}

.login-form .form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(15, 112, 148, 0.18);
    border-color: rgba(14, 111, 150, 0.6);
    background: #fff;
}

.login-input-wrap:focus-within .login-input-wrap__icon {
    color: #0a678f;
}

.login-password-toggle {
    position: absolute;
    inset-inline-end: 0.45rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    border-radius: 0.75rem;
    min-height: 2.2rem;
    padding: 0 0.7rem;
    background: rgba(13, 141, 138, 0.11);
    color: #0a6e8f;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.83rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    z-index: 3;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.login-password-toggle:hover {
    background: rgba(13, 141, 138, 0.18);
}

.login-password-toggle:focus-visible {
    outline: none;
    box-shadow: 0 0 0 0.18rem rgba(15, 112, 148, 0.2);
}

.login-password-toggle[aria-pressed="true"] {
    background: rgba(14, 111, 150, 0.18);
    color: #065173;
}

.login-form .form-control::placeholder {
    color: #8ca4ba;
}

.login-form .form-control.is-invalid {
    border-color: rgba(191, 37, 73, 0.65);
    background: rgba(255, 245, 248, 0.95);
}

.login-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.18rem rgba(191, 37, 73, 0.16);
    border-color: rgba(191, 37, 73, 0.72);
}

.login-form__error {
    margin: 0.05rem 0 0;
    color: #b4234f;
    font-size: 0.84rem;
    font-weight: 700;
    line-height: 1.6;
}

.btn-primary.login-form__submit {
    width: 100%;
    min-height: 3.05rem;
    border-radius: 1rem;
    border: 0;
    background: linear-gradient(135deg, var(--login-primary) 0%, var(--login-accent) 100%);
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    box-shadow: 0 16px 30px rgba(12, 84, 126, 0.27);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.btn-primary.login-form__submit:hover:not(:disabled):not(.disabled) {
    transform: translateY(-1px);
    border-color: transparent;
    background: linear-gradient(135deg, #13609d 0%, #129997 100%);
    color: #fff;
    box-shadow: 0 18px 32px rgba(12, 84, 126, 0.31);
    filter: saturate(1.05);
}

.btn-primary.login-form__submit:active:not(:disabled):not(.disabled) {
    transform: translateY(0);
    border-color: transparent;
    background: linear-gradient(135deg, #0c4d80 0%, #0b7f7d 100%);
    color: #fff;
    box-shadow: 0 13px 24px rgba(12, 84, 126, 0.25);
}

.btn-primary.login-form__submit:focus,
.btn-primary.login-form__submit:active:focus,
.btn-primary.login-form__submit:focus-visible {
    border-color: transparent;
    background: linear-gradient(135deg, #13609d 0%, #129997 100%);
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(14, 126, 145, 0.22), 0 18px 32px rgba(12, 84, 126, 0.31);
}

@keyframes login-float {

    0%,
    100% {
        transform: translate3d(0, 0, 0);
    }

    50% {
        transform: translate3d(-6px, -8px, 0);
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.6rem;
    padding: 0.58rem 1rem;
    border-radius: var(--erp-btn-radius);
    border-width: 1px;
    font-weight: 800;
    font-size: 0.92rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    box-shadow: var(--erp-btn-shadow);
    transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.btn:hover:not(:disabled):not(.disabled) {
    transform: translateY(-1px);
    box-shadow: var(--erp-btn-shadow-hover);
}

.btn:active:not(:disabled):not(.disabled) {
    transform: translateY(0);
    box-shadow: var(--erp-btn-shadow);
}

.btn:focus,
.btn:active:focus,
.btn:focus-visible {
    box-shadow: var(--erp-btn-focus-ring), var(--erp-btn-shadow-hover);
}

.btn-sm {
    min-height: 2.05rem;
    padding: 0.38rem 0.72rem;
    border-radius: 11px;
    font-size: 0.82rem;
}

.table-row-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.delivery-login-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: #0f1f1b;
}

.delivery-login-card {
    width: min(100%, 25rem);
    padding: 1.35rem;
    border: 1px solid rgba(94, 234, 212, 0.24);
    border-radius: 14px;
    background: #13251f;
    color: #f8fafc;
    box-shadow: 0 18px 55px rgba(0, 0, 0, 0.22);
}

.delivery-login-card__header {
    display: grid;
    gap: 0.45rem;
    justify-items: center;
    text-align: center;
    margin-bottom: 1.2rem;
}

.delivery-login-card__icon {
    width: 3.3rem;
    height: 3.3rem;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(45, 212, 191, 0.16);
    color: #5eead4;
    font-size: 1.4rem;
}

.delivery-login-card h1 {
    margin: 0;
    font-size: 1.45rem;
    font-weight: 800;
}

.delivery-login-card p {
    margin: 0;
    color: #b6c6bf;
}

.delivery-login-form,
.delivery-login-form__group {
    display: grid;
    gap: 0.55rem;
}

.delivery-login-form {
    gap: 0.9rem;
}

.delivery-login-form__group label {
    color: #e7f3ef;
    font-weight: 700;
}

.delivery-login-form__submit {
    width: 100%;
    min-height: 3rem;
}

.delivery-login-form__error {
    margin: 0;
    color: #fecaca;
    font-weight: 700;
    text-align: center;
}

.delivery-agent-profile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin: 0.8rem 0 1rem;
    padding: 0.8rem;
    border: 1px solid var(--erp-border-color, rgba(127, 160, 148, 0.22));
    border-radius: 12px;
    background: var(--erp-surface-soft, rgba(127, 160, 148, 0.07));
}

.delivery-agent-page {
    min-height: 100vh;
    width: 100%;
    display: grid;
    align-content: start;
    gap: 0.9rem;
    padding: clamp(0.8rem, 2.4vw, 1.4rem);
    background: #0f1f1b;
    color: #f8fafc;
}

.delivery-agent-panel,
.delivery-agent-state-card {
    width: min(100%, 48rem);
    margin-inline: auto;
    padding: 1rem;
    border: 1px solid rgba(94, 234, 212, 0.22);
    border-radius: 12px;
    background: #13251f;
}

.delivery-agent-panel h1,
.delivery-agent-state-card h1 {
    margin: 0 0 0.8rem;
    color: #f8fafc;
    font-size: clamp(1.15rem, 5vw, 1.55rem);
    font-weight: 900;
}

.delivery-agent-panel .form-label,
.delivery-agent-panel .section-lead {
    color: #d7eee7;
}

.delivery-agent-profile div {
    display: grid;
    gap: 0.15rem;
}

.delivery-agent-profile span {
    color: var(--erp-muted-color, #64748b);
    font-size: 0.82rem;
}

.delivery-agent-orders-list {
    display: grid;
    gap: 0.85rem;
}

.delivery-agent-summary {
    width: min(100%, 48rem);
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.delivery-agent-summary div {
    display: grid;
    gap: 0.3rem;
    padding: 0.85rem;
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 12px;
    background: #13251f;
}

.delivery-agent-summary span {
    color: #9fb7af;
    font-size: 0.78rem;
}

.delivery-agent-summary strong {
    color: #f8fafc;
    font-size: 1rem;
}

.delivery-agent-order-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
    border: 1px solid rgba(94, 234, 212, 0.2);
    border-radius: 12px;
    background: #10201b;
    color: #f8fafc;
}

.delivery-agent-order-card header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.delivery-agent-order-card h2 {
    margin: 0.2rem 0 0;
    color: #f8fafc;
    font-size: 1.05rem;
    font-weight: 800;
}

.delivery-agent-order-card__number,
.delivery-agent-order-card__field span,
.delivery-agent-order-card__meta span {
    color: #9fb7af;
    font-size: 0.8rem;
}

.delivery-agent-order-card strong,
.delivery-agent-order-card p {
    color: #eefbf7;
}

.delivery-agent-order-card__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.delivery-agent-order-card__meta div,
.delivery-agent-order-card__field {
    display: grid;
    gap: 0.2rem;
}

.delivery-agent-order-card__field p {
    margin: 0;
    line-height: 1.7;
}

.delivery-agent-order-card__action {
    width: 100%;
    min-height: 2.8rem;
}

@media (max-width: 640px) {
    .delivery-agent-page {
        padding: 0.7rem;
    }

    .delivery-agent-panel,
    .delivery-agent-state-card {
        padding: 0.85rem;
        border-radius: 10px;
    }

    .delivery-agent-profile {
        align-items: stretch;
        flex-direction: column;
    }

    .delivery-agent-order-card {
        padding: 0.9rem;
        border-radius: 10px;
    }

    .delivery-agent-order-card header {
        flex-direction: column;
    }

    .delivery-agent-order-card__meta {
        grid-template-columns: 1fr;
    }

    .delivery-agent-summary {
        grid-template-columns: 1fr;
    }
}

.btn-lg {
    min-height: 3rem;
    padding: 0.75rem 1.25rem;
    border-radius: 16px;
    font-size: 1rem;
}

.btn:disabled,
.btn.disabled {
    opacity: 0.56;
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
}

.btn-primary {
    color: #fff;
    border-color: #0d3f6d;
    background: linear-gradient(180deg, #1b79c4 0%, #0f4c81 100%);
}

.btn-primary:hover:not(:disabled):not(.disabled) {
    border-color: #0b365b;
    background: linear-gradient(180deg, #2288d8 0%, #125a97 100%);
}

.btn-outline-primary {
    color: #0f4c81;
    border-color: #8fb5da;
    background: linear-gradient(180deg, #eff7ff 0%, #e2effd 100%);
}

.btn-outline-primary:hover:not(:disabled):not(.disabled) {
    color: #0b3f6a;
    border-color: #6f9fce;
    background: linear-gradient(180deg, #e3f1ff 0%, #d3e6fb 100%);
}

.btn-secondary {
    color: #fff;
    border-color: #4c5a72;
    background: linear-gradient(180deg, #667790 0%, #556479 100%);
}

.btn-secondary:hover:not(:disabled):not(.disabled) {
    border-color: #404e65;
    background: linear-gradient(180deg, #7386a1 0%, #5f718a 100%);
}

.btn-outline-secondary {
    color: #4a5a73;
    border-color: #c3cfe0;
    background: linear-gradient(180deg, #f7f9fc 0%, #eef3f9 100%);
}

.btn-outline-secondary:hover:not(:disabled):not(.disabled) {
    color: #334155;
    border-color: #aebdd4;
    background: linear-gradient(180deg, #edf2f9 0%, #e3ebf5 100%);
}

.btn-success {
    color: #fff;
    border-color: #177656;
    background: linear-gradient(180deg, #24a976 0%, #1f8f6a 100%);
}

.btn-success:hover:not(:disabled):not(.disabled) {
    border-color: #146749;
    background: linear-gradient(180deg, #2abf86 0%, #229c73 100%);
}

.btn-outline-success {
    color: #176a4f;
    border-color: #9cd3bf;
    background: linear-gradient(180deg, #eefaf5 0%, #e3f5ec 100%);
}

.btn-outline-success:hover:not(:disabled):not(.disabled) {
    color: #12563f;
    border-color: #7fc3ab;
    background: linear-gradient(180deg, #e2f6ed 0%, #d5efdf 100%);
}

.btn-danger {
    color: #fff;
    border-color: #a2382d;
    background: linear-gradient(180deg, #d95f4f 0%, #c44536 100%);
}

.btn-danger:hover:not(:disabled):not(.disabled) {
    border-color: #902f25;
    background: linear-gradient(180deg, #e56f60 0%, #cc4f40 100%);
}

.btn-outline-danger {
    color: #a7362a;
    border-color: #e3aaa2;
    background: linear-gradient(180deg, #fff4f3 0%, #ffebea 100%);
}

.btn-outline-danger:hover:not(:disabled):not(.disabled) {
    color: #8f2c22;
    border-color: #d58f86;
    background: linear-gradient(180deg, #ffe8e6 0%, #ffdedd 100%);
}

.btn-warning {
    color: #5b3f00;
    border-color: #d39a2a;
    background: linear-gradient(180deg, #f6cb6b 0%, #e8b145 100%);
}

.btn-warning:hover:not(:disabled):not(.disabled) {
    border-color: #bd8520;
    background: linear-gradient(180deg, #f8d582 0%, #efbe5d 100%);
}

.btn-outline-warning {
    color: #915c00;
    border-color: #efcf8c;
    background: linear-gradient(180deg, #fff9eb 0%, #fff2d9 100%);
}

.btn-outline-warning:hover:not(:disabled):not(.disabled) {
    color: #7b4d00;
    border-color: #e1b967;
    background: linear-gradient(180deg, #fff3df 0%, #ffeecf 100%);
}

.btn-info {
    color: #fff;
    border-color: #17758b;
    background: linear-gradient(180deg, #36aac7 0%, #248aa2 100%);
}

.btn-info:hover:not(:disabled):not(.disabled) {
    border-color: #146477;
    background: linear-gradient(180deg, #43b9d6 0%, #2a98b1 100%);
}

.btn-outline-info {
    color: #116a80;
    border-color: #94cbd9;
    background: linear-gradient(180deg, #ebf8fb 0%, #e0f3f8 100%);
}

.btn-outline-info:hover:not(:disabled):not(.disabled) {
    color: #0f5769;
    border-color: #73b7c8;
    background: linear-gradient(180deg, #dff2f7 0%, #d2ebf2 100%);
}

.btn-dark {
    color: #fff;
    border-color: #1a2539;
    background: linear-gradient(180deg, #34405d 0%, #232d44 100%);
}

.btn-dark:hover:not(:disabled):not(.disabled) {
    border-color: #141d2d;
    background: linear-gradient(180deg, #3f4d6f 0%, #2b3650 100%);
}

.btn-outline-dark {
    color: #263248;
    border-color: #9aa8be;
    background: linear-gradient(180deg, #f2f5fa 0%, #e9eef6 100%);
}

.btn-outline-dark:hover:not(:disabled):not(.disabled) {
    color: #1d2738;
    border-color: #7f90aa;
    background: linear-gradient(180deg, #e8edf5 0%, #dde6f1 100%);
}

.login-form__footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    margin-top: 0.5rem;
}

.login-helper {
    margin: 0.2rem 0 0;
    color: #5d7891;
    font-size: 0.84rem;
    text-align: center;
    line-height: 1;
}

.product-image-upload {
    display: grid;
    grid-template-columns: minmax(160px, 220px) minmax(0, 1fr);
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-md);
    background: linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(255, 255, 255, 0.96));
}

.product-image-upload__preview {
    display: grid;
    place-items: center;
    min-height: 180px;
    overflow: hidden;
    border-radius: var(--erp-radius-md);
    border: 1px dashed rgba(15, 76, 129, 0.24);
    background: var(--erp-surface-muted);
}

.product-image-upload__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-image-upload__placeholder {
    padding: 1rem;
    color: var(--erp-text-soft);
    text-align: center;
}

.product-image-upload__actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.product-image-upload__meta {
    margin-top: 0;
}

.product-units-layout {
    display: grid;
    grid-template-columns: minmax(320px, 0.95fr) minmax(0, 1.25fr);
    grid-template-areas: "forms table";
    gap: 1rem;
    margin-top: 1rem;
    align-items: start;
}

.product-units-layout__table,
.product-units-layout__forms {
    min-width: 0;
}

.product-units-layout__forms {
    grid-area: forms;
}

.product-units-layout__table {
    grid-area: table;
}

.product-units-layout__table .product-editor-table-scroll {
    margin-top: 0;
    max-height: clamp(260px, 42vh, 520px);
}

.product-units-layout__forms .erp-form {
    margin-top: 0;
}

.product-unit-edit {
    padding: 1rem;
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: var(--erp-radius-md);
    background: linear-gradient(180deg, rgba(246, 250, 255, 0.92), rgba(255, 255, 255, 0.98));
}

.product-unit-edit h2 {
    margin: 0;
    font-size: 1.1rem;
}

.product-unit-edit .section-lead {
    margin-top: 0.45rem;
    font-size: 0.9rem;
    line-height: 1.6;
}

.product-units-layout__forms .product-unit-create {
    margin-top: 1rem;
}

.product-unit-create {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(15, 76, 129, 0.16);
    border-radius: var(--erp-radius-md);
    background: linear-gradient(180deg, rgba(216, 232, 247, 0.3), rgba(255, 255, 255, 0.96));
}

.product-unit-create h2 {
    margin: 0;
    font-size: 1.2rem;
}

.product-unit-create__form {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
}

.product-editor-page {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
    align-items: stretch;
}

.product-editor-page> * {
    width: 100%;
    min-width: 0;
}

.product-editor-page> :first-child .erp-form-grid__full {
    grid-column: 1 / -1;
}

.product-editor-workspace {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    height: 100%;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.18s ease;
}

.product-editor-overview {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.product-editor-overview__item {
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: 14px;
    padding: 0.55rem 0.7rem;
    background: linear-gradient(180deg, rgba(248, 252, 255, 0.96), rgba(240, 247, 255, 0.94));
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.product-editor-overview__item span {
    color: var(--erp-text-soft);
    font-size: 0.8rem;
}

.product-editor-overview__item strong {
    color: #0f4c81;
    font-size: 0.95rem;
    line-height: 1.35;
}

.product-editor-quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.product-editor-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.product-editor-tab {
    border: 1px solid #c2d6ed;
    border-radius: 999px;
    background: linear-gradient(180deg, #f4f9ff 0%, #ebf3ff 100%);
    color: #2f4d73;
    padding: 0.5rem 0.95rem;
    font-weight: 700;
    font-size: 0.88rem;
    transition: all 0.16s ease;
}

.product-editor-tab:hover {
    border-color: #9ebfe3;
    background: linear-gradient(180deg, #eaf4ff 0%, #dfedff 100%);
}

.product-editor-tab.is-active {
    color: #fff;
    border-color: #0d4f85;
    background: linear-gradient(180deg, #1a7bc8 0%, #0f4c81 100%);
    box-shadow: 0 10px 20px rgba(15, 76, 129, 0.25);
}

.product-editor-table-scroll {
    margin-top: 1rem;
    overflow-x: auto;
    overflow-y: auto;
}

.product-editor-table-scroll .table-card__table {
    min-width: 720px;
    table-layout: auto;
}

.sales-fullscreen-shell {
    height: 100vh;
    min-height: 100vh;
    max-height: 100vh;
    box-sizing: border-box;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: hidden;
    direction: rtl;
}

.sales-fullscreen-shell .content-card,
.sales-fullscreen-shell .table-card,
.sales-fullscreen-shell .migration-card {
    width: 100%;
    max-width: none;
}

.sales-fullscreen-shell>* {
    min-height: 0;
}

.sales-toast-alert {
    position: fixed;
    top: 1rem;
    inset-inline-end: 1rem;
    z-index: 2050;
    width: min(24rem, calc(100vw - 2rem));
    box-shadow: 0 14px 30px rgba(13, 24, 45, 0.22);
    animation: sales-toast-alert-in 0.2s ease;
}

@keyframes sales-toast-alert-in {
    from {
        opacity: 0;
        transform: translateY(-12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

body.sales-pos-active {
    overflow: hidden;
}

.sales-pos-header {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 1rem;
}

.sales-pos-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 228, 242, 0.92);
    box-shadow: var(--erp-shadow);
}

.sales-pos-topbar__title h1 {
    margin: 0.15rem 0 0;
    font-size: 1.6rem;
    color: #1965a7;
}

.sales-pos-topbar__actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sales-search-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
}

.sales-search-strip__tabs,
.sales-search-strip__search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sales-search-strip__search {
    flex: 1;
}

.sales-search-strip__search .form-control {
    min-height: 2.5rem;
    border-radius: 18px;
}

.sales-search-strip__search .btn {
    padding: 0.5rem 0.85rem;
    white-space: nowrap;
}

.sales-toggle-chip,
.sales-category-chip {
    border: 1px solid transparent;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--erp-primary);
    padding: 0.6rem 0.85rem;
    font-weight: 700;
    box-shadow: 0 8px 20px rgba(17, 42, 79, 0.06);
}

.sales-toggle-chip.is-active,
.sales-category-chip.is-active {
    background: var(--erp-primary-soft);
}

.sales-stage {
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

.sales-stage__catalog {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 230px;
    gap: 0.75rem;
    height: 100%;
    min-height: 0;
}

.sales-stage__main,
.sales-stage__categories,
.sales-summary-card,
.sales-quick-grid,
.sales-checkout-panel,
.sales-invoice-panel,
.sales-session-required {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(220, 228, 242, 0.92);
    border-radius: 28px;
    box-shadow: var(--erp-shadow);
}

.sales-stage__main,
.sales-stage__categories,
.sales-summary-card,
.sales-quick-grid,
.sales-checkout-panel {
    padding: 1rem;
}

.sales-stage__categories {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
}

.sales-stage__main {
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    align-content: start;
}

.sales-empty-state {
    display: grid;
    place-items: center;
    min-height: 280px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(246, 249, 255, 0.95), rgba(255, 255, 255, 0.98));
    color: var(--erp-text-soft);
    text-align: center;
}

.sales-product-grid--pos {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.6rem;
    min-height: min-content;
    align-content: start;
}

.sales-product-card--pos {
    position: relative;
    min-height: 118px;
    border-radius: 16px;
    padding: 0.6rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.35rem;
    text-align: right;
}

.sales-product-card__badges {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    width: 100%;
    min-width: 0;
}

.sales-product-card__price,
.sales-product-card__stock {
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 800;
    line-height: 1.25;
    white-space: nowrap;
}

.sales-product-card__price {
    flex: 0 0 auto;
    background: rgba(25, 101, 167, 0.12);
    color: #1965a7;
    font-size: 0.86rem;
}

.sales-product-card__stock {
    flex: 1 1 auto;
    min-width: 0;
    background: rgba(31, 143, 106, 0.12);
    color: #1f7a5d;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sales-product-card__image {
    width: 100%;
    height: 64px;
    border-radius: 12px;
    object-fit: cover;
    background: #eef3ff;
}

.sales-product-card--pos strong {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-top: 0.1rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sales-product-card__meta {
    color: var(--erp-text-soft);
    font-size: 0.78rem;
}

.sales-product-card__image--placeholder {
    display: grid;
    place-items: center;
    color: var(--erp-text-soft);
    font-size: 0.85rem;
}

.sales-invoice-panel {
    padding: 0.75rem;
    min-height: 0;
    overflow: hidden;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.sales-invoice-panel__table-scroll {
    min-height: 0;
    overflow: auto;
    border-radius: 18px;
}

.sales-invoice-panel .table-card__table {
    table-layout: fixed;
    min-width: 100%;
}

.sales-invoice-panel .table-card__table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.sales-invoice-panel .table-card__table th,
.sales-invoice-panel .table-card__table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sales-invoice-panel__row {
    cursor: pointer;
}

.sales-invoice-panel__row.is-selected {
    background: rgba(216, 232, 247, 0.42);
}

.sales-quantity-input,
.sales-price-input,
.sales-discount-input {
    width: 7rem;
    min-height: 2.35rem !important;
    padding-inline: 0.55rem !important;
}

.sales-unit-picker {
    position: sticky;
    bottom: 0.75rem;
    z-index: 8;
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid rgba(15, 76, 129, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
}

.sales-unit-picker__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.sales-unit-picker__options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.55rem;
}

.sales-unit-picker__option {
    display: grid;
    gap: 0.2rem;
    min-height: 76px;
    padding: 0.65rem;
    border: 1px solid var(--erp-border);
    border-radius: 14px;
    background: #fff;
    color: var(--erp-text);
    text-align: right;
}

.sales-unit-picker__option:hover:enabled,
.sales-unit-picker__option.is-base {
    border-color: rgba(15, 76, 129, 0.35);
    background: rgba(216, 232, 247, 0.28);
}

.sales-unit-picker__option:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sales-unit-picker__option strong {
    color: #1965a7;
}

.sales-unit-picker__option small {
    color: var(--erp-text-soft);
}

.sales-control-deck {
    display: grid;
    grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.2fr) minmax(240px, 1fr);
    gap: 0.6rem;
    align-items: stretch;
    flex-shrink: 0;
}

.sales-summary-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.sales-summary-card__label {
    font-size: 1.25rem;
    font-weight: 800;
    color: #1965a7;
}

.sales-summary-card__value {
    margin-top: 0.4rem;
    font-size: 2rem;
    font-weight: 900;
    color: #1965a7;
}

.sales-summary-card__discount {
    display: grid;
    grid-template-columns: auto minmax(80px, 130px);
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.45rem;
}

.sales-summary-card__discount label {
    color: var(--erp-text-soft);
    font-size: 0.8rem;
    font-weight: 800;
    white-space: nowrap;
}

.sales-summary-card__discount .form-control {
    min-height: 2rem;
    height: 2rem;
    padding: 0.2rem 0.55rem;
    text-align: center;
    font-size: 0.85rem;
}

.sales-customer-debt-summary {
    display: grid;
    gap: 0.35rem;
    margin-top: 0.55rem;
    padding: 0.55rem;
    border: 1px solid rgba(25, 101, 167, 0.22);
    border-radius: 0.45rem;
    background: rgba(25, 101, 167, 0.06);
    text-align: right;
}

.sales-customer-debt-summary div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.6rem;
    min-width: 0;
}

.sales-customer-debt-summary span {
    color: var(--erp-text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.sales-customer-debt-summary strong {
    color: #1965a7;
    font-size: 0.9rem;
    font-weight: 900;
    white-space: nowrap;
}

.sales-customer-debt-summary__final {
    padding-top: 0.35rem;
    border-top: 1px solid rgba(25, 101, 167, 0.2);
}

.sales-summary-card__meta {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--erp-border);
    color: var(--erp-text-soft);
    font-size: 0.85rem;
}

.sales-quick-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.sales-quick-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.45rem;
    min-height: 72px;
    padding: 0.55rem;
    border: 1px solid rgba(25, 101, 167, 0.35);
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(244, 249, 255, 0.96), rgba(255, 255, 255, 0.98));
    color: var(--erp-primary);
    text-align: center;
}

.sales-quick-tile strong {
    font-size: 0.92rem;
    line-height: 1.25;
}

.sales-quick-tile span {
    font-size: 0.74rem;
    line-height: 1.3;
}

.sales-quick-tile .form-control {
    min-height: 2rem;
    font-size: 0.85rem;
    padding: 0.3rem 0.55rem;
}

.sales-quick-tile .btn {
    padding: 0.32rem 0.5rem;
    font-size: 0.78rem;
}

.sales-quick-tile--button {
    align-items: center;
}

.sales-quick-tile--success {
    background: linear-gradient(180deg, rgba(232, 248, 241, 0.96), rgba(255, 255, 255, 0.98));
    border-color: rgba(31, 143, 106, 0.35);
    color: var(--erp-success);
}

.sales-quick-tile--danger {
    background: linear-gradient(180deg, rgba(255, 241, 241, 0.96), rgba(255, 255, 255, 0.98));
    border-color: rgba(196, 69, 54, 0.3);
    color: var(--erp-danger);
}

.sales-checkout-panel {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.6rem;
    padding: 1.75rem;
}

.sales-checkout-panel__compact-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
    align-items: end;
}

.sales-delivery-panel {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem;
    padding: 0.75rem;
    border: 1px solid rgba(20, 184, 166, 0.22);
    border-radius: 12px;
    background: rgba(20, 184, 166, 0.08);
}

.sales-delivery-panel__wide {
    grid-column: 1 / -1;
}

.sales-delivery-dialog {
    max-width: 680px;
}

.sales-delivery-dialog__form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.sales-delivery-dialog__wide {
    grid-column: 1 / -1;
}

.sales-delivery-dialog__readonly {
    display: flex;
    align-items: center;
    font-weight: 800;
}

.sales-checkout-panel .form-control,
.sales-checkout-panel .form-select {
    min-height: 2.25rem;
}

.sales-checkout-panel__note {
    grid-column: 1 / -1;
}

.sales-footer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    flex-shrink: 0;
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 0.45rem;
    border-radius: 16px;
    background: rgba(245, 247, 251, 0.95);
    backdrop-filter: blur(3px);
}

.sales-footer-actions .btn {
    padding: 0.35rem 0.65rem;
    font-size: 0.82rem;
}

.reports-tabs,
.reports-tabs-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.65rem;
    align-items: stretch;
    margin-bottom: 0.5rem;
}

.reports-tabs-toolbar {
    padding: 0;
    border: 0;
    background: transparent;
}

.erp-shell__content>.reports-tabs-toolbar,
.erp-shell__content>.reports-filter-card {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

.erp-shell__content>.dashboard-grid.purchases-summary-grid {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    margin-top: 0.1rem;
}

.reports-tabs-toolbar {
    grid-template-columns: repeat(auto-fit, minmax(9.75rem, 1fr));
    gap: 0.65rem;
    margin-bottom: 0;
    padding: 0.7rem;
    border: 1px solid rgba(51, 72, 63, 0.85);
    border-radius: 22px;
    background: #14201b;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
}

.reports-filter-card {
    display: grid;
    gap: 1rem;
    padding: 1.25rem 1.35rem;
}

.reports-filter-card h1 {
    margin: 0;
    font-size: clamp(1.75rem, 2.25vw, 2.45rem);
    line-height: 1.25;
    color: #fff7e8;
    text-align: right;
}

.reports-filter-card .erp-form-grid {
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 0.85rem 1rem;
    align-items: end;
}

.reports-filter-card .form-label {
    margin-bottom: 0.35rem;
    color: #d9eee7;
    font-weight: 800;
}

.reports-filter-card .erp-form-actions {
    margin-top: 0;
    justify-content: flex-start;
}

.reports-filter-card .erp-form-actions .btn {
    min-width: 7rem;
}

.erp-shell__content>.reports-full-width {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
}

.reports-full-width {
    overflow-x: auto;
}

.reports-full-width > h1 {
    margin: 0 0 1rem;
    color: #fff7e8;
    font-size: clamp(1.45rem, 1.8vw, 2rem);
}

@media (max-width: 760px) {
    .sales-checkout-panel__compact-row,
    .sales-delivery-panel,
    .sales-delivery-dialog__form {
        grid-template-columns: 1fr;
    }

    .reports-tabs-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .reports-filter-card .erp-form-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

/* Online store admin */
.online-store-admin-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.online-store-admin-overview article {
    display: grid;
    gap: 0.25rem;
    min-height: 5.4rem;
    padding: 0.9rem 1rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: rgba(85, 194, 169, 0.06);
}

.online-store-admin-overview span {
    color: var(--erp-text-soft);
    font-size: 0.82rem;
    font-weight: 800;
}

.online-store-admin-overview strong {
    color: var(--erp-primary);
    font-size: 1.45rem;
    font-weight: 900;
}

.online-store-admin-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding: 0.4rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.12);
}

.online-store-admin-tab {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 2.75rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: var(--erp-text-soft);
    font-weight: 900;
}

.online-store-admin-tab.is-active {
    border-color: rgba(85, 194, 169, 0.45);
    background: rgba(85, 194, 169, 0.14);
    color: var(--erp-text);
}

.online-store-admin-panel {
    display: grid;
    gap: 1rem;
}

.online-store-admin-panel h2,
.online-store-admin-panel p {
    margin: 0;
}

/* Public customer storefront */
.shop-shell {
    min-height: 100dvh;
    padding: 0;
    background:
        linear-gradient(180deg, #fbfaf7 0%, #f4f6f4 45%, #ffffff 100%);
    color: #17201d;
    direction: rtl;
    font-family: "Zain", "Aptos", "Segoe UI", Tahoma, sans-serif;
}

.shop-shell .btn {
    border-radius: 999px;
    font-weight: 900;
}

.shop-shell .btn-primary {
    border-color: var(--shop-primary, #168a73);
    background: var(--shop-primary, #168a73);
    color: #ffffff;
}

.shop-shell .btn-outline-primary {
    border-color: rgba(22, 138, 115, 0.35);
    color: var(--shop-primary, #168a73);
    background: #ffffff;
}

.shop-shell .btn-outline-secondary {
    border-color: #d7ddd9;
    color: #25302c;
    background: #ffffff;
}

.shop-shell .form-control {
    min-height: 3rem;
    border: 1px solid #dbe2de;
    border-radius: 999px;
    background-color: #ffffff;
    color: #17201d;
    box-shadow: none;
}

.shop-shell textarea.form-control {
    border-radius: 18px;
}

.shop-shell .form-label {
    color: #52615b;
    font-weight: 900;
}

.shop-login-card {
    width: min(100%, 34rem);
    margin: 10dvh auto;
    padding: 2rem;
    border: 1px solid #e3e7e4;
    border-radius: 8px;
    background: #ffffff;
    color: #17201d;
    box-shadow: 0 24px 80px rgba(24, 36, 31, 0.08);
}

.shop-login-card h1,
.shop-login-card p {
    margin: 0;
}

.shop-login-card h1 {
    font-size: 1.65rem;
    color: #17201d;
}

.shop-login-card p {
    margin-top: 0.4rem;
    color: #66746f;
}

.shop-header.shop-storefront-header {
    position: sticky;
    top: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 0;
    padding: 0.9rem clamp(1rem, 4vw, 3rem);
    border: 0;
    border-bottom: 1px solid rgba(23, 32, 29, 0.08);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    color: #17201d;
    box-shadow: 0 10px 30px rgba(24, 36, 31, 0.05);
    backdrop-filter: blur(14px);
}

.shop-brand {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.shop-brand img {
    flex: 0 0 auto;
    width: 3.8rem;
    height: 3.8rem;
    object-fit: contain;
    border: 1px solid #e3e7e4;
    border-radius: 8px;
    background: #ffffff;
    padding: 0.25rem;
}

.shop-brand h1,
.shop-brand p {
    margin: 0;
}

.shop-brand h1 {
    color: #17201d;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.1;
}

.shop-brand span {
    display: block;
    color: var(--shop-primary, #168a73);
    font-size: 0.78rem;
    font-weight: 900;
}

.shop-brand p {
    max-width: 36rem;
    color: #64736d;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.shop-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.shop-header-actions strong {
    color: #17201d;
}

.shop-notice,
.shop-login-inline,
.shop-tabs,
.shop-layout,
.shop-tab-panel {
    width: min(1180px, calc(100% - 2rem));
    margin-inline: auto;
}

.shop-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 0;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(203, 137, 35, 0.28);
    border-radius: 8px;
    background: #fff8ea;
    color: #68480f;
}

.shop-notice strong {
    color: #352304;
}

.shop-notice--danger {
    border-color: rgba(201, 61, 61, 0.24);
    background: #fff0f0;
    color: #8d2e2e;
}

.shop-login-inline {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
    padding: 1.1rem;
    border: 1px solid #e3e7e4;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(24, 36, 31, 0.07);
}

.shop-login-inline h2,
.shop-login-inline p {
    margin: 0;
}

.shop-login-inline h2 {
    font-size: 1.15rem;
}

.shop-login-inline p {
    color: #66746f;
}

.shop-tabs {
    position: sticky;
    top: 5.55rem;
    z-index: 100;
    display: flex;
    gap: 0.45rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    padding: 0.45rem;
    border: 1px solid rgba(23, 32, 29, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 36px rgba(24, 36, 31, 0.06);
    backdrop-filter: blur(12px);
}

.shop-tab {
    flex: 0 0 auto;
    min-width: max-content;
    min-height: 2.55rem;
    padding: 0.45rem 0.95rem;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #52615b;
    font-weight: 900;
}

.shop-tab.is-active {
    background: #17201d;
    color: #ffffff;
}

.shop-tab:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.shop-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 24rem);
    gap: 1.1rem;
    align-items: start;
    padding-bottom: 2rem;
}

.shop-catalog,
.shop-cart,
.shop-tab-panel {
    border: 1px solid #e4e9e5;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 80px rgba(24, 36, 31, 0.06);
}

.shop-catalog {
    padding: clamp(1rem, 2vw, 1.35rem);
}

.shop-cart {
    position: sticky;
    top: 10rem;
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
}

.shop-cart h2 {
    margin: 0;
    color: #17201d;
    font-size: 1.2rem;
    font-weight: 900;
}

.shop-cart p {
    margin: 0;
    color: #66746f;
}

.shop-banner-strip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(20rem, 34rem);
    gap: 0.85rem;
    margin-bottom: 1rem;
    overflow-x: auto;
}

.shop-banner {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 16rem;
    overflow: hidden;
    padding: 1.4rem;
    border: 0;
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(23, 32, 29, 0.82), rgba(23, 32, 29, 0.22)),
        linear-gradient(135deg, var(--shop-primary, #168a73), #24332e);
}

.shop-banner img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.74;
}

.shop-banner span {
    position: relative;
    display: grid;
    gap: 0.25rem;
    width: min(100%, 24rem);
    color: #ffffff;
}

.shop-banner strong {
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    line-height: 1.08;
    font-weight: 900;
}

.shop-banner small {
    color: rgba(255, 255, 255, 0.82);
    font-size: 1rem;
    font-weight: 700;
}

.shop-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 14rem) minmax(10rem, 14rem);
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.shop-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin: 1.2rem 0 0.75rem;
}

.shop-section-heading h2 {
    margin: 0;
    color: #17201d;
    font-size: 1.35rem;
    font-weight: 900;
}

.shop-section-heading button {
    border: 0;
    background: transparent;
    color: var(--shop-primary, #168a73);
    font-weight: 900;
}

.shop-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(14.5rem, 1fr));
    gap: 0.85rem;
}

.shop-product-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e4e9e5;
    border-radius: 8px;
    background: #ffffff;
    color: #17201d;
    box-shadow: 0 10px 28px rgba(24, 36, 31, 0.05);
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.shop-product-card:hover {
    transform: translateY(-2px);
    border-color: rgba(22, 138, 115, 0.28);
    box-shadow: 0 18px 45px rgba(24, 36, 31, 0.09);
}

.shop-favorite-button {
    position: absolute;
    top: 0.7rem;
    inset-inline-end: 0.7rem;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 2.35rem;
    height: 2.35rem;
    border: 1px solid rgba(23, 32, 29, 0.08);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #798781;
    box-shadow: 0 10px 20px rgba(24, 36, 31, 0.1);
}

.shop-favorite-button.is-active {
    color: #d94066;
    border-color: rgba(217, 64, 102, 0.28);
    background: #fff2f5;
}

.shop-product-card__image {
    display: grid;
    place-items: center;
    aspect-ratio: 1 / 1;
    background: #f3f6f4;
    color: #8b9691;
}

.shop-product-card__image-button {
    width: 100%;
    border: 0;
    padding: 0;
    cursor: zoom-in;
    overflow: hidden;
}

.shop-product-card__image-button:disabled {
    cursor: default;
}

.shop-product-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.18s ease;
}

.shop-product-card__image-button:not(:disabled):hover img {
    transform: scale(1.035);
}

.shop-product-card__body {
    display: grid;
    gap: 0.55rem;
    padding: 0.9rem;
}

.shop-product-card__body small {
    color: var(--shop-primary, #168a73);
    font-weight: 900;
}

.shop-product-card__body h2 {
    margin: 0;
    color: #17201d;
    font-size: 1.08rem;
    font-weight: 900;
    line-height: 1.25;
}

.shop-product-card__body p {
    display: -webkit-box;
    min-height: 2.7rem;
    margin: 0;
    overflow: hidden;
    color: #66746f;
    line-height: 1.45;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.shop-product-card__unit,
.shop-product-card__stock {
    width: max-content;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border: 1px solid #e4e9e5;
    border-radius: 999px;
    background: #f7f9f7;
    color: #52615b;
    font-size: 0.8rem;
    font-weight: 800;
}

.shop-product-card__unit span {
    color: #798781;
}

.shop-product-card__unit strong {
    color: #17201d;
}

.shop-product-card__stock {
    border-color: rgba(203, 137, 35, 0.18);
    background: #fff8ea;
    color: #8a5c0d;
}

.shop-product-card__thumbs {
    display: flex;
    gap: 0.35rem;
}

.shop-product-card__thumbs button {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.shop-product-card__thumbs img {
    width: 2.35rem;
    height: 2.35rem;
    object-fit: cover;
    border: 1px solid #e3e7e4;
    border-radius: 8px;
}

.shop-product-card__meta,
.shop-cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.shop-product-card__meta strong,
.shop-cart-total strong {
    color: #17201d;
    font-size: 1.15rem;
    font-weight: 900;
}

.shop-product-card__meta del {
    color: #b14b4b;
    font-weight: 800;
}

.shop-product-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
}

.shop-product-card__actions .btn {
    min-height: 2.65rem;
}

.shop-product-card__actions .btn-outline-secondary {
    display: none;
}

.shop-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5.3rem auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.65rem;
    border: 1px solid #e4e9e5;
    border-radius: 8px;
    background: #fbfcfb;
}

.shop-cart-line strong,
.shop-cart-line small {
    display: block;
}

.shop-cart-line strong {
    color: #17201d;
}

.shop-cart-line small {
    color: #66746f;
}

.shop-coupon-box {
    display: grid;
    gap: 0.4rem;
}

.shop-coupon-box > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.4rem;
}

.shop-cart-total {
    color: #52615b;
    font-weight: 900;
}

.shop-cart-total--discount strong {
    color: #b36807;
}

.shop-cart-total--final {
    padding-top: 0.7rem;
    border-top: 1px solid #e4e9e5;
    color: #17201d;
}

.shop-cart-total--final strong {
    color: var(--shop-primary, #168a73);
}

.shop-tab-panel {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
    padding: 1rem;
}

.shop-tab-panel h2,
.shop-tab-panel p {
    margin: 0;
}

.shop-tab-panel h2 {
    color: #17201d;
    font-size: 1.35rem;
    font-weight: 900;
}

.shop-tab-panel p {
    color: #66746f;
}

.shop-tab-panel--cart {
    display: none;
}

.shop-account__summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.shop-account-tile,
.shop-ledger-card,
.shop-ledger-line,
.shop-ledger-totals div,
.shop-receipt-purpose {
    border: 1px solid #e4e9e5;
    border-radius: 8px;
    background: #fbfcfb;
}

.shop-account-tile {
    display: grid;
    gap: 0.25rem;
    min-height: 7rem;
    padding: 0.9rem;
}

.shop-account-tile span,
.shop-account-tile small {
    color: #66746f;
}

.shop-account-tile strong {
    color: var(--shop-primary, #168a73);
    font-size: 1.15rem;
    font-weight: 900;
}

.shop-account-row,
.shop-ledger-card__head,
.shop-ledger-line,
.shop-receipt-purpose {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
}

.shop-account-row {
    padding: 0.75rem;
    border: 1px solid #e4e9e5;
    border-radius: 8px;
    background: #fbfcfb;
}

.shop-account-row strong,
.shop-account-row small,
.shop-ledger-card__head strong,
.shop-ledger-card__head small,
.shop-ledger-line strong,
.shop-ledger-line small {
    display: block;
}

.shop-account-row small,
.shop-ledger-card__head small,
.shop-ledger-line small,
.shop-receipt-purpose span {
    color: #66746f;
}

.shop-account-row span,
.shop-ledger-card__head > span,
.shop-ledger-line > span {
    direction: ltr;
    color: var(--shop-primary, #168a73);
    font-weight: 900;
    white-space: nowrap;
}

.shop-ledger-card {
    display: grid;
    gap: 0.85rem;
    padding: 0.85rem;
}

.shop-ledger-badge {
    display: inline-flex;
    align-items: center;
    min-height: 2rem;
    padding: 0.25rem 0.65rem;
    border-radius: 999px;
    background: rgba(22, 138, 115, 0.1);
    color: var(--shop-primary, #168a73) !important;
    font-size: 0.85rem;
}

.shop-ledger-totals {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
}

.shop-ledger-totals div,
.shop-ledger-line,
.shop-receipt-purpose {
    padding: 0.65rem;
}

.shop-ledger-section {
    display: grid;
    gap: 0.5rem;
}

.shop-ledger-section h3 {
    margin: 0;
    font-size: 1rem;
}

.shop-empty {
    display: grid;
    place-items: center;
    min-height: 18rem;
    border: 1px dashed #ccd5d0;
    border-radius: 8px;
    background: #fbfcfb;
    color: #66746f;
}

.shop-image-modal {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(12, 16, 15, 0.78);
    backdrop-filter: blur(4px);
}

.shop-image-modal__panel {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 0.75rem;
    width: min(96vw, 60rem);
    max-height: 92vh;
    padding: 1rem;
    border-radius: 8px;
    background: #ffffff;
}

.shop-image-modal__panel img {
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
}

.shop-image-modal__close {
    position: absolute;
    top: 0.75rem;
    inset-inline-end: 0.75rem;
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid #d7ddd9;
    border-radius: 999px;
    background: #ffffff;
    color: #17201d;
    font-size: 1.5rem;
    line-height: 1;
}

@media (max-width: 980px) {
    .online-store-admin-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shop-header.shop-storefront-header {
        align-items: stretch;
        flex-direction: column;
        padding: 0.85rem 1rem;
    }

    .shop-header-actions {
        justify-content: flex-start;
    }

    .shop-brand p {
        white-space: normal;
    }

    .shop-tabs {
        top: 8.8rem;
        width: 100%;
        border-inline: 0;
        border-radius: 0;
        margin-top: 0;
    }

    .shop-layout {
        grid-template-columns: 1fr;
    }

    .shop-cart {
        display: none;
    }

    .shop-tab--cart,
    .shop-tab-panel--cart {
        display: grid;
    }

    .shop-product-card__actions .btn-outline-secondary {
        display: block;
    }

    .shop-toolbar {
        grid-template-columns: 1fr;
    }

    .shop-account__summary,
    .shop-ledger-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .online-store-admin-overview,
    .shop-account__summary,
    .shop-ledger-totals,
    .shop-product-grid {
        grid-template-columns: 1fr;
    }

    .shop-brand {
        align-items: flex-start;
    }

    .shop-brand img {
        width: 3.2rem;
        height: 3.2rem;
    }

    .shop-banner-strip {
        grid-auto-columns: minmax(16rem, 88vw);
    }

    .shop-banner {
        min-height: 13rem;
    }

    .shop-cart-line,
    .shop-account-row,
    .shop-ledger-card__head,
    .shop-ledger-line,
    .shop-receipt-purpose {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.mobile-sales-shell,
.mobile-sales-sheet-backdrop {
    --mobile-sales-bg: #0f1412;
    --mobile-sales-panel: #171f1c;
    --mobile-sales-panel-soft: #202b26;
    --mobile-sales-border: #304139;
    --mobile-sales-text: #f2f7f4;
    --mobile-sales-muted: #a9b8b1;
    --mobile-sales-primary: #58c7ad;
    --mobile-sales-danger: #ee7777;
    --mobile-sales-success: #72d6a2;
}

.mobile-sales-shell {
    background: var(--mobile-sales-bg);
    box-sizing: border-box;
    color: var(--mobile-sales-text);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0.75rem 0.75rem 6.4rem;
}

.mobile-sales-shell .btn,
.mobile-sales-sheet .btn {
    border-radius: 7px;
    min-height: 2.6rem;
}

.mobile-sales-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mobile-sales-header div {
    min-width: 0;
}

.mobile-sales-header span,
.mobile-sales-product__meta,
.mobile-sales-product__footer small,
.mobile-sales-cart-line span,
.mobile-sales-checkout span,
.mobile-sales-sheet__header span,
.mobile-sales-state p {
    color: var(--mobile-sales-muted);
}

.mobile-sales-header strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.25;
}

.mobile-sales-icon-btn {
    align-items: center;
    background: var(--mobile-sales-panel-soft);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 7px;
    color: var(--mobile-sales-text);
    display: inline-flex;
    height: 2.45rem;
    justify-content: center;
    width: 2.45rem;
}

.mobile-sales-icon-btn--danger {
    color: var(--mobile-sales-danger);
}

.mobile-sales-alert {
    border-radius: 7px;
    flex: 0 0 auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.mobile-sales-alert--success {
    background: rgba(114, 214, 162, 0.14);
    border: 1px solid rgba(114, 214, 162, 0.34);
    color: var(--mobile-sales-success);
}

.mobile-sales-alert--danger {
    background: rgba(238, 119, 119, 0.14);
    border: 1px solid rgba(238, 119, 119, 0.34);
    color: var(--mobile-sales-danger);
}

.mobile-sales-search {
    background: var(--mobile-sales-panel);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 0.65rem;
    position: relative;
    z-index: 4;
}

.mobile-sales-search__line {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-sales-shell .form-control,
.mobile-sales-sheet .form-control,
.mobile-sales-sheet .form-select {
    background-color: #101714;
    border-color: var(--mobile-sales-border);
    border-radius: 7px;
    color: var(--mobile-sales-text);
    min-height: 2.55rem;
}

.mobile-sales-shell .form-control::placeholder {
    color: #7f9289;
}

.mobile-sales-categories {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
}

.mobile-sales-chip {
    background: var(--mobile-sales-panel-soft);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 999px;
    color: var(--mobile-sales-muted);
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-sales-chip.is-active {
    background: rgba(88, 199, 173, 0.18);
    border-color: rgba(88, 199, 173, 0.58);
    color: var(--mobile-sales-primary);
}

.mobile-sales-products {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-sales-product {
    background: var(--mobile-sales-panel);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 8px;
    color: var(--mobile-sales-text);
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    text-align: start;
}

.mobile-sales-product:disabled {
    opacity: 0.55;
}

.mobile-sales-product__name {
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-sales-product__footer {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-sales-product__footer strong {
    color: var(--mobile-sales-primary);
}

.mobile-sales-bottom-bar {
    align-items: center;
    background: rgba(15, 20, 18, 0.96);
    border-top: 1px solid var(--mobile-sales-border);
    bottom: 0;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) 6.8rem;
    inset-inline: 0;
    padding: 0.7rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom));
    position: fixed;
    z-index: 6;
}

.mobile-sales-cart-button {
    align-items: center;
    background: var(--mobile-sales-panel);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 8px;
    color: var(--mobile-sales-text);
    display: flex;
    justify-content: space-between;
    min-height: 3rem;
    min-width: 0;
    padding: 0.45rem 0.75rem;
}

.mobile-sales-cart-button span {
    color: var(--mobile-sales-muted);
}

.mobile-sales-save {
    min-height: 3rem !important;
}

.mobile-sales-state {
    align-items: flex-start;
    background: var(--mobile-sales-panel);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 28rem;
    padding: 1rem;
}

.mobile-sales-state h1 {
    font-size: 1.35rem;
    margin: 0;
}

.mobile-sales-empty {
    background: var(--mobile-sales-panel);
    border: 1px dashed var(--mobile-sales-border);
    border-radius: 8px;
    color: var(--mobile-sales-muted);
    padding: 1rem;
    text-align: center;
}

.mobile-sales-sheet-backdrop {
    background: var(--mobile-sales-bg);
    inset: 0;
    overflow: hidden;
    position: fixed;
    z-index: 20;
}

.mobile-sales-sheet {
    background: var(--mobile-sales-bg);
    bottom: 0;
    color: var(--mobile-sales-text);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto auto;
    left: 0;
    max-height: 100dvh;
    position: fixed;
    right: 0;
    top: 0;
}

.mobile-sales-sheet__header,
.mobile-sales-sheet__actions {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.mobile-sales-sheet__header {
    border-bottom: 1px solid var(--mobile-sales-border);
}

.mobile-sales-sheet__header h2 {
    font-size: 1.15rem;
    margin: 0;
}

.mobile-sales-cart-lines {
    display: grid;
    gap: 0.6rem;
    overflow-y: auto;
    padding: 0.75rem;
}

.mobile-sales-cart-line {
    background: var(--mobile-sales-panel);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 8px;
    display: grid;
    gap: 0.55rem;
    padding: 0.75rem;
}

.mobile-sales-cart-line__title {
    align-items: start;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-sales-cart-line__title strong {
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-sales-qty-row {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem;
}

.mobile-sales-stepper {
    background: var(--mobile-sales-panel-soft);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 7px;
    color: var(--mobile-sales-text);
    font-size: 1.25rem;
    min-height: 2.55rem;
}

.mobile-sales-line-edit {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mobile-sales-checkout {
    border-top: 1px solid var(--mobile-sales-border);
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    padding: 0.75rem;
}

.mobile-sales-checkout label,
.mobile-sales-line-edit label {
    display: grid;
    gap: 0.25rem;
}

.mobile-sales-checkout__wide,
.mobile-sales-delivery-toggle {
    grid-column: 1 / -1;
}

.mobile-sales-delivery-toggle {
    align-items: center;
    background: var(--mobile-sales-panel);
    border: 1px solid var(--mobile-sales-border);
    border-radius: 8px;
    display: flex !important;
    justify-content: space-between;
    min-height: 2.75rem;
    padding: 0.45rem 0.75rem;
}

.mobile-sales-delivery-toggle input {
    accent-color: var(--mobile-sales-primary);
    height: 1.15rem;
    width: 1.15rem;
}

.mobile-sales-sheet__actions {
    border-top: 1px solid var(--mobile-sales-border);
}

@media (min-width: 680px) {
    .mobile-sales-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-sales-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-sales-bottom-bar {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-sales-sheet {
        border-inline: 1px solid var(--mobile-sales-border);
        margin-inline: auto;
        max-width: 42rem;
    }
}

.mobile-debts-shell,
.mobile-debts-sheet-backdrop {
    --mobile-debts-bg: #101412;
    --mobile-debts-panel: #17201c;
    --mobile-debts-panel-soft: #202b26;
    --mobile-debts-border: #32443c;
    --mobile-debts-text: #f2f7f4;
    --mobile-debts-muted: #a9b8b1;
    --mobile-debts-primary: #58c7ad;
    --mobile-debts-danger: #ee7777;
    --mobile-debts-success: #72d6a2;
}

.mobile-debts-shell {
    background: var(--mobile-debts-bg);
    box-sizing: border-box;
    color: var(--mobile-debts-text);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0.75rem;
}

.mobile-debts-shell .btn,
.mobile-debts-sheet .btn {
    border-radius: 7px;
    min-height: 2.6rem;
}

.mobile-debts-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mobile-debts-header div {
    min-width: 0;
}

.mobile-debts-header span,
.mobile-debts-customer__meta,
.mobile-debts-customer__footer small,
.mobile-debts-sheet__header span,
.mobile-debts-info span,
.mobile-debts-summary span,
.mobile-debts-form span,
.mobile-debts-mini-list span,
.mobile-debts-state p {
    color: var(--mobile-debts-muted);
}

.mobile-debts-header strong {
    display: block;
    font-size: 1.2rem;
    line-height: 1.35;
}

.mobile-debts-icon-btn {
    align-items: center;
    background: var(--mobile-debts-panel-soft);
    border: 1px solid var(--mobile-debts-border);
    border-radius: 7px;
    color: var(--mobile-debts-text);
    display: inline-flex;
    height: 2.45rem;
    justify-content: center;
    width: 2.45rem;
}

.mobile-debts-alert {
    border-radius: 7px;
    flex: 0 0 auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.mobile-debts-alert--success {
    background: rgba(114, 214, 162, 0.14);
    border: 1px solid rgba(114, 214, 162, 0.34);
    color: var(--mobile-debts-success);
}

.mobile-debts-alert--danger {
    background: rgba(238, 119, 119, 0.14);
    border: 1px solid rgba(238, 119, 119, 0.34);
    color: var(--mobile-debts-danger);
}

.mobile-debts-search {
    background: var(--mobile-debts-panel);
    border: 1px solid var(--mobile-debts-border);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 0.65rem;
    z-index: 4;
}

.mobile-debts-shell .form-control,
.mobile-debts-sheet .form-control,
.mobile-debts-sheet .form-select {
    background-color: #101714;
    border-color: var(--mobile-debts-border);
    border-radius: 7px;
    color: var(--mobile-debts-text);
    min-height: 2.55rem;
}

.mobile-debts-shell .form-control::placeholder,
.mobile-debts-sheet .form-control::placeholder {
    color: #7f9289;
}

.mobile-debts-tabs {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.mobile-debts-chip {
    background: var(--mobile-debts-panel-soft);
    border: 1px solid var(--mobile-debts-border);
    border-radius: 999px;
    color: var(--mobile-debts-muted);
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-debts-chip.is-active {
    background: rgba(88, 199, 173, 0.18);
    border-color: rgba(88, 199, 173, 0.58);
    color: var(--mobile-debts-primary);
}

.mobile-debts-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-debts-customer {
    background: var(--mobile-debts-panel);
    border: 1px solid var(--mobile-debts-border);
    border-radius: 8px;
    color: var(--mobile-debts-text);
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    text-align: start;
}

.mobile-debts-customer__name {
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-debts-customer__footer {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-debts-customer__footer strong {
    color: var(--mobile-debts-muted);
}

.mobile-debts-customer__footer strong.is-open {
    color: var(--mobile-debts-primary);
}

.mobile-debts-empty,
.mobile-debts-state {
    background: var(--mobile-debts-panel);
    border: 1px dashed var(--mobile-debts-border);
    border-radius: 8px;
    color: var(--mobile-debts-muted);
    padding: 1rem;
    text-align: center;
}

.mobile-debts-state {
    align-items: flex-start;
    border-style: solid;
    display: grid;
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 28rem;
    text-align: start;
}

.mobile-debts-state h1 {
    color: var(--mobile-debts-text);
    font-size: 1.35rem;
    margin: 0;
}

.mobile-debts-sheet-backdrop {
    background: var(--mobile-debts-bg);
    inset: 0;
    overflow: hidden;
    position: fixed;
    z-index: 20;
}

.mobile-debts-sheet {
    background: var(--mobile-debts-bg);
    bottom: 0;
    color: var(--mobile-debts-text);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    left: 0;
    max-height: 100dvh;
    position: fixed;
    right: 0;
    top: 0;
}

.mobile-debts-sheet__header {
    align-items: center;
    border-bottom: 1px solid var(--mobile-debts-border);
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.mobile-debts-sheet__header h2 {
    font-size: 1.15rem;
    margin: 0;
}

.mobile-debts-sheet__body {
    display: grid;
    gap: 0.75rem;
    overflow-y: auto;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-debts-summary,
.mobile-debts-info,
.mobile-debts-form,
.mobile-debts-mini-list {
    background: var(--mobile-debts-panel);
    border: 1px solid var(--mobile-debts-border);
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
}

.mobile-debts-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-debts-summary div,
.mobile-debts-info div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.mobile-debts-summary strong {
    color: var(--mobile-debts-primary);
    overflow-wrap: anywhere;
}

.mobile-debts-info strong {
    overflow-wrap: anywhere;
}

.mobile-debts-actions {
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.mobile-debts-form label {
    display: grid;
    gap: 0.25rem;
}

.mobile-debts-mini-list h3 {
    font-size: 1rem;
    margin: 0;
}

.mobile-debts-mini-list article {
    align-items: center;
    background: var(--mobile-debts-panel-soft);
    border: 1px solid var(--mobile-debts-border);
    border-radius: 7px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 0.6rem;
}

.mobile-debts-mini-list article div {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.mobile-debts-mini-list article strong {
    overflow-wrap: anywhere;
}

.mobile-debts-mini-list article small {
    color: var(--mobile-debts-primary);
    white-space: nowrap;
}

@media (min-width: 680px) {
    .mobile-debts-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-debts-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-debts-sheet {
        border-inline: 1px solid var(--mobile-debts-border);
        margin-inline: auto;
        max-width: 42rem;
    }
}

.mobile-purchases-shell,
.mobile-purchases-sheet-backdrop {
    --mobile-purchases-bg: #12110d;
    --mobile-purchases-panel: #1d1a13;
    --mobile-purchases-panel-soft: #282318;
    --mobile-purchases-border: #463b25;
    --mobile-purchases-text: #fff8ea;
    --mobile-purchases-muted: #c3b89f;
    --mobile-purchases-primary: #f1bd58;
    --mobile-purchases-danger: #ee7777;
    --mobile-purchases-success: #72d6a2;
}

.mobile-purchases-shell {
    background: var(--mobile-purchases-bg);
    box-sizing: border-box;
    color: var(--mobile-purchases-text);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0.75rem 0.75rem 6.4rem;
}

.mobile-purchases-shell .btn,
.mobile-purchases-sheet .btn {
    border-radius: 7px;
    min-height: 2.6rem;
}

.mobile-purchases-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mobile-purchases-header div {
    min-width: 0;
}

.mobile-purchases-header__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
}

.mobile-purchases-header span,
.mobile-purchases-product__meta,
.mobile-purchases-product__footer small,
.mobile-purchases-cart-line span,
.mobile-purchases-checkout span,
.mobile-purchases-sheet__header span,
.mobile-purchases-state p {
    color: var(--mobile-purchases-muted);
}

.mobile-purchases-header strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.25;
}

.mobile-purchases-icon-btn {
    align-items: center;
    background: var(--mobile-purchases-panel-soft);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 7px;
    color: var(--mobile-purchases-text);
    display: inline-flex;
    height: 2.45rem;
    justify-content: center;
    width: 2.45rem;
}

.mobile-purchases-icon-btn--danger {
    color: var(--mobile-purchases-danger);
}

.mobile-purchases-alert {
    border-radius: 7px;
    flex: 0 0 auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.mobile-purchases-alert--success {
    background: rgba(114, 214, 162, 0.14);
    border: 1px solid rgba(114, 214, 162, 0.34);
    color: var(--mobile-purchases-success);
}

.mobile-purchases-alert--danger {
    background: rgba(238, 119, 119, 0.14);
    border: 1px solid rgba(238, 119, 119, 0.34);
    color: var(--mobile-purchases-danger);
}

.mobile-purchases-alert--warning {
    background: rgba(241, 189, 88, 0.13);
    border: 1px solid rgba(241, 189, 88, 0.34);
    color: var(--mobile-purchases-primary);
}

.mobile-purchases-search {
    background: var(--mobile-purchases-panel);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 0.65rem;
    position: relative;
    z-index: 4;
}

.mobile-purchases-search__line {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-purchases-shell .form-control,
.mobile-purchases-sheet .form-control,
.mobile-purchases-sheet .form-select {
    background-color: #12100b;
    border-color: var(--mobile-purchases-border);
    border-radius: 7px;
    color: var(--mobile-purchases-text);
    min-height: 2.55rem;
}

.mobile-purchases-shell .form-control::placeholder,
.mobile-purchases-sheet .form-control::placeholder {
    color: #8f836c;
}

.mobile-purchases-categories {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
}

.mobile-purchases-chip {
    background: var(--mobile-purchases-panel-soft);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 999px;
    color: var(--mobile-purchases-muted);
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-purchases-chip.is-active {
    background: rgba(241, 189, 88, 0.16);
    border-color: rgba(241, 189, 88, 0.58);
    color: var(--mobile-purchases-primary);
}

.mobile-purchases-products {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-purchases-product {
    background: var(--mobile-purchases-panel);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 8px;
    color: var(--mobile-purchases-text);
    display: grid;
    gap: 0.35rem;
    padding: 0.75rem;
    text-align: start;
}

.mobile-purchases-product:disabled {
    opacity: 0.55;
}

.mobile-purchases-product__name {
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-purchases-product__footer {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-purchases-product__footer strong {
    color: var(--mobile-purchases-primary);
}

.mobile-purchases-bottom-bar {
    align-items: center;
    background: rgba(18, 17, 13, 0.96);
    border-top: 1px solid var(--mobile-purchases-border);
    bottom: 0;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) 6.8rem;
    inset-inline: 0;
    padding: 0.7rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom));
    position: fixed;
    z-index: 6;
}

.mobile-purchases-cart-button {
    align-items: center;
    background: var(--mobile-purchases-panel);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 8px;
    color: var(--mobile-purchases-text);
    display: flex;
    justify-content: space-between;
    min-height: 3rem;
    min-width: 0;
    padding: 0.45rem 0.75rem;
}

.mobile-purchases-cart-button span {
    color: var(--mobile-purchases-muted);
}

.mobile-purchases-save {
    min-height: 3rem !important;
}

.mobile-purchases-state {
    align-items: flex-start;
    background: var(--mobile-purchases-panel);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 8px;
    display: grid;
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 28rem;
    padding: 1rem;
}

.mobile-purchases-empty {
    background: var(--mobile-purchases-panel);
    border: 1px dashed var(--mobile-purchases-border);
    border-radius: 8px;
    color: var(--mobile-purchases-muted);
    padding: 1rem;
    text-align: center;
}

.mobile-purchases-sheet-backdrop {
    background: rgba(0, 0, 0, 0.58);
    inset: 0;
    position: fixed;
    z-index: 50;
}

.mobile-purchases-sheet {
    background: var(--mobile-purchases-bg);
    border-top: 1px solid var(--mobile-purchases-border);
    bottom: 0;
    color: var(--mobile-purchases-text);
    display: flex;
    flex-direction: column;
    inset-inline: 0;
    max-height: min(92dvh, 46rem);
    position: fixed;
}

.mobile-purchases-sheet__header,
.mobile-purchases-sheet__actions {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.mobile-purchases-sheet__header {
    border-bottom: 1px solid var(--mobile-purchases-border);
}

.mobile-purchases-sheet__header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.mobile-purchases-cart-lines {
    display: grid;
    gap: 0.6rem;
    min-height: 9rem;
    overflow-y: auto;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-purchases-cart-line {
    background: var(--mobile-purchases-panel);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 8px;
    display: grid;
    gap: 0.6rem;
    padding: 0.75rem;
}

.mobile-purchases-cart-line__title {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-purchases-cart-line__title strong {
    overflow-wrap: anywhere;
}

.mobile-purchases-qty-row {
    display: grid;
    gap: 0.45rem;
    grid-template-columns: 2.6rem minmax(0, 1fr) 2.6rem;
}

.mobile-purchases-stepper {
    background: var(--mobile-purchases-panel-soft);
    border: 1px solid var(--mobile-purchases-border);
    border-radius: 7px;
    color: var(--mobile-purchases-text);
    font-size: 1.15rem;
    font-weight: 700;
}

.mobile-purchases-line-cost {
    display: grid;
    gap: 0.3rem;
}

.mobile-purchases-checkout {
    border-top: 1px solid var(--mobile-purchases-border);
    display: grid;
    gap: 0.6rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 0.75rem;
}

.mobile-purchases-checkout label {
    display: grid;
    gap: 0.3rem;
}

.mobile-purchases-checkout__wide {
    grid-column: 1 / -1;
}

.mobile-purchases-sheet__actions {
    border-top: 1px solid var(--mobile-purchases-border);
}

@media (min-width: 680px) {
    .mobile-purchases-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-purchases-bottom-bar {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-purchases-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-purchases-sheet {
        border-inline: 1px solid var(--mobile-purchases-border);
        margin-inline: auto;
        max-width: 42rem;
    }
}

.mobile-suppliers-shell,
.mobile-suppliers-sheet-backdrop {
    --mobile-suppliers-bg: #0f1316;
    --mobile-suppliers-panel: #171d22;
    --mobile-suppliers-panel-soft: #202930;
    --mobile-suppliers-border: #31404a;
    --mobile-suppliers-text: #f2f7fb;
    --mobile-suppliers-muted: #aab7c0;
    --mobile-suppliers-primary: #65b7f3;
    --mobile-suppliers-danger: #ee7777;
    --mobile-suppliers-success: #72d6a2;
}

.mobile-suppliers-shell {
    background: var(--mobile-suppliers-bg);
    box-sizing: border-box;
    color: var(--mobile-suppliers-text);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0.75rem 0.75rem 6.4rem;
}

.mobile-suppliers-shell .btn,
.mobile-suppliers-sheet .btn {
    border-radius: 7px;
    min-height: 2.6rem;
}

.mobile-suppliers-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mobile-suppliers-header div {
    min-width: 0;
}

.mobile-suppliers-header span,
.mobile-suppliers-card__meta,
.mobile-suppliers-card__footer small,
.mobile-suppliers-details span,
.mobile-suppliers-form span,
.mobile-suppliers-sheet__header span,
.mobile-suppliers-state p {
    color: var(--mobile-suppliers-muted);
}

.mobile-suppliers-header strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.25;
}

.mobile-suppliers-icon-btn {
    align-items: center;
    background: var(--mobile-suppliers-panel-soft);
    border: 1px solid var(--mobile-suppliers-border);
    border-radius: 7px;
    color: var(--mobile-suppliers-text);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.45rem;
    justify-content: center;
    text-decoration: none;
    width: 2.45rem;
}

.mobile-suppliers-alert {
    border-radius: 7px;
    flex: 0 0 auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.mobile-suppliers-alert--success {
    background: rgba(114, 214, 162, 0.14);
    border: 1px solid rgba(114, 214, 162, 0.34);
    color: var(--mobile-suppliers-success);
}

.mobile-suppliers-alert--danger {
    background: rgba(238, 119, 119, 0.14);
    border: 1px solid rgba(238, 119, 119, 0.34);
    color: var(--mobile-suppliers-danger);
}

.mobile-suppliers-search {
    background: var(--mobile-suppliers-panel);
    border: 1px solid var(--mobile-suppliers-border);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 0.65rem;
    position: relative;
    z-index: 4;
}

.mobile-suppliers-search__line {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-suppliers-shell .form-control,
.mobile-suppliers-sheet .form-control,
.mobile-suppliers-sheet .form-select {
    background-color: #10161a;
    border-color: var(--mobile-suppliers-border);
    border-radius: 7px;
    color: var(--mobile-suppliers-text);
    min-height: 2.55rem;
}

.mobile-suppliers-shell .form-control::placeholder,
.mobile-suppliers-sheet .form-control::placeholder {
    color: #7f8d96;
}

.mobile-suppliers-tabs {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
}

.mobile-suppliers-chip {
    background: var(--mobile-suppliers-panel-soft);
    border: 1px solid var(--mobile-suppliers-border);
    border-radius: 999px;
    color: var(--mobile-suppliers-muted);
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-suppliers-chip.is-active {
    background: rgba(101, 183, 243, 0.16);
    border-color: rgba(101, 183, 243, 0.58);
    color: var(--mobile-suppliers-primary);
}

.mobile-suppliers-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-suppliers-card {
    background: var(--mobile-suppliers-panel);
    border: 1px solid var(--mobile-suppliers-border);
    border-radius: 8px;
    display: grid;
    gap: 0.6rem;
    padding: 0.75rem;
}

.mobile-suppliers-card__main {
    background: transparent;
    border: 0;
    color: var(--mobile-suppliers-text);
    display: grid;
    gap: 0.35rem;
    padding: 0;
    text-align: start;
}

.mobile-suppliers-card__name {
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-suppliers-card__footer {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-suppliers-card__footer strong {
    color: var(--mobile-suppliers-primary);
    white-space: nowrap;
}

.mobile-suppliers-card__footer small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-suppliers-card__actions {
    display: flex;
    gap: 0.45rem;
}

.mobile-suppliers-bottom-bar {
    align-items: center;
    background: rgba(15, 19, 22, 0.96);
    border-top: 1px solid var(--mobile-suppliers-border);
    bottom: 0;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) auto;
    inset-inline: 0;
    padding: 0.7rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom));
    position: fixed;
    z-index: 6;
}

.mobile-suppliers-add,
.mobile-suppliers-back {
    min-height: 3rem !important;
}

.mobile-suppliers-state,
.mobile-suppliers-empty {
    background: var(--mobile-suppliers-panel);
    border: 1px solid var(--mobile-suppliers-border);
    border-radius: 8px;
    padding: 1rem;
}

.mobile-suppliers-state {
    align-items: flex-start;
    display: grid;
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 28rem;
}

.mobile-suppliers-empty {
    border-style: dashed;
    color: var(--mobile-suppliers-muted);
    text-align: center;
}

.mobile-suppliers-sheet-backdrop {
    background: rgba(0, 0, 0, 0.58);
    inset: 0;
    position: fixed;
    z-index: 50;
}

.mobile-suppliers-sheet {
    background: var(--mobile-suppliers-bg);
    border-top: 1px solid var(--mobile-suppliers-border);
    bottom: 0;
    color: var(--mobile-suppliers-text);
    display: flex;
    flex-direction: column;
    inset-inline: 0;
    max-height: min(92dvh, 46rem);
    position: fixed;
}

.mobile-suppliers-sheet__header,
.mobile-suppliers-sheet__actions {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.mobile-suppliers-sheet__header {
    border-bottom: 1px solid var(--mobile-suppliers-border);
}

.mobile-suppliers-sheet__header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.mobile-suppliers-form,
.mobile-suppliers-details {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-y: auto;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-suppliers-form label,
.mobile-suppliers-details div {
    display: grid;
    gap: 0.3rem;
}

.mobile-suppliers-form__wide,
.mobile-suppliers-details__wide {
    grid-column: 1 / -1;
}

.mobile-suppliers-details div {
    background: var(--mobile-suppliers-panel);
    border: 1px solid var(--mobile-suppliers-border);
    border-radius: 8px;
    padding: 0.75rem;
}

.mobile-suppliers-details strong {
    overflow-wrap: anywhere;
}

.mobile-suppliers-sheet__actions {
    border-top: 1px solid var(--mobile-suppliers-border);
}

@media (min-width: 680px) {
    .mobile-suppliers-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-suppliers-bottom-bar {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-suppliers-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-suppliers-sheet {
        border-inline: 1px solid var(--mobile-suppliers-border);
        margin-inline: auto;
        max-width: 42rem;
    }
}

.mobile-hub-shell {
    background:
        radial-gradient(circle at top right, rgba(88, 199, 173, 0.18), transparent 34%),
        radial-gradient(circle at bottom left, rgba(241, 189, 88, 0.14), transparent 30%),
        #0f1412;
    box-sizing: border-box;
    color: #f2f7f4;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    min-height: 100dvh;
    overflow-y: auto;
    padding: 0.85rem 0.85rem calc(1rem + env(safe-area-inset-bottom));
    -webkit-overflow-scrolling: touch;
}

.mobile-hub-hero {
    align-items: flex-start;
    background: rgba(23, 31, 28, 0.92);
    border: 1px solid #304139;
    border-radius: 14px;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
    padding: 1rem;
}

.mobile-hub-hero span,
.mobile-hub-hero p,
.mobile-hub-card small {
    color: #a9b8b1;
}

.mobile-hub-hero h1 {
    font-size: 1.65rem;
    line-height: 1.2;
    margin: 0.15rem 0 0.35rem;
}

.mobile-hub-hero p {
    margin: 0;
}

.mobile-hub-icon-btn {
    align-items: center;
    background: #202b26;
    border: 1px solid #304139;
    border-radius: 10px;
    color: #f2f7f4;
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.75rem;
    justify-content: center;
    text-decoration: none;
    width: 2.75rem;
}

.mobile-hub-grid {
    display: grid;
    gap: 0.75rem;
}

.mobile-hub-card {
    background: #171f1c;
    border: 1px solid #304139;
    border-radius: 14px;
    color: #f2f7f4;
    display: grid;
    gap: 0.35rem;
    min-height: 7.25rem;
    padding: 0.95rem;
    position: relative;
    text-decoration: none;
    overflow: hidden;
}

.mobile-hub-card::after {
    content: "";
    border-radius: 999px;
    height: 5rem;
    inset: auto -1.6rem -1.8rem auto;
    opacity: 0.18;
    position: absolute;
    width: 5rem;
}

.mobile-hub-card__icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 12px;
    display: inline-flex;
    height: 2.6rem;
    justify-content: center;
    width: 2.6rem;
}

.mobile-hub-card strong {
    font-size: 1.05rem;
    line-height: 1.3;
}

.mobile-hub-card--sales::after {
    background: #58c7ad;
}

.mobile-hub-card--purchases::after {
    background: #f1bd58;
}

.mobile-hub-card--contacts::after {
    background: #65b7f3;
}

.mobile-hub-card--products::after {
    background: #ff8a65;
}

.mobile-hub-card--debts::after {
    background: #72d6a2;
}

.mobile-hub-card--delivery::after {
    background: #d88cff;
}

.mobile-sales-header__actions,
.mobile-debts-header__actions,
.mobile-delivery-header__actions,
.mobile-suppliers-header__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
}

.mobile-sales-icon-btn,
.mobile-debts-icon-btn,
.mobile-delivery-icon-btn {
    text-decoration: none;
}

@media (min-width: 680px) {
    .mobile-hub-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-hub-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-hub-card--contacts {
        grid-column: 1 / -1;
    }
}

.mobile-products-shell,
.mobile-products-sheet-backdrop {
    --mobile-products-bg: #14100f;
    --mobile-products-panel: #201815;
    --mobile-products-panel-soft: #2d211d;
    --mobile-products-border: #4a372f;
    --mobile-products-text: #fff6f2;
    --mobile-products-muted: #c7b2aa;
    --mobile-products-primary: #ff8a65;
    --mobile-products-danger: #ee7777;
    --mobile-products-success: #72d6a2;
}

.mobile-products-shell {
    background: var(--mobile-products-bg);
    box-sizing: border-box;
    color: var(--mobile-products-text);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0.75rem 0.75rem 6.4rem;
}

.mobile-products-shell .btn,
.mobile-products-sheet .btn {
    border-radius: 7px;
    min-height: 2.6rem;
}

.mobile-products-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mobile-products-header div {
    min-width: 0;
}

.mobile-products-header__actions {
    display: flex;
    flex: 0 0 auto;
    gap: 0.45rem;
}

.mobile-products-header span,
.mobile-products-card__meta,
.mobile-products-card__footer small,
.mobile-products-form span,
.mobile-products-sheet__header span,
.mobile-products-state p {
    color: var(--mobile-products-muted);
}

.mobile-products-header strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.25;
}

.mobile-products-icon-btn {
    align-items: center;
    background: var(--mobile-products-panel-soft);
    border: 1px solid var(--mobile-products-border);
    border-radius: 7px;
    color: var(--mobile-products-text);
    display: inline-flex;
    flex: 0 0 auto;
    height: 2.45rem;
    justify-content: center;
    text-decoration: none;
    width: 2.45rem;
}

.mobile-products-alert {
    border-radius: 7px;
    flex: 0 0 auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.mobile-products-alert--success {
    background: rgba(114, 214, 162, 0.14);
    border: 1px solid rgba(114, 214, 162, 0.34);
    color: var(--mobile-products-success);
}

.mobile-products-alert--danger {
    background: rgba(238, 119, 119, 0.14);
    border: 1px solid rgba(238, 119, 119, 0.34);
    color: var(--mobile-products-danger);
}

.mobile-products-search {
    background: var(--mobile-products-panel);
    border: 1px solid var(--mobile-products-border);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 0.65rem;
    position: relative;
    z-index: 4;
}

.mobile-products-search__line {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
}

.mobile-products-shell .form-control,
.mobile-products-sheet .form-control,
.mobile-products-sheet .form-select {
    background-color: #15100e;
    border-color: var(--mobile-products-border);
    border-radius: 7px;
    color: var(--mobile-products-text);
    min-height: 2.55rem;
}

.mobile-products-shell .form-control::placeholder,
.mobile-products-sheet .form-control::placeholder {
    color: #917c74;
}

.mobile-products-categories {
    display: flex;
    gap: 0.45rem;
    margin-top: 0.6rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
    scrollbar-width: thin;
}

.mobile-products-chip {
    background: var(--mobile-products-panel-soft);
    border: 1px solid var(--mobile-products-border);
    border-radius: 999px;
    color: var(--mobile-products-muted);
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-products-chip.is-active {
    background: rgba(255, 138, 101, 0.16);
    border-color: rgba(255, 138, 101, 0.58);
    color: var(--mobile-products-primary);
}

.mobile-products-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-products-card {
    background: var(--mobile-products-panel);
    border: 1px solid var(--mobile-products-border);
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
}

.mobile-products-card__main {
    background: transparent;
    border: 0;
    color: var(--mobile-products-text);
    display: grid;
    gap: 0.35rem;
    padding: 0;
    text-align: start;
}

.mobile-products-card__name {
    font-weight: 800;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.mobile-products-card__footer {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: space-between;
}

.mobile-products-card__footer strong {
    color: var(--mobile-products-primary);
    white-space: nowrap;
}

.mobile-products-card__footer small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mobile-products-card__edit {
    justify-self: stretch;
}

.mobile-products-bottom-bar {
    align-items: center;
    background: rgba(20, 16, 15, 0.96);
    border-top: 1px solid var(--mobile-products-border);
    bottom: 0;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: minmax(0, 1fr) auto;
    inset-inline: 0;
    padding: 0.7rem 0.75rem calc(0.7rem + env(safe-area-inset-bottom));
    position: fixed;
    z-index: 6;
}

.mobile-products-add,
.mobile-products-back {
    min-height: 3rem !important;
}

.mobile-products-state,
.mobile-products-empty {
    background: var(--mobile-products-panel);
    border: 1px solid var(--mobile-products-border);
    border-radius: 8px;
    padding: 1rem;
}

.mobile-products-state {
    align-items: flex-start;
    display: grid;
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 28rem;
}

.mobile-products-empty {
    border-style: dashed;
    color: var(--mobile-products-muted);
    text-align: center;
}

.mobile-products-sheet-backdrop {
    background: rgba(0, 0, 0, 0.58);
    inset: 0;
    position: fixed;
    z-index: 50;
}

.mobile-products-sheet {
    background: var(--mobile-products-bg);
    border-top: 1px solid var(--mobile-products-border);
    bottom: 0;
    color: var(--mobile-products-text);
    display: flex;
    flex-direction: column;
    inset-inline: 0;
    max-height: min(92dvh, 46rem);
    position: fixed;
}

.mobile-products-sheet__header,
.mobile-products-sheet__actions {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.mobile-products-sheet__header {
    border-bottom: 1px solid var(--mobile-products-border);
}

.mobile-products-sheet__header h2 {
    font-size: 1.1rem;
    margin: 0;
}

.mobile-products-form {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-y: auto;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-products-form label {
    display: grid;
    gap: 0.3rem;
}

.mobile-products-form__wide {
    grid-column: 1 / -1;
}

.mobile-products-toggle {
    align-items: center;
    background: var(--mobile-products-panel);
    border: 1px solid var(--mobile-products-border);
    border-radius: 8px;
    display: flex !important;
    justify-content: space-between;
    padding: 0.65rem;
}

.mobile-products-sheet__actions {
    border-top: 1px solid var(--mobile-products-border);
}

@media (min-width: 680px) {
    .mobile-products-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-products-bottom-bar {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-products-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-products-sheet {
        border-inline: 1px solid var(--mobile-products-border);
        margin-inline: auto;
        max-width: 42rem;
    }
}

.mobile-delivery-shell,
.mobile-delivery-sheet-backdrop {
    --mobile-delivery-bg: #101412;
    --mobile-delivery-panel: #17201c;
    --mobile-delivery-panel-soft: #202b26;
    --mobile-delivery-border: #32443c;
    --mobile-delivery-text: #f2f7f4;
    --mobile-delivery-muted: #a9b8b1;
    --mobile-delivery-primary: #58c7ad;
    --mobile-delivery-danger: #ee7777;
    --mobile-delivery-success: #72d6a2;
    --mobile-delivery-warning: #e1ad55;
}

.mobile-delivery-shell {
    background: var(--mobile-delivery-bg);
    box-sizing: border-box;
    color: var(--mobile-delivery-text);
    display: flex;
    flex-direction: column;
    height: 100dvh;
    max-height: 100dvh;
    overflow: hidden;
    padding: 0.75rem;
}

.mobile-delivery-shell .btn,
.mobile-delivery-sheet .btn {
    border-radius: 7px;
    min-height: 2.6rem;
}

.mobile-delivery-header {
    align-items: center;
    display: flex;
    flex: 0 0 auto;
    gap: 0.75rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mobile-delivery-header div {
    min-width: 0;
}

.mobile-delivery-header span,
.mobile-delivery-card span,
.mobile-delivery-card__field span,
.mobile-delivery-summary span,
.mobile-delivery-sheet__header span,
.mobile-delivery-form span,
.mobile-delivery-state p {
    color: var(--mobile-delivery-muted);
}

.mobile-delivery-header strong {
    display: block;
    font-size: 1.25rem;
    line-height: 1.35;
}

.mobile-delivery-icon-btn {
    align-items: center;
    background: var(--mobile-delivery-panel-soft);
    border: 1px solid var(--mobile-delivery-border);
    border-radius: 7px;
    color: var(--mobile-delivery-text);
    display: inline-flex;
    height: 2.45rem;
    justify-content: center;
    width: 2.45rem;
}

.mobile-delivery-alert {
    border-radius: 7px;
    flex: 0 0 auto;
    margin-bottom: 0.65rem;
    padding: 0.65rem 0.75rem;
}

.mobile-delivery-alert--success {
    background: rgba(114, 214, 162, 0.14);
    border: 1px solid rgba(114, 214, 162, 0.34);
    color: var(--mobile-delivery-success);
}

.mobile-delivery-alert--danger {
    background: rgba(238, 119, 119, 0.14);
    border: 1px solid rgba(238, 119, 119, 0.34);
    color: var(--mobile-delivery-danger);
}

.mobile-delivery-toolbar,
.mobile-delivery-summary {
    background: var(--mobile-delivery-panel);
    border: 1px solid var(--mobile-delivery-border);
    border-radius: 8px;
    flex: 0 0 auto;
    padding: 0.65rem;
}

.mobile-delivery-toolbar {
    display: grid;
    gap: 0.6rem;
}

.mobile-delivery-shell .form-select,
.mobile-delivery-sheet .form-control,
.mobile-delivery-sheet .form-select {
    background-color: #101714;
    border-color: var(--mobile-delivery-border);
    border-radius: 7px;
    color: var(--mobile-delivery-text);
    min-height: 2.55rem;
}

.mobile-delivery-tabs {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    padding-bottom: 0.1rem;
}

.mobile-delivery-chip {
    background: var(--mobile-delivery-panel-soft);
    border: 1px solid var(--mobile-delivery-border);
    border-radius: 999px;
    color: var(--mobile-delivery-muted);
    flex: 0 0 auto;
    min-height: 2.1rem;
    padding: 0.35rem 0.75rem;
    white-space: nowrap;
}

.mobile-delivery-chip.is-active {
    background: rgba(88, 199, 173, 0.18);
    border-color: rgba(88, 199, 173, 0.58);
    color: var(--mobile-delivery-primary);
}

.mobile-delivery-summary {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 0.65rem;
}

.mobile-delivery-summary div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.mobile-delivery-summary strong {
    color: var(--mobile-delivery-primary);
    overflow-wrap: anywhere;
}

.mobile-delivery-list {
    display: grid;
    gap: 0.6rem;
    margin-top: 0.75rem;
    min-height: 0;
    overflow-y: auto;
    padding-bottom: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-delivery-card {
    background: var(--mobile-delivery-panel);
    border: 1px solid var(--mobile-delivery-border);
    border-radius: 8px;
    display: grid;
    gap: 0.7rem;
    padding: 0.75rem;
}

.mobile-delivery-card header,
.mobile-delivery-card footer {
    align-items: center;
    display: flex;
    gap: 0.65rem;
    justify-content: space-between;
}

.mobile-delivery-card header div {
    display: grid;
    gap: 0.2rem;
    min-width: 0;
}

.mobile-delivery-card header strong {
    font-size: 1.05rem;
    overflow-wrap: anywhere;
}

.mobile-delivery-card footer {
    align-items: stretch;
}

.mobile-delivery-card footer .btn {
    flex: 1;
}

.mobile-delivery-card__grid {
    display: grid;
    gap: 0.5rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mobile-delivery-card__grid div,
.mobile-delivery-card__field {
    background: var(--mobile-delivery-panel-soft);
    border: 1px solid var(--mobile-delivery-border);
    border-radius: 7px;
    display: grid;
    gap: 0.2rem;
    min-width: 0;
    padding: 0.55rem;
}

.mobile-delivery-card__grid strong,
.mobile-delivery-card__field p {
    margin: 0;
    overflow-wrap: anywhere;
}

.mobile-delivery-status {
    border-radius: 999px;
    border: 1px solid transparent;
    color: var(--mobile-delivery-text);
    display: inline-flex;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 0.25rem 0.55rem;
    white-space: nowrap;
}

.mobile-delivery-status--preparing {
    background: rgba(225, 173, 85, 0.16);
    border-color: rgba(225, 173, 85, 0.38);
    color: var(--mobile-delivery-warning);
}

.mobile-delivery-status--road {
    background: rgba(88, 199, 173, 0.16);
    border-color: rgba(88, 199, 173, 0.38);
    color: var(--mobile-delivery-primary);
}

.mobile-delivery-status--done {
    background: rgba(114, 214, 162, 0.16);
    border-color: rgba(114, 214, 162, 0.38);
    color: var(--mobile-delivery-success);
}

.mobile-delivery-status--cancelled {
    background: rgba(238, 119, 119, 0.16);
    border-color: rgba(238, 119, 119, 0.38);
    color: var(--mobile-delivery-danger);
}

.mobile-delivery-empty,
.mobile-delivery-state {
    background: var(--mobile-delivery-panel);
    border: 1px dashed var(--mobile-delivery-border);
    border-radius: 8px;
    color: var(--mobile-delivery-muted);
    padding: 1rem;
    text-align: center;
}

.mobile-delivery-state {
    align-items: flex-start;
    border-style: solid;
    display: grid;
    gap: 0.75rem;
    margin: 1rem auto;
    max-width: 28rem;
    text-align: start;
}

.mobile-delivery-state h1 {
    color: var(--mobile-delivery-text);
    font-size: 1.35rem;
    margin: 0;
}

.mobile-delivery-sheet-backdrop {
    background: var(--mobile-delivery-bg);
    inset: 0;
    overflow: hidden;
    position: fixed;
    z-index: 20;
}

.mobile-delivery-sheet {
    background: var(--mobile-delivery-bg);
    bottom: 0;
    color: var(--mobile-delivery-text);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    left: 0;
    max-height: 100dvh;
    position: fixed;
    right: 0;
    top: 0;
}

.mobile-delivery-sheet__header {
    align-items: center;
    border-bottom: 1px solid var(--mobile-delivery-border);
    display: flex;
    gap: 0.6rem;
    justify-content: space-between;
    padding: 0.75rem;
}

.mobile-delivery-sheet__header h2 {
    font-size: 1.15rem;
    margin: 0;
}

.mobile-delivery-sheet__body {
    display: grid;
    gap: 0.75rem;
    overflow-y: auto;
    padding: 0.75rem;
    -webkit-overflow-scrolling: touch;
}

.mobile-delivery-form,
.mobile-delivery-sheet-actions {
    background: var(--mobile-delivery-panel);
    border: 1px solid var(--mobile-delivery-border);
    border-radius: 8px;
    display: grid;
    gap: 0.65rem;
    padding: 0.75rem;
}

.mobile-delivery-form label {
    display: grid;
    gap: 0.25rem;
}

.mobile-delivery-sheet-actions {
    grid-template-columns: 1fr;
}

@media (min-width: 680px) {
    .mobile-delivery-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mobile-delivery-shell {
        padding-inline: max(1rem, calc((100vw - 42rem) / 2));
    }

    .mobile-delivery-sheet {
        border-inline: 1px solid var(--mobile-delivery-border);
        margin-inline: auto;
        max-width: 42rem;
    }
}

.erp-shell--sidebar-collapsed {
    grid-template-columns: minmax(0, 1fr) !important;
}

.erp-shell--sidebar-collapsed .erp-shell__sidebar {
    display: none !important;
}

.erp-shell--sidebar-collapsed .erp-shell__main {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
}

.erp-sidebar-toggle {
    white-space: nowrap;
}

.debts-table__row {
    cursor: pointer;
}

.debts-table__row:focus-visible {
    outline: 2px solid #55c2a9;
    outline-offset: -2px;
}

.debts-table__row:hover td {
    background: #1b2a24 !important;
}

.report-invoice-link {
    color: var(--erp-primary);
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 0.2rem;
}

.report-invoice-link:hover {
    color: #0a365c;
}

.reports-tabs .sales-toggle-chip,
.reports-tabs-toolbar .sales-toggle-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.75rem;
    height: 2.75rem;
    margin: 0;
    padding: 0 1rem;
    border: 1px solid #c3d6eb;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff 0%, #edf4fd 100%);
    color: #21466c;
    box-shadow: none;
    box-sizing: border-box;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

html[data-theme="dark"] .reports-tabs-toolbar .sales-toggle-chip {
    border-color: rgba(123, 216, 194, 0.18);
    background: #172b25;
    color: #d9eee7;
}

.reports-tabs .sales-toggle-chip:hover,
.reports-tabs-toolbar .sales-toggle-chip:hover {
    border-color: #94b7da;
    background: linear-gradient(180deg, #f1f8ff 0%, #e6f1fd 100%);
}

html[data-theme="dark"] .reports-tabs-toolbar .sales-toggle-chip:hover {
    border-color: rgba(123, 216, 194, 0.45);
    background: #1e3b33;
    color: #ffffff;
}

.reports-tabs .sales-toggle-chip.is-active,
.reports-tabs-toolbar .sales-toggle-chip.is-active {
    border-color: #0f4c81;
    background: #0f4c81;
    color: #fff;
}

html[data-theme="dark"] .reports-tabs-toolbar .sales-toggle-chip.is-active {
    border-color: rgba(123, 216, 194, 0.75);
    background: linear-gradient(135deg, #2f9f8d, #1f6f8d);
    color: #efffff;
}

.reports-tabs .sales-toggle-chip:active,
.reports-tabs .sales-toggle-chip:focus-visible,
.reports-tabs-toolbar .sales-toggle-chip:active,
.reports-tabs-toolbar .sales-toggle-chip:focus-visible {
    transform: none;
}

.users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.users-permissions-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.users-permission-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.users-permission-card__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.users-permission-card__actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.75rem;
}

.users-permission-list {
    display: grid;
    gap: 0.75rem;
}

.users-permission-toggle {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    align-items: center;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1rem;
    background: rgba(248, 250, 252, 0.95);
}

.users-permission-toggle input {
    grid-row: span 2;
    inline-size: 1rem;
    block-size: 1rem;
}

.users-permission-toggle span {
    font-weight: 700;
    color: var(--erp-text);
}

.users-permission-toggle small {
    color: var(--erp-muted);
}

.erp-shell__content>.user-page-permissions-page {
    flex: 1 1 100%;
    min-width: 0;
}

.user-page-permissions-page {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.user-page-permissions-hero {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
}

.user-page-permissions-hero__identity {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.user-page-permissions-hero__avatar {
    inline-size: 3.2rem;
    block-size: 3.2rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    font-weight: 900;
    color: #0f4c81;
    background: linear-gradient(145deg, #dff0ff, #f2f9ff);
    border: 1px solid rgba(15, 76, 129, 0.22);
    flex-shrink: 0;
}

.user-page-permissions-hero h1 {
    margin: 0;
}

.user-page-permissions-hero .section-lead {
    margin-top: 0.35rem;
}

.user-page-permissions-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(120px, 1fr));
    gap: 0.6rem;
}

.user-page-permissions-stat {
    padding: 0.75rem 0.85rem;
    border-radius: 0.9rem;
    border: 1px solid rgba(15, 76, 129, 0.18);
    background: rgba(241, 248, 255, 0.9);
    display: grid;
    gap: 0.2rem;
}

.user-page-permissions-stat small {
    font-size: 0.72rem;
    color: #5f7187;
    font-weight: 700;
}

.user-page-permissions-stat strong {
    font-size: 1.2rem;
    color: #153a62;
    font-weight: 900;
    line-height: 1.2;
}

.user-page-permissions-stat--positive {
    border-color: rgba(22, 163, 74, 0.24);
    background: rgba(236, 253, 245, 0.9);
}

.user-page-permissions-stat--positive strong {
    color: #166534;
}

.user-page-permissions-stat--negative {
    border-color: rgba(220, 38, 38, 0.24);
    background: rgba(254, 242, 242, 0.9);
}

.user-page-permissions-stat--negative strong {
    color: #991b1b;
}

.user-page-permissions-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.85rem;
    align-items: end;
}

.user-page-permissions-search {
    display: grid;
    gap: 0.42rem;
    min-width: 0;
}

.user-page-permissions-search label {
    margin: 0;
    color: #42596f;
    font-size: 0.88rem;
    font-weight: 800;
}

.user-page-permissions-search small {
    color: #6c7f94;
    font-size: 0.8rem;
}

.user-page-permissions-search__control {
    position: relative;
}

.user-page-permissions-search__control i {
    position: absolute;
    inset-inline-start: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #6b839a;
    pointer-events: none;
}

.user-page-permissions-search__control .form-control {
    min-height: 2.9rem;
    padding-inline-start: 2.35rem;
}

.user-page-permissions-toolbar__actions {
    margin-top: 0;
}

.user-page-permissions-grid {
    grid-template-columns: repeat(auto-fit, minmax(310px, 1fr));
    align-items: start;
}

.user-page-permissions-card {
    border: 1px solid rgba(148, 163, 184, 0.28);
    background: linear-gradient(180deg, #ffffff, #f8fbff);
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.user-page-permissions-card:hover {
    border-color: rgba(15, 76, 129, 0.28);
    transform: translateY(-1px);
}

.user-page-permissions-card__header {
    align-items: center;
}

.user-page-permissions-card__title-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.user-page-permissions-card__icon {
    inline-size: 2.45rem;
    block-size: 2.45rem;
    border-radius: 0.75rem;
    display: grid;
    place-items: center;
    background: rgba(15, 76, 129, 0.11);
    color: #0f4c81;
    font-size: 1rem;
    border: 1px solid rgba(15, 76, 129, 0.14);
    flex-shrink: 0;
}

.user-page-permissions-card__title {
    margin: 0;
    font-size: 1.02rem;
    color: #1c334b;
}

.user-page-permissions-card__route {
    margin: 0.2rem 0 0;
    color: #5d748c;
    font-size: 0.84rem;
    word-break: break-word;
}

.user-page-permissions-card__key {
    color: #8497ab;
    font-size: 0.75rem;
}

.user-page-permissions-card__body {
    margin-top: 0.15rem;
}

.user-page-permissions-switch {
    display: grid;
    grid-template-columns: auto auto 1fr;
    gap: 0.7rem;
    align-items: center;
    padding: 0.78rem 0.85rem;
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 0.9rem;
    background: rgba(246, 250, 255, 0.95);
    user-select: none;
}

.user-page-permissions-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.user-page-permissions-switch__track {
    position: relative;
    inline-size: 2.5rem;
    block-size: 1.45rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background-color 0.16s ease;
    flex-shrink: 0;
}

.user-page-permissions-switch__track::after {
    content: "";
    position: absolute;
    top: 0.17rem;
    inset-inline-start: 0.17rem;
    inline-size: 1.1rem;
    block-size: 1.1rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
    transition: transform 0.16s ease;
}

.user-page-permissions-switch input:checked+.user-page-permissions-switch__track {
    background: #16a34a;
}

.user-page-permissions-switch input:checked+.user-page-permissions-switch__track::after {
    transform: translateX(-1.05rem);
}

.user-page-permissions-switch input:disabled+.user-page-permissions-switch__track {
    opacity: 0.6;
}

.user-page-permissions-switch__text {
    color: #24364a;
    font-weight: 700;
    font-size: 0.9rem;
}

.user-page-permissions-save {
    position: sticky;
    bottom: 0.5rem;
    z-index: 5;
    padding: 0.75rem 0.85rem;
    border: 1px solid rgba(220, 228, 242, 0.92);
    border-radius: var(--erp-radius-md);
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(6px);
}

.user-page-permissions-save__actions {
    margin: 0;
}

.user-page-permissions-empty,
.user-page-permissions-admin {
    text-align: center;
}

.user-page-permissions-toast-stack {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1200;
    width: min(34rem, calc(100vw - 1.5rem));
    display: grid;
    gap: 0.6rem;
    pointer-events: none;
}

.user-page-permissions-toast {
    margin: 0;
    border-radius: 1rem;
    border: 1px solid transparent;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.7rem;
    align-items: start;
    padding: 0.85rem 0.95rem;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.2);
    pointer-events: auto;
    animation: user-page-permissions-toast-in 0.2s ease;
}

.user-page-permissions-toast strong {
    display: block;
    margin-bottom: 0.22rem;
}

.user-page-permissions-toast .btn-close {
    margin-top: 0.1rem;
}

.user-page-permissions-toast--success {
    background: #d1fae5;
    border-color: rgba(22, 163, 74, 0.25);
    color: #065f46;
}

.user-page-permissions-toast--danger {
    background: #fee2e2;
    border-color: rgba(220, 38, 38, 0.25);
    color: #991b1b;
}

@keyframes user-page-permissions-toast-in {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1200px) {
    .user-page-permissions-hero {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-page-permissions-hero__stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .user-page-permissions-toolbar {
        grid-template-columns: minmax(0, 1fr);
    }

    .user-page-permissions-toolbar__actions {
        justify-content: stretch;
    }

    .user-page-permissions-toolbar__actions>.btn,
    .user-page-permissions-toolbar__actions>a.btn {
        width: 100%;
    }

    .user-page-permissions-hero__stats {
        grid-template-columns: 1fr;
    }
}

.sales-session-grid,
.sales-totals-grid {
    margin-top: 1rem;
}

.sales-filter-actions {
    display: flex;
    align-items: end;
    gap: 0.75rem;
}

.sales-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 1.5rem;
}

.purchase-quick-search {
    display: flex;
    gap: 0.75rem;
}

.purchase-entry-grid {
    margin-top: 1rem;
}

.sales-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

.sales-product-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    width: 100%;
    padding: 1rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-md);
    background: linear-gradient(180deg, #ffffff, #f7f9fd);
    color: var(--erp-text);
    box-shadow: 0 10px 24px rgba(17, 42, 79, 0.06);
    text-align: right;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.sales-product-card:hover:enabled {
    transform: translateY(-2px);
    border-color: rgba(15, 76, 129, 0.35);
    box-shadow: 0 16px 30px rgba(17, 42, 79, 0.1);
}

.sales-product-card:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.sales-product-card strong {
    font-size: 1rem;
}

.sales-product-card span,
.sales-product-card small {
    color: var(--erp-text-soft);
}

.sales-qty-controls {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.sales-qty-controls span {
    min-width: 3.75rem;
    text-align: center;
    font-weight: 700;
}

.sales-discount-input {
    min-width: 7rem;
}

.sales-row-actions {
    display: inline-flex;
    gap: 0.5rem;
}

.sales-return-line-input {
    min-width: 7.5rem;
}

.sales-return-lookup-grid,
.sales-return-summary-grid {
    margin-top: 1rem;
}

.sales-return-page>.content-card:has(> h1:only-child) {
    display: none;
}

.sales-return-page .dashboard-grid {
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
}

.sales-return-page .table-card__table {
    min-width: 72rem;
}

.sales-return-page .table-card {
    overflow-x: auto;
}

.purchase-return-lookup-grid,
.purchases-summary-grid {
    margin-top: 1rem;
}

.product-categories-metrics.dashboard-grid {
    grid-template-columns: minmax(300px, 360px) minmax(0, 1fr);
}

@media (max-width: 900px) {
    .product-categories-metrics.dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

.pos-session-summary-grid {
    margin-top: 1rem;
}

.pos-session-link-bar {
    margin-top: 1rem;
    flex-wrap: wrap;
}

.pos-session-close-table .form-control {
    min-width: 8rem;
}

.erp-shell__content>.pos-session-current-card,
.erp-shell__content>.pos-session-close-card {
    flex: 1 1 100%;
    min-width: 0;
}

.pos-session-toast {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 1080;
    margin: 0;
    min-width: min(24rem, calc(100vw - 2rem));
    max-width: min(30rem, calc(100vw - 2rem));
    pointer-events: none;
    animation: pos-session-toast-in 0.2s ease;
}

.pos-session-toast--success {
    background: #d1e7dd;
    color: #0a3622;
}

.pos-session-toast--danger {
    background: #f8d7da;
    color: #58151c;
}

@keyframes pos-session-toast-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cash-movement-form {
    margin-top: 1rem;
}

.exchange-preview {
    margin-top: 1rem;
    padding: 1rem 1.25rem;
    border: 1px solid rgba(15, 76, 129, 0.18);
    border-radius: var(--erp-radius-md);
    background: linear-gradient(180deg, rgba(231, 245, 255, 0.85), rgba(255, 255, 255, 0.96));
    color: var(--erp-text);
}

.status-pill--neutral {
    background: rgba(148, 163, 184, 0.18);
    color: #334155;
}

.status-pill--positive {
    background: rgba(22, 163, 74, 0.16);
    color: #166534;
}

.status-pill--negative {
    background: rgba(220, 38, 38, 0.16);
    color: #991b1b;
}

.blazor-error-boundary {
    background: #b42318;
    border-radius: 14px;
    padding: 1rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "حدث خطأ في الواجهة.";
}

#blazor-error-ui {
    position: fixed;
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
    display: none;
    padding: 0.85rem 1rem;
    background: rgba(180, 35, 24, 0.96);
    color: #fff;
    border-radius: 14px;
    box-shadow: var(--erp-shadow);
    z-index: 1000;
}

#blazor-error-ui .reload {
    color: #fff;
    text-decoration: underline;
    margin-inline: 0.75rem;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    float: left;
}

@media (max-width: 1100px) {
    .erp-shell__main {
        padding: 1rem;
        height: auto;
    }

    .erp-shell {
        height: auto;
    }

    .erp-shell__content {
        overflow: visible;
        padding-inline-end: 0;
    }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-home {
        min-height: auto;
    }

    .dashboard-home__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .migration-card__grid {
        grid-template-columns: 1fr;
    }

    .sales-workspace {
        grid-template-columns: 1fr;
    }

    .sales-stage__catalog,
    .sales-control-deck {
        grid-template-columns: 1fr;
    }

    .product-image-upload {
        grid-template-columns: 1fr;
    }

    .store-banner-upload {
        grid-template-columns: 1fr;
    }

    .product-units-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "forms"
            "table";
    }

    .product-editor-workspace {
        height: auto;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }

    .product-editor-page {
        grid-template-columns: 1fr;
    }

    .product-editor-page> :nth-child(1),
    .product-editor-page> :nth-child(2),
    .product-editor-page> :nth-child(n + 3) {
        grid-column: 1;
    }

    .product-editor-page> :nth-child(2) {
        position: static;
        align-self: auto;
        display: block;
    }

    .product-editor-page> :first-child .erp-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-editor-overview {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .product-editor-table-scroll .table-card__table {
        min-width: 0;
    }

    .product-unit-create__form,
    .purchase-quick-search,
    .sales-pos-header,
    .sales-pos-topbar,
    .sales-search-strip,
    .sales-search-strip__tabs,
    .sales-search-strip__search,
    .sales-summary-card__meta,
    .users-permission-card__header {
        flex-direction: column;
    }

    .login-shell {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }

    .login-card {
        order: 1;
    }

    .login-panel {
        order: 2;
        min-height: 320px;
    }

    .login-panel__content {
        max-width: none;
    }

    .login-panel__lottie {
        height: 165px;
    }
}

@media (max-width: 900px) {
    .erp-workbench {
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .erp-workbench__sidebar,
    .erp-workbench__main {
        overflow: visible;
    }

    .erp-table-card {
        min-height: auto;
    }

    .erp-form-grid {
        grid-template-columns: 1fr;
    }

    .product-editor-overview {
        grid-template-columns: 1fr;
    }

    .product-editor-page> :first-child .erp-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .erp-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .erp-topbar__center {
        position: static;
        transform: none;
        width: 100%;
        display: flex;
        justify-content: center;
        pointer-events: auto;
    }

    .erp-topbar__page-title {
        white-space: normal;
    }

    .metric-card {
        min-height: 108px;
        padding: 0.9rem 0.95rem;
    }

    .erp-topbar__subtitle {
        text-align: right;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .dashboard-home__grid {
        grid-template-columns: 1fr;
    }

    .dashboard-home__button {
        min-height: 96px;
    }

    .table-card__table {
        display: table;
        overflow: visible;
        white-space: normal;
    }

    .login-form__footer {
        flex-direction: column;
        align-items: stretch;
    }

    .login-shell,
    .login-panel,
    .login-card {
        padding: 0.9rem;
    }

    .login-card__logo {
        width: 96px;
        height: 96px;
    }

    .login-panel h1 {
        font-size: clamp(1.6rem, 8vw, 2rem);
    }

    .login-input-wrap--password .form-control {
        padding-inline-end: 3.2rem;
    }

    .login-password-toggle span {
        display: none;
    }

    .login-password-toggle {
        min-width: 2.2rem;
        padding: 0 0.55rem;
    }

    .login-panel__lottie {
        height: 150px;
    }

    .sales-filter-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .sales-quick-grid {
        grid-template-columns: 1fr;
    }

    .users-permission-card__actions {
        align-items: stretch;
    }
}

.purchase-audit-toolbar {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.purchase-audit-shell {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(320px, 360px) minmax(0, 1fr);
    align-items: start;
}

.purchase-audit-queue,
.purchase-audit-details {
    display: grid;
    gap: 1rem;
}

.purchase-audit-queue__header {
    background: #fff;
    border: 1px solid rgba(13, 110, 253, 0.12);
    border-radius: 1.25rem;
    padding: 1.1rem 1.25rem;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.purchase-audit-list {
    display: grid;
    gap: 0.8rem;
}

.purchase-audit-row {
    width: 100%;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.15rem;
    padding: 1rem;
    background: #fff;
    text-align: right;
    display: grid;
    gap: 0.55rem;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.06);
    transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.purchase-audit-row:hover {
    border-color: rgba(13, 110, 253, 0.35);
    box-shadow: 0 14px 32px rgba(13, 110, 253, 0.12);
    transform: translateY(-1px);
}

.purchase-audit-row--selected {
    border-color: rgba(13, 110, 253, 0.55);
    background: linear-gradient(180deg, rgba(234, 245, 255, 0.95), #fff);
    box-shadow: 0 18px 36px rgba(13, 110, 253, 0.14);
}

.purchase-audit-row__top,
.purchase-audit-row__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.purchase-audit-row__meta {
    color: #64748b;
    font-size: 0.94rem;
}

.purchase-audit-lock-note {
    border: 1px solid rgba(25, 135, 84, 0.24);
    background: rgba(25, 135, 84, 0.06);
    border-radius: 1rem;
    padding: 1rem 1.1rem;
}

.purchase-audit-lock-note--warning {
    border-color: rgba(255, 193, 7, 0.3);
    background: rgba(255, 193, 7, 0.12);
}

.purchase-audit-lock-note strong {
    display: block;
    margin-bottom: 0.35rem;
}

.purchase-audit-empty {
    min-height: 220px;
    align-content: center;
}

.audit-table-row--selected {
    background: rgba(13, 110, 253, 0.08);
}

.audit-simple-page {
    display: grid;
    gap: 1rem;
}

.audit-simple-filters__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.audit-simple-layout {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    align-items: start;
}

.audit-simple-list,
.audit-simple-details {
    display: grid;
    gap: 1rem;
}

.audit-simple-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.audit-simple-section-head h1 {
    margin: 0;
    font-size: 1.3rem;
}

.audit-simple-table-wrap {
    overflow: auto;
    max-height: 56vh;
}

.audit-simple-list .table-card__table tbody tr {
    cursor: pointer;
}

.audit-simple-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1rem;
    color: var(--erp-text-soft);
    font-size: 0.92rem;
}

.audit-simple-subtitle {
    margin: 0.2rem 0 0;
    font-size: 1rem;
    color: var(--erp-text-soft);
}

.audit-simple-actions {
    position: sticky;
    bottom: 0.8rem;
    z-index: 6;
    border: 1px solid rgba(13, 110, 253, 0.2);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
}

.audit-simple-actions__buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.audit-simple-actions__meta {
    margin-top: 0.8rem;
    color: var(--erp-text-soft);
    font-size: 0.9rem;
}

@media (max-width: 1100px) {
    .purchase-audit-shell {
        grid-template-columns: 1fr;
    }

    .audit-simple-filters__grid,
    .audit-simple-layout,
    .audit-simple-meta {
        grid-template-columns: 1fr;
    }

    .audit-simple-table-wrap {
        max-height: 40vh;
    }

    .audit-simple-actions__buttons {
        align-items: stretch;
    }

    .audit-simple-actions__buttons .btn {
        width: 100%;
    }
}

/* Global input override to align text fields with modern dropdown UI */
input.form-control,
textarea.form-control,
.form-control {
    border-radius: 16px !important;
    border: 1px solid var(--erp-field-border) !important;
    background-color: var(--erp-field-bg) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    color: var(--erp-text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease !important;
}

input.form-control,
.form-control:not(textarea) {
    min-height: 3rem;
    padding-inline: 1rem;
}

textarea.form-control {
    padding: 0.72rem 1rem;
}

input.form-control:hover:not(:disabled):not([readonly]),
textarea.form-control:hover:not(:disabled):not([readonly]),
.form-control:hover:not(:disabled):not([readonly]) {
    border-color: rgba(15, 76, 129, 0.3) !important;
}

input.form-control:focus,
textarea.form-control:focus,
.form-control:focus {
    border-color: var(--erp-field-border-focus) !important;
    box-shadow: var(--erp-field-focus-ring), var(--erp-field-shadow) !important;
    background-color: var(--erp-field-bg) !important;
}

input.form-control:disabled,
textarea.form-control:disabled,
.form-control:disabled {
    background-color: #f3f6fb !important;
    color: #8a97ac !important;
    opacity: 1 !important;
}

/* Global setting: remove all shadows from card-like components across the project */
[class*="card"] {
    box-shadow: none !important;
}

.erp-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    margin-top: 1rem;
    color: #50627f;
    font-weight: 700;
}

.erp-pagination__actions {
    display: flex;
    gap: 0.5rem;
}

.sales-catalog-pagination {
    padding: 0 0.25rem 0.25rem;
}

.page-loading {
    width: 100%;
    min-height: min(18rem, 48vh);
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(15, 76, 129, 0.14);
    border-radius: var(--erp-radius-lg);
    background: rgba(255, 255, 255, 0.96);
    color: var(--erp-text);
    text-align: right;
}

.page-loading__spinner {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 999px;
    border: 0.32rem solid rgba(15, 76, 129, 0.16);
    border-top-color: #0f4c81;
    animation: page-loading-spin 0.8s linear infinite;
}

.page-loading__content h1 {
    margin: 0;
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    line-height: 1.35;
    font-weight: 900;
}

.page-loading__content p {
    margin: 0.35rem 0 0;
    color: var(--erp-text-soft);
    line-height: 1.7;
}

.page-loading--overlay {
    min-height: 0;
    width: min(32rem, calc(100vw - 2rem));
    box-shadow: 0 18px 45px rgba(17, 42, 79, 0.16) !important;
}

.page-navigation-overlay {
    position: fixed;
    inset: 0;
    z-index: 1250;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(245, 247, 251, 0.64);
    backdrop-filter: blur(3px);
}

.sales-fullscreen-shell>.content-card:first-child {
    min-height: calc(100vh - 2.5rem);
    display: grid;
    align-content: center;
    justify-items: center;
    text-align: center;
}

.sales-fullscreen-shell>.content-card:first-child h1 {
    position: relative;
    margin: 0;
    padding-top: 4.4rem;
    font-size: clamp(1.5rem, 3vw, 2.2rem);
}

.sales-fullscreen-shell>.content-card:first-child h1::before {
    content: "";
    position: absolute;
    top: 0;
    inset-inline-start: calc(50% - 1.7rem);
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 999px;
    border: 0.34rem solid rgba(15, 76, 129, 0.16);
    border-top-color: #0f4c81;
    animation: page-loading-spin 0.8s linear infinite;
}

.sales-fullscreen-shell>.content-card:first-child .section-lead {
    margin-inline: auto;
    text-align: center;
}

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

@media (max-width: 640px) {
    .page-loading {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }
}

/* 2026 visual identity refresh */
@font-face {
    font-family: "Zain";
    src: url("/fonts/zain/zain-300.ttf") format("truetype");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Zain";
    src: url("/fonts/zain/zain-400.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Zain";
    src: url("/fonts/zain/zain-700.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Zain";
    src: url("/fonts/zain/zain-800.ttf") format("truetype");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Zain";
    src: url("/fonts/zain/zain-900.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}

:root,
html[data-theme="dark"] {
    color-scheme: dark;
    --erp-bg: #111715;
    --erp-bg-elevated: #151d1a;
    --erp-surface: #1b2420;
    --erp-surface-muted: #22302b;
    --erp-text: #eef5f1;
    --erp-text-soft: #a9b8b1;
    --erp-border: #31433b;
    --erp-primary: #55c2a9;
    --erp-primary-strong: #7bd8c2;
    --erp-primary-soft: #1d3932;
    --erp-accent: #e1ad55;
    --erp-danger: #ef7777;
    --erp-success: #69d19e;
    --erp-field-bg: #151d1a;
    --erp-field-border: #3a4d44;
    --erp-field-border-focus: rgba(85, 194, 169, 0.62);
    --erp-field-focus-ring: 0 0 0 0.16rem rgba(85, 194, 169, 0.22);
    --erp-field-shadow: none;
    --erp-btn-radius: 7px;
    --erp-btn-shadow: none;
    --erp-btn-shadow-hover: none;
    --erp-sidebar-width: 18rem;
}

html,
body {
    background: var(--erp-bg);
    color: var(--erp-text);
    font-family: "Zain", "Segoe UI", Tahoma, sans-serif;
}

body {
    background: linear-gradient(180deg, var(--erp-bg-elevated) 0%, var(--erp-bg) 100%);
}

button,
input,
select,
textarea {
    font-family: inherit;
}

.erp-shell {
    min-height: 100dvh;
    height: 100dvh;
    display: grid;
    grid-template-columns: var(--erp-sidebar-width) minmax(0, 1fr);
    gap: 0;
    background: var(--erp-bg);
}

.erp-shell__sidebar {
    min-height: 0;
    padding: 0.75rem;
    border-inline-start: 1px solid var(--erp-border);
    background: var(--erp-surface);
}

.erp-shell__main {
    width: 100%;
    padding: 0.75rem 1rem 1rem;
    background: var(--erp-bg);
}

.erp-shell__content {
    gap: 0.75rem;
}

.erp-topbar {
    min-height: 3.4rem;
    margin-bottom: 0.75rem;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: var(--erp-surface);
}

.erp-topbar__title {
    color: var(--erp-text);
    font-size: 1.05rem;
    font-weight: 900;
}

.erp-topbar__page-title {
    color: var(--erp-primary-strong);
    font-size: 1.05rem;
}

.erp-sidebar {
    height: 100%;
    padding: 0;
    gap: 0.85rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.erp-sidebar__brand {
    padding: 0.35rem 0.45rem 0.65rem;
    border-bottom: 1px solid var(--erp-border);
}

.erp-sidebar__brand h1 {
    margin: 0;
    color: var(--erp-primary-strong);
    font-size: 1.15rem;
    letter-spacing: 0;
}

.erp-sidebar__brand p {
    margin-top: 0.25rem;
    color: var(--erp-text-soft);
    font-size: 0.82rem;
}

.erp-sidebar__profile {
    gap: 0.65rem;
    padding: 0.65rem;
    border-color: var(--erp-border);
    border-radius: 8px;
    background: var(--erp-surface-muted);
}

.erp-sidebar__avatar {
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 8px;
    background: var(--erp-primary);
    color: #fff;
    font-size: 0.92rem;
}

.erp-nav-list {
    gap: 0.25rem;
    overflow-y: auto;
    padding-inline-end: 0.1rem;
}

.erp-nav-link {
    min-height: 2.75rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.65rem;
    padding: 0.62rem 0.7rem;
    border-radius: 8px;
    color: var(--erp-text-soft);
}

.erp-nav-link:hover {
    background: var(--erp-surface-muted);
    border-color: transparent;
    color: var(--erp-text);
}

.erp-nav-link.active {
    background: var(--erp-primary-soft);
    border-color: transparent;
    color: var(--erp-primary-strong);
    box-shadow: inset 3px 0 0 var(--erp-primary);
}

.erp-nav-link__icon {
    width: 1.35rem;
    display: inline-grid;
    place-items: center;
    color: inherit;
    font-size: 0.96rem;
}

.erp-nav-link__text {
    min-width: 0;
}

.erp-nav-link__title {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 850;
}

.erp-nav-link__description {
    display: none;
}

.content-card,
.metric-card,
.table-card,
.permission-card,
.migration-card,
.login-card,
.login-panel,
.purchase-audit-row,
.purchase-audit-queue__header {
    border-color: var(--erp-border);
    border-radius: 8px;
    background: var(--erp-surface);
    color: var(--erp-text);
}

.section-lead,
.table-card__description,
.purchase-audit-row__meta,
.audit-simple-subtitle,
.audit-simple-meta,
.erp-inline-meta {
    color: var(--erp-text-soft);
}

.btn-primary {
    border-color: var(--erp-primary) !important;
    background: var(--erp-primary) !important;
    color: #fff !important;
}

.btn-outline-primary {
    border-color: var(--erp-primary) !important;
    color: var(--erp-primary-strong) !important;
}

.btn-outline-primary:hover {
    background: var(--erp-primary) !important;
    color: #fff !important;
}

.form-control,
input.form-control,
textarea.form-control {
    background-color: var(--erp-field-bg) !important;
    border-color: var(--erp-field-border) !important;
    color: var(--erp-text) !important;
    border-radius: 7px !important;
}

.form-control:focus,
input.form-control:focus,
textarea.form-control:focus {
    border-color: var(--erp-field-border-focus) !important;
    box-shadow: var(--erp-field-focus-ring) !important;
}

.dashboard-home--welcome,
.dashboard-home--insights {
    min-height: calc(100dvh - 6rem);
    padding: 1rem;
}

.dashboard-home--insights {
    justify-content: flex-start;
    gap: 1rem;
}

.dashboard-home__intro--insights {
    text-align: right;
}

.dashboard-home__intro--insights .section-lead {
    margin-inline: 0;
}

.dashboard-home__eyebrow {
    display: inline-flex;
    margin-bottom: 0.6rem;
    color: var(--erp-primary-strong);
    font-size: 0.85rem;
    font-weight: 900;
}

.dashboard-home__summary {
    width: min(100%, 46rem);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-home__summary-item {
    min-height: 6.5rem;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.35rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: var(--erp-surface);
}

.dashboard-home__summary-item span {
    color: var(--erp-primary-strong);
    font-size: 1.65rem;
    font-weight: 950;
}

.dashboard-home__summary-item small {
    color: var(--erp-text-soft);
    font-weight: 800;
}

.dashboard-home__metrics.dashboard-grid {
    width: 100%;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-home__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
}

.dashboard-home__recent-card {
    min-width: 0;
}

.dashboard-home__recent-card .table-card__header {
    margin-bottom: 0.8rem;
}

.dashboard-home__recent-card h2 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 900;
}

.dashboard-home__recent-card .table-card__table {
    margin: 0;
}

.dashboard-home__recent-card th,
.dashboard-home__recent-card td {
    color: var(--erp-text);
    border-color: var(--erp-border);
}

.dashboard-home__recent-card thead th {
    color: var(--erp-text-soft);
    font-weight: 900;
}

.login-shell {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 25rem);
    place-content: center;
    padding: 1rem;
    background: var(--erp-bg);
    overflow: auto;
}

.login-shell::before,
.login-shell::after,
.login-panel {
    display: none;
}

.login-card {
    width: min(100%, 25rem);
    padding: 1.35rem;
    align-content: start;
    gap: 1.1rem;
    border-radius: 8px;
    background: var(--erp-surface);
    backdrop-filter: none;
}

.login-card__header {
    text-align: right;
}

.login-card__header h1 {
    margin: 0;
    color: var(--erp-text);
    font-size: 1.45rem;
    font-weight: 950;
}

.login-card__header h2,
.login-card__header p,
.login-card__logo-wrap,
.login-helper {
    display: none;
}

.login-form {
    margin-top: 0;
    gap: 0.9rem;
}

.login-form label {
    color: var(--erp-text);
    font-size: 0.92rem;
}

.login-input-wrap__icon {
    color: var(--erp-text-soft);
}

.login-password-toggle {
    color: var(--erp-primary-strong);
}

.login-form__submit {
    width: 100%;
    min-height: 2.85rem;
    border-radius: 7px;
}

.page-navigation-overlay {
    background: color-mix(in srgb, var(--erp-bg) 72%, transparent);
}

@media (max-width: 1200px) {
    .erp-shell {
        height: auto;
        grid-template-columns: 1fr;
    }

    .erp-shell__sidebar {
        position: sticky;
        top: 0;
        z-index: 40;
        border-inline-start: 0;
        border-bottom: 1px solid var(--erp-border);
    }

    .erp-sidebar {
        gap: 0.65rem;
    }

    .erp-sidebar__profile,
    .erp-sidebar__logout {
        display: none;
    }

    .erp-nav-list {
        flex-direction: row;
        gap: 0.35rem;
        overflow-x: auto;
        padding-bottom: 0.1rem;
    }

    .erp-nav-link {
        flex: 0 0 auto;
        min-width: 8.5rem;
    }

    .erp-shell__main {
        height: auto;
    }

    .dashboard-home__metrics.dashboard-grid,
    .dashboard-home__content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .erp-topbar {
        align-items: stretch;
    }

    .erp-topbar__actions {
        width: 100%;
        justify-content: stretch;
    }

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

    .dashboard-home__metrics.dashboard-grid,
    .dashboard-home__content {
        grid-template-columns: 1fr;
    }

    .login-shell,
    .login-card {
        padding: 1rem;
    }
}

/* Final single-theme polish */
html[data-theme="dark"] .metric-card::before,
html[data-theme="dark"] .metric-card::after {
    display: none !important;
}

html[data-theme="dark"] .metric-card {
    background: #17221e !important;
    border-color: #33483f !important;
}

html[data-theme="dark"] .metric-card__label,
html[data-theme="dark"] .metric-card__caption {
    color: #b8cac2 !important;
}

html[data-theme="dark"] .metric-card__value {
    color: #8ee4d0 !important;
}

html[data-theme="dark"] .erp-table-scroll,
html[data-theme="dark"] .table-responsive {
    background: #121c18;
}

html[data-theme="dark"] .erp-table-scroll .table-card__table thead th,
html[data-theme="dark"] .table-card__table thead th,
html[data-theme="dark"] .table-card__table th {
    background: #20332c !important;
    color: #d9eee7 !important;
    border-color: #355046 !important;
}

html[data-theme="dark"] .table-card__table td {
    background: #121c18 !important;
    color: #eef5f1 !important;
    border-color: #2e453c !important;
}

html[data-theme="dark"] .table-card__table tbody tr:hover td {
    background: #1a2a24 !important;
}

html[data-theme="dark"] .btn-outline-primary,
html[data-theme="dark"] .btn-outline-secondary {
    background: #e9f4f1 !important;
    border-color: #cde2db !important;
    color: #176b5d !important;
}

html[data-theme="dark"] .btn-outline-primary:hover,
html[data-theme="dark"] .btn-outline-secondary:hover {
    background: #55c2a9 !important;
    border-color: #55c2a9 !important;
    color: #10211c !important;
}

html[data-theme="dark"] .btn-outline-danger {
    background: #fff4f3 !important;
    border-color: #e3aaa2 !important;
    color: #a7362a !important;
}

html[data-theme="dark"] .btn-outline-danger:hover {
    background: #ffe8e6 !important;
    border-color: #d58f86 !important;
    color: #8f2c22 !important;
}

html[data-theme="dark"] .form-label {
    color: #eef5f1;
}

html[data-theme="dark"] .sales-summary-card,
html[data-theme="dark"] .sales-quick-grid,
html[data-theme="dark"] .sales-checkout-panel,
html[data-theme="dark"] .sales-footer-actions {
    background: #121c18 !important;
    border-color: #2e453c !important;
    color: #eef5f1 !important;
}

html[data-theme="dark"] .sales-summary-card__label,
html[data-theme="dark"] .sales-summary-card__value {
    color: #8ee4d0 !important;
}

html[data-theme="dark"] .sales-summary-card__discount .form-control {
    background: #0d1714 !important;
    border-color: #4b6a5e !important;
    color: #eef5f1 !important;
}

html[data-theme="dark"] .sales-customer-debt-summary {
    background: rgba(85, 194, 169, 0.1);
    border-color: rgba(85, 194, 169, 0.28);
}

html[data-theme="dark"] .sales-customer-debt-summary strong {
    color: #d9eee7;
}

html[data-theme="dark"] .sales-summary-card__meta {
    border-color: #355046 !important;
    color: #b8cac2 !important;
}

html[data-theme="dark"] .sales-quick-tile {
    background: #17221e !important;
    border-color: #3c5f54 !important;
    color: #bff1e5 !important;
}

html[data-theme="dark"] .sales-quick-customer-dialog {
    background: #151f1b !important;
    border-color: #3c5f54 !important;
    color: #eef5f1 !important;
}

html[data-theme="dark"] .sales-quick-tile--success {
    background: #123027 !important;
    border-color: #3f9a7f !important;
    color: #8ee4d0 !important;
}

html[data-theme="dark"] .sales-quick-tile--danger {
    background: #2a1b1b !important;
    border-color: #8b4c4c !important;
    color: #ffc4c4 !important;
}

html[data-theme="dark"] .sales-checkout-panel .form-label {
    color: #d9eee7 !important;
    font-weight: 800;
}

html[data-theme="dark"] .sales-checkout-panel .form-control,
html[data-theme="dark"] .sales-quick-tile .form-control {
    background: #0d1714 !important;
    border-color: #5f8176 !important;
    color: #eef5f1 !important;
}

/* Complete dark treatment for the POS catalog */
html[data-theme="dark"] .sales-fullscreen-shell {
    background: radial-gradient(circle at 85% 0%, rgba(85, 194, 169, 0.08), transparent 28%), #0f1613;
    color: #eef5f1;
}

html[data-theme="dark"] .sales-pos-topbar,
html[data-theme="dark"] .sales-stage__main,
html[data-theme="dark"] .sales-stage__categories,
html[data-theme="dark"] .sales-invoice-panel,
html[data-theme="dark"] .sales-session-required {
    background: #151f1b !important;
    border-color: #33483f !important;
    color: #eef5f1 !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24) !important;
}

html[data-theme="dark"] .sales-toggle-chip,
html[data-theme="dark"] .sales-category-chip {
    background: #18241f !important;
    border-color: #385248 !important;
    color: #a8ded1 !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .sales-toggle-chip:hover,
html[data-theme="dark"] .sales-category-chip:hover {
    background: #20332c !important;
    border-color: #55a891 !important;
    color: #e9faf5 !important;
}

html[data-theme="dark"] .sales-toggle-chip.is-active,
html[data-theme="dark"] .sales-category-chip.is-active {
    background: #245346 !important;
    border-color: #65cbb2 !important;
    color: #f2fffb !important;
    box-shadow: inset 3px 0 0 #7bd8c2 !important;
}

html[data-theme="dark"] .sales-product-card,
html[data-theme="dark"] .sales-product-card--pos {
    background: #19241f !important;
    border-color: #3a5148 !important;
    color: #f0f7f4 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

html[data-theme="dark"] .sales-product-card:hover:enabled,
html[data-theme="dark"] .sales-product-card--pos:hover:enabled {
    background: #203029 !important;
    border-color: #67cbb3 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26) !important;
}

html[data-theme="dark"] .sales-product-card--pos:disabled {
    opacity: 0.72;
    background: #161e1b !important;
}

html[data-theme="dark"] .sales-product-card--pos strong {
    color: #edf8f4 !important;
}

html[data-theme="dark"] .sales-product-card__meta,
html[data-theme="dark"] .sales-catalog-pagination {
    color: #aebfb8 !important;
}

html[data-theme="dark"] .sales-product-card__image,
html[data-theme="dark"] .sales-product-card__image--placeholder {
    background: #101815 !important;
    border: 1px solid #2d4038;
    color: #8fa49b !important;
}

html[data-theme="dark"] .sales-product-card__price {
    background: #203b50 !important;
    color: #9fd2ff !important;
}

html[data-theme="dark"] .sales-product-card__stock {
    background: #19382f !important;
    color: #8de0c9 !important;
}

html[data-theme="dark"] .sales-empty-state {
    background: linear-gradient(180deg, #151f1b, #121a17) !important;
    border: 1px dashed #3a5148;
    color: #aebfb8 !important;
}

html[data-theme="dark"] .sales-unit-picker {
    background: #111a17 !important;
    border-color: #426056 !important;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .sales-unit-picker__option {
    background: #19241f !important;
    border-color: #3a5148 !important;
    color: #eef5f1 !important;
}

html[data-theme="dark"] .sales-unit-picker__option:hover:enabled,
html[data-theme="dark"] .sales-unit-picker__option.is-base {
    background: #20382f !important;
    border-color: #67cbb3 !important;
}

html[data-theme="dark"] .sales-unit-picker__option strong {
    color: #8ee4d0 !important;
}

html[data-theme="dark"] .sales-invoice-panel .table-card__table thead th {
    background: #203129 !important;
    color: #e5f5ef !important;
    border-color: #3a5148 !important;
}

html[data-theme="dark"] .sales-invoice-panel__row.is-selected td {
    background: #244338 !important;
}

html[data-theme="dark"] .sales-footer-actions {
    background: rgba(16, 25, 21, 0.96) !important;
    border: 1px solid #31473e !important;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.22);
}

/* POS sales must keep its dark palette even before the global theme script runs. */
.sales-fullscreen-shell {
    background: radial-gradient(circle at 85% 0%, rgba(85, 194, 169, 0.08), transparent 28%), #0f1613 !important;
    color: #eef5f1 !important;
}

.sales-fullscreen-shell .sales-pos-topbar,
.sales-fullscreen-shell .sales-stage__main,
.sales-fullscreen-shell .sales-stage__categories,
.sales-fullscreen-shell .sales-invoice-panel,
.sales-fullscreen-shell .sales-summary-card,
.sales-fullscreen-shell .sales-quick-grid,
.sales-fullscreen-shell .sales-checkout-panel,
.sales-fullscreen-shell .sales-session-required {
    background: #151f1b !important;
    border-color: #33483f !important;
    color: #eef5f1 !important;
    box-shadow: 0 16px 38px rgba(0, 0, 0, 0.24) !important;
}

.sales-fullscreen-shell .sales-search-strip .form-control,
.sales-fullscreen-shell .sales-checkout-panel .form-control,
.sales-fullscreen-shell .sales-quick-tile .form-control {
    background: #0d1714 !important;
    border-color: #5f8176 !important;
    color: #eef5f1 !important;
}

.sales-fullscreen-shell .sales-search-strip .form-control::placeholder,
.sales-fullscreen-shell .form-control::placeholder {
    color: #8ea39a !important;
    opacity: 1;
}

.sales-fullscreen-shell .form-label,
.sales-fullscreen-shell .sales-checkout-panel .form-label {
    color: #d9eee7 !important;
    font-weight: 800;
}

.sales-fullscreen-shell .sales-toggle-chip,
.sales-fullscreen-shell .sales-category-chip {
    background: #18241f !important;
    border-color: #385248 !important;
    color: #a8ded1 !important;
    box-shadow: none !important;
}

.sales-fullscreen-shell .sales-toggle-chip:hover,
.sales-fullscreen-shell .sales-category-chip:hover {
    background: #20332c !important;
    border-color: #55a891 !important;
    color: #e9faf5 !important;
}

.sales-fullscreen-shell .sales-toggle-chip.is-active,
.sales-fullscreen-shell .sales-category-chip.is-active {
    background: #245346 !important;
    border-color: #65cbb2 !important;
    color: #f2fffb !important;
    box-shadow: inset 3px 0 0 #7bd8c2 !important;
}

.sales-fullscreen-shell .sales-product-card,
.sales-fullscreen-shell .sales-product-card--pos {
    background: #19241f !important;
    border-color: #3a5148 !important;
    color: #f0f7f4 !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18) !important;
}

.sales-fullscreen-shell .sales-product-card:hover:enabled,
.sales-fullscreen-shell .sales-product-card--pos:hover:enabled {
    background: #203029 !important;
    border-color: #67cbb3 !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.26) !important;
}

.sales-fullscreen-shell .sales-product-card--pos:disabled {
    opacity: 0.86;
    background: #161e1b !important;
}

.sales-fullscreen-shell .sales-product-card--pos strong {
    color: #edf8f4 !important;
}

.sales-fullscreen-shell .sales-product-card__meta,
.sales-fullscreen-shell .sales-catalog-pagination,
.sales-fullscreen-shell .sales-summary-card__meta,
.sales-fullscreen-shell .sales-summary-card__discount label {
    color: #b8cac2 !important;
}

.sales-fullscreen-shell .sales-product-card__image,
.sales-fullscreen-shell .sales-product-card__image--placeholder {
    background: #101815 !important;
    border: 1px solid #2d4038;
    color: #8fa49b !important;
}

.sales-fullscreen-shell .sales-product-card__price {
    background: #203b50 !important;
    color: #9fd2ff !important;
}

.sales-fullscreen-shell .sales-product-card__stock {
    background: #19382f !important;
    color: #8de0c9 !important;
}

.sales-fullscreen-shell .sales-summary-card__label,
.sales-fullscreen-shell .sales-summary-card__value {
    color: #8ee4d0 !important;
}

.sales-fullscreen-shell .sales-summary-card__meta {
    border-color: #355046 !important;
}

.sales-fullscreen-shell .sales-quick-tile {
    background: #17221e !important;
    border-color: #3c5f54 !important;
    color: #bff1e5 !important;
}

.sales-fullscreen-shell .sales-quick-tile--success {
    background: #123027 !important;
    border-color: #3f9a7f !important;
    color: #8ee4d0 !important;
}

.sales-fullscreen-shell .sales-quick-tile--danger {
    background: #2a1b1b !important;
    border-color: #8b4c4c !important;
    color: #ffc4c4 !important;
}

.sales-fullscreen-shell .sales-empty-state {
    background: linear-gradient(180deg, #151f1b, #121a17) !important;
    border: 1px dashed #3a5148;
    color: #aebfb8 !important;
}

.sales-fullscreen-shell .sales-invoice-panel .table-card__table thead th {
    background: #203129 !important;
    color: #e5f5ef !important;
    border-color: #3a5148 !important;
}

.sales-fullscreen-shell .sales-invoice-panel .table-card__table td {
    background: #14201b !important;
    color: #eef5f1 !important;
    border-color: #2c4038 !important;
}

.sales-fullscreen-shell .sales-invoice-panel__row.is-selected td {
    background: #244338 !important;
}

.sales-fullscreen-shell .sales-footer-actions {
    background: rgba(16, 25, 21, 0.96) !important;
    border: 1px solid #31473e !important;
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.22);
}

/* Debts workspace */
.debts-page,
.debt-details-page {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.debts-page__header,
.debt-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 1.5rem 1.75rem;
    background:
        radial-gradient(circle at 8% 20%, rgba(83, 201, 173, 0.12), transparent 30%),
        var(--erp-surface);
}

.debts-page__header h1,
.debt-details-header h1 {
    margin: 0.2rem 0 0.35rem;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    line-height: 1.15;
}

.debts-page__header p,
.debt-details-header p,
.debts-section-heading p {
    margin: 0;
    color: var(--erp-text-soft);
}

.debts-page__eyebrow {
    display: inline-block;
    color: var(--erp-primary);
    font-size: 0.82rem;
    font-weight: 900;
    letter-spacing: 0.02em;
}

.debts-page__count {
    min-width: 8rem;
    padding: 0.85rem 1.15rem;
    border: 1px solid var(--erp-border);
    border-radius: 18px;
    background: rgba(83, 201, 173, 0.08);
    text-align: center;
}

.debts-page__count strong,
.debts-page__count span {
    display: block;
}

.debts-page__count strong {
    color: var(--erp-primary);
    font-size: 1.75rem;
    line-height: 1;
}

.debts-page__count span {
    margin-top: 0.35rem;
    color: var(--erp-text-soft);
    font-size: 0.82rem;
}

.debts-filter-card,
.debts-currency-section,
.debts-list-card,
.debt-account-summary,
.debt-details-table-card,
.debt-settlement-card {
    padding: 1.35rem 1.5rem;
}

.debts-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.debts-section-heading h2 {
    margin: 0 0 0.25rem;
    font-size: 1.3rem;
}

.debts-section-heading p {
    font-size: 0.9rem;
}

.debts-filter-grid {
    display: grid;
    grid-template-columns: minmax(280px, 1.5fr) minmax(220px, 0.75fr) auto;
    align-items: end;
    gap: 0.85rem;
}

.debts-filter-grid__actions {
    display: flex;
    gap: 0.55rem;
    padding-bottom: 0.05rem;
}

.debts-filter-grid__actions .btn {
    min-width: 5.5rem;
    min-height: 3rem;
}

.debts-metrics.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.debts-metrics .metric-card,
.debt-details-metrics .metric-card {
    min-height: 0;
    padding: 1.15rem 1.3rem;
}

.debts-metrics .metric-card__value,
.debt-details-metrics .metric-card__value {
    white-space: nowrap;
    font-size: clamp(1.55rem, 2.6vw, 2rem);
}

.debts-currency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.8rem;
}

.debt-currency-card {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.1rem;
    border: 1px solid var(--erp-border);
    border-radius: 16px;
    background: var(--erp-surface-soft, rgba(127, 160, 148, 0.07));
}

.debt-currency-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.debt-currency-card > strong {
    font-size: 1.55rem;
    line-height: 1.1;
    white-space: nowrap;
}

.debt-currency-card > span,
.debt-currency-card__currency {
    color: var(--erp-text-soft);
    font-size: 0.85rem;
}

.debt-type-badge,
.debt-currency-badge,
.debt-status-badge,
.debt-section-count {
    display: inline-flex;
    align-items: center;
    width: max-content;
    max-width: 100%;
    padding: 0.28rem 0.65rem;
    border: 1px solid var(--erp-border);
    border-radius: 999px;
    background: var(--erp-surface-soft, rgba(127, 160, 148, 0.07));
    color: var(--erp-text);
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.debt-type-badge--customer {
    color: #2fa787;
    border-color: rgba(47, 167, 135, 0.3);
    background: rgba(47, 167, 135, 0.1);
}

.debt-type-badge--supplier {
    color: #d59c45;
    border-color: rgba(213, 156, 69, 0.32);
    background: rgba(213, 156, 69, 0.1);
}

.debts-empty-state {
    padding: 1.5rem;
    border: 1px dashed var(--erp-border);
    border-radius: 16px;
    color: var(--erp-text-soft);
    text-align: center;
}

.debts-table-scroll,
.debt-details-table-scroll {
    max-width: 100%;
    border-radius: 14px;
}

.debts-table-scroll .debts-table {
    min-width: 1120px;
    table-layout: auto;
}

.debts-list-card .debts-table-scroll {
    overflow-x: auto !important;
    overflow-y: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.debts-list-card .debts-table-scroll .debts-table {
    min-width: 1360px !important;
    table-layout: auto;
}

.debts-list-card .debts-table-scroll .debts-table th,
.debts-list-card .debts-table-scroll .debts-table td {
    white-space: nowrap;
}

.debts-list-card .debts-table-scroll .debt-contact-cell {
    min-width: 180px;
}

.debt-details-table-scroll .debt-details-table {
    min-width: 820px;
    table-layout: auto;
}

.debt-details-table-scroll .debt-vouchers-table {
    min-width: 720px;
    table-layout: auto;
}

.debts-table th,
.debts-table td,
.debt-details-table th,
.debt-details-table td,
.debt-vouchers-table th,
.debt-vouchers-table td {
    vertical-align: middle;
    overflow-wrap: normal !important;
}

.debt-contact-cell {
    display: grid;
    gap: 0.18rem;
    min-width: 9rem;
}

.debt-contact-cell span {
    color: var(--erp-text-soft);
    font-size: 0.78rem;
}

.debt-table__phone,
.debt-number,
.debt-date {
    direction: ltr;
    text-align: right;
    white-space: nowrap !important;
    font-variant-numeric: tabular-nums;
}

.debt-number {
    font-weight: 800;
}

.debt-number--muted {
    color: var(--erp-text-soft);
}

.debt-number--accent {
    color: var(--erp-primary);
}

.debt-details-header__copy {
    min-width: 0;
}

.debt-back-link {
    display: block;
    width: max-content;
    margin-bottom: 0.75rem;
    color: var(--erp-text-soft);
    font-size: 0.85rem;
    font-weight: 800;
    text-decoration: none;
}

.debt-back-link:hover {
    color: var(--erp-primary);
}

.debt-details-header__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.debt-details-header__meta span {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    background: var(--erp-surface-soft, rgba(127, 160, 148, 0.07));
    color: var(--erp-text-soft);
    font-size: 0.78rem;
}

.debt-details-header__balance {
    display: grid;
    min-width: min(18rem, 35%);
    padding: 1rem 1.2rem;
    border: 1px solid rgba(83, 201, 173, 0.35);
    border-radius: 20px;
    background: rgba(83, 201, 173, 0.09);
}

.debt-details-header__balance span,
.debt-details-header__balance small {
    color: var(--erp-text-soft);
}

.debt-details-header__balance strong {
    margin: 0.2rem 0;
    color: var(--erp-primary);
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    line-height: 1.1;
    white-space: nowrap;
}

.debt-details-metrics.dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.debt-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
}

.debt-summary-grid > div {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 1rem;
    border-inline-start: 3px solid rgba(83, 201, 173, 0.5);
    border-radius: 10px;
    background: var(--erp-surface-soft, rgba(127, 160, 148, 0.07));
}

.debt-summary-grid span,
.debt-settlement-facts span {
    color: var(--erp-text-soft);
    font-size: 0.78rem;
}

.debt-summary-grid strong {
    white-space: nowrap;
    font-size: 1rem;
}

.debt-section-count {
    color: var(--erp-primary);
}

.debt-settlement-layout {
    display: grid;
    grid-template-columns: minmax(250px, 0.75fr) minmax(0, 1.5fr);
    gap: 1.5rem;
}

.debt-settlement-summary {
    padding: 1.15rem;
    border: 1px solid var(--erp-border);
    border-radius: 18px;
    background: var(--erp-surface-soft, rgba(127, 160, 148, 0.07));
}

.debt-settlement-summary h2 {
    margin: 0.3rem 0 0.45rem;
    font-size: 1.35rem;
}

.debt-settlement-summary > p {
    margin: 0 0 1rem;
    color: var(--erp-text-soft);
    font-size: 0.9rem;
}

.debt-settlement-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
}

.debt-settlement-facts > div {
    display: grid;
    gap: 0.15rem;
    padding: 0.65rem;
    border-radius: 10px;
    background: var(--erp-surface);
}

.debt-settlement-form {
    align-self: center;
    min-width: 0;
}

.debt-settlement-form textarea {
    min-height: 7rem;
}

.manual-debt-card,
.manual-debt-balances-card {
    min-width: 0;
}

.manual-debt-note {
    padding: 0.38rem 0.75rem;
    border: 1px solid rgba(213, 156, 69, 0.32);
    border-radius: 999px;
    background: rgba(213, 156, 69, 0.1);
    color: #d59c45;
    font-size: 0.78rem;
    font-weight: 800;
    white-space: nowrap;
}

.manual-debt-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 0.85rem;
}

.manual-debt-form-grid__notes {
    grid-column: span 2;
}

.manual-debt-form-grid__action .btn {
    width: 100%;
    min-height: 3rem;
}

.manual-debt-table-scroll .manual-debt-table {
    min-width: 900px;
    table-layout: auto;
}

.manual-settlement-panel {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) repeat(3, minmax(180px, 1fr)) auto;
    align-items: end;
    gap: 0.8rem;
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid rgba(83, 201, 173, 0.35);
    border-radius: 16px;
    background: rgba(83, 201, 173, 0.07);
}

.manual-settlement-panel > div:first-child {
    display: grid;
    gap: 0.2rem;
    align-self: center;
}

.manual-settlement-panel > div:first-child span {
    color: var(--erp-text-soft);
    font-size: 0.78rem;
}

.manual-settlement-panel__actions {
    display: flex;
    gap: 0.45rem;
}

.manual-settlement-panel__actions .btn {
    min-height: 3rem;
    white-space: nowrap;
}

.manual-debt-history {
    margin-top: 1rem;
    border-top: 1px solid var(--erp-border);
    padding-top: 1rem;
}

.manual-debt-history > summary {
    width: max-content;
    cursor: pointer;
    color: var(--erp-primary);
    font-weight: 800;
}

.manual-debt-history__scroll {
    margin-top: 0.8rem;
}

.manual-debt-history__scroll .table-card__table {
    min-width: 760px;
    table-layout: auto;
}

html[data-theme="dark"] .debts-page__header,
html[data-theme="dark"] .debt-details-header,
html[data-theme="dark"] .debt-currency-card,
html[data-theme="dark"] .debt-summary-grid > div,
html[data-theme="dark"] .debt-settlement-summary,
html[data-theme="dark"] .debt-settlement-facts > div,
html[data-theme="dark"] .debt-details-header__meta span,
html[data-theme="dark"] .debt-type-badge,
html[data-theme="dark"] .debt-currency-badge,
html[data-theme="dark"] .debt-status-badge,
html[data-theme="dark"] .debt-section-count {
    background-color: #14211d;
}

@media (max-width: 1100px) {
    .debts-filter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(220px, 0.7fr);
    }

    .debts-filter-grid__actions {
        grid-column: 1 / -1;
    }

    .debt-details-metrics.dashboard-grid,
    .debt-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manual-debt-form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manual-settlement-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .manual-settlement-panel__actions {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .debts-page__header,
    .debt-details-header,
    .debts-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .debts-page__count,
    .debt-details-header__balance {
        width: 100%;
        min-width: 0;
    }

    .debts-filter-grid,
    .debts-metrics.dashboard-grid,
    .debt-details-metrics.dashboard-grid,
    .debt-summary-grid,
    .debt-settlement-layout {
        grid-template-columns: 1fr;
    }

    .manual-debt-form-grid,
    .manual-settlement-panel {
        grid-template-columns: 1fr;
    }

    .manual-debt-form-grid__notes,
    .manual-settlement-panel__actions {
        grid-column: auto;
    }

    .debts-filter-grid__actions {
        grid-column: auto;
    }

    .debts-filter-grid__actions .btn {
        flex: 1;
    }

    .debts-filter-card,
    .debts-currency-section,
    .debts-list-card,
    .debt-account-summary,
    .debt-details-table-card,
    .debt-settlement-card {
        padding: 1rem;
    }
}

/* Responsive rescue for half-width browser layouts */
.erp-shell,
.erp-shell__main,
.erp-shell__content,
.products-page-stack,
.products-page-card,
.erp-table-card {
    min-width: 0 !important;
    max-width: 100% !important;
}

.erp-shell__main,
.erp-shell__content,
.products-page-stack {
    width: 100% !important;
}

.erp-shell__content {
    overflow-x: hidden !important;
}

.erp-table-scroll {
    overflow-x: auto !important;
    overflow-y: auto;
    max-width: 100%;
}

.erp-table-scroll .table-card__table {
    min-width: 980px;
}

@media (max-width: 1400px) and (min-width: 1201px) {
    :root {
        --erp-sidebar-width: 15.75rem;
    }

    .erp-shell {
        width: 100% !important;
        max-width: 100vw !important;
        grid-template-columns: var(--erp-sidebar-width) minmax(0, 1fr) !important;
        overflow-x: hidden !important;
    }

    .erp-shell__sidebar {
        padding: 0.55rem !important;
    }

    .erp-sidebar__brand {
        padding-inline: 0.35rem !important;
    }

    .erp-sidebar__profile {
        padding: 0.55rem !important;
    }

    .erp-nav-link {
        min-height: 2.55rem !important;
        gap: 0.45rem !important;
        padding: 0.52rem 0.55rem !important;
    }

    .erp-shell__main {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin: 0 !important;
        padding: 0.7rem !important;
    }

    .erp-shell__content,
    .erp-shell__content > * {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .erp-topbar,
    .content-card,
    .table-card,
    .metric-card,
    .dashboard-grid,
    .debts-page,
    .debt-details-page {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .debts-page__header,
    .debt-details-header {
        gap: 1rem !important;
        padding: 1.15rem 1.25rem !important;
        overflow: hidden;
    }

    .debts-page__header > div:first-child,
    .debt-details-header__copy {
        min-width: 0;
        flex: 1 1 auto;
    }

    .debts-page__header h1,
    .debt-details-header h1 {
        font-size: clamp(1.6rem, 2.4vw, 2.05rem);
    }

    .debts-page__count {
        min-width: 6.8rem;
        padding: 0.75rem 0.9rem;
    }

    .debts-filter-card,
    .debts-currency-section,
    .debts-list-card,
    .debt-account-summary,
    .debt-details-table-card,
    .debt-settlement-card {
        padding: 1.1rem !important;
    }

    .debts-filter-grid {
        grid-template-columns: minmax(0, 1fr) minmax(190px, 0.55fr) !important;
    }

    .debts-filter-grid__actions {
        grid-column: 1 / -1;
        justify-content: flex-start;
    }

    .debts-metrics.dashboard-grid,
    .debt-details-metrics.dashboard-grid,
    .debt-summary-grid {
        gap: 0.65rem;
    }

    .debt-details-header__balance {
        min-width: min(15rem, 38%);
    }
}

@media (max-width: 1200px) {
    .erp-shell {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .erp-shell__content {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .erp-shell__content > * {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 1 auto !important;
    }

    .erp-shell__main {
        width: 100% !important;
        margin: 0 !important;
        padding: 0.75rem !important;
    }

    .erp-topbar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .products-page-metrics.dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: 100% !important;
    }

    .products-page-stack > * {
        width: 100% !important;
        max-width: 100% !important;
    }

    .products-filter-form--compact,
    .products-filter-form {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        grid-template-areas:
            "search search"
            "category category"
            "apply reset" !important;
        width: 100% !important;
    }

    .products-filter-form__apply,
    .products-filter-form__reset {
        justify-content: stretch !important;
    }

    .products-filter-form__apply > .btn,
    .products-filter-form__reset > .btn,
    .products-filter-form__reset > a.btn {
        width: 100% !important;
    }
}

@media (max-width: 760px) {
    .products-page-metrics.dashboard-grid,
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .products-filter-form--compact,
    .products-filter-form {
        grid-template-columns: minmax(0, 1fr) !important;
        grid-template-areas:
            "search"
            "category"
            "apply"
            "reset" !important;
    }

    .products-page-toolbar__header,
    .erp-topbar {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .products-page-toolbar__actions,
    .erp-topbar__actions {
        width: 100%;
        justify-content: stretch;
    }

    .products-page-toolbar__actions .btn,
    .erp-topbar__actions .btn,
    .erp-topbar__actions form,
    .erp-topbar__actions form .btn {
        width: 100%;
    }
}

/* Final storefront overrides: keep the public store visually separate from ERP forms. */
.shop-shell .form-control,
.shop-shell input.form-control,
.shop-shell textarea.form-control {
    min-height: 3rem !important;
    border: 1px solid #dbe2de !important;
    border-radius: 999px !important;
    background-color: #ffffff !important;
    color: #17201d !important;
    box-shadow: none !important;
}

.shop-shell textarea.form-control {
    border-radius: 18px !important;
}

.shop-shell .form-control::placeholder,
.shop-shell input.form-control::placeholder {
    color: #8a9691 !important;
}

.shop-shell .form-control:focus,
.shop-shell input.form-control:focus,
.shop-shell textarea.form-control:focus {
    border-color: var(--shop-primary, #168a73) !important;
    box-shadow: 0 0 0 0.2rem rgba(22, 138, 115, 0.14) !important;
}

.shop-shell .shop-tabs,
.shop-shell .shop-catalog,
.shop-shell .shop-cart,
.shop-shell .shop-tab-panel,
.shop-shell .shop-login-inline,
.shop-shell .shop-login-card,
.shop-shell .shop-product-card {
    border-radius: 8px !important;
}

.shop-shell .shop-tab {
    border-radius: 999px !important;
}

/* Store command center */
.erp-shell__content > .online-store-admin-page {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.online-store-admin-page {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 0.8rem;
}

.online-store-admin-page > * {
    width: 100%;
    min-width: 0;
    max-width: 100%;
}

.store-command-hero {
    position: relative;
    overflow: hidden;
    padding: 1.15rem;
    border-color: color-mix(in srgb, var(--erp-primary) 34%, var(--erp-border));
    background:
        radial-gradient(circle at 8% 0%, rgba(85, 194, 169, 0.14), transparent 34rem),
        var(--erp-surface);
}

.store-command-hero__main {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.store-command-hero__copy {
    min-width: 0;
    display: grid;
    gap: 0.45rem;
}

.store-command-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--erp-primary-strong);
    font-size: 0.78rem;
    font-weight: 900;
}

.store-command-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.store-command-title-row h1 {
    margin: 0;
    color: var(--erp-text);
    font-size: clamp(1.45rem, 2.2vw, 2rem);
    font-weight: 950;
}

.store-command-status {
    min-height: 1.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.28rem 0.62rem;
    border: 1px solid var(--erp-border);
    border-radius: 999px;
    color: var(--erp-text-soft);
    font-size: 0.76rem;
    font-weight: 900;
}

.store-command-status > span {
    width: 0.52rem;
    height: 0.52rem;
    border-radius: 50%;
    background: var(--erp-danger);
}

.store-command-status.is-live {
    border-color: rgba(105, 209, 158, 0.35);
    background: rgba(105, 209, 158, 0.08);
    color: var(--erp-success);
}

.store-command-status.is-live > span {
    background: var(--erp-success);
    box-shadow: 0 0 0 4px rgba(105, 209, 158, 0.12);
}

.store-command-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.store-command-actions .btn {
    min-height: 2.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
}

.store-command-metrics article {
    min-height: 6.4rem;
    align-content: center;
    gap: 0.18rem;
    background: color-mix(in srgb, var(--erp-primary) 5%, var(--erp-surface-muted));
}

.store-command-metrics article > span {
    display: flex;
    align-items: center;
    gap: 0.42rem;
}

.store-command-metrics article > span i {
    color: var(--erp-primary-strong);
}

.store-command-metrics article > small {
    color: var(--erp-text-soft);
    font-size: 0.74rem;
}

.store-command-tabs {
    scrollbar-width: thin;
}

.store-command-tabs .online-store-admin-tab {
    min-height: 2.9rem;
    cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.store-command-tabs .online-store-admin-tab:focus-visible {
    outline: 2px solid var(--erp-primary);
    outline-offset: 2px;
}

.store-product-workspace {
    padding: 1rem;
}

.store-product-workspace__header {
    align-items: center;
}

.store-product-workspace__header h2 {
    margin: 0.18rem 0 0;
    color: var(--erp-text);
    font-size: 1.3rem;
    font-weight: 950;
}

.store-product-result-count {
    min-width: 7rem;
    display: grid;
    justify-items: center;
    padding: 0.55rem 0.8rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: var(--erp-surface-muted);
}

.store-product-result-count strong {
    color: var(--erp-primary-strong);
    font-size: 1.3rem;
}

.store-product-result-count span {
    color: var(--erp-text-soft);
    font-size: 0.74rem;
}

.store-product-workspace__actions {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.store-save-all {
    min-height: 3.2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding-inline: 1rem;
}

.store-product-filters {
    display: grid;
    grid-template-columns: minmax(15rem, 1.5fr) minmax(10rem, 0.7fr) minmax(10rem, 0.7fr) auto;
    align-items: end;
    gap: 0.65rem;
    padding: 0.75rem;
    border: 1px solid var(--erp-border);
    border-radius: 8px;
    background: var(--erp-surface-muted);
}

.store-product-filters > label {
    min-width: 0;
    display: grid;
    gap: 0.32rem;
}

.store-product-filters > label > span:first-child {
    color: var(--erp-text-soft);
    font-size: 0.76rem;
    font-weight: 850;
}

.store-product-search__control {
    position: relative;
    display: block;
}

.store-product-search__control i {
    position: absolute;
    top: 50%;
    inset-inline-start: 0.75rem;
    z-index: 1;
    color: var(--erp-text-soft);
    transform: translateY(-50%);
    pointer-events: none;
}

.store-product-search__control .form-control {
    padding-inline-start: 2.35rem;
}

.store-product-filter-reset {
    min-height: 2.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.store-product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
    align-items: start;
    gap: .65rem;
}

.store-product-card {
    min-width: 0;
    display: grid;
    border: 1px solid var(--erp-border);
    border-radius: 10px;
    background: var(--erp-surface-muted);
}

.store-product-card:hover { border-color: var(--erp-field-border-focus); }
.store-product-card.is-published { box-shadow: inset 0 3px 0 var(--erp-primary); }

.store-product-card__header {
    display: grid;
    grid-template-columns: 3.25rem minmax(0, 1fr);
    align-items: center;
    gap: .65rem;
    padding: .65rem .75rem .4rem;
}

.store-product-card__media {
    aspect-ratio: 1;
    border: 1px solid var(--erp-border);
    border-radius: 7px;
    overflow: hidden;
    background: var(--erp-surface);
}

.store-product-card__image-button {
    width: 100%;
    height: 100%;
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--erp-text-soft);
    cursor: zoom-in;
}

.store-product-card__image-button:disabled { cursor: default; }
.store-product-card__image-button:focus-visible { outline: 2px solid var(--erp-primary); outline-offset: -2px; }
.store-product-card__media img { width: 100%; height: 100%; object-fit: cover; }

.store-product-card__content { display: grid; gap: .5rem; padding: .25rem .75rem .6rem; }

.store-product-card__heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .2rem .5rem;
}

.store-product-card__heading > div { min-width: 0; }
.store-product-card__category { color: var(--erp-primary-strong); font-weight: 750; }

.store-product-card__heading h3 {
    margin: 0;
    color: var(--erp-text);
    font-size: 1.02rem;
    font-weight: 850;
    overflow-wrap: anywhere;
}

.store-product-card__heading p {
    margin: .12rem 0 0;
    color: var(--erp-text-soft);
    font-size: .79rem;
    overflow-wrap: anywhere;
}

.store-stock-badge {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .22rem .42rem;
    border-radius: 6px;
    background: color-mix(in srgb, var(--erp-success) 9%, transparent);
    color: var(--erp-success);
    font-size: .76rem;
    font-weight: 800;
}

.store-stock-badge.is-low {
    background: color-mix(in srgb, var(--erp-accent) 10%, transparent);
    color: var(--erp-accent);
}

.store-stock-badge.is-empty {
    background: color-mix(in srgb, var(--erp-danger) 10%, transparent);
    color: var(--erp-danger);
}

.store-product-pricing, .store-product-extra-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: .5rem;
}

.store-product-extra-fields > :only-child { grid-column: 1 / -1; }
.store-product-pricing label, .store-product-extra-fields label { min-width: 0; display: grid; gap: .2rem; }
.store-product-pricing label > span, .store-product-extra-fields label > span { font-size: .8rem; font-weight: 750; }
.store-product-pricing small, .store-product-extra-fields small { color: var(--erp-text-soft); font-size: .76rem; }
.store-product-pricing :is(.form-control, .form-select), .store-product-extra-fields .form-control { min-height: 44px; }

.store-product-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 6rem), 1fr));
    gap: .3rem;
}

.store-option-toggle {
    min-height: 44px;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .4rem;
    border: 1px solid var(--erp-border);
    border-radius: 7px;
    background: var(--erp-surface);
    color: var(--erp-text);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
}

.store-option-toggle .form-check-input { margin: 0; flex: 0 0 auto; }
.store-product-sections summary { min-height: 44px; align-content: center; cursor: pointer; font-size: .8rem; font-weight: 750; }
.store-product-sections small { margin-inline-start: .35rem; color: var(--erp-text-soft); }
.store-product-card .online-store-section-picks { min-width: 0; }
.store-product-card .online-store-section-picks label { min-height: 44px; cursor: pointer; }

.store-product-card__footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .3rem .5rem;
    padding: .4rem .75rem;
    border-block-start: 1px solid var(--erp-border);
}

.store-product-card__footer > span { display: grid; }
.store-product-card__footer small { color: var(--erp-text-soft); font-size: .76rem; }
.store-product-card__footer strong { color: var(--erp-primary-strong); font-size: .95rem; }

.store-product-order { display: flex; align-items: center; gap: .3rem; }
.store-product-order > span {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--erp-text-soft);
    font-size: .76rem;
}

.store-product-order .btn { display: grid; place-items: center; width: 44px; min-height: 44px; padding: 0; }

.store-image-preview {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: rgba(5, 10, 8, 0.88);
    backdrop-filter: blur(8px);
}

.store-image-preview__panel {
    position: relative;
    width: min(94vw, 72rem);
    max-height: 92vh;
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--erp-border);
    border-radius: 12px;
    background: var(--erp-surface);
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, 0.45);
}

.store-image-preview__panel img {
    max-width: 100%;
    max-height: calc(92vh - 5rem);
    object-fit: contain;
    border-radius: 8px;
}

.store-image-preview__panel strong {
    color: var(--erp-text);
}

.store-image-preview__close {
    position: absolute;
    top: 0.7rem;
    inset-inline-end: 0.7rem;
    z-index: 1;
    width: 2.75rem;
    height: 2.75rem;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    background: rgba(12, 22, 18, 0.82);
    color: #ffffff;
    cursor: pointer;
}

.store-image-preview__close:focus-visible {
    outline: 3px solid var(--erp-primary);
    outline-offset: 2px;
}

.store-product-empty {
    min-height: 17rem;
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px dashed var(--erp-border);
    border-radius: 10px;
    text-align: center;
}

.store-product-empty > i {
    color: var(--erp-primary-strong);
    font-size: 2rem;
}

.store-product-empty h3,
.store-product-empty p {
    margin: 0;
}

.store-product-empty p {
    color: var(--erp-text-soft);
}

@media (max-width: 1280px) {
    .store-product-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .store-command-hero__main {
        align-items: stretch;
        flex-direction: column;
    }

    .store-command-actions,
    .store-command-actions .btn,
    .store-product-workspace__actions,
    .store-save-all {
        width: 100%;
    }

    .store-product-filters {
        grid-template-columns: 1fr;
    }

    .store-image-preview {
        padding: 0.6rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-command-tabs .online-store-admin-tab {
        transition: none;
    }
}

/* Storefront structural themes v2: each preset changes composition, not only color. */

/* Boutique: editorial storefront, centered masthead and asymmetric lookbook. */
.theme-boutique .marketplace-utility-bar {
    background: #f2e9e3;
    color: #5d454e;
}

.theme-boutique .marketplace-utility-bar i {
    color: #9a6c55;
}

.theme-boutique .marketplace-header {
    grid-template-columns: 1fr auto 1fr;
    grid-template-areas:
        "actions brand spacer"
        "search search search";
    gap: 1.1rem;
    padding-block: 1.35rem;
    background: #fffdfa;
}

.theme-boutique .marketplace-brand {
    grid-area: brand;
    justify-self: center;
    flex-direction: column;
    gap: 0.3rem;
    text-align: center;
}

.theme-boutique .marketplace-brand__mark {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 50%;
    background: #3f2d34;
    color: #fff8f2;
    box-shadow: none;
}

.theme-boutique .marketplace-brand strong {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.45rem;
    letter-spacing: 0.04em;
}

.theme-boutique .marketplace-search {
    grid-area: search;
    width: min(48rem, 100%);
    min-height: 2.9rem;
    margin-inline: auto;
    border: 1px solid #ccb8ad;
    border-radius: 0;
    box-shadow: none;
}

.theme-boutique .marketplace-search button {
    background: #3f2d34;
    color: #fff;
}

.theme-boutique .marketplace-header__actions {
    grid-area: actions;
    justify-self: start;
}

.theme-boutique .marketplace-nav {
    justify-content: center;
    min-height: 3.5rem;
    background: #fffdfa;
}

.theme-boutique .marketplace-nav .marketplace-nav__all {
    background: transparent;
    color: #3f2d34;
}

.theme-boutique .marketplace-main {
    gap: 2.5rem;
    margin-top: 2rem;
}

.theme-boutique .marketplace-hero {
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.theme-boutique .marketplace-hero__main {
    min-height: 37rem;
    border-radius: 0;
    box-shadow: none;
}

.theme-boutique .marketplace-hero__scrim {
    background: linear-gradient(90deg, rgba(34, 25, 29, 0.08), rgba(34, 25, 29, 0.76));
}

.theme-boutique .marketplace-hero__copy {
    width: min(37rem, 60%);
    padding: clamp(2.5rem, 7vw, 6.5rem);
}

.theme-boutique .marketplace-hero__copy h1 {
    font-size: clamp(2.6rem, 5vw, 5.2rem);
    font-weight: 500;
    line-height: 1.02;
}

.theme-boutique .marketplace-hero__copy > strong,
.theme-boutique .marketplace-hero__copy > button {
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 0;
    background: transparent;
    color: #fff;
}

.theme-boutique .marketplace-hero__side {
    grid-template-columns: 1.25fr 0.75fr;
    grid-template-rows: none;
}

.theme-boutique .marketplace-promo-card {
    min-height: 11rem;
    border-radius: 0;
}

.theme-boutique .marketplace-promo-card--accent {
    grid-template-columns: 1fr auto;
    align-items: center;
    background: #3f2d34;
    color: #fff8f2;
}

.theme-boutique .marketplace-promo-card--accent button {
    grid-column: 2;
    grid-row: 1 / span 2;
    border: 1px solid #d9c3b8;
    border-radius: 0;
    background: transparent;
}

.theme-boutique .marketplace-trust-row {
    border-width: 1px 0;
    border-radius: 0;
    background: transparent;
}

.theme-boutique .marketplace-section,
.theme-boutique .marketplace-catalog {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.theme-boutique .marketplace-section__heading {
    padding-bottom: 1rem;
    border-bottom: 1px solid #cdbcb3;
}

.theme-boutique .marketplace-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.theme-boutique .marketplace-category-card {
    position: relative;
    display: block;
    min-height: 22rem;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: #ded0c7;
    text-align: start;
}

.theme-boutique .marketplace-category-card__visual {
    width: 100%;
    height: 100%;
    border-radius: 0;
}

.theme-boutique .marketplace-category-card::after {
    position: absolute;
    inset: 45% 0 0;
    content: "";
    background: linear-gradient(transparent, rgba(30, 20, 24, 0.82));
    pointer-events: none;
}

.theme-boutique .marketplace-category-card strong,
.theme-boutique .marketplace-category-card small {
    position: absolute;
    inset-inline: 1.25rem;
    z-index: 2;
    color: #fff;
}

.theme-boutique .marketplace-category-card strong {
    inset-block-end: 2.6rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.55rem;
}

.theme-boutique .marketplace-category-card small {
    inset-block-end: 1.3rem;
}

.theme-boutique .marketplace-product-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.25rem;
}

.theme-boutique .shop-product-card.marketplace-product-card {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.theme-boutique .marketplace-product-card .shop-product-card__image {
    height: 27rem;
    background: #eee5df;
}

.theme-boutique .marketplace-product-card:nth-child(3n + 2) .shop-product-card__image {
    height: 22rem;
    margin-top: 5rem;
}

.theme-boutique .marketplace-product-card .shop-product-card__body {
    padding: 1rem 0;
}

.theme-boutique .marketplace-product-card__seller,
.theme-boutique .marketplace-product-card .shop-product-card__body p,
.theme-boutique .marketplace-product-card .shop-product-card__stock {
    display: none;
}

.theme-boutique .marketplace-product-card .shop-product-card__actions .btn-primary {
    border: 1px solid #3f2d34;
    border-radius: 0;
    background: transparent;
    color: #3f2d34;
}

/* Tech: dense bento layout with horizontal product modules. */
.theme-tech .marketplace-header {
    grid-template-columns: auto minmax(18rem, 1fr) auto;
    padding-block: 0.75rem;
    border-bottom-color: #22d3ee;
    background: rgba(8, 13, 24, 0.97);
}

.theme-tech .marketplace-brand__mark {
    border: 1px solid #22d3ee;
    border-radius: 0.4rem;
    background: #071521;
    color: #22d3ee;
    box-shadow: 0 0 22px rgba(34, 211, 238, 0.22);
}

.theme-tech .marketplace-search {
    border: 1px solid #22d3ee;
    border-radius: 0.4rem;
    background: #08111f;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.08);
}

.theme-tech .marketplace-search button {
    background: #22d3ee;
    color: #02131a;
}

.theme-tech .marketplace-header-action,
.theme-tech .marketplace-nav button {
    border-radius: 0.35rem;
}

.theme-tech .marketplace-nav {
    justify-content: center;
    border-bottom: 1px solid #26334a;
    background: #0b1220;
}

.theme-tech .marketplace-main {
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.theme-tech .marketplace-hero {
    grid-template-columns: minmax(0, 1.45fr) minmax(20rem, 0.55fr);
    min-height: 31rem;
}

.theme-tech .marketplace-hero__main {
    min-height: 31rem;
    border: 1px solid #26334a;
    border-radius: 0.5rem;
    box-shadow: 0 0 35px rgba(34, 211, 238, 0.08);
}

.theme-tech .marketplace-hero__scrim {
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.1), rgba(2, 6, 23, 0.94));
}

.theme-tech .marketplace-hero__copy h1 {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: clamp(2rem, 3.3vw, 3.8rem);
}

.theme-tech .marketplace-hero__copy > span,
.theme-tech .marketplace-hero__copy > strong,
.theme-tech .marketplace-hero__copy > button {
    border-radius: 0.3rem;
}

.theme-tech .marketplace-hero__side {
    grid-template-rows: 1fr 1fr;
}

.theme-tech .marketplace-promo-card {
    border-radius: 0.5rem;
}

.theme-tech .marketplace-trust-row {
    gap: 0.75rem;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.theme-tech .marketplace-trust-row > div {
    border: 1px solid #26334a;
    border-radius: 0.45rem;
    background: #111827;
}

.theme-tech .marketplace-trust-row i {
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1px solid #164e63;
    border-radius: 0.35rem;
    background: #082f49;
}

.theme-tech .marketplace-section,
.theme-tech .marketplace-catalog {
    border-radius: 0.5rem;
    box-shadow: inset 0 0 0 1px rgba(34, 211, 238, 0.03);
}

.theme-tech .marketplace-category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.theme-tech .marketplace-category-card {
    grid-template-columns: 7rem 1fr;
    grid-template-rows: 1fr 1fr;
    justify-items: start;
    min-height: 8rem;
    border-radius: 0.35rem;
    background: #0b1220;
    text-align: start;
}

.theme-tech .marketplace-category-card__visual {
    grid-row: 1 / span 2;
    width: 7rem;
    height: 100%;
    border-radius: 0.25rem;
    background: #172033;
}

.theme-tech .marketplace-category-card strong {
    align-self: end;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.theme-tech .marketplace-product-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.theme-tech .shop-product-card.marketplace-product-card {
    grid-template-columns: minmax(10rem, 38%) 1fr;
    grid-template-rows: 1fr;
    min-height: 17.5rem;
    border-radius: 0.45rem;
}

.theme-tech .marketplace-product-card .shop-product-card__image {
    width: 100%;
    height: 100%;
    min-height: 17.5rem;
    border-inline-end: 1px solid #26334a;
}

.theme-tech .marketplace-product-card .shop-product-card__body {
    min-width: 0;
    padding: 1.1rem;
}

.theme-tech .marketplace-product-card .shop-product-card__body h3 {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 1.1rem;
}

.theme-tech .marketplace-product-card .shop-product-card__actions .btn-primary {
    border-color: #22d3ee;
    border-radius: 0.3rem;
    background: #22d3ee;
    color: #02131a;
}

/* Fresh: fast grocery layout, round departments and compact five-up products. */
.theme-fresh .marketplace-utility-bar {
    background: #166534;
}

.theme-fresh .marketplace-header {
    width: min(92rem, calc(100% - 2rem));
    margin: 1rem auto 0;
    padding: 0.85rem 1rem;
    border: 1px solid #d9edc7;
    border-radius: 1.25rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(22, 101, 52, 0.08);
}

.theme-fresh .marketplace-brand__mark {
    border-radius: 50% 50% 45% 55%;
    background: #166534;
    color: #f7fee7;
    box-shadow: none;
}

.theme-fresh .marketplace-search {
    border: 2px solid #86b875;
    border-radius: 999px;
    background: #f7fee7;
    box-shadow: none;
}

.theme-fresh .marketplace-search button {
    border-radius: 999px;
    background: #f97316;
    color: #fff;
}

.theme-fresh .marketplace-header-action,
.theme-fresh .marketplace-header-action--cart {
    border-radius: 999px;
}

.theme-fresh .marketplace-nav {
    width: min(88rem, calc(100% - 4rem));
    margin-inline: auto;
    border: 0;
    border-radius: 0 0 1rem 1rem;
    background: #ecfccb;
}

.theme-fresh .marketplace-nav button,
.theme-fresh .marketplace-nav .marketplace-nav__all {
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #166534;
}

.theme-fresh .marketplace-hero {
    grid-template-columns: 1fr;
}

.theme-fresh .marketplace-hero__main {
    min-height: 25rem;
    border-radius: 2rem 0.75rem 2rem 0.75rem;
    box-shadow: 0 20px 45px rgba(22, 101, 52, 0.15);
}

.theme-fresh .marketplace-hero__copy {
    width: min(35rem, 60%);
}

.theme-fresh .marketplace-hero__side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: none;
}

.theme-fresh .marketplace-promo-card {
    min-height: 9rem;
}

.theme-fresh .marketplace-promo-card--accent {
    grid-template-columns: 1fr auto;
    background: #f97316;
    color: #fff;
}

.theme-fresh .marketplace-promo-card--accent button {
    grid-column: 2;
    grid-row: 1 / span 2;
    border-radius: 999px;
    background: #fff;
    color: #9a3412;
}

.theme-fresh .marketplace-trust-row {
    gap: 0.75rem;
    overflow: visible;
    border: 0;
    background: transparent;
}

.theme-fresh .marketplace-trust-row > div {
    border: 1px solid #d9edc7;
    border-radius: 1rem;
    background: #fff;
}

.theme-fresh .marketplace-trust-row i {
    display: grid;
    place-items: center;
    width: 2.8rem;
    height: 2.8rem;
    border-radius: 50%;
    background: #ecfccb;
    color: #166534;
}

.theme-fresh .marketplace-section,
.theme-fresh .marketplace-catalog {
    border: 0;
    border-radius: 1.5rem;
    box-shadow: 0 12px 30px rgba(22, 101, 52, 0.06);
}

.theme-fresh .marketplace-category-grid {
    display: flex;
    justify-content: space-around;
    gap: 1rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.theme-fresh .marketplace-category-card {
    flex: 0 0 10rem;
    min-height: 12rem;
    border: 0;
    border-radius: 1rem;
    background: transparent;
}

.theme-fresh .marketplace-category-card__visual {
    width: 8.5rem;
    height: 8.5rem;
    border: 6px solid #ecfccb;
    border-radius: 50%;
}

.theme-fresh .marketplace-product-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
}

.theme-fresh .shop-product-card.marketplace-product-card {
    border: 0;
    border-radius: 1.25rem;
    box-shadow: 0 8px 24px rgba(22, 101, 52, 0.08);
}

.theme-fresh .marketplace-product-card .shop-product-card__image {
    height: 13rem;
    margin: 0.55rem;
    width: calc(100% - 1.1rem);
    border-radius: 1rem;
    background: #f7fee7;
}

.theme-fresh .marketplace-product-card .shop-product-card__body {
    padding: 0.5rem 0.85rem 0.9rem;
}

.theme-fresh .marketplace-product-card__seller,
.theme-fresh .marketplace-product-card .shop-product-card__body p {
    display: none;
}

.theme-fresh .marketplace-product-card .shop-product-card__actions .btn-primary {
    border: 0;
    border-radius: 999px;
    background: #166534;
}

@media (max-width: 1180px) {
    .theme-boutique .marketplace-header {
        grid-template-columns: 1fr auto 1fr;
    }

    .theme-boutique .marketplace-product-grid,
    .theme-fresh .marketplace-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .theme-tech .marketplace-product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .theme-boutique .marketplace-header {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "actions brand"
            "search search";
    }

    .theme-boutique .marketplace-category-grid,
    .theme-boutique .marketplace-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .theme-boutique .marketplace-product-card:nth-child(3n + 2) .shop-product-card__image {
        height: 24rem;
        margin-top: 0;
    }

    .theme-tech .marketplace-hero {
        grid-template-columns: 1fr;
    }

    .theme-tech .marketplace-category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .theme-fresh .marketplace-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .theme-boutique .marketplace-header,
    .theme-boutique .marketplace-header__actions,
    .theme-boutique .marketplace-brand {
        justify-self: stretch;
    }

    .theme-boutique .marketplace-brand {
        align-items: flex-end;
    }

    .theme-boutique .marketplace-hero__main,
    .theme-tech .marketplace-hero__main,
    .theme-fresh .marketplace-hero__main {
        min-height: 28rem;
    }

    .theme-boutique .marketplace-hero__copy,
    .theme-fresh .marketplace-hero__copy {
        width: 100%;
    }

    .theme-boutique .marketplace-hero__side,
    .theme-fresh .marketplace-hero__side {
        grid-template-columns: 1fr;
    }

    .theme-boutique .marketplace-category-grid {
        grid-template-columns: 1fr;
    }

    .theme-boutique .marketplace-category-card {
        min-height: 18rem;
    }

    .theme-boutique .marketplace-product-grid,
    .theme-tech .marketplace-product-grid,
    .theme-fresh .marketplace-product-grid {
        grid-template-columns: 1fr;
    }

    .theme-boutique .marketplace-product-card .shop-product-card__image,
    .theme-boutique .marketplace-product-card:nth-child(3n + 2) .shop-product-card__image {
        height: 25rem;
    }

    .theme-tech .marketplace-category-grid {
        grid-template-columns: 1fr;
    }

    .theme-tech .shop-product-card.marketplace-product-card {
        grid-template-columns: 8.5rem 1fr;
    }

    .theme-fresh .marketplace-header {
        width: calc(100% - 1rem);
        margin-top: 0.5rem;
    }

    .theme-fresh .marketplace-nav {
        width: calc(100% - 1.5rem);
    }
}

/* Online store theme library */
.storefront-preview-bar {
    position: relative;
    z-index: 30;
    display: grid;
    grid-template-columns: minmax(12rem, auto) minmax(20rem, 1fr) auto;
    align-items: center;
    gap: 0.85rem;
    min-height: 4.5rem;
    padding: 0.7rem clamp(1rem, 3vw, 3rem);
    color: #f8fafc;
    background: #0f172a;
    border-bottom: 1px solid #334155;
    box-shadow: 0 0.65rem 1.8rem rgba(15, 23, 42, 0.2);
}

.storefront-preview-bar__status {
    display: grid;
    gap: 0.15rem;
    min-width: 0;
}

.storefront-preview-bar__status span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #fbbf24;
    font-size: 0.76rem;
    font-weight: 800;
}

.storefront-preview-bar__status strong {
    overflow: hidden;
    color: #fff;
    font-size: 0.96rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.storefront-preview-bar__themes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-width: 0;
}

.storefront-preview-bar__themes a,
.storefront-preview-bar__actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.75rem;
    padding: 0.5rem 0.8rem;
    color: #cbd5e1;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
    border: 1px solid #475569;
    border-radius: 0.65rem;
    background: #1e293b;
    transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.storefront-preview-bar__themes a:hover,
.storefront-preview-bar__themes a:focus-visible,
.storefront-preview-bar__actions a:hover,
.storefront-preview-bar__actions a:focus-visible {
    color: #fff;
    border-color: #94a3b8;
    background: #334155;
}

.storefront-preview-bar__themes a.is-active {
    color: #052e2b;
    border-color: #5eead4;
    background: #5eead4;
}

.storefront-preview-bar__actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.storefront-preview-bar__actions .storefront-preview-bar__close-link {
    color: #fff;
    border-color: #ef4444;
    background: #b91c1c;
}

.storefront-preview-bar__actions .storefront-preview-bar__close-link:hover,
.storefront-preview-bar__actions .storefront-preview-bar__close-link:focus-visible {
    border-color: #f87171;
    background: #dc2626;
}

@media (max-width: 1080px) {
    .storefront-preview-bar {
        grid-template-columns: 1fr auto;
    }

    .storefront-preview-bar__themes {
        grid-column: 1 / -1;
        grid-row: 2;
        justify-content: flex-start;
        overflow-x: auto;
        padding-bottom: 0.15rem;
        scrollbar-width: thin;
    }

    .storefront-preview-bar__themes a {
        flex: 0 0 auto;
    }
}

@media (max-width: 640px) {
    .storefront-preview-bar {
        grid-template-columns: 1fr;
        gap: 0.65rem;
        padding: 0.75rem;
    }

    .storefront-preview-bar__status,
    .storefront-preview-bar__actions,
    .storefront-preview-bar__themes {
        grid-column: 1;
    }

    .storefront-preview-bar__themes {
        grid-row: auto;
    }

    .storefront-preview-bar__actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.store-themes-page {
    display: grid;
    gap: 1.5rem;
}

.store-themes-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1.5rem;
}

.store-themes-heading h2 {
    margin: 0.35rem 0;
}

.store-themes-current {
    display: grid;
    min-width: 13rem;
    gap: 0.25rem;
    padding: 0.9rem 1rem;
    border: 1px solid #bbf7d0;
    border-radius: 0.9rem;
    background: #f0fdf4;
    color: #166534;
}

.store-themes-current span {
    font-size: 0.78rem;
}

.store-theme-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

.store-theme-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dbe3eb;
    border-radius: 1.1rem;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.store-theme-card:hover {
    transform: translateY(-2px);
    border-color: #8fd8c7;
    box-shadow: 0 18px 38px rgba(15, 23, 42, 0.11);
}

.store-theme-card.is-current {
    border: 2px solid var(--erp-primary);
}

.store-theme-preview {
    --preview-primary: #172033;
    --preview-accent: #f59e0b;
    --preview-surface: #f6f7fb;
    display: grid;
    gap: 0.55rem;
    min-height: 17rem;
    padding: 0.8rem;
    background: var(--preview-surface);
}

.store-theme-preview--boutique {
    --preview-primary: #3f2d34;
    --preview-accent: #b98768;
    --preview-surface: #fbf7f4;
}

.store-theme-preview--tech {
    --preview-primary: #111827;
    --preview-accent: #22d3ee;
    --preview-surface: #080d18;
}

.store-theme-preview--fresh {
    --preview-primary: #166534;
    --preview-accent: #f97316;
    --preview-surface: #f7fee7;
}

.store-theme-preview__browser {
    display: flex;
    direction: ltr;
    gap: 0.3rem;
}

.store-theme-preview__browser span {
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--preview-primary) 35%, transparent);
}

.store-theme-preview__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.2rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.55rem;
    background: #fff;
    color: var(--preview-primary);
    font-size: 0.72rem;
}

.store-theme-preview__header i {
    width: 38%;
    height: 0.55rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--preview-primary) 12%, transparent);
}

.store-theme-preview__hero {
    display: grid;
    grid-template-columns: 1fr 0.7fr;
    gap: 0.7rem;
    min-height: 6rem;
    padding: 0.8rem;
    border-radius: 0.75rem;
    background: var(--preview-primary);
}

.store-theme-preview__hero div {
    display: grid;
    align-content: center;
    gap: 0.45rem;
}

.store-theme-preview__hero span,
.store-theme-preview__hero strong,
.store-theme-preview__hero small {
    display: block;
    height: 0.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
}

.store-theme-preview__hero span { width: 35%; background: var(--preview-accent); }
.store-theme-preview__hero strong { width: 88%; height: 0.75rem; }
.store-theme-preview__hero small { width: 65%; opacity: 0.5; }
.store-theme-preview__hero > b { border-radius: 0.65rem; background: color-mix(in srgb, var(--preview-accent) 70%, white); }

.store-theme-preview__categories,
.store-theme-preview__products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.45rem;
}

.store-theme-preview__products {
    grid-template-columns: repeat(3, 1fr);
}

.store-theme-preview__categories i,
.store-theme-preview__products i {
    min-height: 2rem;
    border: 1px solid color-mix(in srgb, var(--preview-primary) 12%, transparent);
    border-radius: 0.55rem;
    background: #fff;
}

.store-theme-preview__products i {
    min-height: 3.2rem;
}

.store-theme-preview--boutique .store-theme-preview__hero,
.store-theme-preview--boutique .store-theme-preview__products i {
    border-radius: 0;
}

.store-theme-preview--boutique .store-theme-preview__header {
    justify-content: center;
    border-radius: 0;
}

.store-theme-preview--boutique .store-theme-preview__hero {
    grid-template-columns: 1fr;
    min-height: 7rem;
}

.store-theme-preview--boutique .store-theme-preview__hero > b {
    display: none;
}

.store-theme-preview--boutique .store-theme-preview__categories {
    grid-template-columns: repeat(3, 1fr);
}

.store-theme-preview--boutique .store-theme-preview__products i:nth-child(2) {
    min-height: 2.35rem;
    margin-top: 0.85rem;
}

.store-theme-preview--tech .store-theme-preview__header,
.store-theme-preview--tech .store-theme-preview__categories i,
.store-theme-preview--tech .store-theme-preview__products i {
    border-color: #26334a;
    background: #111827;
}

.store-theme-preview--tech .store-theme-preview__hero,
.store-theme-preview--tech .store-theme-preview__header,
.store-theme-preview--tech .store-theme-preview__categories i,
.store-theme-preview--tech .store-theme-preview__products i {
    border-radius: 0.2rem;
}

.store-theme-preview--tech .store-theme-preview__products {
    grid-template-columns: repeat(2, 1fr);
}

.store-theme-preview--tech .store-theme-preview__products i {
    min-height: 2.1rem;
}

.store-theme-preview--fresh .store-theme-preview__hero {
    border-radius: 1.4rem 0.45rem 1.4rem 0.45rem;
}

.store-theme-preview--fresh .store-theme-preview__categories i {
    aspect-ratio: 1;
    min-height: 0;
    border: 3px solid #dcf4bd;
    border-radius: 50%;
}

.store-theme-preview--fresh .store-theme-preview__products {
    grid-template-columns: repeat(4, 1fr);
}

.store-theme-preview--fresh .store-theme-preview__products i {
    min-height: 2.6rem;
    border-radius: 0.85rem;
}

.store-theme-card__body {
    display: grid;
    align-content: start;
    gap: 0.8rem;
    padding: 1.15rem;
}

.store-theme-card__title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.store-theme-card__title span {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 700;
}

.store-theme-card__title h3 {
    margin: 0.2rem 0 0;
    font-size: 1.2rem;
}

.store-theme-card__title > strong {
    flex: 0 0 auto;
    color: #047857;
    font-size: 0.8rem;
}

.store-theme-card__body p {
    margin: 0;
    color: #475569;
    line-height: 1.7;
}

.store-theme-card__body ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.store-theme-card__body li {
    padding: 0.35rem 0.55rem;
    border-radius: 999px;
    background: #f1f5f9;
    color: #334155;
    font-size: 0.75rem;
}

.store-theme-card__body li i {
    color: #059669;
}

.store-theme-card__palette {
    display: flex;
    gap: 0.4rem;
}

.store-theme-card__palette i {
    width: 1.4rem;
    height: 1.4rem;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.store-theme-card__actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.7rem;
    padding: 1rem 1.15rem;
    border-top: 1px solid #e2e8f0;
}

/* Customer storefront theme variants */
.shop-shell.theme-boutique {
    --market-bg: #fbf7f4;
    --market-ink: #3f2d34;
    --market-muted: #74636a;
    --market-border: #e8dcd5;
    --market-accent: #b98768;
    --market-accent-strong: #8a5f49;
}

.theme-boutique .marketplace-header,
.theme-boutique .marketplace-nav,
.theme-boutique .marketplace-product-card,
.theme-boutique .marketplace-category-card {
    border-radius: 0;
}

.theme-boutique .marketplace-hero {
    grid-template-columns: 1fr;
}

.theme-boutique .marketplace-hero__side {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
}

.theme-boutique h1,
.theme-boutique h2,
.theme-boutique h3 {
    font-family: Georgia, "Times New Roman", serif;
}

.shop-shell.theme-tech {
    --market-bg: #080d18;
    --market-ink: #e5f7ff;
    --market-muted: #9cb1c1;
    --market-border: #26334a;
    --market-surface: #111827;
    --market-accent: #22d3ee;
    --market-accent-strong: #67e8f9;
    background-image: radial-gradient(circle at 80% 10%, rgba(34, 211, 238, 0.09), transparent 28rem);
}

.theme-tech .marketplace-utility-bar,
.theme-tech .marketplace-header-action--cart,
.theme-tech .marketplace-nav .marketplace-nav__all {
    background: #020617;
}

.theme-tech .marketplace-header,
.theme-tech .marketplace-nav,
.theme-tech .marketplace-product-card,
.theme-tech .marketplace-category-card,
.theme-tech .marketplace-trust-row,
.theme-tech .marketplace-footer,
.theme-tech .shop-login-inline,
.theme-tech .shop-tab-panel {
    border-color: var(--market-border);
    background: var(--market-surface);
    color: var(--market-ink);
}

.theme-tech .marketplace-header input,
.theme-tech .marketplace-catalog__filters select {
    border-color: #334155;
    background: #0f172a;
    color: #e5f7ff;
}

.theme-tech .marketplace-product-card .shop-product-card__image,
.theme-tech .marketplace-category-card__visual {
    background: #172033;
}

.theme-tech .marketplace-promo-card {
    border-color: #26334a;
    background: #111827;
    color: #e5f7ff;
}

.theme-tech .marketplace-promo-card--accent {
    background: linear-gradient(145deg, #0e7490, #155e75);
}

.theme-tech .marketplace-product-card__title,
.theme-tech .marketplace-section__heading h2,
.theme-tech .marketplace-category-card strong,
.theme-tech .marketplace-header-action,
.theme-tech .marketplace-nav button {
    color: var(--market-ink);
}

.shop-shell.theme-fresh {
    --market-bg: #f7fee7;
    --market-ink: #173b23;
    --market-muted: #55705d;
    --market-border: #d9edc7;
    --market-accent: #f97316;
    --market-accent-strong: #c2410c;
}

.theme-fresh .marketplace-hero__main,
.theme-fresh .marketplace-promo-card,
.theme-fresh .marketplace-category-card,
.theme-fresh .marketplace-product-card {
    border-radius: 1.4rem 0.55rem 1.4rem 0.55rem;
}

.theme-fresh .marketplace-header-action--cart,
.theme-fresh .marketplace-nav .marketplace-nav__all {
    background: #166534;
}

@media (max-width: 900px) {
    .store-theme-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 620px) {
    .store-themes-heading {
        flex-direction: column;
    }

    .store-themes-current {
        width: 100%;
    }

    .store-theme-card__actions {
        grid-template-columns: 1fr;
    }
}

/* Public multi-vendor marketplace */
.shop-shell {
    --market-ink: #172033;
    --market-muted: #64748b;
    --market-border: #e2e8f0;
    --market-surface: #ffffff;
    --market-bg: #f6f7fb;
    --market-accent: #f59e0b;
    --market-accent-strong: #d97706;
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0 0 4rem;
    background: var(--market-bg);
    color: var(--market-ink);
}

.marketplace-skip-link {
    position: fixed;
    inset-block-start: 0.75rem;
    inset-inline-start: 1rem;
    z-index: 9999;
    padding: 0.7rem 1rem;
    border-radius: 8px;
    background: #fff;
    color: #111827;
    font-weight: 800;
    transform: translateY(-160%);
}

.marketplace-skip-link:focus {
    transform: translateY(0);
}

.marketplace-utility-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 2.25rem;
    padding: 0.35rem max(1rem, calc((100vw - 92rem) / 2));
    background: #111827;
    color: #e5e7eb;
    font-size: 0.78rem;
}

.marketplace-utility-bar > div {
    display: flex;
    gap: 1.4rem;
}

.marketplace-utility-bar span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.marketplace-utility-bar i {
    color: #fbbf24;
}

.marketplace-header {
    position: relative;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(20rem, 1fr) auto;
    align-items: center;
    gap: 1.5rem;
    padding: 1rem max(1rem, calc((100vw - 92rem) / 2));
    border-bottom: 1px solid var(--market-border);
    background: rgba(255, 255, 255, 0.96);
}

.marketplace-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--market-ink);
    text-align: start;
    cursor: pointer;
}

.marketplace-brand__mark {
    display: grid;
    place-items: center;
    width: 3rem;
    height: 3rem;
    border-radius: 14px;
    background: linear-gradient(145deg, #fbbf24, #f97316);
    color: #111827;
    font-size: 1.25rem;
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.23);
}

.marketplace-brand strong,
.marketplace-brand small {
    display: block;
    white-space: nowrap;
}

.marketplace-brand strong {
    font-size: 1.25rem;
    font-weight: 950;
    letter-spacing: -0.02em;
}

.marketplace-brand small {
    color: var(--market-muted);
    font-size: 0.76rem;
}

.marketplace-search {
    display: grid;
    grid-template-columns: 1fr 3.25rem;
    min-height: 3.25rem;
    overflow: hidden;
    border: 2px solid #f59e0b;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}

.marketplace-search select,
.marketplace-search input,
.marketplace-search button {
    min-width: 0;
    border: 0;
    background: transparent;
    color: var(--market-ink);
}

.marketplace-search select {
    width: 9.5rem;
    padding-inline: 0.8rem;
    border-inline-end: 1px solid var(--market-border);
    color: #475569;
}

.marketplace-search input {
    padding: 0.65rem 1rem;
    outline: 0;
}

.marketplace-search button {
    background: var(--market-accent);
    color: #111827;
    font-size: 1rem;
    cursor: pointer;
}

.marketplace-search:focus-within {
    outline: 3px solid rgba(245, 158, 11, 0.22);
}

.marketplace-header__actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.marketplace-header-action {
    position: relative;
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 0.4rem;
    min-height: 44px;
    padding: 0.5rem 0.7rem;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--market-ink);
    cursor: pointer;
}

.marketplace-header-action:hover {
    background: #f1f5f9;
}

.marketplace-header-action i {
    font-size: 1.15rem;
}

.marketplace-header-action span {
    font-size: 0.78rem;
    font-weight: 800;
}

.marketplace-header-action b {
    position: absolute;
    inset-block-start: 0;
    inset-inline-start: 0.15rem;
    display: grid;
    place-items: center;
    min-width: 1.2rem;
    height: 1.2rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    background: #ef4444;
    color: #fff;
    font-size: 0.68rem;
}

.marketplace-header-action--cart {
    background: #172033;
    color: #fff;
}

.marketplace-header-action--cart:hover {
    background: #273449;
}

.marketplace-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    min-height: 3rem;
    padding: 0 max(1rem, calc((100vw - 92rem) / 2));
    overflow-x: auto;
    border-bottom: 1px solid var(--market-border);
    background: #fff;
    scrollbar-width: none;
}

.marketplace-nav button {
    flex: 0 0 auto;
    min-height: 2.75rem;
    padding: 0.55rem 0.85rem;
    border: 0;
    border-bottom: 3px solid transparent;
    background: transparent;
    color: #475569;
    font-weight: 800;
    cursor: pointer;
}

.marketplace-nav button:hover,
.marketplace-nav button.is-active {
    border-bottom-color: var(--market-accent);
    color: #111827;
}

.marketplace-nav .marketplace-nav__all {
    gap: 0.5rem;
    margin-inline-end: 0.5rem;
    padding-inline: 1rem;
    background: #172033;
    color: #fff;
}

.shop-notice,
.shop-login-inline,
.shop-shell > .alert,
.shop-tab-panel {
    width: min(92rem, calc(100% - 2rem));
    margin-inline: auto;
}

.shop-login-inline {
    margin-block: 1rem;
    border: 1px solid var(--market-border);
    background: #fff;
    color: var(--market-ink);
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.08);
}

.marketplace-auth {
    display: grid;
    grid-template-columns: minmax(16rem, 0.75fr) minmax(18rem, 1.25fr);
    gap: 1.25rem 2rem;
    padding: 1.5rem;
    border-radius: 1.25rem;
}

.marketplace-auth__intro {
    align-content: start;
    display: grid;
    grid-column: 1;
    grid-row: 1 / span 4;
    gap: 0.55rem;
    padding: 1.25rem;
    border-radius: 1rem;
    background: linear-gradient(145deg, #172033, #25344c);
    color: #fff;
}

.marketplace-auth__intro > span {
    color: #86efac;
    font-weight: 800;
}

.marketplace-auth__intro h2,
.marketplace-auth__intro p {
    margin: 0;
    color: inherit;
}

.marketplace-auth__mode {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
    align-self: start;
    padding: 0.3rem;
    border-radius: 0.85rem;
    background: #eef2f7;
}

.marketplace-auth__mode button {
    min-height: 44px;
    border: 0;
    border-radius: 0.65rem;
    background: transparent;
    color: #475569;
    font-weight: 800;
}

.marketplace-auth__mode button.is-active {
    background: #fff;
    color: #172033;
    box-shadow: 0 3px 10px rgba(15, 23, 42, 0.1);
}

.marketplace-auth__fields,
.marketplace-auth__otp {
    display: grid;
    gap: 0.75rem;
}

.marketplace-auth__fields small,
.marketplace-auth__otp small {
    display: block;
    margin-top: 0.35rem;
    color: #64748b;
}

.marketplace-auth__otp input {
    max-width: 18rem;
    min-height: 3.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    letter-spacing: 0.45rem;
    text-align: center;
}

.marketplace-auth__development-code {
    width: fit-content;
    padding: 0.65rem 0.85rem;
    border: 1px dashed #16a34a;
    border-radius: 0.7rem;
    background: #f0fdf4;
    color: #166534;
}

.marketplace-auth__error {
    grid-column: 2;
    margin: 0;
}

.marketplace-auth > .marketplace-auth__mode,
.marketplace-auth > .marketplace-auth__fields,
.marketplace-auth > .marketplace-auth__otp,
.marketplace-auth > .erp-form-actions {
    grid-column: 2;
}

.marketplace-main {
    display: grid;
    gap: 1.5rem;
    width: min(92rem, calc(100% - 2rem));
    margin: 1.25rem auto 0;
}

.marketplace-hero {
    display: grid;
    grid-template-columns: minmax(0, 2.25fr) minmax(17rem, 0.75fr);
    gap: 1rem;
}

.marketplace-banner-stage {
    position: relative;
    min-width: 0;
}

.marketplace-banner-stage .marketplace-hero__main {
    height: 100%;
}

.marketplace-banner-controls {
    position: absolute;
    inset-inline-start: 1rem;
    inset-block-end: 1rem;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.82);
    color: #fff;
    backdrop-filter: blur(8px);
}

.marketplace-banner-controls button {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
    cursor: pointer;
}

.marketplace-banner-controls button:hover {
    background: var(--market-accent);
    color: #111827;
}

.marketplace-banner-controls span {
    min-width: 3.3rem;
    text-align: center;
    font-weight: 850;
}

.marketplace-hero__main {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 29rem;
    overflow: hidden;
    border-radius: 22px;
    background: #172033;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.16);
}

.marketplace-hero__main > img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-hero__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.88));
}

.marketplace-hero__copy {
    position: relative;
    z-index: 2;
    display: grid;
    justify-items: start;
    gap: 0.9rem;
    width: min(31rem, 56%);
    padding: clamp(2rem, 5vw, 4.5rem);
}

.marketplace-hero__copy > span {
    padding: 0.35rem 0.7rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 999px;
    color: #fde68a;
    font-weight: 900;
}

.marketplace-hero__copy h1,
.marketplace-hero__copy p {
    margin: 0;
}

.marketplace-hero__copy h1 {
    font-size: clamp(2rem, 3.25vw, 3.35rem);
    line-height: 1.12;
    text-wrap: balance;
}

.marketplace-hero__copy p {
    color: #e2e8f0;
    font-size: 1.05rem;
    line-height: 1.8;
}

.marketplace-hero__copy > strong,
.marketplace-hero__copy > button {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 46px;
    padding: 0.7rem 1.1rem;
    border: 0;
    border-radius: 10px;
    background: var(--market-accent);
    color: #111827;
    font-weight: 950;
    cursor: pointer;
}

.marketplace-hero__main--fallback {
    background: radial-gradient(circle at 20% 25%, #334155 0, #172033 42%, #0f172a 100%);
}

.marketplace-hero__products {
    position: absolute;
    left: 4%;
    right: auto;
    inset-block-end: 0;
    display: flex;
    align-items: end;
    gap: 0.6rem;
    width: 43%;
    height: 86%;
}

.marketplace-hero__products img {
    width: 34%;
    height: 58%;
    object-fit: cover;
    border: 4px solid rgba(255, 255, 255, 0.13);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
}

.marketplace-hero__products img:nth-child(2) {
    height: 78%;
}

.marketplace-hero__side {
    display: grid;
    grid-template-rows: 1.25fr 0.75fr;
    gap: 1rem;
}

.marketplace-promo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 0;
    padding: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--market-border);
    border-radius: 20px;
    background: #fff;
}

.marketplace-promo-card--accent {
    display: grid;
    align-content: center;
    justify-items: start;
    background: linear-gradient(145deg, #f59e0b, #fb923c);
    color: #111827;
}

.marketplace-promo-card span,
.marketplace-promo-card strong {
    display: block;
}

.marketplace-promo-card strong {
    margin-block: 0.35rem;
    font-size: 1.15rem;
    line-height: 1.55;
}

.marketplace-promo-card button {
    min-height: 42px;
    padding: 0.6rem 0.9rem;
    border: 0;
    border-radius: 9px;
    background: #172033;
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.marketplace-promo-card > i {
    display: grid;
    place-items: center;
    flex: 0 0 3.5rem;
    height: 3.5rem;
    border-radius: 14px;
    background: #fff7ed;
    color: #ea580c;
    font-size: 1.4rem;
}

.marketplace-trust-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--market-border);
    border-radius: 16px;
    background: #fff;
}

.marketplace-trust-row > div {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
    padding: 1.1rem;
    border-inline-end: 1px solid var(--market-border);
}

.marketplace-trust-row > div:last-child {
    border-inline-end: 0;
}

.marketplace-trust-row i {
    color: var(--market-accent-strong);
    font-size: 1.35rem;
}

.marketplace-trust-row strong,
.marketplace-trust-row small {
    display: block;
}

.marketplace-trust-row small {
    margin-block-start: 0.2rem;
    color: var(--market-muted);
}

.marketplace-section,
.marketplace-catalog {
    padding: clamp(1rem, 2vw, 1.6rem);
    border: 1px solid var(--market-border);
    border-radius: 18px;
    background: var(--market-surface);
}

.marketplace-section__heading,
.marketplace-collection-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin-block-end: 1.1rem;
}

.marketplace-section__heading span {
    color: var(--market-accent-strong);
    font-size: 0.78rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.marketplace-section__heading h2,
.marketplace-collection-heading h2 {
    margin: 0.25rem 0 0;
    color: var(--market-ink);
    font-size: clamp(1.35rem, 2vw, 2rem);
}

.marketplace-section__heading button,
.marketplace-collection-heading button,
.marketplace-clear-filter {
    min-height: 42px;
    padding: 0.55rem 0.85rem;
    border: 1px solid var(--market-border);
    border-radius: 9px;
    background: #fff;
    color: #334155;
    font-weight: 850;
    cursor: pointer;
}

.marketplace-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.85rem;
}

.marketplace-category-card {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    min-height: 11.5rem;
    padding: 0.85rem;
    border: 1px solid var(--market-border);
    border-radius: 14px;
    background: #fff;
    color: var(--market-ink);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.marketplace-category-card:hover {
    transform: translateY(-3px);
    border-color: #fbbf24;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.09);
}

.marketplace-category-card__visual {
    display: grid;
    place-items: center;
    width: 100%;
    height: 7rem;
    overflow: hidden;
    border-radius: 11px;
    background: #f8fafc;
    color: #d97706;
    font-size: 2rem;
}

.marketplace-category-card__visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-category-card small {
    color: var(--market-muted);
}

.marketplace-section__heading--catalog {
    align-items: center;
}

.marketplace-catalog__filters {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.marketplace-catalog__filters .form-select {
    min-width: 13rem;
    border-color: var(--market-border);
    background-color: #fff;
    color: var(--market-ink);
}

.marketplace-collection-heading {
    margin-block: 1.8rem 0.85rem;
    padding-block-start: 1.2rem;
    border-top: 1px solid var(--market-border);
}

.marketplace-product-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.shop-product-card.marketplace-product-card {
    position: relative;
    display: grid;
    grid-template-rows: auto 1fr;
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--market-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
    transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.shop-product-card.marketplace-product-card:hover {
    transform: translateY(-4px);
    border-color: #fbbf24;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.marketplace-product-card__discount {
    position: absolute;
    inset-block-start: 0.7rem;
    inset-inline-start: 0.7rem;
    z-index: 4;
    padding: 0.35rem 0.55rem;
    border-radius: 7px;
    background: #dc2626;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 950;
}

.marketplace-product-card .shop-favorite-button {
    inset-block-start: 0.7rem;
    inset-inline-end: 0.7rem;
    z-index: 5;
    width: 2.6rem;
    height: 2.6rem;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: rgba(255, 255, 255, 0.94);
    color: #94a3b8;
    box-shadow: 0 5px 16px rgba(15, 23, 42, 0.08);
}

.marketplace-product-card .shop-favorite-button.is-active {
    background: #fff1f2;
    color: #e11d48;
}

.marketplace-product-card .shop-product-card__image {
    height: 17rem;
    border-radius: 0;
    background: #f8fafc;
}

.marketplace-product-card .shop-product-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    padding: 1rem;
}

.marketplace-product-card__seller {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    color: #64748b;
    font-size: 0.72rem;
}

.marketplace-product-card__seller i {
    color: #d97706;
}

.marketplace-product-card .shop-product-card__body > small {
    color: #b45309;
    font-weight: 850;
}

.marketplace-product-card .shop-product-card__body h3 {
    min-height: 2.9rem;
    margin: 0;
    color: var(--market-ink);
    font-size: 1rem;
    line-height: 1.45;
}

.marketplace-product-card__title {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    font-weight: inherit;
    text-align: start;
    cursor: pointer;
}

.marketplace-product-card__title:hover {
    color: #b45309;
}

.marketplace-product-card .shop-product-card__body p {
    display: -webkit-box;
    min-height: 2.6rem;
    margin: 0;
    overflow: hidden;
    color: var(--market-muted);
    font-size: 0.8rem;
    line-height: 1.6;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.marketplace-product-card .shop-product-card__stock {
    padding: 0;
    border: 0;
    background: transparent;
    color: #15803d;
    font-size: 0.75rem;
}

.marketplace-product-card .shop-product-card__meta {
    align-items: end;
    margin-block-start: auto;
    padding-block-start: 0.6rem;
    border-top: 1px solid #f1f5f9;
}

.marketplace-product-card .shop-product-card__meta div small,
.marketplace-product-card .shop-product-card__meta div strong {
    display: block;
}

.marketplace-product-card .shop-product-card__meta strong {
    color: #b45309;
    font-size: 1.05rem;
}

.marketplace-product-card .shop-product-card__meta div small {
    margin-block-start: 0.15rem;
    color: var(--market-muted);
    font-size: 0.7rem;
}

.marketplace-product-card .shop-product-card__actions {
    margin-block-start: 0.25rem;
}

.marketplace-product-card .shop-product-card__actions .btn-primary {
    border-color: #172033;
    background: #172033;
    color: #fff;
}

.marketplace-product-card .shop-product-card__actions .btn-primary:hover {
    border-color: #f59e0b;
    background: #f59e0b;
    color: #111827;
}

.shop-tab-panel--cart {
    display: grid;
    max-width: 70rem;
    margin-block-start: 1.5rem;
    padding: 1.5rem;
    border: 1px solid var(--market-border);
    border-radius: 18px;
    background: #fff;
    color: var(--market-ink);
}

.shop-tab-panel--cart .shop-cart-line,
.shop-tab-panel--cart .shop-coupon-box {
    border-color: var(--market-border);
    background: #f8fafc;
}

.shop-tab-panel--cart .shop-cart-total {
    border-color: var(--market-border);
    color: var(--market-ink);
}

.shop-image-modal__close {
    min-width: 44px;
    min-height: 44px;
}

.marketplace-footer {
    display: grid;
    grid-template-columns: minmax(18rem, 1.5fr) repeat(3, minmax(10rem, 0.75fr));
    gap: 2rem;
    width: min(92rem, calc(100% - 2rem));
    margin: 2rem auto 0;
    padding: 2.25rem;
    border-radius: 20px;
    background: #111827;
    color: #e5e7eb;
}

.marketplace-footer > div {
    display: grid;
    align-content: start;
    justify-items: start;
    gap: 0.65rem;
}

.marketplace-footer__brand {
    grid-template-columns: auto 1fr;
}

.marketplace-footer__brand p {
    max-width: 29rem;
    margin: 0.4rem 0 0;
    color: #94a3b8;
    line-height: 1.8;
}

.marketplace-footer button,
.marketplace-footer span {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    text-align: start;
}

.marketplace-footer button {
    min-height: 36px;
    padding: 0;
    cursor: pointer;
}

.marketplace-footer button:hover {
    color: #fbbf24;
}

.marketplace-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
    color: var(--market-muted);
    font-size: 0.85rem;
}

.marketplace-breadcrumb button {
    min-height: 36px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #b45309;
    font-weight: 800;
    cursor: pointer;
}

.marketplace-breadcrumb span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.marketplace-product-detail {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(22rem, 0.95fr);
    gap: clamp(1.5rem, 4vw, 4rem);
    padding: clamp(1rem, 3vw, 2.5rem);
    border: 1px solid var(--market-border);
    border-radius: 20px;
    background: #fff;
}

.marketplace-product-detail__gallery {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

.marketplace-product-detail__main-image {
    display: grid;
    place-items: center;
    min-height: 32rem;
    overflow: hidden;
    border: 0;
    border-radius: 16px;
    background: #f8fafc;
    cursor: zoom-in;
}

.marketplace-product-detail__main-image img {
    width: 100%;
    height: 100%;
    max-height: 40rem;
    object-fit: contain;
}

.marketplace-product-detail__thumbs {
    display: flex;
    gap: 0.65rem;
    overflow-x: auto;
}

.marketplace-product-detail__thumbs button {
    flex: 0 0 5rem;
    height: 5rem;
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--market-border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.marketplace-product-detail__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.marketplace-product-detail__info {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 1rem;
}

.marketplace-product-detail__category {
    align-self: flex-start;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    background: #fff7ed;
    color: #b45309;
    font-size: 0.8rem;
    font-weight: 900;
}

.marketplace-product-detail__info h1,
.marketplace-product-detail__info p {
    margin: 0;
}

.marketplace-product-detail__info h1 {
    color: var(--market-ink);
    font-size: clamp(1.8rem, 3vw, 3rem);
    line-height: 1.25;
}

.marketplace-product-detail__info > p {
    color: var(--market-muted);
    font-size: 1rem;
    line-height: 1.9;
}

.marketplace-product-detail__seller {
    color: var(--market-muted);
}

.marketplace-product-detail__seller i {
    color: var(--market-accent-strong);
}

.marketplace-product-detail__price {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-block: 1rem;
    border-block: 1px solid var(--market-border);
}

.marketplace-product-detail__price strong {
    color: #b45309;
    font-size: 1.75rem;
}

.marketplace-product-detail__price del {
    color: #94a3b8;
}

.marketplace-product-detail__price span {
    padding: 0.3rem 0.55rem;
    border-radius: 7px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.78rem;
    font-weight: 900;
}

.marketplace-product-detail__availability {
    color: #15803d;
    font-weight: 850;
}

.marketplace-product-detail__benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.6rem;
}

.marketplace-product-detail__benefits span {
    display: grid;
    place-items: center;
    gap: 0.45rem;
    min-height: 5.2rem;
    padding: 0.65rem;
    border: 1px solid var(--market-border);
    border-radius: 11px;
    color: #475569;
    text-align: center;
    font-size: 0.8rem;
}

.marketplace-product-detail__benefits i {
    color: #d97706;
    font-size: 1.15rem;
}

.marketplace-product-detail__add,
.marketplace-no-results button {
    min-height: 50px;
    padding: 0.75rem 1rem;
    border: 0;
    border-radius: 11px;
    background: #172033;
    color: #fff;
    font-size: 1rem;
    font-weight: 900;
    cursor: pointer;
}

.marketplace-product-detail__add:hover,
.marketplace-no-results button:hover {
    background: var(--market-accent);
    color: #111827;
}

.marketplace-product-detail__add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.marketplace-no-results {
    display: grid;
    place-items: center;
    gap: 0.65rem;
    min-height: 22rem;
    color: var(--market-muted);
    text-align: center;
}

.marketplace-no-results i {
    color: #d97706;
    font-size: 2rem;
}

.marketplace-no-results h2,
.marketplace-no-results p {
    margin: 0;
}

.marketplace-no-results h2 {
    color: var(--market-ink);
}

@media (max-width: 1180px) {
    .marketplace-header {
        grid-template-columns: auto 1fr;
    }

    .marketplace-search {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .marketplace-header__actions {
        justify-self: end;
    }

    .marketplace-product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .marketplace-auth {
        grid-template-columns: 1fr;
    }

    .marketplace-auth__error {
        grid-column: 1;
    }

    .marketplace-auth__intro,
    .marketplace-auth > .marketplace-auth__mode,
    .marketplace-auth > .marketplace-auth__fields,
    .marketplace-auth > .marketplace-auth__otp,
    .marketplace-auth > .erp-form-actions {
        grid-column: 1;
        grid-row: auto;
    }

    .marketplace-utility-bar > div span:nth-child(n + 2) {
        display: none;
    }

    .marketplace-header {
        gap: 0.8rem;
        padding-block: 0.75rem;
    }

    .marketplace-header-action span {
        display: none;
    }

    .marketplace-header-action {
        grid-template-columns: 1fr;
        min-width: 44px;
    }

    .marketplace-hero {
        grid-template-columns: 1fr;
    }

    .marketplace-hero__side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: none;
    }

    .marketplace-trust-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace-trust-row > div:nth-child(2) {
        border-inline-end: 0;
    }

    .marketplace-trust-row > div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--market-border);
    }

    .marketplace-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace-product-detail {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .marketplace-utility-bar {
        padding-inline: 0.75rem;
    }

    .marketplace-header {
        grid-template-columns: 1fr auto;
        padding-inline: 0.75rem;
    }

    .marketplace-brand__mark {
        width: 2.65rem;
        height: 2.65rem;
    }

    .marketplace-brand strong {
        font-size: 1rem;
    }

    .marketplace-header-action:first-child {
        display: none;
    }

    .marketplace-search {
        grid-template-columns: 1fr 3rem;
    }

    .marketplace-search select {
        display: none;
    }

    .marketplace-nav {
        padding-inline: 0.75rem;
    }

    .marketplace-main,
    .shop-notice,
    .shop-login-inline,
    .shop-shell > .alert,
    .shop-tab-panel {
        width: calc(100% - 1rem);
    }

    .marketplace-hero__main {
        min-height: 27rem;
    }

    .marketplace-hero__copy {
        align-content: start;
        width: 100%;
        padding: 2rem 1.25rem;
    }

    .marketplace-hero__copy h1 {
        font-size: 2rem;
    }

    .marketplace-hero__products {
        right: 8%;
        left: 8%;
        width: 84%;
        height: 48%;
    }

    .marketplace-hero__side {
        grid-template-columns: 1fr;
    }

    .marketplace-trust-row {
        grid-template-columns: 1fr;
    }

    .marketplace-trust-row > div {
        border-inline-end: 0;
        border-bottom: 1px solid var(--market-border);
    }

    .marketplace-trust-row > div:last-child {
        border-bottom: 0;
    }

    .marketplace-section__heading,
    .marketplace-section__heading--catalog,
    .marketplace-collection-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .marketplace-catalog__filters {
        align-items: stretch;
        flex-direction: column;
    }

    .marketplace-catalog__filters .form-select {
        width: 100%;
        min-width: 0;
    }

    .marketplace-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .marketplace-product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.6rem;
    }

    .marketplace-footer {
        grid-template-columns: 1fr;
        width: calc(100% - 1rem);
        padding: 1.4rem;
    }

    .marketplace-product-detail {
        padding: 0.85rem;
    }

    .marketplace-product-detail__main-image {
        min-height: 20rem;
    }

    .marketplace-product-detail__benefits {
        grid-template-columns: 1fr;
    }

    .marketplace-product-detail__benefits span {
        grid-template-columns: auto 1fr;
        justify-items: start;
        min-height: 3.25rem;
        text-align: start;
    }

    .marketplace-product-card .shop-product-card__image {
        height: 11rem;
    }

    .marketplace-product-card .shop-product-card__body {
        padding: 0.75rem;
    }

    .marketplace-product-card__seller,
    .marketplace-product-card .shop-product-card__body p {
        display: none;
    }

    .marketplace-product-card .shop-product-card__body h3 {
        min-height: 2.6rem;
        font-size: 0.88rem;
    }

    .marketplace-product-card .shop-product-card__actions {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .marketplace-category-card,
    .shop-product-card.marketplace-product-card {
        transition: none;
    }

    .marketplace-category-card:hover,
    .shop-product-card.marketplace-product-card:hover {
        transform: none;
    }
}

/* Final theme-specific corrections after the shared storefront rules. */
.theme-tech .shop-product-card.marketplace-product-card,
.theme-tech .marketplace-product-card .shop-product-card__body {
    border-color: #26334a;
    background: #111827;
    color: #e5f7ff;
}

.theme-tech .marketplace-product-card .shop-product-card__meta {
    border-top-color: #26334a;
}

.theme-tech .marketplace-product-card .shop-product-card__meta strong,
.theme-tech .marketplace-product-card .shop-product-card__body > small {
    color: #67e8f9;
}

.theme-fresh .marketplace-nav .marketplace-nav__all {
    background: #166534;
    color: #fff;
}

.theme-fresh .marketplace-product-grid {
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
}

@media (max-width: 560px) {
    .theme-fresh .marketplace-product-grid {
        grid-template-columns: 1fr;
    }
}

.product-category-image-editor {
    display: grid;
    grid-template-columns: 5.25rem minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border: 1px solid var(--erp-border);
    border-radius: var(--erp-radius-sm);
    background: var(--erp-surface-muted);
}

.product-category-image-editor__preview {
    display: grid;
    place-items: center;
    align-content: center;
    gap: 0.3rem;
    width: 5.25rem;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px dashed var(--erp-field-border);
    border-radius: 0.75rem;
    background: var(--erp-field-bg);
    color: var(--erp-text-soft);
}

.product-category-image-editor__preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-category-image-editor__preview i {
    font-size: 1.35rem;
}

.product-category-image-editor__preview span,
.product-category-image-editor__controls p,
.product-category-image-editor__controls small {
    font-size: 0.72rem;
    line-height: 1.55;
}

.product-category-image-editor__preview span {
    text-align: center;
}

.product-category-image-editor__controls {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.product-category-image-editor__controls strong {
    color: var(--erp-text);
    font-size: 0.88rem;
}

.product-category-image-editor__controls p {
    margin: 0;
    color: var(--erp-text-soft);
}

.product-category-image-editor__controls .erp-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.4rem;
    margin: 0;
}

.product-category-image-editor__controls .btn {
    width: 100%;
    min-height: 2.45rem;
    justify-content: center;
    padding-inline: 0.65rem;
    font-size: 0.78rem;
}

.product-category-table-image {
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    overflow: hidden;
    border: 1px solid var(--erp-border);
    border-radius: 0.75rem;
    background: var(--erp-field-bg);
    color: var(--erp-text-soft);
}

.product-category-table-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 560px) {
    .product-category-image-editor {
        grid-template-columns: 4.75rem minmax(0, 1fr);
    }

    .product-category-image-editor__preview {
        width: 4.75rem;
    }
}


/* Floating navigation: the drawer never reserves a column in the page. */
.erp-shell.erp-shell--floating {
    display: block;
    grid-template-columns: minmax(0, 1fr) !important;
    height: 100dvh;
    overflow-x: clip !important;
}

.erp-shell.erp-shell--floating > .erp-shell__main {
    height: 100%;
    margin: 0;
}

.erp-shell.erp-shell--floating .erp-topbar {
    flex-shrink: 0;
}

.erp-topbar__brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.erp-sidebar-toggle,
.erp-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 44px;
    min-height: 44px;
    flex-shrink: 0;
    touch-action: manipulation;
}

.erp-shell.erp-shell--floating > .erp-shell__sidebar {
    position: fixed;
    inset-block-start: max(0.75rem, env(safe-area-inset-top));
    inset-block-end: max(0.75rem, env(safe-area-inset-bottom));
    inset-inline-start: max(0.75rem, env(safe-area-inset-right));
    z-index: 1040;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.5rem;
    width: min(var(--erp-sidebar-width), calc(100vw - 1.5rem));
    max-width: calc(100vw - 1.5rem);
    min-height: 0;
    padding: 0.75rem !important;
    border: 1px solid var(--erp-border);
    border-radius: 1rem;
    background: var(--erp-surface);
    box-shadow: var(--erp-shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateX(calc(100% + 1.5rem));
    transition: transform 200ms ease, opacity 160ms ease, visibility 200ms;
    pointer-events: none;
}

.erp-shell--floating[data-sidebar-open="true"] > .erp-shell__sidebar {
    visibility: visible;
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.erp-sidebar-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-inline-start: 0.4rem;
    color: var(--erp-primary-strong);
}

.erp-sidebar-close {
    border: 1px solid var(--erp-border);
    border-radius: 0.6rem;
    background: var(--erp-surface-muted);
    color: var(--erp-text);
    cursor: pointer;
}

.erp-sidebar-close:hover {
    background: var(--erp-primary-soft);
}

.erp-sidebar-toggle:focus-visible,
.erp-sidebar-close:focus-visible {
    outline: 2px solid var(--erp-primary);
    outline-offset: 3px;
}

.erp-shell--floating .erp-sidebar {
    min-height: 0;
    height: 100%;
    overflow: hidden;
    gap: 0.75rem;
}

.erp-shell.erp-shell--floating .erp-nav-list {
    flex: 1 1 auto;
    min-height: 0;
    flex-direction: column;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.erp-shell--floating .erp-nav-link {
    min-width: 0;
    min-height: 44px !important;
}

.erp-shell--floating .erp-nav-group__summary {
    min-height: 44px;
}

.erp-shell--floating .erp-sidebar__profile {
    display: flex;
}

.erp-shell--floating .erp-sidebar__logout {
    display: block;
    margin-top: 0;
}

.erp-sidebar-edge {
    position: fixed;
    inset-inline-start: 0;
    inset-block-start: 35%;
    z-index: 1030;
    width: 12px;
    height: 30%;
}

.erp-sidebar-edge::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    inset-block-start: 35%;
    width: 3px;
    height: 3rem;
    border-radius: 3px;
    background: var(--erp-primary);
    opacity: 0.55;
}

.erp-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 1035;
    border: 0;
    padding: 0;
    background: color-mix(in srgb, var(--erp-bg) 65%, transparent);
    cursor: pointer;
}

.erp-sidebar-backdrop[hidden] {
    display: none !important;
}

@media (max-width: 760px), (hover: none) {
    .erp-sidebar-edge {
        display: none;
    }

    .erp-sidebar-backdrop:not([hidden]) {
        display: block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .erp-shell.erp-shell--floating > .erp-shell__sidebar {
        transition: none;
    }
}

@media print {
    .erp-shell--floating > .erp-shell__sidebar,
    .erp-sidebar-edge,
    .erp-sidebar-backdrop,
    .erp-sidebar-toggle {
        display: none !important;
    }
}

.erp-shell.erp-shell--floating .erp-nav-group {
    flex: 0 0 auto;
    min-width: 0;
}

.erp-shell.erp-shell--floating .erp-nav-group__items {
    max-height: none;
    overflow: visible;
}
