:root {
    --bg: #f7f5f0;
    --panel: #ffffff;
    --text: #171717;
    --muted: #6b7280;
    --line: #e7dfcf;
    --gold: #d4af37;
    --gold-dark: #967b27;
    --gold-soft: #fdf8e8;
    --luxury: #0a0a0a;
    --luxury-2: #171717;
    --green: #059669;
    --red: #dc2626;
    --blue: #2563eb;
    --shadow: 0 12px 30px rgba(17, 17, 17, .08);
}

/* Store multi-account selection and profile management */
.store-account-hero-tools {
    display: grid;
    justify-items: end;
    gap: 8px;
}

.store-account-hero-tools > div:last-child {
    display: flex;
    gap: 12px;
}

.store-account-hero-tools a,
.store-account-gate-actions a,
.store-account-gate-actions button {
    border: 0;
    background: transparent;
    color: #0F172A;
    font: inherit;
    font-weight: 800;
    text-decoration: underline;
    text-decoration-color: #D4AF37;
    text-underline-offset: 4px;
    cursor: pointer;
}

.store-account-gate {
    display: grid;
    gap: 24px;
    width: min(980px, 100%);
    margin: 42px auto 70px;
}

.store-account-gate > header {
    max-width: 720px;
}

.store-account-gate h1 {
    margin: 7px 0 8px;
    color: #0F172A;
    font-size: 34px;
}

.store-account-gate header p {
    margin: 0;
    color: #64748B;
}

.store-account-verified-phone {
    display: inline-block;
    margin-top: 10px;
    color: #334155;
    font-weight: 800;
}

.store-account-choice-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.store-account-choice {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: start;
    gap: 14px;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #FFFFFF;
    padding: 18px;
}

.store-account-choice:hover {
    border-color: #D4AF37;
}

.store-account-type-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    background: #0F172A;
    color: #D4AF37;
    font-size: 20px;
    font-weight: 900;
}

.store-account-choice h2 {
    margin: 3px 0;
    color: #0F172A;
    font-size: 18px;
}

.store-account-choice p,
.store-account-choice small {
    margin: 0;
    color: #64748B;
    font-size: 12px;
}

.store-account-type-label {
    color: #8A681B;
    font-size: 11px;
    font-weight: 900;
}

.store-account-choice .store-primary-action {
    grid-column: 1 / -1;
    width: 100%;
}

.store-account-gate-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border-top: 1px solid #E2E8F0;
    padding-top: 16px;
}

.store-account-create {
    width: min(620px, 100%);
}

.store-account-create-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #FFFFFF;
    padding: 20px;
}

.store-account-create-form label,
.store-profile-fields label,
.store-profile-inline-form label {
    display: grid;
    gap: 6px;
    min-width: 0;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
}

.store-account-create-form input,
.store-profile-fields input,
.store-profile-fields select,
.store-profile-inline-form input,
.store-profile-inline-form select {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #FFFFFF;
    padding: 8px 10px;
}

.store-account-create-form .store-primary-action {
    grid-column: 1 / -1;
}

.store-profile-page {
    display: grid;
    gap: 18px;
    width: min(1040px, 100%);
    margin: 24px auto 60px;
}

.store-profile-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 1px solid #E2E8F0;
    padding-bottom: 20px;
}

.store-profile-header h1 {
    margin: 7px 0 4px;
    color: #0F172A;
    font-size: 30px;
}

.store-profile-header p,
.store-profile-form header p,
.store-profile-panel header p,
.store-profile-notice p {
    margin: 0;
    color: #64748B;
}

.store-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #FFFFFF;
    padding: 8px 14px;
    color: #0F172A;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}

.store-profile-form,
.store-profile-panel,
.store-profile-notice {
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #FFFFFF;
    padding: 20px;
}

.store-profile-form > header,
.store-profile-panel > header {
    margin-bottom: 16px;
}

.store-profile-form h2,
.store-profile-panel h2,
.store-profile-notice strong {
    margin: 0 0 4px;
    color: #0F172A;
    font-size: 18px;
}

.store-profile-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.store-profile-fields .span-2 {
    grid-column: span 2;
}

.store-profile-fields small {
    color: #64748B;
    font-weight: 500;
}

.store-profile-check {
    display: flex !important;
    align-items: flex-start;
    gap: 8px !important;
    padding: 8px 0;
}

.store-profile-check input {
    width: 17px;
    min-height: 17px;
    margin-top: 2px;
}

.store-profile-form footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 16px;
}

.store-profile-phone-list {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
}

.store-profile-phone-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #E2E8F0;
    padding: 9px 0;
}

.store-profile-phone-list article > div {
    display: grid;
    gap: 2px;
}

.store-profile-phone-list small {
    color: #64748B;
}

.store-danger-link {
    border: 0;
    background: transparent;
    color: #991B1B;
    font-weight: 800;
    cursor: pointer;
}

.store-profile-inline-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 10px;
}

details.store-profile-panel > summary {
    color: #0F172A;
    font-size: 18px;
    font-weight: 900;
    cursor: pointer;
}

details.store-profile-panel[open] > summary {
    margin-bottom: 18px;
}

.store-profile-form.compact {
    border: 0;
    padding: 0;
}

@media (max-width: 700px) {
    .store-account-hero-tools {
        justify-items: stretch;
    }

    .store-account-choice-grid,
    .store-account-create-form,
    .store-profile-fields {
        grid-template-columns: 1fr;
    }

    .store-profile-fields .span-2,
    .store-account-create-form .store-primary-action {
        grid-column: auto;
    }

    .store-account-gate {
        margin-top: 22px;
    }

    .store-account-gate h1 {
        font-size: 28px;
    }

    .store-account-gate-actions,
    .store-profile-header {
        align-items: stretch;
        flex-direction: column;
    }

    .store-profile-inline-form {
        grid-template-columns: 1fr;
    }

    .store-profile-inline-form .store-secondary-action,
    .store-profile-form footer .store-primary-action {
        width: 100%;
    }
}

* {
    box-sizing: border-box;
}

html {
    scrollbar-color: var(--gold) #eee7da;
    scrollbar-width: thin;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
select,
textarea {
    font: inherit;
}

img {
    max-width: 100%;
}

[dir="ltr"] th,
[dir="ltr"] td {
    text-align: left;
}

[dir="ltr"] .ltr {
    direction: ltr;
    text-align: left;
}

[dir="ltr"] .item-card input {
    margin-left: 0;
    margin-right: 6px;
}

.admin-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #fbfaf7 0, #f4f0e7 100%);
}

.app-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 286px minmax(0, 1fr);
}

.sidebar {
    background: var(--luxury);
    color: #e5e7eb;
    padding: 20px 14px;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-inline-end: 1px solid rgba(212, 175, 55, .28);
    box-shadow: 12px 0 32px rgba(0, 0, 0, .12);
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 10px 22px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--gold), #9f7e1d);
    display: grid;
    place-items: center;
    color: #111;
    font-weight: 900;
    box-shadow: 0 8px 22px rgba(212, 175, 55, .22);
}

.brand-name {
    font-weight: 900;
    color: #fff;
    font-size: 15px;
}

.brand small {
    color: #a3a3a3;
    font-size: 12px;
}

.sidebar-nav {
    display: grid;
    gap: 4px;
}

.nav-title {
    margin: 18px 10px 8px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    border-radius: 10px;
    color: #d4d4d4;
    font-weight: 800;
    font-size: 13px;
    border: 1px solid transparent;
}

.nav-icon {
    direction: ltr;
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 24px;
    border-radius: 8px;
    background: var(--luxury-2);
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(212, 175, 55, .11);
    border-color: rgba(212, 175, 55, .22);
    color: #fff;
}

.nav-link.active .nav-icon {
    background: var(--gold);
    color: #111;
}

.main {
    min-width: 0;
}

.topbar {
    min-height: 76px;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 28px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.page-kicker {
    font-size: 11px;
    color: var(--gold-dark);
    font-weight: 900;
}

.topbar h1 {
    font-size: 23px;
    margin: 2px 0 0;
    font-weight: 900;
}

.user-box {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 13px;
}

.user-meta {
    background: #f8f4e8;
    border: 1px solid #eee2bf;
    padding: 7px 10px;
    border-radius: 10px;
    color: #3f3f46;
    font-weight: 800;
}

.sep {
    color: #c3a24a;
    margin: 0 6px;
}

.content {
    padding: 26px;
    max-width: 1680px;
}

.grid {
    display: grid;
    gap: 16px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel {
    background: rgba(255, 255, 255, .96);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
    margin-top: 0;
    color: #171717;
    font-weight: 900;
}

.panel h2 {
    font-size: 19px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0eadc;
}

.stat {
    position: relative;
    overflow: hidden;
    min-height: 112px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat::before {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--gold);
}

.stat span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.stat strong {
    font-size: 25px;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.money-amount {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    direction: ltr;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.money-number,
.measurement-number {
    font-family: "Roboto Mono", Consolas, monospace;
    letter-spacing: 0;
}

.riyal-icon {
    width: 8px !important;
    height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
    object-fit: contain;
    vertical-align: -1px;
}

.heading-currency {
    width: 8px !important;
    height: 8px !important;
}

.label-currency,
.inline-currency {
    width: 8px !important;
    height: 8px !important;
}

.measurement-amount {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    direction: ltr;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.measurement-unit {
    color: var(--gold-dark);
    font-size: .78em;
    font-weight: 800;
}

.table-wrap {
    overflow: auto;
    border: 1px solid #eee6d7;
    border-radius: 12px;
    background: #fff;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 760px;
}

th,
td {
    padding: 12px 11px;
    border-bottom: 1px solid #efe7d8;
    text-align: right;
    vertical-align: middle;
}

th {
    background: #111;
    color: #f8f4e8;
    font-size: 12px;
    font-weight: 900;
    position: sticky;
    top: 0;
    z-index: 1;
}

tr:hover td {
    background: #fffdf5;
}

td {
    font-size: 13px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 13px;
    align-items: end;
}

.field label {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #514b3f;
    font-size: 12px;
    font-weight: 900;
    margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
    width: 100%;
    border: 1px solid #ddd2be;
    border-radius: 10px;
    padding: 10px 12px;
    background: #fff;
    color: var(--text);
    min-height: 42px;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
    outline: 0;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .16);
}

.field input[type="number"],
.actions input[type="number"],
.table-wrap input[type="number"] {
    direction: ltr;
    text-align: left;
    font-family: "Roboto Mono", Consolas, monospace;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

.field textarea {
    min-height: 88px;
    resize: vertical;
}

input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--gold-dark);
    vertical-align: middle;
}

.actions input,
.actions select,
.actions textarea,
.table-wrap input,
.table-wrap select {
    border: 1px solid #ddd2be;
    border-radius: 10px;
    padding: 8px 10px;
    background: #fff;
    color: var(--text);
    min-height: 38px;
}

.actions input:focus,
.actions select:focus,
.actions textarea:focus,
.table-wrap input:focus,
.table-wrap select:focus {
    outline: 0;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .16);
}

.btn {
    border: 0;
    border-radius: 10px;
    padding: 10px 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
    font-weight: 900;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold), #a78324);
    color: #111;
    box-shadow: 0 10px 22px rgba(212, 175, 55, .22);
}

.btn-primary:hover {
    filter: brightness(.97);
}

.btn-muted {
    background: #f3efe5;
    color: #171717;
    border: 1px solid #e7dec9;
}

.btn-danger {
    background: var(--red);
    color: #fff;
}

.btn-small {
    padding: 7px 10px;
    min-height: auto;
    font-size: 12px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: #f3efe5;
    color: #6b5b31;
}

.badge.green {
    background: #e8f7ef;
    color: var(--green);
}

.badge.red {
    background: #fdebea;
    color: var(--red);
}

.badge.gold {
    background: #fff4d8;
    color: #7a6422;
}

.badge.blue {
    background: #e8efff;
    color: var(--blue);
}

.flash {
    margin-bottom: 14px;
    padding: 13px 15px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .05);
}

.flash.success {
    border-color: #a7e4bd;
    background: #f0fff4;
    color: #087443;
}

.flash.error {
    border-color: #fac5bd;
    background: #fff1f0;
    color: #b42318;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at 20% 10%, #fff6d8 0, #fbfaf7 34%, #111 35%, #0a0a0a 100%);
}

.login-card {
    width: min(430px, 100%);
    background: #fff;
    border: 1px solid #e9ddc5;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .22);
}

.login-card h1 {
    margin-top: 0;
    font-weight: 900;
}

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 13px;
}

