/* HAVAL LAWYER | Client workspace identity & instant smart assistant | 2026-10-23
 * Approved Variation A: white-first, navy #0B1F33, muted gold #B68A45.
 * Scoped to authenticated #portalView; login visuals and all approved logos stay intact.
 */
html[data-haval-brand="white-first"] #portalView{
 --hv-client-paper:#FFFFFF;
 --hv-client-canvas:#F8F9FA;
 --hv-client-ink:#0B1F33;
 --hv-client-muted:#596B80;
 --hv-client-line:#E3E8EF;
 --hv-client-gold:#B68A45;
 --hv-client-wash:#F8F3EA;
 --hv-client-shadow:0 3px 16px rgba(11,31,51,.035);
}
html[data-haval-brand="white-first"] #portalView #hvAssistantStatus.sr-only{
 position:absolute!important;width:1px!important;height:1px!important;
 padding:0!important;margin:-1px!important;overflow:hidden!important;
 clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important;
}
html[data-haval-brand="white-first"] #portalView .hv-client-assistant{
 position:relative;
 z-index:22;
 box-sizing:border-box;
 max-width:100%;
 margin:0 0 20px;
 padding:16px clamp(15px,1.9vw,24px);
 border:1px solid var(--hv-client-line);
 border-radius:17px;
 background:var(--hv-client-paper);
 color:var(--hv-client-ink);
 box-shadow:var(--hv-client-shadow);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-head{
 display:flex;align-items:center;gap:12px;
 min-width:0;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-symbol{
 width:42px;height:42px;flex:0 0 42px;
 display:grid;place-items:center;
 border-radius:13px;
 border:1px solid rgba(182,138,69,.22);
 background:var(--hv-client-wash);
 color:var(--hv-client-gold);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-symbol svg{
 width:20px;height:20px;stroke-width:1.8;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-heading{
 display:flex;flex-direction:column;gap:3px;
 min-width:0;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-heading strong{
 font-size:13px;line-height:1.65;font-weight:850;
 color:var(--hv-client-ink);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-heading small{
 font-size:10.5px;line-height:1.6;
 color:var(--hv-client-muted);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-main{
 display:grid;grid-template-columns:minmax(175px,.72fr) minmax(0,1.7fr);
 align-items:center;gap:20px;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-input-wrap{
 position:relative;
 display:flex;align-items:center;
 min-width:0;
 border:1px solid #CED7E2;
 border-radius:12px;
 background:var(--hv-client-paper);
 transition:border-color .16s ease,box-shadow .16s ease;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-input-wrap:focus-within{
 border-color:var(--hv-client-gold);
 box-shadow:0 0 0 3px rgba(182,138,69,.13);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-search-icon{
 color:var(--hv-client-gold);margin-inline-start:14px;
 width:19px;height:19px;flex:0 0 19px;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-search-icon svg{
 width:19px;height:19px;stroke-width:1.8;
}
html[data-haval-brand="white-first"] #portalView input#hvAssistantQuery{
 flex:1 1 auto;
 display:block;
 min-width:0;min-height:46px;
 border:0!important;outline:0!important;
 box-shadow:none!important;
 margin:0!important;
 padding:10px 12px!important;
 background:transparent!important;
 color:var(--hv-client-ink)!important;
 font-size:13px!important;
 font-weight:600;
 text-align:start;
 direction:inherit;
}
html[data-haval-brand="white-first"] #portalView input#hvAssistantQuery::placeholder{
 color:var(--hv-client-muted)!important;opacity:.85;font-weight:450;
}
html[data-haval-brand="white-first"] #portalView button#hvAssistantClear{
 display:grid;place-items:center;
 width:33px;height:33px;flex:0 0 33px;
 margin-inline-end:7px;
 border:0!important;border-radius:9px;
 color:var(--hv-client-muted)!important;
 background:var(--hv-client-canvas)!important;
}
html[data-haval-brand="white-first"] #portalView button#hvAssistantClear[hidden]{display:none!important}
html[data-haval-brand="white-first"] #portalView button#hvAssistantClear svg{width:16px;height:16px}
html[data-haval-brand="white-first"] #portalView .hv-assistant-hint{
 padding-top:8px;font-size:10px;font-weight:500;line-height:1.6;
 color:var(--hv-client-muted);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-results{
 position:absolute;
 z-index:80;
 top:calc(100% - 3px);
 inset-inline:clamp(15px,1.9vw,24px);
 border:1px solid var(--hv-client-line);
 border-radius:13px;
 background:var(--hv-client-paper);
 box-shadow:0 18px 45px rgba(11,31,51,.14);
 padding:7px;
 max-height:min(370px,55vh);
 overflow-y:auto;
 overscroll-behavior:contain;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-results[hidden]{display:none!important}
html[data-haval-brand="white-first"] #portalView .hv-assistant-list{
 display:flex;flex-direction:column;gap:3px;
}
html[data-haval-brand="white-first"] #portalView button.hv-assistant-suggestion{
 appearance:none;box-sizing:border-box;
 display:flex;align-items:center;gap:12px;
 width:100%;min-height:62px;
 padding:10px 12px;margin:0;
 text-align:start;cursor:pointer;
 border:1px solid transparent!important;
 border-radius:10px!important;
 color:var(--hv-client-ink)!important;
 background:transparent!important;
 transition:background .16s ease,border-color .16s ease;
}
html[data-haval-brand="white-first"] #portalView button.hv-assistant-suggestion:hover,
html[data-haval-brand="white-first"] #portalView button.hv-assistant-suggestion.is-active,
html[data-haval-brand="white-first"] #portalView button.hv-assistant-suggestion:focus-visible{
 border-color:var(--hv-client-line)!important;
 background:var(--hv-client-canvas)!important;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-icon{
 width:35px;height:35px;flex:0 0 35px;
 display:grid;place-items:center;
 border-radius:10px;
 background:var(--hv-client-wash);
 color:var(--hv-client-gold);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-icon svg{
 width:17px;height:17px;stroke-width:1.8;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-copy{
 min-width:0;flex:1 1 auto;
 display:flex;flex-direction:column;gap:3px;text-align:start;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-copy strong{
 color:var(--hv-client-ink);font-size:12px;font-weight:800;line-height:1.5;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-copy small{
 color:var(--hv-client-muted);font-size:10.5px;line-height:1.55;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-open{
 flex:0 0 auto;font-size:10px;font-weight:750;color:var(--hv-client-gold);
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-empty{
 margin:0;padding:16px;
 font-size:12px;color:var(--hv-client-muted);line-height:1.7;
}
html[data-haval-brand="white-first"] #portalView button.hv-assistant-suggestion:focus-visible,
html[data-haval-brand="white-first"] #portalView button#hvAssistantClear:focus-visible{
 outline:2px solid var(--hv-client-gold)!important;outline-offset:2px;
}
/* Unified approved client identity; scoped to authenticated workspace only. */
html[data-haval-brand="white-first"] #portalView>.sidebar{
 background:#FFFFFF!important;background-image:none!important;
 border-inline-end:1px solid #E3E8EF!important;
 box-shadow:none!important;
}
html[data-haval-brand="white-first"] #portalView>.sidebar .sidebrand{
 padding-block:12px 21px!important;
 border-bottom:1px solid #E3E8EF!important;
}
html[data-haval-brand="white-first"] #portalView>.sidebar .sidebrand img{
 object-fit:contain;
}
html[data-haval-brand="white-first"] #portalView>.sidebar .nav button{
 color:var(--hv-client-muted)!important;
 border-radius:11px!important;
 font-weight:700!important;
 transition:background .17s ease,color .17s ease!important;
}
html[data-haval-brand="white-first"] #portalView>.sidebar .nav button.active{
 color:var(--hv-client-ink)!important;
 background:#F7F8FA!important;
 border-color:#E3E8EF!important;
 box-shadow:inset 3px 0 0 var(--hv-client-gold)!important;
}
html[dir="rtl"][data-haval-brand="white-first"] #portalView>.sidebar .nav button.active{
 box-shadow:inset -3px 0 0 var(--hv-client-gold)!important;
}
html[data-haval-brand="white-first"] #portalView .topbar{
 background:#FFFFFF!important;border-bottom:1px solid #E3E8EF!important;
 backdrop-filter:none!important;
 box-shadow:none!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command{
 background:linear-gradient(118deg,#FFFFFF 0%,#FFFFFF 64%,#FAF7F2 100%)!important;
 color:#0B1F33!important;
 border:1px solid #E3E8EF!important;
 box-shadow:0 3px 18px rgba(11,31,51,.045)!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command :is(h1,h2,h3,b,strong,.dash-greeting,.dash-company-name,#portalWelcome){
 color:#0B1F33!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command :is(p,small,.dash-command-desc){
 color:#536478!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command :is(.dash-meta-card,.dash-quick,.dash-identity){
 border-color:#E3E8EF!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-private-label{
 color:#946F37!important;
}
html[data-haval-brand="white-first"] #portalView :is(.card,.dash-panel,.dash-stat,.panel){
 border-color:var(--hv-client-line)!important;
 box-shadow:var(--hv-client-shadow)!important;
}
html[data-haval-brand="white-first"] #portalView .pagehead h1{
 color:var(--hv-client-ink)!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView{
 --hv-client-paper:#172536;
 --hv-client-canvas:#101C2A;
 --hv-client-ink:#EFF3F8;
 --hv-client-muted:#B4C2D1;
 --hv-client-line:#354658;
 --hv-client-gold:#D0A461;
 --hv-client-wash:#27313B;
 --hv-client-shadow:0 5px 22px rgba(0,0,0,.14);
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView>.sidebar,
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .topbar{
 background:#172536!important;
 border-color:#354658!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView>.sidebar .sidebrand{
 border-color:#354658!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView>.sidebar .nav button.active{
 color:#EFF3F8!important;background:#26384B!important;border-color:#354658!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command{
 background:linear-gradient(118deg,#172536,#1E2E40)!important;
 color:#EFF3F8!important;
 border-color:#354658!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command :is(h1,h2,h3,b,strong,.dash-greeting,.dash-company-name,#portalWelcome){color:#EFF3F8!important}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command :is(p,small,.dash-command-desc){color:#B4C2D1!important}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command :is(.dash-meta-card,.dash-quick,.dash-identity){border-color:#354658!important}
@media(max-width:1100px){
 html[data-haval-brand="white-first"] #portalView .hv-assistant-main{
  grid-template-columns:minmax(0,1fr);gap:12px;
 }
}
@media(max-width:640px){
 html[data-haval-brand="white-first"] #portalView .hv-client-assistant{
  margin-bottom:14px;
  padding:13px 12px;
  border-radius:13px;
 }
 html[data-haval-brand="white-first"] #portalView .hv-assistant-head{gap:10px}
 html[data-haval-brand="white-first"] #portalView .hv-assistant-symbol{width:36px;height:36px;flex-basis:36px;border-radius:10px}
 html[data-haval-brand="white-first"] #portalView .hv-assistant-heading small{font-size:10px}
 html[data-haval-brand="white-first"] #portalView input#hvAssistantQuery{min-height:44px;font-size:16px!important}
 html[data-haval-brand="white-first"] #portalView .hv-assistant-results{inset-inline:10px;max-height:min(330px,53vh)}
 html[data-haval-brand="white-first"] #portalView .hv-assistant-open{display:none}
}
@media(prefers-reduced-motion:reduce){
 html[data-haval-brand="white-first"] #portalView .hv-client-assistant *,
 html[data-haval-brand="white-first"] #portalView .hv-client-assistant *::before{
  transition:none!important;animation:none!important;
 }
}

/* Preserve legibility after migrating the dashboard hero from navy to white. */
html[data-haval-brand="white-first"] #portalView .dash-command .dash-quick{
 background:#F8F9FA!important;color:#0B1F33!important;
 border:1px solid #E3E8EF!important;box-shadow:none!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-quick :is(span,b,strong,svg){
 color:#0B1F33!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-quick .dash-quick-icon{
 color:#B68A45!important;background:#F8F3EA!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-quick .dash-quick-icon svg{
 color:#B68A45!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-meta-card{
 background:#F8F9FA!important;border-color:#E3E8EF!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-meta-card span{
 color:#596B80!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-code{
 color:#916A30!important;background:#F8F3EA!important;border-color:#E8D9C1!important;
}
html[data-haval-brand="white-first"] #portalView .dash-command .dash-status-pill{
 color:#186B47!important;background:#E9F5ED!important;border-color:#CDE7D5!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-quick{
 background:#223449!important;border-color:#354658!important;color:#EFF3F8!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-quick :is(span,b,strong,svg){
 color:#EFF3F8!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-quick .dash-quick-icon{
 background:#3A3A39!important;color:#D0A461!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-quick .dash-quick-icon svg{
 color:#D0A461!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-meta-card{
 background:#223449!important;border-color:#354658!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-meta-card span{
 color:#B4C2D1!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-code{
 color:#D0A461!important;background:#33333A!important;border-color:#66543D!important;
}
html[data-client-theme="dark"][data-haval-brand="white-first"] #portalView .dash-command .dash-status-pill{
 color:#9FDDC1!important;background:#204336!important;border-color:#36654F!important;
}

/* Tablet/mobile boundary: keep one content track when sidebar becomes a drawer. */
@media(max-width:820px){
 html[data-haval-brand="white-first"] #portalView.app{
  grid-template-columns:minmax(0,1fr)!important;
  width:100%;max-width:100%;min-width:0!important;
 }
 html[data-haval-brand="white-first"] #portalView>.main,
 html[data-haval-brand="white-first"] #portalView .content{
  width:100%;max-width:100%;min-width:0!important;
 }
 html[data-haval-brand="white-first"] #portalView .dash-command,
 html[data-haval-brand="white-first"] #portalView .dash-quick-actions{
  min-width:0!important;
 }
}

