.commerce-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}.commerce-card{border:1px solid #dce7e6;background:#fff;padding:24px;border-radius:16px;margin-bottom:18px;min-width:0}.commerce-card h2{margin-top:0}.commerce-card p,.commerce-dialog p{line-height:1.9}.commerce-card label,.commerce-dialog label{display:grid;gap:8px;margin:16px 0}.commerce-card input,.commerce-card select,.commerce-card textarea,.commerce-dialog input{box-sizing:border-box;width:100%;font:inherit;background:#fff;border:1px solid #cbdad8;border-radius:8px;padding:12px;color:#243a3a}.commerce-card button,.commerce-dialog button{font:inherit;border:1px solid #4c9e9f;border-radius:8px;background:#397e80;color:#fff;padding:10px 16px;cursor:pointer}.commerce-card button:disabled{opacity:.5;cursor:not-allowed}.commerce-card a,.commerce-dialog a{color:#28696a;text-underline-offset:4px}.commerce-row{display:flex;gap:12px;flex-wrap:wrap;align-items:center;justify-content:space-between}.commerce-status{background:#eaf5f2;padding:6px 12px;border-radius:20px;font-size:13px}.commerce-balance{display:block;font-size:40px;margin:18px 0;color:#276c6e}.commerce-balance small{font-size:16px}.commerce-notice{background:#f2f6f5;padding:14px;border-inline-start:3px solid #50afb1;line-height:1.9}.commerce-card .commerce-check{display:flex;align-items:center;gap:10px}.commerce-check input{width:18px;height:18px}.commerce-dialog{border:0;border-radius:20px;max-width:540px;width:calc(100% - 48px);max-height:85vh;padding:28px;box-shadow:0 20px 90px #0003;direction:rtl;color:#203737}.commerce-dialog::backdrop{background:#17323299}.commerce-close{float:left}.commerce-bank{background:#edf6f4;padding:18px;border-radius:12px;display:grid;gap:10px;text-align:center;margin:20px 0}.commerce-bank strong{font-size:25px;letter-spacing:2px}.commerce-amount{font-size:24px;font-weight:bold}progress{width:100%;height:14px;accent-color:#50afb1}button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #2f7779;outline-offset:3px}@media(max-width:760px){.commerce-grid{grid-template-columns:1fr}.commerce-card{padding:18px}.commerce-dialog{padding:20px}.commerce-bank strong{font-size:21px}}

/* Compact responsive purchase history: one order per row. */
.commerce-history{display:grid;gap:9px}
.commerce-history-item{border:1px solid #dce7e6;border-radius:12px;background:#fff;padding:12px 14px;min-width:0}
.commerce-history-main{display:grid;grid-template-columns:minmax(105px,1fr) auto minmax(145px,1fr) auto;align-items:center;gap:10px}
.commerce-history-main strong,.commerce-history-main small,.commerce-history-price{min-width:0;overflow-wrap:anywhere}
.commerce-history-main small{font-size:12px;color:#5a666b}
.commerce-history-price{font-size:14px}
.commerce-history-actions{display:flex;gap:9px;flex-wrap:wrap;align-items:center;justify-content:flex-end;margin-top:8px}
.commerce-history-actions button{font-size:13px;padding:6px 11px}
.commerce-history-actions a{font-size:13px}
.commerce-history-item [data-msg]:empty{display:none}
.commerce-history-buyer{margin:7px 0;font-size:13px}
.commerce-history-review{margin-top:12px;border-top:1px solid #e5eded;padding-top:8px}
.commerce-history-review label{margin:8px 0}
@media(max-width:760px){
 .commerce-history-item{padding:10px 12px}
 .commerce-history-main{grid-template-columns:minmax(0,1fr) auto;gap:5px 10px}
 .commerce-history-main strong{font-size:15px}
 .commerce-history-main .commerce-status{justify-self:end;font-size:11px;padding:4px 9px}
 .commerce-history-price{font-size:13px}
 .commerce-history-main small{justify-self:end;text-align:left;font-size:11px}
 .commerce-history-actions{margin-top:6px}
 .commerce-history-actions button{padding:6px 10px;font-size:12px}
}

/* Wallet: never visually mix pending bank-transfer orders with credited ledger. */
.wallet-balance-label{font-size:14px;font-weight:700;margin:0;color:#36575b}
.wallet-balance-card .commerce-balance{font-size:clamp(32px,7vw,40px);margin:16px 0;line-height:1.25}
.wallet-pending{background:#f9fbfb;border-color:#afc8c7}
.wallet-pending h2,.wallet-history-title{font-size:clamp(19px,4vw,24px);line-height:1.5;margin:0 0 12px}
.wallet-pending-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 14px;padding:12px 0;border-top:1px solid #dfe8e7;align-items:center}
.wallet-pending-row>*{min-width:0;overflow-wrap:anywhere}
.wallet-pending-row>span{font-size:14px;text-align:left}
.wallet-pending-row small{font-size:12px;color:#52636a}
.wallet-pending-status{color:#755d2d!important;font-weight:700}
.wallet-history-title{margin-top:28px}
.wallet-history-hint{font-size:13px;color:#58666b;line-height:1.85}
.wallet-credit-history{display:grid;gap:12px}
.wallet-credit-history .commerce-card{margin-bottom:0;padding:16px}
.wallet-history-main{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap}
.wallet-history-main strong{font-size:15px;min-width:0;overflow-wrap:anywhere}
.wallet-history-delta{font-size:15px;white-space:nowrap;font-variant-numeric:tabular-nums}
.wallet-history-meta{display:flex;gap:8px 20px;justify-content:space-between;flex-wrap:wrap;color:#59676e;font-size:12px;margin-top:12px;line-height:1.8}
.wallet-history-meta span{overflow-wrap:anywhere}
@media(max-width:760px){
 .wallet-pending-row{grid-template-columns:1fr;gap:4px}
 .wallet-pending-row>span{text-align:right}
 .wallet-history-main{align-items:flex-start}
 .wallet-history-meta{flex-direction:column;gap:4px}
}

/* Compact wallet: clear chronology and readable Persian text on mobile.
   This component intentionally avoids the decorative heading font. */
.wallet-view,.wallet-view *{box-sizing:border-box}
.wallet-view{font:14px/1.75 Tahoma,'Segoe UI',Arial,sans-serif;color:#27333a;max-width:100%;overflow-wrap:break-word}
.wallet-view .wallet-page-title{margin:0 0 14px;padding-bottom:10px}
.wallet-view .wallet-page-title h1{font:600 21px/1.5 Tahoma,'Segoe UI',Arial,sans-serif}
.wallet-view .wallet-summary{padding:14px 16px;border:1px solid #d6e3e2;border-radius:12px;background:#fff;display:grid;gap:6px}
.wallet-view .wallet-summary>span{font-weight:600;font-size:13px}
.wallet-view .wallet-summary>strong{display:block;color:#246e70;font:700 30px/1.4 Tahoma,'Segoe UI',Arial,sans-serif}
.wallet-view .wallet-summary>strong small{font-size:14px;font-weight:400;color:#46555b}
.wallet-view .wallet-summary>small{font-size:12px;color:#626f77}
.wallet-view .wallet-section{border:1px solid #e1e8e9;border-radius:12px;padding:11px 15px;margin-top:14px;background:#fff}
.wallet-view .wallet-section.wallet-pending{background:#f8faf9;border-color:#c7d7d8}
.wallet-view .wallet-section-heading{display:flex;justify-content:space-between;align-items:center;gap:8px 12px;flex-wrap:wrap;margin-bottom:5px}
.wallet-view .wallet-section-heading h2{font:600 16px/1.5 Tahoma,'Segoe UI',Arial,sans-serif;margin:0}
.wallet-view .wallet-pending-count{font-size:12px;color:#806022}
.wallet-view .wallet-history-order{font-size:11px;color:#697880}
.wallet-view .wallet-entry{display:grid;gap:6px;padding:11px 0;border-top:1px solid #e7eded}
.wallet-view .wallet-entry-top{display:flex;gap:8px;justify-content:space-between;align-items:center}
.wallet-view .wallet-entry-top strong{font-size:13px;font-weight:600;min-width:0}
.wallet-view .wallet-entry-number{font-size:14px;font-weight:700;color:#246e70;white-space:nowrap;direction:rtl;unicode-bidi:isolate}
.wallet-view .wallet-entry-bottom{display:flex;justify-content:space-between;align-items:center;gap:5px 16px;flex-wrap:wrap;color:#67747c;font-size:11px}
.wallet-view .wallet-entry-bottom time{white-space:nowrap;direction:ltr;unicode-bidi:isolate;color:#485e67}
.wallet-view .wallet-plain-link{display:inline-block;margin-top:9px;color:#216f72;font-size:12px;text-decoration:underline;text-underline-offset:3px}
.wallet-view .wallet-buy-link{margin:15px 0 5px}
.wallet-view .wallet-empty{font-size:13px;color:#697780;margin:8px 0}
@media(max-width:600px){
 .wallet-view .wallet-summary{padding:12px}
 .wallet-view .wallet-summary>strong{font-size:26px}
 .wallet-view .wallet-section{padding:10px 12px}
 .wallet-view .wallet-entry-bottom{display:grid;gap:3px}
 .wallet-view .wallet-entry-top{align-items:flex-start}
 .wallet-view .wallet-entry-number{font-size:13px}
}