.pos-invoice-summary {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 16px 0 0;
    padding: 12px 14px;
    border: 1px solid #eee2bf;
    border-radius: 12px;
    background: #fffaf0;
    color: #514b3f;
    font-size: 13px;
}

.pos-invoice-summary strong {
    color: #171717;
}

.item-card {
    border: 1px solid #e8dfcf;
    border-radius: 12px;
    padding: 14px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(17, 17, 17, .05);
}

.item-card:hover {
    border-color: var(--gold);
    box-shadow: 0 12px 24px rgba(212, 175, 55, .14);
}

.item-card input {
    margin-left: 6px;
}

.item-card strong {
    display: block;
    margin-bottom: 8px;
    font-weight: 900;
}

.text-muted,
.muted {
    color: var(--muted);
}

.actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.facts {
    display: grid;
    gap: 9px;
    margin: 0;
}

.facts div {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}

.facts dt {
    color: #756b5c;
    font-size: 12px;
    font-weight: 900;
}

.facts dd {
    margin: 0;
    min-width: 0;
}

.btn:disabled {
    opacity: .55;
    cursor: not-allowed;
}

.ltr {
    direction: ltr;
    text-align: left;
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
}

.language-switch a {
    padding: 5px 8px;
    border-radius: 8px;
}

.language-switch a.active {
    background: #111;
    color: var(--gold);
    font-weight: 900;
}

.login-language {
    margin-top: 14px;
    justify-content: center;
}

pre.ltr {
    max-width: 100%;
    overflow-x: auto;
    background: #0f172a;
    color: #e5e7eb;
    border-radius: 12px;
    padding: 12px;
    line-height: 1.6;
}

.code-editor {
    direction: ltr;
    text-align: left;
    min-height: 280px;
    font-family: "Roboto Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre;
}

.modal {
    width: min(760px, calc(100% - 28px));
    border: 0;
    border-radius: 14px;
    padding: 0;
    background: transparent;
}

.modal::backdrop {
    background: rgba(10, 10, 10, .58);
    backdrop-filter: blur(4px);
}

.modal-panel {
    background: #fff;
    border: 1px solid #e7dfcf;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .24);
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0eadc;
}

.modal-header h3 {
    margin: 0;
    font-weight: 900;
}

.store-body {
    background: var(--store-bg, #fbfaf7);
    color: var(--secondary, #111);
}

.store-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px clamp(16px, 4vw, 56px);
    border-bottom: 1px solid rgba(212, 175, 55, .28);
    background: var(--luxury);
    color: #fff;
    position: sticky;
    top: 0;
    z-index: 20;
    box-shadow: 0 12px 30px rgba(0, 0, 0, .14);
}

.store-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    color: #fff;
    font-size: 21px;
}

.store-logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--primary, var(--gold));
    color: #111;
}

.store-nav {
    display: flex;
    gap: 14px;
    align-items: center;
    flex-wrap: wrap;
}

.store-nav a {
    color: #eee;
    font-weight: 900;
    font-size: 13px;
}

.store-nav a:hover {
    color: var(--primary, var(--gold));
}

.store-main {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 58px;
}

.store-hero {
    min-height: 330px;
    display: grid;
    align-content: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
}

.store-hero h1 {
    font-size: clamp(34px, 6vw, 62px);
    margin: 0;
    font-weight: 900;
    letter-spacing: 0;
}

.store-hero p {
    color: var(--muted);
    max-width: 620px;
    font-size: 18px;
}

.price-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.price-pill {
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 14px;
    padding: 14px;
    background: #111;
    color: #fff;
    box-shadow: 0 12px 28px rgba(0, 0, 0, .12);
}

.price-pill strong {
    color: var(--gold);
}

.price-pill .riyal-icon {
    filter: invert(76%) sepia(49%) saturate(717%) hue-rotate(358deg) brightness(89%) contrast(88%);
}

.price-pill .measurement-unit {
    color: var(--gold);
}

.integration-summary .stat strong {
    font-size: 22px;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 18px;
}

.product-card {
    border: 1px solid #e8dfcf;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: var(--shadow);
}

.product-card img,
.product-photo {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    background: #f3f0e8;
    display: block;
}

.store-product-media {
    display: grid;
    gap: 10px;
}

.store-media-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.store-media-tab {
    border: 1px solid #e8dfcf;
    border-radius: 10px;
    background: #fff;
    color: #514b3f;
    cursor: pointer;
    min-height: 38px;
    padding: 8px 14px;
    font-weight: 900;
}

.store-media-tab.active,
.store-media-tab:hover {
    background: #111;
    color: var(--gold);
    border-color: rgba(212, 175, 55, .34);
}

.store-media-panel {
    display: none;
}

.store-media-panel.active {
    display: block;
}

.spin-viewer,
.product-model-viewer,
.product-media-model-preview {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f3f0e8;
    display: block;
    overflow: hidden;
}

.spin-viewer {
    position: relative;
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.spin-viewer:active {
    cursor: grabbing;
}

.spin-frame {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    display: none;
    pointer-events: none;
}

.spin-frame.active {
    display: block;
}

.product-media-model-preview {
    min-height: 230px;
}

.product-card-body {
    padding: 14px;
    display: grid;
    gap: 9px;
}

.product-card-body a {
    font-weight: 900;
}

.store-footer {
    border-top: 1px solid var(--line);
    padding: 24px clamp(16px, 4vw, 56px);
    color: var(--muted);
    background: #fff;
}

.store-form {
    display: grid;
    gap: 13px;
    max-width: 900px;
}

.store-form .field {
    margin: 0;
}

.empty-state {
    border: 1px dashed #d8caa9;
    border-radius: 14px;
    padding: 30px;
    text-align: center;
    color: var(--muted);
    background: #fffaf0;
}

.inventory-hero {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, 1.6fr);
    gap: 16px;
    align-items: stretch;
    margin-bottom: 16px;
}

