 :root{font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#17212b;background:#f4f7fa;--blue:#203b86;--blue2:#4d49a5;--accent:#4d49a5;--muted:#667482;--good:#138a55;--warn:#c77900;--bad:#b42318;--line:#dfe5f0}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:#f4f7fa}body{min-height:100vh}button,input,textarea,select{font:inherit}button{cursor:pointer}.hidden{display:none!important}.file-button-wrap{position:relative;display:inline-block}.file-button{position:relative;display:inline-block;overflow:hidden}.file-button input[type=file]{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;opacity:0;cursor:pointer;z-index:2}.file-button input[type=file]::-webkit-file-upload-button{cursor:pointer}
.screen{min-height:100vh;display:grid;place-items:center;padding:28px 20px;background:radial-gradient(circle at 15% 15%,#eef2ff 0,#f8fafc 38%,#edf3ff 100%);position:relative}.screen:before{content:"";position:absolute;inset:auto auto 0 0;width:55%;height:42%;background:linear-gradient(135deg,#172f6f,#4d49a5);clip-path:polygon(0 40%,100% 0,78% 100%,0 100%);opacity:.97}.login-shell{width:min(520px,100%);position:relative;z-index:1}.brand-card,.card,.modal-card{background:#fff;border-radius:18px;box-shadow:0 14px 40px #0a234018}.brand-card{padding:34px;text-align:center;border:1px solid #e5ebf1;backdrop-filter:blur(10px)}.brand-logo{display:block;width:min(230px,72%);height:auto;max-height:130px;object-fit:contain;margin:0 auto 10px}.product-kicker{font-size:10px;font-weight:800;letter-spacing:2px;color:#6b7886}.brand-card h1{font-size:32px;margin:8px 0 4px;color:var(--blue)}.tagline{font-size:17px;font-weight:700;color:#4d49a5;margin:0 0 7px;letter-spacing:.2px}.brand-card>p:not(.tagline){color:#71808d;margin:0 auto;max-width:340px;font-size:14px}.brand-card form{display:grid;gap:12px;margin-top:24px;text-align:left}.brand-card input{height:48px}.site-footer{color:#fff;background:#082c58;text-align:center;padding:13px 16px;font-size:13px}.site-footer strong{color:var(--accent)}.login-shell>.site-footer{border-radius:0 0 16px 16px}.error{color:#b42318!important}.success{color:#18794e!important}
input,textarea,select{width:100%;border:1px solid #d5dce4;border-radius:10px;padding:12px;background:#fff;color:#17212b;outline:none}input:focus,textarea:focus,select:focus{border-color:#7aa7d5;box-shadow:0 0 0 3px #1f5fa414}textarea{min-height:90px;resize:vertical}button{border:0;border-radius:10px;padding:11px 16px;background:var(--blue);color:#fff;font-weight:700}.ghost{background:transparent;color:var(--blue);border:1px solid #d5dce4}.primary{background:var(--blue)}.danger{background:#b42318;color:#fff}.small{padding:8px 11px;font-size:12px}
#appView{min-height:100vh;display:flex;flex-direction:column}header{background:#fff;padding:12px max(18px,calc((100vw - 1250px)/2));display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e1e6eb;position:sticky;top:0;z-index:5}.app-brand{display:flex;align-items:center;gap:12px}.app-brand img{width:76px;height:48px;object-fit:contain}.eyebrow{font-size:10px;font-weight:800;letter-spacing:1.3px;color:#6c7885}.app-brand h1{font-size:24px;margin:2px 0;color:var(--blue)}.user-menu{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:700}
main{width:100%;max-width:1250px;margin:auto;padding:18px;flex:1}.stats{display:grid;grid-template-columns:repeat(6,1fr);gap:12px}.stats div{background:#fff;border-radius:14px;padding:16px;border:1px solid #e6ebf0}.stats b{font-size:25px;color:var(--blue);display:block}.stats span{color:#6b7680;font-size:13px}.tabs{display:flex;gap:8px;overflow:auto;margin:18px 0}.tabs button{background:#e7edf3;color:#355064;white-space:nowrap}.tabs button.active{background:var(--blue);color:#fff}.tab{display:block}.tab.hidden{display:none}.card{padding:18px;margin-bottom:18px;border:1px solid #e6ebf0}.row{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}.two-column{display:grid;grid-template-columns:1fr 1fr;gap:18px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.grid label{display:grid;gap:6px;font-weight:700;font-size:13px;color:#46535f}.wide{grid-column:1/-1}.three{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.toolbar{display:flex;gap:12px;align-items:center;margin:12px 0}.toolbar .check{white-space:nowrap}.check{display:flex;gap:7px;align-items:center}.check input{width:auto}.report,.customer{padding:14px 0;border-bottom:1px solid #e7ebef}.report:last-child,.customer:last-child{border-bottom:0}.badge,.pill{display:inline-block;padding:5px 8px;border-radius:999px;background:#edf2f6;font-size:11px;font-weight:800}.pill.green{background:#e8f7ef;color:var(--good)}.pill.orange{background:#fff3dd;color:var(--warn)}.pill.red{background:#fdebed;color:var(--bad)}.confirmed-badge{background:#e9f7ef!important;color:#167347!important}.reopened-badge{background:#fff1e8!important;color:#9a4b0b!important}.actions,.row-actions{display:flex;gap:7px;flex-wrap:wrap}.actions a{display:inline-block;text-decoration:none}.user-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #e7ebef}.muted,.hint{color:var(--muted);font-size:.9rem}.empty{padding:35px;text-align:center;color:var(--muted)}.search-inline{max-width:360px}.report-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.report-grid>div{padding:14px;border:1px solid #e3e9ef;border-radius:12px;display:flex;flex-direction:column;gap:5px}.modal{position:fixed;inset:0;background:#06182b88;display:grid;place-items:center;padding:20px;z-index:10;overflow:auto}.modal-card{width:min(560px,100%);padding:24px;position:relative;max-height:calc(100vh - 40px);overflow:auto}.wide-modal{width:min(1100px,100%)}.modal-card form{display:grid;gap:12px}.close{position:absolute;right:12px;top:12px;background:transparent;color:#333;font-size:24px;padding:4px 9px}.confirmation-card{border:1px solid #d7e7f7;background:linear-gradient(180deg,#fff,#f7fbff)}.confirmation-header{display:flex;justify-content:space-between;gap:16px;align-items:flex-start;margin-bottom:14px}.confirmation-header h2{margin:4px 0 6px}.confirmation-icon{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#e9f7ef;color:#167347;font-size:22px;font-weight:800}.confirmation-item{display:flex;justify-content:space-between;gap:16px;align-items:center;border:1px solid #dce7ef;border-radius:14px;padding:14px 16px;background:#fff;margin-top:10px}.confirmation-status{display:inline-block;margin-top:7px;font-size:12px;font-weight:700}.confirmation-status.pending{color:#a66300}.confirmation-empty{padding:14px;border-radius:12px;background:#f3f7fa;color:#667482}.confirmation-summary{background:#f4f8fb;border:1px solid #dce7ef;border-radius:12px;padding:14px;margin:12px 0 16px;line-height:1.7}.customer-confirm-modal{max-width:560px}.confirmation-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.user-call-note{margin-top:6px;padding:8px 10px;border-radius:8px;background:#fff8e8;border:1px solid #f0d58c}
.inner-card{margin-top:16px}.item-card{border:1px solid var(--line);border-radius:10px;padding:12px;margin:10px 0;background:#fff}.item-controls input{width:110px}.quote-totals{padding:10px;text-align:right;font-size:16px}.quote-preview{background:#fff;color:#111;padding:35px;max-width:900px;margin:auto;border:1px solid #d8e1f1}.quote-head{display:flex;justify-content:space-between;gap:30px;border-bottom:2px solid var(--accent);padding-bottom:20px;margin-bottom:20px}.quote-brand{display:flex;align-items:flex-start;gap:12px}.quote-brand .brand-logo{width:100px;height:76px}.quote-brand h1{margin:0 0 6px;color:#203b86;font-size:24px}.quote-meta{min-width:180px}.quote-preview table{width:100%;border-collapse:collapse;margin-top:20px}.quote-preview th,.quote-preview td{padding:10px 8px;border-bottom:1px solid #e2e7f0;text-align:left;vertical-align:top}.quote-preview th{background:#eef3ff;color:#2447a7}.customer-box{margin:18px 0 22px;padding:14px 16px;border:1px solid #d8e1f1;border-radius:10px;background:#f7f9ff;line-height:1.55}.customer-title{font-size:18px;font-weight:800;color:#203b86;margin-top:3px}.quote-grand{margin-top:20px}.quote-grand .total{font-size:20px;font-weight:800}.terms-section{margin-top:14px;font-size:13px}.terms-section li{margin-bottom:6px;line-height:1.45}.signature-block{margin-top:24px;min-height:105px;text-align:right;font-size:13px;line-height:1.45}.signature-space{height:38px}.quote-footer{margin-top:28px;padding-top:10px;border-top:1px solid var(--accent);text-align:center;font-size:12px;font-weight:650;color:#243b78}
@media print{@page{size:A4;margin:12mm 14mm}body{background:#fff!important}header,.tabs,.no-print,main>.tab,.site-footer{display:none!important}#modal{position:static!important;display:block!important;background:none!important;padding:0!important}.wide-modal{width:auto!important;max-width:none!important;max-height:none!important;overflow:visible!important;padding:0!important;border:0!important;box-shadow:none!important}.quote-preview{display:block!important;max-width:none!important;width:100%!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}.quote-preview table{width:100%!important}}
@media(max-width:900px){.stats{grid-template-columns:repeat(3,1fr)}.two-column,.report-grid{grid-template-columns:1fr 1fr}.three{grid-template-columns:1fr 1fr}}
@media(max-width:650px){header{padding:10px 14px}.user-menu span{display:none}.app-brand img{width:64px;height:42px}.app-brand h1{font-size:20px}main{padding:12px}.stats{grid-template-columns:repeat(2,1fr)}.two-column,.grid,.three,.report-grid{grid-template-columns:1fr}.wide{grid-column:1}.modal{padding:10px;place-items:start center}.modal-card{width:100%;max-height:calc(100vh - 20px);padding:20px 16px}.confirmation-item{align-items:stretch;flex-direction:column}.confirmation-item button{width:100%}.confirmation-actions{grid-template-columns:1fr}.toolbar{align-items:stretch;flex-direction:column}.item-controls{align-items:stretch}.item-controls input{width:100%!important}.user-row{align-items:flex-start;flex-direction:column}.actions{width:100%}.actions button{flex:1;min-width:90px}}

.doc-topbar{height:7px;background:linear-gradient(90deg,#172f6f,#4d49a5);margin:-35px -35px 24px;border-radius:0}.doc-bottombar{height:9px;background:linear-gradient(90deg,#172f6f,#4d49a5);margin:14px -35px -35px;border-radius:0 0 4px 4px}.doc-tagline{font-size:11px;color:#4d49a5;font-weight:700;letter-spacing:.35px;margin-bottom:5px}.doc-contact{font-size:11px;line-height:1.55;color:#596575}.quote-preview{box-shadow:0 10px 35px #1b32701a;border-radius:4px}.quote-preview th{background:#203b86!important;color:#fff!important}.quote-footer{border-top:1px solid #d8def0!important;color:#243b78!important;line-height:1.6}.quote-head{border-bottom:2px solid #4d49a5!important}

.tally-card{border:1px solid #d8def0;background:linear-gradient(180deg,#fff,#f8f9ff)}.tally-status{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin:14px 0;padding:12px;border:1px solid #e0e5f0;border-radius:12px;background:#f7f9ff}.tally-status>div{font-size:12px;color:#5b6878}.tally-status b{color:#203b86}.tally-job-list{margin-top:12px;max-height:260px;overflow:auto}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.tally-card code{background:#eef2ff;padding:2px 5px;border-radius:5px}@media(max-width:650px){.tally-status{grid-template-columns:1fr}}

.tally-exchange-banner{display:flex;justify-content:space-between;gap:16px;align-items:center;background:linear-gradient(135deg,#f3f5ff,#faf9ff);border:1px solid #dbe2f4;border-radius:12px;padding:14px 16px;margin:14px 0}.tally-exchange-banner span{font-size:13px;color:#5f6b7b}.exchange-panel{border:1px solid #e0e5ef;border-radius:12px;padding:16px;background:#fff}.exchange-panel h3{margin:0 0 6px;color:#203b86}.exchange-list{display:grid;gap:8px;font-size:14px;color:#344154}.exchange-list span{padding:7px 0;border-bottom:1px solid #eef1f6}.exchange-list span:last-child{border-bottom:0}@media(max-width:760px){.tally-exchange-banner{display:block}.tally-exchange-banner span{display:block;margin-top:5px}}
