:root{--blue:#1a73e8;--blue2:#0b57d0;--bg:#f6f8fc;--card:#fff;--text:#1f1f1f;--muted:#5f6368;--ok:#188038;--warn:#b06000;--danger:#d93025;--border:#dfe3eb;--shadow:0 6px 20px rgba(40,60,90,.10)}
*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif}body{min-height:100vh}.hidden{display:none!important}.agent-phone-link{color:var(--blue2);font-weight:800;text-decoration:underline;text-underline-offset:2px}
.splash{position:fixed;inset:0;background:#fff;display:grid;place-items:center;z-index:9999}.splash-card{text-align:center}.logo{width:84px;height:84px;border-radius:24px;background:linear-gradient(135deg,var(--blue),#6ea8fe);display:grid;place-items:center;color:#fff;font-size:38px;font-weight:800;margin:auto;box-shadow:var(--shadow)}
header{position:sticky;top:0;z-index:50;background:#fff;border-bottom:1px solid var(--border)}.topbar{display:flex;align-items:center;gap:12px;padding:10px 14px}.brand{font-weight:800;flex:1}.assoc-name{font-size:12px;color:var(--muted)}.icon-btn{border:0;background:#edf3fe;color:var(--blue2);width:42px;height:42px;border-radius:50%;font-size:20px}.breadcrumb{padding:0 14px 10px;color:var(--muted);font-size:12px;white-space:nowrap;overflow:auto}.persistent-fee-banner{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 14px 10px;padding:9px 12px;border:1px solid #f0bf71;border-radius:12px;background:#fff4df;color:#7a3d00}.persistent-fee-copy{display:grid;gap:2px;min-width:0}.persistent-fee-copy strong{font-size:13px}.persistent-fee-copy span{font-size:12px;line-height:1.3}.persistent-fee-pay{flex:0 0 auto;border-radius:10px;background:#bd5c00;color:#fff;padding:9px 17px;font-weight:800;text-decoration:none}.persistent-fee-help{font-size:12px;font-weight:700;text-align:right}
main{max-width:1100px;margin:auto;padding:14px 14px 90px}.page{display:none}.page.active{display:block}.grid{display:grid;gap:12px}.kpis{grid-template-columns:repeat(2,1fr)}.card{background:var(--card);border:1px solid var(--border);border-radius:18px;padding:16px;box-shadow:var(--shadow)}.kpi .label{font-size:12px;color:var(--muted)}.kpi .value{font-size:23px;font-weight:800;margin-top:5px}.positive{color:var(--ok)}.negative{color:var(--danger)}
h2{font-size:22px;margin:4px 0 14px}h3{margin:0 0 12px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.subtle{color:var(--muted);font-size:13px}
form{display:grid;gap:12px}.form-grid{display:grid;gap:12px}.field{display:grid;gap:6px}.field label{font-size:13px;font-weight:700}.field input,.field select,.field textarea{width:100%;border:1px solid #c7ccd5;border-radius:12px;padding:13px 12px;font:inherit;background:#fff;color:var(--text)}.field textarea{min-height:90px;resize:vertical}.field input:focus,.field select:focus,.field textarea:focus{outline:2px solid #c2d7ff;border-color:var(--blue)}
.btn{border:0;border-radius:14px;padding:13px 16px;font-weight:800;font-size:15px;min-height:48px;cursor:pointer}.btn-primary{background:var(--blue);color:#fff}.btn-secondary{background:#e8f0fe;color:var(--blue2)}.btn-danger{background:#fce8e6;color:var(--danger)}.btn-row{display:flex;gap:10px;flex-wrap:wrap}.btn-row .btn{flex:1}.pill{display:inline-flex;align-items:center;padding:5px 9px;border-radius:999px;font-size:11px;font-weight:800;background:#e8f0fe;color:var(--blue2)}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:14px;background:#fff}table{border-collapse:collapse;width:100%;min-width:720px}th,td{padding:11px 12px;border-bottom:1px solid var(--border);text-align:left;font-size:13px}th{background:#f8fafd;position:sticky;top:0}.empty{text-align:center;padding:32px;color:var(--muted)}
.bottom-nav{position:fixed;bottom:0;left:0;right:0;background:#fff;border-top:1px solid var(--border);display:grid;grid-template-columns:repeat(5,1fr);z-index:60}.nav-item{border:0;background:transparent;padding:9px 4px;color:var(--muted);font-size:11px}.nav-item span{display:block;font-size:21px}.nav-item.active{color:var(--blue2);font-weight:800}
.quick-actions{grid-template-columns:repeat(2,1fr)}.quick{display:flex;align-items:center;gap:12px}.quick .qicon{width:44px;height:44px;border-radius:14px;background:#e8f0fe;display:grid;place-items:center;font-size:22px}.quick strong{display:block}.quick small{color:var(--muted)}.finance-kpi{display:grid;align-content:start;gap:5px;min-height:126px}.finance-kpi small{font-size:13px;font-weight:800;color:#415774}.finance-kpi strong{font-size:23px;line-height:1.15}.kpi-explanation{font-size:11px;line-height:1.35;color:var(--muted);font-style:italic}.kpi-link{margin-top:auto}
.auction-layout{display:grid;grid-template-columns:1fr;gap:14px}.auction-kpis{grid-template-columns:repeat(2,1fr)}
.public-auction-shell{min-height:100vh;background:#eaf0f6;padding:18px}.public-auction-content{max-width:1040px;margin:0 auto}.public-auction-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px}.public-auction-head h1{margin:2px 0 0;font-size:28px}.public-auction-head small{color:var(--muted);font-weight:800}.public-auction-grid{display:grid;grid-template-columns:1fr;gap:14px;margin-top:14px}
.market-board-head{color:#4b1d05}.public-auction-shell{background:linear-gradient(180deg,#fff3d6 0,#ffe0a6 38%,#fff8e8 100%)}.public-auction-content{position:relative}.public-auction-content:before{content:"";position:absolute;inset:-18px -12px auto;height:7px;background:linear-gradient(90deg,#c2410c,#f59e0b,#facc15,#15803d,#dc2626);border-radius:0 0 999px 999px}.market-status-wrap{display:flex;align-items:center;gap:10px;flex-wrap:wrap;justify-content:flex-end}.market-status-wrap>span:last-child{font-size:12px;font-weight:900;color:#7c2d12;text-transform:uppercase;letter-spacing:.08em}.market-hero{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:12px}.market-price-panel,.market-stat-panel,.market-strip,.market-bid-card,.market-depth-card{border:1px solid rgba(194,65,12,.22);background:#fffaf0;color:#451a03;box-shadow:0 18px 42px rgba(154,52,18,.14)}.market-price-panel{padding:22px;border-radius:8px;background:linear-gradient(135deg,#fff7ed,#ffedd5 48%,#fef3c7)}.market-price-panel small,.market-stat-panel small,.market-top-bid small{display:block;color:#9a3412;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.market-price-panel strong{display:block;margin-top:6px;font-size:clamp(34px,7vw,72px);line-height:.95;color:#b91c1c;text-shadow:0 2px 0 rgba(255,255,255,.75)}.market-price-panel span{display:block;margin-top:12px;color:#5f2c08;font-weight:900}.market-stat-panel{display:grid;grid-template-columns:1fr;gap:1px;border-radius:8px;overflow:hidden;background:#fed7aa}.market-stat-panel div{padding:16px;background:#fff7ed}.market-stat-panel b{display:block;margin-top:5px;color:#7f1d1d;font-size:20px}.market-strip{display:grid;grid-template-columns:repeat(3,1fr);gap:1px;border-radius:8px;overflow:hidden;margin-bottom:14px;background:#fdba74}.market-step{border:0;background:#fff7ed;color:#451a03;padding:14px 10px;text-align:left;cursor:pointer}.market-step:hover{background:#ffedd5}.market-step small{display:block;color:#9a3412;font-size:11px;text-transform:uppercase;font-weight:900}.market-step strong{display:block;margin-top:4px;color:#b91c1c;font-size:18px}.market-bid-card h3,.market-depth-card h3{color:#4b1d05}.market-bid-card label{color:#7c2d12}.market-bid-card input,.market-bid-card select{background:#fffdf7;border-color:#f59e0b;color:#451a03}.market-bid-card .pill,.market-depth-card .pill{background:#ffedd5;color:#9a3412}.market-top-bid{padding:16px;border-radius:8px;background:#fff7ed;border:1px solid rgba(245,158,11,.35);margin-bottom:12px}.market-top-bid strong{display:block;color:#b91c1c;font-size:30px}.market-top-bid span{color:#5f2c08;font-weight:900}.market-top-bid.muted strong{color:#92400e}.market-bid-list{display:grid;gap:8px}.market-bid-row{display:grid;grid-template-columns:32px 1fr auto;gap:10px;align-items:center;padding:10px 0;border-bottom:1px solid rgba(194,65,12,.14)}.market-bid-row span{width:24px;height:24px;border-radius:50%;display:grid;place-items:center;background:#f97316;color:#fff7ed;font-size:12px;font-weight:900}.market-bid-row strong{color:#451a03}.market-bid-row b{color:#b91c1c}.public-auction-shell .subtle{color:#7c4a13}.public-auction-shell .card{border-radius:8px}.festival-progress{margin-top:18px}.festival-progress div{height:14px;background:#fed7aa;border-radius:999px;overflow:hidden;border:1px solid rgba(194,65,12,.18)}.festival-progress div span{display:block;height:100%;background:linear-gradient(90deg,#dc2626,#f97316,#facc15,#16a34a);border-radius:999px}.festival-progress small{margin-top:6px;color:#7c2d12}.festival-graph{margin:14px 0;padding:14px;border-radius:8px;background:#fffaf0;border:1px solid rgba(245,158,11,.28)}.festival-graph-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;color:#7c2d12;font-weight:900}.festival-graph-title b{color:#b91c1c}.festival-graph-row{display:grid;grid-template-columns:30px 1fr;gap:10px;align-items:center;margin:10px 0}.festival-graph-rank{width:26px;height:26px;border-radius:50%;display:grid;place-items:center;background:#dc2626;color:#fff;font-weight:900;font-size:12px}.festival-graph-label{display:flex;justify-content:space-between;gap:10px;font-size:12px;font-weight:900;color:#5f2c08}.festival-graph-label strong{color:#b91c1c}.festival-graph-track{height:13px;border-radius:999px;background:#ffedd5;overflow:hidden;border:1px solid rgba(194,65,12,.16)}.festival-graph-track span{display:block;height:100%;border-radius:999px;background:linear-gradient(90deg,#f97316,#facc15,#16a34a)}
.login-shell{min-height:100vh;display:grid;place-items:center;padding:20px}.login-card{width:min(440px,100%)}.login-title{text-align:center;margin-bottom:18px}.login-title .logo{width:68px;height:68px;font-size:30px;border-radius:20px}.statusbar{position:fixed;top:70px;right:12px;z-index:100;background:#202124;color:#fff;border-radius:12px;padding:10px 13px;max-width:340px;box-shadow:var(--shadow);font-size:13px}.statusbar.ok{background:var(--ok)}.statusbar.err{background:var(--danger)}
.charts{display:grid;gap:12px}.bar-row{display:grid;grid-template-columns:80px 1fr 80px;gap:8px;align-items:center;font-size:12px}.bar{height:10px;border-radius:999px;background:#e9edf5;overflow:hidden}.bar i{display:block;height:100%;background:var(--blue);border-radius:999px}.modal{position:fixed;inset:0;background:rgba(0,0,0,.45);display:grid;place-items:end center;z-index:200}.modal-card{background:#fff;width:min(640px,100%);max-height:92vh;overflow:auto;border-radius:24px 24px 0 0;padding:18px}.receipt{background:#fff;border:2px dashed #c5c9d0;padding:18px;border-radius:14px}.receipt-head{text-align:center}.receipt-logo{max-width:72px;max-height:72px;border-radius:14px}.receipt dl{display:grid;grid-template-columns:130px 1fr;gap:8px;margin:18px 0}.receipt dt{color:var(--muted)}.receipt dd{margin:0;font-weight:700}.settings-logo{width:72px;height:72px;object-fit:cover;border-radius:14px;border:1px solid var(--border)}
.bug-screenshot-preview{display:block;width:100%;max-height:240px;object-fit:contain;margin-top:8px;border:1px solid var(--border);border-radius:8px;background:#f8fafd}
.demo-mode-banner{position:sticky;top:0;z-index:160;background:linear-gradient(90deg,#7f1d1d,#b45309,#d97706);color:#fff;border-bottom:1px solid #fbbf24;padding:10px 16px;text-align:center;font-weight:800;font-size:13px;box-shadow:0 4px 14px rgba(127,29,29,.18)}.demo-mode-banner strong{display:inline-flex;align-items:center;margin-right:10px;background:#fff7ed;color:#991b1b;border-radius:999px;padding:3px 10px;font-size:12px}.demo-mode-banner span{color:#fff7ed}.demo-mode-badge{display:inline-flex;align-items:center;justify-content:center;min-height:34px;padding:0 12px;border-radius:999px;background:#fff7ed;color:#991b1b;border:1px solid #f59e0b;font-weight:900;font-size:12px;letter-spacing:.08em}
.section-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.icon-btn.compact{width:34px;height:34px;border-radius:8px;font-size:17px}.refresh-laddu-bids.spinning{animation:spinOnce .8s linear infinite}@keyframes spinOnce{to{transform:rotate(360deg)}}.auction-winner-card{border:1px solid rgba(194,65,12,.22);background:linear-gradient(135deg,#fff7ed,#fef3c7);color:#451a03;display:grid;gap:8px;align-content:center}.auction-winner-card small{color:#9a3412;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.auction-winner-card h2{margin:0;color:#7f1d1d;font-size:clamp(26px,4vw,44px);line-height:1.05}.auction-winner-card strong{color:#b91c1c;font-size:clamp(34px,5vw,60px);line-height:1}.auction-winner-card p{margin:0;color:#6b3b12;font-weight:800;line-height:1.45}
.auction-item-card{display:grid;grid-template-columns:132px 1fr;gap:16px;align-items:center;margin-bottom:14px;border:1px solid rgba(194,65,12,.22);background:#fffaf0;color:#451a03}.auction-item-card img{width:132px;aspect-ratio:1;border-radius:8px;object-fit:cover;border:1px solid rgba(245,158,11,.35);background:#fff7ed}.auction-item-card small{display:block;color:#9a3412;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.auction-item-card strong{display:block;margin:4px 0 6px;color:#4b1d05;font-size:18px}.auction-item-card p{margin:0;color:#6b3b12;line-height:1.45}.tentative-bid-panel{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding:12px;border:1px solid rgba(245,158,11,.35);border-radius:8px;background:#fff7ed}.tentative-bid-panel div{padding:12px;border-radius:8px;background:#fffaf0;border:1px solid rgba(194,65,12,.14)}.tentative-bid-panel small,.auction-payment-qr small{display:block;color:#9a3412;font-size:11px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}.tentative-bid-panel strong{display:block;margin-top:4px;color:#b91c1c;font-size:22px}.auction-payment-qr{display:grid;grid-template-columns:112px 1fr;gap:14px;align-items:center;padding:12px;border:1px solid rgba(245,158,11,.35);border-radius:8px;background:#fffaf0}.auction-payment-qr img{width:112px;height:112px;border-radius:8px;background:#fff;border:1px solid rgba(194,65,12,.18);padding:6px}.auction-payment-qr strong{display:block;margin-top:4px;color:#b91c1c;font-size:24px}.auction-payment-qr span{display:block;margin-top:4px;color:#7c4a13;font-weight:800;word-break:break-word}.auction-payment-qr.muted{grid-template-columns:1fr;border-style:dashed}.auction-photo-preview{align-self:end}.auction-photo-preview img{width:100%;max-height:190px;object-fit:cover;border-radius:8px;border:1px solid var(--border);background:#f8fafd}.laddu-details-cell{display:grid;gap:2px}.laddu-details-cell small{display:block;color:var(--muted);font-size:12px}
.smart-donation-grid{align-items:start}.smart-donation-card{display:grid;gap:14px}.smart-donation-card p{margin:0;color:#6b3b12;line-height:1.55}.smart-upi-link{display:inline-flex;align-items:center;justify-content:center;margin-top:10px;text-decoration:none}.smart-donation-receipt{max-width:640px;margin:0 auto;background:#fffdf7}.smart-link-panel{display:grid;gap:10px;margin-top:14px;padding:14px;border:1px solid var(--border);border-radius:12px;background:#f8fafd}.smart-link-panel small{display:block;margin-top:4px;color:var(--muted);word-break:break-all}.smart-qr-modal{text-align:center;display:grid;gap:12px;justify-items:center}.smart-qr-modal img{width:260px;max-width:100%;border:1px solid var(--border);border-radius:12px;padding:10px;background:#fff}
#publicDonationForm .form-grid{grid-template-columns:1fr}#publicDonationForm .span-2{grid-column:1}.smart-donation-grid #publicDonationForm input,.smart-donation-grid #publicDonationForm select,.smart-donation-grid #publicDonationForm textarea{min-width:0}.smart-donation-grid #publicDonationForm .field label{line-height:1.25}.smart-donation-grid .auction-payment-qr{grid-template-columns:140px minmax(0,1fr)}.smart-donation-grid .auction-payment-qr img{width:140px;height:140px}.smart-donation-grid .auction-payment-qr .btn{width:max-content;max-width:100%}
@media (max-width:640px){.auction-item-card{grid-template-columns:1fr}.auction-item-card img{width:100%;max-height:240px;aspect-ratio:16/10}.tentative-bid-panel,.auction-payment-qr{grid-template-columns:1fr}.auction-payment-qr img{width:150px;height:150px}.auction-photo-preview img{max-height:220px}}
.beta-badge{display:inline-flex;align-items:center;margin-left:6px;padding:2px 6px;border-radius:999px;background:#fff3cd;color:#8a4b00;border:1px solid #f1c36d;font-size:10px;font-weight:900;letter-spacing:.05em;vertical-align:middle}.setup-checklist{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin:10px 0 14px}.setup-check{border:1px solid var(--border);border-radius:8px;padding:10px;background:#fff;display:grid;gap:3px}.setup-check.done{border-color:#b7dfc1;background:#f1fbf3}.setup-check.missing{border-color:#f0c36d;background:#fff8e1}.setup-check span{font-size:12px;color:var(--muted);font-weight:800}.version-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:10px;margin-top:10px}.version-grid div{border:1px solid var(--border);border-radius:8px;padding:10px;background:#f8fafd}.version-grid small{display:block;color:var(--muted);font-weight:800}.version-grid strong{display:block;margin-top:3px;font-size:13px;word-break:break-word}
@media(min-width:720px){.kpis{grid-template-columns:repeat(4,1fr)}.quick-actions{grid-template-columns:repeat(4,1fr)}.auction-layout{grid-template-columns:1fr 1fr}.auction-kpis{grid-template-columns:repeat(4,1fr)}.public-auction-grid{grid-template-columns:1.2fr .8fr}.market-hero{grid-template-columns:1.35fr .65fr}.form-grid{grid-template-columns:repeat(2,1fr)}.span-2{grid-column:span 2}.bottom-nav{left:50%;transform:translateX(-50%);max-width:760px;border:1px solid var(--border);border-bottom:0;border-radius:20px 20px 0 0}.charts{grid-template-columns:1fr 1fr}.modal{place-items:center}.modal-card{border-radius:24px}}
@media(max-width:1024px){.smart-donation-grid{grid-template-columns:1fr!important}.smart-donation-grid .card{width:100%;max-width:none}.smart-donation-grid .auction-payment-qr{max-width:640px}}
@media(max-width:560px){.public-auction-shell{padding:14px 10px}.public-auction-head{display:grid;gap:8px}.public-auction-head h1{font-size:28px;line-height:1.1}.smart-donation-grid .auction-payment-qr{grid-template-columns:1fr;text-align:left}.smart-donation-grid .auction-payment-qr img{width:180px;height:180px;max-width:100%;justify-self:center}.smart-donation-grid .auction-payment-qr .btn{width:100%}#publicDonationForm .btn-primary{width:100%;white-space:normal}}
@media print{header,.bottom-nav,.no-print,.btn{display:none!important}body{background:#fff}.modal{position:static;background:#fff}.modal-card{max-height:none;width:100%;padding:0}.receipt{border:0}}

/* Full role-aware application navigation */
.app-menu{position:fixed;top:0;left:0;bottom:0;width:min(340px,88vw);background:#fff;z-index:180;padding:16px;box-shadow:8px 0 30px rgba(0,0,0,.18);overflow:auto}.menu-backdrop{position:fixed;inset:0;background:rgba(0,0,0,.38);z-index:170}.menu-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:14px;border-bottom:1px solid var(--border);margin-bottom:10px}.menu-item{width:100%;border:0;background:transparent;display:flex;align-items:center;gap:12px;text-align:left;padding:14px 12px;border-radius:12px;font:inherit;font-weight:700;color:var(--text);cursor:pointer}.menu-item:hover,.menu-item.active{background:#e8f0fe;color:var(--blue2)}.menu-section{font-size:11px;font-weight:900;text-transform:uppercase;color:var(--muted);padding:18px 12px 6px;letter-spacing:.08em}.bottom-nav{overflow-x:auto;grid-template-columns:repeat(7,minmax(78px,1fr))}.bottom-nav .nav-item{min-width:78px}.topbar .brand{min-width:0}@media(min-width:1000px){.bottom-nav{max-width:900px}}

/* Cloud API status and disabled-state additions */
.pill.offline{background:#fee2e2;color:#991b1b}
button:disabled{opacity:.65;cursor:wait}
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
.bar-row{display:grid;grid-template-columns:minmax(80px,1fr) 3fr auto;gap:10px;align-items:center;margin:10px 0}
.bar{height:10px;background:#e8eef9;border-radius:999px;overflow:hidden}
.bar i{display:block;height:100%;background:#1a73e8;border-radius:999px}
.activity{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #edf1f7}
.activity span{display:grid;gap:3px}.activity small{color:#687386}


/* ============================================================
   UI ENHANCEMENT v2.1
   ============================================================ */
.brand-wrap{min-width:0;flex:1}.topbar-actions{display:flex;align-items:center;gap:8px;margin-left:auto}.text-btn{border:1px solid var(--border);background:#fff;color:var(--blue2);border-radius:999px;min-height:40px;padding:0 14px;font-weight:800;cursor:pointer}.text-btn:hover{background:#edf3fe}.signout-btn{border:0;background:#fce8e6;color:#b3261e;border-radius:999px;min-height:42px;padding:0 14px;display:inline-flex;align-items:center;gap:7px;font-weight:800;cursor:pointer}.signout-btn:hover{background:#f9d5d2}.signout-btn span:first-child{font-size:19px}.breadcrumb{display:flex;align-items:center;gap:7px}.breadcrumb a{color:var(--blue2);font-weight:700;text-decoration:none}.breadcrumb a:hover{text-decoration:underline}.breadcrumb strong{color:var(--text)}
.quick-actions:has(.quick:nth-child(3):last-child){grid-template-columns:repeat(3,1fr)}
.app-menu{display:flex;flex-direction:column;padding:12px 10px;width:min(310px,90vw);border-right:1px solid var(--border);box-shadow:8px 0 28px rgba(20,35,60,.14)}.menu-brand-row{display:flex;align-items:center;justify-content:space-between;padding:5px 6px 12px}.menu-product{display:flex;align-items:center;gap:10px;min-width:0}.menu-product>span:last-child{display:grid;min-width:0}.menu-product small{color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-logo{width:38px;height:38px;display:grid;place-items:center;background:#e8f0fe;color:var(--blue2);border-radius:12px;font-size:20px}.compact{width:36px;height:36px}.menu-new-action{padding:0 4px 12px}.menu-primary-action{width:100%;border:0;background:var(--blue);color:#fff;border-radius:12px;min-height:44px;font-weight:800;text-align:left;padding:0 14px;cursor:pointer}.menu-section-label{padding:14px 12px 6px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:800}.menu-item{display:flex;align-items:center;gap:12px;width:100%;border:0;background:transparent;border-radius:10px;padding:10px 12px;text-align:left;color:var(--text);font-size:14px;cursor:pointer}.menu-item:hover{background:#f1f3f4}.menu-item.active{background:#e8f0fe;color:var(--blue2);font-weight:800}.menu-icon{width:22px;text-align:center;font-size:18px}.menu-spacer{flex:1}.menu-profile{border-top:1px solid var(--border);padding:12px;display:grid}.menu-profile strong{font-size:14px}.menu-profile small{color:var(--muted);margin-top:3px}
.agent-management-grid{display:grid;gap:14px}.agent-add-panel{background:#f8fafd;border:1px solid var(--border);border-radius:16px;padding:14px;align-self:start}.agent-add-panel h4{margin:0 0 12px}.agent-grid{display:grid;gap:12px}.agent-card{border:1px solid var(--border);border-radius:16px;padding:14px;background:#fff}.agent-card.current-agent{border-color:#8ab4f8;background:#f8fbff}.agent-card-head{display:flex;align-items:center;gap:10px}.avatar-circle{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;background:#e8f0fe;color:var(--blue2);font-weight:900;flex:0 0 auto}.agent-main{display:grid;min-width:0;flex:1}.agent-main small,.profile-chip small{color:var(--muted);margin-top:2px}.agent-status{font-size:11px;font-weight:800;border-radius:999px;padding:5px 8px}.agent-status.active{background:#e6f4ea;color:#137333}.agent-status.inactive{background:#fce8e6;color:#b3261e}.agent-meta{display:flex;align-items:center;gap:8px;margin:12px 0;color:var(--muted);font-size:12px}.you-badge{background:#e8f0fe;color:var(--blue2);border-radius:999px;padding:3px 7px;font-weight:800}.agent-actions{display:flex;gap:8px;flex-wrap:wrap}.btn-danger-soft{background:#fce8e6;color:#b3261e}.btn-success-soft{background:#e6f4ea;color:#137333}.profile-chip{display:flex;align-items:center;gap:10px}.profile-chip>span:last-child{display:grid}
@media(min-width:720px){.agent-management-grid{grid-template-columns:minmax(250px,320px) 1fr}.agent-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:719px){.install-text{padding:0 10px}.signout-label{display:none}.signout-btn{width:42px;padding:0;justify-content:center}.topbar{gap:8px}.brand{font-size:15px}.quick-actions:has(.quick:nth-child(3):last-child){grid-template-columns:1fr}.bottom-nav{grid-template-columns:repeat(5,1fr);overflow-x:auto}.bottom-nav .nav-item:nth-child(6),.bottom-nav .nav-item:nth-child(7){display:none}}
.current-plan-banner{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(220px,.8fr);gap:14px;margin:12px 0 14px;padding:14px;border:1px solid color-mix(in srgb,var(--primary) 24%,var(--border));border-radius:10px;background:linear-gradient(135deg,color-mix(in srgb,var(--primary) 8%,var(--surface)),var(--surface));box-shadow:0 8px 22px rgba(15,23,42,.06)}.current-plan-banner .plan-kicker{display:block;margin-bottom:4px;color:var(--muted);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.06em}.current-plan-banner strong{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:20px}.current-plan-banner strong small{padding:4px 8px;border-radius:999px;background:color-mix(in srgb,var(--primary) 13%,var(--surface));color:var(--primary);font-size:11px;font-weight:900}.current-plan-banner p{margin:4px 0 0;color:var(--muted);line-height:1.45}.plan-seat-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;align-self:start}.plan-seat-metrics span{display:grid;gap:4px;min-width:0;padding:9px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--muted);font-size:12px}.plan-seat-metrics b{color:var(--text);font-size:16px}.plan-upgrade-note{grid-column:1/-1;padding-top:10px;border-top:1px dashed var(--border);font-weight:700}.current-plan-banner.demo-plan{border-color:color-mix(in srgb,var(--warning) 45%,var(--border));background:color-mix(in srgb,var(--warning) 10%,var(--surface))}.license-summary{display:grid;gap:4px;padding:10px 12px;margin-bottom:12px;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft)}.license-summary strong{font-size:14px}.license-summary small{color:var(--muted)}.license-summary.limit-reached{border-color:var(--danger);background:color-mix(in srgb,var(--danger) 8%,var(--surface))}
@media(max-width:760px){.current-plan-banner{grid-template-columns:1fr;padding:12px}.plan-seat-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.current-plan-banner strong{font-size:18px}}
@media(max-width:430px){.plan-seat-metrics{grid-template-columns:1fr}}

.registration-simple-form{gap:12px}.registration-section-title{display:flex;align-items:center;gap:10px;margin-top:4px;padding:10px 12px;border-radius:10px;background:var(--surface-soft);border:1px solid var(--border)}.registration-section-title>span{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;background:var(--primary);color:#fff;font-weight:900}.registration-section-title div{display:grid;gap:2px}.registration-section-title small{color:var(--muted);font-size:12px}.pin-input{display:flex;align-items:center;gap:6px}.pin-input input{min-width:0;flex:1}.pin-toggle{border:1px solid var(--border);border-radius:7px;background:var(--surface-soft);padding:10px 9px;color:var(--primary);font-weight:800;cursor:pointer}


/* ============================================================
   Create Association circular pie progress
   ============================================================ */
.setup-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 16px 0 14px;
  padding: 14px;
  border: 1px solid #cfe0ff;
  border-radius: 18px;
  background: linear-gradient(135deg, #f7faff, #eef5ff);
}
.agent-view-switcher{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-bottom:1px solid var(--border);flex-wrap:wrap}.agent-view-switcher>div{display:flex;gap:6px}.agent-view-switcher .agentViewToggle.active{background:var(--blue2);color:#fff}.agent-card-list .agent-actions{display:grid;grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);gap:6px;align-items:center}.agent-card-list .agent-actions>.btn{min-width:0;width:100%}.agent-card-list .agent-actions>.whatsapp-action{height:40px;width:42px;padding:0;border-radius:50%;display:grid;place-items:center}.agent-card-list .agent-actions>.whatsapp-action .wa-icon{width:22px;height:22px}
.agent-directory-grid{display:block!important;min-width:0;width:100%;max-width:100%;}.agent-directory-grid .agent-grid-view,.agent-directory-grid .agent-card-list{width:100%;min-width:0}.agent-directory-grid .table-wrap{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.agent-directory-grid table{width:100%;min-width:980px;table-layout:auto}.agent-directory-grid .agent-view-switcher{width:100%;box-sizing:border-box}
.historical-import-panel{margin-top:14px}.historical-history{margin-top:8px;padding:10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft);line-height:1.7}.historical-history strong,.historical-history b{display:block;margin-bottom:4px}.historical-import-errors{margin-top:8px;padding:8px;border:1px solid #e5b5a8;border-radius:8px;background:#fff5f2;color:#8b2d1d;max-height:180px;overflow:auto;line-height:1.6}.historical-picker-link{margin-top:8px;min-width:120px}.historical-picker-rows{display:grid;gap:8px;margin-top:10px}.historical-picker-row{display:flex;gap:8px;align-items:center;padding:9px;border:1px solid var(--border);border-radius:8px}.historical-picker-row small{display:block;color:var(--muted)}

/* Keep grid/table text visually consistent without changing stored values or exports. */
table th,table td{text-transform:uppercase}

/* Keep the fixed mobile navigation hidden after logout, even though it is
   intentionally moved outside #appView for mobile scrolling behavior. */
body.logged-out .bottom-nav{display:none!important}
.page[aria-busy="true"]{opacity:.72;transition:opacity .15s ease}
.agent-role-editor{display:grid;gap:5px;margin:10px 0;color:var(--muted);font-size:12px;font-weight:800}.agent-role-editor select{width:100%;padding:9px 10px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--text);font:inherit;font-weight:700}

/* Pricing: concise, live collection-fee tariff and practical value summary. */
.pricing-tariff { margin-bottom: 14px; }
.pricing-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.pricing-heading h3 { margin:4px 0 6px; font-size:28px; }
.pricing-kicker { color:var(--accent, #9b650d); font-size:12px; font-weight:800; letter-spacing:.06em; text-transform:uppercase; }
.pricing-tariff-grid, .pricing-status-grid, .pricing-feature-grid { display:grid; gap:12px; }
.pricing-tariff-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); margin-top:18px; }
.pricing-tariff-grid > div { min-height:104px; padding:17px; border:1px solid var(--border, #ead8b6); border-radius:12px; background:var(--surface-muted, #fffaf1); }
.pricing-tariff-grid strong { display:block; color:var(--text, #302010); font-size:24px; line-height:1.2; }
.pricing-tariff-grid span, .pricing-status span { display:block; margin-top:7px; color:var(--muted, #765e49); font-size:13px; line-height:1.35; }
.pricing-note { margin:16px 0 0; color:var(--muted, #765e49); }
.pricing-pay { display:inline-flex; width:auto; margin-top:16px; text-decoration:none; }
.pricing-status-grid { grid-template-columns:repeat(3, minmax(0, 1fr)); margin-bottom:14px; }
.pricing-status { padding:16px; }
.pricing-status strong { display:block; margin-top:7px; font-size:22px; }
.pricing-feature-grid { grid-template-columns:repeat(2, minmax(0, 1fr)); margin-top:12px; }
.pricing-feature-grid article { display:flex; gap:11px; min-height:94px; padding:15px; border:1px solid var(--border, #ead8b6); border-radius:12px; background:var(--surface-muted, #fffaf1); }
.pricing-feature-grid article > span { flex:0 0 24px; height:24px; border-radius:50%; display:grid; place-items:center; background:#e7f5e9; color:#16733c; font-weight:900; }
.pricing-feature-grid strong, .pricing-feature-grid small { display:block; }
.pricing-feature-grid small { margin-top:5px; color:var(--muted, #765e49); font-size:13px; line-height:1.4; }
@media (max-width:719px) {
  .pricing-heading { display:block; }
  .pricing-heading .pill { display:inline-flex; margin-top:12px; }
  .pricing-heading h3 { font-size:24px; }
  .pricing-tariff-grid, .pricing-status-grid, .pricing-feature-grid { grid-template-columns:1fr; }
  .pricing-tariff-grid > div, .pricing-feature-grid article { min-height:auto; }
}

/* Keep account administration easy to find after opening Manage. */
#agentSection {
  scroll-margin-top: 92px;
}

.checkbox-list{display:grid;gap:8px;padding:10px 0}.checkbox-list label{font-weight:700}.readonly-link{width:100%;padding:10px;border:1px solid var(--border);border-radius:8px}.board-watermark{margin:10px 0;padding:8px;border-radius:8px;text-align:center;font-size:12px;font-weight:900;letter-spacing:.12em;color:var(--muted);background:var(--surface-soft)}.board-link-list{display:grid;gap:10px}.board-link-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;border:1px solid var(--border);border-radius:10px}.board-link-row small{display:block;color:var(--muted);margin-top:4px}.board-view-card{max-width:1280px;margin:20px auto}
.my-quick-menu{margin-top:14px}.quick-shortcut-grid{display:flex;gap:10px;flex-wrap:wrap}.quick-shortcut{display:flex;align-items:center;gap:8px;border:1px solid var(--border);background:var(--surface);border-radius:10px;padding:11px 14px;cursor:pointer;color:var(--text)}.quick-shortcut:hover{border-color:var(--primary)}.quick-shortcut span{font-size:18px}
.my-quick-action-grid .qicon{color:#fff!important}.my-quick-action-grid .shortcut-money{background:#16803c}.my-quick-action-grid .shortcut-people{background:#6d4cba}.my-quick-action-grid .shortcut-expense{background:#c85c08}.my-quick-action-grid .shortcut-events{background:#1666c5}.my-quick-action-grid .shortcut-reports{background:#0d7b7b}.my-quick-action-grid .shortcut-pricing{background:#7b3f99}.my-quick-action-grid .shortcut-manage{background:#4c5968}.my-quick-action-grid .shortcut-auction{background:#b26a00}.my-quick-action-grid .shortcut-assets{background:#8c3c85}.my-quick-action-grid .shortcut-planner{background:#5a6f12}.my-quick-action-grid .shortcut-refer{background:#af3c4d}
.page[data-page="dashboard"] > h3,.page[data-page="dashboard"] > .quick-actions{display:none}
.shortcut-count{margin:8px 0;color:var(--muted)}.quick-menu-picker{max-height:260px;overflow-y:auto;padding:8px 10px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.quick-menu-picker label{display:flex;align-items:center;gap:8px;padding:8px 2px;border-bottom:1px solid var(--border)}.quick-menu-picker label:last-child{border-bottom:0}.shortcut-picker-icon{display:inline-grid;place-items:center;width:28px;height:28px;border-radius:8px;color:#fff;font-size:15px}

@media (max-width: 719px) {
  .persistent-fee-banner {
    margin: 0 10px 8px;
    padding: 8px 10px;
    gap: 8px;
  }
  .persistent-fee-copy strong { font-size: 12px; }
  .persistent-fee-copy span { font-size: 11px; }
  .persistent-fee-pay { padding: 8px 13px; }
}

.report-description { margin: 12px 0 0; }

.today-report-summary .kpi span {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.setup-progress.hidden {
  display: none;
}

.pie-progress {
  --progress: 0;
  position: relative;
  width: 68px;
  height: 68px;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background:
    conic-gradient(
      #1a73e8 calc(var(--progress) * 1%),
      #dbe8fb 0
    );
  animation: pie-progress-rotate 1.15s linear infinite;
  box-shadow: 0 8px 22px rgba(26, 115, 232, .18);
}

.pie-progress::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: #fff;
}

.pie-progress span {
  position: relative;
  z-index: 1;
  color: #0b57d0;
  font-size: 13px;
  font-weight: 800;
  animation: pie-progress-counter-rotate 1.15s linear infinite;
}

.setup-progress-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.setup-progress-copy strong {
  color: #172033;
  font-size: 15px;
}

.setup-progress-copy small {
  color: #596579;
  line-height: 1.4;
}

.setup-progress.complete {
  border-color: #b7e4c7;
  background: #f1fbf4;
}

.setup-progress.complete .pie-progress {
  background: #1e8e3e;
  animation: none;
}

.setup-progress.complete .pie-progress span {
  color: #1e8e3e;
  animation: none;
}

@keyframes pie-progress-rotate {
  to { transform: rotate(360deg); }
}

@keyframes pie-progress-counter-rotate {
  to { transform: rotate(-360deg); }
}

@media (max-width: 520px) {
  .setup-progress {
    align-items: flex-start;
  }

  .pie-progress {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pie-progress,
  .pie-progress span {
    animation: none;
  }
}


/* ============================================================
   Assets Management
   ============================================================ */
.asset-kpis {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

.asset-kpi {
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  column-gap: 12px;
  min-height: 86px;
  border-radius: 12px;
}

.asset-kpi-icon {
  grid-row: span 2;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #e8f0fe;
  position: relative;
}

.asset-kpi-icon::after {
  content: "";
  position: absolute;
  inset: 10px;
  border: 2px solid currentColor;
  border-radius: 5px;
  color: var(--blue2);
}

.asset-kpi small {
  color: var(--muted);
  font-weight: 700;
}

.asset-kpi strong {
  font-size: 22px;
}

.asset-kpi-available .asset-kpi-icon {
  background: #e6f4ea;
  color: #137333;
}

.asset-kpi-inuse .asset-kpi-icon {
  background: #e8f0fe;
  color: var(--blue2);
}

.asset-kpi-maintenance .asset-kpi-icon {
  background: #fff4e5;
  color: #b06000;
}

.asset-kpi-retired .asset-kpi-icon {
  background: #f1f3f4;
  color: #5f6368;
}

.asset-tabs {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin: 4px 0 14px;
}

.asset-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  padding: 12px 0 10px;
  min-height: 42px;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.asset-tab.active {
  border-color: var(--blue);
  color: var(--blue2);
}

.asset-list-card {
  border-radius: 12px;
}

.asset-filters {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.asset-filters input,
.asset-filters select {
  min-height: 44px;
  border: 1px solid #c7ccd5;
  border-radius: 10px;
  padding: 0 12px;
  font: inherit;
  background: #fff;
}

.asset-table-wrap table {
  min-width: 980px;
}

.asset-table-wrap td strong {
  display: block;
}

.asset-table-wrap td small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}

.asset-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 800;
}

.asset-status-available {
  background: #dff7e5;
  color: #137333;
}

.asset-status-in-use {
  background: #e8f0fe;
  color: var(--blue2);
}

.asset-status-maintenance {
  background: #fff0d9;
  color: #b06000;
}

.asset-status-retired {
  background: #f1f3f4;
  color: #5f6368;
}

.asset-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.btn-small {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 9px;
  font-size: 12px;
}

.asset-responsibility {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.asset-detail-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.asset-detail-grid div {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
}

.asset-detail-grid small {
  display: block;
  color: var(--muted);
  margin-bottom: 5px;
}

.asset-detail-grid strong {
  word-break: break-word;
}

.referral-box {
  display: grid;
  gap: 12px;
}

.referral-box textarea {
  width: 100%;
  min-height: 210px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  resize: vertical;
  font: inherit;
  line-height: 1.45;
}

.referral-link {
  padding: 10px 12px;
  border: 1px solid #cfe0ff;
  border-radius: 10px;
  background: #f7faff;
  color: var(--blue2);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.referral-notice {
  display: grid;
  gap: 3px;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 12px;
  background: #f7faff;
}

.referral-notice small {
  color: var(--muted);
}

.bottom-nav {
  grid-template-columns: repeat(9, minmax(78px, 1fr));
}

/* v4.3.37 Planner production responsive layout */
@media (max-width: 1024px) {
  #plannerForm {
    padding: 12px;
    overflow: hidden;
  }

  #plannerTable {
    overflow: visible;
  }

  .planner-designer,
  .planner-panel {
    display: grid;
    gap: 12px;
    min-width: 0;
  }

  .planner-panel {
    padding: 12px;
    border-radius: 8px;
  }

  .planner-panel-title,
  .planner-result-title {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px;
  }

  .planner-panel-title > .btn,
  .planner-result-title > .btn,
  .planner-total-badge,
  .planner-result-title > em {
    grid-column: 1 / -1;
    width: 100%;
  }

  .planner-years-head {
    display: none;
  }

  .planner-years-list {
    display: grid;
    gap: 10px;
  }

  .planner-year-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fff;
  }

  .planner-year-row > span {
    min-width: 0;
  }

  .planner-year-row > span:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  .planner-year-row > span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    font-weight: 800;
  }

  .planner-year-row > span:nth-child(2)::before {
    content: "Total Expenses";
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }

  .planner-year-row > span:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    font-weight: 800;
  }

  .planner-year-row > span:nth-child(3)::before {
    content: "Categories";
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }

  .planner-year-row > span:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
    color: #475569;
  }

  .planner-year-row > span:nth-child(4)::before {
    content: "Last Updated: ";
    color: #64748b;
    font-weight: 800;
  }

  .planner-action-icons {
    grid-column: 2;
    grid-row: 1;
    justify-content: end;
    align-self: start;
  }

  .planner-expense-editor {
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fffdfa;
  }

  .planner-expense-editor-title,
  .planner-predict-controls,
  .planner-expense-total {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  .planner-expense-editor-title .btn,
  .planner-predict-controls .btn {
    width: 100%;
  }

  #plannerTable .planner-expense-grid,
  #plannerTable .planner-predicted-grid {
    margin: 8px 0;
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  #plannerTable .planner-expense-grid table,
  #plannerTable .planner-expense-grid thead,
  #plannerTable .planner-expense-grid tbody,
  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-expense-grid th,
  #plannerTable .planner-expense-grid td,
  #plannerTable .planner-predicted-grid table,
  #plannerTable .planner-predicted-grid thead,
  #plannerTable .planner-predicted-grid tbody,
  #plannerTable .planner-predicted-grid tr,
  #plannerTable .planner-predicted-grid th,
  #plannerTable .planner-predicted-grid td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #plannerTable .planner-expense-grid thead,
  #plannerTable .planner-predicted-grid thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  #plannerTable .planner-expense-grid tbody,
  #plannerTable .planner-predicted-grid tbody {
    display: grid;
    gap: 10px;
  }

  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-predicted-grid tr {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fff;
  }

  #plannerTable .planner-expense-grid td,
  #plannerTable .planner-predicted-grid td {
    height: auto;
    padding: 0;
    border: 0;
    white-space: normal;
    font-size: 14px;
  }

  #plannerTable .planner-expense-grid td::before,
  #plannerTable .planner-predicted-grid td::before {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  #plannerTable .planner-expense-grid td:nth-child(1),
  #plannerTable .planner-predicted-grid td:nth-child(1) {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f8fafc;
    font-weight: 900;
  }

  #plannerTable .planner-expense-grid td:nth-child(2),
  #plannerTable .planner-predicted-grid td:nth-child(2) {
    grid-column: 2;
    font-weight: 800;
  }

  #plannerTable .planner-expense-grid td:nth-child(2)::before,
  #plannerTable .planner-predicted-grid td:nth-child(2)::before {
    content: "Category";
  }

  #plannerTable .planner-expense-grid td:nth-child(3),
  #plannerTable .planner-predicted-grid td:nth-child(3),
  #plannerTable .planner-predicted-grid td:nth-child(4),
  #plannerTable .planner-predicted-grid td:nth-child(5) {
    grid-column: 2;
  }

  #plannerTable .planner-expense-grid td:nth-child(3)::before {
    content: "Amount";
  }

  #plannerTable .planner-predicted-grid td:nth-child(3)::before {
    content: "Base Year";
  }

  #plannerTable .planner-predicted-grid td:nth-child(4)::before {
    content: "Increase";
  }

  #plannerTable .planner-predicted-grid td:nth-child(5)::before {
    content: "Predicted";
  }

  #plannerTable .planner-expense-grid .planner-year-amount,
  #plannerTable .planner-predicted-grid input {
    width: 100%;
    max-width: none;
    min-height: 40px;
    font-size: 16px;
    text-align: right;
  }
}

@media (max-width: 560px) {
  .planner-panel-title,
  .planner-result-title {
    grid-template-columns: 1fr;
  }

  .planner-panel-title > span,
  .planner-result-title > span {
    width: 32px;
    height: 32px;
  }

  .planner-year-row {
    grid-template-columns: 1fr;
  }

  .planner-action-icons,
  .planner-year-row > span:nth-child(3) {
    grid-column: 1;
    text-align: left;
    justify-content: start;
  }

  .planner-action-icons {
    grid-row: 4;
  }

  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-predicted-grid tr {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 10px;
  }
}

/* Role-aware action alerts and installed-app badge companion panel. */
.action-alerts { border-left: 4px solid #b45309; margin: 0 0 16px; }
.action-alerts .section-title { margin-bottom: 10px; }
.alert-count { min-width: 30px; height: 30px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 999px; background: #8f1d16; color: #fff; font-weight: 800; }
.action-alert-list { display: grid; gap: 9px; }
.action-alert { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px; text-align: left; border: 1px solid #f1c98c; border-radius: 10px; background: #fffaf0; color: #3b2614; cursor: pointer; }
.action-alert:hover { background: #fff3dc; }
.action-alert.blocker { border-color: #e89b93; background: #fff4f2; }
.action-alert.warning { border-color: #edc36d; }
.action-alert.info { border-color: #a9c8ed; background: #f5f9ff; }
.action-alert-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #fde6c0; font-size: 18px; }
.action-alert.blocker .action-alert-icon { background: #fee2df; }
.action-alert.info .action-alert-icon { background: #dcecff; }
.action-alert strong, .action-alert small { display: block; }
.action-alert small { margin-top: 3px; color: #73563a; line-height: 1.35; }
.action-alert b { color: #9a4200; font-size: 13px; white-space: nowrap; }
@media (max-width: 560px) {
  .action-alert { grid-template-columns: 30px minmax(0, 1fr); padding: 11px; }
  .action-alert b { grid-column: 2; }
  .action-alert small { font-size: 12px; }
}

/* ClayTree product emblem: shared header, menu, splash, and login branding. */
.logo {
  background: #f5d36d url('icons/ganesha-mark.png') center / cover no-repeat;
  color: transparent;
}

.menu-logo {
  background: #f5d36d url('icons/ganesha-mark.png') center / cover no-repeat;
  color: transparent;
}

.brand-block {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-block::before {
  content: '';
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 9px;
  background: #f5d36d url('icons/ganesha-mark.png') center / cover no-repeat;
  box-shadow: 0 1px 3px rgba(77, 42, 6, .22);
}

@media (max-width: 719px) {
  .brand-block::before {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
  }
}

.platform-fee-panel{margin-top:14px}.platform-fee-grid{display:grid;grid-template-columns:1.3fr 1fr;gap:18px;align-items:center;padding:14px;border-radius:12px;background:#fff8ed}.platform-fee-grid p{margin:4px 0 12px}.platform-fee-qr{display:block;max-width:180px;max-height:180px;border-radius:10px;background:#fff;padding:8px;margin:0 auto 10px}@media(max-width:650px){.platform-fee-grid{grid-template-columns:1fr}.platform-fee-qr{margin-left:0}}

/* Team access is independent of collection-based billing. Association Admins
   must always be able to manage users, PINs, roles, and account status. */
#agentSection{display:block!important}
[data-focus="agentSection"]{display:flex!important}

.collection-grid-controls {
  display: grid;
  grid-template-columns: minmax(180px, 260px) minmax(220px, 1fr);
  gap: 12px;
  align-items: end;
  margin: 0 0 12px;
}

.collection-agent-filter label {
  font-size: 12px;
  font-weight: 900;
  color: var(--muted);
}

.collection-agent-filter select {
  min-height: 42px;
  border-radius: 10px;
}

.collection-grid-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafd;
  padding: 9px 12px;
}

.collection-grid-total small {
  color: var(--muted);
  font-weight: 800;
}

.collection-grid-total strong {
  font-size: 18px;
  white-space: nowrap;
}

.role-assignment-panel {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.role-assignment-title {
  align-items: center;
}

.role-assignment-grid {
  display: grid;
  gap: 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.role-assignment-head,
.role-assignment-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(96px, .55fr));
  align-items: center;
}

.role-assignment-head {
  background: #f8fafd;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.role-assignment-head span,
.role-assignment-row > * {
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.role-assignment-row:last-child > * {
  border-bottom: 0;
}

.role-assignment-user {
  display: grid;
  gap: 3px;
}

.role-assignment-user small {
  color: var(--muted);
}

.role-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
}

.role-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}

@media (max-width: 640px) {
  .collection-grid-controls {
    grid-template-columns: 1fr;
  }

  .collection-grid-total {
    align-items: flex-start;
    flex-direction: column;
  }

  .role-assignment-head {
    display: none;
  }

  .role-assignment-row {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 8px;
    border-bottom: 1px solid var(--border);
  }

  .role-assignment-row:last-child {
    border-bottom: 0;
  }

  .role-assignment-row > * {
    padding: 0;
    border-bottom: 0;
  }

  .role-check {
    min-height: 42px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0 12px;
    background: #f8fafd;
  }
}

@media (min-width: 720px) {
  .asset-kpis {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .asset-filters {
    grid-template-columns: 1.4fr repeat(3, minmax(150px, .8fr));
  }

  .asset-responsibility {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .asset-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottom-nav {
    max-width: 980px;
  }
}

@media (max-width: 719px) {
  .bottom-nav .nav-item:nth-child(6),
  .bottom-nav .nav-item:nth-child(7) {
    display: block;
  }
}


/* ============================================================
   Production form validation
   ============================================================ */
.field input:invalid:not(:placeholder-shown),
.field textarea:invalid:not(:placeholder-shown) {
  border-color: #d93025;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, .10);
}

.field input:valid:not(:placeholder-shown),
.field textarea:valid:not(:placeholder-shown) {
  border-color: #188038;
}

.field input:focus:invalid,
.field textarea:focus:invalid {
  outline-color: #d93025;
}

.field input::placeholder {
  color: #8a94a6;
}

.captcha-box {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 14px;
  background: #f7faff;
}

.captcha-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.captcha-question span {
  display: grid;
  gap: 3px;
}

.captcha-question small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.captcha-question strong {
  color: var(--blue2);
  font-size: 18px;
}

.captcha-refresh {
  flex: 0 0 auto;
}


/* ============================================================
   Enterprise-style Hindu Festival Collection UI v3.3
   ============================================================ */

:root {
  --sidebar-bg: #16242c;
  --sidebar-bg-2: #1e3039;
  --topbar-bg: #3f93bd;
  --topbar-bg-dark: #347ea4;
  --surface: #ffffff;
  --surface-soft: #f4f7fa;
  --border: #d9e0e6;
  --text: #20303a;
  --muted: #71808c;
  --active: #267fb2;
  --danger: #c62828;
  --success: #2e7d32;
}

body {
  background: #e9eef3;
  color: var(--text);
}

.enterprise-topbar {
  min-height: 58px;
  background: linear-gradient(90deg, var(--topbar-bg-dark), var(--topbar-bg));
  color: #fff;
  border-bottom: 0;
  box-shadow: 0 2px 6px rgba(22, 36, 44, .18);
}

.brand-block {
  min-width: 220px;
  color: #fff;
}

.brand-block strong,
.brand-block small {
  color: #fff !important;
}

.menu-toggle {
  color: #fff;
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.14);
}

#appMenu {
  background: linear-gradient(180deg, var(--sidebar-bg), var(--sidebar-bg-2));
  color: #fff;
  border-right: 0;
  box-shadow: 6px 0 18px rgba(17, 33, 43, .16);
}

#appMenu .menu-item,
#appMenu .nav-item {
  color: #d7e3e9;
  border-radius: 0;
  min-height: 44px;
  border-left: 3px solid transparent;
}

#appMenu .menu-item:hover,
#appMenu .nav-item:hover {
  background: rgba(255,255,255,.06);
  color: #fff;
}

#appMenu .menu-item.active,
#appMenu .nav-item.active {
  background: rgba(61, 152, 197, .18);
  color: #fff;
  border-left-color: #4eb1e6;
}

.menu-section-title {
  color: #6f9bb1 !important;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.signout-btn {
  background: #fff2f2 !important;
  color: var(--danger) !important;
  border: 1px solid #f3c1c1 !important;
  font-weight: 700;
}

.signout-btn:hover {
  background: #ffe7e7 !important;
}

.logout-power-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  border: 1.8px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  box-sizing: border-box;
}

.logout-power-icon::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -4px;
  width: 1.8px;
  height: 10px;
  border-radius: 999px;
  background: currentColor;
  transform: translateX(-50%);
}

.page {
  background: transparent;
}

.card,
.panel,
.section-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 2px 7px rgba(32, 48, 58, .06);
  background: var(--surface);
}

.data-grid-shell {
  border: 1px solid #d0d8df;
  background: #fff;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(30, 48, 58, .06);
}

.data-grid-toolbar {
  min-height: 42px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #d8dee4;
  background: #fafbfc;
}

.grid-tool-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.grid-icon-btn {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #53636f;
  font-size: 16px;
  cursor: pointer;
}

.grid-icon-btn:hover {
  background: #e8f1f7;
  color: #1c79aa;
}

.grid-search-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 220px;
  border: 1px solid #ccd5dc;
  background: #fff;
  padding: 4px 8px;
  border-radius: 3px;
}

.grid-inline-search {
  width: 100%;
  border: 0 !important;
  outline: 0;
  padding: 3px !important;
  min-height: 24px !important;
  box-shadow: none !important;
}

.professional-grid {
  border: 0;
  border-radius: 0;
}

.professional-grid table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
}

.professional-grid th {
  background: #f4f6f8;
  color: #1f2b33;
  border-bottom: 1px solid #cdd6dd;
  border-right: 1px solid #dbe1e6;
  padding: 10px 9px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.professional-grid td {
  padding: 10px 9px;
  border-bottom: 1px solid #e0e5e9;
  border-right: 1px solid #edf0f2;
  font-size: 13px;
}

.professional-grid tbody tr:hover {
  background: #f4faff;
}

.th-icon {
  margin-right: 6px;
  opacity: .85;
}

.th-filter {
  float: right;
  color: #87939c;
  font-size: 10px;
  margin-left: 8px;
}

.grid-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: #fafbfc;
  border-top: 1px solid #d7dee4;
  color: #596874;
  font-size: 12px;
}

.grid-pagination {
  display: flex;
  gap: 2px;
}

.grid-pagination button {
  min-width: 28px;
  height: 26px;
  border: 1px solid #d0d7dd;
  background: #fff;
  color: #60717d;
}

.grid-pagination button.active {
  color: #fff;
  background: #247eaf;
  border-color: #247eaf;
}

.empty-grid {
  text-align: center;
  padding: 32px !important;
  color: var(--muted);
}

.empty-grid-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 5px solid #d4dde3;
  border-top-color: #4e9bc3;
  animation: admin-loader-spin .9s linear infinite;
  font-size: 0;
}

.empty-grid small {
  display: block;
  margin-top: 4px;
}

@keyframes admin-loader-spin {
  to { transform: rotate(360deg); }
}

/* Professional loading overlay */
.global-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  background: rgba(239, 244, 248, .75);
  backdrop-filter: blur(2px);
}

.global-loader-card {
  min-width: 220px;
  padding: 22px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #d6dfe6;
  box-shadow: 0 16px 40px rgba(31, 48, 59, .18);
  text-align: center;
}

.global-loader-ring {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border: 6px solid #d8e2e9;
  border-top-color: #2b88b8;
  border-radius: 50%;
  animation: admin-loader-spin .8s linear infinite;
}

@media (max-width: 760px) {
  .brand-block {
    min-width: auto;
  }

  .data-grid-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .grid-search-wrap {
    min-width: 0;
    width: 100%;
  }

  .professional-grid th,
  .professional-grid td {
    font-size: 12px;
    padding: 8px 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .empty-grid-icon,
  .global-loader-ring {
    animation: none;
  }
}


/* Production v4 role dashboards and verification workflow */
.finance-kpi {border-left:4px solid #3f93bd; min-height:92px; display:flex; flex-direction:column; justify-content:center; gap:8px}
.finance-kpi small{font-weight:700;color:#596b78}.finance-kpi strong{font-size:22px;color:#14242d}
.daily-finance-card{padding:18px;border:1px dashed #7f919d;border-radius:8px;background:#fbfcfd}
.daily-finance-card>strong,.daily-finance-card>small{display:block;text-align:center}.daily-finance-card>small{margin:5px 0 15px;color:#70808b}
.daily-finance-card dl{margin:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.daily-finance-card dl div{padding:12px;background:#fff;border:1px solid #dce3e8;border-radius:6px}.daily-finance-card dt{font-size:12px;color:#687783}.daily-finance-card dd{margin:5px 0 0;font-weight:800;font-size:17px}
.status-confirmed{display:inline-flex;padding:5px 9px;border-radius:999px;background:#e6f4ea;color:#137333;font-weight:700;font-size:12px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.whatsapp-action{width:34px;height:34px;min-width:34px;border:0;border-radius:50%;display:inline-grid;place-items:center;background:#25d366;color:#fff;cursor:pointer;box-shadow:none;transition:transform .15s ease,background .15s ease;vertical-align:middle}
.whatsapp-action:hover,.whatsapp-action:focus{background:#1ebe5d;transform:translateY(-1px);outline:2px solid rgba(37,211,102,.24);outline-offset:2px}
.whatsapp-action:disabled{opacity:.7;cursor:wait;transform:none}
.donor-actions{display:flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap}
.wa-icon{width:22px;height:22px;display:block}
[data-page="donors"],
[data-page="donors"] .card,
[data-page="donors"] #donorTable,
[data-page="donors"] .data-grid-shell{min-width:0;max-width:100%;}
[data-page="donors"] .data-grid-shell{overflow:hidden;}
[data-page="donors"] .table-wrap{max-width:100%;overflow-x:auto;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;}
@media(max-width:719px){[data-page="donors"] .form-grid{grid-template-columns:minmax(0,1fr);}[data-page="donors"] .card{padding:14px;}}

/* Must remain viewport-fixed even when a long page/table is active. */
@media(max-width:719px){
  .bottom-nav{position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;width:100%!important;max-width:none!important;height:calc(70px + env(safe-area-inset-bottom))!important;min-height:calc(70px + env(safe-area-inset-bottom))!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;overflow:hidden!important;padding:0 0 env(safe-area-inset-bottom)!important;transform:none!important;z-index:1000!important;isolation:isolate;}
  .bottom-nav .nav-item{display:block!important;min-width:0!important;height:70px!important;}
  .bottom-nav .nav-item:nth-child(n+6){display:none!important;}
  body{padding-bottom:calc(70px + env(safe-area-inset-bottom));}
}

/* Old Android Chrome may shrink the whole document to fit a wide nested table.
   Keep the application shell locked to the visual viewport on every route. */
@media(max-width:719px){
  #appView:not(.hidden),#appView:not(.hidden) header,#appView:not(.hidden) main{width:100vw!important;min-width:100vw!important;max-width:100vw!important;overflow-x:hidden;}
  [data-page="donors"] #donorTable .table-wrap{width:100%;max-width:100%;overflow-x:hidden;}
  [data-page="donors"] #donorTable table{width:100%;min-width:100%;table-layout:fixed;}
  [data-page="donors"] #donorTable th,[data-page="donors"] #donorTable td{padding:9px 6px;font-size:11px;overflow-wrap:anywhere;}
  [data-page="donors"] #donorTable th:nth-child(4),[data-page="donors"] #donorTable td:nth-child(4),[data-page="donors"] #donorTable th:nth-child(5),[data-page="donors"] #donorTable td:nth-child(5),[data-page="donors"] #donorTable th:nth-child(6),[data-page="donors"] #donorTable td:nth-child(6),[data-page="donors"] #donorTable th:nth-child(7),[data-page="donors"] #donorTable td:nth-child(7){display:none;}
  [data-page="donors"] #donorTable th:nth-child(1),[data-page="donors"] #donorTable td:nth-child(1){width:28%;}
  [data-page="donors"] #donorTable th:nth-child(2),[data-page="donors"] #donorTable td:nth-child(2){width:23%;}
  [data-page="donors"] #donorTable th:nth-child(3),[data-page="donors"] #donorTable td:nth-child(3){width:28%;}
  [data-page="donors"] #donorTable th:nth-child(8),[data-page="donors"] #donorTable td:nth-child(8){width:21%;}
  [data-page="donors"] #donorTable .donor-actions{gap:4px;white-space:normal;flex-wrap:wrap;}
  [data-page="donors"] #donorTable .donorMobileEdit{min-height:30px;padding:5px 6px;font-size:10px;}
  [data-page="manage"] .agent-grid .table-wrap{width:100%;max-width:100%;overflow-x:hidden;}
  [data-page="manage"] .agent-grid table{width:100%;min-width:100%;table-layout:fixed;}
  [data-page="manage"] .agent-grid th,[data-page="manage"] .agent-grid td{padding:8px 6px;font-size:11px;overflow-wrap:anywhere;vertical-align:middle;}
  [data-page="manage"] .agent-grid th:nth-child(1),[data-page="manage"] .agent-grid td:nth-child(1){width:26%;}
  [data-page="manage"] .agent-grid th:nth-child(2),[data-page="manage"] .agent-grid td:nth-child(2){width:18%;}
  [data-page="manage"] .agent-grid th:nth-child(3),[data-page="manage"] .agent-grid td:nth-child(3){width:16%;}
  [data-page="manage"] .agent-grid th:nth-child(4),[data-page="manage"] .agent-grid td:nth-child(4){width:20%;}
  [data-page="manage"] .agent-grid th:nth-child(5),[data-page="manage"] .agent-grid td:nth-child(5){width:20%;}
  [data-page="manage"] .agent-grid .agent-grid-name{align-items:flex-start}
  [data-page="manage"] .agent-grid .agent-grid-name strong{font-size:12px;line-height:1.1;white-space:normal;word-break:break-word}
  [data-page="manage"] .agent-grid .agent-grid-name small{font-size:10px}
  [data-page="manage"] .agent-grid .agent-status{display:inline-flex;max-width:100%;white-space:nowrap}
  [data-page="manage"] .agent-grid .agentRowActions,.agent-row-actions{gap:4px;white-space:normal;flex-wrap:wrap;justify-content:flex-start}
  [data-page="manage"] .agent-grid .agentRowActions .btn,.agent-row-actions .btn{min-height:30px;padding:5px 6px;font-size:10px}
  [data-page="manage"] .agent-grid select.agentRoleSelect{width:100%;min-width:0;max-width:100%;padding:7px 8px;font-size:11px}
  [data-page="manage"] .agent-grid th:nth-child(4),[data-page="manage"] .agent-grid td:nth-child(4){overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}

/* Mobile dialogs must stay inside the visual viewport, above the fixed navigation. */
@media(max-width:719px){
  .modal{display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;padding:calc(76px + env(safe-area-inset-top)) 12px calc(86px + env(safe-area-inset-bottom));}
  .modal-card{width:100%;max-height:calc(100dvh - 162px);margin:0;border-radius:18px;padding:16px;overscroll-behavior:contain;}
}
.confirmCollection{background:#e6f4ea!important;color:#137333!important;border-color:#b7dfc2!important}
@media(max-width:600px){.daily-finance-card dl{grid-template-columns:1fr}.finance-kpi strong{font-size:18px}}

/* Admin collection verification workflow */
.collection-tabs{display:flex;gap:8px;overflow-x:auto;padding-bottom:12px;margin-bottom:12px;border-bottom:1px solid var(--border)}.collection-tab{border:1px solid var(--border);background:#fff;color:var(--muted);border-radius:999px;padding:9px 13px;font-weight:800;white-space:nowrap;cursor:pointer}.collection-tab.active{background:#e8f0fe;border-color:#8ab4f8;color:var(--blue2)}.collection-tab span{display:inline-grid;place-items:center;min-width:22px;height:22px;margin-left:5px;border-radius:999px;background:#fce8e6;color:#b3261e;font-size:11px}.collection-grid-title{margin-top:4px}.verification-actions{display:flex;gap:6px;flex-wrap:wrap}.btn-small{min-height:34px;padding:7px 10px;border-radius:9px;font-size:12px}.transaction-status{display:inline-flex;border-radius:999px;padding:5px 8px;font-size:11px;font-weight:900}.status-pending{background:#fef7e0;color:#8a4b00}.status-completed{background:#e6f4ea;color:#137333}.status-rejected{background:#fce8e6;color:#b3261e}.status-reversed{background:#eceff1;color:#455a64}.verification-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:14px}.verification-summary>div{display:grid;gap:4px;padding:12px;border:1px solid var(--border);border-radius:12px;background:#f8fafd}.verification-summary small{color:var(--muted)}.verification-summary strong{overflow-wrap:anywhere}.kpi-action{cursor:pointer;transition:transform .15s ease,box-shadow .15s ease}.kpi-action:hover,.kpi-action:focus{transform:translateY(-2px);box-shadow:0 10px 26px rgba(40,60,90,.16);outline:2px solid #c2d7ff}.kpi-link{display:block;margin-top:8px;color:var(--blue2);font-size:11px;font-weight:800}@media(max-width:560px){.verification-summary{grid-template-columns:1fr}}

/* v4 donor validation and simplified grids */
.data-grid-toolbar{justify-content:flex-end}
.grid-tool-group{display:none!important}
.field input:invalid:not(:placeholder-shown),.field select:invalid{border-color:#dc2626}
.field input:focus:invalid{box-shadow:0 0 0 3px rgba(220,38,38,.12)}

/* v4.1.1 collection grid terminal states */
.grid-message.grid-error-state {
  min-height: 170px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  color: #7f1d1d;
  background: #fff7f7;
  border: 1px solid #fecaca;
  border-radius: 8px;
}
.grid-message.grid-error-state span { max-width: 720px; overflow-wrap: anywhere; }

/* v4.1.6 Planner and empty-state fixes */
.bottom-nav{grid-template-columns:repeat(8,minmax(78px,1fr))}
@media(min-width:1000px){.bottom-nav{max-width:980px}}
.empty-grid-icon{border:1px solid #cfe0d6!important;border-top-color:#cfe0d6!important;background:#e6f4ea;color:#137333;font-size:20px;font-weight:900;animation:none!important}
#plannerTable input{width:100%;border:1px solid #c7ccd5;border-radius:8px;padding:9px 10px;font:inherit;background:#fff;color:var(--text)}
#plannerTable td small{display:block;margin-top:3px}

/* v4.1.8 Planner prior-year import */
.planner-import-panel {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 12px;
  align-items: end;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.number-stepper {
  display: grid;
  grid-template-columns: 56px minmax(80px, 1fr) 56px;
  overflow: hidden;
  min-height: 46px;
  border: 1px solid #c7ccd5;
  border-radius: 8px;
  background: #fff;
}

.number-stepper button {
  border: 0;
  background: #f3f4f6;
  color: #111827;
  font-size: 24px;
  font-weight: 800;
}

.number-stepper input {
  width: 100%;
  min-width: 0;
  border: 0;
  border-left: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
}

.planner-import-message {
  min-height: 20px;
  margin-top: 8px;
}

/* v4.1.9 Planner single-line desktop controls */
@media (min-width: 900px) {
  #plannerForm {
    grid-template-columns: minmax(150px, 1.15fr) minmax(150px, 1.15fr) repeat(3, minmax(135px, .9fr));
    align-items: end;
    column-gap: 12px;
  }

  #plannerForm > .form-grid,
  #plannerSummary,
  #plannerSummary .kpis {
    display: contents;
  }

  #plannerSummary .finance-kpi {
    min-height: 90px;
  }

  #plannerForm > .planner-import-panel,
  #plannerForm > .planner-import-message,
  #plannerForm > #plannerTable,
  #plannerForm > .btn-primary {
    grid-column: 1 / -1;
  }
}

/* v4.1.7 responsive alignment fixes */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body,
button,
input,
select,
textarea {
  -webkit-text-size-adjust: 100%;
}

#appView,
main,
.page,
.card,
.data-grid-shell,
.table-wrap {
  min-width: 0;
  max-width: 100%;
}

main {
  width: 100%;
}

.section-title,
.topbar,
.topbar-actions,
.brand-wrap {
  min-width: 0;
}

.brand,
.assoc-name,
.section-title h2,
.section-title p,
.quick strong,
.quick small {
  overflow-wrap: anywhere;
}

.kpis,
.quick-actions,
.charts,
.form-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-x: contain;
}

.professional-grid table {
  width: 100%;
}

.bottom-nav {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

#plannerForm {
  overflow: hidden;
}

#plannerSummary .kpis {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
}

@media (max-width: 719px) {
  main {
    padding: 12px 10px calc(84px + env(safe-area-inset-bottom));
  }

  .topbar {
    gap: 8px;
    padding: 8px 10px;
  }

  .brand-block {
    min-width: 0;
  }

  .brand {
    font-size: 14px;
    line-height: 1.2;
  }

  .assoc-name {
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-actions {
    gap: 6px;
    flex: 0 0 auto;
  }

  .text-btn.install-text {
    width: 42px;
    padding: 0;
    font-size: 0;
  }

  .text-btn.install-text::before {
    content: "+";
    font-size: 22px;
    line-height: 1;
  }

  .icon-btn,
  .signout-btn {
    width: 40px;
    height: 40px;
    min-height: 40px;
    flex: 0 0 40px;
  }

  .breadcrumb {
    padding: 0 10px 8px;
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
  }

  .card {
    border-radius: 8px;
    padding: 14px;
  }

  .btn,
  .btn-row .btn {
    width: 100%;
  }

  .quick {
    min-height: 76px;
  }

  .bottom-nav {
    grid-template-columns: repeat(5, minmax(64px, 1fr));
  }

  .bottom-nav .nav-item {
    min-width: 64px;
    font-size: 10px;
  }

  .bottom-nav .nav-item:nth-child(n+6) {
    display: none;
  }

  .data-grid-shell {
    border-radius: 8px;
  }

  .data-grid-toolbar,
  .grid-footer {
    padding: 8px;
  }

  .grid-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .professional-grid table {
    min-width: 640px;
  }

  #plannerTable .table-wrap {
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #plannerTable table,
  #plannerTable thead,
  #plannerTable tbody,
  #plannerTable tr,
  #plannerTable th,
  #plannerTable td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #plannerTable table {
    border-collapse: separate;
    border-spacing: 0 10px;
    background: transparent;
  }

  #plannerTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  #plannerTable tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(32, 48, 58, .06);
    overflow: hidden;
  }

  #plannerTable td {
    border-right: 0;
    padding: 10px 12px;
  }

  #plannerTable td + td {
    border-top: 1px solid #edf0f2;
  }

  #plannerTable td:nth-child(2)::before,
  #plannerTable td:nth-child(3)::before {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  #plannerTable td:nth-child(2)::before {
    content: "Tentative Budget";
  }

  #plannerTable td:nth-child(3)::before {
    content: "Notes";
  }

  #plannerTable .empty-grid {
    display: table-cell;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-wrap: wrap;
  }

  .brand-wrap {
    flex: 1 1 calc(100% - 48px);
  }

  .topbar-actions {
    display: grid;
    flex: 1 0 100%;
    grid-template-columns: minmax(0, 1fr) 40px 40px;
    margin-left: 0;
  }

  .text-btn.install-text {
    width: 100%;
    font-size: 14px;
  }

  .text-btn.install-text::before {
    content: none;
  }

  .kpis,
  #plannerSummary .kpis {
    grid-template-columns: 1fr;
  }

  .finance-kpi {
    min-height: 78px;
  }
}

/* v4.2.3 Planner sketch budget entry */
#plannerForm {
  border-radius: 8px;
}

#plannerForm .field label {
  color: #172033;
  font-size: 12px;
}

#plannerForm .field input,
#plannerForm .btn,
#plannerForm .number-stepper {
  border-radius: 6px;
}

.planner-entry-panel {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 18px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.planner-entry-panel label {
  display: grid;
  gap: 7px;
}

.planner-entry-panel label span {
  color: #172033;
  font-size: 13px;
  font-weight: 800;
}

.planner-entry-panel input {
  min-height: 42px;
  border: 1px solid #c7ccd5;
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

.planner-entry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}

.planner-sketch-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.planner-sketch-summary > div {
  min-height: 84px;
  padding: 18px 20px;
  display: grid;
  align-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(32, 48, 58, .05);
}

.planner-sketch-summary small {
  color: var(--muted);
  font-weight: 700;
}

.planner-sketch-summary strong {
  color: #14242d;
  font-size: 24px;
}

.planner-sketch-shell {
  display: grid;
  gap: 12px;
}

.planner-sketch-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.planner-sketch-head div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.planner-sketch-head small {
  color: var(--muted);
  font-weight: 800;
}

.planner-sketch-head strong {
  min-width: 90px;
  padding: 9px 14px;
  border: 1px solid #c7ccd5;
  border-radius: 6px;
  text-align: center;
}

.planner-add-row {
  min-height: 40px;
  padding: 0 18px;
  border: 1px solid var(--blue);
  border-radius: 6px;
  background: #fff;
  color: var(--blue2);
  font-weight: 900;
}

.planner-inner-grid {
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  overflow: auto;
}

.planner-inner-grid table {
  min-width: 980px;
}

.planner-inner-grid th {
  min-height: 54px;
  color: #475569;
  background: #fbfcfe;
  vertical-align: bottom;
}

.planner-inner-grid th span {
  display: block;
  color: #14242d;
  font-weight: 900;
}

.planner-inner-grid th strong {
  display: block;
  margin-top: 3px;
  color: var(--blue2);
}

.planner-inner-grid td {
  height: 68px;
  vertical-align: middle;
}

.planner-year-value {
  min-width: 130px;
  color: #14242d;
  font-weight: 800;
  text-align: right;
}

.planner-money-input {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  min-height: 44px;
  overflow: hidden;
  border: 1px solid #c7ccd5;
  border-radius: 6px;
  background: #fff;
}

.planner-money-input span {
  display: grid;
  place-items: center;
  color: #334155;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
}

#plannerTable .planner-money-input input {
  border: 0;
  border-radius: 0;
  padding: 0 14px;
}

.planner-prediction-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.planner-prediction-head > strong {
  font-size: 18px;
}

.planner-cost-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.planner-cost-controls > span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.planner-bottom-target {
  display: grid;
  grid-template-columns: minmax(120px, .4fr) 1fr;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}

.planner-bottom-target div {
  display: grid;
  gap: 5px;
}

.planner-bottom-target small {
  color: var(--muted);
  font-weight: 800;
}

.planner-bottom-target strong {
  color: #14242d;
  font-size: 22px;
}

@media (min-width: 900px) {
  #plannerForm {
    display: grid;
    grid-template-columns: minmax(160px, 1fr) 110px minmax(170px, 1fr) minmax(180px, .8fr) minmax(190px, .9fr);
    gap: 14px;
    align-items: end;
    padding: 18px;
  }

  #plannerForm > .form-grid,
  #plannerForm > .planner-import-panel {
    display: contents;
  }

  #plannerSummary,
  #plannerTable,
  #plannerForm > .btn-primary {
    grid-column: 1 / -1;
  }

  #plannerSummary {
    display: block;
    margin-top: 8px !important;
  }

  #plannerForm > .btn-primary {
    justify-self: start;
    width: auto;
    min-width: 220px;
  }
}

@media (max-width: 719px) {
  .planner-entry-panel,
  .planner-sketch-summary,
  .planner-bottom-target {
    grid-template-columns: 1fr;
  }

  .planner-prediction-head,
  .planner-cost-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .planner-inner-grid {
    border: 0;
    overflow: visible;
  }

  .planner-inner-grid table {
    min-width: 0;
  }

  #plannerTable .planner-inner-grid th {
    display: none;
  }

  #plannerTable .planner-inner-grid td:nth-child(2)::before,
  #plannerTable .planner-inner-grid td:nth-child(3)::before,
  #plannerTable .planner-inner-grid td:nth-child(4)::before {
    display: block;
    margin-bottom: 6px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
  }

  #plannerTable .planner-inner-grid td:nth-child(2)::before {
    content: "Year";
  }

  #plannerTable .planner-inner-grid td:nth-child(3)::before {
    content: "Year";
  }

  #plannerTable .planner-inner-grid td:nth-child(4)::before {
    content: "Year";
  }
}

/* v4.2.5 Planner exact attached design */
.planner-designer {
  display: grid;
  gap: 14px;
}

.planner-panel {
  overflow: hidden;
  border: 1px solid #dce3ee;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(31, 48, 59, .04);
}

.planner-panel-title {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 14px 16px;
}

.planner-panel-title > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #0b63e5;
  color: #fff;
  font-size: 12px;
  font-weight: 900;
}

.planner-panel-title strong {
  display: block;
  color: #172033;
  font-size: 15px;
}

.planner-panel-title small {
  color: #64748b;
  font-size: 12px;
}

.planner-years-list {
  border-top: 1px solid #edf1f7;
}

.planner-years-head,
.planner-year-row {
  display: grid;
  grid-template-columns: 1.2fr 1.2fr 1fr 1.2fr 120px;
  gap: 10px;
  align-items: center;
  padding: 11px 16px;
  border-bottom: 1px solid #edf1f7;
  font-size: 13px;
}

.planner-years-head {
  color: #64748b;
  background: #fbfcfe;
  font-weight: 800;
}

.planner-year-row strong {
  color: #0b63e5;
}

.planner-year-row em,
.planner-result-title em,
.planner-increase-pill {
  display: inline-flex;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.planner-action-icons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.planner-action-icons button,
.planner-expense-row button {
  width: 32px;
  height: 32px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  background: #fff;
  color: #334155;
}

.planner-action-icons button:last-child,
.planner-expense-row button {
  color: #dc2626;
}

.planner-expense-editor {
  padding: 0 16px 12px;
  border-bottom: 1px solid #edf1f7;
}

.planner-expense-editor-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 0 8px;
}

.planner-expense-editor-title strong {
  font-size: 13px;
}

.planner-expense-editor-title .btn {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 6px;
  font-size: 12px;
}

.planner-expense-head,
.planner-expense-row {
  display: grid;
  grid-template-columns: 40px 1.1fr 1.2fr 1.3fr 70px;
  gap: 10px;
  align-items: center;
  padding: 7px 10px;
  border: 1px solid #edf1f7;
  border-bottom: 0;
  font-size: 12px;
}

.planner-expense-head {
  color: #64748b;
  background: #fbfcfe;
  font-weight: 800;
}

.planner-expense-row input,
.planner-predict-controls select,
.planner-percent-input input,
.planner-predicted-grid input {
  width: 100%;
  min-height: 32px;
  border: 1px solid #d6dde7;
  border-radius: 4px;
  padding: 6px 8px;
  font: inherit;
  background: #fff;
}

.planner-expense-total {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid #edf1f7;
  font-size: 12px;
}

.planner-expense-total-compact {
  grid-template-columns: 1fr auto;
}

.planner-add-category-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
}

.planner-add-category-control select {
  min-height: 34px;
  border: 1px solid #d6dde7;
  border-radius: 4px;
  padding: 6px 8px;
  background: #fff;
}

.planner-expense-total button,
.planner-view-all {
  width: max-content;
  border: 0;
  background: transparent;
  color: #0b63e5;
  font-weight: 800;
}

.planner-predict-controls {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 1fr) minmax(180px, .8fr);
  gap: 18px;
  align-items: end;
  padding: 0 16px 16px;
}

.planner-predict-controls label {
  display: grid;
  gap: 6px;
  color: #172033;
  font-size: 12px;
  font-weight: 800;
}

.planner-percent-input {
  display: grid;
  grid-template-columns: 1fr 42px;
}

.planner-percent-input b {
  display: grid;
  place-items: center;
  border: 1px solid #d6dde7;
  border-left: 0;
  border-radius: 0 4px 4px 0;
  background: #f8fafc;
}

.planner-result-title {
  grid-template-columns: auto 1fr auto auto auto;
}

.planner-total-badge {
  display: grid;
  gap: 3px;
  min-width: 180px;
}

.planner-total-badge small {
  color: #64748b;
}

.planner-total-badge strong {
  font-size: 22px;
}

.planner-predicted-grid {
  margin: 0 16px 8px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
}

.planner-predicted-grid table {
  min-width: 720px;
}

.planner-predicted-grid th {
  height: 38px;
  color: #475569;
  background: #fbfcfe;
}

.planner-predicted-grid td {
  height: 42px;
}

.planner-predicted-grid td:first-child,
.planner-predicted-grid th:first-child {
  width: 46px;
  text-align: center;
}

.planner-predicted-grid input {
  max-width: 170px;
  text-align: right;
}

.planner-view-all {
  margin: 0 auto 12px;
  display: block;
}

/* v4.2.8 Planner compact tabular grids */
.planner-expense-grid {
  margin-top: 8px;
  border: 1px solid #dce3ee;
  border-radius: 6px;
  background: #fff;
  overflow-x: auto;
}

.planner-expense-grid table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.planner-expense-grid th,
.planner-expense-grid td {
  height: 40px;
  padding: 7px 10px;
  border-right: 1px solid #e6ebf2;
  border-bottom: 1px solid #e6ebf2;
  text-align: left;
  vertical-align: middle;
}

.planner-expense-grid th {
  color: #475569;
  background: #fbfcfe;
  font-size: 12px;
  font-weight: 800;
}

.planner-expense-grid th:first-child,
.planner-expense-grid td:first-child {
  width: 44px;
  text-align: center;
}

.planner-expense-grid th:last-child,
.planner-expense-grid td:last-child {
  width: 132px;
  border-right: 0;
}

.planner-expense-grid tbody tr:last-child td {
  border-bottom: 0;
}

.planner-expense-grid .planner-year-amount {
  width: 100%;
  max-width: 110px;
  min-height: 30px;
  border: 1px solid #d6dde7;
  border-radius: 4px;
  padding: 4px 7px;
  text-align: right;
}

@media (max-width: 820px) {
  .planner-panel-title,
  .planner-result-title,
  .planner-predict-controls,
  .planner-years-head,
  .planner-year-row,
  .planner-expense-head,
  .planner-expense-row,
  .planner-expense-total {
    grid-template-columns: 1fr;
  }

  .planner-action-icons {
    justify-content: flex-start;
  }
}

@media (max-width: 719px) {
  #plannerTable .planner-expense-grid,
  #plannerTable .planner-predicted-grid {
    overflow-x: auto;
    border: 1px solid #dce3ee;
    background: #fff;
  }

  #plannerTable .planner-expense-grid table,
  #plannerTable .planner-predicted-grid table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
    background: #fff;
  }

  #plannerTable .planner-expense-grid table {
    min-width: 0;
    table-layout: fixed;
  }

  #plannerTable .planner-predicted-grid table {
    min-width: 560px;
  }

  #plannerTable .planner-expense-grid thead,
  #plannerTable .planner-predicted-grid thead {
    position: static;
    display: table-header-group;
    width: auto;
    height: auto;
    overflow: visible;
    clip: auto;
  }

  #plannerTable .planner-expense-grid tbody,
  #plannerTable .planner-predicted-grid tbody {
    display: table-row-group;
  }

  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-predicted-grid tr {
    display: table-row;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  #plannerTable .planner-expense-grid th,
  #plannerTable .planner-expense-grid td,
  #plannerTable .planner-predicted-grid th,
  #plannerTable .planner-predicted-grid td {
    display: table-cell;
    width: auto;
    min-width: 0;
    padding: 7px 8px;
    border-right: 1px solid #e6ebf2;
    border-bottom: 1px solid #e6ebf2;
    font-size: 12px;
    white-space: nowrap;
    vertical-align: middle;
  }

  #plannerTable .planner-expense-grid td::before,
  #plannerTable .planner-predicted-grid td::before {
    content: none;
    display: none;
  }

  #plannerTable .planner-expense-grid th:first-child,
  #plannerTable .planner-expense-grid td:first-child {
    width: 38px;
  }

  #plannerTable .planner-expense-grid th:last-child,
  #plannerTable .planner-expense-grid td:last-child {
    width: 104px;
  }

  #plannerTable .planner-expense-grid .planner-year-amount {
    max-width: 88px;
    min-height: 28px;
    padding: 3px 6px;
    font-size: 13px;
  }
}

/* Final navigation sizing after all UI-fix overrides. */
.bottom-nav {
  grid-template-columns: repeat(9, minmax(78px, 1fr));
}

@media (min-width: 1000px) {
  .bottom-nav {
    max-width: 1040px;
  }
}

@media (max-width: 719px) {
  .bottom-nav {
    grid-template-columns: repeat(9, minmax(68px, 1fr));
  }

  .bottom-nav .nav-item:nth-child(n+6) {
    display: block;
  }
}

/* ============================================================
   User-selectable UI themes
   ============================================================ */
body[data-theme="professional"] {
  --blue: #1a73e8;
  --blue2: #0b57d0;
  --bg: #f6f8fc;
  --card: #fff;
  --text: #172033;
  --muted: #5f6b7a;
  --border: #dfe5ee;
  --shadow: 0 8px 22px rgba(20, 36, 64, .10);
  --soft: #e8f0fe;
}

body[data-theme="devotional"] {
  --blue: #15803d;
  --blue2: #166534;
  --bg: #fffaf0;
  --card: #fffef8;
  --text: #24180b;
  --muted: #76634d;
  --ok: #15803d;
  --warn: #b45309;
  --danger: #b91c1c;
  --border: #ead7b0;
  --shadow: 0 8px 22px rgba(120, 72, 14, .12);
  --soft: #ecfdf3;
}

body[data-theme="religious"] {
  --blue: #b45309;
  --blue2: #7c2d12;
  --bg: #fff7ed;
  --card: #fffdf7;
  --text: #2b1705;
  --muted: #7a5232;
  --ok: #166534;
  --warn: #a16207;
  --danger: #b91c1c;
  --border: #efd0a0;
  --shadow: 0 10px 26px rgba(124, 45, 18, .13);
  --soft: #ffedd5;
}

body[data-theme] {
  background:
    linear-gradient(180deg, rgba(255,255,255,.60), rgba(255,255,255,0) 180px),
    var(--bg);
}

body[data-theme] header,
body[data-theme] .bottom-nav,
body[data-theme] .app-menu,
body[data-theme] .modal-card {
  background: var(--card);
  border-color: var(--border);
}

body[data-theme] .card,
body[data-theme] .agent-add-panel,
body[data-theme] .agent-card,
body[data-theme] .setup-check,
body[data-theme] .version-grid div,
body[data-theme] .table-wrap,
body[data-theme] .daily-finance-card dl div {
  background: var(--card);
  border-color: var(--border);
  border-radius: 8px;
}

body[data-theme] .field input,
body[data-theme] .field select,
body[data-theme] .field textarea,
body[data-theme] .grid-inline-search,
body[data-theme] .collection-tab,
body[data-theme] .text-btn {
  background: #fff;
  border-color: var(--border);
  color: var(--text);
  border-radius: 8px;
}

body[data-theme] .field input:focus,
body[data-theme] .field select:focus,
body[data-theme] .field textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--blue) 28%, #fff);
  border-color: var(--blue);
}

body[data-theme] .btn,
body[data-theme] .signout-btn,
body[data-theme] .icon-btn,
body[data-theme] .quick .qicon,
body[data-theme] .menu-logo {
  border-radius: 8px;
}

body[data-theme] .btn-primary,
body[data-theme] .menu-primary-action {
  background: var(--blue);
  color: #fff;
}

body[data-theme] .btn-secondary,
body[data-theme] .text-btn,
body[data-theme] .icon-btn,
body[data-theme] .quick .qicon,
body[data-theme] .avatar-circle,
body[data-theme] .pill,
body[data-theme] .collection-tab.active,
body[data-theme] .menu-item.active,
body[data-theme] .menu-logo {
  background: var(--soft);
  color: var(--blue2);
}

body[data-theme] .kpi {
  border-left: 4px solid var(--blue);
}

body[data-theme] .bar i,
body[data-theme] .asset-tab.active {
  background: var(--blue);
  border-color: var(--blue);
}

body[data-theme] th {
  background: color-mix(in srgb, var(--soft) 56%, #fff);
  color: var(--text);
}

body[data-theme] .breadcrumb a,
body[data-theme] .nav-item.active,
body[data-theme] .kpi-link {
  color: var(--blue2);
}

body[data-theme="devotional"] header,
body[data-theme="religious"] header {
  box-shadow: 0 1px 0 var(--border);
}

body[data-theme="devotional"] .topbar,
body[data-theme="religious"] .topbar {
  border-top: 4px solid var(--blue);
}

body[data-theme="religious"] .card,
body[data-theme="religious"] .bottom-nav,
body[data-theme="religious"] .app-menu {
  box-shadow: 0 10px 24px rgba(154, 52, 18, .12);
}

body[data-theme] #appMenu {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--card) 92%, var(--soft)), var(--card));
  color: var(--text);
  border-right: 1px solid var(--border);
  box-shadow: 8px 0 28px color-mix(in srgb, var(--blue2) 16%, transparent);
}

body[data-theme] #appMenu .menu-product strong,
body[data-theme] #appMenu .menu-profile strong {
  color: var(--text);
}

body[data-theme] #appMenu .menu-product small,
body[data-theme] #appMenu .menu-profile small,
body[data-theme] #appMenu .menu-section-label {
  color: var(--muted);
}

body[data-theme] #appMenu .menu-item,
body[data-theme] #appMenu .nav-item {
  color: var(--text);
  border-left-color: transparent;
  border-radius: 8px;
}

body[data-theme] #appMenu .menu-item:hover,
body[data-theme] #appMenu .nav-item:hover {
  background: color-mix(in srgb, var(--soft) 70%, #fff);
  color: var(--blue2);
}

body[data-theme] #appMenu .menu-item.active,
body[data-theme] #appMenu .nav-item.active {
  background: var(--soft);
  color: var(--blue2);
  border-left-color: var(--blue);
}

body[data-theme] #appMenu .menu-logo,
body[data-theme] #appMenu .compact {
  background: var(--soft);
  color: var(--blue2);
}

/* Keep the open mobile drawer above the fixed bottom navigation. The drawer
   itself remains scrollable so the sign-out action is always reachable. */
@media (max-width: 719px) {
  #appMenu { z-index: 1100 !important; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
  #menuBackdrop { z-index: 1090 !important; }
  #menuLogoutButton { margin-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

body[data-theme="religious"] #appMenu {
  background:
    linear-gradient(180deg, #fff7ed 0, #fffdf7 44%, #ffedd5 100%);
}

.theme-switcher,
.language-switcher {
  display: grid;
  gap: 8px;
  padding: 0 10px 12px;
}

.theme-choice,
.language-choice {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.72);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}

.theme-choice span {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--border);
  flex: 0 0 auto;
}

.theme-choice[data-theme-choice="professional"] span {
  background: linear-gradient(135deg, #1a73e8 50%, #f6f8fc 50%);
}

.theme-choice[data-theme-choice="devotional"] span {
  background: linear-gradient(135deg, #15803d 50%, #f59e0b 50%);
}

.theme-choice[data-theme-choice="religious"] span {
  background: linear-gradient(135deg, #b45309 45%, #facc15 45% 70%, #166534 70%);
}

.theme-choice.active,
.language-choice.active {
  border-color: var(--blue);
  background: var(--soft);
  color: var(--blue2);
}

.assoc-name,
#menuAssociation,
.association-name-strong {
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .02em;
}

.install-icon-btn {
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
}

.install-glyph {
  position: relative;
  width: 22px;
  height: 22px;
  display: block;
  clip-path: polygon(14% 6%, 90% 50%, 14% 94%);
  background:
    linear-gradient(32deg, #00a0ff 0 34%, transparent 35%),
    linear-gradient(148deg, #00d084 0 36%, transparent 37%),
    linear-gradient(212deg, #ffcd1f 0 38%, transparent 39%),
    linear-gradient(328deg, #ff4b4b 0 42%, transparent 43%);
  filter: drop-shadow(0 1px 1px rgba(20, 36, 64, .18));
}

.install-glyph::before {
  content: "";
  position: absolute;
  inset: 4px 5px 4px 6px;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
  background: rgba(255,255,255,.42);
}

.install-glyph::after {
  content: none;
}

.terms-acceptance {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--soft) 42%, #fff);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.terms-acceptance input {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--blue);
}
.legal-consent{display:grid;gap:12px;padding:16px;border:1px solid #c9d7eb;border-radius:14px;background:#f8fbff}.legal-consent-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.legal-consent h3{margin:0;font-size:17px;color:#172033}.legal-consent-head p{margin:4px 0 0;color:#5a677a;font-size:13px;line-height:1.4}.legal-required{flex:0 0 auto;padding:4px 8px;border-radius:999px;background:#fff0d5;color:#8a4b00;font-size:11px;font-weight:800}.legal-reader{height:260px;overflow-y:auto;overscroll-behavior:contain;padding:14px 16px;border:1px solid #bac9dc;border-radius:10px;background:#fff;color:#26364e;font-size:14px;line-height:1.6;white-space:pre-wrap}.legal-reader:focus{outline:2px solid #a9c7fa;outline-offset:2px}.legal-reader article+article{margin-top:20px;padding-top:16px;border-top:1px solid #e2e8f0}.legal-reader h4{margin:0 0 8px;font-size:15px;color:#14213a}.legal-checks{display:grid;gap:9px}.legal-checks label{display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:1px solid #d7e0ec;border-radius:9px;background:#fff;color:#253650;font-size:13px;font-weight:650;line-height:1.4;cursor:pointer}.legal-checks label:has(input:checked){border-color:#8eb5f1;background:#f1f6ff}.legal-checks input{width:18px;height:18px;flex:0 0 auto;margin:0;accent-color:var(--blue)}

@media (max-width: 719px) {
  main {
    padding: 12px 10px calc(88px + env(safe-area-inset-bottom));
  }

  .topbar {
    min-height: 64px;
    padding: 8px 10px;
  }

  .card {
    padding: 14px;
  }

  .kpis,
  .quick-actions,
  .auction-kpis,
  .asset-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .quick {
    min-height: 76px;
    align-items: center;
  }

  .quick .qicon {
    width: 38px;
    height: 38px;
    font-size: 19px;
    flex: 0 0 auto;
  }

  .quick strong,
  .quick small {
    overflow-wrap: anywhere;
  }

  .bottom-nav {
    height: calc(74px + env(safe-area-inset-bottom));
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
    grid-template-columns: repeat(9, minmax(64px, 1fr));
  }

  .bottom-nav .nav-item {
    min-width: 64px;
    padding: 8px 3px;
    font-size: 10px;
    line-height: 1.15;
  }

  .bottom-nav .nav-item span {
    font-size: 20px;
    margin-bottom: 3px;
  }
}

/* ============================================================
   Final mobile layout hardening
   Keeps Android/iOS headers and bottom navigation aligned.
   ============================================================ */
@media (max-width: 719px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  header {
    overflow: hidden;
  }

  .topbar {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 58px;
    padding: 8px 10px;
  }

  .brand-wrap {
    min-width: 0;
    width: 100%;
    overflow: hidden;
  }

  .brand,
  .assoc-name {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand {
    display: none;
  }

  .assoc-name {
    display: block;
    font-size: 12px;
    line-height: 1.2;
  }

  .topbar-actions {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 42px;
    gap: 6px;
    align-items: center;
    justify-content: end;
    min-width: 0;
    margin-left: 0;
  }

  .icon-btn,
  .install-icon-btn,
  .signout-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    flex: 0 0 42px;
  }

  .signout-btn {
    display: inline-grid;
  }

  .signout-label {
    display: none;
  }

  .breadcrumb {
    min-height: 34px;
    padding: 0 10px 8px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  main {
    width: 100%;
    max-width: 100%;
    padding: 14px 10px calc(84px + env(safe-area-inset-bottom));
  }

  .section-title {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .section-title .pill {
    align-self: flex-start;
  }

  h2 {
    font-size: 26px;
    line-height: 1.15;
    margin: 4px 0 8px;
  }

  .subtle {
    line-height: 1.45;
  }

  .kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .kpi {
    min-height: 116px;
    padding: 14px 12px;
    display: grid;
    align-content: center;
    gap: 8px;
  }

  .kpi small {
    font-size: 13px;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  .kpi strong {
    font-size: clamp(20px, 6.2vw, 28px);
    line-height: 1.1;
    overflow-wrap: anywhere;
  }

  .quick-actions {
    grid-template-columns: 1fr;
  }

  .quick {
    min-height: 68px;
  }

  .bottom-nav {
    left: 0;
    right: 0;
    bottom: 0;
    transform: none;
    width: 100%;
    max-width: none;
    height: calc(70px + env(safe-area-inset-bottom));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    overflow: hidden;
    padding-bottom: env(safe-area-inset-bottom);
    border-radius: 0;
  }

  .bottom-nav .nav-item {
    min-width: 0;
    width: 100%;
    height: 70px;
    padding: 7px 2px 6px;
    font-size: 10px;
    line-height: 1.1;
    overflow: hidden;
  }

  .bottom-nav .nav-item span {
    font-size: 20px;
    margin-bottom: 3px;
  }

  .bottom-nav .nav-item:nth-child(n+6) {
    display: none !important;
  }

  .bottom-nav .nav-item:nth-child(4) {
    font-size: 9px;
  }
}

@media (max-width: 380px) {
  .topbar {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 6px;
    padding-left: 8px;
    padding-right: 8px;
  }

  .topbar-actions {
    grid-auto-columns: 38px;
    gap: 5px;
  }

  .icon-btn,
  .install-icon-btn,
  .signout-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .kpi {
    min-height: 108px;
    padding: 12px 10px;
  }
}

/* v4.3.37 final planner responsive guard */
@media (max-width: 1024px) {
  #plannerForm {
    padding: 12px;
    overflow: hidden;
  }

  #plannerTable,
  #plannerTable .planner-designer,
  #plannerTable .planner-panel {
    min-width: 0;
    overflow: visible;
  }

  #plannerTable .planner-panel {
    display: grid;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
  }

  #plannerTable .planner-panel-title,
  #plannerTable .planner-result-title {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  #plannerTable .planner-panel-title > .btn,
  #plannerTable .planner-result-title > .btn,
  #plannerTable .planner-total-badge,
  #plannerTable .planner-result-title > em {
    grid-column: 1 / -1;
    width: 100%;
  }

  #plannerTable .planner-years-head {
    display: none !important;
  }

  #plannerTable .planner-years-list {
    display: grid;
    gap: 10px;
  }

  #plannerTable .planner-year-row {
    display: grid !important;
    grid-template-columns: 1fr auto !important;
    gap: 8px 12px;
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fff;
  }

  #plannerTable .planner-year-row > span:nth-child(1) {
    grid-column: 1;
    grid-row: 1;
  }

  #plannerTable .planner-year-row > span:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
    font-weight: 800;
  }

  #plannerTable .planner-year-row > span:nth-child(2)::before {
    content: "Total Expenses";
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }

  #plannerTable .planner-year-row > span:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
    text-align: right;
    font-weight: 800;
  }

  #plannerTable .planner-year-row > span:nth-child(3)::before {
    content: "Categories";
    display: block;
    margin-bottom: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
  }

  #plannerTable .planner-year-row > span:nth-child(4) {
    grid-column: 1 / -1;
    grid-row: 3;
    color: #475569;
  }

  #plannerTable .planner-year-row > span:nth-child(4)::before {
    content: "Last Updated: ";
    color: #64748b;
    font-weight: 800;
  }

  #plannerTable .planner-action-icons {
    grid-column: 2;
    grid-row: 1;
    justify-content: end;
    align-self: start;
  }

  #plannerTable .planner-expense-editor {
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fffdfa;
  }

  #plannerTable .planner-expense-editor-title,
  #plannerTable .planner-predict-controls,
  #plannerTable .planner-expense-total {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: stretch;
  }

  #plannerTable .planner-expense-editor-title .btn,
  #plannerTable .planner-predict-controls .btn {
    width: 100%;
  }

  #plannerTable .planner-expense-grid,
  #plannerTable .planner-predicted-grid {
    margin: 8px 0;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  #plannerTable .planner-expense-grid table,
  #plannerTable .planner-expense-grid thead,
  #plannerTable .planner-expense-grid tbody,
  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-expense-grid th,
  #plannerTable .planner-expense-grid td,
  #plannerTable .planner-predicted-grid table,
  #plannerTable .planner-predicted-grid thead,
  #plannerTable .planner-predicted-grid tbody,
  #plannerTable .planner-predicted-grid tr,
  #plannerTable .planner-predicted-grid th,
  #plannerTable .planner-predicted-grid td {
    display: block;
    width: 100%;
    min-width: 0;
  }

  #plannerTable .planner-expense-grid thead,
  #plannerTable .planner-predicted-grid thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  #plannerTable .planner-expense-grid tbody,
  #plannerTable .planner-predicted-grid tbody {
    display: grid;
    gap: 10px;
  }

  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-predicted-grid tr {
    display: grid !important;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 8px 12px;
    padding: 12px;
    border: 1px solid #e3e8f0;
    border-radius: 8px;
    background: #fff;
  }

  #plannerTable .planner-expense-grid td,
  #plannerTable .planner-predicted-grid td {
    height: auto;
    padding: 0;
    border: 0;
    white-space: normal;
    font-size: 14px;
  }

  #plannerTable .planner-expense-grid td::before,
  #plannerTable .planner-predicted-grid td::before {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  #plannerTable .planner-expense-grid td:nth-child(1),
  #plannerTable .planner-predicted-grid td:nth-child(1) {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #f8fafc;
    font-weight: 900;
  }

  #plannerTable .planner-expense-grid td:nth-child(2),
  #plannerTable .planner-predicted-grid td:nth-child(2) {
    grid-column: 2;
    font-weight: 800;
  }

  #plannerTable .planner-expense-grid td:nth-child(2)::before,
  #plannerTable .planner-predicted-grid td:nth-child(2)::before {
    content: "Category";
  }

  #plannerTable .planner-expense-grid td:nth-child(3),
  #plannerTable .planner-predicted-grid td:nth-child(3),
  #plannerTable .planner-predicted-grid td:nth-child(4),
  #plannerTable .planner-predicted-grid td:nth-child(5) {
    grid-column: 2;
  }

  #plannerTable .planner-expense-grid td:nth-child(3)::before {
    content: "Amount";
  }

  #plannerTable .planner-predicted-grid td:nth-child(3)::before {
    content: "Base Year";
  }

  #plannerTable .planner-predicted-grid td:nth-child(4)::before {
    content: "Increase";
  }

  #plannerTable .planner-predicted-grid td:nth-child(5)::before {
    content: "Predicted";
  }

  #plannerTable .planner-expense-grid .planner-year-amount,
  #plannerTable .planner-predicted-grid input {
    width: 100%;
    max-width: none;
    min-height: 40px;
    font-size: 16px;
    text-align: right;
  }
}