.inventory-hero > div:first-child {
    background: #111;
    color: #fff;
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 14px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.inventory-hero h2 {
    margin: 0 0 8px;
    font-size: 22px;
    font-weight: 900;
}

.inventory-hero p {
    margin: 0;
    color: #d6d3c9;
    max-width: 760px;
}

.inventory-quick-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.stat.compact {
    min-height: 96px;
    padding: 16px;
}

.stat.compact strong {
    font-size: 22px;
}

.tabs {
    display: grid;
    gap: 14px;
}

.tab-list {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    box-shadow: var(--shadow);
}

.tab-button {
    border: 1px solid transparent;
    border-radius: 10px;
    background: transparent;
    color: #514b3f;
    cursor: pointer;
    min-height: 38px;
    padding: 8px 13px;
    font-weight: 900;
}

.tab-button:hover,
.tab-button.active {
    background: #111;
    color: var(--gold);
    border-color: rgba(212, 175, 55, .34);
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.compact-form {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.input-with-action {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
}

.inventory-code-field {
    gap: 7px;
}

.catalog-table {
    margin-top: 14px;
}

.catalog-table input[name="name"] {
    min-width: 170px;
}

.catalog-table input[name="sort_order"] {
    width: 92px;
}

.inventory-row-actions {
    display: grid;
    gap: 8px;
    min-width: 520px;
}

.rfid-bind-form input[name="epc"] {
    width: 210px;
}

.rfid-bind-form select[name="current_location_id"] {
    width: 170px;
}

.location-inline-form input[name="code"] {
    width: 90px;
}

.location-inline-form input[name="name"] {
    width: 150px;
}

.location-inline-form select {
    width: 125px;
}

.checkbox-inline {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    color: #514b3f;
    font-size: 12px;
    font-weight: 900;
}

.stocktake-counters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.stocktake-counters div {
    border: 1px solid #eee2bf;
    border-radius: 12px;
    background: #fffaf0;
    padding: 12px;
}

.stocktake-counters span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 900;
}

.stocktake-counters strong {
    display: block;
    color: #171717;
    font-size: 22px;
    font-weight: 900;
    margin-top: 2px;
}

.rfid-scan-box {
    min-height: 150px;
}

@media (max-width: 1100px) {
    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

    .sidebar-nav {
        grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    }

    .nav-title {
        grid-column: 1 / -1;
    }

    .topbar {
        position: static;
        align-items: flex-start;
        flex-direction: column;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .compact-form,
    .inventory-hero,
    .inventory-quick-stats,
    .stocktake-counters {
        grid-template-columns: 1fr;
    }

    .content {
        padding: 16px;
    }

    .facts div {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .store-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-wrap {
        border-radius: 10px;
    }

    .inventory-row-actions {
        min-width: 360px;
    }
}

/* ==========================================================================
   Kabayan Enterprise Identity System
   Source: visual identity kit
   ========================================================================== */
:root {
    --color-gold: #D4AF37;
    --color-gold-hover: #B5952F;
    --color-gold-light: #FFFBEB;
    --color-gold-border: #FDE68A;
    --color-bg: #F8FAFC;
    --color-surface: #FFFFFF;
    --color-text-main: #0F172A;
    --color-text-muted: #64748B;
    --color-border: #E2E8F0;
    --color-border-hover: #CBD5E1;
    --color-input-bg: #FFFFFF;
    --color-success-bg: #ECFDF5;
    --color-success-text: #047857;
    --color-success-border: #A7F3D0;
    --color-danger-bg: #FEF2F2;
    --color-danger-text: #DC2626;
    --color-danger-border: #FECACA;
    --color-info-bg: #EFF6FF;
    --color-info-text: #1D4ED8;
    --color-info-border: #BFDBFE;
    --shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    --radius-card: 12px;
    --radius-control: 6px;
    --bg: var(--color-bg);
    --panel: var(--color-surface);
    --text: var(--color-text-main);
    --muted: var(--color-text-muted);
    --line: var(--color-border);
    --gold: var(--color-gold);
    --gold-dark: var(--color-gold-hover);
    --gold-50: var(--color-gold-light);
    --gold-100: #FEF3C7;
    --gold-300: var(--color-gold-border);
    --gold-400: var(--color-gold);
    --gold-500: var(--color-gold);
    --gold-600: var(--color-gold-hover);
    --luxury: var(--color-text-main);
    --luxury-900: var(--color-text-main);
    --luxury-800: #1E293B;
    --success: #059669;
    --danger: var(--color-danger-text);
}

body.admin-body,
body.admin-body .luxury-dashboard,
body.admin-body .lux-purchases-page,
body.admin-body .lux-inventory-page,
body.admin-body .lux-reports-page,
body.admin-body .lux-sales-page,
body.admin-body .lux-panel,
body.admin-body .panel,
body.admin-body .pos-screen,
body.admin-body .pos-workspace,
body.admin-body .branch-panel {
    --luxury: #0F172A !important;
    --luxury-900: #0F172A !important;
    --luxury-800: #1E293B !important;
    --luxury-2: #1E293B !important;
    --gold: #D4AF37 !important;
    --gold-50: #FFFBEB !important;
    --gold-100: #FEF3C7 !important;
    --gold-300: #FDE68A !important;
    --gold-400: #D4AF37 !important;
    --gold-500: #D4AF37 !important;
    --gold-600: #B5952F !important;
}

html {
    scrollbar-color: #CBD5E1 transparent;
}

*, *::before, *::after {
    letter-spacing: 0;
}

body,
body.admin-body,
body.store-body:not(.sf-storefront) {
    background: var(--color-bg) !important;
    color: var(--color-text-main) !important;
    font-family: 'Tajawal', "Segoe UI", Tahoma, Arial, sans-serif !important;
}

body.admin-body a,
body.store-body:not(.sf-storefront) a {
    color: inherit;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--color-text-main);
    letter-spacing: 0;
}

.font-numbers,
.money-amount,
.measurement-amount,
.price-value,
.stat-value,
.price-number,
.measurement-number {
    font-family: 'Roboto Mono', monospace !important;
    font-variant-numeric: tabular-nums !important;
    letter-spacing: 0 !important;
}

.measurement-unit,
.money-unit,
.price-unit {
    color: var(--color-text-muted) !important;
    font-size: .78em !important;
    font-weight: 800 !important;
}

.riyal-icon,
.currency-icon,
img[src$="Saudi_Riyal.svg"],
img[src*="Saudi_Riyal.svg"] {
    width: 8px !important;
    height: 8px !important;
    max-width: 8px !important;
    max-height: 8px !important;
    min-width: 0 !important;
    min-height: 0 !important;
    display: inline-block !important;
    object-fit: contain !important;
    vertical-align: -1px !important;
}

body.admin-body .panel,
body.admin-body .lux-panel,
body.admin-body .card,
body.admin-body .branch-panel,
body.admin-body .payment-card,
body.admin-body .invoice-panel,
body.admin-body .pos-panel,
body.admin-body .modal-panel,
body.admin-body .lux-table-panel,
body.admin-body .live-prices-panel,
body.admin-body .lux-stat-card,
body.admin-body .stat,
body.admin-body .payment-add,
body.admin-body .store-media-panel,
body.store-body:not(.sf-storefront) .panel,
body.store-body:not(.sf-storefront) .card,
body.store-body:not(.sf-storefront) .product-card,
body.store-body:not(.sf-storefront) .price-pill,
body.store-body:not(.sf-storefront) .store-media-panel {
    background: var(--color-surface) !important;
    color: var(--color-text-main) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow) !important;
}

body.admin-body .panel-header,
body.admin-body .live-header,
body.admin-body .payment-card h2,
body.admin-body .branch-panel h2,
body.admin-body .pos-panel h2,
body.admin-body .lux-table-panel h2 {
    color: var(--color-text-main) !important;
}

body.admin-body .panel-header::after,
body.admin-body .lux-table-panel h2::after,
body.admin-body .lux-inventory-hero::before,
body.admin-body .live-prices-panel::before,
body.admin-body .lux-stat-card.profit-card::after {
    display: none !important;
}

body.admin-body .panel-header i,
body.admin-body .panel-header-title i,
body.admin-body .lux-table-panel h2 i {
    color: var(--color-gold-hover) !important;
}

body.admin-body .lux-inventory-hero,
body.admin-body .inventory-hero > div:first-child,
body.admin-body .pos-header,
body.admin-body .dashboard-report-bar,
body.admin-body .pos-mode-switch,
body.admin-body .luxury-dashboard .live-prices-panel {
    background: var(--color-surface) !important;
    color: var(--color-text-main) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-card) !important;
    box-shadow: var(--shadow) !important;
}

body.admin-body .lux-inventory-hero p,
body.admin-body .inventory-hero p,
body.admin-body .pos-header p,
body.admin-body .dashboard-report-copy span,
body.admin-body .stat-info span,
body.admin-body .price-label,
body.admin-body .field small,
body.admin-body .hint,
body.store-body:not(.sf-storefront) .store-footer {
    color: var(--color-text-muted) !important;
}

body.admin-body .stat-icon,
body.admin-body .luxury-dashboard .stat-icon,
body.admin-body .pos-header-icon {
    background: #F8FAFC !important;
    color: var(--color-gold-hover) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

body.admin-body .stat-icon.dark,
body.admin-body .luxury-dashboard .stat-icon.dark,
body.admin-body .luxury-dashboard .stat-icon.gold {
    background: var(--color-gold-light) !important;
    color: var(--color-gold-hover) !important;
    border-color: var(--color-gold-border) !important;
}

body.admin-body .stat-icon.emerald,
body.admin-body .luxury-dashboard .stat-icon.emerald,
body.admin-body .luxury-dashboard .stat-icon.blue {
    background: #F8FAFC !important;
    color: var(--color-text-muted) !important;
    border-color: var(--color-border) !important;
}

body.admin-body .stat-info strong,
body.admin-body .stat-value,
body.admin-body .price-value,
body.admin-body .luxury-dashboard .price-value,
body.admin-body .luxury-dashboard .price-value .money-amount {
    color: var(--color-text-main) !important;
}

body.admin-body .table-wrap,
body.admin-body .lux-table-wrap,
body.admin-body .table-container,
body.admin-body .payment-table-wrap,
body.admin-body .branch-table-wrap,
body.store-body:not(.sf-storefront) .table-wrap {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    overflow: auto;
}

body.admin-body table,
body.admin-body .table,
body.admin-body .lux-table,
body.admin-body .payment-table,
body.store-body:not(.sf-storefront) table {
    color: var(--color-text-main) !important;
    border-color: var(--color-border) !important;
}

body.admin-body table th,
body.admin-body .table th,
body.admin-body .lux-table th,
body.admin-body .payment-table th,
body.store-body:not(.sf-storefront) table th {
    background: #F8FAFC !important;
    color: var(--color-text-muted) !important;
    border-bottom: 1px solid var(--color-border) !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
}

body.admin-body table td,
body.admin-body .table td,
body.admin-body .lux-table td,
body.admin-body .payment-table td,
body.store-body:not(.sf-storefront) table td {
    background: var(--color-surface) !important;
    color: var(--color-text-main) !important;
    border-bottom: 1px solid #F1F5F9 !important;
}

body.admin-body table tr:hover td,
body.admin-body .table tr:hover td,
body.admin-body .lux-table tr:hover td,
body.admin-body .payment-table tr:hover td {
    background: #F8FAFC !important;
}

body.admin-body .btn,
body.admin-body button.btn,
body.admin-body .lux-btn-primary,
body.admin-body .lux-btn-secondary,
body.admin-body .lux-btn-danger,
body.admin-body .branch-btn,
body.admin-body .payment-btn,
body.admin-body .btn-display,
body.store-body:not(.sf-storefront) .btn,
body.store-body:not(.sf-storefront) button,
body.store-body:not(.sf-storefront) .store-media-tab {
    border-radius: var(--radius-control) !important;
    min-height: 40px;
    box-shadow: none !important;
    font-weight: 800 !important;
    letter-spacing: 0 !important;
}

body.admin-body .btn-primary,
body.admin-body .lux-btn-primary,
body.admin-body .branch-btn.primary,
body.admin-body .btn-display,
body.admin-body button[type="submit"]:not(.lux-dropdown-item):not(.plain-btn),
body.store-body:not(.sf-storefront) .btn-primary,
body.store-body:not(.sf-storefront) button[type="submit"] {
    background: var(--color-gold) !important;
    color: #111827 !important;
    border: 1px solid var(--color-gold-hover) !important;
}

body.admin-body .btn-primary:hover,
body.admin-body .lux-btn-primary:hover,
body.admin-body .branch-btn.primary:hover,
body.admin-body .btn-display:hover,
body.admin-body button[type="submit"]:not(.lux-dropdown-item):not(.plain-btn):hover,
body.store-body:not(.sf-storefront) .btn-primary:hover,
body.store-body:not(.sf-storefront) button[type="submit"]:hover {
    background: var(--color-gold-hover) !important;
    color: #111827 !important;
}

body.admin-body .btn-muted,
body.admin-body .btn-secondary,
body.admin-body .lux-btn-secondary,
body.admin-body .branch-btn:not(.primary),
body.admin-body .payment-btn.secondary,
body.store-body:not(.sf-storefront) .btn-muted,
body.store-body:not(.sf-storefront) .btn-secondary {
    background: var(--color-surface) !important;
    color: #334155 !important;
    border: 1px solid var(--color-border) !important;
}

body.admin-body .btn-muted:hover,
body.admin-body .btn-secondary:hover,
body.admin-body .lux-btn-secondary:hover,
body.admin-body .branch-btn:not(.primary):hover,
body.store-body:not(.sf-storefront) .btn-muted:hover,
body.store-body:not(.sf-storefront) .btn-secondary:hover {
    background: #F8FAFC !important;
    border-color: var(--color-border-hover) !important;
    color: var(--color-text-main) !important;
}

body.admin-body .btn-danger,
body.admin-body .lux-btn-danger,
body.admin-body .branch-btn.danger,
body.store-body:not(.sf-storefront) .btn-danger {
    background: var(--color-danger-bg) !important;
    color: var(--color-danger-text) !important;
    border: 1px solid var(--color-danger-border) !important;
}

body.admin-body .field input,
body.admin-body .field select,
body.admin-body .field textarea,
body.admin-body .form-control,
body.admin-body .lux-input,
body.admin-body .lux-select,
body.admin-body .lux-textarea,
body.admin-body input[type="text"],
body.admin-body input[type="number"],
body.admin-body input[type="email"],
body.admin-body input[type="password"],
body.admin-body input[type="date"],
body.admin-body input[type="datetime-local"],
body.admin-body input[type="search"],
body.admin-body select,
body.admin-body textarea,
body.store-body:not(.sf-storefront) input,
body.store-body:not(.sf-storefront) select,
body.store-body:not(.sf-storefront) textarea {
    background: var(--color-input-bg) !important;
    color: var(--color-text-main) !important;
    border: 1px solid var(--color-border-hover) !important;
    border-radius: var(--radius-control) !important;
    min-height: 40px;
    box-shadow: none !important;
    outline: none !important;
}

body.admin-body input:focus,
body.admin-body select:focus,
body.admin-body textarea:focus,
body.store-body:not(.sf-storefront) input:focus,
body.store-body:not(.sf-storefront) select:focus,
body.store-body:not(.sf-storefront) textarea:focus {
    border-color: var(--color-gold) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.16) !important;
}

body.admin-body label,
body.admin-body .form-label,
body.admin-body .field label,
body.store-body:not(.sf-storefront) label {
    color: #334155 !important;
    font-weight: 800 !important;
}

body.admin-body .input-addon,
body.admin-body .input-group-text {
    background: #F8FAFC !important;
    color: var(--color-text-muted) !important;
    border-color: var(--color-border-hover) !important;
}

body.admin-body .badge,
body.admin-body .lux-badge,
body.admin-body .branch-pill,
body.admin-body .status-pill,
body.admin-body .invoice-pill,
body.store-body:not(.sf-storefront) .badge {
    border-radius: 6px !important;
    padding: 5px 9px !important;
    font-weight: 900 !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}

body.admin-body .badge.gold,
body.admin-body .lux-badge.gold,
body.admin-body .branch-pill.gold,
body.admin-body .status-pill.gold {
    background: var(--color-gold-light) !important;
    color: #B45309 !important;
    border: 1px solid var(--color-gold-border) !important;
}

body.admin-body .badge.green,
body.admin-body .lux-badge.green,
body.admin-body .status-pill.green,
body.admin-body .success {
    background: var(--color-success-bg) !important;
    color: var(--color-success-text) !important;
    border-color: var(--color-success-border) !important;
}

body.admin-body .badge.blue,
body.admin-body .lux-badge.blue,
body.admin-body .status-pill.blue {
    background: var(--color-info-bg) !important;
    color: var(--color-info-text) !important;
    border-color: var(--color-info-border) !important;
}

body.admin-body .badge.red,
body.admin-body .lux-badge.red,
body.admin-body .status-pill.red,
body.admin-body .danger {
    background: var(--color-danger-bg) !important;
    color: var(--color-danger-text) !important;
    border-color: var(--color-danger-border) !important;
}

body.admin-body .lux-badge.dark,
body.admin-body .badge.dark,
body.admin-body .invoice-pill.dark,
body.admin-body .branch-pill.dark {
    background: #F8FAFC !important;
    color: #334155 !important;
    border: 1px solid var(--color-border) !important;
}

body.admin-body .page-btn {
    background: var(--color-surface) !important;
    color: #475569 !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 6px !important;
    box-shadow: none !important;
}

body.admin-body .page-btn:hover,
body.admin-body .page-btn.active {
    background: var(--color-text-main) !important;
    color: #FFFFFF !important;
    border-color: var(--color-text-main) !important;
}

body.admin-body .tab-list,
body.admin-body .lux-tabs,
body.admin-body .tabs-nav,
body.admin-body .store-media-tabs {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    box-shadow: var(--shadow) !important;
}

body.admin-body .tab-button,
body.admin-body .lux-tab-btn,
body.admin-body .lux-tab-button,
body.admin-body .pos-mode-tab,
body.admin-body .store-media-tab {
    background: transparent !important;
    color: #475569 !important;
    border: 1px solid transparent !important;
    border-radius: 6px !important;
}

body.admin-body .tab-button:hover,
body.admin-body .tab-button.active,
body.admin-body .lux-tab-btn:hover,
body.admin-body .lux-tab-btn.active,
body.admin-body .lux-tab-button:hover,
body.admin-body .lux-tab-button.active,
body.admin-body .pos-mode-tab:hover,
body.admin-body .pos-mode-tab.active,
body.admin-body .store-media-tab:hover,
body.admin-body .store-media-tab.active {
    background: var(--color-text-main) !important;
    color: #FFFFFF !important;
    border-color: var(--color-text-main) !important;
}

body.admin-body .pos-item-card,
body.admin-body .item-card,
body.admin-body .lux-price-pill,
body.admin-body .stocktake-counters div,
body.admin-body .product-card {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    color: var(--color-text-main) !important;
}

body.admin-body .pos-item-card:hover,
body.admin-body .item-card:hover,
body.admin-body .lux-price-pill:hover,
body.store-body:not(.sf-storefront) .product-card:hover {
    border-color: var(--color-gold-border) !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08) !important;
}

