:root{--blue:#195db5;--line:#d8dee8;--red:#a61b2b;--canvas:#f3f6fa}*{box-sizing:border-box}html,body{background:var(--canvas);color:#172033;margin:0;font-family:Noto Naskh Arabic,Tahoma,Segoe UI,Arial,sans-serif}button,input{font:inherit}button{cursor:pointer}.shell{max-width:980px;margin:auto;padding:22px}.app-head{align-items:center;gap:14px;margin-bottom:20px;display:flex}.app-head img{object-fit:contain;width:64px;height:64px}.app-head h1,.app-head p{margin:0}.app-head p{color:#667085}.card{border:1px solid var(--line);background:#fff;border-radius:16px;padding:16px;box-shadow:0 8px 28px #1020400d}.search{gap:8px;display:flex}.search input{border:1px solid var(--line);border-radius:10px;flex:1;min-width:0;padding:11px}.primary{color:#fff;background:var(--blue);border:0;border-radius:10px;padding:10px 16px;font-weight:800}.primary:disabled{opacity:.45;cursor:not-allowed}.results,.orders{gap:8px;margin-top:12px;display:grid}.result,.order{border:1px solid var(--line);background:#fff;border-radius:10px;justify-content:space-between;align-items:center;gap:12px;padding:11px;display:flex}.result button{color:var(--blue);background:#eaf3ff;border:0;border-radius:8px;padding:8px}.tabs{gap:6px;margin:18px 0;display:flex}.tabs button{border:1px solid var(--line);background:#fff;border-radius:10px;flex:1;padding:11px;font-weight:800}.tabs button.active{color:#fff;background:var(--blue)}.badge{background:#e8eef6;border-radius:999px;padding:4px 8px;font-size:12px;font-weight:800}.badge.not_cutted{color:#991b1b;background:#fee2e2}.badge.cutted{color:#9a3412;background:#ffedd5}.badge.attelier{color:#1d4ed8;background:#dbeafe}.badge.ready{color:#166534;background:#dcfce7}.badge.archived{color:#fff;background:#374151}.order-main{flex-wrap:wrap;align-items:center;gap:10px;display:flex}.info-button{color:#1d4ed8;background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:5px 9px;font-weight:800}.order-information{background:#f8fbff;border:1px solid #bfdbfe;border-radius:10px;flex-basis:100%;gap:8px;width:100%;padding:10px;display:grid}.order-info-date{background:#dbeafe;border-radius:8px;justify-content:space-between;align-items:center;gap:10px;padding:8px 10px;display:flex}.order-info-date span{color:#475569;font-weight:800}.order-info-date strong{color:#1e3a8a}.order-info-row{border-top:1px solid #dbeafe;gap:8px;padding-top:8px;display:grid}.order-info-meta{grid-template-columns:repeat(4,minmax(0,1fr))}.order-info-material{grid-template-columns:repeat(3,minmax(0,1fr))}.order-info-support{grid-template-columns:repeat(2,minmax(0,1fr))}.order-info-single{grid-template-columns:1fr}.order-info-field{gap:2px;min-width:0;display:grid}.order-info-field span{color:#64748b;font-size:12px}.order-info-field strong{overflow-wrap:anywhere}.order small{color:#667085;display:block}.price{gap:4px;min-width:150px;display:grid}.price input{border:1px solid var(--line);border-radius:8px;width:100%;padding:8px}.missing-price-fields{background:#fff7f7;border:1px solid #fecaca;border-radius:10px;gap:7px;padding:9px;display:grid}.missing-price-fields>strong{color:#991b1b}.missing-price-fields label{gap:4px;display:grid}.missing-price-fields input{background:#fff;border-color:#fca5a5}.discount-field{gap:5px;max-width:260px;margin-top:14px;font-weight:800;display:grid}.discount-field input{border:1px solid var(--line);border-radius:8px;padding:9px}.liv-financial-fields{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:540px;margin-top:14px;display:grid}.liv-financial-fields label{border:1px solid var(--line);background:#f8fafc;border-radius:10px;gap:5px;padding:10px;font-weight:800;display:grid}.liv-financial-fields input{border:1px solid var(--line);background:#fff;border-radius:8px;min-width:0;padding:9px}.custom-lines{background:#f8fbff;border:1px dashed #93c5fd;border-radius:12px;gap:8px;margin-top:14px;padding:12px;display:grid}.custom-lines-head{justify-content:space-between;align-items:center;gap:10px;display:flex}.custom-lines-head button,.custom-line-editor button{color:#1d4ed8;background:#fff;border:1px solid #bfdbfe;border-radius:8px;padding:7px 10px;font-weight:800}.custom-line-editor{grid-template-columns:minmax(0,2fr) minmax(110px,1fr) minmax(120px,1fr) auto;gap:8px;display:grid}.custom-line-editor input{border:1px solid var(--line);border-radius:8px;min-width:0;padding:9px}.custom-line-editor button{color:#991b1b;border-color:#fecaca}.warning{color:var(--red);background:#fff0f2;border-radius:8px;margin:8px 0 0;padding:9px;font-weight:800}.toolbar{border:1px solid var(--line);background:#fffffff2;border-radius:12px;justify-content:space-between;align-items:center;gap:10px;margin-top:16px;padding:12px;display:flex;position:sticky;bottom:10px}.preview{margin-top:16px;overflow:auto}.paper{color:#111;background:#fff;width:100%;padding:7mm;font-family:Arial,sans-serif;box-shadow:0 5px 20px #10204020}.paper header{border-bottom:3px solid #111;justify-content:space-between;align-items:center;display:flex}.paper header img{object-fit:contain;width:68px;height:68px}.paper h1{margin:0}.company,.customer{gap:3px;margin-top:10px;display:grid}.company strong{font-size:18px}.customer{background:#edf4fa;padding:9px}.paper table{border-collapse:collapse;width:100%;margin-top:14px}.paper th,.paper td{text-align:center;border:1px solid #111;padding:6px}.paper thead{display:table-header-group}.paper tr{break-inside:avoid}.total{border:1px solid #111;justify-content:space-between;width:48%;margin:12px 0 0 auto;padding:8px;display:flex}.proforma-totals,.commercial-totals{width:52%;margin:12px 0 0 auto;display:grid}.proforma-totals span,.commercial-totals span{border:1px solid #111;justify-content:space-between;margin-top:-1px;padding:7px;display:flex}.proforma-totals .grand-total,.commercial-totals .grand-total{background:#f3f4f6;font-size:14px;font-weight:800}.proforma-sheet footer{justify-content:flex-end;min-height:70px;padding-top:20px;display:flex}.cachet{text-align:center;min-width:150px}.ins-sheet{font-family:Noto Naskh Arabic,Tahoma,Arial,sans-serif}.print-portal{display:none}@media (max-width:600px){.shell{padding:12px}.search,.order{flex-direction:column;align-items:stretch}.order-info-meta{grid-template-columns:repeat(2,minmax(0,1fr))}.price{width:100%}.custom-lines-head{flex-direction:column;align-items:stretch}.custom-line-editor,.liv-financial-fields{grid-template-columns:1fr}.toolbar{flex-direction:column;align-items:stretch}.toolbar button{width:100%}}.auth-shell{place-items:center;min-height:100vh;padding:20px;display:grid}.auth-card{border:1px solid var(--line);text-align:center;background:#fff;border-radius:18px;width:min(100%,420px);padding:24px;box-shadow:0 16px 50px #10204018}.auth-card img{object-fit:contain;width:84px;height:84px}.auth-card h1{margin:8px 0}.auth-card>p{color:#667085;margin:6px 0 18px}.auth-form{text-align:right;gap:10px;display:grid}.auth-form label{font-weight:800}.auth-form input{border:1px solid var(--line);border-radius:10px;width:100%;padding:12px}.auth-form .primary{margin-top:6px}.auth-card .auth-error{color:#991b1b;background:#fee2e2;border-radius:10px;padding:10px}.auth-card .auth-success{color:#166534;background:#dcfce7;border-radius:10px;padding:10px}@page liv-sheet{size:A5 portrait;margin:6mm}@page proforma-sheet{size:A5 portrait;margin:6mm}@page ins-sheet{size:A5 landscape;margin:6mm}@media print{html,body{background:#fff!important;margin:0!important;padding:0!important}body:has(.print-portal)>:not(.print-portal){display:none!important}.print-portal{width:100%;margin:0;padding:0;display:block!important}.liv-portal,.liv-sheet{page:liv-sheet}.proforma-portal,.proforma-sheet{page:proforma-sheet}.ins-portal,.ins-sheet{page:ins-sheet}.paper{box-shadow:none;padding:0}.paper header,.paper .customer,.paper .total,.paper p{break-inside:avoid}}