/* An off-canvas sidebar must not contribute to the document's scroll width.
 * The original mobile menu continues to toggle .open; its children are retained. */
@media(max-width:820px){
 html[data-haval-brand="white-first"] #portalView>.sidebar:not(.open){
  display:none!important;
 }
 html[data-haval-brand="white-first"] #portalView>.sidebar.open{
  display:flex!important;
 }
}

/* Keep the closed client drawer out of the horizontal scroll footprint.
   Opening the drawer retains the original .open navigation semantics. */
@media (max-width:820px){
 html[data-haval-brand="white-first"] #portalView>.sidebar:not(.open){
  display:none!important;
 }
 html[data-haval-brand="white-first"] #portalView>.sidebar.open{
  display:flex!important;
 }
}

/* Small tablet toolbar: keep the account menu avatar accessible without
 * rendering a full text chip into the four-column toolbar at 820px. */
@media(max-width:900px){
 html[data-haval-brand="white-first"] #portalView .topbar .top-account-copy,
 html[data-haval-brand="white-first"] #portalView .topbar #accountMenuBtn>[data-lucide="chevron-down"],
 html[data-haval-brand="white-first"] #portalView .topbar #accountMenuBtn>svg.lucide-chevron-down{
  display:none!important;
 }
 html[data-haval-brand="white-first"] #portalView .topbar .accountwrap,
 html[data-haval-brand="white-first"] #portalView .topbar #accountMenuBtn{
  min-width:0!important;
  max-width:44px!important;
 }
 html[data-haval-brand="white-first"] #portalView .topbar #accountMenuBtn{
  width:42px!important;
  padding:4px!important;
  display:grid!important;
  place-items:center!important;
 }
}