body.admin-body .pos-item-card:has(input[type="checkbox"]:checked),
body.admin-body .item-card:has(input[type="checkbox"]:checked) {
    background: var(--color-gold-light) !important;
    border-color: var(--color-gold) !important;
}

body.admin-body .rfid-scan-box,
body.admin-body .barcode-preview,
body.admin-body pre,
body.admin-body code {
    background: #F8FAFC !important;
    color: #334155 !important;
    border-color: var(--color-border) !important;
    border-radius: 8px !important;
}

body.store-body:not(.sf-storefront) {
    background: var(--store-bg, var(--color-bg)) !important;
}

body.store-body:not(.sf-storefront) .store-header {
    background: rgba(255, 255, 255, 0.96) !important;
    border-bottom: 1px solid var(--color-border) !important;
    box-shadow: none !important;
    color: var(--color-text-main) !important;
}

body.store-body:not(.sf-storefront) .store-logo {
    color: var(--color-text-main) !important;
    font-weight: 900 !important;
    text-decoration: none !important;
}

body.store-body:not(.sf-storefront) .store-logo-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 8px !important;
    background: var(--primary, var(--color-gold)) !important;
    color: #111827 !important;
    box-shadow: none !important;
}

body.store-body:not(.sf-storefront) .store-nav a,
body.store-body:not(.sf-storefront) .language-switch a {
    color: #475569 !important;
    border-radius: 6px !important;
    text-decoration: none !important;
}

body.store-body:not(.sf-storefront) .store-nav a:hover,
body.store-body:not(.sf-storefront) .language-switch a.active {
    background: var(--color-gold-light) !important;
    color: var(--color-text-main) !important;
}

body.store-body:not(.sf-storefront) .store-main {
    background: transparent !important;
}

body.store-body:not(.sf-storefront) .store-footer {
    background: var(--color-surface) !important;
    border-top: 1px solid var(--color-border) !important;
}

body.store-body:not(.sf-storefront) .price-pill strong,
body.store-body:not(.sf-storefront) .product-card-body a {
    color: var(--color-text-main) !important;
}

body.store-body:not(.sf-storefront) .product-card img,
body.store-body:not(.sf-storefront) .store-media-panel img {
    background: #F8FAFC !important;
    border-color: var(--color-border) !important;
}

.login-card {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.10) !important;
}

.login-card h1 {
    color: var(--color-text-main) !important;
}

.flash,
.lux-flash {
    border-radius: 8px !important;
    box-shadow: var(--shadow) !important;
}

.flash.success,
.lux-flash.success {
    background: var(--color-success-bg) !important;
    color: var(--color-success-text) !important;
    border: 1px solid var(--color-success-border) !important;
}

.flash.error,
.lux-flash.error {
    background: var(--color-danger-bg) !important;
    color: var(--color-danger-text) !important;
    border: 1px solid var(--color-danger-border) !important;
}

@media (max-width: 768px) {
    body.admin-body .panel,
    body.admin-body .lux-panel,
    body.admin-body .branch-panel,
    body.admin-body .payment-card,
    body.admin-body .invoice-panel,
    body.admin-body .pos-panel,
    body.admin-body .lux-table-panel,
    body.admin-body .live-prices-panel,
    body.admin-body .lux-stat-card,
    body.store-body:not(.sf-storefront) .panel,
    body.store-body:not(.sf-storefront) .product-card {
        border-radius: 10px !important;
    }

    body.admin-body .btn,
    body.admin-body button,
    body.store-body:not(.sf-storefront) .btn,
    body.store-body:not(.sf-storefront) button {
        min-height: 42px;
    }

    body.admin-body table th,
    body.admin-body table td {
        font-size: 12px !important;
    }
}

/* Layout containment fixes: keep wide ERP pages inside the visible workspace. */
body.admin-body .lux-app-shell {
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
}

body.admin-body .lux-main-wrapper {
    flex: 0 0 auto !important;
    width: calc(100% - var(--sidebar-width, 264px)) !important;
    max-width: calc(100% - var(--sidebar-width, 264px)) !important;
    min-width: 0 !important;
}

body.sidebar-collapsed .lux-main-wrapper,
body.admin-body.sidebar-collapsed .lux-main-wrapper {
    width: 100% !important;
    max-width: 100% !important;
}

body.admin-body .lux-content-area,
body.admin-body .content,
body.admin-body .lux-page,
body.admin-body .lux-inventory-page,
body.admin-body .luxury-dashboard,
body.admin-body .lux-purchases-page,
body.admin-body .lux-reports-page,
body.admin-body .pos-screen,
body.admin-body .pos-workspace {
    box-sizing: border-box !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

body.admin-body .panel,
body.admin-body .lux-panel,
body.admin-body .card,
body.admin-body .branch-panel,
body.admin-body .payment-card,
body.admin-body .invoice-panel,
body.admin-body .pos-panel,
body.admin-body .lux-table-panel,
body.admin-body .live-prices-panel {
    min-width: 0 !important;
    max-width: 100% !important;
}

body.admin-body .table-wrap,
body.admin-body .lux-table-wrap,
body.admin-body .table-container,
body.admin-body .payment-table-wrap,
body.admin-body .branch-table-wrap,
body.admin-body .invoice-table-wrap,
body.admin-body .catalog-table,
body.store-body:not(.sf-storefront) .table-wrap {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-inline: 0 !important;
    padding-inline: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
}

body.admin-body .table-wrap table,
body.admin-body .lux-table-wrap table,
body.admin-body .payment-table-wrap table,
body.admin-body .invoice-table-wrap table,
body.admin-body .catalog-table table {
    max-width: none !important;
}

body.admin-body .inventory-row-actions,
body.admin-body .invoice-actions,
body.admin-body .location-inline-form,
body.admin-body .rfid-bind-form {
    max-width: 100% !important;
}

body.admin-body .luxury-dashboard .live-header h2,
body.admin-body .luxury-dashboard .live-header h2 span {
    color: var(--color-text-main) !important;
}

body.admin-body .luxury-dashboard .live-header h2 i {
    color: var(--color-gold-hover) !important;
}

body.admin-body .luxury-dashboard .live-status {
    background: var(--color-success-bg) !important;
    color: var(--color-success-text) !important;
    border: 1px solid var(--color-success-border) !important;
}

body.admin-body .luxury-dashboard .lux-price-pill .karat-title {
    color: var(--color-gold-hover) !important;
    border-bottom: 1px solid var(--color-border) !important;
}

@media (max-width: 1100px) {
    body.admin-body .lux-main-wrapper {
        width: 100% !important;
        max-width: 100% !important;
    }
}

.store-admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.store-admin-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    color: #475569;
    font-weight: 800;
    text-decoration: none;
}

.store-admin-tabs a.active,
.store-admin-tabs a:hover {
    background: var(--color-text-main, #111827);
    color: #fff;
    border-color: var(--color-text-main, #111827);
}

.section-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.section-heading h1,
.section-heading h2 {
    margin: 0;
}

.store-settings-grid,
.store-page-editor {
    align-items: start;
}

.editor-section {
    grid-column: 1 / -1;
    padding: 14px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #f8fafc;
}

.editor-section h3 {
    margin: 0 0 12px;
    font-size: 16px;
}

.code-editor {
    font-family: "Roboto Mono", ui-monospace, SFMono-Regular, Consolas, monospace;
    direction: ltr;
    text-align: left;
    min-height: 180px;
}

.filters-row,
.payment-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 10px;
}

.custom-order-layout {
    display: grid;
    grid-template-columns: minmax(220px, 360px) 1fr;
    gap: 18px;
    align-items: start;
}

.design-snapshot {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #f8fafc;
}

.timeline-list {
    display: grid;
    gap: 10px;
}

.timeline-item {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
}

.timeline-item span {
    display: block;
    color: var(--color-text-muted, #64748b);
    font-size: 12px;
    margin-top: 3px;
}

.timeline-item p {
    margin: 6px 0 0;
    color: #475569;
}

.store-footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    max-width: 1180px;
    margin: 0 auto;
}

.store-footer-grid p {
    margin: 6px 0 0;
}

.store-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px 14px;
}

.store-footer-links a {
    color: #475569;
    font-weight: 800;
    text-decoration: none;
}

.store-page {
    display: grid;
    gap: 16px;
}

.store-page-head {
    padding: clamp(24px, 5vw, 54px) 0 10px;
}

.store-page-head h1,
.designer-hero h1 {
    margin: 10px 0;
    font-size: clamp(30px, 5vw, 54px);
    font-weight: 900;
}

.store-page-head p,
.store-page-band p,
.store-page-section p,
.designer-hero p {
    max-width: 820px;
    color: #475569;
    line-height: 1.9;
}

.store-page-band,
.store-page-section {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: clamp(18px, 3vw, 30px);
}

.faq-list {
    display: grid;
    gap: 10px;
}

.faq-list details {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    padding: 12px;
    background: #f8fafc;
}

.faq-list summary {
    cursor: pointer;
    font-weight: 900;
}

.designer-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    padding: clamp(24px, 5vw, 54px) 0 18px;
}

.designer-deposit {
    min-width: 220px;
    border: 1px solid var(--color-gold-border, #fde68a);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
}

.designer-deposit span,
.designer-deposit small {
    display: block;
    color: #64748b;
    font-weight: 800;
}

.designer-deposit strong {
    display: block;
    margin: 8px 0;
    font-size: 24px;
}

.designer-workspace {
    display: grid;
    grid-template-columns: minmax(300px, 42%) 1fr;
    gap: 18px;
    align-items: start;
}

.designer-preview,
.designer-form {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow, 0 1px 3px rgba(15, 23, 42, .06));
}

.designer-preview {
    overflow: hidden;
    position: sticky;
    top: 92px;
}

.jewelry-preview {
    width: 100%;
    height: min(58vh, 520px);
    min-height: 320px;
    background: #f8fafc;
}

.jewelry-preview canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.jewelry-fallback {
    display: grid;
    place-items: center;
    width: 100%;
    height: 100%;
    color: #64748b;
    font-weight: 900;
}

.designer-preview-meta {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-top: 1px solid var(--color-border, #e2e8f0);
    color: #475569;
    font-weight: 900;
}

.designer-form {
    padding: 16px;
}

.designer-submit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.designer-submit span {
    display: block;
    color: #64748b;
    font-weight: 700;
}

.designer-type-list {
    display: grid;
    gap: 10px;
}

.designer-type-row {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(130px, 1fr) minmax(130px, 1fr) minmax(120px, 1fr) 90px auto auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
}

.designer-type-row.add-row {
    background: #f8fafc;
}

.check-inline {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 900px) {
    .section-heading,
    .designer-hero,
    .designer-submit,
    .store-footer-grid {
        flex-direction: column;
        align-items: stretch;
    }

    .designer-workspace,
    .custom-order-layout,
    .designer-type-row {
        grid-template-columns: 1fr;
    }

    .designer-preview {
        position: static;
    }

    .jewelry-preview {
        height: 360px;
    }

    .store-footer-links {
        justify-content: flex-start;
    }
}

.template-editor-page {
    display: grid;
    grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
    gap: 16px;
    align-items: start;
}

.template-editor-panel,
.template-preview-panel {
    min-width: 0;
}

.template-variables-panel {
    grid-column: 1 / -1;
}

.template-code-area {
    min-height: 280px;
    resize: vertical;
    line-height: 1.6;
}

.template-preview-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}

