.bill-start,.bill-actions{display:flex;gap:12px;flex-wrap:wrap;margin:16px 0}.bill-start button{flex:1;min-height:58px}.bill-section-title{margin:28px 0 16px}.bill-line{border:1px solid #dce0d0;border-radius:14px;padding:18px;margin:0 0 16px;min-width:0}.bill-line textarea{min-height:75px}.bill-line-numbers{display:grid;grid-template-columns:1fr 1fr;gap:16px}.bill-options{margin:22px 0}.bill-estimate{padding:20px;background:#eef0e5;border-radius:12px;font-size:22px;margin:20px 0}.bill-preview{overflow:auto;padding:12px 0 30px}.bill-paper{position:relative;box-sizing:border-box;background:white;color:#292d24;width:794px;height:1123px;padding:42px 42px 75px;margin:0 auto 24px;box-shadow:0 4px 20px #0001;font-size:14px;line-height:1.7;overflow:hidden}.bill-paper *{box-sizing:border-box}.paper-header{display:flex;justify-content:space-between;gap:24px;border-bottom:3px solid #626b48;padding-bottom:24px}.paper-header img{width:95px;height:95px;object-fit:contain}.paper-header h2{font-size:19px;margin:8px 0}.paper-header p{margin:2px 0;font-size:12px;max-width:370px;overflow-wrap:anywhere}.paper-title{display:flex;flex-direction:column;gap:10px;justify-content:center;min-width:200px}.paper-title strong{font-size:32px;color:#626b48}.paper-title span{font-size:13px}.paper-customer{display:flex;justify-content:space-between;background:#f6f5ef;padding:18px;margin:22px 0;gap:20px}.paper-customer small{color:#747a67}.paper-customer h3{font-size:18px;margin:4px 0;overflow-wrap:anywhere}.paper-customer p{margin:0;font-size:13px}.bill-paper table{width:100%;border-collapse:collapse;table-layout:fixed}.bill-paper th{background:#626b48;color:white;text-align:right;padding:10px;font-size:13px}.bill-paper td{padding:12px 10px;border-bottom:1px solid #e8e8df;vertical-align:top;font-size:13px;overflow-wrap:anywhere}.bill-paper th:first-child{width:45%}.bill-paper th:nth-child(2){width:13%}.bill-paper tr:nth-child(even){background:#fafaf7}.paper-totals{margin:20px 0 12px auto;width:330px}.paper-totals p{display:flex;justify-content:space-between;margin:0;padding:8px 12px}.paper-grand{background:#e9eddd;font-size:18px}.paper-tax-note,.paper-draft-note{font-size:12px;margin:10px 0}.paper-draft-note{font-weight:bold;border:1px dashed #8b7967;padding:10px}.paper-notes{border-top:1px solid #ddd;padding-top:14px;margin-top:16px;font-size:12px;overflow-wrap:anywhere}.paper-notes h3{font-size:14px;margin:0}.paper-notes p{margin:4px 0}.paper-footer{position:absolute;bottom:25px;right:42px;left:42px;display:flex;justify-content:space-between;border-top:1px solid #ddd;padding-top:12px;color:#626b48;font-size:12px}.bill-actions button{min-height:48px}#bill-list{margin-top:24px}@media(max-width:600px){.bottom button{padding:10px 7px!important;font-size:12px!important}.bill-actions button{flex:1 1 40%}.bill-paper{margin-right:0}.bill-line{padding:12px}.bill-line-numbers{gap:10px}.bill-start{gap:8px}}
@media print{@page{size:A4;margin:0}body{background:white!important;padding:0!important}body>header,body>nav,#toast,#dialog,#app> :not(.bill-preview){display:none!important}#app{max-width:none!important;margin:0!important;padding:0!important}.bill-preview{padding:0;overflow:visible}.bill-paper{box-shadow:none;margin:0;break-after:page;width:210mm;height:297mm}.bill-paper:last-child{break-after:auto}}

/* Keep currency and numbers separate; PDF uses the browser Arabic text renderer. */
.paper-totals{width:390px;margin:24px 0 20px auto;border:1px solid #e1e4d8;border-radius:8px;overflow:hidden}
.paper-totals p{align-items:center;gap:20px;padding:13px 16px;color:#343b2a;border-bottom:1px solid #edf0e5;font-size:14px;line-height:1.6}
.paper-totals p:last-child{border-bottom:0}.paper-totals b{font-weight:400;flex-shrink:0}
.paper-amount{display:inline-flex;direction:ltr;align-items:baseline;gap:9px;white-space:nowrap}
.paper-number{font-family:Arial,sans-serif;font-variant-numeric:tabular-nums;font-size:16px;color:#24281f}
.paper-currency{font-size:12px;font-weight:400;direction:rtl;color:#737764}
.paper-grand{background:#e9eddd}.paper-grand>span{font-weight:700}.paper-grand .paper-number{font-size:23px;font-weight:700}
.bill-paper td:not(:first-child){direction:ltr;text-align:center;white-space:nowrap}.bill-paper th:not(:first-child){text-align:center}

.bill-paper{font-family:Arial,sans-serif;font-size:15px;line-height:1.8}.paper-header h2{font-size:21px}.paper-title strong{font-size:32px}.bill-paper td{font-size:14px}.paper-notes{font-size:13px}.paper-currency{font-family:Arial,sans-serif;font-size:12px}

@font-face{font-family:SorohDocument;src:url(assets/fonts/NotoSansArabic.ttf) format("truetype");font-weight:100 900;font-display:swap}.bill-paper{font-family:SorohDocument,Arial,sans-serif}.paper-currency{font-family:SorohDocument,Arial,sans-serif}.paper-title strong{font-size:28px}.paper-header h2{font-size:19px}

/* Reference-led document: compact header, bordered service table and integrated totals. */
.bill-paper{padding:38px 42px 92px;font-family:SorohDocument,Arial,sans-serif;font-size:12px;color:#183038}
.paper-header{border:0;padding:0;margin:0 0 18px;display:flex;justify-content:space-between;align-items:flex-start;gap:25px;min-height:172px}
.paper-title{min-width:0;max-width:510px;display:block}.paper-title strong{font-family:Thmanyah,SorohDocument,sans-serif;font-size:28px;color:#626b48;display:block;margin:0 0 24px;font-weight:700;line-height:1.5}
.paper-meta p{font-size:11px;color:#183038;line-height:1.8;margin:3px 0;max-width:510px}.paper-meta b{font-weight:700}.paper-meta span{font-size:11px}.paper-draft-status{color:#777}
.paper-logo{width:130px;flex-shrink:0;text-align:center}.paper-logo img{width:130px;height:130px;object-fit:contain}
.bill-paper .paper-items{table-layout:fixed;width:100%;border-collapse:collapse;border:1px solid #b8bdba}
.bill-paper .paper-items th{font-family:Thmanyah,SorohDocument,sans-serif;background:#253b37;color:white;font-size:12px;padding:8px 5px;border:1px solid #b8bdba;text-align:center;line-height:1.5;width:auto}
.bill-paper .paper-items td{border:1px solid #b8bdba;padding:14px 6px;vertical-align:middle;color:#545b5f;font-size:12px;text-align:center;line-height:1.8;background:white;white-space:normal;direction:rtl;overflow-wrap:anywhere}
.bill-paper .paper-items td:nth-child(2){text-align:right;font-weight:500}.bill-paper .paper-items td:nth-child(1),.bill-paper .paper-items td:nth-child(3){direction:ltr}
.bill-paper .paper-items .paper-amount{display:inline-flex;direction:ltr;gap:4px;white-space:nowrap;align-items:baseline}.bill-paper .paper-items .paper-number{font-size:12px;font-weight:600;color:#545b5f}.bill-paper .paper-items .paper-currency{font-size:9px;color:#545b5f}
.bill-paper .paper-items .paper-summary td{padding:13px 7px;text-align:center;direction:rtl;font-size:12px;font-weight:600}.bill-paper .paper-items .paper-summary td:first-child{direction:rtl}.bill-paper .paper-items .paper-summary td:last-child{text-align:center}
.bill-paper .paper-items .paper-summary .paper-grand td{background:#f0f2e9;color:#263c2f;font-weight:700}.bill-paper .paper-items .paper-grand .paper-number{font-size:14px;font-weight:700;color:#263c2f}
.paper-tax-note{font-size:10px;margin:10px 0;color:#59605b;line-height:1.8}.paper-notes{border:0;padding:0;margin:6px 0;font-size:11px;line-height:1.8}.paper-notes h3{font-family:Thmanyah,SorohDocument,sans-serif;font-size:14px;color:#253b37;margin:18px 0 8px}.paper-notes p{font-size:11px;color:#545b5f;margin:0;line-height:1.8}
.paper-footer{display:block;text-align:center;bottom:23px;right:42px;left:42px;border:0;font-size:8px;font-weight:600;line-height:1.9;color:#183038;padding:0;overflow-wrap:anywhere}.paper-footer div{margin:2px 0}