/* Tablet header must share the mobile icon-only account control at 820px. */
@media(max-width:820px){
 html[data-haval-brand="white-first"] #portalView .topbar .top-account-chip{
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:40px!important;min-width:40px!important;max-width:40px!important;
  padding:0!important;gap:0!important;overflow:hidden!important;
 }
 html[data-haval-brand="white-first"] #portalView .topbar .top-account-chip .top-account-copy,
 html[data-haval-brand="white-first"] #portalView .topbar .top-account-chip :is(i,svg)[data-lucide="chevron-down"]{
  display:none!important;
 }
 html[data-haval-brand="white-first"] #portalView .topbar .top-account-avatar{
  display:grid!important;place-items:center!important;
  flex:0 0 30px!important;width:30px!important;height:30px!important;
 }
}

/* Records found by the permission-aware legal archive assistant. */
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-heading{
 padding:9px 11px 6px;
 font-size:11px;font-weight:850;line-height:1.7;
 color:var(--hv-client-ink);
 border-bottom:1px solid var(--hv-client-line);
 margin-bottom:4px;
}
html[data-haval-brand="white-first"] #portalView button.hv-assistant-record{
 border-color:color-mix(in srgb,var(--hv-client-gold) 20%,var(--hv-client-line))!important;
 background:color-mix(in srgb,var(--hv-client-gold) 3%,var(--hv-client-paper))!important;
 min-height:70px;
}
html[data-haval-brand="white-first"] #portalView button.hv-assistant-record:hover,
html[data-haval-brand="white-first"] #portalView button.hv-assistant-record:focus-visible,
html[data-haval-brand="white-first"] #portalView button.hv-assistant-record.is-active{
 border-color:var(--hv-client-gold)!important;
 background:color-mix(in srgb,var(--hv-client-gold) 8%,var(--hv-client-paper))!important;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-search-note{
 border-top:1px solid var(--hv-client-line);
 padding:11px 12px 8px;margin:5px 0 0;
 line-height:1.8;color:var(--hv-client-muted);
 font-size:11px;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-result-copy small{
 white-space:normal;overflow-wrap:anywhere;
}
html[data-haval-brand="white-first"] #portalView .hv-assistant-results{
 max-height:min(440px,61dvh);
}
@media(max-width:640px){
 html[data-haval-brand="white-first"] #portalView .hv-assistant-results{
  max-height:min(380px,55dvh);
 }
 html[data-haval-brand="white-first"] #portalView .hv-assistant-open{display:inline;font-size:10px}
}