.template-preview-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.template-preview-controls .active {
    background: var(--color-text-main, #111827) !important;
    color: #fff !important;
    border-color: var(--color-text-main, #111827) !important;
}

.template-preview-shell {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #f8fafc;
    padding: 10px;
    overflow: auto;
}

.template-preview-shell.desktop {
    width: 100%;
}

.template-preview-shell.mobile {
    width: min(390px, 100%);
    margin-inline: auto;
}

.template-live-preview {
    display: block;
    width: 100%;
    min-height: 640px;
    border: 1px solid var(--color-border-hover, #cbd5e1);
    border-radius: 6px;
    background: #fff;
}

.template-preview-shell.mobile .template-live-preview {
    min-height: 760px;
}

.template-preview-status {
    margin-top: 10px;
    color: var(--color-text-muted, #64748b);
    font-weight: 800;
    font-size: 12px;
}

@media (max-width: 1100px) {
    .template-editor-page {
        grid-template-columns: 1fr;
    }

    .template-preview-panel {
        position: static;
    }

    .template-live-preview {
        min-height: 520px;
    }
}

.jd-page {
    display: grid;
    gap: 18px;
    padding-bottom: 28px;
}

.jd-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
    gap: 18px;
    align-items: end;
    padding: clamp(24px, 4vw, 46px) 0 6px;
}

.jd-hero h1 {
    margin: 10px 0;
    max-width: 920px;
    font-size: clamp(28px, 4.6vw, 52px);
    line-height: 1.12;
    font-weight: 950;
    color: #0f172a;
}

.jd-hero p {
    max-width: 860px;
    margin: 0;
    color: #475569;
    line-height: 1.9;
    font-weight: 700;
}

.jd-deposit-card,
.jd-process,
.jd-preview-card,
.jd-config-card,
.jd-summary-card {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow, 0 1px 3px rgba(15, 23, 42, .06));
}

.jd-deposit-card {
    padding: 16px;
}

.jd-deposit-card span,
.jd-deposit-card small {
    display: block;
    color: #64748b;
    font-weight: 800;
}

.jd-deposit-card strong {
    display: block;
    margin: 8px 0;
    font-size: 26px;
}

.jd-process {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    background: #e2e8f0;
}

.jd-process div {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 13px 14px;
    background: #fff;
}

.jd-process strong {
    display: inline-grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    flex: 0 0 auto;
    font-size: 13px;
}

.jd-process span {
    color: #334155;
    font-weight: 900;
}

.jd-layout {
    display: grid;
    grid-template-columns: minmax(330px, 42%) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.jd-preview-card {
    position: sticky;
    top: 90px;
    overflow: hidden;
}

.jd-preview-head,
.jd-preview-tools,
.jd-actions,
.jd-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.jd-preview-head {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.jd-preview-head span,
.jd-preview-tools span {
    display: block;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.jd-preview-head strong {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-size: 18px;
}

.jd-preview-badge {
    border: 1px solid #fde68a;
    border-radius: 999px;
    background: #fffbeb;
    color: #92400e;
    padding: 8px 10px;
    font-size: 12px;
    font-weight: 900;
    white-space: nowrap;
}

.jd-canvas {
    width: 100%;
    height: min(58vh, 520px);
    min-height: 330px;
    background:
        radial-gradient(circle at 50% 25%, rgba(212, 175, 55, .2), transparent 34%),
        linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}

.jd-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

.jd-preview-tools {
    padding: 12px 14px;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.jd-preview-tools span {
    line-height: 1.6;
}

.jd-summary-card {
    margin: 12px;
    padding: 14px;
    background: #f8fafc;
}

.jd-summary-card h2 {
    margin: 0 0 10px;
    font-size: 16px;
    font-weight: 950;
}

.jd-summary-card dl {
    display: grid;
    gap: 8px;
    margin: 0;
}

.jd-summary-card div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
}

.jd-summary-card dt {
    color: #64748b;
    font-weight: 800;
}

.jd-summary-card dd {
    margin: 0;
    color: #0f172a;
    font-weight: 900;
}

.jd-config-card {
    padding: 16px;
    min-width: 0;
}

.jd-stepper {
    justify-content: flex-start;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding: 0 0 12px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--color-border, #e2e8f0);
}

.jd-stepper button {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 999px;
    background: #fff;
    color: #475569;
    padding: 8px 12px;
    font-weight: 900;
    white-space: nowrap;
}

.jd-stepper button.active {
    border-color: #0f172a;
    background: #0f172a;
    color: #fff;
}

.jd-step-panel {
    display: none;
}

.jd-step-panel.active {
    display: grid;
    gap: 16px;
}

.jd-panel-title h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: clamp(20px, 2.4vw, 28px);
    font-weight: 950;
}

.jd-panel-title p {
    margin: 0;
    color: #64748b;
    font-weight: 700;
    line-height: 1.8;
}

.jd-type-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.jd-field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.jd-swatch-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.jd-stone-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.jd-choice {
    position: relative;
    display: grid;
    gap: 6px;
    min-width: 0;
    min-height: 106px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: 12px;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.jd-choice:hover {
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.jd-choice:has(input:checked) {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .14);
    background: #fffbeb;
}

.jd-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.jd-choice-icon {
    display: inline-grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.jd-choice strong {
    color: #0f172a;
    font-weight: 950;
}

.jd-choice small {
    color: #64748b;
    line-height: 1.5;
    font-weight: 700;
}

.jd-swatch-choice {
    min-height: 88px;
}

.jd-swatch-choice > span {
    width: 34px;
    height: 34px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: var(--swatch);
    box-shadow: inset 0 1px 4px rgba(15, 23, 42, .14);
}

.jd-size-panels {
    display: grid;
    gap: 12px;
}

.jd-size-panel {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #f8fafc;
    padding: 12px;
}

.jd-size-panel h3 {
    margin: 0 0 10px;
    color: #0f172a;
    font-size: 16px;
    font-weight: 950;
}

.jd-actions {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border, #e2e8f0);
}

.jd-submit-button {
    display: none;
}

@media (max-width: 1100px) {
    .jd-layout,
    .jd-hero {
        grid-template-columns: 1fr;
    }

    .jd-preview-card {
        position: static;
    }

    .jd-canvas {
        height: 420px;
    }
}

@media (max-width: 760px) {
    .jd-process,
    .jd-type-grid,
    .jd-field-grid,
    .jd-swatch-grid,
    .jd-stone-grid {
        grid-template-columns: 1fr;
    }

    .jd-config-card {
        padding: 12px;
    }

    .jd-canvas {
        min-height: 280px;
        height: 320px;
    }

    .jd-summary-card div {
        grid-template-columns: 90px 1fr;
    }

    .jd-actions {
        align-items: stretch;
        flex-direction: column;
    }
}

.jd-template-page .jd-type-stage {
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: clamp(16px, 3vw, 24px);
    box-shadow: var(--shadow, 0 1px 3px rgba(15, 23, 42, .06));
}

.jd-template-type-grid {
    margin-top: 16px;
}

.jd-type-card {
    display: grid;
    gap: 8px;
    min-height: 150px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    padding: 16px;
    text-align: start;
    cursor: pointer;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.jd-type-card:hover,
.jd-type-card.active {
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .14);
    transform: translateY(-1px);
}

.jd-type-card span {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #0f172a;
    color: #fff;
    font-weight: 950;
}

.jd-type-card strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.jd-type-card small {
    color: #64748b;
    font-weight: 800;
    line-height: 1.7;
}

.jd-designer-shell[hidden],
.jd-template-panel[hidden],
.jd-type-stage[hidden] {
    display: none !important;
}

.jd-template-panel {
    display: grid;
    gap: 12px;
}

.jd-tool-row {
    flex-wrap: wrap;
    justify-content: flex-start;
}

.jd-tool-row .btn {
    min-height: 34px;
}

.jd-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.jd-check-choice {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color-border, #e2e8f0);
    border-radius: 8px;
    background: #fff;
    min-height: 48px;
    padding: 10px 12px;
    color: #0f172a;
    font-weight: 900;
}

.jd-check-choice input {
    width: 16px;
    height: 16px;
}

.jd-template-stepper {
    scrollbar-width: thin;
}

@media (max-width: 760px) {
    .jd-check-grid {
        grid-template-columns: 1fr;
    }

    .jd-type-card {
        min-height: 124px;
    }
}

/* Store custom jewelry designer: luxury studio treatment inspired by the provided mockup. */
body.store-body:not(.sf-storefront) .store-main:has(.jd-template-page) {
    width: 100% !important;
    max-width: none !important;
    padding: 0 !important;
}

body.store-body:not(.sf-storefront):has(.jd-template-page) {
    background: #090806 !important;
}

body.store-body:not(.sf-storefront):has(.jd-template-page) .store-header {
    background: rgba(7, 6, 4, .94) !important;
    border-bottom-color: rgba(212, 175, 55, .2) !important;
    color: #fff7df !important;
    box-shadow: 0 16px 46px rgba(0, 0, 0, .28) !important;
    backdrop-filter: blur(16px);
}

body.store-body:not(.sf-storefront):has(.jd-template-page) .store-logo,
body.store-body:not(.sf-storefront):has(.jd-template-page) .store-nav a,
body.store-body:not(.sf-storefront):has(.jd-template-page) .language-switch a {
    color: #fff7df !important;
}

body.store-body:not(.sf-storefront):has(.jd-template-page) .store-nav a:hover,
body.store-body:not(.sf-storefront):has(.jd-template-page) .language-switch a.active {
    background: rgba(212, 175, 55, .12) !important;
    color: #f6df93 !important;
}

body.store-body:not(.sf-storefront):has(.jd-template-page) .store-footer {
    background: #090806 !important;
    border-top-color: rgba(212, 175, 55, .18) !important;
    color: #b7aa89 !important;
}

body.store-body:not(.sf-storefront):has(.jd-template-page) .store-footer a,
body.store-body:not(.sf-storefront):has(.jd-template-page) .store-footer strong {
    color: #fff7df !important;
}

.jd-template-page {
    --jd-black: #090806;
    --jd-panel: #13100b;
    --jd-panel-2: #1c1710;
    --jd-line: rgba(212, 175, 55, .22);
    --jd-line-soft: rgba(255, 255, 255, .08);
    --jd-gold: #d4af37;
    --jd-gold-soft: #f6df93;
    --jd-text: #fff7df;
    --jd-muted: #b7aa89;
    isolation: isolate;
    position: relative;
    overflow: hidden;
    min-height: calc(100vh - 67px);
    padding: clamp(18px, 3vw, 44px);
    background:
        radial-gradient(circle at 78% 10%, rgba(212, 175, 55, .22), transparent 30%),
        radial-gradient(circle at 18% 78%, rgba(255, 255, 255, .08), transparent 26%),
        linear-gradient(135deg, #050403 0%, #120e08 48%, #070604 100%);
    color: var(--jd-text);
}

.jd-template-page::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
    background-size: 56px 56px;
    mask-image: radial-gradient(circle at center, #000 0%, transparent 72%);
    opacity: .48;
}

.jd-template-page:has(.jd-designer-shell:not([hidden])) {
    padding: 0;
}

.jd-template-page:has(.jd-designer-shell:not([hidden])) .jd-hero,
.jd-template-page:has(.jd-designer-shell:not([hidden])) .jd-process {
    display: none;
}

.jd-template-page .jd-hero {
    grid-template-columns: minmax(0, 1fr) minmax(210px, 310px);
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(24px, 4vw, 54px) 0 16px;
}

.jd-template-page .jd-hero h1,
.jd-template-page .jd-panel-title h2,
.jd-template-page .jd-summary-card h2,
.jd-template-page .jd-preview-head strong {
    color: var(--jd-text);
    text-shadow: 0 12px 34px rgba(0, 0, 0, .42);
}

.jd-template-page .jd-hero h1 {
    max-width: 780px;
    font-size: clamp(34px, 5.4vw, 74px);
    line-height: 1.03;
}

.jd-template-page .jd-hero p,
.jd-template-page .jd-panel-title p {
    max-width: 760px;
    color: var(--jd-muted);
}

.jd-template-page .badge.gold {
    border: 1px solid rgba(212, 175, 55, .38);
    background: rgba(212, 175, 55, .13);
    color: var(--jd-gold-soft);
}

.jd-template-page .jd-deposit-card,
.jd-template-page .jd-process,
.jd-template-page .jd-type-stage,
.jd-template-page .jd-preview-card,
.jd-template-page .jd-config-card,
.jd-template-page .jd-summary-card {
    border: 1px solid var(--jd-line);
    background: linear-gradient(145deg, rgba(28, 23, 16, .88), rgba(10, 8, 5, .82));
    box-shadow: 0 28px 90px rgba(0, 0, 0, .36);
    color: var(--jd-text);
}

.jd-template-page .jd-deposit-card {
    padding: 18px;
    backdrop-filter: blur(14px);
}

.jd-template-page .jd-deposit-card span,
.jd-template-page .jd-deposit-card small,
.jd-template-page .jd-preview-head span,
.jd-template-page .jd-summary-card dt,
.jd-template-page .jd-preview-tools span {
    color: var(--jd-muted);
}

.jd-template-page .jd-deposit-card strong,
.jd-template-page .jd-summary-card dd {
    color: var(--jd-gold-soft);
}

.jd-template-page .jd-process {
    max-width: 1280px;
    margin: 0 auto 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    background: rgba(212, 175, 55, .18);
    overflow: hidden;
}

.jd-template-page .jd-process div {
    background: rgba(8, 7, 5, .74);
    border-inline-end: 1px solid rgba(212, 175, 55, .14);
}

.jd-template-page .jd-process strong {
    background: linear-gradient(135deg, var(--jd-gold-soft), var(--jd-gold));
    color: #111;
}

.jd-template-page .jd-process span {
    color: var(--jd-text);
}

.jd-template-page .jd-type-stage {
    display: grid;
    align-content: center;
    max-width: 1280px;
    min-height: min(760px, calc(100vh - 220px));
    margin: 0 auto;
    padding: clamp(22px, 4vw, 44px);
    backdrop-filter: blur(18px);
}

.jd-template-page .jd-template-type-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    margin-top: clamp(18px, 3vw, 30px);
}

.jd-template-page .jd-type-card {
    position: relative;
    overflow: hidden;
    min-height: 190px;
    padding: 18px;
    border-color: rgba(255, 255, 255, .1);
    background:
        radial-gradient(circle at 84% 14%, rgba(212, 175, 55, .2), transparent 38%),
        linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
    color: var(--jd-text);
}

.jd-template-page .jd-type-card::after {
    content: "";
    position: absolute;
    inset-inline: 18px;
    bottom: 14px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, .52), transparent);
    opacity: .7;
}

.jd-template-page .jd-type-card:hover,
.jd-template-page .jd-type-card.active {
    border-color: rgba(212, 175, 55, .68);
    box-shadow: 0 18px 48px rgba(212, 175, 55, .14), 0 0 0 1px rgba(212, 175, 55, .22) inset;
    transform: translateY(-4px);
}

.jd-template-page .jd-type-card span {
    width: 54px;
    height: 54px;
    background: linear-gradient(135deg, var(--jd-gold-soft), var(--jd-gold));
    color: #111;
    box-shadow: 0 12px 36px rgba(212, 175, 55, .25);
}

.jd-template-page .jd-type-card strong {
    color: var(--jd-text);
    font-size: 20px;
}

.jd-template-page .jd-type-card small {
    color: var(--jd-muted);
}

.jd-template-page .jd-designer-shell {
    min-height: calc(100vh - 67px);
}

.jd-template-page .jd-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.22fr) minmax(390px, .78fr);
    gap: 0;
    min-height: calc(100vh - 67px);
    align-items: stretch;
}

.jd-template-page .jd-preview-card {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto minmax(420px, 1fr) auto auto;
    height: calc(100vh - 67px);
    min-height: 660px;
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 50% 42%, rgba(212, 175, 55, .2), transparent 34%),
        radial-gradient(circle at 15% 80%, rgba(255, 255, 255, .08), transparent 24%),
        linear-gradient(180deg, #17120b 0%, #070604 100%);
    box-shadow: none;
}

.jd-template-page .jd-preview-head {
    position: relative;
    z-index: 3;
    padding: 18px clamp(18px, 3vw, 34px);
    border-bottom: 1px solid var(--jd-line-soft);
    background: linear-gradient(180deg, rgba(0, 0, 0, .36), transparent);
}

.jd-template-page .jd-preview-head strong {
    font-size: 24px;
}

.jd-template-page .jd-canvas {
    position: relative;
    height: 100%;
    min-height: 420px;
    background:
        radial-gradient(circle at 50% 46%, rgba(246, 223, 147, .18), transparent 35%),
        linear-gradient(180deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, 0));
}

.jd-template-page .jd-canvas::after {
    content: "";
    position: absolute;
    inset: auto 12% 8% 12%;
    height: 18%;
    border-radius: 999px;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, .42), transparent 66%);
    pointer-events: none;
}

