/* 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}
/* Settings dropdown. Its base layout was lost in the Mail rebuild (#245), so on
   desktop the panel spilled into the header as bright-blue buttons with dark text.
   IDs + !important beat the generic header .btn / button styles. */
#havenSettingsMenu{position:relative;z-index:60}
#havenSettingsMenu>summary{list-style:none;cursor:pointer;white-space:nowrap}
#havenSettingsMenu>summary::-webkit-details-marker{display:none}
#havenSettingsMenu .haven-settings-panel{position:absolute;right:0;top:calc(100% + 8px);width:320px;max-width:calc(100vw - 20px);max-height:calc(100vh - 100px);overflow:auto;padding:8px;background:#fff!important;color:#102b53!important;border:1px solid #d7e3f0!important;border-radius:12px;box-shadow:0 16px 40px rgba(10,30,60,.18);display:flex;flex-direction:column;gap:2px;z-index:1200}
#havenSettingsMenu .haven-settings-label{font-size:11px;font-weight:700;letter-spacing:.08em;color:#5a6b7e!important;padding:10px 10px 3px}
#havenSettingsMenu .haven-settings-item{display:flex!important;align-items:center;gap:8px;width:100%!important;min-height:38px;margin:0!important;padding:8px 10px!important;background:transparent!important;color:#102b53!important;border:0!important;border-radius:8px!important;box-shadow:none!important;text-align:left;font-size:14px!important;font-weight:600;line-height:1.3;text-decoration:none!important;cursor:pointer}
#havenSettingsMenu .haven-settings-item:hover,#havenSettingsMenu .haven-settings-item:focus-visible{background:#eef4fb!important;color:#0c4d9c!important;outline:none}
#havenSettingsMenu .haven-settings-item[hidden]{display:none!important}
#havenSettingsMenu #havenSettingsStatus{margin:6px 10px 4px;color:#5a6b7e!important;font-size:12px}
@media(max-width:800px){body>.shell>aside{background:#fff!important;border-color:#d7e3f0!important}}

/* ---------- Header: radar-sweep logo + scanning top edge. Kevin: "make the top line
   of the page look like an airplane radar... make it dynamic... make people say wow."
   The H mark itself is untouched (per "keep my logo"). Fixed 2026-11-05: Kevin said the
   top visual "is not fixed... not outline around the images" — the static double ring
   below (header .logo::after, a fixed box-shadow halo) read as a stuck outline baked
   around the mark. Removed it and kept only the rotating conic-gradient sweep
   (::before), which is the actual "dynamic... radar" motion he asked for, with no
   static ring left behind. ---------- */
header{position:relative;overflow:visible!important}
header .brand{position:relative}
header .logo{position:relative;isolation:isolate;overflow:visible!important}
header .logo::before{
  content:"";position:absolute;inset:-9px;border-radius:50%;
  background:conic-gradient(from 0deg,rgba(8,122,245,0) 0deg,rgba(8,122,245,0) 298deg,rgba(8,122,245,.55) 344deg,rgba(8,122,245,.92) 360deg);
  animation:havenRadarSweep 2.8s linear infinite;pointer-events:none;z-index:-1;
}
header::after{
  content:"";position:absolute;left:0;right:0;bottom:-1px;height:2px;
  background:linear-gradient(90deg,transparent,rgba(8,122,245,.05) 10%,rgba(8,122,245,.9) 50%,rgba(8,122,245,.05) 90%,transparent);
  background-size:220% 100%;
  animation:havenHeaderSweep 5.5s ease-in-out infinite;
  pointer-events:none;
}
@keyframes havenRadarSweep{to{transform:rotate(360deg)}}
@keyframes havenHeaderSweep{
  0%{background-position:120% 0}
  50%{background-position:-20% 0}
  100%{background-position:120% 0}
}
@media(prefers-reduced-motion:reduce){
  header .logo::before,header::after{animation:none!important}
}

/* ---------- Mobile header fix (2026-11-18): the global command search form
   (appended by global-command-search.js) and the contact-search box (mounted
   by revenue.js's mountSearch, right after .brand) both land as direct flex
   children of <header> alongside .brand and .actions, and header had no
   flex-wrap at any breakpoint. On a phone width that's 4 flex items (brand,
   contact search, actions, global search) fighting for one row, so they
   squashed and visually overlapped instead of wrapping. Force header to wrap
   into a clean vertical stack below 800px and let every child take a full
   row so nothing overlaps. ---------- */
@media(max-width:800px){
  header{
    flex-wrap:wrap!important;
    height:auto!important;
    row-gap:10px!important;
    padding:12px 14px!important;
  }
  header>.brand{flex:1 1 auto!important;min-width:0!important;order:1}
  header>.actions{order:2;flex:1 1 100%!important;width:100%!important;justify-content:flex-start!important}
  .haven-contact-search{order:3;flex:1 1 100%!important;width:100%!important;max-width:100%!important;min-width:0!important}
  header>form{order:4;flex:1 1 100%!important;width:100%!important;max-width:100%!important;min-width:0!important}
  .haven-contact-search form{width:100%}
  .haven-contact-search input{min-width:0}
}
@media(max-width:480px){
  header>.actions .pill{display:none}
}
