:root{font-family:Segoe UI,Tahoma,Geneva,Verdana,sans-serif;color:#1f2937;background:linear-gradient(140deg,#f8fafc,#eef2ff)}*{box-sizing:border-box}body{margin:0}.screen{min-height:100vh}.container{max-width:1100px;margin:0 auto;padding:0 16px}.section{padding:28px 0}.center{display:flex;align-items:center;justify-content:center;padding:20px}.header{background:#fff;border-bottom:1px solid #dbe3ee}.header-inner{display:flex;justify-content:space-between;align-items:center;min-height:64px}.header h1{font-size:20px;margin:0}.card{background:#fff;border:1px solid #dbe3ee;border-radius:12px;padding:20px;box-shadow:0 8px 20px #0f172a0a}.login-card{width:min(430px,95vw)}label{display:grid;gap:8px;margin-bottom:14px;font-size:14px}input,textarea,select{width:100%;border:1px solid #c9d6e8;border-radius:8px;padding:10px;font-size:14px}.btn,.link-btn{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;border:1px solid #1d4ed8;background:#1d4ed8;color:#fff;padding:9px 14px;font-size:14px;text-decoration:none;cursor:pointer}.btn-outline{background:#fff;color:#1d4ed8}.link-btn{background:#fff;border-color:#c9d6e8;color:#1f2937;padding:6px 10px}.link-btn.danger{color:#b91c1c}.title-row{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:18px;gap:12px}.title-row h2{margin:0}.title-row p{margin:6px 0 0;color:#64748b}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;font-size:14px}th,td{border-bottom:1px solid #e7edf6;text-align:left;padding:10px}.actions{display:flex;gap:8px;flex-wrap:wrap}.status{border-radius:999px;padding:4px 10px;font-size:12px;border:1px solid #c9d6e8}.status-paid{color:#166534;background:#dcfce7}.status-unpaid{color:#b91c1c;background:#fee2e2}.status-partial{color:#92400e;background:#ffedd5}.empty{text-align:center}.bill-form h2{margin-top:0}.grid-2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-actions{margin-top:18px;display:flex;gap:10px;justify-content:flex-end}.error{color:#b91c1c;margin-top:8px}.back-link{display:inline-block;margin-bottom:14px;color:#1d4ed8;text-decoration:none}.invoice-screen{background:#f1f5f9;min-height:100vh}.invoice-document{max-width:820px;margin:0 auto 40px;background:#fff;border-radius:4px;box-shadow:0 4px 16px #0f172a14;padding:16px;box-sizing:border-box}.bill-box{width:100%;border:1.5px solid #000;box-sizing:border-box;background:#fff;color:#000;overflow:hidden;font-family:Times New Roman,Times,Georgia,Segoe UI,Arial,sans-serif}.bill-header{padding:10px 14px 8px;border-bottom:1.5px solid #000;text-align:center;position:relative;box-sizing:border-box}.bill-top-meta{display:flex;justify-content:center;align-items:center;position:relative;min-height:24px}.bill-badge{border:1px solid #000;padding:1px 18px;font-size:13px;font-weight:700;letter-spacing:2px;line-height:1.2}.original-badge{position:absolute;right:0;top:0;font-size:12px;font-weight:700;letter-spacing:.5px}.company-name{margin:6px 0 0;font-size:25px;font-weight:800;letter-spacing:.5px;text-transform:uppercase;color:#000}.company-underline{height:2.5px;background:#000;width:65%;margin:4px auto 6px}.company-address{font-size:13px;line-height:1.35;color:#111}.company-address p{margin:1px 0}.bill-info-section{display:flex;border-bottom:1.5px solid #000;min-height:90px;box-sizing:border-box}.info-to-box{flex:0 0 60%;width:60%;border-right:1.5px solid #000;padding:8px 12px;box-sizing:border-box;display:flex;flex-direction:column}.to-heading{font-size:14px;font-weight:700;margin-bottom:4px;color:#000}.customer-block{flex:1}.customer-name-text{font-size:15px;font-weight:700;margin:0 0 2px;color:#000}.customer-addr-text{font-size:13px;white-space:pre-line;line-height:1.3;margin:0;color:#222}.info-meta-box{flex:0 0 40%;width:40%;display:flex;flex-direction:row;box-sizing:border-box}.meta-col-box{flex:0 0 50%;width:50%;display:flex;flex-direction:column;box-sizing:border-box}.meta-col-no{border-right:1.5px solid #000}.meta-col-date{border-right:none}.meta-head{border-bottom:1px solid #000;padding:6px 4px;font-size:13px;font-weight:700;text-align:center;color:#000;height:26px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.meta-body{flex:1;padding:6px 4px;font-size:13.5px;color:#000;display:flex;border-bottom:none;box-sizing:border-box}.bill-table-container{width:100%;box-sizing:border-box}.bill-items-table{width:100%;border-collapse:collapse;table-layout:fixed;box-sizing:border-box}.bill-items-table thead th{border-bottom:1.5px solid #000;border-right:1.5px solid #000;padding:6px 4px;font-size:13px;font-weight:700;text-align:center;color:#000;background:#fff;box-sizing:border-box}.bill-items-table thead th:last-child{border-right:none}.bill-items-table tbody td{border-right:1.5px solid #000;border-bottom:none;padding:3px 6px;font-size:13px;color:#000;vertical-align:middle;height:24px;box-sizing:border-box}.bill-items-table tbody td:last-child{border-right:none}.th-sr,.td-sr{width:6%;text-align:center}.th-desc,.td-desc{width:54%;text-align:left}.th-qty,.td-qty{width:10%;text-align:center}.th-rate,.td-rate{width:10%;text-align:right}.th-per,.td-per{width:8%;text-align:center}.th-amount,.td-amount{width:12%;text-align:right;font-weight:600}.bill-total-row td{border-top:1.5px solid #000!important;border-bottom:none;padding:6px 8px!important;height:32px!important;box-sizing:border-box}.td-total-label{text-align:right!important;font-weight:700!important;font-size:15px!important;padding-right:18px!important;color:#000}.td-total-amount{text-align:right!important;font-weight:700!important;font-size:15px!important;border-right:none!important;white-space:nowrap}.currency-symbol{margin-right:4px;font-size:16px}.bill-words-section{border-top:1.5px solid #000;border-bottom:1.5px solid #000;padding:6px 10px;font-size:13px;color:#000;display:flex;align-items:baseline;gap:6px;box-sizing:border-box}.words-title{font-weight:700;white-space:nowrap}.words-value{font-weight:500;font-style:italic}.bill-footer-section{display:flex;justify-content:space-between;align-items:flex-end;padding:10px 14px 6px;box-sizing:border-box}.bank-details-box{font-size:12px;line-height:1.35;color:#111}.bank-details-box p{margin:1px 0}.bank-name-text{font-size:13px;font-weight:700;color:#000}.signature-area-box{text-align:center;min-width:250px}.for-firm{font-size:13px;font-weight:700;color:#000;margin:0}.sign-space{height:44px}.sign-label{font-size:12px;color:#111;margin:0}.bill-terms-row{border-top:1px solid #d1d5db;margin:0 10px;padding:4px 0 5px;font-size:10.5px;color:#4b5563;text-align:center;box-sizing:border-box}.bill-terms-row p{margin:0}.actions-inline{display:flex;gap:8px}.strong{font-weight:700}@media screen and (max-width:760px){.grid-2{grid-template-columns:1fr}.invoice-document{padding:8px}.company-name{font-size:18px}.bill-info-section{flex-direction:column}.info-to-box{border-right:none;border-bottom:1.5px solid #000}.bill-footer-section{flex-direction:column;align-items:flex-start;gap:16px}.signature-area-box{align-self:flex-end}}@media print{@page{size:A4 portrait;margin:8mm 9mm}*,*:before,*:after{box-shadow:none!important;text-shadow:none!important;-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}html,body{width:100%!important;height:100%!important;margin:0!important;padding:0!important;background:#fff!important;font-size:12px!important}.screen,.container,.section{margin:0!important;padding:0!important;max-width:100%!important;width:100%!important;background:#fff!important}.no-print,.header,.title-row{display:none!important}.invoice-document{width:100%!important;max-width:188mm!important;margin:0 auto!important;padding:0!important;box-shadow:none!important;border:none!important;background:#fff!important;box-sizing:border-box!important;page-break-inside:avoid!important;break-inside:avoid!important;page-break-after:avoid!important;break-after:avoid!important}.bill-box{width:100%!important;max-width:100%!important;height:281mm!important;display:grid!important;grid-template-rows:auto 34mm 1fr 30mm 30mm auto!important;box-sizing:border-box!important;border:1.5px solid #000!important;overflow:hidden!important;page-break-inside:avoid!important;break-inside:avoid!important;page-break-after:avoid!important;break-after:avoid!important}.bill-info-section{display:flex!important;flex-direction:row!important;border-bottom:1.5px solid #000!important;box-sizing:border-box!important;overflow:hidden!important}.info-to-box{flex:0 0 60%!important;width:60%!important;border-right:1.5px solid #000!important;border-bottom:none!important;padding:6px 10px!important;box-sizing:border-box!important}.info-to-box .customer-block{margin-left:14px!important}.info-meta-box{flex:0 0 40%!important;width:40%!important;display:flex!important;flex-direction:row!important;box-sizing:border-box!important;padding:0!important}.meta-col-box{flex:0 0 50%!important;width:50%!important;display:flex!important;flex-direction:column!important;box-sizing:border-box!important}.meta-col-no{border-right:1.5px solid #000!important}.meta-col-date{border-right:none!important}.meta-head{border-bottom:1px solid #000!important;padding:4px!important;font-size:12px!important;font-weight:700!important;text-align:center!important;height:24px!important;display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important}.meta-body{flex:1!important;padding:6px 4px!important;font-size:13px!important;display:flex!important;border-bottom:none!important;box-sizing:border-box!important}.bill-table-container{width:100%!important;height:100%!important;min-height:0!important;box-sizing:border-box!important;overflow:hidden!important}.bill-items-table{width:100%!important;height:100%!important;display:flex!important;flex-direction:column!important;border-collapse:collapse!important;table-layout:fixed!important;box-sizing:border-box!important}.bill-items-table thead,.bill-items-table tfoot{display:table!important;width:100%!important;flex:0 0 auto!important;table-layout:fixed!important}.bill-items-table tbody{display:flex!important;flex:1 1 auto!important;flex-direction:column!important;min-height:0!important}.bill-items-table tbody tr{display:table!important;width:100%!important;table-layout:fixed!important;flex:0 0 auto!important}.bill-items-table tbody .bill-empty-row{flex:1 1 0!important;min-height:22px!important}.th-sr,.td-sr{width:6%!important;text-align:center!important}.th-desc,.td-desc{width:54%!important;text-align:left!important}.th-qty,.td-qty{width:10%!important;text-align:center!important}.th-rate,.td-rate{width:10%!important;text-align:right!important}.th-per,.td-per{width:8%!important;text-align:center!important}.th-amount,.td-amount{width:12%!important;text-align:right!important}.bill-items-table thead th{border-bottom:1.5px solid #000!important;border-right:1.5px solid #000!important;padding:5px 4px!important;font-size:12px!important;box-sizing:border-box!important}.bill-items-table thead th:last-child{border-right:none!important}.bill-items-table tbody td{border-right:1.5px solid #000!important;border-bottom:none!important;padding:2px 5px!important;font-size:12px!important;height:22px!important;box-sizing:border-box!important}.bill-items-table tbody td:last-child{border-right:none!important}.bill-total-row td{border-top:1.5px solid #000!important;padding:5px 6px!important;height:28px!important;box-sizing:border-box!important}.td-total-label{font-size:14px!important}.td-total-amount{font-size:14px!important;border-right:none!important}.bill-words-section{padding:5px 8px!important;font-size:12px!important;border-top:1.5px solid #000!important;border-bottom:1.5px solid #000!important;box-sizing:border-box!important;overflow:hidden!important;display:flex!important;align-items:center!important}.bill-footer-section{display:table!important;width:100%!important;table-layout:fixed!important;padding:8px 10px 4px!important;box-sizing:border-box!important;overflow:hidden!important}.bank-details-box{display:table-cell!important;width:55%!important;vertical-align:bottom!important;font-size:11px!important;box-sizing:border-box!important}.signature-area-box{display:table-cell!important;width:45%!important;vertical-align:bottom!important;text-align:center!important;box-sizing:border-box!important}.for-firm{font-size:12px!important;margin:0!important}.sign-space{height:38px!important}.sign-label{font-size:11px!important}.bill-terms-row{color:#000!important;padding:3px 0 4px!important;font-size:9.5px!important;box-sizing:border-box!important}}
