/* POSH Invoice final shell resolution + brand + login parity fix */
:root{--posh-navy:#04182a;--posh-navy2:#082a42;--posh-blue:#078ad1;--posh-blue2:#1457e6;--posh-line:#d8e5ee;--posh-text:#0d1f37;--posh-muted:#6f8499}
html{font-size:16px!important}body{min-width:0;overflow-x:hidden;background:#f4f8fb}

/* === HIGH-RES BRAND / SIDEBAR === */
.sidebar,.app-shell>.sidebar{width:176px!important;min-width:176px!important;background:linear-gradient(180deg,#04182a,#052239)!important;border-right:1px solid #0a3551!important}
.main-content,.app-shell>.main{margin-left:176px!important;min-width:0!important;width:calc(100% - 176px)!important}
.sidebar-logo,.brand-block{height:100px!important;min-height:100px!important;margin:10px 9px 13px!important;padding:12px!important;border-radius:12px!important;border:1px solid rgba(30,119,167,.38)!important;background:linear-gradient(145deg,#0a2a40,#071c2e)!important;display:flex!important;align-items:center!important;justify-content:center!important;overflow:hidden!important}
.sidebar-logo>*,.brand-block>*{display:none!important}
.sidebar-logo::before,.brand-block::before{content:"";display:block;width:145px;height:48px;background:url('./brand/posh-invoice-logo-hd.png') center/contain no-repeat!important;filter:drop-shadow(0 0 10px rgba(0,154,255,.18));image-rendering:auto}
.sidebar nav{padding-inline:7px!important}.sidebar nav button{font-size:11px!important;min-height:36px!important;border-radius:7px!important;padding:0 10px!important}.posh-nav-group{margin:11px 10px 5px!important;font-size:7px!important}

/* === FIX DESKTOP RESOLUTION / COMMAND BAR === */
.topbar{height:54px!important;min-height:54px!important;padding:0 11px!important;gap:7px!important;display:flex!important;align-items:center!important;width:100%!important;min-width:0!important;overflow:visible!important;background:#fff!important;border-bottom:1px solid var(--posh-line)!important;position:sticky!important;top:0!important;z-index:500!important}
.topbar>*{min-width:0}.topbar .menu-btn{display:none!important}.posh-workspace-chip{height:34px!important;min-width:112px!important;max-width:126px!important;flex:0 0 auto!important;border:1px solid #d1dfe8!important;background:#fff!important;border-radius:7px!important;padding:0 10px!important;font-size:10px!important;font-weight:850!important}
.topbar .scan-btn{height:34px!important;flex:0 0 auto!important;white-space:nowrap!important;padding-inline:11px!important;border-radius:7px!important}
.topbar .search{flex:1 1 360px!important;min-width:140px!important;max-width:520px!important;margin:0 auto 0 0!important}.topbar .search input{height:34px!important;width:100%!important;border-radius:7px!important;font-size:10px!important;padding:0 12px 0 34px!important}
.topbar-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:5px!important;flex:0 1 auto!important;min-width:0!important;max-width:620px!important;margin-left:auto!important}.topbar-actions>*{flex:0 0 auto}.topbar-actions>button,.topbar-actions>a{height:34px!important;border-radius:7px!important;font-size:10px!important;padding:0 9px!important}.topbar-actions .primary{padding-inline:12px!important}.cloud-pill{height:30px!important;padding:0 10px!important;font-size:8px!important}

/* account control replaces exposed email/logout and remains usable at 1280px */
.posh-account-wrap{position:relative!important;display:flex!important;align-items:center!important;order:2}.posh-account-button{height:34px!important;min-width:36px!important;max-width:164px!important;border:1px solid #d4e1ea!important;background:#fff!important;border-radius:8px!important;padding:3px 5px!important;display:flex!important;align-items:center!important;gap:7px!important}.posh-account-avatar{width:26px!important;height:26px!important;border-radius:7px!important;background:url('./brand/posh-invoice-favicon-hd.png') center/cover no-repeat!important;color:transparent!important;box-shadow:0 0 0 1px #c8deec}.posh-account-copy strong{font-size:9px!important;max-width:92px!important}.posh-account-copy small{font-size:7px!important}.posh-account-menu{top:42px!important;width:250px!important}.posh-original-account-hidden{display:none!important}

@media(max-width:1180px){.topbar .search{flex-basis:240px!important;max-width:380px!important}.posh-account-copy,.posh-account-caret{display:none!important}.posh-account-button{width:36px!important;min-width:36px!important;padding:3px!important}.topbar-actions>button,.topbar-actions>a{padding-inline:8px!important}}
@media(max-width:980px){.topbar .search{min-width:120px!important;max-width:300px!important}.topbar-actions .cloud-pill{display:none!important}}
@media(max-width:820px){.sidebar{width:0!important;min-width:0!important}.app-shell>.main,.main-content{margin-left:0!important;width:100%!important}.topbar .menu-btn{display:inline-flex!important}.posh-workspace-chip{min-width:98px!important;max-width:110px!important}.topbar .search{display:none!important}.topbar{padding:0 8px!important}.posh-account-menu{position:fixed!important;right:8px!important;top:58px!important;width:min(250px,calc(100vw - 16px))!important}}
@media(max-width:560px){.topbar .scan-btn{display:none!important}.topbar-actions>button:not(.primary):not(.posh-account-button){display:none!important}.topbar-actions .primary{padding-inline:10px!important}.posh-workspace-chip{min-width:102px!important}}

/* === BOS-STYLE LOGIN USING EXISTING FUNCTIONAL FORM === */
body:has(.login-shell){background:#06182b!important;overflow:hidden!important}
.login-shell{position:relative!important;min-height:100dvh!important;width:100vw!important;display:grid!important;grid-template-columns:minmax(0,1fr) minmax(360px,450px)!important;align-items:center!important;gap:42px!important;padding:42px clamp(30px,5vw,82px)!important;background:
linear-gradient(90deg,rgba(2,19,37,.96) 0%,rgba(3,27,52,.85) 36%,rgba(4,31,59,.27) 62%,rgba(255,255,255,.12) 100%),
url('./brand/posh-glass-tower-login.webp') center/cover no-repeat!important;overflow:hidden!important}
.login-shell::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(0,0,0,.02),rgba(0,17,38,.16));pointer-events:none}
.posh-login-hero{position:relative;z-index:2;align-self:stretch;display:flex;flex-direction:column;justify-content:space-between;max-width:610px;color:#fff;padding:8px 0 6px}.posh-login-hero-brand{display:flex;align-items:center;gap:14px}.posh-login-hero-brand img{width:230px;height:auto;object-fit:contain;filter:drop-shadow(0 3px 12px rgba(0,0,0,.22))}.posh-login-hero-copy{margin:auto 0;max-width:560px}.posh-login-kicker{display:inline-flex;align-items:center;gap:7px;padding:7px 11px;border:1px solid rgba(255,255,255,.25);border-radius:999px;background:rgba(255,255,255,.08);font-size:10px;font-weight:850;letter-spacing:.12em;text-transform:uppercase;backdrop-filter:blur(10px)}.posh-login-hero h2{font-size:clamp(34px,4vw,56px);line-height:.98;letter-spacing:-.045em;margin:22px 0 16px;max-width:580px}.posh-login-hero p{font-size:14px;line-height:1.7;color:rgba(255,255,255,.78);max-width:510px}.posh-login-benefits{display:grid;gap:10px;margin-top:24px;font-size:12px;color:rgba(255,255,255,.86)}.posh-login-benefits span{display:flex;align-items:center;gap:10px}.posh-login-benefits i{font-style:normal;color:#5bd5ff}.posh-login-foot{font-size:10px;color:rgba(255,255,255,.56)}
.login-card{position:relative!important;z-index:3!important;width:100%!important;max-width:430px!important;justify-self:end!important;background:rgba(255,255,255,.96)!important;border:1px solid rgba(255,255,255,.8)!important;border-radius:22px!important;box-shadow:0 28px 80px rgba(0,16,37,.30)!important;padding:24px!important;backdrop-filter:blur(22px)!important}.login-card .login-brand{display:none!important}.login-card>.posh-login-tabs{display:grid;grid-template-columns:1fr 1fr;gap:4px;background:#f1f5f9;border-radius:13px;padding:4px;margin-bottom:22px}.posh-login-tab{height:34px;border:0;border-radius:10px;background:transparent;font-size:10px;font-weight:800;color:#53677d;cursor:pointer}.posh-login-tab.active{background:#fff;color:#101d31;box-shadow:0 2px 8px rgba(15,23,42,.08)}.login-card .eyebrow{display:none!important}.login-card h1{font-size:28px!important;letter-spacing:-.035em!important;color:#0d1b2d!important;margin:0 0 7px!important}.login-card .muted-text{font-size:11px!important;line-height:1.55!important;color:#718298!important;margin-bottom:18px!important}.login-form{display:grid!important;gap:11px!important}.login-form label{font-size:9px!important;font-weight:800!important;color:#496076!important;letter-spacing:.03em!important}.login-form input{height:42px!important;border:1px solid #d8e3ec!important;border-radius:10px!important;background:#fbfdff!important;padding:0 12px!important;font-size:12px!important;box-shadow:none!important}.login-form input:focus{border-color:#3aaee2!important;box-shadow:0 0 0 3px rgba(10,145,209,.10)!important}.login-form .btn{height:42px!important;border-radius:10px!important;font-size:11px!important;font-weight:850!important}.login-form .btn.primary{background:linear-gradient(90deg,#078bd2,#1659ec)!important;border:0!important;box-shadow:0 8px 20px rgba(15,105,222,.19)!important}.login-form .btn.secondary{background:#fff!important;border:1px solid #d8e3ec!important;color:#24374c!important}.oauth-grid{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.posh-login-note{margin-top:13px;text-align:center;font-size:9px;color:#94a3b8}.login-notice,.login-error{border-radius:9px!important;font-size:10px!important}

@media(max-width:900px){body:has(.login-shell){overflow:auto!important}.login-shell{grid-template-columns:1fr!important;align-items:start!important;padding:26px 20px!important;min-height:100dvh!important;background-position:63% center!important}.posh-login-hero{min-height:250px!important;padding:0!important}.posh-login-hero-brand img{width:190px}.posh-login-hero-copy{margin:35px 0 18px}.posh-login-hero h2{font-size:38px!important}.posh-login-benefits,.posh-login-foot{display:none}.login-card{justify-self:center!important;max-width:460px!important;margin-bottom:30px!important}}
@media(max-width:520px){.login-shell{padding:18px 12px!important;background-position:66% center!important}.posh-login-hero{min-height:170px!important}.posh-login-hero-brand img{width:150px}.posh-login-hero-copy{margin:22px 0 0}.posh-login-kicker{font-size:8px}.posh-login-hero h2{font-size:30px!important;margin:12px 0 8px}.posh-login-hero p{font-size:11px}.login-card{padding:18px!important;border-radius:18px!important}.login-card h1{font-size:24px!important}}