.jd-template-page .jewelry-fallback {
    display: grid;
    place-items: center;
    min-height: 100%;
    padding: 24px;
    color: var(--jd-muted);
    text-align: center;
}

.jd-template-page .jd-preview-tools {
    justify-content: center;
    padding: 12px clamp(18px, 3vw, 34px);
    border-top: 1px solid var(--jd-line-soft);
    background: rgba(0, 0, 0, .26);
}

.jd-template-page .jd-summary-card {
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 0;
    background: rgba(8, 7, 5, .74);
    padding: 16px clamp(18px, 3vw, 34px);
}

.jd-template-page .jd-summary-card dl {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.jd-template-page .jd-summary-card div {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    min-width: 0;
}

.jd-template-page .jd-config-card {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    max-height: calc(100vh - 67px);
    overflow-y: auto;
    border-width: 0 1px;
    border-radius: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)),
        var(--jd-panel);
    box-shadow: -26px 0 70px rgba(0, 0, 0, .22);
    padding: clamp(16px, 2.3vw, 28px);
}

.jd-template-page .jd-stepper {
    position: sticky;
    top: 0;
    z-index: 4;
    margin: calc(clamp(16px, 2.3vw, 28px) * -1) calc(clamp(16px, 2.3vw, 28px) * -1) 18px;
    padding: 14px clamp(16px, 2.3vw, 28px);
    border-bottom: 1px solid var(--jd-line-soft);
    background: rgba(19, 16, 11, .94);
    backdrop-filter: blur(16px);
}

.jd-template-page .jd-stepper button {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .055);
    color: var(--jd-muted);
}

.jd-template-page .jd-stepper button.active {
    border-color: rgba(212, 175, 55, .68);
    background: linear-gradient(135deg, var(--jd-gold-soft), var(--jd-gold));
    color: #111;
    box-shadow: 0 10px 28px rgba(212, 175, 55, .18);
}

.jd-template-page .jd-step-panel.active {
    align-content: start;
    min-height: 0;
}

.jd-template-page .field label,
.jd-template-page label {
    color: var(--jd-muted) !important;
}

.jd-template-page input,
.jd-template-page select,
.jd-template-page textarea {
    border-color: rgba(255, 255, 255, .1) !important;
    background: rgba(255, 255, 255, .07) !important;
    color: var(--jd-text) !important;
    box-shadow: none !important;
}

.jd-template-page input::placeholder,
.jd-template-page textarea::placeholder {
    color: rgba(255, 247, 223, .38);
}

.jd-template-page select option {
    color: #111827;
}

.jd-template-page input:focus,
.jd-template-page select:focus,
.jd-template-page textarea:focus {
    border-color: rgba(212, 175, 55, .72) !important;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .12) !important;
}

.jd-template-page .jd-choice,
.jd-template-page .jd-check-choice {
    border-color: rgba(255, 255, 255, .1);
    background: rgba(255, 255, 255, .055);
    color: var(--jd-text);
}

.jd-template-page .jd-choice:hover,
.jd-template-page .jd-check-choice:hover {
    border-color: rgba(212, 175, 55, .4);
    background: rgba(255, 255, 255, .08);
}

.jd-template-page .jd-choice:has(input:checked),
.jd-template-page .jd-check-choice:has(input:checked) {
    border-color: rgba(212, 175, 55, .72);
    background: rgba(212, 175, 55, .12);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, .1);
}

.jd-template-page .jd-choice strong,
.jd-template-page .jd-check-choice span {
    color: var(--jd-text);
}

.jd-template-page .jd-choice small {
    color: var(--jd-muted);
}

.jd-template-page .jd-swatch-choice > span {
    border-color: rgba(255, 255, 255, .28);
    box-shadow: 0 9px 24px rgba(0, 0, 0, .22), inset 0 1px 5px rgba(255, 255, 255, .26);
}

.jd-template-page .jd-actions {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: 18px calc(clamp(16px, 2.3vw, 28px) * -1) calc(clamp(16px, 2.3vw, 28px) * -1);
    padding: 14px clamp(16px, 2.3vw, 28px);
    border-top: 1px solid var(--jd-line-soft);
    background: rgba(19, 16, 11, .95);
    backdrop-filter: blur(16px);
}

.jd-template-page .btn,
.jd-template-page button.btn {
    border-radius: 8px !important;
}

.jd-template-page .btn-primary,
.jd-template-page button[type="submit"],
.jd-template-page .jd-submit-button {
    border-color: transparent !important;
    background: linear-gradient(135deg, var(--jd-gold-soft), var(--jd-gold)) !important;
    color: #111 !important;
    box-shadow: 0 12px 32px rgba(212, 175, 55, .18) !important;
}

.jd-template-page .btn-muted {
    border-color: rgba(255, 255, 255, .12) !important;
    background: rgba(255, 255, 255, .07) !important;
    color: var(--jd-text) !important;
}

.jd-template-page .money-amount {
    color: var(--jd-gold-soft);
}

@media (max-width: 1180px) {
    .jd-template-page .jd-layout {
        grid-template-columns: 1fr;
    }

    .jd-template-page .jd-preview-card {
        position: relative;
        height: auto;
        min-height: 0;
    }

    .jd-template-page .jd-config-card {
        max-height: none;
        overflow: visible;
    }

    .jd-template-page .jd-canvas {
        min-height: 430px;
        height: 50vh;
    }
}

@media (max-width: 760px) {
    .jd-template-page {
        padding: 14px;
    }

    .jd-template-page:has(.jd-designer-shell:not([hidden])) {
        padding: 0;
    }

    .jd-template-page .jd-hero {
        padding-top: 18px;
    }

    .jd-template-page .jd-deposit-card {
        width: 100%;
    }

    .jd-template-page .jd-process {
        grid-template-columns: 1fr 1fr;
    }

    .jd-template-page .jd-type-stage {
        min-height: auto;
        padding: 18px;
    }

    .jd-template-page .jd-template-type-grid {
        grid-template-columns: 1fr;
    }

    .jd-template-page .jd-type-card {
        min-height: 136px;
    }

    .jd-template-page .jd-preview-head,
    .jd-template-page .jd-preview-tools {
        padding-inline: 14px;
    }

    .jd-template-page .jd-canvas {
        min-height: 330px;
        height: 42vh;
    }

    .jd-template-page .jd-summary-card {
        display: none;
    }

    .jd-template-page .jd-config-card {
        padding: 14px;
    }

    .jd-template-page .jd-stepper,
    .jd-template-page .jd-actions {
        margin-inline: -14px;
        padding-inline: 14px;
    }

    .jd-template-page .jd-actions {
        display: grid;
        grid-template-columns: 1fr;
    }
}

.jd-pro-designer .jd-pro-intro {
    display: grid;
    grid-template-columns: minmax(280px, .9fr) minmax(0, 1.1fr);
    gap: clamp(18px, 3vw, 38px);
    align-items: center;
    width: min(1440px, 100%);
    min-height: calc(100vh - 140px);
    margin: 0 auto;
}

.jd-pro-intro-copy {
    display: grid;
    gap: 18px;
    max-width: 660px;
}

.jd-pro-kicker,
.jd-pro-board-head span,
.jd-pro-config-head span,
.jd-pro-deposit-chip span,
.jd-pro-stage-note span {
    color: var(--jd-muted);
    font-size: 12px;
    font-weight: 900;
}

.jd-pro-kicker {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    min-height: 30px;
    border: 1px solid rgba(212, 175, 55, .38);
    border-radius: 999px;
    background: rgba(212, 175, 55, .12);
    color: var(--jd-gold-soft);
    padding: 5px 12px;
}

.jd-pro-intro h1 {
    margin: 0;
    color: var(--jd-text);
    font-size: clamp(40px, 6vw, 82px);
    line-height: 1.02;
    font-weight: 950;
}

.jd-pro-intro p {
    margin: 0;
    color: var(--jd-muted);
    font-size: clamp(16px, 1.6vw, 20px);
    line-height: 1.9;
    font-weight: 700;
}

.jd-pro-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 8px;
}

.jd-pro-flow span {
    display: grid;
    gap: 6px;
    min-height: 74px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 8px;
    background: rgba(255, 255, 255, .055);
    color: var(--jd-text);
    padding: 12px;
    font-weight: 900;
}

.jd-pro-flow strong {
    color: var(--jd-gold-soft);
    font-family: "Roboto Mono", monospace;
    font-size: 13px;
}

.jd-pro-type-board {
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, .22);
    border-radius: 8px;
    background:
        radial-gradient(circle at 78% 12%, rgba(212, 175, 55, .18), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
    box-shadow: 0 32px 90px rgba(0, 0, 0, .38);
    backdrop-filter: blur(18px);
}

.jd-pro-board-head,
.jd-pro-config-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.jd-pro-board-head h2,
.jd-pro-config-head h2 {
    margin: 3px 0 0;
    color: var(--jd-text);
    font-size: clamp(20px, 2vw, 30px);
    font-weight: 950;
}

.jd-pro-deposit-chip {
    display: grid;
    gap: 2px;
    min-width: 138px;
    border: 1px solid rgba(212, 175, 55, .28);
    border-radius: 8px;
    background: rgba(212, 175, 55, .1);
    padding: 10px 12px;
}

