@font-face {
    font-family: Vazirmatn;
    src: url("/Vazirmatn.woff2") format("woff2");
    font-display: swap;
}
.trade-customer { --trade-bg: #133b34; --trade-color: #fff4da; }
.trade-customer.trade-navy { --trade-bg: #172d49; }
.trade-customer.trade-amber { --trade-bg: #402d20; }
.trade-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-block: 1rem; }
.trade-tabs a {
    display: inline-flex; align-items: center; min-height: 2.65rem; padding: .3rem .8rem;
    border: 1px solid var(--line); border-radius: .55rem; background: var(--surface); text-decoration: none;
}
.trade-market-status { margin-block: 1rem .55rem; color: var(--muted); }
.trade-quotes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); gap: .7rem; }
.trade-quote { border-radius: .9rem; padding: 1rem; background: var(--trade-bg); color: var(--trade-color); }
.trade-quote h3 { font-size: 1.12rem; }
.trade-quote p, .trade-quote small { color: #e9e4d8; font-size: .81rem; }
.trade-quote dl { margin-block: .6rem 0; }
.trade-quote dl > div { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; padding: .35rem 0; }
.trade-quote dl > div + div { border-block-start: 1px solid #fff3; }
.trade-quote dd { margin: 0; text-align: end; font-weight: 700; }
.trade-quote small { display: block; font-weight: 400; }
.trade-form { display: flex; flex-wrap: wrap; align-items: end; gap: .65rem; margin-block: .65rem; }
.trade-form label { flex: 1 1 13rem; min-width: 0; }
.trade-form input, .trade-form select, .trade-form textarea {
    width: 100%; min-width: 0; min-height: 2.7rem; padding: .45rem; font: inherit; border: 1px solid var(--line);
    border-radius: .5rem; color: var(--ink); background: var(--surface);
}
.trade-form button { min-height: 2.7rem; padding: .45rem .9rem; border: 1px solid var(--forest); border-radius: .55rem;
    background: var(--forest); color: white; font: inherit; cursor: pointer; }
.trade-message { white-space: pre-wrap; overflow-wrap: anywhere; }
.trade-customer + section { margin-block-start: 1rem; }
.melted-rates {
    margin-block: .4rem 1rem; padding: clamp(.9rem, 3vw, 1.6rem); border: 1px solid #b99a61;
    border-radius: 1.2rem; color: #fff8e6;
    background: radial-gradient(ellipse at 80% 0%, #254d3b, transparent 68%), #101f1a;
    box-shadow: 0 .45rem 1rem #122b221a;
}
.melted-heading, .melted-reference {
    display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .4rem 1rem;
}
.melted-heading h2 { margin: 0; font-size: clamp(1.25rem, 4vw, 1.85rem); }
.melted-heading p { margin: .12rem 0 .55rem; color: #d7d8c9; font-size: .9rem; }
.melted-badge { border: 1px solid #b99a61; color: #f5d895; border-radius: 2rem; padding: .12rem .7rem; font-size: .82rem; }
.melted-prices { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .65rem; margin-block: .6rem .8rem; }
.melted-price { min-width: 0; border: 1px solid #e5dbbf3a; border-radius: .85rem; background: #0c161581; padding: .7rem .9rem; }
.melted-price > span { font-weight: 650; font-size: .95rem; }
.melted-price > small { display: block; color: #e9dfc9; font-size: .83rem; }
.melted-buy > span, .melted-buy .melted-amount { color: #97ecc4; }
.melted-sell > span, .melted-sell .melted-amount { color: #ffc4a8; }
.melted-amount { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .42rem; }
.melted-amount bdi { font-size: clamp(1.4rem, 4.4vw, 2.3rem); font-weight: 780; font-variant-numeric: tabular-nums; }
.melted-amount small { color: #e9dfc9; font-size: .8rem; }
.melted-reference { color: #e6d8ba; font-size: .8rem; border-block-start: 1px solid #f0d39638; padding-block-start: .7rem; }
.melted-order-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.melted-order-actions button.melted-order-sell { background: #7c4a33; border-color: #7c4a33; }
.melted-order-grid, .otp-setup {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .85rem;
}
.melted-order-card {
    display: flex; flex-direction: column; gap: .35rem; padding: 1rem; border: 1px solid #e7ddc7;
    border-block-start: 3px solid #28755b; border-radius: .85rem; background: #fffdf7;
}
.melted-order-card h3, .melted-order-card p { margin: 0 0 .35rem; }
.melted-order-card form { display: grid; margin-block-start: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.melted-order-card button { grid-column: 1 / -1; width: 100%; }
.melted-order-sell { border-block-start-color: #a05f43; }
.melted-order-sell button { background: #78462f; border-color: #78462f; }
.otp-qr { align-self: start; justify-self: center; max-width: 100%; background: white; }
.otp-qr svg { display: block; max-width: 100%; height: auto; }
.otp-guide { margin-block-start: 1.5rem; }
.otp-guide li { margin-block: .45rem; }
.otp-setup code { overflow-wrap: anywhere; user-select: all; }
[data-receipt-status] { color: #7a431e; font-weight: 600; }
.trade-timed-form { margin-block-start: .75rem; }
.trade-deadline {
    display: flex; flex-wrap: wrap; gap: .3rem .85rem; justify-content: space-between; align-items: center;
    border: 1px solid #d1bb89; border-radius: .65rem; padding: .35rem .75rem;
    background: #faf3df; color: #65461e; font-weight: 680;
}
.trade-deadline bdi { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.trade-timed-form button:disabled { opacity: .5; cursor: default; }
.trade-payment dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .5rem; margin-block: .5rem; }
.trade-payment dl > div { padding: .5rem .65rem; border-radius: .5rem; border: 1px solid var(--line); }
.trade-payment dt { color: var(--muted); font-size: .85rem; }
.trade-payment dd { margin: 0; font-weight: 650; overflow-wrap: anywhere; }
.trade-payment dd small { display: block; font-weight: 400; }
.trade-payment button[data-copy-target] { font-size: .8rem; min-height: 2rem; padding: .15rem .4rem; }
.bank-receipt-notice { border: 1px solid #bf8f46; border-inline-start: .3rem solid #a66d21; background: #fff5e3;
    color: #582e0d; border-radius: .6rem; padding: .65rem .85rem; margin-block: .65rem; }
.bank-receipt-notice p { margin: .3rem 0 0; }
.bank-receipts { margin-block: .85rem; }
.bank-receipts > p { color: var(--muted); }
.wallet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: .8rem; }
.wallet-card { padding: clamp(1rem, 3vw, 1.45rem); border-radius: 1rem; border: 1px solid #c9d2c5; background: #fff; }
.wallet-card h2 { margin: 0 0 .45rem; font-size: 1.18rem; }
.wallet-card p { margin: .45rem 0; font-size: .88rem; }
.wallet-rial { background: #173d31; color: #f5f9ef; border-color: #173d31; }
.wallet-gold { background: #fffaf0; border-color: #d8c49b; color: #4f3a1e; }
.wallet-amount { font-size: .96rem; }
.wallet-amount bdi { font-size: clamp(1.4rem, 4vw, 2.6rem); font-weight: 750; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.wallet-card dl { margin: .65rem 0 0; font-size: .86rem; }
.wallet-card dl div { display: flex; flex-wrap: wrap; gap: .2rem .7rem; justify-content: space-between; border-top: 1px solid #e1d3b6; padding-block: .3rem; }
.wallet-card dd { margin: 0; font-weight: 650; }
.wallet-links { display: flex; align-items: center; gap: .4rem .9rem; flex-wrap: wrap; margin-block: .6rem; }
.pickup-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,17rem),1fr)); gap: .85rem; margin-block: 1rem; }
.pickup-balance { display: flex; gap: .35rem .8rem; flex-wrap: wrap; align-items: baseline; background: #edf4ee; padding: .7rem .9rem; border-radius: .65rem; }
.pickup-balance strong { color: var(--deep); }
.pickup-card.panel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.pickup-photo { width: 100%; height: auto; aspect-ratio: 5/3; object-fit: contain; background: #f4f2ea; }
.pickup-card-content { flex: 1; display: flex; flex-direction: column; gap: .4rem; padding: .95rem; }
.pickup-card-content h2,.pickup-card-content p { margin: 0; overflow-wrap: anywhere; }
.pickup-card-content p { color: var(--muted); white-space: pre-wrap; }
.pickup-card-content p:empty { display: none; }
.pickup-card-content dl { margin: .4rem 0; }
.pickup-card-content dl > div { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .2rem .6rem; padding: .27rem 0; border-bottom: 1px solid var(--line); }
.pickup-card-content dd { margin: 0; font-weight: 650; }
.pickup-card .trade-form { margin-top: auto; }
.pickup-card .trade-form label { flex: 1 1 5rem; }
.pickup-ready { margin-top: 1rem; background: #fcf6e9; border-color: #d8c49b; }
.pickup-ready p { white-space: pre-wrap; overflow-wrap: anywhere; }
.pickup-ready strong { padding: .1rem .4rem; letter-spacing: .15em; color: var(--deep); }
@media (max-width: 460px) {
    .melted-prices { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .4rem; }
    .melted-price { padding: .5rem; }
    .melted-amount bdi { overflow-wrap: anywhere; font-size: clamp(1.08rem, 4.7vw, 1.4rem); }
    .melted-order-actions { width: 100%; }
    .melted-order-actions button { flex: 1; }
}

:root {
    color-scheme: light;
    --paper: #f6f4ed;
    --surface: #fffefa;
    --deep: #0c3029;
    --forest: #154438;
    --ink: #172e27;
    --muted: #52635b;
    --line: #dedfd3;
    --gold: #d9ad5d;
    --focus: #a26618;
    font-family: Vazirmatn, Tahoma, "Segoe UI", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font-size: .96rem; line-height: 1.7; }
a { color: var(--forest); text-underline-offset: .25em; }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(1.55rem, 4vw, 2.4rem); line-height: 1.4; }
h2 { font-size: 1.12rem; }
.shell { width: min(100% - 2.5rem, 79rem); margin-inline: auto; }
.mast { background: var(--deep); border-block-end: 1px solid #b98d48; }
.mast-inner, .portal-brand { display: flex; align-items: center; gap: .8rem; }
.mast-inner { justify-content: space-between; padding-block: .7rem; }
.portal-brand { color: #fff7e7; text-decoration: none; }
.portal-brand img { object-fit: contain; display: block; }
.portal-brand span { display: grid; }
.portal-brand strong { font-size: 1.06rem; }
.portal-brand small { color: #e5c58b; font-size: .82rem; }
.mast .button.secondary { background: transparent; border-color: #668479; color: #fff7e7; }
.mast .button.secondary:hover { background: #255144; }
.navigation { background: var(--surface); border-block-end: 1px solid var(--line); }
.navigation:has(nav:empty), .navigation:empty { display: none; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; width: min(100% - 2.5rem, 79rem); margin-inline: auto; }
nav a { display: inline-flex; align-items: center; padding: .55rem .45rem; min-height: 44px; color: var(--muted);
    text-decoration: none; border-block-end: 3px solid transparent; }
nav a:hover, nav [aria-current="page"] { color: var(--deep); border-block-end-color: #a67324; }
nav [aria-current="page"] { font-weight: bold; }
main { padding-block: clamp(1.2rem, 4vw, 2.6rem) 3rem; }
.portal-context-help { margin-block-end: .65rem; font-size: .88rem; }
.portal-context-help a { display: inline-flex; align-items: center; min-height: 36px; color: var(--forest);
    border: 1px solid var(--line); background: var(--surface); padding: .25rem .65rem; border-radius: .5rem; text-decoration: none; }
.portal-context-help a:hover { background: #e7eee7; }
footer { border-block-start: 1px solid var(--line); color: var(--muted); padding-block: 1rem; font-size: .8rem; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: .55rem 1rem;
    border: 1px solid var(--forest); border-radius: .6rem; background: var(--forest); color: white; font: inherit;
    font-weight: bold; text-decoration: none; cursor: pointer; text-align: center; }
.button:hover { background: var(--deep); }
.button.secondary { color: var(--forest); border-color: var(--line); background: var(--surface); }
.button.secondary:hover { background: #e7eee7; }
.text-link { display: inline-flex; align-items: center; min-height: 44px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-block-end: 1.25rem; }
.invoice-brand { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.invoice-brand > div { min-width: 0; overflow-wrap: anywhere; }
.invoice-logo { display: block; width: clamp(46px, 8vw, 64px); height: auto; flex: none; }
.invoice-photos { margin-block-start: .9rem; }
.invoice-photos > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(125px, 1fr)); gap: .6rem; }
.invoice-photos figure { margin: 0; padding: .45rem; border: 1px solid var(--line); break-inside: avoid; }
.invoice-photos img { display: block; width: 100%; height: 110px; object-fit: contain; }
.invoice-photos figcaption { font-size: .82rem; overflow-wrap: anywhere; }
.page-title p, .muted { color: var(--muted); margin-block-start: .3rem; }
.eyebrow { display: inline-block; color: #725117; font-weight: bold; margin-block-end: .25rem; font-size: .84rem; }
.actions, .pagination { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; }
.cards, .split { display: grid; gap: .9rem; margin-block-end: 1rem; }
.cards { grid-template-columns: repeat(3,minmax(0,1fr)); }
.split { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: .9rem; padding: clamp(1rem,2vw,1.5rem); min-width: 0; }
.card.featured { background: var(--deep); color: white; border-color: var(--deep); }
.card h2 { font-size: .92rem; margin-block-end: .4rem; }
.card p { display: flex; align-items: baseline; flex-wrap: wrap; gap: .4rem .7rem; }
.card .number { font-size: clamp(1.25rem, 2vw, 1.85rem); font-weight: bold; }
.card span, .card h2 { color: var(--muted); }
.card.featured span, .card.featured h2 { color: #ead2a7; }
.balance-label { display: inline-block; font-size: .74rem; border-radius: 2rem; padding: .05rem .45rem; white-space: nowrap; }
.balance-label.owed { background: #f6e8d0; color: #6b4815; }
.balance-label.credit { background: #e6efe6; color: #224b38; }
.number { font-variant-numeric: tabular-nums; white-space: nowrap; }
.panel { margin-block-end: 1rem; }
.split .panel { margin-block-end: 0; }
.panel > h2 { margin-block-end: .7rem; }
.range, .stack { display: grid; gap: .7rem; }
.range { grid-template-columns: minmax(0,1fr) minmax(0,1fr) auto auto; align-items: end; padding: .9rem;
    border: 1px solid var(--line); border-radius: .7rem; background: var(--surface); margin-block-end: 1rem; }
label { display: grid; gap: .35rem; font-weight: bold; }
input { min-width: 0; width: 100%; min-height: 44px; font: inherit; color: var(--ink); background: #fff;
    border: 1px solid #b6c0b7; border-radius: .56rem; padding: .55rem .65rem; }
.stack { margin-block-start: 1.2rem; }
.account-username { position: absolute; width: 1px; min-height: 0; height: 1px; overflow: hidden; clip-path: inset(50%); }
.notice { border: 1px solid #b98369; background: #fff2e9; color: #692f22; border-radius: .55rem;
    padding: .7rem; margin-block-start: .8rem; }
.scroll { overflow-x: auto; max-width: 100%; border: 1px solid var(--line); border-radius: .6rem; margin-block-start: .5rem; }
.scroll + .scroll { margin-block-start: 1rem; }
table { width: 100%; border-collapse: collapse; background: var(--surface); text-align: right; font-size: .9rem; }
th, td { padding: .64rem .65rem; border-block-end: 1px solid #e7e8de; vertical-align: top; }
th { background: #eaf0e9; color: var(--deep); white-space: nowrap; }
td { white-space: nowrap; }
tr:last-child td { border-block-end: 0; }
tbody tr:nth-child(even) td { background: #fafbf6; }
.empty { color: var(--muted); padding-block: .3rem; }
.pagination { margin-block-start: .9rem; }
.login-layout { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); max-width: 55rem; margin: 1.5rem auto; }
.login-art { display: grid; place-content: center; justify-items: center; gap: .85rem; text-align: center; padding: 2rem 1rem;
    background: radial-gradient(circle at 51% 29%,#2b5341,var(--deep) 72%); color: #ffedd0; border-radius: 0 .9rem .9rem 0; }
.login-art img { max-width: min(100%,14rem); height: auto; object-fit: contain; }
.login-panel { margin: 0; border-radius: .9rem 0 0 .9rem; padding: clamp(1.2rem,5vw,3rem); align-content: center; }
.login-panel > p { margin-block-start: .5rem; color: var(--muted); }
.narrow { max-width: 35rem; margin-inline: auto; }
.narrow > p { margin-block-start: .65rem; }
@media (max-width: 730px) {
    .shell, nav { width: calc(100% - 1.4rem); }
    .login-layout { max-width: 32rem; grid-template-columns: minmax(0,1fr); margin-block: 0; }
    .login-art { border-radius: .9rem .9rem 0 0; padding-block: 1.2rem; }
    .login-art img { max-width: 8rem; }
    .login-panel { border-radius: 0 0 .9rem .9rem; }
    .cards, .split { grid-template-columns: minmax(0,1fr); }
    .page-title { align-items: flex-start; flex-direction: column; }
    .range { grid-template-columns: repeat(2,minmax(0,1fr)); }
    input { font-size: 16px; }
}
@media (max-width: 365px) {
    .range { grid-template-columns: minmax(0,1fr); }
    nav { gap: .15rem .35rem; }
}
@page { size: A4 landscape; margin: 10mm; }
@media print {
    :root { font-size: 10.5pt; }
    body { background: white; }
    .no-print, .mast form { display: none !important; }
    .shell { width: 100%; }
    .mast { color: var(--deep); background: white; border-color: #b98d48; }
    .portal-brand, .portal-brand small { color: var(--deep); }
    .mast-inner, main { padding-block: .4rem; }
    .portal-brand img { width: 36px; height: 36px; }
    .invoice-brand { break-inside: avoid; }
    .invoice-logo { width: 14mm; }
    .invoice-photos > div { display: flex; flex-wrap: wrap; }
    .invoice-photos figure { flex: 0 0 calc(25% - .6rem); }
    .invoice-photos img { height: 23mm; }
    .cards { grid-template-columns: repeat(3,minmax(0,1fr)); margin-block-end: .6rem; gap: .45rem; break-inside: avoid; }
    .split { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; }
    .card, .panel { padding: .45rem; margin-block-end: .5rem; border-radius: 0; }
    .card.featured { background: white; color: var(--deep); }
    .card.featured h2, .card.featured span { color: var(--muted); }
    h1 { font-size: 1.55rem; }
    .page-title { margin-block-end: .5rem; }
    .scroll { overflow: visible; border: 0; margin-block-start: .2rem; }
    table { font-size: .85rem; }
    thead { display: table-header-group; }
    tr { break-inside: avoid; }
    th,td { white-space: normal; padding: .23rem .3rem; }
    a { color: inherit; text-decoration: none; }
}

/* Shared printable invoice styles */
.invoice-sheet {
    --invoice-ink: #163a32;
    --invoice-gold: #967131;
    --invoice-line: #e3d3b3;
    color: #202823;
    background: #fff;
    border: 1px solid var(--invoice-gold);
    border-radius: .55rem;
    box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px var(--invoice-line);
    margin: 1rem 0;
    padding: clamp(.8rem, 3vw, 1.9rem);
}
.invoice-sheet .invoice-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: .8rem 1.4rem;
    border-bottom: 1px solid var(--invoice-line);
    padding-block-end: .8rem;
}
.invoice-sheet .invoice-brand { display: flex; align-items: center; gap: .75rem; }
.invoice-sheet .invoice-logo { display: block; width: 3.7rem; height: auto; }
.invoice-sheet .invoice-heading h2 { color: var(--invoice-ink); margin: .08rem 0; }
.invoice-sheet .invoice-copy-label { color: #73551f; font-size: .84rem; font-weight: 600; }
.invoice-sheet .invoice-heading dl, .invoice-sheet .invoice-party dl { margin: 0; }
.invoice-sheet .invoice-heading dl div, .invoice-sheet .invoice-party dl div {
    display: flex;
    gap: .5rem;
    align-items: baseline;
}
.invoice-sheet .invoice-heading dd, .invoice-sheet .invoice-party dd { margin: 0; overflow-wrap: anywhere; }
.invoice-sheet .invoice-heading dt, .invoice-sheet .invoice-party dt { color: #525a54; font-size: .85em; min-width: max-content; }
.invoice-sheet .invoice-parties {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-block: .75rem;
}
.invoice-sheet .invoice-party {
    border: 1px solid #e0e5df;
    border-radius: .3rem;
    background: #f7faf7;
    margin: 0;
    padding: .55rem .7rem;
}
.invoice-sheet .invoice-party h3 { color: var(--invoice-ink); margin: 0; font-size: .88rem; }
.invoice-sheet .invoice-status { color: #8a2923; font-weight: 700; }
.invoice-sheet strong { font-size: inherit; line-height: inherit; }
.invoice-sheet .scroll { overflow-x: auto; }
.invoice-sheet table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.invoice-sheet th {
    background: #eff3ef;
    border-bottom: 1px solid var(--invoice-line);
    color: var(--invoice-ink);
}
.invoice-sheet td, .invoice-sheet th { padding: .48rem; }
.invoice-compact td, .invoice-compact th { padding: .3rem .42rem; font-size: .83rem; }
.invoice-sheet td small { display: block; font-size: .86em; }
.invoice-sheet td:nth-child(2) { min-width: 8rem; white-space: normal; overflow-wrap: anywhere; }
.invoice-sheet .invoice-bottom { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; margin-top: .6rem; }
.invoice-sheet .invoice-totals { margin: 0; max-width: 36rem; }
.invoice-sheet .invoice-totals div {
    display: flex;
    justify-content: space-between;
    padding: .16rem .45rem;
    border-bottom: 1px solid #e3e6de;
    gap: .7rem;
}
.invoice-sheet .invoice-totals dd { margin: 0; text-align: end; }
.invoice-sheet .invoice-terms { margin: .25rem 0 0; padding: .25rem 0 0; border: 0; border-top: 1px solid var(--invoice-line); border-radius: 0; background: transparent; }
.invoice-sheet .invoice-terms p, .invoice-sheet .invoice-check p { margin: .12rem 0; font-size: .86rem; }
.invoice-sheet .invoice-check {
    display: flex;
    align-items: center;
    gap: .75rem;
    border: 1px solid var(--invoice-line);
    padding: .35rem .6rem;
    margin-top: .5rem;
    break-inside: avoid;
}
.invoice-sheet .invoice-qr { display: block; flex: 0 0 auto; color: #111; background: white; }
.invoice-sheet .invoice-qr svg { display: block; width: 7rem; height: auto; }
.invoice-sheet .invoice-check strong { color: var(--invoice-ink); }
.invoice-sheet .invoice-signatures {
    display: flex;
    justify-content: space-around;
    gap: .7rem;
    padding: .65rem 0 1.65rem;
}
.verification-head > strong { display: block; margin-block-end: .35rem; }
.verification-status { display: inline-block; border: 1px solid #b29864; padding: .15rem .5rem; font-weight: 700; }
.verification-item { padding: .65rem .75rem; background: #f7faf7; border: 1px solid #d9e2d9; border-radius: .5rem; margin-top: .65rem; }
.verification-item h3, .verification-item p { margin: .1rem 0; }
.verification-item dl { margin: .4rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr)); gap: .35rem .6rem; }
.verification-item dt { color: #546059; font-size: .84rem; }
.verification-item dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media screen and (max-width: 560px) {
    .invoice-sheet .invoice-parties, .invoice-sheet .invoice-bottom { grid-template-columns: minmax(0, 1fr); }
    .invoice-sheet .invoice-qr svg { width: 6rem; }
    .invoice-sheet .invoice-check { align-items: flex-start; }
}
@media print {
    :root:has(.invoice-sheet) { background: #fff; }
    main:has(.invoice-sheet) > h1, main:has(.invoice-sheet) > .page-title { display: none; }
    .invoice-sheet {
        border: 3px double #856628;
        border-radius: 0;
        box-shadow: none;
        margin: 0;
        padding: 4.5mm;
        font-size: 9pt;
        line-height: 1.35;
    }
    .invoice-copies > .invoice-sheet + .invoice-sheet { break-before: page; }
    .invoice-sheet .invoice-logo { width: 13mm; }
    .invoice-sheet .invoice-heading, .invoice-sheet .invoice-party,
    .invoice-sheet .invoice-terms, .invoice-sheet .invoice-signatures { break-inside: avoid; }
    .invoice-sheet .invoice-qr svg { width: 30mm; }
    .invoice-sheet .invoice-check { padding: 0 .45rem; margin: 0; }
    .invoice-sheet .invoice-terms p, .invoice-sheet .invoice-check p { font-size: 8pt; }
    .invoice-sheet .invoice-totals div { padding: .12rem .32rem; }
    .invoice-sheet .invoice-heading dl { display: grid; grid-template-columns: auto auto; column-gap: .8rem; }
    .invoice-sheet .invoice-party { padding: .3rem .5rem; }
    .invoice-sheet .scroll { overflow: visible; }
    .invoice-sheet td, .invoice-sheet th { padding: .22rem; font-size: 8pt; white-space: normal; }
    .invoice-sheet td:nth-child(2) { min-width: 0; }
    .invoice-sheet .invoice-signatures { padding-block-end: 1.1rem; }
}
