.doc .stampbox img{position:absolute;inset:0;width:170px}
.doc .stampbox img.sig{width:150px;top:18px;left:10px}
.doc.rtl table{direction:rtl}
.doc.rtl td.l{text-align:right}
.doc .sm td,.doc .sm th{font-size:13.5px;padding:4px 5px}
@media (max-width:760px){
  header{padding:12px 14px 0}
  .brand-logo{display:none}
  nav{overflow-x:auto;flex-wrap:nowrap}
  .tab-btn{white-space:nowrap;padding:8px 11px}
  .form-grid .w2{grid-column:auto}
}
@media (prefers-reduced-motion:reduce){*{transition:none!important}}
/* ---------- modern paper design (invoices & statements) ---------- */
.doc.modern{padding:0;font-family:"KufiAr",Arial,"Segoe UI",sans-serif;color:#14261f}
.doc.modern .mh{display:flex;justify-content:space-between;align-items:center;gap:24px;padding:26px 36px 18px;direction:ltr}
.doc.modern .mh-brand{display:flex;align-items:center;gap:16px}
.doc.modern .mh-brand img{width:112px}
.doc.modern .mh-brand .en{font-family:"Times New Roman",Times,serif;font-weight:700;font-size:25px;color:#0f5a45;letter-spacing:.4px}
.doc.modern .mh-brand .ar{white-space:nowrap;font-family:"KufiAr",sans-serif;font-weight:800;font-size:18px;color:#14261f;direction:rtl;text-align:left;margin-top:2px}
.doc.modern .mh-title{text-align:right;flex:none}
.doc.modern .t-en{white-space:nowrap;font-family:"Times New Roman",Times,serif;font-size:27px;font-weight:700;letter-spacing:3px;color:#0f5a45;line-height:1}
.doc.modern .t-ar{font-family:"KufiAr",sans-serif;font-size:18px;font-weight:800;color:#b9873f;margin:4px 0 10px}
.doc.modern .kvs{display:grid;gap:3px}
.doc.modern .kv{display:flex;direction:rtl;justify-content:flex-start;gap:10px;font-size:13.5px}
.doc.modern .kv span::after{content:":"}
.doc.modern .kv span{color:#65786e;font-weight:400}
.doc.modern .kv b{color:#14261f;font-weight:700;direction:rtl}
.doc.modern .mh-rule{height:5px;margin:0 36px;background:linear-gradient(90deg,#b9873f,#e8c98b 50%,#0f5a45)}
.doc.modern .mgreet{text-align:center;font-family:"KufiAr",sans-serif;font-weight:700;font-size:15px;color:#0f5a45;margin:12px 0 14px;direction:rtl}
.doc.modern .msec{margin:8px 36px 6px;font-weight:800;font-size:14px;color:#0f5a45;border-inline-start:4px solid #b9873f;padding-inline-start:8px;direction:ltr;text-align:left}
.doc.modern.rtl .msec{direction:rtl;text-align:right}
.doc.modern table{width:calc(100% - 72px);margin:0 36px 14px;border-collapse:separate;border-spacing:0;font-size:14px;border:1px solid #d3e0d8;border-radius:8px;overflow:hidden}
.doc.modern th{background:#0f5a45;color:#fff;border:0;border-inline-start:1px solid rgba(255,255,255,.18);padding:8px 6px;font-weight:700;font-size:13px}
.doc.modern thead tr:first-child th{border-bottom:1px solid rgba(255,255,255,.18)}
.doc.modern thead tr:last-child th{border-bottom:3px solid #b9873f}
.doc.modern td{border:0;border-bottom:1px solid #e2ebe5;border-inline-start:1px solid #edf1f6;padding:8px 6px;font-weight:600;color:#14261f;background:transparent}
.doc.modern tbody tr:nth-child(even) td{background:#f4f8f5}
.doc.modern tbody tr:last-child td{border-bottom:0}
.doc.modern td.amt{font-weight:800;color:#0f5a45}
.doc.modern td.l{text-align:left}
.doc.modern.rtl td.l{text-align:right}
.doc.modern tr.hl td{background:#fbf3e3!important;color:#0f5a45;font-weight:800;border-top:2px solid #b9873f}
.doc.modern .tot{color:#137a43}
.doc.modern .red{color:#c0271f}
.doc.modern .mbottom{display:flex;gap:24px;align-items:stretch;justify-content:space-between;margin:4px 0 0;direction:ltr}
.doc.modern.rtl .mbottom{direction:rtl}
.doc.modern .mpay{flex:1;min-width:0;align-self:stretch;display:flex;flex-direction:column}
.doc.modern .mpay .sigbox{flex:1;padding:14px 0}
.doc.modern .mpay table{width:calc(100% - 36px);margin-inline-end:0}
