: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}.header-nav{display:flex;gap:8px;margin-left:auto;margin-right:12px}.search-input{margin-bottom:12px;max-width:320px}.pre-line{white-space:pre-line}.bill-form+.table-wrap,.bill-form+.empty{margin-top:18px}.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:900px;margin:0 auto 40px;background:#fff;border-radius:4px;box-shadow:0 4px 16px #0f172a14;padding:24px;box-sizing:border-box}.bill-box{width:100%;border:3px 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:16px 20px 12px;border-bottom:3px 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:32px}.bill-badge{border:2px solid #000;padding:2px 32px;font-size:18px;font-weight:800;letter-spacing:3px;line-height:1.2}.original-badge{position:absolute;right:0;top:0;font-size:16px;font-weight:700;letter-spacing:.5px}.company-name{margin:18px 0 0;font-size:38px;font-weight:900;letter-spacing:1px;text-transform:uppercase;color:#000}.company-underline{height:3.5px;background:#000;width:75%;margin:8px auto 10px}.company-address{font-size:17.5px;line-height:1.5;color:#000}.company-address p{margin:3px 0}.bill-info-section{display:flex;border-bottom:3px solid #000;min-height:120px;box-sizing:border-box}.info-to-box{flex:0 0 60%;width:60%;border-right:3px solid #000;padding:12px 16px;box-sizing:border-box;display:flex;flex-direction:column}.to-heading{font-size:18px;font-weight:800;margin-bottom:6px;color:#000}.customer-block{flex:1}.customer-name-text{font-size:20px;font-weight:800;margin:0 0 6px;color:#000}.customer-addr-text{font-size:16.5px;white-space:pre-line;line-height:1.5;margin:0;color:#111}.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:3px solid #000}.meta-col-date{border-right:none}.meta-head{border-bottom:3px solid #000;padding:8px 6px;font-size:17px;font-weight:800;text-align:center;color:#000;height:38px;box-sizing:border-box;display:flex;align-items:center;justify-content:center}.meta-body{flex:1;padding:10px 8px;font-size:18px;font-weight:700;color:#000;display:flex;border-bottom:none;box-sizing:border-box}.bill-table-container{width:100%;box-sizing:border-box;overflow:hidden;border:none;margin:0;padding:0}.bill-items-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;box-sizing:border-box}.bill-items-table thead th{border-bottom:3px solid #000;border-right:3px solid #000;border-top:none;border-left:none;padding:8px 6px;font-size:19px;font-weight:800;text-align:center;color:#000;background:#fff;box-sizing:border-box}.bill-items-table thead th:last-child{border-right:none!important}.bill-items-table tbody td{border-right:3px solid #000;border-bottom:none;border-top:none;border-left:none;padding:6px 8px;font-size:19px;color:#000;vertical-align:middle;height:34px;line-height:1.2;box-sizing:border-box}.bill-items-table tbody td:last-child{border-right:none!important}.th-sr,.td-sr{width:5%;text-align:center}.th-desc,.td-desc{width:51%;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:7%;text-align:center}.th-amount,.td-amount{width:17%;text-align:right;font-weight:700;border-right:none!important}.bill-items-table thead th.th-amount,.bill-items-table tbody td.td-amount{padding-right:14px}.bill-total-row td{border-top:3px solid #000!important;border-bottom:none!important;border-left:none!important;padding:8px 10px!important;height:38px!important;box-sizing:border-box}.td-total-label{text-align:right!important;font-weight:800!important;font-size:22px!important;padding-right:20px!important;color:#000}.bill-total-row td.td-total-amount{text-align:right!important;font-weight:800!important;font-size:23px!important;border-right:none!important;padding-right:16px!important;white-space:nowrap}.currency-symbol{margin-right:4px;font-size:22px}.bill-words-section{border-top:3px solid #000;border-bottom:3px solid #000;padding:10px 14px;font-size:19px;color:#000;display:flex;align-items:baseline;gap:10px;box-sizing:border-box}.words-title{font-weight:800;white-space:nowrap}.words-value{font-weight:600;font-style:italic}.bill-footer-section{display:flex;justify-content:space-between;align-items:flex-end;padding:14px 18px 10px;box-sizing:border-box}.bank-details-box{font-size:16px;line-height:1.5;color:#000}.bank-details-box p{margin:3px 0}.bank-name-text{font-size:18px;font-weight:800;color:#000}.signature-area-box{text-align:center;min-width:280px}.for-firm{font-size:17.5px;font-weight:800;color:#000;margin:0}.sign-space{height:60px}.sign-label{font-size:15px;color:#111;margin:0}.bill-terms-row{border-top:1.5px solid #cbd5e1;margin:0 10px;padding:6px 0 8px;font-size:13px;color:#334155;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:6mm 7mm}*,*: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:18px!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:196mm!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:284mm!important;display:grid!important;grid-template-rows:auto auto 1fr auto auto auto!important;box-sizing:border-box!important;border:3px 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-header{padding:14px 18px 10px!important;border-bottom:3px solid #000!important;box-sizing:border-box!important}.bill-badge{border:2px solid #000!important;padding:2px 30px!important;font-size:20px!important;font-weight:800!important;letter-spacing:3px!important}.original-badge{font-size:18px!important;font-weight:700!important}.company-name{margin:14px 0 0!important;font-size:40px!important;font-weight:900!important;letter-spacing:1px!important}.company-underline{height:3.5px!important;background:#000!important;width:75%!important;margin:6px auto 8px!important}.company-address{font-size:19px!important;line-height:1.45!important;color:#000!important}.company-address p{margin:2px 0!important}.bill-info-section{display:flex!important;flex-direction:row!important;border-bottom:3px solid #000!important;box-sizing:border-box!important;overflow:hidden!important;min-height:42mm!important}.info-to-box{flex:0 0 60%!important;width:60%!important;border-right:3px solid #000!important;border-bottom:none!important;padding:10px 14px!important;box-sizing:border-box!important}.info-to-box .customer-block{margin-left:14px!important}.to-heading{font-size:20px!important;font-weight:800!important;margin-bottom:4px!important}.customer-name-text{font-size:23px!important;font-weight:800!important;margin:0 0 4px!important}.customer-addr-text{font-size:18px!important;line-height:1.45!important;color:#000!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:3px solid #000!important}.meta-col-date{border-right:none!important}.meta-head{border-bottom:2px solid #000!important;padding:6px 4px!important;font-size:19px!important;font-weight:800!important;text-align:center!important;height:36px!important;display:flex!important;align-items:center!important;justify-content:center!important;box-sizing:border-box!important}.meta-body{flex:1!important;padding:8px 6px!important;font-size:20px!important;font-weight:700!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;border:none!important;margin:0!important;padding:0!important}.bill-items-table{width:100%!important;height:100%!important;border-collapse:separate!important;border-spacing:0!important;table-layout:fixed!important;box-sizing:border-box!important}.th-sr,.td-sr{width:5%!important;text-align:center!important}.th-desc,.td-desc{width:51%!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:7%!important;text-align:center!important}.th-amount,.td-amount{width:17%!important;text-align:right!important;font-weight:700!important;border-right:none!important}.bill-items-table thead th.th-amount,.bill-items-table tbody td.td-amount{padding-right:14px!important}.bill-items-table thead th{border-bottom:3px solid #000!important;border-right:3px solid #000!important;border-top:none!important;border-left:none!important;padding:6px 4px!important;font-size:19px!important;font-weight:800!important;box-sizing:border-box!important}.bill-items-table thead th:last-child{border-right:none!important}.bill-items-table tbody td{border-right:3px solid #000!important;border-bottom:none!important;border-top:none!important;border-left:none!important;padding:4px 8px!important;font-size:19px!important;height:32px!important;line-height:1.2!important;box-sizing:border-box!important}.bill-items-table tbody td:last-child{border-right:none!important}.bill-total-row td{border-top:3px solid #000!important;border-bottom:none!important;border-left:none!important;padding:6px 10px!important;height:36px!important;box-sizing:border-box!important}.td-total-label{font-size:22px!important;font-weight:800!important;padding-right:20px!important}.bill-total-row td.td-total-amount{font-size:23px!important;font-weight:800!important;border-right:none!important;padding-right:16px!important}.currency-symbol{font-size:24px!important;margin-right:4px!important}.bill-words-section{padding:8px 12px!important;font-size:19px!important;border-top:3px solid #000!important;border-bottom:3px solid #000!important;box-sizing:border-box!important;overflow:hidden!important;display:flex!important;align-items:center!important}.words-title{font-size:19px!important;font-weight:800!important}.words-value{font-size:19px!important;font-weight:600!important}.bill-footer-section{display:table!important;width:100%!important;table-layout:fixed!important;padding:12px 14px 6px!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:17px!important;line-height:1.45!important;box-sizing:border-box!important}.bank-details-box p{margin:2px 0!important}.bank-name-text{font-size:19px!important;font-weight:800!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:19px!important;font-weight:800!important;margin:0!important}.sign-space{height:56px!important}.sign-label{font-size:16px!important}.bill-terms-row{color:#000!important;padding:5px 0 6px!important;font-size:15px!important;box-sizing:border-box!important}}
