/* Haven Command | Navy & Gold design system
   Shared across the CEO dashboard and all relationship workspaces.
   Responsive by layout, not by shrinking browser zoom. */
:root{
  color-scheme:dark;
  --bg:#071325;--panel:#0d2039;--panel2:#142b49;--line:#2b405b;
  --text:#f2f4f8;--muted:#a6b5c8;--cyan:#d7ad62;--green:#77d2b1;
  --gold:#e9bd73;--red:#f29499;
  --haven-navy:#071325;--haven-navy-soft:#102642;--haven-gold:#e9bd73;
  --haven-gold-bright:#f6d79e;--haven-gold-dark:#ad8246;
  --haven-border:rgba(220,181,111,.20);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;
}
html{min-width:0;scrollbar-gutter:stable}
body{
  min-width:0;max-width:100%;overflow-x:hidden;
  background:radial-gradient(ellipse 80% 50% at 78% -10%,rgba(185,139,67,.075),transparent 70%),linear-gradient(180deg,#091a30 0%,#071325 42%,#06111f 100%);
  color:var(--text);font-size:13px;line-height:1.48;
}
*,*::before,*::after{box-sizing:border-box}
:where(.shell,main,section,.page,.card,.column,.partner,.row,.grid,.grid2,.grid3,.grid4,.home-work,.home-summary){min-width:0}
:where(p,td,th,.small,.sub,.note,.notice,.profile-field,.partner){overflow-wrap:anywhere}
:where(a){color:var(--haven-gold)}
a:hover{color:var(--haven-gold-bright)}
:where(button,.btn,input,select,textarea){font-family:inherit}
:where(button,.btn){transition:background .16s ease,border-color .16s ease,box-shadow .16s ease,transform .16s ease}
:where(button,.btn):focus-visible,:where(a,input,select,textarea):focus-visible{outline:2px solid var(--haven-gold-bright);outline-offset:3px}
:where(button,.btn):not(:disabled):hover{box-shadow:0 4px 18px rgba(0,0,0,.18)}
:where(button,.btn):not(:disabled):active{transform:translateY(1px)}
:where(h1,h2,h3){letter-spacing:-.025em;line-height:1.22}
h1{color:var(--haven-gold-bright)!important;font-size:clamp(23px,2vw,30px)!important;font-weight:760;margin-top:4px}
h2{color:#f4e2c2;font-size:clamp(15px,1.15vw,18px);font-weight:720}
h3{color:#e8eaf1}
:where(.eyebrow,.micro){color:var(--haven-gold)!important;letter-spacing:.13em}
:where(.sub,.small,.muted){color:var(--muted)}
header{
  background:linear-gradient(110deg,#0a1b33,#0c213b 70%,#152840)!important;
  border-bottom:1px solid var(--haven-border)!important;
  box-shadow:0 4px 25px rgba(0,0,0,.17);
}
header .brand b{color:var(--haven-gold-bright);font-weight:850;letter-spacing:.11em}
header .logo{
  color:#071325!important;
  background:linear-gradient(135deg,#f6dda9,#d4a456 60%,#a97b3b)!important;
  box-shadow:inset 0 1px 0 #fff5d3,0 0 0 1px rgba(250,210,139,.28),0 7px 18px rgba(0,0,0,.24);
}
header .eyebrow{color:var(--haven-gold)!important}
:where(.card,.column,.pipeline-column,.profile-field,.detail,#login,.modal){
  background:linear-gradient(160deg,rgba(20,43,72,.98),rgba(11,28,50,.98))!important;
  border:1px solid var(--haven-border)!important;
  box-shadow:0 5px 24px rgba(0,0,0,.13),inset 0 1px 0 rgba(255,255,255,.025);
  border-radius:12px;
}
:where(.card,.column,.pipeline-column){min-width:0}
:where(.card,.column,.pipeline-column):hover{border-color:rgba(233,189,115,.32)!important}
:where(.card.soft,.partner,.pipeline-stage,.profile-field,.draft,.message,.ai-output,.note,.notice,.warn){
  background:#102541!important;border-color:var(--haven-border)!important;
}
:where(.metric,.number,.big,.stats b,.score){color:var(--haven-gold-bright)!important;font-variant-numeric:tabular-nums}
:where(.pill,.count,.tag){
  background:rgba(224,174,91,.09)!important;color:#f0d6a8!important;
  border:1px solid rgba(226,184,111,.26)!important;
}
:where(.pill.green){background:rgba(67,147,113,.13)!important;color:#9be2bd!important;border-color:rgba(67,147,113,.3)!important}
:where(.pill.red){background:rgba(169,76,85,.15)!important;color:#ffc0c0!important;border-color:rgba(169,76,85,.3)!important}
:where(.btn,button:not(.secondary):not(.ghost):not(.danger):not(.profile-open):not([data-page])){
  background:linear-gradient(135deg,#f0ca88,#d3a154)!important;
  border:1px solid #e7bd76!important;color:#0a1b31!important;font-weight:760;
}
:where(.btn.secondary,.btn.ghost,button.secondary,button.profile-open,aside button){
  background:#182f4e!important;border:1px solid rgba(233,189,115,.25)!important;
  color:#f0dbb7!important;
}
:where(.btn.secondary,.btn.ghost,button.secondary,button.profile-open,aside button):hover{
  background:#233e60!important;border-color:rgba(233,189,115,.52)!important
}
:where(.btn.danger){background:#63343d!important;border-color:#a15b62!important;color:#fff!important}
:where(input,select,textarea,.select,.textarea,.inline-input){
  background:#0a1c32!important;color:#f5f2ea!important;border:1px solid #42506a!important;
  max-width:100%;min-width:0
}
:where(input,select,textarea):focus{border-color:var(--haven-gold)!important}
:where(.bar>span,.progress>div){background:linear-gradient(90deg,#b88540,#f2ce8c)!important}
:where(.stage-tab.active,.tab.active){background:#3b352b!important;color:#ffe5b7!important;border-color:#d4a456!important}
:where(.stage-tab .stagecount){color:var(--haven-gold-bright)!important}
:where(.home-task,.listrow,.brief-item,.home-approval-group,.item,td,th){border-color:var(--haven-border)!important}
:where(.notice,.warn){border-left:3px solid var(--haven-gold)!important}
:where(.toast){background:#172f4d!important;border-color:var(--haven-gold)!important;color:#f7eddd}
:where(.profile-drawer){background:#0a1c33!important;border-color:var(--haven-border)!important}
:where(.tablewrap){max-width:100%;overflow-x:auto;overscroll-behavior-x:contain}
:where(.tablewrap table){width:100%}
:where(.board,.pipeline-grid,.grid,.cards){max-width:100%}
:where(.nav){align-items:center}
:where(.nav a,header nav a){text-decoration:none;font-weight:650}
:where(.nav a,header nav a):hover{text-decoration:underline}
:where(.toolbar,.filters,.row){min-width:0}
:where(.home-summary,.grid4,.grid3,.grid2,.home-work,.brief-grid,.two-col){min-width:0}
:where(.home-summary>.card){padding:14px 15px}
:where(.home-summary .metric){font-size:clamp(22px,2.1vw,29px);margin:5px 0}
:where(.home-summary .eyebrow){font-size:10px}
:where(.home-summary .small){font-size:11px}
:where(.home-task,.home-approval-group){padding-top:10px;padding-bottom:10px}
:where(.sectiongap){margin-top:12px}
:where(.home-work){gap:12px}
:where(.home-prospect-links a,.home-task a){color:var(--haven-gold)!important}
:where(.home-work .card){padding:15px}
:where(.home-work h2){margin-bottom:6px}
:where(.home-work p.small){margin:4px 0 10px}
:where(.footnote,.foot){color:var(--muted)}
/* Desktop laptop fit: 100% zoom at 1280-1440px without horizontal overflow. */
@media (min-width:801px){
  body>.shell{grid-template-columns:clamp(188px,15.5vw,222px) minmax(0,1fr)!important;min-width:0}
  body>.shell>aside{padding:13px 9px!important}
  body>.shell>aside :where(button,a){font-size:12px!important;padding:10px 10px!important;line-height:1.3}
  body>.shell>main{max-width:none!important;width:100%!important;padding:18px clamp(14px,1.8vw,28px)!important}
  body>header{height:68px!important;min-height:68px;padding:10px 20px!important}
  body>.shell{min-height:calc(100vh - 68px)!important}
  .home-summary{gap:10px!important;margin:11px 0!important}
  .home-work{grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important}
}
@media (min-width:801px) and (max-width:1240px){
  body>.shell{grid-template-columns:184px minmax(0,1fr)!important}
  body>.shell>main{padding:14px!important}
  .home-work{grid-template-columns:1fr!important}
  .home-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .grid4{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .card{padding:14px!important}
}
@media (max-width:800px){
  html{scrollbar-gutter:auto}
  body>.shell{display:block!important}
  body>header{min-height:62px!important;padding:11px 14px!important}
  body>.shell>aside{
    display:flex!important;overflow-x:auto;overflow-y:hidden;gap:6px;
    padding:8px 12px!important;scrollbar-width:thin
  }
  body>.shell>aside :where(a,button){white-space:nowrap!important;width:auto!important;flex:0 0 auto;padding:9px 12px!important}
  body>.shell>main{width:100%!important;max-width:none!important;padding:14px!important}
  .home-work{grid-template-columns:1fr!important}
  .home-summary{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  :where(.grid4,.grid3,.grid2,.brief-grid,.two-col){grid-template-columns:1fr!important}
  :where(header nav,.nav){gap:10px}
}
@media (max-width:520px){
  h1{font-size:23px!important}
  .home-summary{grid-template-columns:1fr!important}
  :where(.card,.column,.pipeline-column){padding:14px!important}
  :where(.home-task){flex-wrap:wrap}
  :where(.home-task a){white-space:normal}
  :where(.row){flex-wrap:wrap}
  :where(header){gap:10px}
  header .brand b{font-size:14px!important}
  header .micro{font-size:9px}
  .profile-grid{grid-template-columns:1fr!important}
}
@media(prefers-reduced-motion:reduce){
  :where(button,.btn){transition:none!important}
}


/* Brand-light overrides loaded last on shared workspaces */
/* Haven Risk Partners — bright, accessible brand design system.
   Loaded last through index.html; specific overrides protect older dark modules. */
:root{
 color-scheme:light!important;
 --bg:#f5f8fd!important;--panel:#ffffff!important;--panel2:#eef5ff!important;
 --line:#d7e3f0!important;--text:#081f49!important;--muted:#536981!important;
 --cyan:#087af5!important;--green:#137c55!important;--gold:#087af5!important;
 --red:#b93443!important;--haven-navy:#071f4a!important;--haven-navy-soft:#eaf3ff!important;
 --haven-gold:#087af5!important;--haven-gold-bright:#0656b9!important;
 --haven-gold-dark:#084b9e!important;--haven-border:#d7e3f0!important;
}
html,body{background:#f5f8fd!important;color:#102b53!important}
body>.shell,main,.page{background:#f5f8fd!important;color:#102b53!important}
body>header,header{background:#fff!important;border-bottom:1px solid #dae5f3!important;box-shadow:0 2px 12px #0827540b!important}
header .brand b{color:#081f49!important;font-weight:850!important}
header .micro{color:#487196!important}
header .logo{background:#071f4a!important;color:#fff!important;box-shadow:none!important}
body>.shell>aside,#nav,aside#nav{background:#fff!important;border-right:1px solid #d7e3f0!important}
#nav .navlabel{color:#5e7898!important}
#nav :is(button,a){color:#143e75!important;background:transparent!important;border:0!important}
#nav :is(button,a):hover,#nav button.active{background:#e7f1ff!important;color:#065bc0!important}
:where(h1,h2,h3),h1,h2,h3{color:#081f49!important}
:where(.eyebrow,.micro){color:#086bd8!important}
:where(.small,.sub,.muted,.footnote,.foot){color:#5c7088!important}
:where(.card,.column,.pipeline-column,.profile-field,.detail,#login,.modal,.cockpit-kpi),
#briefing .cockpit-grid>.card,#briefing .cockpit-brief,#briefing .cockpit-calendar{
 background:#fff!important;color:#102b53!important;border:1px solid #d7e3f0!important;
 box-shadow:0 3px 14px #08275409!important
}
:where(.card.soft,.partner,.pipeline-stage,.profile-field,.draft,.message,.ai-output,.note,.notice,.warn),
.cockpit-todo,.cockpit-live-task{background:#f4f8ff!important;color:#173960!important;border-color:#d7e3f0!important}
:where(.metric,.number,.big,.stats b,.score){color:#073a82!important}
:where(.pill,.count,.tag){background:#e9f3ff!important;color:#075db9!important;border:1px solid #c7dfff!important}
:where(.pill.green){background:#e6f7f0!important;color:#126a4c!important}
:where(.pill.red){background:#fff0f1!important;color:#a52a3b!important}
:where(.btn,button:not(.secondary):not(.ghost):not(.danger):not(.profile-open):not([data-page])){
 background:#087af5!important;border:1px solid #087af5!important;color:#fff!important;
 box-shadow:none!important
}
:where(.btn.secondary,.btn.ghost,button.secondary,button.profile-open,aside button){
 background:#eef5ff!important;border:1px solid #cbdff7!important;color:#0a4d9f!important
}
:where(.btn.secondary,.btn.ghost,button.secondary,button.profile-open):hover{background:#dcecff!important;border-color:#76b3ff!important}
:where(.btn.danger){background:#fff1f2!important;color:#a52b39!important;border-color:#f4b8bf!important}
:where(input,select,textarea,.select,.textarea,.inline-input){
 background:#fff!important;color:#173960!important;border:1px solid #cad9e9!important
}
:where(input,select,textarea)::placeholder{color:#73869c!important}
:where(button,.btn):focus-visible,:where(a,input,select,textarea):focus-visible{outline:2px solid #087af5!important;outline-offset:2px}
:where(.toast){background:#fff!important;color:#102b53!important;border-color:#087af5!important}
:where(.profile-drawer){background:#fff!important;border-color:#d7e3f0!important}
:where(a){color:#075fc8}
:where(.bar>span,.progress>div){background:#087af5!important}
#briefing #havenLiveBriefing,#briefing #ceoExecutiveTabs>button,
#briefing .cockpit-grid>.cockpit-calendar,#briefing .cockpit-grid>.cockpit-brief{
 background:#fff!important;color:#102b53!important;border-color:#d7e3f0!important;box-shadow:0 2px 12px #08275409!important
}
#briefing #havenLiveBriefing>h3,#briefing #homeActionDesk>.cockpit-todo-title{color:#081f49!important}
#briefing #havenLiveBriefing>div>a{background:#f2f7ff!important;color:#174674!important;border-color:#d7e3f0!important}
#briefing #havenLiveBriefing strong{color:#073a82!important}
#briefing #ceoExecutiveTabs>button::after{color:#59728d!important}
#briefing #ceoExecutiveTabs>button[aria-selected=true]{background:#e5f1ff!important;border-color:#087af5!important;color:#073a82!important}
#briefing #ceoCurrentRpWorkspace,#briefing #ceoNewRpWorkspace{background:#fff!important;color:#102b53!important;border-color:#d7e3f0!important}
#briefing .cockpit-live-event{background:#f5f9ff!important;color:#173960!important;border-color:#d7e3f0!important}
#briefing .cockpit-live-event a{color:#075fc8!important}
#havenInboxDialog,.haven-inbox-dialog{
 background:#fff!important;color:#102b53!important;border-color:#d7e3f0!important;box-shadow:0 25px 75px #061d4030!important
}
.haven-inbox-head,#havenInboxDialog .haven-inbox-head{background:#fff!important;border-color:#d7e3f0!important}
.haven-inbox-folders{background:#f3f7fd!important;border-color:#d7e3f0!important}
.haven-inbox-folders .haven-folder{color:#244b7d!important}
.haven-inbox-folders .haven-folder.active{background:#dcecff!important;border-color:#a4ccfd!important;color:#0756ae!important}
.haven-inbox-folders .haven-folder:hover{background:#eaf3ff!important;color:#0756ae!important}
.haven-mail-section-label,.haven-mail-folders-foot{color:#607c9b!important}
.haven-inbox-list,#havenInboxDialog .haven-inbox-list{background:#fff!important;border-color:#d7e3f0!important}
.haven-inbox-list .haven-thread{background:#fff!important;color:#112d55!important;border-bottom-color:#e1eaf4!important}
.haven-inbox-list .haven-thread:hover,.haven-inbox-list .haven-thread.active{background:#eaf3ff!important;color:#0b3f87!important;border-color:#b3d6ff!important}
.haven-inbox-list .haven-thread .small,.haven-inbox-search label,#havenInboxStatus{color:#5b718a!important}
.haven-inbox-search input{background:#fff!important;color:#102b53!important}
.haven-inbox-list-filters,.haven-inbox-bulk{border-color:#dce7f3!important}
.haven-inbox-reader,#havenInboxDialog .haven-inbox-reader,.haven-reader-actions{background:#fff!important;color:#102b53!important;border-color:#d7e3f0!important}
#havenInboxSubject{color:#081f49!important}
.haven-conversation-context{color:#5f7892!important}
.haven-inbox-message,#havenInboxDialog .haven-inbox-message{background:#f6f9fe!important;border-color:#d7e3f0!important;color:#102b53!important}
.haven-inbox-message .haven-body{color:#193958!important}
.haven-inbox-compose{background:#fff!important;border-color:#d7e3f0!important}
.haven-inbox-compose :is(input,textarea),.haven-reader-action-buttons select{background:#fff!important;color:#102b53!important;border-color:#cad9e9!important}
.haven-inbox-compose label,.haven-reader-actions .eyebrow{color:#416484!important}
.haven-mail-skeleton>div{background:linear-gradient(90deg,#e9f2fb,#d8e9fc,#e9f2fb)!important;background-size:200% 100%!important}
#havenNewMailDialog,#havenBulkMailDialog,#havenAttachmentPreview,#changePasswordDialog,#ceoTaskModal{
 background:#fff!important;color:#102b53!important;border-color:#d7e3f0!important
}
#haven-auth{background:#f5f8fd!important;color:#102b53!important}
#haven-auth>div{background:#fff!important;border-color:#d7e3f0!important}
.haven-settings-panel{background:#fff!important;color:#102b53!important;border-color:#d7e3f0!important}
.haven-settings-item{color:#0c4d9c!important}
@media(max-width:800px){body>.shell>aside{background:#fff!important;border-color:#d7e3f0!important}}
