:root{font-family:Arial,"Noto Sans Arabic",sans-serif;color:#082753;background:#eaf5ff;font-synthesis:none;--blue:#0076ed;--navy:#073b70;--orange:#ff7909;--muted:#526882;--border:#cfdfef;--shadow:0 3px 15px #0a588212}
*{box-sizing:border-box}body{margin:0;line-height:1.5}button,input,select,textarea{font:inherit}button,a{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.48;cursor:default}a{color:#0066c8;text-decoration:none}a:hover{text-decoration:underline}svg{width:24px;height:24px;flex-shrink:0}button svg{pointer-events:none}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:3px solid #ffad55;outline-offset:3px}input,select,textarea{width:100%;min-height:51px;padding:11px 13px;border:1px solid #b6cce2;border-radius:10px;background:#fff;color:#112f53;max-width:100%}input[type=checkbox]{width:23px;min-height:23px;height:23px;accent-color:var(--blue)}input[type=file]{font-size:15px}input[type=range]{padding:0}textarea{min-height:100px;resize:vertical}label{display:block;font-weight:700;margin:0 0 7px}small,.muted{color:var(--muted);font-size:14px}.field{margin-bottom:17px}.field small{display:block;margin-top:6px}.check{display:flex;align-items:center;gap:10px;font-weight:400;min-height:45px}.check input{flex-shrink:0}.num,[type=tel],[type=email],[type=date],[type=month],[inputmode=decimal]{direction:ltr}h1,h2,h3,p{margin-top:0}h1{font-size:29px;line-height:1.2;letter-spacing:-.6px;margin-bottom:18px}h2{font-size:23px;line-height:1.25;margin-bottom:15px}h3{font-size:19px;margin-bottom:8px}p{margin-bottom:13px}header{background:linear-gradient(120deg,#064479,#075596);color:white;position:sticky;top:0;z-index:20;box-shadow:0 3px 14px #003d6330}.topbar{max-width:860px;margin:auto;display:flex;align-items:center;gap:10px;padding:13px 18px;min-height:85px}.brand{display:flex;align-items:center;gap:10px;flex:1;min-width:0}.brand img{width:48px;height:48px;object-fit:contain;border-radius:11px}.brand strong{font-size:20px;line-height:1.15;max-width:190px}.header-btn{border:1px solid #ffffff7a;color:#fff;background:#ffffff09;border-radius:12px;min-height:44px;padding:7px 11px;font-size:14px;display:flex;align-items:center;gap:5px}.back{padding:8px;border:0}.topbar>.back svg{width:28px;height:28px}main{max-width:860px;margin:0 auto;background:#fbfdff;min-height:calc(100dvh - 85px);border-radius:22px 22px 0 0;padding:24px 20px 40px;position:relative}main:focus{outline:none}.welcome{margin-bottom:23px}.welcome h1{font-size:37px;margin-bottom:5px}.welcome p{font-weight:700;color:#24466c;margin-bottom:0}.grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.tile{background:#fff;color:#062b57;border:1px solid #e1edf7;border-radius:15px;padding:22px 8px 17px;min-height:158px;box-shadow:var(--shadow);text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px}.tile:hover{border-color:#63b4fb;background:#f3faff}.tile svg{width:47px;height:47px;margin-bottom:5px;color:var(--blue);stroke-width:2}.tile.orange svg{color:var(--orange)}.tile strong{font-size:21px;line-height:1.2}.tile span{font-size:14px;color:#375778;line-height:1.3}.tile.compact{min-height:112px;padding:14px}.tile.compact svg{width:34px;height:34px}.tile.compact strong{font-size:18px}.btn{min-height:50px;padding:11px 16px;border:1px solid #9dc7ef;border-radius:10px;background:#fff;color:#0065cf;font-weight:700;display:inline-flex;align-items:center;justify-content:center;gap:8px;line-height:1.35;text-decoration:none;text-align:center}.btn:hover{background:#eff7ff;text-decoration:none}.primary{background:linear-gradient(#0487ff,#0074eb);color:white;border-color:#0075ee;box-shadow:0 3px 8px #007bed1a}.primary:hover{background:#006adc}.orange-btn{background:#fff5e9;border-color:#ffd2a3;color:#984400}.danger{color:#af2630;border-color:#e6aeb2}.wide{width:100%}.actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:14px}.actions>.btn{flex:1}.actions .tiny{flex:0 0 auto}.tiny{padding:7px 12px;min-height:44px;font-size:15px}.stack{display:flex;flex-direction:column;gap:12px}.card{background:white;border:1px solid #dce9f5;border-radius:14px;padding:18px;margin-bottom:15px;box-shadow:var(--shadow);overflow-wrap:anywhere}.row{display:flex;align-items:center;justify-content:space-between;gap:12px}.row.start{align-items:flex-start}.row .grow{flex:1;min-width:0}.row .grow strong{display:block}.row .grow small{display:block}.file-icon{color:var(--blue);background:#e5f3ff;padding:11px;border-radius:12px;display:flex}.file-icon.orange{color:#e56800;background:#fff0df}.badge{display:inline-flex;align-items:center;font-size:13px;padding:4px 10px;border-radius:30px;background:#e4f3ff;color:#075699;white-space:nowrap}.badge.pending,.badge.draft{background:#fff1d8;color:#875000}.badge.approved,.badge.issued{background:#dff5ea;color:#176840}.badge.rejected,.badge.revoked{background:#ffebec;color:#a02730}.notice{background:#edf7ff;border:1px solid #c5dff5;color:#174e7e;border-radius:11px;padding:13px 15px;margin-bottom:17px;font-size:15px}.notice.warn{background:#fff7e9;border-color:#f2d6a0;color:#6f450d}.error{color:#a51b28;background:#fff0f1;border:1px solid #efb3b8;border-radius:10px;padding:12px 14px;margin:12px 0;white-space:pre-line}.empty{text-align:center;color:#56708b;padding:34px 18px;border:1px dashed #bccfe1;border-radius:14px;margin:18px 0}.search{margin:15px 0}.tabs{display:flex;gap:8px;overflow-x:auto;margin:18px 0;padding-bottom:3px}.tabs .btn{white-space:nowrap;flex:1}.tabs .selected{background:#07559f;color:#fff;border-color:#07559f}.divider{height:1px;background:#e0eaf5;margin:23px 0}.two{display:grid;grid-template-columns:1fr 1fr;gap:13px}.three{display:grid;grid-template-columns:1fr 1fr 1fr;gap:11px}.line-card{padding:16px;background:#f8fbff;border:1px solid #d0e3f6;border-radius:13px;margin-bottom:15px}.line-title{font-size:16px;margin-bottom:12px}.total{background:#e3f2ff;border-radius:12px;padding:18px;margin-top:18px}.total .row{margin-bottom:5px}.total .grand{font-size:24px;font-weight:800;border-top:1px solid #b7d4ed;padding-top:10px;margin:10px 0 0}.fixed-actions{position:sticky;bottom:0;padding:12px 0;background:#fbfdfff5;border-top:1px solid #dde8f1;margin-top:20px;z-index:10}.fixed-actions .actions{margin:0}.login{max-width:430px;margin:22px auto}.login .logo{display:block;width:150px;height:150px;object-fit:contain;margin:0 auto 18px;border-radius:24px}.login h1{text-align:center;font-size:28px}.code{font-size:30px;letter-spacing:9px;text-align:center;font-weight:700;text-transform:uppercase}.login footer{display:flex;justify-content:center;gap:22px;flex-wrap:wrap;margin-top:24px;font-size:14px}.login .help{text-align:center;font-size:15px;color:#526b82;margin:15px 0}.loading{text-align:center;padding:50px 20px;color:#316587}.spinner{width:27px;height:27px;border:3px solid #c5def4;border-top-color:#0b78d8;border-radius:50%;animation:spin 1s linear infinite;margin:10px auto}@keyframes spin{to{transform:rotate(360deg)}}#toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);padding:13px 22px;background:#063d6f;color:#fff;border-radius:14px;max-width:calc(100% - 30px);box-shadow:0 6px 25px #00325e40;z-index:100;display:none}#toast.show{display:block}dialog{border:0;padding:23px;border-radius:18px;width:min(94vw,560px);max-height:88dvh;color:#123756;box-shadow:0 20px 80px #00183560}dialog::backdrop{background:#00294c88}.preview-dialog{width:min(98vw,950px);padding:12px}.preview-dialog iframe{width:100%;height:70dvh;border:1px solid #cbd8e5;background:#eee}.preview-image{max-width:100%;max-height:65dvh;display:block;margin:auto}.signature-canvas{background:#fff;border:2px dashed #adcce7;border-radius:12px;width:100%;height:190px;touch-action:none}.signature-preview{border:1px solid #dae4ee;max-width:240px;max-height:130px;padding:10px;display:block;margin:12px auto;background:white}.pdf-stage{position:relative;max-width:100%;width:100%;background:white;touch-action:none;border:1px solid #abc6df;overflow:hidden;margin:15px auto}.pdf-stage canvas{width:100%;display:block}.seal-overlay{position:absolute;border:2px dashed #0078df;background:#c2e5ffbd;color:#074a83;border-radius:4px;min-height:55px;padding:4px;text-align:center;font-size:12px;cursor:move;touch-action:none;user-select:none}.seal-overlay img{width:100%;max-height:65px;object-fit:contain;display:block}.qr svg{width:210px;height:210px}.mono{font-family:monospace;overflow-wrap:anywhere;direction:ltr}.big-price{font-size:34px;font-weight:bold;margin:14px 0;color:#055498}.status-line{font-size:15px}.section-label{font-size:14px;text-transform:uppercase;letter-spacing:1px;color:#547393;margin:20px 0 10px}.setup{max-width:670px;margin:25px auto;padding:26px;background:#fff;border-radius:18px;border:1px solid #d6e5f5}.setup img{width:75px;border-radius:16px}.setup pre{white-space:pre-wrap;overflow-wrap:anywhere}.hidden,[hidden]{display:none!important}.footer-link{text-align:center;margin-top:23px}.pill-row{display:flex;gap:7px;flex-wrap:wrap}.pill-row .btn{min-height:40px;padding:6px 11px}.suggestions{display:flex;flex-direction:column;gap:5px;margin-top:5px}.suggestion{border:1px solid #c5ddf3;background:#ecf7ff;color:#194f7c;text-align:start;padding:10px;border-radius:8px;min-height:44px}
[dir=rtl] .back svg{transform:rotate(180deg)}[dir=rtl] h1{letter-spacing:0}[dir=rtl] .code{direction:ltr}[dir=rtl] .brand strong{font-size:18px}
@media(min-width:700px){main{padding:30px 34px 45px}.home-grid{grid-template-columns:repeat(4,1fr)}.tile{min-height:180px}.tile strong{font-size:20px}.list-grid{display:grid;grid-template-columns:1fr 1fr;gap:16px}.list-grid .card{margin:0}.topbar{padding-left:34px;padding-right:34px}.two-lg{display:grid;grid-template-columns:1fr 1fr;gap:20px}}
@media(max-width:370px){main{padding:20px 12px 30px}.topbar{padding:10px}.brand strong{font-size:17px}.brand img{width:39px;height:39px}.header-btn{padding:6px 8px}.tile{min-height:153px}.tile strong{font-size:19px}.three{grid-template-columns:1fr 1fr}.three>.field:last-child{grid-column:span 2}}
@media(prefers-reduced-motion:reduce){*{animation:none!important;scroll-behavior:auto!important}}
.field,input,select,textarea{min-width:0}.two{grid-template-columns:repeat(2,minmax(0,1fr))}.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.home-grid .tile{min-height:135px;padding:13px 8px;gap:4px}.home-grid .tile svg{width:39px;height:39px;margin-bottom:2px}.home-grid .tile strong{font-size:20px}.welcome{margin-bottom:17px}.welcome h1{font-size:32px}
@media(max-width:370px){.three{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:699px) and (max-height:740px){.home-grid .tile{min-height:112px;padding:10px 6px}.home-grid .tile span{font-size:12px}.home-grid .tile svg{width:31px;height:31px}.home-grid .tile strong{font-size:18px}.welcome h1{font-size:29px}.welcome{margin-bottom:12px}}
@media(max-width:699px){.topbar{padding:12px;gap:8px}.brand{gap:8px}.brand img{width:44px;height:44px}.topbar>.back{padding:6px;max-width:40px}.brand strong{font-size:19px}}