@media (max-width: 560px) {
  #plannerTable .planner-panel-title,
  #plannerTable .planner-result-title {
    grid-template-columns: 1fr;
  }

  #plannerTable .planner-year-row {
    grid-template-columns: 1fr !important;
  }

  #plannerTable .planner-action-icons,
  #plannerTable .planner-year-row > span:nth-child(3) {
    grid-column: 1;
    text-align: left;
    justify-content: start;
  }

  #plannerTable .planner-action-icons {
    grid-row: 4;
  }

  #plannerTable .planner-expense-grid tr,
  #plannerTable .planner-predicted-grid tr {
    grid-template-columns: 36px minmax(0, 1fr);
    padding: 10px;
  }
}
.agent-actions{display:flex;align-items:center;gap:6px;flex-wrap:nowrap;white-space:nowrap}.agent-actions>.btn{flex:0 0 auto}.agent-actions .whatsapp-action{width:34px;min-width:34px;padding:0;display:inline-grid;place-items:center}.agent-actions .whatsapp-action:disabled{opacity:.45;cursor:not-allowed}
.agent-card .agent-actions{display:grid!important;grid-template-columns:minmax(0,1fr) 42px minmax(0,1fr);align-items:center;gap:6px;width:100%;flex-wrap:nowrap;position:static!important}.agent-card .agent-actions>.btn{width:100%;min-width:0;position:static!important;float:none!important}.agent-card .agent-actions>.whatsapp-action{width:42px!important;min-width:42px!important;height:42px!important;padding:0!important;border-radius:50%!important;position:static!important;inset:auto!important;transform:none!important}.agent-card .agent-actions>.whatsapp-action .wa-icon{width:23px;height:23px}
.manage-agent-grid-shell{margin-top:12px}.agent-grid .agent-grid-name{display:flex;align-items:center;gap:10px;min-width:0}.agent-grid .agent-grid-name strong,.agent-grid .agent-grid-name small{display:block}.agent-grid .agent-grid-name small{color:var(--muted)}.agent-grid .you-badge{display:inline-block;margin-top:4px;padding:2px 8px;border-radius:999px;background:#eef6ff;color:#2957a4;font-size:11px;font-weight:800}.agent-grid .data-grid-toolbar{display:none}.agent-grid .table-wrap table{min-width:980px}.agent-grid select.agentRoleSelect{width:100%;min-width:160px;padding:10px 12px;border-radius:12px}.agent-row-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.agent-row-actions .btn{white-space:nowrap}.agent-card-list{display:grid;gap:12px;margin-top:12px}
@media (max-width: 720px){
  [data-page="manage"] .agent-grid .table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch}
  [data-page="manage"] .agent-grid .table-wrap table{min-width:100%;table-layout:fixed}
  [data-page="manage"] .agent-grid th,
  [data-page="manage"] .agent-grid td{padding:8px 6px;font-size:11px;overflow-wrap:anywhere}
  [data-page="manage"] .agent-grid th:nth-child(4),
  [data-page="manage"] .agent-grid td:nth-child(4){min-width:120px}
  [data-page="manage"] .agent-grid th:nth-child(5),
  [data-page="manage"] .agent-grid td:nth-child(5){min-width:210px}
  [data-page="manage"] .agent-grid select.agentRoleSelect{min-width:120px;padding:8px 10px;font-size:12px}
  [data-page="manage"] .agent-row-actions{gap:6px}
  [data-page="manage"] .agent-row-actions .btn{padding:8px 10px;font-size:11px}
}