.jd-pro-deposit-chip.compact {
    min-width: 120px;
    padding: 8px 10px;
}

.jd-pro-deposit-chip strong {
    color: var(--jd-gold-soft);
    font-size: 16px;
}

.jd-pro-type-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 18px;
    margin: 0;
}

.jd-pro-type-card {
    min-height: 172px;
}

.jd-pro-workspace .jd-pro-layout {
    min-height: calc(100vh - 67px);
}

.jd-pro-preview {
    min-width: 0;
}

.jd-pro-stage {
    position: relative;
    display: grid;
    min-height: 0;
}

.jd-pro-stage-note {
    position: absolute;
    inset-inline: clamp(14px, 2.6vw, 34px);
    bottom: 18px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 8px;
    background: rgba(0, 0, 0, .36);
    backdrop-filter: blur(12px);
    padding: 10px 12px;
}

.jd-pro-stage-note strong {
    color: var(--jd-text);
    font-weight: 950;
}

.jd-pro-tool-row .btn {
    flex: 1 1 150px;
    justify-content: center;
}

.jd-pro-summary h2 {
    margin-bottom: 12px;
}

.jd-pro-config {
    min-width: 0;
}

.jd-pro-config-head {
    margin: calc(clamp(16px, 2.3vw, 28px) * -1) calc(clamp(16px, 2.3vw, 28px) * -1) 0;
    background: rgba(255, 255, 255, .035);
}

.jd-pro-stepper button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.jd-pro-stepper button span {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    color: inherit;
    font-family: "Roboto Mono", monospace;
    font-size: 11px;
}

.jd-pro-stepper button.active span {
    background: rgba(17, 17, 17, .16);
}

.jd-pro-panels {
    display: grid;
    align-content: start;
    min-height: 0;
}

.jd-pro-designer .field.full {
    grid-column: 1 / -1;
}

.jd-pro-designer .jd-field-grid,
.jd-pro-designer .jd-swatch-grid,
.jd-pro-designer .jd-check-grid {
    gap: 14px;
}

.jd-pro-designer .jd-choice,
.jd-pro-designer .jd-check-choice {
    min-height: 78px;
}

.jd-pro-actions .btn {
    min-height: 44px;
}

@media (max-width: 1280px) {
    .jd-pro-designer .jd-pro-intro {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .jd-pro-intro-copy {
        max-width: 920px;
    }

    .jd-pro-type-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .jd-pro-workspace .jd-pro-layout {
        min-height: auto;
    }

    .jd-pro-stage-note {
        position: static;
        margin: -8px 14px 14px;
    }

    .jd-pro-summary {
        display: block;
    }
}

@media (max-width: 820px) {
    .jd-pro-flow,
    .jd-pro-type-grid {
        grid-template-columns: 1fr 1fr;
    }

    .jd-pro-board-head,
    .jd-pro-config-head,
    .jd-pro-stage-note {
        align-items: stretch;
        flex-direction: column;
    }

    .jd-pro-deposit-chip {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .jd-pro-intro h1 {
        font-size: 36px;
    }

    .jd-pro-flow,
    .jd-pro-type-grid {
        grid-template-columns: 1fr;
    }

    .jd-pro-board-head,
    .jd-pro-type-grid {
        padding: 14px;
    }
}
.invoice-correction-menu {
    position: relative;
}

.invoice-correction-menu > summary {
    list-style: none;
    cursor: pointer;
}

.invoice-correction-menu > summary::-webkit-details-marker {
    display: none;
}

.invoice-correction-form {
    position: absolute;
    z-index: 40;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    width: min(320px, calc(100vw - 32px));
    padding: 14px;
    display: grid;
    gap: 10px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, .18);
}

.invoice-correction-form label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.invoice-correction-form input,
.invoice-correction-form select {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 7px 9px;
    background: #fff;
}
.store-nav-form {
    margin: 0;
}

.store-nav-button {
    appearance: none;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    font-weight: inherit;
    padding: 0;
}

/* Communications center */
.communication-health-panel {
    margin-bottom: 16px;
    border-inline-start: 4px solid #DC2626;
}

.communication-health-panel.is-healthy {
    border-inline-start-color: #059669;
}

.communication-health-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.communication-health-title h2 {
    margin-bottom: 3px;
    padding-bottom: 0;
    border-bottom: 0;
}

.communication-health-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-top: 14px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    background: #E2E8F0;
}

.communication-health-stat {
    min-width: 0;
    padding: 14px;
    background: #FFFFFF;
}

.communication-health-stat span,
.communication-health-stat small {
    display: block;
    color: #64748B;
    font-size: 12px;
}

.communication-health-stat strong {
    display: block;
    overflow: hidden;
    margin: 5px 0;
    color: #0F172A;
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.communication-health-stat small {
    overflow-wrap: anywhere;
}

.communication-health-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #FDE68A;
    border-radius: 8px;
    background: #FFFBEB;
    color: #92400E;
}

.communication-health-alert.danger {
    border-color: #FECACA;
    background: #FEF2F2;
    color: #991B1B;
}

.communication-health-alert div,
.communication-health-alert span {
    display: grid;
    gap: 2px;
}

.communication-health-alert span {
    font-size: 13px;
}

.queue-test-form {
    display: grid;
    grid-template-columns: minmax(180px, .8fr) minmax(220px, 1fr) auto minmax(220px, 1fr);
    align-items: end;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
}

.queue-test-form > small {
    align-self: center;
    color: #64748B;
    line-height: 1.7;
}

.queue-test-form .btn:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.communication-log-highlight td {
    background: #FFFBEB;
}

.communication-provider-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.integration-mark {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid #CBD5E1;
    border-radius: 8px;
    background: #F8FAFC;
    color: #0F172A;
    font-size: 20px;
}

.integration-mark.whatsapp {
    border-color: #A7F3D0;
    background: #ECFDF5;
    color: #047857;
}

.provider-test-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) auto minmax(220px, 1fr);
    align-items: end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #E2E8F0;
}

.message-template-workspace {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 300px;
    align-items: start;
    gap: 16px;
}

.message-template-list {
    display: grid;
    gap: 4px;
    max-height: calc(100vh - 190px);
    overflow: auto;
    padding: 8px;
}

.message-template-link {
    display: grid;
    gap: 3px;
    padding: 10px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #334155;
    text-decoration: none;
}

.message-template-link:hover,
.message-template-link.active {
    border-color: #D4AF37;
    background: #FFFBEB;
    color: #0F172A;
}

.message-template-link small {
    color: #64748B;
}

.variable-chip-list {
    display: grid;
    gap: 7px;
}

.variable-chip {
    display: grid;
    gap: 3px;
    width: 100%;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #F8FAFC;
    padding: 9px;
    color: #334155;
    text-align: start;
    cursor: pointer;
}

.variable-chip:hover,
.variable-chip.copied {
    border-color: #D4AF37;
    background: #FFFBEB;
}

.variable-chip code {
    direction: ltr;
    overflow-wrap: anywhere;
}

.message-preview {
    margin-top: 18px;
    border: 1px solid #E2E8F0;
    border-inline-start: 4px solid #D4AF37;
    border-radius: 7px;
    background: #F8FAFC;
    padding: 14px;
}

.message-preview > span {
    color: #64748B;
    font-size: 12px;
    font-weight: 900;
}

.message-preview p {
    margin: 8px 0 0;
    white-space: normal;
}

.compliance-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-inline-start: 4px solid #D4AF37;
}

.campaign-estimate {
    min-height: 46px;
    align-content: center;
    border: 1px solid #BFDBFE;
    border-radius: 7px;
    background: #EFF6FF;
    color: #1E3A5F;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 800;
}

/* Store homepage builder */
.home-builder-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
}

.home-builder-sections {
    position: sticky;
    top: 80px;
}

.home-section-sortable {
    display: grid;
    gap: 8px;
}

.home-section-row {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    min-height: 58px;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #fff;
    padding: 8px;
}

.home-section-row.dragging {
    border-color: #D4AF37;
    opacity: .65;
}

.drag-handle {
    color: #94A3B8;
    cursor: grab;
}

.home-section-row-copy {
    display: grid;
    min-width: 0;
}

.home-section-row-copy strong,
.home-section-row-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.color-input-row,
.input-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.color-input-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.color-input-row input[type="color"] {
    width: 100%;
    min-height: 42px;
    padding: 3px;
}

.store-home-live-preview {
    margin-top: 16px;
}

.store-home-preview-controls .active {
    border-color: #D4AF37;
    background: #FFF9E8;
    color: #735B0A;
}

.store-home-preview-shell {
    width: 100%;
    min-height: 720px;
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid #CBD5E1;
    border-radius: 7px;
    background: #F8FAFC;
    transition: width .2s ease;
}

.store-home-preview-shell.desktop {
    width: 100%;
}

.store-home-preview-shell.mobile {
    width: min(390px, 100%);
}

.store-home-preview-shell iframe {
    display: block;
    width: 100%;
    height: 720px;
    border: 0;
    background: #fff;
}

/* Public store shell and homepage */
.store-nav-toggle {
    display: none;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #fff;
    color: #0F172A;
    font-size: 21px;
    cursor: pointer;
}

body.store-body:not(.sf-storefront) .store-main.store-main-home {
    width: 100%;
    max-width: none;
    padding: 0;
}

.kabayan-home-template {
    width: 100%;
    overflow: hidden;
}

.store-home-section {
    width: 100%;
    padding: 52px max(20px, calc((100vw - 1180px) / 2));
}

.store-home-announcement {
    overflow: hidden;
    padding: 8px 0;
    color: #0F172A;
    font-weight: 900;
}

.store-announcement-track {
    display: flex;
    width: max-content;
    min-width: 200%;
    animation: store-announcement var(--announcement-speed, 28s) linear infinite;
}

.store-announcement-track span {
    width: 50%;
    padding-inline: 30px;
    text-align: center;
}

@keyframes store-announcement {
    from { transform: translateX(0); }
    to { transform: translateX(50%); }
}

.store-home-hero {
    position: relative;
    display: grid;
    align-items: end;
    min-height: 620px;
    background: #0F172A;
    color: #fff;
    isolation: isolate;
}

.store-home-hero-media,
.store-home-hero-media picture,
.store-home-hero-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.store-home-hero-image {
    object-fit: cover;
}

.store-home-hero.has-media::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(15, 23, 42, .48);
    content: "";
}

.store-home-hero-media {
    z-index: -2;
}

.store-home-hero-content {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 70px 0;
}

.store-home-hero h1 {
    max-width: 760px;
    margin: 0 0 14px;
    color: #fff;
    font-size: 64px;
    line-height: 1.15;
}

.store-home-hero-content > p {
    max-width: 640px;
    color: #E2E8F0;
    font-size: 18px;
}

.store-kicker {
    margin: 0 0 8px;
    color: #F5D76E;
    font-weight: 900;
}

.store-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.store-home-primary,
.store-home-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border: 1px solid #D4AF37;
    border-radius: 6px;
    padding: 10px 18px;
    text-decoration: none;
    font-weight: 900;
}

.store-home-primary {
    background: #D4AF37;
    color: #0F172A;
}

.store-home-secondary {
    background: rgba(15, 23, 42, .55);
    color: #fff;
}

.store-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 22px;
}

.store-section-heading h2,
.store-designer-callout h2 {
    margin: 0;
    color: #0F172A;
    font-size: 30px;
}

.store-section-heading p {
    margin: 5px 0 0;
    color: #64748B;
}

.store-category-grid,
.store-price-grid,
.store-service-grid,
.store-banner-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.store-category-tile,
.store-price-grid article,
.store-service-grid article,
.store-branch-list article {
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #fff;
    padding: 18px;
}

.store-category-tile {
    display: grid;
    gap: 4px;
    color: #0F172A;
    text-decoration: none;
}

.store-category-tile:hover {
    border-color: #D4AF37;
}

.store-price-grid article {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.store-price-grid article > strong {
    grid-column: 1 / -1;
    padding-bottom: 9px;
    border-bottom: 1px solid #E2E8F0;
}

.store-price-grid b {
    direction: ltr;
}

.store-banner-grid a,
.store-banner-grid picture {
    display: block;
    min-width: 0;
}

.store-banner-image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.store-designer-callout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: #0F172A;
    color: #fff;
}

.store-designer-callout h2 {
    color: #fff;
}

.store-branch-list {
    display: grid;
    gap: 10px;
}

.store-branch-list article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.home-mobile-only {
    display: none;
}

