html.precon-shell-booting .mail-topbar,
html.precon-shell-booting .leveling-page-topbar,
html.precon-shell-booting .topbar{
  min-height:46px!important;
  height:46px!important;
  padding:0 10px!important;
  background:#222222!important;
  border:0!important;
  border-bottom:2px solid #f0a500!important;
  box-shadow:none!important;
}
html.precon-shell-booting .mail-topbar>*,
html.precon-shell-booting .leveling-page-topbar>*,
html.precon-shell-booting .topbar>*{
  visibility:hidden!important;
}

:root{
  --precon-header-bg:var(--ab-theme-header-bg,#222222);
  --precon-header-border:var(--ab-theme-header-accent,#f0a500);
  --precon-header-text:var(--ab-theme-header-text,#fff);
  --precon-header-hover:color-mix(in srgb,var(--ab-theme-header-text,#fff) 9%,transparent);
  --precon-menu-border:var(--ab-theme-border,#cfd6df);
  --precon-menu-shadow:0 12px 28px rgba(15,23,42,.22);
}
body.precon-unified-shell .precon-unified-header{
  position:relative!important;
  z-index:1000!important;
  min-height:46px!important;
  height:46px!important;
  padding:0 10px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:12px!important;
  grid-template-columns:none!important;
  background:var(--precon-header-bg)!important;
  border:0!important;
  border-bottom:2px solid var(--precon-header-border)!important;
  color:var(--precon-header-text)!important;
  box-shadow:none!important;
}
.precon-shell-left,
.precon-shell-right{display:flex;align-items:center;min-width:0}
.precon-shell-left{flex:1 1 auto;gap:10px}
.precon-shell-right{flex:0 1 auto;gap:6px;margin-left:auto}
.precon-shell-brand{
  height:44px;
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:0 8px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:#fff;
  font:700 16px/1 Arial,sans-serif;
  letter-spacing:.045em;
  cursor:pointer;
}
.precon-shell-brand:hover,
.precon-shell-brand:focus-visible,
.precon-shell-settings-button:hover,
.precon-shell-settings-button:focus-visible{background:var(--precon-header-hover);outline:none}
.precon-shell-lockup{display:inline-flex;align-items:center;height:34px;min-width:0;flex:0 0 auto}
.precon-shell-lockup img{display:block;width:auto;height:34px;max-width:190px;object-fit:contain;object-position:left center;flex:0 0 auto}
.precon-shell-lockup.is-image{max-width:320px}
.precon-shell-lockup.is-text{height:auto;max-width:360px}
.precon-shell-text-lockup{display:inline-flex;align-items:center;min-width:0;white-space:nowrap}
.precon-shell-brand-icon{display:block;flex:0 0 auto}
.precon-shell-brand-text{display:inline-flex;align-items:baseline;min-width:0;line-height:1;white-space:nowrap;text-rendering:geometricPrecision}
.precon-shell-brand-primary,.precon-shell-brand-accent{display:inline}
.precon-shell-caret{font-size:11px;opacity:.86;margin-left:1px;flex:0 0 auto}
.precon-shell-menu-wrap,
.precon-shell-settings-wrap{position:relative}
.precon-shell-menu,
.precon-shell-settings-menu{
  position:absolute;
  top:calc(100% + 5px);
  z-index:2147482000;
  min-width:220px;
  padding:6px;
  border:1px solid var(--precon-menu-border);
  border-radius:6px;
  background:var(--ab-theme-surface,#fff);
  color:var(--ab-theme-text,#24364b);
  box-shadow:var(--precon-menu-shadow);
  font:13px/1.25 Arial,sans-serif;
}
.precon-shell-menu{left:0}
.precon-shell-settings-menu{right:0;min-width:240px}
.precon-shell-menu[hidden],
.precon-shell-settings-menu[hidden]{display:none!important}
.precon-shell-nav-link,
.precon-shell-settings-action{
  width:100%;
  min-height:34px;
  display:flex;
  align-items:center;
  gap:9px;
  padding:7px 9px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--ab-theme-text,#23364a);
  text-decoration:none;
  text-align:left;
  font:600 13px/1.2 Arial,sans-serif;
  cursor:pointer;
}
.precon-shell-nav-link:hover,
.precon-shell-nav-link:focus-visible,
.precon-shell-settings-action:hover,
.precon-shell-settings-action:focus-visible{background:color-mix(in srgb,var(--ab-theme-accent,#0b67d8) 10%,var(--ab-theme-surface,#fff));outline:none}
.precon-shell-nav-link.active{background:color-mix(in srgb,var(--ab-theme-accent,#0b67d8) 14%,var(--ab-theme-surface,#fff));color:var(--ab-theme-accent,#0b5aa6)}
.precon-shell-nav-icon{width:18px;text-align:center;color:#60758d}
.precon-shell-menu-divider,
.precon-shell-settings-divider{height:1px;background:var(--ab-theme-border,#e2e8f0);margin:5px 3px}
.precon-shell-settings-button{
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#fff;
  cursor:pointer;
}
.precon-shell-settings-button svg{width:20px;height:20px;fill:currentColor}
.precon-shell-settings-title{
  padding:7px 9px 3px;
  color:var(--ab-theme-muted,#5d6e82);
  font:700 10px/1.2 Arial,sans-serif;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.precon-shell-account{
  margin:0 3px;
  padding:8px 7px;
  border-radius:4px;
  background:color-mix(in srgb,var(--ab-theme-page-bg,#f6f8fb) 75%,var(--ab-theme-surface,#fff));
  color:var(--ab-theme-text,#24364b);
  overflow:hidden;
}
.precon-shell-account strong,
.precon-shell-account span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.precon-shell-account strong{font-size:12px}
.precon-shell-account span{margin-top:2px;color:var(--ab-theme-muted,#6a7b8f);font-size:11px}
body.precon-unified-shell .precon-unified-header .precon-shell-inline-search{
  margin:0!important;
  min-width:0!important;
}
body.precon-unified-shell .precon-unified-header .precon-shell-mail-search{
  width:min(520px,44vw)!important;
  max-width:520px!important;
  flex:0 1 520px!important;
}
body.precon-unified-shell .precon-unified-header .precon-shell-project-search{
  width:min(430px,36vw)!important;
  max-width:430px!important;
  flex:0 1 430px!important;
}
body.precon-unified-shell .precon-unified-header .precon-shell-mail-search input,
body.precon-unified-shell .precon-unified-header .precon-shell-project-search input{
  height:30px!important;
  min-height:30px!important;
  border-radius:4px!important;
}
body.precon-unified-shell .precon-unified-header .precon-leveling-context{
  min-height:0!important;
  width:min(340px,31vw)!important;
  max-width:340px!important;
  display:flex!important;
  align-items:center!important;
  gap:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:inherit!important;
}
body.precon-unified-shell .precon-unified-header .precon-leveling-context .leveling-page-kicker,
body.precon-unified-shell .precon-unified-header .precon-leveling-context #levelingPageProjectName,
body.precon-unified-shell .precon-unified-header .precon-leveling-context #levelingPageProjectMeta{
  display:none!important;
}
body.precon-unified-shell .precon-unified-header #levelingProjectSelector{
  width:100%!important;
  min-width:0!important;
}
body.precon-unified-shell .precon-unified-header #levelingProjectSelector .ab-project-selector-label,
body.precon-unified-shell .precon-unified-header #levelingProjectSelector .ab-project-selector-status{
  display:none!important;
}
body.precon-unified-shell .precon-unified-header #levelingProjectSelector .ab-project-selector-input{
  height:30px!important;
  min-height:30px!important;
}
body.precon-unified-shell[data-workspace="leveling"] #microsoftWorkbookReadiness{
  display:none!important;
}
body.precon-unified-shell .precon-unified-header .precon-leveling-workbook-actions{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  flex-wrap:nowrap!important;
  gap:4px!important;
  margin:0!important;
  padding:0!important;
}
body.precon-unified-shell .precon-unified-header .precon-leveling-workbook-actions button{
  min-height:28px!important;
  height:28px!important;
  padding:0 7px!important;
  border:1px solid rgba(255,255,255,.28)!important;
  border-radius:4px!important;
  background:rgba(255,255,255,.08)!important;
  color:#fff!important;
  font-size:9px!important;
  font-weight:800!important;
  white-space:nowrap!important;
}
body.precon-unified-shell .precon-unified-header .precon-leveling-workbook-actions button.primary{
  border-color:#d89520!important;
  background:rgba(240,165,0,.18)!important;
  color:#fff4dd!important;
}
body.precon-unified-shell .precon-unified-header .precon-leveling-workbook-actions button:disabled{
  opacity:.45!important;
}
body.precon-unified-shell #abMicrosoftUserChip{margin:0;padding:0;color:inherit}
body.precon-unified-shell #abMicrosoftUserChip>button{display:none!important}
body.precon-unified-shell #abMicrosoftUserChip>span{display:block!important;color:inherit!important}
@media(max-width:1100px){
  body.precon-unified-shell .precon-unified-header .precon-shell-project-search{width:min(300px,31vw)!important}
  body.precon-unified-shell .precon-unified-header .precon-leveling-context{width:min(260px,27vw)!important}
  body.precon-unified-shell .precon-unified-header .precon-leveling-workbook-actions button{padding:0 5px!important;font-size:8px!important}
}
@media(max-width:720px){
  .precon-shell-brand{padding-left:3px}
  .precon-shell-lockup img{height:30px;max-width:151px}
  .precon-shell-menu{min-width:205px}
  body.precon-unified-shell .precon-unified-header .precon-shell-mail-search{width:min(360px,58vw)!important;flex:1 1 auto!important}
  body.precon-unified-shell .precon-unified-header .precon-shell-project-search{width:min(260px,50vw)!important}
  body.precon-unified-shell .precon-unified-header .precon-leveling-workbook-actions{display:none!important}
  body.precon-unified-shell .precon-unified-header .precon-leveling-context{width:min(260px,52vw)!important}
}

body.precon-unified-shell #syncSharePointButton,
body.precon-unified-shell #projectListButton,
body.precon-unified-shell #saveProjectButton{display:none!important}
body.precon-unified-shell .project-context-actions{display:none!important}
.precon-shell-settings-action[disabled]{opacity:.45;cursor:default}

/* Inbox search now lives in the shared PRECON header, so the grid only
   reserves rows for the header, optional test banner, command bar, and workspace. */
body.precon-unified-shell[data-workspace="inbox"] .mail-app:not(.test-mode){
  grid-template-rows:46px 44px minmax(0,1fr)!important;
}
body.precon-unified-shell[data-workspace="inbox"] .mail-app.test-mode{
  grid-template-rows:46px auto 44px minmax(0,1fr)!important;
}
