/* Professional account statements — screen header + isolated A4 output. */
.statement-print-only{display:none}
.statement-page-head{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  margin-bottom:6px;padding:7px 9px;border:1px solid var(--border-soft);
  border-inline-start:4px solid #1e7b36;border-radius:8px;background:var(--surface);
  box-shadow:0 1px 4px rgba(15,35,58,.06)
}
.statement-page-brand{display:flex;align-items:center;gap:7px;min-width:0}
.statement-page-brand img{width:28px;height:28px;object-fit:contain;border-radius:6px}
.statement-page-brand h1{font-size:13px;font-weight:900;margin:0;color:var(--text)}
.statement-page-brand p{font-size:9px;color:var(--text-dim);margin:1px 0 0}
.statement-page-meta{display:flex;gap:10px;align-items:center;flex-wrap:wrap;font-size:9.5px;color:var(--text-dim)}
.statement-page-meta b{color:var(--text);font-variant-numeric:tabular-nums}

.statement-document{
  direction:rtl;color:#142033;background:#fff;font-family:"Arial","Tahoma",sans-serif;
  width:100%;font-size:10px;font-variant-numeric:tabular-nums;
  font-feature-settings:"tnum" 1
}
.statement-document *{box-sizing:border-box}
.statement-letterhead{
  display:flex;justify-content:space-between;align-items:center;gap:18px;
  padding:11px 14px;background:#102f25;color:#fff;border-bottom:4px solid #c9972e
}
.statement-letterhead .brand{display:flex;align-items:center;gap:9px}
.statement-letterhead img{width:42px;height:42px;object-fit:contain;background:#fff;border-radius:7px;padding:2px}
.statement-letterhead h1{font-size:17px;margin:0;font-weight:900}
.statement-letterhead p{font-size:9px;margin:2px 0 0;color:#d7e8df}
.statement-doc-meta{text-align:left;line-height:1.65;font-size:9px;color:#d7e8df}
.statement-doc-meta strong{display:block;color:#fff;font-size:13px}
.statement-document-body{padding:12px 14px}
.statement-info-grid{display:grid;grid-template-columns:1.35fr 1fr 1fr 1.35fr;gap:6px;margin-bottom:7px}
.statement-info-cell{border:1px solid #dce4df;background:#f6f9f7;border-radius:5px;padding:5px 7px;min-height:39px}
.statement-info-cell span{display:block;font-size:8px;color:#61706a;font-weight:700}
.statement-info-cell b{display:block;font-size:10.5px;color:#102f25;margin-top:2px;overflow-wrap:anywhere}
.statement-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:6px;margin-bottom:8px}
.statement-summary .item{border:1px solid #dce4df;border-top:3px solid #1e7b36;border-radius:5px;padding:5px 7px;text-align:center}
.statement-summary span{display:block;font-size:8px;color:#61706a;font-weight:700}
.statement-summary b{display:block;font-size:13px;color:#102f25;margin-top:2px}
.statement-summary .closing{background:#102f25;border-color:#102f25;border-top-color:#c9972e}
.statement-summary .closing span{color:#d7e8df}.statement-summary .closing b{color:#fff}
.statement-approval{margin:0 0 7px;padding:4px 7px;border:1px solid #b8d8c1;background:#edf8f0;color:#176c32;border-radius:4px;font-size:9px;font-weight:800}
.statement-approval.pending{border-color:#ead5a1;background:#fff8e8;color:#805a08}
.statement-table{width:100%;border-collapse:collapse;table-layout:fixed}
.statement-table col.date{width:10%}.statement-table col.ref{width:11%}.statement-table col.desc{width:30%}
.statement-table col.context{width:15%}.statement-table col.money{width:11.33%}
.statement-table th{background:#163b2f;color:#fff;border:1px solid #163b2f;padding:5px 4px;text-align:center;font-size:8.5px;font-weight:800}
.statement-table td{border:1px solid #dfe5e2;padding:4px;font-size:8.7px;text-align:center;vertical-align:middle;overflow-wrap:anywhere}
.statement-table td.description{text-align:right}.statement-table td.money{direction:ltr;text-align:left;font-weight:700;white-space:nowrap}
.statement-table tbody tr:nth-child(even) td{background:#f8faf9}
.statement-table .opening td{background:#eef3f0!important;font-weight:800}
.statement-table tfoot td{background:#e4ece8;font-weight:900;color:#102f25}
.statement-empty{padding:14px!important;color:#65726d}
.statement-footer{display:grid;grid-template-columns:1fr 145px 145px;gap:18px;align-items:end;margin-top:13px;padding-top:8px;border-top:1px dashed #aebbb5;color:#65726d;font-size:8.5px}
.statement-sign{text-align:center;padding-top:22px;border-bottom:1px solid #798780;padding-bottom:3px;color:#263a31;font-weight:700}
.statement-page-number:after{content:"صفحة " counter(page)}
.statement-print-actions{display:flex;justify-content:center;gap:7px;margin:12px auto}
.statement-print-actions button{border:0;border-radius:6px;background:#1e7b36;color:#fff;padding:7px 15px;font-size:11px;font-weight:800;cursor:pointer}
.statement-print-actions button.secondary{background:#475569}

@page{size:A4 portrait;margin:9mm}
@media print{
  html,body{background:#fff!important;margin:0!important;padding:0!important;width:100%!important}
  .statement-screen-ui{display:none!important}
  .statement-print-only{display:block!important;width:100%!important;margin:0!important;padding:0!important}
  .odoo-topbar,.system-welcome-banner,.breadcrumbs,.page-title,.app-footer,.bsw-wrap,
  .statement-print-actions{display:none!important}
  .odoo-content,.page-body{padding:0!important;margin:0!important;width:100%!important;max-width:none!important}
  .statement-document{color:#000!important;print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}
  .statement-letterhead,.statement-table th,.statement-summary .closing{print-color-adjust:exact!important;-webkit-print-color-adjust:exact!important}
  .statement-table thead{display:table-header-group}.statement-table tfoot{display:table-footer-group}
  .statement-table tr{break-inside:avoid;page-break-inside:avoid}
  .statement-document-body{padding:8px 0 0}
}

@media(max-width:700px){
  .statement-page-head{align-items:flex-start;flex-direction:column}
  .statement-info-grid,.statement-summary{grid-template-columns:1fr 1fr}
}