/* Store OTP */
.store-auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 440px);
    align-items: center;
    gap: 48px;
    min-height: 560px;
    padding-block: 50px;
}

.store-auth-copy h1 {
    margin: 6px 0 12px;
    color: #0F172A;
    font-size: 46px;
}

.store-auth-copy p {
    max-width: 560px;
    color: #64748B;
    font-size: 17px;
}

.store-auth-panel {
    border: 1px solid #E2E8F0;
    border-top: 4px solid #D4AF37;
    border-radius: 8px;
    background: #fff;
    padding: 24px;
}

.store-form,
.store-otp-fallbacks {
    display: grid;
    gap: 14px;
}

.store-primary-action,
.store-link-action {
    min-height: 44px;
    border: 1px solid #D4AF37;
    border-radius: 6px;
    background: #D4AF37;
    color: #0F172A;
    padding: 9px 14px;
    font-weight: 900;
    cursor: pointer;
}

.store-link-action {
    width: 100%;
    border-color: #CBD5E1;
    background: #fff;
}

.store-primary-action:disabled,
.store-link-action:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.store-otp-code {
    height: 58px;
    direction: ltr;
    text-align: center;
    font-family: "Roboto Mono", monospace;
    font-size: 28px;
    letter-spacing: 8px;
}

.store-form-alert {
    color: #B91C1C;
}

.campaign-message-preview pre {
    min-height: 110px;
    margin: 0;
    border: 1px solid #CBD5E1;
    border-inline-start: 4px solid #D4AF37;
    border-radius: 6px;
    background: #F8FAFC;
    color: #0F172A;
    padding: 14px;
    font: 500 14px/1.8 Tajawal, Arial, sans-serif;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.store-otp-note,
.store-otp-destination {
    color: #64748B;
}

@media (max-width: 1080px) {
    .communication-health-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .queue-test-form {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .message-template-workspace {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .message-template-workspace .variable-guide {
        grid-column: 1 / -1;
    }

    .home-builder-layout {
        grid-template-columns: 1fr;
    }

    .home-builder-sections {
        position: static;
    }

    .store-category-grid,
    .store-price-grid,
    .store-service-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .communication-provider-grid,
    .message-template-workspace,
    .store-auth-shell {
        grid-template-columns: 1fr;
    }

    .message-template-list {
        max-height: 280px;
    }

    .provider-test-row {
        grid-template-columns: 1fr;
    }

    .communication-health-grid,
    .queue-test-form {
        grid-template-columns: 1fr;
    }

    .store-nav-toggle {
        display: grid;
        margin-inline-start: auto;
    }

    body.store-body:not(.sf-storefront) .store-header {
        flex-wrap: wrap;
        padding: 11px 16px;
    }

    body.store-body:not(.sf-storefront) .store-nav {
        display: none;
        flex-basis: 100%;
        align-items: stretch;
        gap: 3px;
        padding: 8px 0 3px;
    }

    body.store-body:not(.sf-storefront) .store-nav.is-open {
        display: grid;
    }

    body.store-body:not(.sf-storefront) .store-nav a,
    body.store-body:not(.sf-storefront) .store-nav-button {
        display: block;
        width: 100%;
        min-height: 42px;
        padding: 10px;
        text-align: start;
    }

    .store-home-hero {
        min-height: 560px;
    }

    .store-home-hero h1 {
        font-size: 42px;
    }

    .store-home-section {
        padding: 38px 18px;
    }

    .store-designer-callout,
    .store-section-heading {
        align-items: stretch;
        flex-direction: column;
    }

    .home-mobile-only {
        display: block;
    }

    .home-desktop-only {
        display: none;
    }

    .store-auth-copy h1 {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .home-section-row {
        grid-template-columns: 22px minmax(0, 1fr) auto;
    }

    .home-section-row > .actions {
        grid-column: 2 / -1;
        justify-content: flex-start;
    }

    .store-home-hero {
        min-height: 520px;
    }

    .store-home-hero-content {
        width: calc(100% - 32px);
        padding: 46px 0;
    }

    .store-home-hero h1 {
        font-size: 34px;
    }

    .store-category-grid,
    .store-price-grid,
    .store-service-grid,
    .store-banner-grid {
        grid-template-columns: 1fr;
    }

    .store-home-actions,
    .store-home-actions a,
    .store-designer-callout .store-home-primary {
        width: 100%;
    }

    .store-auth-panel {
        padding: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .store-announcement-track {
        animation: none;
    }
}

/* Store customer account */
.store-account-hero,
.store-account-document-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding: 34px 0 24px;
    border-bottom: 1px solid #E2E8F0;
}

.store-account-hero h1,
.store-account-document-header h1 {
    margin: 5px 0 8px;
    color: #0F172A;
    font-size: 36px;
    line-height: 1.25;
}

.store-account-hero p,
.store-account-document-header p {
    max-width: 680px;
    margin: 0;
    color: #64748B;
}

.store-account-phone {
    display: grid;
    flex: 0 0 auto;
    gap: 3px;
    min-width: 210px;
    border-inline-start: 3px solid #D4AF37;
    padding: 8px 14px;
    background: #FFFDF5;
}

.store-account-phone span,
.store-account-stats span,
.store-account-document-totals span,
.store-account-document-lines article > div > span {
    color: #64748B;
    font-size: 12px;
    font-weight: 700;
}

.store-account-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 22px 0;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #E2E8F0;
}

.store-account-stats > div {
    display: grid;
    gap: 4px;
    min-width: 0;
    padding: 18px;
    background: #FFFFFF;
}

.store-account-stats strong {
    color: #0F172A;
    font-size: 26px;
}

.store-account-stats small {
    color: #475569;
}

.store-account-workspace {
    padding-bottom: 48px;
}

.store-account-tabs {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    border-bottom: 1px solid #CBD5E1;
}

.store-account-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    border-bottom: 3px solid transparent;
    padding: 8px 14px;
    color: #475569;
    text-decoration: none;
    white-space: nowrap;
}

.store-account-tabs a.active {
    border-color: #D4AF37;
    color: #0F172A;
    font-weight: 900;
}

.store-account-tabs b {
    display: inline-grid;
    place-items: center;
    min-width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #F1F5F9;
    font-size: 11px;
}

.store-account-filters {
    display: grid;
    grid-template-columns: minmax(200px, 1.5fr) repeat(3, minmax(145px, .8fr)) auto auto;
    align-items: end;
    gap: 10px;
    padding: 18px 0;
}

.store-account-filters .field {
    display: grid;
    gap: 5px;
}

.store-account-filters label {
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.store-account-filters input,
.store-account-filters select {
    width: 100%;
    min-height: 44px;
    border: 1px solid #CBD5E1;
    border-radius: 6px;
    background: #FFFFFF;
    padding: 8px 10px;
}

.store-account-filters .store-primary-action,
.store-account-filters .store-link-action,
.store-account-document-actions .store-primary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    text-decoration: none;
    white-space: nowrap;
}

.store-account-documents {
    display: grid;
    gap: 9px;
}

.store-account-document-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(150px, auto) auto;
    align-items: center;
    gap: 18px;
    min-height: 112px;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #FFFFFF;
    padding: 16px 18px;
}

.store-account-document-card:hover {
    border-color: #D4AF37;
}

.store-account-document-main,
.store-account-document-meta {
    display: grid;
    min-width: 0;
    gap: 4px;
}

.store-account-document-main h2 {
    overflow: hidden;
    margin: 0;
    color: #0F172A;
    font-size: 18px;
    text-overflow: ellipsis;
}

.store-account-document-main p,
.store-account-document-meta small {
    margin: 0;
    color: #64748B;
    font-size: 12px;
}

.store-account-document-kind {
    color: #8A681B;
    font-size: 11px;
    font-weight: 900;
}

.store-account-document-meta {
    justify-items: start;
}

.store-account-document-action,
.store-account-back {
    color: #0F172A;
    font-weight: 900;
    text-decoration-color: #D4AF37;
    text-underline-offset: 4px;
}

.store-account-empty {
    padding: 52px 20px;
    border: 1px dashed #CBD5E1;
    text-align: center;
}

.store-account-empty p {
    margin: 6px 0 0;
    color: #64748B;
}

.store-account-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding-top: 20px;
}

.store-account-pagination a {
    color: #0F172A;
    font-weight: 900;
}

.store-account-document-header {
    align-items: center;
}

.store-account-back {
    align-self: flex-start;
}

.store-account-document-actions {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.store-account-document-totals {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1px;
    overflow: hidden;
    margin: 22px 0;
    border: 1px solid #E2E8F0;
    background: #E2E8F0;
}

.store-account-document-totals > div {
    display: grid;
    gap: 5px;
    padding: 16px;
    background: #FFFFFF;
}

.store-account-document-totals .total {
    background: #0F172A;
    color: #FFFFFF;
}

.store-account-document-totals .total span,
.store-account-document-totals .total strong {
    color: #FFFFFF;
}

.store-account-document-lines,
.store-account-payments {
    margin: 22px 0;
}

.store-account-document-lines h2,
.store-account-payments h2 {
    margin: 0 0 10px;
    color: #0F172A;
    font-size: 19px;
}

.store-account-document-lines article {
    display: grid;
    grid-template-columns: minmax(180px, 1.4fr) repeat(5, minmax(100px, .7fr));
    gap: 10px;
    border-bottom: 1px solid #E2E8F0;
    padding: 14px 4px;
}

.store-account-document-lines article > div {
    display: grid;
    align-content: center;
    gap: 3px;
}

.store-account-document-lines .description strong {
    color: #0F172A;
}

.store-account-document-lines .line-total {
    text-align: end;
}

.store-account-payments > div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid #E2E8F0;
    padding: 11px 4px;
}

.store-otp-reset-form {
    display: flex;
    justify-content: center;
    margin-top: 8px;
}

.store-otp-reset-form .store-link-action {
    width: auto;
    min-height: 36px;
    border: 0;
    padding: 5px 10px;
    color: #475569;
}

.op-customer-account-note {
    display: flex;
    grid-column: 1 / -1;
    align-items: flex-start;
    gap: 8px;
    margin: 0;
    border-inline-start: 3px solid #D4AF37;
    background: #FFFBEB;
    color: #735B0A;
    padding: 8px 10px;
    font-size: 11px;
    line-height: 1.6;
}

@media (max-width: 980px) {
    .store-account-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .store-account-filters .store-primary-action,
    .store-account-filters .store-link-action {
        width: 100%;
    }

    .store-account-document-lines article {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .store-account-document-lines .description {
        grid-column: 1 / -1;
    }
}

@media (max-width: 700px) {
    .store-account-hero,
    .store-account-document-header {
        align-items: stretch;
        flex-direction: column;
        padding-top: 22px;
    }

    .store-account-hero h1,
    .store-account-document-header h1 {
        font-size: 28px;
    }

    .store-account-phone {
        width: 100%;
    }

    .store-account-stats {
        grid-template-columns: 1fr;
    }

    .store-account-document-card {
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
    }

.store-account-document-action {
        grid-column: 1 / -1;
        min-height: 40px;
        border-top: 1px solid #E2E8F0;
        padding-top: 10px;
    }

    .store-account-document-actions {
        justify-items: stretch;
    }

    .store-account-document-totals {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.store-account-statement-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
    border: 1px solid #d8dee8;
    background: #f8fafc;
}

.store-account-statement-head span,
.store-account-statement-money span {
    color: #64748b;
    font-size: .78rem;
}

.store-account-statement-money {
    display: grid;
    grid-template-columns: repeat(3, minmax(90px, 1fr));
    gap: 8px;
    min-width: min(100%, 330px);
}

.store-account-statement-money span {
    display: grid;
    gap: 3px;
}

.store-account-statement-money strong {
    color: #0f172a;
    font-size: .9rem;
}

.store-account-statement-money .balance {
    padding-inline-start: 9px;
    border-inline-start: 2px solid #d4af37;
}

@media (max-width: 720px) {
    .store-account-statement-money {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .store-account-statement-money .balance {
        grid-column: 1 / -1;
    }
}

@media (max-width: 430px) {
    .store-account-filters,
    .store-account-document-lines article {
        grid-template-columns: 1fr;
    }

    .store-account-document-lines .description {
        grid-column: auto;
    }

    .store-account-document-lines .line-total {
        border-top: 1px solid #E2E8F0;
        padding-top: 8px;
        text-align: start;
    }

    .store-account-document-card {
        grid-template-columns: 1fr;
    }

    .store-account-document-meta {
        justify-items: start;
    }
}
