@font-face{font-family:PlexAr;src:url('/fonts/ibm-plex-sans-arabic-400.ttf')}@font-face{font-family:PlexAr;src:url('/fonts/ibm-plex-sans-arabic-700.ttf');font-weight:700}
:root{color-scheme:dark;font-family:PlexAr,Tahoma,Arial,sans-serif;color:#f4f1e9;background:#080f19;--gold:#edc17d;--line:#334255;--soft:#adbece}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0;line-height:1.72;background:radial-gradient(ellipse at 83% 0%,#3e2c1a48 0,transparent 36%),#080f19}a{color:inherit;text-decoration:none}a:hover{color:var(--gold)}button,input,select,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.5}.shell{width:min(1340px,calc(100% - 38px));margin-inline:auto}.skip{position:absolute;top:-100px;z-index:99;background:#fff;color:#000;padding:10px}.skip:focus{top:0}.top{border-bottom:1px solid #d4aa6845;background:#0c1420}.top-inner{min-height:85px;display:flex;align-items:center;justify-content:space-between;gap:22px}.brand{display:flex;align-items:center;gap:12px;font-family:Arial,sans-serif;letter-spacing:1.4px}.brand img{width:58px;height:58px;object-fit:contain;background:#050505;border-radius:8px}.brand strong{display:block;font-size:1.1rem}.brand small{display:block;font:400 .7rem PlexAr,sans-serif;letter-spacing:0;color:var(--soft)}nav{display:flex;gap:17px;flex-wrap:wrap;font-size:.85rem}.top nav{color:#c4cfda}.edition{border:1px solid #776040;color:#e9bd79;border-radius:30px;font:700 .68rem Arial,sans-serif;letter-spacing:1.5px;padding:8px 11px}.hero{display:flex;justify-content:space-between;align-items:center;gap:35px;padding:46px 0 29px}.hero h1{font-size:clamp(1.8rem,4.1vw,3.35rem);line-height:1.32;max-width:920px;margin:6px 0 16px}.hero h1 em{display:block;color:var(--gold);font-style:normal}.hero p{font-size:.97rem;color:var(--soft);max-width:740px}.hero-logo{width:clamp(110px,14vw,185px);aspect-ratio:1;object-fit:contain;filter:drop-shadow(0 0 25px #efb86136)}.kicker{color:#ddad68;letter-spacing:2px;font:700 .75rem Arial,sans-serif}.chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:15px}.chips span{padding:5px 11px;background:#3e302133;border:1px solid #9974436e;border-radius:50px;font-size:.75rem;color:#f1d3a4}.privacy-note{padding:13px 18px;border:1px solid #56644c;background:#15241e;border-radius:13px;display:flex;gap:12px;align-items:start;color:#d8e9d6;margin-bottom:23px}.privacy-note p{margin:0;font-size:.84rem}.privacy-note a{color:#f1cf99;text-decoration:underline}.layout{display:grid;grid-template-columns:270px minmax(0,1fr);gap:22px;align-items:start}.menu{padding:18px;background:#121e2e;border:1px solid #2c3c52;border-radius:18px;position:sticky;top:14px}.menu h2{font-size:1rem;margin:0 5px 15px}.menu button{width:100%;display:flex;align-items:center;gap:10px;text-align:right;background:transparent;border:1px solid transparent;border-radius:10px;color:#c6d1df;padding:12px 9px;margin-bottom:5px}.menu button .symbol{font:700 1.5rem Arial,sans-serif;color:#e1b470;width:26px;text-align:center}.menu button span:nth-child(2){font-weight:700;font-size:.88rem}.menu button small{display:block;color:#91a5b7;font-weight:400;font-size:.71rem}.menu button:hover{background:#233247}.menu button.selected{background:#4f391f;border-color:#be8743;color:#ffebcc}.menu button.selected small{color:#f0cf9e}.menu-foot{font-size:.73rem;color:#a3b6c8;margin-top:19px;border-top:1px solid #3d4759;padding-top:12px}.panels{min-width:0}.panel{display:grid;gap:18px}.heading h2{font-size:clamp(1.35rem,2.6vw,1.8rem);margin:3px 0 5px}.heading p{margin:0;color:#b2c1cf;font-size:.86rem}.card{background:#142133;border:1px solid #344359;border-radius:18px;padding:clamp(17px,2.7vw,28px);display:grid;gap:17px}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:15px}label{display:grid;gap:6px;color:#c9d3e1;font-size:.84rem}input,select,textarea{width:100%;min-width:0;color:#fff;background:#0d1724;border:1px solid #506078;border-radius:10px;padding:10px 12px;outline:0}input:focus,select:focus,textarea:focus{border-color:var(--gold);box-shadow:0 0 0 3px #ebb76935}input[type="range"]{padding:9px 0}textarea{resize:vertical}.btn{display:inline-flex;align-items:center;justify-content:center;padding:10px 17px;border-radius:10px;font-size:.85rem;font-weight:700;border:1px solid transparent;min-height:43px;white-space:normal}.btn.gold{color:#22180a;background:linear-gradient(135deg,#f6d698,#d8a458)}.btn.secondary{background:#233146;border-color:#596981;color:#f5f7fc}.buttons,.wrap-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.between{justify-content:space-between}.disabled-link{pointer-events:none;opacity:.5}.total strong{color:#f5c980;font:700 1.5rem Arial,sans-serif;display:block;direction:ltr;text-align:right}.table-wrap{max-width:100%;overflow:auto}table{width:100%;border-collapse:collapse;min-width:520px;text-align:right}td,th{border-bottom:1px solid #39495f;padding:10px 6px;font-size:.83rem}th{color:#aabed3}td input{padding:7px 8px;min-width:75px}td .del-row{background:#552731;border:1px solid #9d485c;color:#ffe1e1;border-radius:8px;padding:5px 9px}.message{font-size:.84rem;color:#edc17d;margin:0;min-height:20px}.footnote{font-size:.72rem;color:#acbbca}.image-result{border:1px dashed #596a7c;border-radius:12px;display:grid;place-items:center;min-height:80px}.image-result img{max-width:100%;max-height:400px;object-fit:contain;margin:15px}.qr-result{background:#fff;border-radius:12px;padding:15px;width:fit-content;max-width:100%;margin:auto}.qr-result canvas{width:min(330px,100%);height:auto;display:block}.pdf-preview{width:100%;height:460px;border:1px solid #52647c;border-radius:12px;background:#fff}.cross-promo{margin:32px 0 50px;padding:26px;border:1px solid #795935;border-radius:18px;background:#251e18;display:flex;justify-content:space-between;align-items:center;gap:20px}.cross-promo h2{margin:0 0 6px;font-size:1.25rem}.cross-promo p{margin:0;color:#dfc6aa;font-size:.84rem}.footer{border-top:1px solid #253449;padding:22px 0;color:#bac7d5}.footer-inner{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;font-size:.78rem}.print-root{display:none}.doc-paper{background:#fff;color:#141414;direction:rtl;text-align:right;width:100%;min-height:230mm;padding:18mm;font-family:Tahoma,Arial,sans-serif;font-size:12pt;line-height:1.85}.doc-head{display:flex;justify-content:space-between;gap:14px;align-items:center;border-bottom:2px solid #222;padding-bottom:10px;margin-bottom:20px}.doc-head h1{font-size:19pt;margin:0}.doc-paper h2{text-align:center;text-decoration:underline;font-size:16pt;margin:25px 0}.doc-paper p{white-space:pre-wrap}.doc-table{width:100%;border-collapse:collapse;min-width:0}.doc-table th,.doc-table td{border:1px solid #555;color:#111;font-size:11pt;padding:7px}.doc-total{text-align:left;font-size:18pt;font-weight:700;padding-top:15px}.doc-sign{text-align:left;margin-top:55px}.doc-notes{margin-top:30px}.doc-img-page{page-break-after:always;display:flex;align-items:center;justify-content:center;min-height:252mm;break-after:page}.doc-img-page:last-child{page-break-after:auto;break-after:auto}.doc-img-page img{max-width:100%;max-height:245mm;object-fit:contain}.doc-watermark{font-size:9pt;color:#666;padding-top:20px}.print-root[hidden]{display:none!important}@media(max-width:960px){.layout{grid-template-columns:1fr}.menu{position:static;display:flex;flex-wrap:wrap;gap:7px}.menu h2{width:100%;margin-bottom:4px}.menu button{width:auto;flex:1 1 170px;border:1px solid #3c4b5c}.menu-foot{width:100%}.edition{display:none}}@media(max-width:640px){.shell{width:min(100% - 24px,1340px)}.top-inner{flex-wrap:wrap;padding:10px 0}.top nav{gap:12px}.hero{padding:24px 0;gap:10px}.hero-logo{width:90px}.formgrid{grid-template-columns:1fr}.cross-promo{display:block}.cross-promo .btn{margin-top:15px}.card{padding:15px}.buttons .btn{flex:1}.doc-paper{padding:10mm}.privacy-note{padding:11px}}@media print{@page{size:A4;margin:10mm}html,body{background:#fff!important;color:#111!important}body>*:not(.print-root){display:none!important}.print-root{display:block!important;position:static!important;width:100%!important}.doc-paper{width:100%!important;min-height:0!important;padding:0!important;box-shadow:none!important}.doc-paper .doc-img-page{min-height:266mm}.print-root p{page-break-inside:avoid}a[href]:after{content:none!important}}

/* Print-first business invoice; PDF image printing remains unchanged. */
.invoice-paper{font-family:PlexAr,Tahoma,Arial,sans-serif;font-size:10.5pt;line-height:1.65;color:#172032;direction:rtl;text-align:right}
.invoice-header{display:flex;align-items:start;justify-content:space-between;gap:18px;padding:0 0 18px;border-bottom:3px solid #a27331;margin-bottom:23px}
.invoice-issuer{min-width:0;max-width:68%}
.invoice-overline{display:block;color:#6b7280;font-size:8pt;letter-spacing:.045em;font-weight:700;margin-bottom:6px}
.invoice-issuer h1{font-size:20pt;line-height:1.4;margin:0;overflow-wrap:anywhere}
.invoice-type{text-align:left;flex:none;display:grid;gap:3px;align-content:start}
.invoice-type strong{color:#80551f;font-size:22pt;line-height:1.3}
.invoice-type small{font-size:8.5pt;color:#5e6670;font-weight:700;direction:ltr}
.invoice-details{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 18px;margin-bottom:23px}
.invoice-detail{min-height:58px;background:#f7f8fa;border:1px solid #d6dae0;border-radius:6px;padding:8px 12px;min-width:0}
.invoice-detail span{display:block;font-size:8.5pt;color:#4c5767;margin-bottom:3px}
.invoice-detail strong{display:block;font-size:10.5pt;font-weight:700;overflow-wrap:anywhere;white-space:pre-wrap}
.invoice-section-title{font-size:12pt!important;text-align:right!important;text-decoration:none!important;margin:6px 0 9px!important;color:#233144}
.invoice-table{table-layout:fixed;width:100%;direction:rtl;text-align:right;margin:0 0 15px;border:1px solid #c6cbd3}
.invoice-table th,.invoice-table td{border:0;border-bottom:1px solid #d7dce3;padding:10px 9px;color:#172032;font-size:9.5pt;vertical-align:top;overflow-wrap:anywhere}
.invoice-table thead th{background:#e9edf1!important;color:#182333;font-weight:700;border-bottom:2px solid #6c7a8b}
.invoice-table tbody tr:nth-child(even) td{background:#f7f9fb!important}
.invoice-table th:first-child,.invoice-table td:first-child{width:7%;text-align:center}
.invoice-table th:nth-child(2),.invoice-table td:nth-child(2){width:37%}
.invoice-table th:nth-child(3),.invoice-table td:nth-child(3){width:12%;text-align:center}
.invoice-table th:nth-child(4),.invoice-table td:nth-child(4),.invoice-table th:nth-child(5),.invoice-table td:nth-child(5){width:22%;text-align:left;direction:ltr;white-space:nowrap}
.invoice-totals{margin:14px 0 15px auto;max-width:320px;border:1px solid #cfd5dc;border-radius:7px;overflow:hidden;break-inside:avoid}
.invoice-amount{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:7px 12px;border-bottom:1px solid #e1e5eb}
.invoice-amount strong{direction:ltr;white-space:nowrap;font-family:Arial,Tahoma,sans-serif;font-size:10pt}
.invoice-amount:last-child{border:0}
.invoice-final{border-top:2px solid #a27331;background:#faf5eb!important;font-size:12pt;font-weight:700;color:#1b2430}
.invoice-final strong{font-size:13pt}
.invoice-notes{border-right:3px solid #a27331;background:#f8f9fb;padding:9px 14px;margin:22px 0;break-inside:avoid}
.invoice-notes strong{font-size:10pt}
.invoice-notes p{white-space:pre-wrap;margin:4px 0 0;font-size:9.5pt;overflow-wrap:anywhere}
.invoice-signatures{display:flex;justify-content:space-between;gap:20px;margin-top:50px;padding-bottom:14px;break-inside:avoid}
.invoice-signatures>div{display:grid;gap:13px;min-width:0;font-weight:700;font-size:9pt}
.invoice-signatures>div>span:last-child{font:10pt Arial,sans-serif;color:#596273}
.invoice-footer{border-top:1px solid #d7dce3;padding-top:12px;color:#69727d;text-align:center;font-size:8pt;margin-top:26px}
@media print{
  @page{size:A4;margin:8mm}
  .print-root .invoice-paper{font-size:10.5pt;min-height:0!important;max-width:none!important;width:100%!important;padding:0!important;margin:0!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .invoice-paper .invoice-header,.invoice-paper .invoice-details{break-inside:avoid}
  .invoice-paper .invoice-table{break-inside:auto}
  .invoice-paper .invoice-table thead{display:table-header-group}
  .invoice-paper .invoice-table tr{break-inside:avoid;page-break-inside:avoid}
  .invoice-paper .invoice-totals,.invoice-paper .invoice-signatures{page-break-inside:avoid}
}
@media(max-width:600px){.invoice-details{grid-template-columns:1fr}.invoice-paper{font-size:10pt}.invoice-type strong{font-size:16pt}}


/* HOTFIX: Chrome and some printer drivers may omit CSS @page margins.
   Do not rely on the page margins alone; the printable invoice owns a
   persistent inner safety gutter on BOTH sides of the sheet. */
@media print {
  .print-root,
  .print-root .invoice-paper {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
    overflow: visible !important;
  }
  .print-root .invoice-paper {
    margin: 0 !important;
    padding: 9mm 12mm 12mm !important;
  }
  .invoice-paper .invoice-header,
  .invoice-paper .invoice-details,
  .invoice-paper .invoice-table,
  .invoice-paper .invoice-totals,
  .invoice-paper .invoice-signatures,
  .invoice-paper .invoice-footer {
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
  .invoice-paper .invoice-issuer {
    min-width: 0 !important;
    overflow-wrap: anywhere;
  }
  .invoice-paper .invoice-header {
    gap: 10mm;
  }
  .invoice-paper .invoice-table {
    table-layout: fixed !important;
    width: 100% !important;
  }
  .invoice-paper .invoice-table th,
  .invoice-paper .invoice-table td {
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    white-space: normal !important;
  }
  .invoice-paper .invoice-table th:nth-child(4),
  .invoice-paper .invoice-table th:nth-child(5),
  .invoice-paper .invoice-table td:nth-child(4),
  .invoice-paper .invoice-table td:nth-child(5) {
    text-align: left;
    direction: ltr;
  }
}
