/* Patch 4 - workspace polish: sticky no-scroll sidebar, cool menu, actionable illustrated KPI cards, footer + dialog logos */
@media(min-width:781px){
 body.workspace .app-shell{align-items:start}
 body.workspace .side{position:sticky;top:0;align-self:start;height:100vh;overflow:hidden}
 body.workspace .side-nav{flex:1 1 auto;min-height:0;overflow:visible;gap:clamp(2px,.6vh,6px);padding:4px 0}
}
@media(min-width:781px) and (max-height:560px){body.workspace .side-nav{overflow-y:auto;scrollbar-width:none}body.workspace .side-nav::-webkit-scrollbar{display:none}}
body.workspace .nav-link{position:relative;min-height:clamp(34px,5.4vh,46px);padding:0 12px 0 8px;border-radius:12px;gap:11px;font-weight:600;color:#e6f0ff;background:transparent;transition:transform .15s,background .15s,box-shadow .15s}
body.workspace .nav-link span{flex:none;width:30px;height:30px;border-radius:9px;display:grid;place-items:center;font-size:15px;background:rgba(255,255,255,.10);transition:background .15s,color .15s}
body.workspace .nav-link:hover{background:rgba(255,255,255,.09);transform:translateX(3px)}
body.workspace .nav-link:hover span{background:rgba(255,255,255,.2)}
body.workspace .nav-link.on{color:#fff;background:linear-gradient(90deg,rgba(255,255,255,.24),rgba(255,255,255,.06));box-shadow:inset 3px 0 0 #8fe36a,0 8px 18px -10px rgba(0,0,0,.55)}
body.workspace .nav-link.on span{background:linear-gradient(135deg,#8fe36a,#34b6ff);color:#0b2a52}
body.workspace .nav-link:focus-visible{outline:2px solid #9ec5ff;outline-offset:2px}

body.workspace .stat{display:flex;align-items:center;gap:14px;width:100%;text-align:left;font:inherit;color:inherit;position:relative;overflow:hidden;padding:16px 18px}
body.workspace .stat-art{flex:none;width:72px;height:72px;border-radius:20px;background:linear-gradient(145deg,#f4f8ff,#e8f0fd);display:grid;place-items:center}
body.workspace .stat-art img{width:64px;height:64px;display:block}
body.workspace .stat.green .stat-art{background:linear-gradient(145deg,#f1faec,#e2f2d8)}
body.workspace .stat.amber .stat-art{background:linear-gradient(145deg,#fff8e8,#ffefc9)}
body.workspace .stat.red .stat-art{background:linear-gradient(145deg,#fff2f2,#fde0e0)}
body.workspace .stat-body{display:flex;flex-direction:column;gap:2px;min-width:0}
body.workspace .stat-body b{font-size:28px;line-height:1.1;letter-spacing:-.02em}
body.workspace .stat-body small{font-size:14px;font-weight:600;color:var(--muted)}
body.workspace .stat-cta{font-style:normal;margin-top:7px;display:inline-flex;align-items:center;gap:6px;font-size:13px;font-weight:700;color:var(--blue)}
body.workspace .stat-cta i{font-style:normal;transition:transform .15s}
body.workspace .stat.actionable{cursor:pointer;transition:transform .16s,box-shadow .16s,border-color .16s}
body.workspace .stat.actionable:hover{transform:translateY(-3px);box-shadow:0 14px 28px -14px rgba(20,60,120,.45)}
body.workspace .stat.actionable:hover .stat-cta i{transform:translateX(5px)}
body.workspace .stat.actionable:active{transform:translateY(-1px)}
body.workspace .stat.actionable:focus-visible{outline:3px solid #8bb5ff;outline-offset:2px}

body.workspace .dashboard-footer{display:flex;flex-wrap:wrap;align-items:center;gap:18px;padding:18px 28px 26px;border-top:1px solid var(--line);background:#fff;font-size:14px;color:var(--muted)}
body.workspace .dashboard-footer>div{display:flex;align-items:center;gap:30px;flex-wrap:wrap}
body.workspace .dashboard-footer img{height:34px;width:auto;margin:0;object-fit:contain;display:block}
body.workspace .dashboard-footer img[alt="Swayam UPI"]{height:48px}

.invoice-detail-brand{display:flex;justify-content:center;padding:2px 0 14px;margin-bottom:14px;border-bottom:1px solid #dbe6f5}
.invoice-detail-brand img{height:76px;width:auto;max-width:80%;object-fit:contain}

/* Patch 6: sidebar layout that never overlaps - header and logout stay fixed, only the menu list scrolls when it grows */
@media(min-width:781px){
 body.workspace .side{display:flex;flex-direction:column;height:100vh;height:100dvh;overflow:hidden}
 body.workspace .side>*{flex:none}
 body.workspace .side .side-nav{flex:1 1 0;min-height:0;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;gap:4px;padding:4px 4px 8px 0;scrollbar-width:thin;scrollbar-color:rgba(255,255,255,.35) transparent}
 body.workspace .side .side-nav::-webkit-scrollbar{width:6px}
 body.workspace .side .side-nav::-webkit-scrollbar-thumb{background:rgba(255,255,255,.35);border-radius:6px}
 body.workspace .side .nav-link{flex:none;min-height:44px;padding-top:0;padding-bottom:0}
 body.workspace .side .side-bottom{flex:none;margin-top:0;padding-top:12px;border-top:1px solid rgba(255,255,255,.22);display:flex;flex-direction:column;gap:10px}
 body.workspace .side .logout-btn{flex:none;min-height:42px;align-items:center;margin:0}
 body.workspace .side .side-footer{margin:0;padding:0 4px}
 body.workspace .side .side-brand{padding:12px 14px}
 body.workspace .side .side-brand .brand img{max-width:200px}
}
@media(min-width:781px) and (max-height:700px){body.workspace .side{padding-top:12px;padding-bottom:12px;gap:10px}body.workspace .side .side-brand .brand img{max-width:150px}body.workspace .side .nav-link{min-height:38px}}
