@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Bengali:wght@400;500;600;700;800&display=swap');
:root{--green:#087f5b;--green-dark:#066747;--ink:#1d2939;--muted:#667085;--line:#e5e7eb;--bg:#f4f7f6;--red:#b42318}
*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"Noto Sans Bengali",system-ui,sans-serif;font-size:15px;line-height:1.6}.wrap{width:min(1120px,92%);margin:auto}.site-header{background:linear-gradient(120deg,#075e45,#0b956c);color:white;padding:22px 0;box-shadow:0 5px 18px #063b2b22}.brand{font-size:clamp(23px,4vw,32px);font-weight:800}.tagline{opacity:.9;font-size:14px}.main{padding:28px 0 50px;min-height:70vh}.narrow{max-width:700px}.search-card,.history-card,.customer-card,.stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:0 5px 20px #10182808;margin-bottom:22px}.search-card h1,.history-card h2{margin:0 0 8px}.search-card p{margin:5px 0 16px}.search-form{display:flex;gap:10px}.search-form input{flex:1;min-width:0}.search-form button{white-space:nowrap}input,select,textarea{font:inherit;width:100%;border:1px solid #d0d5dd;border-radius:9px;padding:11px 12px;background:white;color:var(--ink);outline:none}input:focus,select:focus,textarea:focus{border-color:var(--green);box-shadow:0 0 0 3px #087f5b1a}button,.button-link{display:inline-block;background:var(--green);color:white;border:0;border-radius:9px;padding:11px 17px;font:inherit;font-weight:700;cursor:pointer;text-decoration:none}button:hover,.button-link:hover{background:var(--green-dark)}.secondary{background:#475467}.danger-button{background:#b42318;margin-top:8px}.customer-card{display:flex;align-items:center;justify-content:space-between;gap:20px}.customer-card h2{margin:2px 0}.balance{background:#e8f7f0;color:#075e45;border-radius:12px;padding:15px 18px;min-width:190px}.balance strong{font-size:25px}.small{font-size:12px}.muted{color:var(--muted)}.history-card h2{font-size:21px}.table-scroll{overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:13px}th,td{padding:12px 10px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top;min-width:100px}th{background:#f8fafc;font-weight:700;white-space:nowrap}td:nth-child(3){min-width:120px}.pill{display:inline-block;border-radius:99px;padding:4px 8px;font-size:12px;font-weight:700;white-space:nowrap}.pill-due{background:#fff1f0;color:#b42318}.pill-paid{background:#e8f7f0;color:#087f5b}.amount-due{color:#b42318;font-weight:700;white-space:nowrap}.amount-paid{color:#087f5b;font-weight:700;white-space:nowrap}.balance-footer{border-top:2px solid var(--line);padding-top:15px;text-align:right;font-size:18px;margin-top:12px}.site-footer{text-align:center;padding:22px;color:var(--muted);font-size:13px}.notice{padding:13px 16px;border-radius:10px;margin-bottom:18px;background:#e8f7f0;color:#075e45}.notice.error{background:#fff1f0;color:#b42318}.stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.stat{margin:0;display:flex;flex-direction:column;gap:8px}.stat span{color:var(--muted);font-size:14px}.stat strong{font-size:27px}.quick-links{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 24px}.admin-head{display:flex;align-items:center;justify-content:space-between;gap:20px}.admin-head nav{display:flex;gap:14px;flex-wrap:wrap}.admin-head nav a{color:white;text-decoration:none;font-size:13px}.admin-head nav a:hover{text-decoration:underline}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.form-grid label,.stack-form label,.edit-form label{display:flex;flex-direction:column;gap:6px;font-weight:600;font-size:14px}.form-grid .full{grid-column:1/-1}.form-action{display:flex;align-items:end}.stack-form{display:flex;flex-direction:column;gap:14px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:15px}.section-head h2{margin:0}.inline-search{display:flex;gap:7px}.inline-search input,.inline-search select{min-width:180px}.inline-search button{padding:8px 12px}.actions{min-width:145px}.actions a{color:var(--green);font-weight:700}.inline-form{display:inline-block}.small-button{font-size:12px;padding:5px 8px;margin-top:5px}.edit-form{display:flex;flex-direction:column;gap:8px;min-width:230px;padding:10px 0}.edit-form label{font-size:12px}.delete-form{margin:0 0 10px}.edit-form button{padding:7px}.inline-form button{white-space:nowrap}.button-link.secondary:hover{background:#344054}.table-scroll details summary{cursor:pointer;color:var(--green);font-weight:700}.stack-form hr{width:100%;border:0;border-top:1px solid var(--line)}hr{border:0;border-top:1px solid var(--line);margin:20px 0}
@media(max-width:700px){.search-card,.history-card,.customer-card{padding:17px}.search-form{flex-direction:column}.customer-card{align-items:flex-start;flex-direction:column}.balance{width:100%}.admin-head{align-items:flex-start;flex-direction:column}.admin-head nav{gap:9px 13px}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}.section-head{align-items:stretch;flex-direction:column}.inline-search{width:100%}.inline-search input,.inline-search select{min-width:0;flex:1}.stats{grid-template-columns:1fr}.balance-footer{text-align:left}.brand{font-size:24px}}

/* Added customer photos and due-customer list */
.stat-link{color:var(--ink);text-decoration:none;transition:transform .15s,box-shadow .15s}.stat-link:hover{transform:translateY(-2px);box-shadow:0 8px 24px #10182814}.stat-link small{color:var(--green);font-weight:700}.customer-thumb{display:block;width:28px!important;height:28px!important;min-width:28px;max-width:28px;min-height:28px;max-height:28px;aspect-ratio:1/1;object-fit:cover;border-radius:50%;border:1px solid var(--line);cursor:zoom-in;flex:0 0 28px}.customer-photo-link{display:inline-flex;width:28px;height:28px;align-items:center;justify-content:center;vertical-align:middle}.photo-placeholder{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:50%;background:#f2f4f7;color:var(--muted);font-size:8px;text-align:center;overflow:hidden}.photo-lightbox{display:none;position:fixed;z-index:9999;inset:0;background:rgba(0,0,0,.82);align-items:center;justify-content:center;padding:20px}.photo-lightbox.open{display:flex}.photo-lightbox img{display:block;width:auto!important;height:auto!important;max-width:min(90vw,900px)!important;max-height:85vh!important;object-fit:contain;border-radius:8px;background:#fff;box-shadow:0 12px 48px #0008;cursor:zoom-out}.photo-lightbox-close{position:absolute;top:14px;right:18px;color:#fff;font-size:32px;line-height:1;cursor:pointer;background:transparent;border:0;padding:8px 12px}.check-line{display:flex!important;flex-direction:row!important;align-items:center;gap:8px!important}.check-line input{width:auto}.due-summary{display:flex;gap:24px;flex-wrap:wrap;background:#fff1f0;color:#912018;border-radius:10px;padding:14px 16px}.due-summary strong{font-size:20px}

/* Hard-fixed customer thumbnails: never inherit global image sizing */
html body .table-scroll table td img.customer-thumb, html body img.customer-thumb { width:28px!important; height:28px!important; min-width:28px!important; min-height:28px!important; max-width:28px!important; max-height:28px!important; object-fit:cover!important; aspect-ratio:1/1!important; display:block!important; border-radius:50%!important; flex:0 0 28px!important; }
html body .customer-photo-link { display:inline-flex!important; width:28px!important; height:28px!important; min-width:28px!important; max-width:28px!important; overflow:hidden!important; align-items:center!important; justify-content:center!important; }

/* Photo is a tiny text link beside the customer name; never render a thumbnail in tables. */
.photo-text-link{display:inline-block!important;font-size:11px!important;line-height:1.4!important;padding:1px 4px!important;margin-left:4px!important;color:#087f5b!important;background:#e8f7f0!important;border:1px solid #b7e4d0!important;border-radius:4px!important;text-decoration:none!important;white-space:nowrap!important;vertical-align:middle!important}
.photo-text-link:hover{background:#d2f0e2!important;text-decoration:underline!important}
