:root{font-family:Tahoma,Arial,sans-serif;color:#252a34;background:#f4f5f7;font-synthesis:none;text-rendering:optimizeLegibility}*{box-sizing:border-box}body{margin:0}.app-shell{min-height:100vh}.top-header{height:82px;background:#fff;border-bottom:1px solid #e6e8ed;display:flex;align-items:center;gap:13px;padding:0 max(24px,calc((100vw - 1440px)/2));position:sticky;top:0;z-index:10}.brand-mark{width:46px;height:46px;border-radius:14px;background:#30343b;color:#fff;display:grid;place-items:center;font-weight:800;font-style:italic;letter-spacing:-1px;border:3px solid #f3a32d}.top-header h1{font-size:18px;margin:0 0 4px}.top-header p{font-size:12px;color:#7b8493;margin:0}.new-btn{margin-right:auto;border:0;background:#30343b;color:#fff;padding:11px 16px;border-radius:9px;font:inherit;font-size:13px;cursor:pointer}.layout{max-width:1440px;margin:26px auto;padding:0 24px;display:grid;grid-template-columns:minmax(0,1.15fr) minmax(360px,.85fr);gap:22px;align-items:start}.editor-column{display:flex;flex-direction:column;gap:16px}.section-card{background:#fff;border:1px solid #e5e7eb;border-radius:15px;padding:20px;box-shadow:0 3px 14px #1e283706}.section-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:17px}.section-title>div{display:flex;align-items:center;gap:12px}.step{width:35px;height:35px;display:grid;place-items:center;background:#fff4e7;color:#e98227;border-radius:10px;font-weight:800;font-size:12px}.section-title h2,.preview-heading h2{font-size:15px;margin:0 0 5px}.section-title p,.preview-heading p{font-size:11px;color:#87909e;margin:0}.template-drop{border:1.5px dashed #d6dbe2;border-radius:12px;background:#fafbfc;min-height:112px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;cursor:pointer;color:#414957}.template-drop:hover{border-color:#ef9b39;background:#fffaf4}.upload-icon{width:32px;height:32px;border-radius:9px;background:#fff0dc;color:#e98227;display:grid;place-items:center;font-size:22px}.template-drop strong{font-size:13px}.template-drop span{font-size:11px;color:#8a93a1}.text-button{margin-top:9px;border:0;background:none;color:#b54738;font:inherit;font-size:11px;cursor:pointer}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.form-grid label{display:flex;flex-direction:column;gap:7px;font-size:11px;color:#596273;font-weight:700}.form-grid input,.form-grid select,.form-grid textarea{width:100%;min-width:0;border:1px solid #dfe3e9;border-radius:8px;padding:10px 11px;background:#fff;color:#252a34;font:inherit;font-size:12px;outline:none}.form-grid input:focus,.form-grid select:focus,.form-grid textarea:focus{border-color:#e99a38;box-shadow:0 0 0 3px #e99a381f}.wide{grid-column:1/-1}.between{gap:10px}.add-btn{white-space:nowrap;border:1px solid #f0c58f;background:#fff9f1;color:#b76b1b;padding:9px 12px;border-radius:8px;font:inherit;font-size:11px;cursor:pointer}.items-table-wrap{overflow-x:auto}.items-table{width:100%;border-collapse:collapse;min-width:470px}.items-table th{font-size:10px;color:#7d8795;background:#f7f8fa;padding:10px;text-align:right}.items-table td{padding:8px 5px;border-bottom:1px solid #eff0f2}.items-table input{width:100%;min-width:0;border:1px solid #e1e5eb;border-radius:7px;padding:9px 7px;font:inherit;font-size:11px;color:#30343b}.items-table td:nth-child(2),.items-table td:nth-child(3){width:83px}.items-table td:nth-child(4){font-size:11px;font-weight:700;white-space:nowrap}.item-desc{min-width:130px}.remove-btn{border:0;background:#fff0ef;color:#c34235;border-radius:7px;width:28px;height:28px;font-size:19px;cursor:pointer}.check-label{flex-direction:row!important;align-items:center;gap:8px!important;padding-top:21px}.check-label input{width:16px;height:16px;accent-color:#e98b2e}.actions-row{display:flex;gap:10px}.save-btn,.pdf-btn{flex:1;border:0;border-radius:9px;padding:13px;font:inherit;font-size:13px;font-weight:700;cursor:pointer}.save-btn{background:#fff;color:#30343b;border:1px solid #d8dde5}.pdf-btn{background:linear-gradient(120deg,#f3a52d,#e8792d);color:#fff}.pdf-btn:disabled{opacity:.6;cursor:wait}.notice{padding:11px 14px;background:#eef8f0;border:1px solid #d4ead8;color:#28733b;border-radius:9px;font-size:12px}.saved-card{margin-bottom:24px}.empty-saved{font-size:12px;color:#8a93a1}.saved-list{display:flex;flex-direction:column}.saved-row{display:flex;align-items:center;gap:10px;padding:11px 0;border-bottom:1px solid #eff0f2;font-size:11px}.saved-row>div{display:flex;flex-direction:column;gap:4px;flex:1;min-width:0}.saved-row span{color:#8992a0}.saved-row>b{white-space:nowrap}.saved-row button{border:1px solid #dfe3e9;background:#fff;border-radius:7px;padding:6px 9px;font:inherit;cursor:pointer}.saved-row .delete-saved{color:#b54738}.preview-column{position:sticky;top:100px;min-width:0}.preview-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 13px}.live-dot{font-size:10px;color:#28733b;background:#e9f7ed;border-radius:20px;padding:5px 9px}.preview-scroll{overflow:auto;background:#e9ebef;border:1px solid #e0e3e8;border-radius:13px;padding:14px;max-height:calc(100vh - 180px)}.invoice-paper{position:relative;width:100%;aspect-ratio:210/297;background:#fff;background-size:100% 100%;background-position:center;background-repeat:no-repeat;overflow:hidden;box-shadow:0 3px 12px #141e2d1a;color:#242a34}.invoice-overlay{position:absolute;top:0;right:0;bottom:0;left:0;padding:8%;display:flex;flex-direction:column;font-family:Tahoma,Arial,sans-serif}.invoice-topline{display:flex;justify-content:space-between;align-items:center;border-bottom:2px solid #e88b2d;padding-bottom:12px;font-size:clamp(9px,1.1vw,15px);font-weight:800}.invoice-topline span{letter-spacing:2px;color:#e98227}.invoice-meta{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:18px 0 20px}.invoice-meta>div{display:flex;flex-direction:column;gap:5px;min-width:0}.invoice-meta small{font-size:clamp(6px,.7vw,9px);color:#87909e}.invoice-meta b{font-size:clamp(8px,1vw,13px);overflow-wrap:anywhere}.invoice-meta span{font-size:clamp(7px,.8vw,10px);color:#657080}.preview-table{width:100%;border-collapse:collapse;font-size:clamp(6px,.75vw,10px)}.preview-table th{background:#30343b;color:#fff;padding:9px 5px;text-align:right}.preview-table td{padding:9px 5px;border-bottom:1px solid #e7e9ed;overflow-wrap:anywhere}.preview-table th:first-child,.preview-table td:first-child{width:45%}.totals{width:58%;margin:16px 0 0 auto;display:flex;flex-direction:column;gap:8px;font-size:clamp(7px,.8vw,10px)}.totals>div{display:flex;justify-content:space-between;gap:8px}.totals span{color:#6e7887}.totals .grand-total{border-top:1px solid #dfe3e9;padding-top:10px;margin-top:3px;font-size:clamp(9px,1.1vw,14px);font-weight:800}.grand-total b{color:#df7e28}.invoice-notes{margin-top:20px;font-size:clamp(7px,.8vw,10px)}.invoice-notes p{color:#667080;white-space:pre-wrap}.invoice-footer{margin-top:auto;border-top:1px solid #e6e8ec;padding-top:10px;text-align:center;font-size:clamp(6px,.7vw,9px);color:#8992a0}.no-template{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:8px;color:#8a93a1}.brand-watermark{font-size:52px;font-weight:900;font-style:italic;color:#d9dce1;border:5px solid #e99a38;border-radius:50%;padding:16px 22px}.no-template strong{font-size:13px}.no-template span{font-size:10px}.template-hint{font-size:10px;line-height:1.7;color:#858e9c;margin:10px 2px 0}@media (max-width:1000px){.layout{grid-template-columns:1fr}.preview-column{position:static;grid-row:1}.preview-scroll{max-height:none}.invoice-paper{max-width:620px;margin:auto}.invoice-topline{font-size:13px}.invoice-meta small{font-size:9px}.invoice-meta b{font-size:12px}.invoice-meta span,.preview-table,.totals{font-size:10px}.totals .grand-total{font-size:14px}.invoice-notes{font-size:10px}.invoice-footer{font-size:9px}}@media (max-width:600px){.top-header{height:70px;padding:0 13px}.top-header h1{font-size:14px}.top-header p{font-size:10px}.brand-mark{width:39px;height:39px;font-size:13px}.new-btn{font-size:10px;padding:9px}.layout{padding:0 10px;margin:13px auto;gap:13px}.section-card{padding:14px;border-radius:12px}.section-title h2{font-size:13px}.section-title p{font-size:10px}.step{width:30px;height:30px}.form-grid{gap:10px}.form-grid input,.form-grid select,.form-grid textarea{font-size:12px;padding:10px 8px}.saved-row{flex-wrap:wrap}.saved-row>div{min-width:45%}.preview-scroll{padding:7px}.invoice-overlay{padding:7%}.invoice-meta{margin:12px 0}.preview-table th,.preview-table td{padding:6px 3px}.totals{margin-top:10px;width:65%}.add-btn{font-size:10px;padding:8px}.actions-row{position:sticky;bottom:8px;z-index:5;background:#f4f5f7eb;padding:7px;border-radius:12px;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}}.preview-scroll{background:#dfe2e7;padding:16px}.invoice-paper{aspect-ratio:210/297;background:#fff;color:#111;box-shadow:0 5px 20px #00000024}.invoice-page-content{position:absolute;top:0;right:0;bottom:0;left:0;padding:5.2% 4.7% 4.5%;font-family:Tahoma,Arial,sans-serif;display:flex;flex-direction:column}.invoice-watermark{position:absolute;left:50%;top:48%;width:72%;transform:translate(-50%,-50%);opacity:.13;pointer-events:none}.invoice-watermark img{width:100%;height:auto}.official-header{height:10%;display:grid;grid-template-columns:1fr 18% 1fr;align-items:center;gap:2%;direction:ltr;position:relative;z-index:1}.brand-english{font-size:clamp(7px,.95vw,13px);font-weight:800;line-height:1.25;white-space:nowrap}.brand-english span{font-size:.78em}.official-logo{width:100%;max-height:100%;object-fit:contain}.brand-arabic{text-align:center;font-size:clamp(11px,1.45vw,20px);font-weight:900;line-height:1.05;white-space:nowrap}.brand-arabic span{font-size:.7em}.invoice-title{text-align:center;font-size:clamp(12px,1.55vw,21px);margin:1.2% 0 2%;font-weight:900;position:relative;z-index:1}.invoice-number-date{display:flex;flex-direction:column;align-items:flex-end;gap:7px;font-size:clamp(7px,.9vw,12px);font-weight:700;position:relative;z-index:1}.bill-to{display:flex;justify-content:flex-start;gap:16px;margin-top:3%;font-size:clamp(8px,1.1vw,15px);font-weight:700;position:relative;z-index:1}.bill-to>div{display:flex;flex-direction:column;gap:3px}.bill-to span,.bill-to small{font-size:.82em}.invoice-intro{text-align:right;direction:rtl;font-size:clamp(7px,.92vw,12px);line-height:1.6;margin:2.5% 0 2%;position:relative;z-index:1}.official-table{position:relative;z-index:1;border:1px solid #222;table-layout:fixed;font-size:clamp(6px,.78vw,10.5px);background:#ffffffb8}.official-table th{background:#fffc;color:#111;border:1px solid #222;text-align:center;padding:7px 3px;font-weight:500}.official-table td{border:1px solid #333;text-align:center;padding:7px 3px;height:25px;overflow-wrap:anywhere}.official-table th:nth-child(1){width:10%}.official-table th:nth-child(2){width:49%}.official-table th:nth-child(3){width:7%}.official-table th:nth-child(4){width:16%}.official-table th:nth-child(5){width:18%}.official-table td:nth-child(2){text-align:left;padding-left:8px}.official-table tfoot td{font-weight:800;font-size:1.08em}.official-table tfoot td:first-child{text-align:center}.invoice-calculations{position:relative;z-index:1;align-self:flex-end;width:48%;display:flex;flex-direction:column;gap:5px;margin-top:8px;font-size:clamp(7px,.8vw,10px)}.invoice-calculations>div{display:flex;justify-content:space-between;gap:5px}.amount-due{border-top:1px solid #333;padding-top:6px;font-weight:900;font-size:1.12em}.invoice-notes{position:relative;z-index:1;margin-top:3%;font-size:clamp(7px,.78vw,10px);line-height:1.5}.invoice-notes p{white-space:pre-wrap;margin:4px 0}.invoice-signoff{position:relative;z-index:1;display:flex;flex-direction:column;gap:5px;align-self:flex-start;margin-top:3%;font-size:clamp(7px,.78vw,10px)}.company-stamp{position:absolute;z-index:1;left:2%;bottom:13%;width:19%;height:8%;object-fit:contain;opacity:.92}.official-footer{position:absolute;bottom:2.5%;left:4.7%;right:4.7%;border:1px solid #222;text-align:center;padding:5px 3px;font-size:clamp(7px,.82vw,11px);background:#ffffffe6}@media (max-width:1000px){.brand-english{font-size:11px}.brand-arabic{font-size:17px}.invoice-title{font-size:18px}.invoice-number-date{font-size:10px}.bill-to{font-size:13px}.invoice-intro{font-size:11px}.official-table,.invoice-calculations,.invoice-notes,.invoice-signoff{font-size:9px}.official-footer{font-size:10px}}@media (max-width:600px){.preview-scroll{padding:5px}.invoice-page-content{padding:5% 4% 4%}.brand-english{font-size:7px}.brand-arabic{font-size:11px}.invoice-title{font-size:12px}.invoice-number-date{font-size:7px}.bill-to{font-size:8px}.invoice-intro{font-size:7px}.official-table{font-size:6px}.official-table th,.official-table td{padding:4px 2px}.invoice-calculations,.invoice-notes,.invoice-signoff{font-size:6px}.official-footer{font-size:7px}}
