@font-face{font-family:Inter;src:url(Inter-variable.ttf) format('truetype');font-weight:100 900;font-display:swap}
@font-face{font-family:Urdu;src:url(NotoNaskhArabic.ttf) format('truetype');font-weight:100 900;font-display:swap}
:root{--green:#219e7a;--dark:#00684e;--pale:#edf7f2;--ink:#101828;--muted:#667085;--border:#e7ece9;--canvas:#fbfcfb;--white:#fff;font-family:Inter,Arial,sans-serif;color:var(--ink);background:var(--canvas);font-size:16px}
*{box-sizing:border-box}body{margin:0}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}button,a,input,select,textarea{touch-action:manipulation}button{cursor:pointer}button:disabled{opacity:.55;cursor:wait}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible{outline:3px solid #83cdb6;outline-offset:3px}h1,h2,h3,p{margin:0}h1{font-size:30px;letter-spacing:-1.1px;font-weight:600;line-height:1.25}h2{font-size:18px;letter-spacing:-.4px;font-weight:600;line-height:1.4}h3{font-size:15px}p{line-height:1.65;color:var(--muted)}svg{width:22px;height:22px;flex-shrink:0}.urdu,[lang=ur]{font-family:Urdu,Inter,'Nirmala UI',serif}.urdu{font-size:17px;line-height:1.5}.skip{position:absolute;left:20px;top:-100px;background:#fff;padding:12px;z-index:20}.skip:focus{top:10px}.sidebar nav a:hover{background:#f6f9f7}.sidebar nav a[aria-current]{background:#eaf4ef;color:var(--dark)}.status-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:var(--green);margin-right:5px;flex-shrink:0}.amber-dot{background:#eab355}.avatar{display:grid;place-items:center;background:#eaf4ef;width:34px;height:34px;border-radius:50%;color:var(--dark);font-size:12px}.app-footer{padding:20px 34px 26px;font-size:10px;color:#97a39b;display:flex;justify-content:space-between}.button{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--green);color:#fff;border:1px solid var(--green);border-radius:24px;padding:11px 20px;font-size:12px;font-weight:500;line-height:1.3;white-space:nowrap;min-height:39px}.button:hover{background:#178c6a;border-color:#178c6a}.button.secondary{color:#426050;background:#fff;border-color:#dce5df}.button.secondary:hover{background:#f4f8f5}.button.small{padding:8px 13px;font-size:11px;min-height:32px}.button.full{width:100%}.text-button{color:var(--dark);font-weight:500;background:none;border:none;padding:0;font-size:12px}.text-button:hover{text-decoration:underline}.notice{background:#fff8e9;border:1px solid #f3dfae;border-radius:12px;padding:15px 18px;color:#7d5f25;font-size:12px;line-height:1.7;margin-bottom:22px}.notice a{color:var(--dark);text-decoration:underline;margin-left:5px}.notice.success{background:#eef8f2;border-color:#c5e7d2;color:#186440}.notice.error{background:#fff0ee;border-color:#ffd3ca;color:#a53121}.stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:18px;margin-bottom:26px}.stat{border:1px solid var(--border);background:#fff;border-radius:17px;padding:23px 22px;min-height:140px;box-shadow:0 2px 4px #13261b02}.stat>span{color:var(--muted);font-size:11px}.stat strong{display:block;font-size:27px;letter-spacing:-.9px;font-weight:600;margin:17px 0 12px;overflow-wrap:anywhere}.stat small{display:block;font-size:10px;color:#8b978f;line-height:1.5}.panel{border:1px solid var(--border);background:#fff;border-radius:17px;box-shadow:0 2px 4px #13261b02;margin-bottom:24px;min-width:0;overflow:hidden}.panel-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:23px 24px;border-bottom:1px solid #f0f3f1}.panel-heading p{font-size:11px;margin-top:4px}.dashboard-grid{display:grid;grid-template-columns:1.12fr 1fr;gap:24px}.dashboard-grid>.panel{height:fit-content}.collection-cards{display:grid;grid-template-columns:1fr 1fr;gap:20px;padding:26px}.collection-cards article{display:grid;grid-template-columns:40px 1fr;align-items:center;gap:7px 11px}.collection-cards article>span:not(.mini-icon){font-size:11px;color:var(--muted)}.collection-cards strong{grid-column:2;font-size:22px;font-weight:600;letter-spacing:-.7px}.mini-icon{display:grid;place-items:center;width:40px;height:40px;border:1px solid #dcebe2;color:var(--dark);background:#f2f8f4;border-radius:11px;grid-row:span 2}.integration-note{display:flex;align-items:flex-start;gap:8px;border-top:1px solid var(--border);padding:19px 26px;background:#fdfefc;font-size:11px}.integration-note .status-dot{margin-top:5px}.integration-note strong{font-size:11px;font-weight:500}.integration-note p{font-size:10px;margin-top:5px}.quick-links{padding:5px 24px}.quick-links a{display:flex;align-items:center;gap:15px;padding:20px 0;border-bottom:1px solid #f0f3f1;color:var(--dark)}.quick-links a:last-child{border:0}.quick-links a div{flex:1}.quick-links strong{display:block;font-size:12px;font-weight:500}.quick-links span{display:block;font-size:10px;color:var(--muted);margin-top:6px}.table-wrap{overflow-x:auto}table{width:100%;border-collapse:collapse;text-align:left;font-size:12px}th{background:#fafcfb;color:#809087;font-size:10px;font-weight:500;white-space:nowrap;padding:15px 23px;border-bottom:1px solid var(--border)}td{padding:18px 23px;border-bottom:1px solid #f0f3f1;vertical-align:middle;line-height:1.5}tbody tr:last-child td{border-bottom:0}tbody tr:hover{background:#fcfefd}td small{display:block;margin-top:5px;font-size:10px;color:#809087;max-width:220px}td small.urdu{font-size:14px}.record-number{font-weight:600;color:#42604e}.customer-name{display:block;font-weight:600;min-width:120px;max-width:250px}.reference{display:block;max-width:160px;overflow-wrap:anywhere;font-size:10px;color:var(--muted)}.badge{display:inline-flex;align-items:center;padding:4px 10px;border-radius:20px;font-size:10px;white-space:nowrap;font-weight:500}.badge:before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor;margin-right:5px}.badge.green{color:#15804b;background:#ecf8ef}.badge.amber{color:#a27315;background:#fff8e8}.badge.red{color:#ba5141;background:#fff1ee}.badge.blue{color:#3977a7;background:#edf5fc}.review-label{color:#b58c3b}.count{display:inline-flex;padding:3px 8px;border-radius:20px;background:#f0f6f2;color:#587361;font-size:10px;margin-left:5px;vertical-align:middle}.filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:13px;margin:0 0 22px}.filters label{min-width:150px;flex:1;max-width:360px}.filters .check{flex:0 0 auto;min-width:0;padding-bottom:10px}.filters .button{margin-bottom:0}.filters input,.filters select{min-width:0}.filters input[type=search]{min-width:250px}label{display:flex;flex-direction:column;gap:8px;color:#526358;font-size:11px;margin-bottom:16px;line-height:1.5}input,select,textarea{border:1px solid #dfe7e1;border-radius:9px;background:#fff;min-height:41px;padding:10px 12px;color:#243d2c;width:100%;max-width:100%}input::placeholder{color:#a2afa6;font-size:11px}textarea{resize:vertical}select{min-width:130px}label.check{display:flex;align-items:center;flex-direction:row;gap:9px;font-size:11px;margin-bottom:12px}.check input{width:15px;height:15px;min-height:0;accent-color:var(--green);flex-shrink:0;padding:0}form>.button{margin-top:12px}.filters label{margin-bottom:0}.form-panel{max-width:1050px;padding:28px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:4px 24px}.form-actions{display:flex;justify-content:flex-end;padding-top:20px;border-top:1px solid var(--border);margin-top:22px}.net-preview{padding:13px 16px;border-radius:9px;background:var(--pale);color:var(--dark);font-size:12px;margin:8px 0 22px}.checks{padding-top:5px}.muted{font-size:11px;color:#8b978f;line-height:1.7}.pagination{padding:18px 23px;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:12px;color:#8b978f;font-size:10px}.pagination>div{display:flex;gap:8px}.empty{padding:42px;text-align:center;color:#8b978f;font-size:12px}.tabs{display:flex;gap:6px;margin-bottom:19px;flex-wrap:wrap}.tabs a{border-radius:7px;padding:8px 13px;font-size:11px;color:var(--muted)}.tabs a.selected{background:#eaf4ef;color:var(--dark)}.generate-panel{padding:24px;display:grid;grid-template-columns:1fr 1.7fr;gap:30px}.generate-panel p{font-size:11px;margin-top:10px}.generate-panel h2{font-size:17px}.generate-panel .filters{margin-bottom:16px}.detail-card{padding:25px}.detail-card h2{margin-bottom:20px}.detail-card p{font-size:12px;margin-bottom:15px}.detail-card .panel-heading{padding:0 0 18px}.detail-card .panel-heading h2{margin:0}dl{display:grid;grid-template-columns:1fr 1.3fr;gap:15px 20px;font-size:12px;margin:22px 0}dt{color:var(--muted)}dd{margin:0;overflow-wrap:anywhere}details{border-top:1px solid var(--border);padding-top:14px}summary{cursor:pointer;font-size:12px;line-height:1.6;color:var(--dark)}details form{padding-top:15px}details input{min-width:160px}details .button{margin-top:10px}.prewrap{white-space:pre-wrap;font-size:11px;margin-top:15px}.plan-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.plan-card{padding:27px;display:flex;flex-direction:column}.plan-card .mini-icon{margin-bottom:20px}.plan-card h2{margin-bottom:10px;font-size:17px}.plan-card p{font-size:11px;margin-bottom:12px}.plan-price{font-size:32px;color:#174b33;font-weight:600;letter-spacing:-1px;margin:12px 0}.plan-price small{font-size:11px;color:#829088;letter-spacing:0;font-weight:400;display:block;margin-top:7px}.plan-card details{margin-top:auto}.plan-card summary{width:100%}.plan-card summary::marker{content:''}.spaced{margin-top:25px}.area-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}.area-grid details{border:1px solid var(--border);border-radius:9px;padding:12px}.area-grid summary small{display:block;font-size:10px;color:var(--muted);margin-top:4px}.review-list article{padding:23px;border-bottom:1px solid var(--border);display:flex;justify-content:space-between;gap:25px;font-size:12px}.review-list small{display:block;color:var(--muted);margin-top:6px}.candidate{grid-template-columns:80px 1fr;font-size:11px;gap:7px;margin-bottom:0}.review-actions{display:flex;flex-direction:column;gap:15px;align-items:flex-end;min-width:160px}.review-actions form{margin:0}.auth{max-width:430px;margin:8vh auto;padding:20px}.auth-brand{font-size:44px;letter-spacing:-3px;font-weight:700;text-align:center;color:#153a29;margin-bottom:38px}.auth-brand span{display:block;letter-spacing:2px;font-size:9px;margin-top:5px;color:#89968e}.auth-card{padding:32px;border:1px solid var(--border);border-radius:20px;background:#fff;box-shadow:0 10px 40px #12291c06}.eyebrow{font-size:8px;letter-spacing:1.8px;color:var(--green);font-weight:600}.auth-card h1{font-size:26px;margin-top:12px}.auth-card>p{font-size:11px;margin:13px 0 24px}.auth-foot{text-align:center;font-size:10px;margin-top:25px}.public-bill{max-width:500px;margin:40px auto;padding:20px}.public-bill .invoice-card{border:1px solid #d2d9d5;border-radius:12px;padding:20px;font-size:15px}.public-bill .invoice-brand strong{font-size:23px}.public-bill .invoice-person strong{font-size:21px}.public-bill .detail-card{margin-top:22px}.print-toolbar{max-width:1100px;margin:28px auto;padding:24px;border:1px solid var(--border);background:#fff;border-radius:14px}.print-toolbar>.heading-actions{margin:18px 0}.print-toolbar p{font-size:12px;margin-top:10px}.print-toolbar .filters{margin:22px 0 0}.print-sheet{width:190mm;height:277mm;display:grid;grid-template-columns:1fr 1fr;grid-template-rows:repeat(3,minmax(0,1fr));margin:20px auto;background:#fff;box-shadow:0 3px 25px #11221a1a}.print-sheet.per-8{grid-template-rows:repeat(4,minmax(0,1fr))}.invoice-card{padding:4mm;border:1px dashed #aaa;font-family:Urdu,serif;font-size:11px;line-height:1.3;color:#111;background:#fff;min-width:0;display:flex;flex-direction:column;overflow-wrap:anywhere;overflow:hidden}.invoice-brand{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;border-bottom:1px solid #555;padding-bottom:2mm;margin-bottom:2mm}.invoice-brand strong{display:block;font-size:19px;line-height:1.2}.invoice-brand small{display:block;font-size:10px;line-height:1.4;font-family:Inter,Urdu,sans-serif}.invoice-month{font-family:Inter,sans-serif;font-size:11px;text-align:left;flex-shrink:0}.invoice-month small{margin-top:3px;font-size:8px}.invoice-person{display:flex;flex-direction:column;gap:1mm}.invoice-person strong{font-size:17px;line-height:1.3}.invoice-person span{font-size:12px}.invoice-address{font-size:10px;margin:1mm 0;line-height:1.3}.invoice-body{display:flex;align-items:center;justify-content:space-between;gap:3mm;margin:2mm 0;flex:1}.invoice-lines{flex:1;min-width:0}.invoice-lines>div{display:flex;justify-content:space-between;gap:5px;padding:1mm 0}.invoice-lines bdi{font-family:Inter,sans-serif;font-size:10px;white-space:nowrap}.invoice-total{border-top:1px solid #888;margin-top:1mm;padding-top:2mm!important;font-size:15px}.invoice-total bdi{font-size:12px;font-weight:600}.qr-column{width:28mm;flex-shrink:0;text-align:center}.qr{width:27mm;height:27mm;display:block;margin:0 auto}.qr svg{width:100%;height:100%;display:block}.qr-column small{font-size:9px}.invoice-bottom{display:flex;justify-content:space-between;gap:5px;border-top:1px solid #bbb;padding-top:1mm;font-size:10px}.invoice-bottom bdi{font-family:Inter,sans-serif;font-size:8px}.invoice-footer{text-align:center;font-size:10px;line-height:1.3;margin-top:1mm}.per-8 .invoice-card{padding:2.5mm;font-size:10px}.per-8 .invoice-brand{padding-bottom:1mm;margin-bottom:1mm}.per-8 .invoice-brand strong{font-size:16px}.per-8 .invoice-person strong{font-size:14px}.per-8 .invoice-person span{font-size:10px}.per-8 .invoice-address{font-size:9px;margin:0}.per-8 .invoice-body{margin:1mm 0}.per-8 .invoice-lines>div{padding:.45mm 0}.per-8 .invoice-lines bdi{font-size:8px}.per-8 .invoice-total{font-size:12px;padding-top:1mm!important}.per-8 .invoice-total bdi{font-size:10px}.per-8 .qr-column{width:24mm}.per-8 .qr{width:23mm;height:23mm}.per-8 .invoice-bottom,.per-8 .invoice-footer{font-size:9px}.per-8 .invoice-footer{margin-top:.5mm}.qr-error{font:10px Inter,sans-serif;color:#a22}.print-error{color:#a22!important}
@media(max-width:1200px){.stats{gap:12px}.stat{padding:20px 17px}.stat strong{font-size:23px}.dashboard-grid{grid-template-columns:1fr 1fr;gap:18px}.plan-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.generate-panel{grid-template-columns:1fr}.generate-panel .filters label{max-width:none}.area-grid{grid-template-columns:1fr 1fr}}
@media(max-width:850px){.stats{grid-template-columns:1fr 1fr}.dashboard-grid{grid-template-columns:1fr}.form-grid{grid-template-columns:1fr 1fr}.stat strong{font-size:27px}.area-grid{grid-template-columns:1fr 1fr}.print-toolbar{margin:15px}}
@media(max-width:560px){.button{font-size:11px;padding:10px 15px}.stats{gap:10px}.stat{padding:18px 14px;min-height:125px;border-radius:12px}.stat strong{font-size:23px;margin-top:14px}.stat>span{font-size:10px}.stat small{font-size:9px}.panel-heading{padding:19px}.panel-heading h2{font-size:16px}.panel-heading .text-button{font-size:10px}.filters{gap:12px}.filters label{min-width:125px}.filters input[type=search]{min-width:0}.form-grid,.plan-grid,.area-grid{grid-template-columns:1fr}.form-panel,.detail-card{padding:21px}.review-list article{display:block}.review-actions{margin-top:20px;align-items:flex-start}.collection-cards{padding:20px;gap:15px}.collection-cards article{grid-template-columns:1fr}.collection-cards strong{grid-column:1;font-size:22px}.collection-cards .mini-icon{margin-bottom:7px}.quick-links{padding:0 20px}.auth{margin:3vh auto}.auth-card{padding:26px}.print-sheet{margin-left:10px}.app-footer{padding:15px}.invoice-brand strong{font-size:20px}}
@page{size:A4 portrait;margin:10mm}
@media print{html,body{margin:0;padding:0;background:#fff}.print-toolbar{display:none!important}.print-sheet{margin:0;width:190mm;height:276mm;box-shadow:none;break-after:page;page-break-after:always;break-inside:avoid}.print-sheet:last-child{break-after:auto;page-break-after:auto}.invoice-card{break-inside:avoid;page-break-inside:avoid}.qr-error{display:block}.invoice-brand strong{font-size:19px}.per-8 .invoice-brand strong{font-size:16px}}

/* Theme control and screen-only palette. Paper invoices always retain black on white. */
.theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:36px;padding:8px 12px;border:1px solid var(--border);border-radius:20px;background:var(--white);color:var(--muted);font-size:11px;white-space:nowrap}.theme-toggle:hover{color:var(--dark);border-color:var(--green)}.theme-toggle svg{width:17px;height:17px}.theme-sun{display:none}html[data-theme=dark] .theme-sun{display:block}html[data-theme=dark] .theme-moon{display:none}
@media screen{html[data-theme=dark]{color-scheme:dark;--green:#218566;--dark:#8cdbba;--pale:#292929;--ink:#ededed;--muted:#b0b0b0;--border:#343434;--canvas:#121212;--white:#1e1e1e}
html[data-theme=dark] .sidebar,html[data-theme=dark] .topbar,html[data-theme=dark] .panel,html[data-theme=dark] .stat,html[data-theme=dark] .auth-card,html[data-theme=dark] .print-toolbar{background:var(--white)}
html[data-theme=dark] .brand,html[data-theme=dark] .auth-brand{color:#f1f1f1}html[data-theme=dark] .brand span,html[data-theme=dark] .auth-brand span,html[data-theme=dark] .topbar-title,html[data-theme=dark] .sidebar nav a,html[data-theme=dark] label,html[data-theme=dark] td small,html[data-theme=dark] .stat small,html[data-theme=dark] .stat>span,html[data-theme=dark] .muted,html[data-theme=dark] .pagination,html[data-theme=dark] .app-footer{color:var(--muted)}
html[data-theme=dark] .sidebar nav a:hover,html[data-theme=dark] tbody tr:hover,html[data-theme=dark] .button.secondary:hover{background:#292929}html[data-theme=dark] .sidebar nav a[aria-current],html[data-theme=dark] .avatar,html[data-theme=dark] .tabs a.selected,html[data-theme=dark] .count,html[data-theme=dark] .mini-icon{background:#2b2b2b;color:var(--dark)}
html[data-theme=dark] .button.secondary,html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background:#181818;color:var(--ink);border-color:#414141}html[data-theme=dark] input::placeholder{color:#969696}html[data-theme=dark] .record-number{color:#dedede}html[data-theme=dark] .plan-price{color:#f0f0f0}
html[data-theme=dark] th,html[data-theme=dark] .integration-note{background:#191919;color:var(--muted)}html[data-theme=dark] td,html[data-theme=dark] .panel-heading,html[data-theme=dark] .topbar,html[data-theme=dark] .quick-links a{border-color:var(--border)}html[data-theme=dark] .mini-icon{border-color:#414141}
html[data-theme=dark] .notice{background:#352e1a;border-color:#66562a;color:#ecda9e}html[data-theme=dark] .notice.success{background:#1b3828;border-color:#356346;color:#b7e6c5}html[data-theme=dark] .notice.error{background:#3c2422;border-color:#75423b;color:#f6bdb2}
html[data-theme=dark] .badge.green{background:#204532;color:#9ce0b5}html[data-theme=dark] .badge.amber{background:#40371e;color:#ebcf8b}html[data-theme=dark] .badge.red{background:#462b29;color:#f0b3a9}html[data-theme=dark] .badge.blue{background:#23394d;color:#a2d0f2}html[data-theme=dark] .review-label{color:#ddbd70}}
@media(max-width:560px){.theme-toggle{padding:8px;min-width:35px}.theme-toggle [data-theme-label]{display:none}}
@media print{.theme-toggle{display:none!important}}

/* Customer deletion confirmation */
.record-actions{display:flex;align-items:center;gap:18px;white-space:nowrap}
.text-button.text-danger{color:#b42318}
.button.danger{background:#b42318;border-color:#b42318;color:#fff}
.button.danger:hover{background:#912018;border-color:#912018}
.delete-panel{max-width:660px}.delete-panel>p{line-height:1.7;margin:24px 0}
.delete-identity{display:grid;grid-template-columns:150px 1fr;gap:14px;margin:0 0 24px}
.delete-identity dt{color:var(--muted)}.delete-identity dd{margin:0;overflow-wrap:anywhere}
.delete-panel input[name=confirmation]{max-width:360px}
.delete-panel .form-actions{display:flex;flex-wrap:wrap;gap:12px}
[data-theme="dark"] .text-button.text-danger{color:#fda29b}
@media(max-width:560px){.delete-identity{grid-template-columns:1fr;gap:8px}.delete-identity dd{margin-bottom:10px}}


/* Application layout and readable controls */
.shell {
  --sidebar-width: 190px;
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  padding: 20px 10px 12px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  background: var(--white);
  border-right: 1px solid var(--border);
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  padding: 0 8px;
}
.brand {
  display: block;
  font-size: 35px;
  font-weight: 750;
  letter-spacing: -2px;
  line-height: 1;
  color: #183a2c;
}
.brand span {
  display: block;
  margin-top: 6px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--muted);
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
}
.navigation-panel {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
}
.sidebar nav {
  display: grid;
  gap: 3px;
  padding: 16px 0 10px;
}
.sidebar nav a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}
.sidebar nav svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-bottom {
  margin-top: auto;
  padding: 4px 8px 0;
  border-top: 1px solid var(--border);
}
.sidebar-bottom .text-button { min-height: 38px; font-size: 14px; }
/* Support the dashboard wrapper from before the responsive navigation update. */
.app-content, .workspace { margin-left: var(--sidebar-width); min-width: 0; flex: 1; }
.topbar {
  min-height: 52px;
  padding: 5px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.topbar-title, .breadcrumb {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 600;
}
.topbar-actions, .admin { display: flex; align-items: center; gap: 10px; }
.topbar-actions { flex-shrink: 0; }
.admin { font-size: 14px; font-weight: 500; }
.admin small { display: block; color: var(--muted); font-size: 12px; }
main#main { max-width: 1700px; margin: 0 auto; padding: 20px 24px; }
.page-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 16px;
}
.page-heading h1 { font-size: clamp(27px, 2.8vw, 34px); line-height: 1.15; }
.page-heading p { margin-top: 4px; font-size: 14px; max-width: 750px; }
.heading-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; max-width: 100%; }
.shell label, .shell label.check, .auth label { font-size: 14px; }
.shell input, .shell select, .auth input { font-size: 16px; }
.shell input::placeholder { font-size: 14px; }
.shell .button, .shell .text-button, .auth .button { font-size: 14px; }
.shell .button.small { font-size: 13px; }
.shell th { font-size: 13px; padding: 12px 18px; }
.shell td { padding: 13px 18px; }
.shell td small, .stat > span, .stat small, .area-grid summary small { font-size: 12px; }
.stat-breakdown {
  border-top: 1px solid var(--border);
  margin: 12px 0 0;
  padding-top: 10px;
  font-size: 13px;
}
.stat-breakdown > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
  margin-bottom: 6px;
}
.stat-breakdown > div:last-child { margin-bottom: 0; }
.stat-breakdown dt { color: var(--muted); }
.stat-breakdown dd { margin: 0; text-align: end; overflow-wrap: anywhere; }
.shell td small.urdu { font-size: 16px; }
.auth-card > p, .auth-foot { font-size: 14px; }
.customer-service-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}
.customer-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 155px), 1fr));
  gap: 10px 12px;
  margin-bottom: 16px;
}
.customer-filters > label { min-width: 0; max-width: none; }
.customer-filters input[type=search] { min-width: 0; }
.customer-filters .check { align-self: center; padding-bottom: 0; }
.customer-filters .button { justify-self: start; }

@media (max-width: 850px) {
  .shell { display: block; }
  .sidebar {
    position: static;
    width: auto;
    padding: 5px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .sidebar-heading { min-height: 37px; padding: 0; }
  .brand { font-size: 27px; }
  .brand span { margin-top: 3px; font-size: 8px; }
  .menu-toggle:not([hidden]) { display: inline-flex; }
  .navigation-panel { max-height: 55vh; max-height: 55dvh; overflow-y: auto; }
  .sidebar[data-menu-open="false"] .navigation-panel { display: none; }
  .sidebar nav { padding-top: 8px; }
  .app-content, .workspace { margin-left: 0; }
  .topbar { min-height: 46px; padding: 4px 14px; }
  .admin .avatar { width: 28px; height: 28px; }
  .admin small { display: none; }
  main#main { padding: 14px; }
}
@media (max-width: 560px) {
  .customer-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .customer-filters > label:first-of-type { grid-column: 1 / -1; }
}

.pagination { flex-wrap: wrap; }
.pagination nav { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pagination [aria-current="page"] { cursor: default; }
.area-grid + .pagination { margin-top: 16px; padding-inline: 0; }

.print-sheet.per-4 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.printed-invoice {
  --bill-blue: #235478;
  --bill-rule: #9baebb;
  --bill-tint: #e7eff4;
  display: flex;
  gap: 0.1mm;
  padding: 2.5mm;
  border: 0.18mm dashed #8b969d;
  font: 8pt/1.15 Inter, Urdu, Arial, sans-serif;
  color: #111;
  background: #fff;
  print-color-adjust: exact;
}
.printed-invoice p { line-height: 1.25; }
.printed-invoice p,
.printed-invoice dt { color: #111; }
.printed-invoice h2 {
  margin: 0 0 0.4mm;
  color: var(--bill-blue);
  font: 700 9.3pt/1.2 Inter, Urdu, Arial, sans-serif;
}
.printed-brand > strong {
  display: block;
  margin-bottom: 0;
  font-size: 12.5pt;
  line-height: 1.2;
  text-align: center;
}
.printed-band,
.printed-subtitle {
  display: flex;
  justify-content: space-between;
  gap: 2mm;
  padding: 0.38mm 1.3mm;
  border: 0.2mm solid var(--bill-blue);
}
.printed-band {
  color: #fff;
  background: var(--bill-blue);
  font-weight: 700;
}
.printed-subtitle { border-top: 0; }
.printed-invoice dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: 0;
  font: inherit;
  border: 0.2mm solid var(--bill-rule);
}
.printed-invoice dl > div {
  display: grid;
  border-bottom: 0.2mm solid var(--bill-rule);
}
.printed-invoice dl > div:last-child { border-bottom: 0; }
.printed-details > div { grid-template-columns: minmax(0, 49%) minmax(0, 1fr); }
.printed-invoice dt,
.printed-invoice dd,
.printed-charge-head > span { padding: 0.1mm 1.25mm; }
.printed-invoice dd { border-left: 0.2mm solid var(--bill-rule); }
.printed-details dt { background: var(--bill-tint); font-weight: 600; }
.printed-charge-head,
.printed-charges > div { grid-template-columns: minmax(0, 73%) minmax(0, 1fr); }
.printed-charge-head {
  display: grid;
  border: 0.2mm solid var(--bill-rule);
  border-bottom: 0;
  background: var(--bill-tint);
  font-weight: 700;
}
.printed-charge-head > span:last-child {
  border-left: 0.2mm solid var(--bill-rule);
  text-align: right;
}
.printed-charges dd { text-align: right; font-variant-numeric: tabular-nums; }
.printed-charges > div:last-child {
  background: #eaf5ed;
  font-weight: 700;
  font-size: 9.2pt;
}
.printed-address,
.printed-footer {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  font: 8.4pt/1.3 Urdu, Inter, sans-serif;
}
.printed-address { margin-top: 0.5mm; }
.printed-payment {
  margin-top: 0;
  padding: 0.25mm 1.4mm;
  border: 0.3mm solid var(--bill-blue);
  background: #f4f8fb;
}
.printed-payment h2 {
  font-size: 8.5pt;
}
.printed-payment > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3mm;
}
.printed-payment p + p { margin-top: 0.7mm; }
.printed-payment p[lang="ur"] { text-align: left; }
.printed-payment .qr {
  flex: 0 0 18mm;
  width: 18mm;
  height: 18mm;
  border: 0.2mm solid var(--bill-rule);
  margin: 0;
  background: #fff;
}
.printed-payment .qr,
.printed-payment .qr svg { display: block; }
.printed-payment .qr svg { width: 100%; height: 100%; }
.printed-payment .preview-qr { display: grid; place-content: center; text-align: center; font-size: 7pt; color: #555; }
.printed-invoice .printed-support {
  flex: 0 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1mm;
  font-size: 8.5pt;
  line-height: 1.2;
}
.printed-support strong { font-size: 10pt; white-space: nowrap; }
.printed-footer { flex: 0 0 auto; text-align: center; }
.printed-office-copy {
  flex: 0 0 35mm;
  border-top: 0.25mm dashed #555;
  margin-top: auto;
  height: 35mm;
  min-height: 35mm;
  padding-top: 1mm;
  font-size: 9.5pt;
  line-height: 1.2;
}
.office-copy-heading,
.office-copy-customer,
.office-copy-phone,
.office-copy-due,
.office-copy-service {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 2mm;
}
.office-copy-heading { margin-bottom: 0.7mm; font-size: 9.5pt; }
.office-copy-heading > strong { color: var(--bill-blue); }
.office-copy-customer { margin-bottom: 0.7mm; }
.office-copy-contact { display: flex; justify-content: space-between; align-items: baseline; gap: 2mm; margin-bottom: 0.7mm; }
.office-copy-phone { min-width: 0; flex: 1; justify-content: flex-start; gap: 1mm; }
.office-copy-due { flex: 0 0 auto; gap: 1mm; white-space: nowrap; font-size: 8.5pt; }
.office-copy-due bdi { font-size: 9pt; font-weight: 600; }
.office-copy-service { margin-bottom: 1mm; }
.office-copy-customer > *,
.office-copy-phone > *,
.office-copy-service > * { min-width: 0; overflow-wrap: anywhere; }
.printed-invoice .office-copy-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.printed-invoice .office-copy-amounts > div {
  display: block;
  border: 0;
  border-right: 0.2mm solid var(--bill-rule);
}
.printed-invoice .office-copy-amounts > div:last-child { border-right: 0; }
.printed-invoice .office-copy-amounts dt { font-size: 8.5pt; }
.printed-invoice .office-copy-amounts dt span { display: block; }
.printed-invoice .office-copy-amounts dd { border: 0; font-size: 10pt; font-weight: 600; }

.blank-invoice { font-size: 9.5pt; line-height: 1.2; }
.blank-invoice h2 { font-size: 10.5pt; }
.blank-invoice-entry { display: inline-block; width: 17mm; height: 5mm; border-bottom: 0.2mm solid #777; vertical-align: bottom; }
.blank-invoice .printed-band .blank-invoice-entry { width: 19mm; border-color: currentColor; height: 3mm; }
.blank-invoice .printed-details dd .blank-invoice-entry,
.blank-invoice .printed-charges dd .blank-invoice-entry { display: block; width: 100%; }
.blank-invoice-payment { display: flex; justify-content: space-between; align-items: baseline; gap: 2mm; padding-block: 1mm; }
.blank-invoice-payment .blank-invoice-entry { width: 15mm; }
.blank-invoice .office-copy-customer > span:first-child { flex: 1; }
.blank-invoice .office-copy-customer > span:first-child .blank-invoice-entry { width: 28mm; }
.blank-invoice .office-copy-customer > span:last-child .blank-invoice-entry { width: 14mm; }
.blank-invoice .office-copy-phone .blank-invoice-entry { width: 35mm; }
.blank-invoice .office-copy-contact { margin-bottom: 0.4mm; }
.blank-invoice .office-copy-service { gap: 2mm; font-size: 9.5pt; margin-bottom: 0.5mm; }
.blank-invoice .office-copy-service .blank-invoice-entry { width: 20mm; }
.blank-invoice .printed-office-copy { font-size: 10pt; }
.blank-invoice .printed-office-copy .blank-invoice-entry { height: 4mm; }
.blank-invoice .office-copy-amounts dt { font-size: 9pt; }
.blank-invoice .office-copy-amounts .blank-invoice-entry { display: block; width: 100%; }

.single-customer-generation > summary { cursor: pointer; font-size: 18px; font-weight: 600; }
.single-customer-generation[open] > summary { margin-bottom: 18px; }
.cash-received-form { margin: 0; }
.cash-confirm { width: min(520px, calc(100% - 32px)); max-height: calc(100vh - 32px); margin: auto; padding: 24px; overflow-y: auto; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: #19271f; box-shadow: 0 20px 70px #0004; }
.cash-confirm::backdrop { background: #0008; }
.cash-confirm p { margin-top: 14px; color: inherit; overflow-wrap: anywhere; }
.cash-confirm .form-actions { margin-top: 20px; }
html[data-theme="dark"] .cash-confirm { background: #202020; color: #eee; }

.account-summary {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 225px), 1fr));
}
.account-summary .stat-breakdown dd {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.account-area-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 440px), 1fr));
  gap: 18px;
}
.account-area { margin-bottom: 0; }
.account-area-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px 16px;
  margin: 0;
  padding: 16px 18px;
}
.account-area-metrics dd {
  margin-top: 6px;
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.account-area th,
.account-area td { padding: 9px 12px; }
.account-area th { white-space: normal; }
.account-area tbody th { text-align: left; }
.account-area :is(th, td):not(:first-child) { text-align: right; }
.account-area td { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 500px) {
  .account-area-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-area th,
  .account-area td { padding-inline: 7px; }
}

.office-customer-list {
  width: 190mm;
  max-width: 100%;
  padding: 7mm;
  margin: 8mm auto;
  background: #fff;
  color: #111;
}
.office-customer-list table { table-layout: fixed; font-size: 8.5pt; }
.office-customer-list th,
.office-customer-list td {
  padding: 1.5mm 1.2mm;
  border: 0.2mm solid #777;
  color: #111;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.office-customer-list col:nth-child(1) { width: 5%; }
.office-customer-list col:nth-child(2) { width: 9%; }
.office-customer-list col:nth-child(3) { width: 20%; }
.office-customer-list col:nth-child(4) { width: 14%; }
.office-customer-list col:nth-child(5) { width: 11%; }
.office-customer-list col:nth-child(6) { width: 10%; }
.office-customer-list col:nth-child(7) { width: 9%; }
.office-customer-list col:nth-child(8) { width: 10%; }
.office-customer-list col:nth-child(9) { width: 12%; }
.office-customer-list th { font-size: 7.5pt; font-weight: 600; white-space: normal; }
.office-customer-list td.urdu { font-size: 10.5pt; }
.office-customer-list :is(th,td):nth-child(n+6) { text-align: right; }
.office-customer-list .office-list-serial { text-align: center; }
.office-customer-list .office-list-mobile { text-align: left; font-size: 8pt; }
.office-customer-list .office-list-due { text-align: center; white-space: nowrap; font-size: 8.25pt; font-variant-numeric: tabular-nums; }
.office-customer-list tfoot { display: table-row-group; font-weight: 600; }
.office-customer-list .office-list-title { padding: 0 0 4mm; border: 0; text-align: center; }
.office-list-title h1 { font-size: 19pt; letter-spacing: 0; }
.office-list-title p { font-size: 10pt; margin-top: 1.5mm; color: #111; }
.office-list-title .office-list-note,
.office-customer-list .office-list-prior,
.office-customer-list .office-list-service { font-size: 7.5pt; line-height: 1.4; color: #333; }
.office-customer-list .office-list-prior,
.office-customer-list .office-list-service { margin-top: 1mm; }
html[data-theme] .office-customer-list th,
html[data-theme] .office-customer-list tr:hover { background: #fff; color: #111; }
html[data-theme] .office-customer-list td { border-color: #777; }
@media print {
  .office-customer-list { width: 100%; max-width: none; padding: 0; margin: 0; }
  .office-customer-list + .office-customer-list { break-before: page; }
  .office-customer-list thead { display: table-header-group; }
  .office-customer-list tr { break-inside: avoid; page-break-inside: avoid; }
}
