/* KaiveraHub 0.90.9b — authoritative application shell and responsive navigation. */

:root{
  --kh-shell-top:74px;
  --kh-sidebar-expanded:244px;
  --kh-sidebar-collapsed:72px;
}

/* Authentication: share one optical top line with the story brand.
   The previous grid centered the access card vertically, leaving the
   credentials about 155px below the KaiveraHub mark on common desktops. */
@media(min-width:901px){
  .auth-body .ph909a-access{
    align-items:start!important;
    overflow-y:auto!important;
  }
  .auth-body .ph909a-card{
    align-self:start!important;
    margin-top:0!important;
  }
}

/* One coherent command surface: every action shares the same visual rhythm. */
body.v211-shell .workspace-topbar.v211-topbar{
  top:7px!important;
  width:calc(100% - 16px)!important;
  height:60px!important;
  min-height:60px!important;
  margin:7px 8px 0!important;
  padding:0 12px!important;
  display:grid!important;
  grid-template-columns:minmax(190px,auto) minmax(220px,640px) minmax(max-content,auto)!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  border:1px solid #dfe6ef!important;
  border-radius:14px!important;
  background:rgba(255,255,255,.98)!important;
  box-shadow:0 8px 24px rgba(25,49,82,.075)!important;
}
body.v211-shell .v211-brand-zone{display:flex!important;align-items:center!important;gap:11px!important;min-width:0!important}
body.v211-shell .ph33-brand-stack{flex:0 0 auto;min-width:0}
body.v211-shell .v211-brand img{width:116px!important;max-height:34px!important}
body.v211-shell .v211-workspace{height:36px!important;max-width:190px!important;border-radius:10px!important}
body.v211-shell .v211-search{justify-self:center!important;width:100%!important;max-width:640px!important;height:38px!important;border-radius:10px!important;background:#f7f9fc!important}
body.v211-shell .v211-search:focus-within{border-color:#9bb9ea!important;background:#fff!important;box-shadow:0 0 0 4px rgba(49,105,218,.08)!important}
body.v211-shell .v211-actions{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;min-width:0!important;white-space:nowrap!important}

.kh-mobile-nav-toggle{display:none;width:38px;height:38px;flex:0 0 38px;padding:0;border:1px solid #d9e3ef;border-radius:10px;background:#fff;color:#264b78;place-items:center;cursor:pointer}
.kh-mobile-nav-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round}
.ph909a-manual-button{
  width:auto!important;
  height:36px!important;
  min-height:36px!important;
  padding:0 9px 0 5px!important;
  display:inline-flex!important;
  flex:0 0 auto!important;
  align-items:center!important;
  gap:7px!important;
  white-space:nowrap!important;
  overflow:hidden!important;
}
.ph909a-manual-button .ph909a-manual-icon{width:27px!important;height:27px!important;flex:0 0 27px!important}
.ph909a-manual-button .ph909a-manual-copy{display:grid!important;width:auto!important;min-width:0!important;height:auto!important;line-height:1!important;white-space:nowrap!important}
.ph909a-manual-button .ph909a-manual-copy small,.ph909a-manual-button .ph909a-manual-copy b{display:block!important;white-space:nowrap!important}
.ph909-top-action{width:auto!important;height:36px!important;min-height:36px!important;padding:0 10px!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:6px!important;border-radius:10px!important}
.ph909-top-action svg{flex:0 0 16px!important;width:16px!important;height:16px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.v211-shell .v211-profile>summary{height:38px!important;min-height:38px!important;grid-template-columns:32px minmax(0,112px) 12px!important;padding:2px 5px 2px 2px!important;border-radius:10px!important}

/* Navigation: flex rows cannot be stretched by legacy grid declarations. */
body.v211-shell .ph909-sidebar{
  top:var(--kh-shell-top)!important;
  bottom:0!important;
  width:var(--kh-sidebar-expanded)!important;
  height:calc(100dvh - var(--kh-shell-top))!important;
  padding:11px 10px!important;
  display:flex!important;
  flex-direction:column!important;
  overflow:hidden!important;
  background:linear-gradient(180deg,#071c3b 0%,#092952 58%,#071d3e 100%)!important;
  box-shadow:8px 0 28px rgba(0,25,62,.1)!important;
  transition:width .22s ease,transform .24s ease!important;
}
body.v211-shell .ph909-sidebar .v19-side-top{
  min-height:37px!important;
  flex:0 0 37px!important;
  display:flex!important;
  grid-template-columns:none!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:8px!important;
  padding:0 4px 8px!important;
}
body.v211-shell .ph909-sidebar .v19-side-top:before{display:none!important}
body.v211-shell .ph909-sidebar .v19-side-top button{order:2!important;width:30px!important;height:30px!important;flex:0 0 30px!important;border-radius:9px!important}
body.v211-shell .ph909-sidebar nav{
  flex:1 1 auto!important;
  min-height:0!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:13px!important;
  padding:2px 2px 24px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
}
body.v211-shell .ph909-sidebar .v191-nav-group{
  display:flex!important;
  flex:0 0 auto!important;
  flex-direction:column!important;
  align-items:stretch!important;
  justify-content:flex-start!important;
  gap:3px!important;
  min-height:0!important;
}
body.v211-shell .ph909-sidebar .v191-nav-group>small{
  display:block!important;
  flex:0 0 auto!important;
  padding:2px 9px 4px!important;
  line-height:1.2!important;
  white-space:nowrap!important;
}
body.v211-shell .ph909-sidebar .v191-nav-group>a{
  position:relative!important;
  width:100%!important;
  min-width:0!important;
  min-height:40px!important;
  max-height:52px!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:6px 9px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  gap:9px!important;
  border:1px solid transparent!important;
  border-radius:10px!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:hidden!important;
}
body.v211-shell .ph909-sidebar .v191-nav-group>a>span{display:block!important;min-width:0!important;line-height:1.22!important;white-space:normal!important;overflow-wrap:normal!important}
body.v211-shell .ph909-sidebar .ph909-nav-icon{width:28px!important;height:28px!important;flex:0 0 28px!important;border-radius:8px!important}
body.v211-shell .ph909-sidebar .ph909-nav-icon svg{width:17px!important;height:17px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.65!important;stroke-linecap:round!important;stroke-linejoin:round!important}
body.v211-shell .ph909-sidebar .v191-nav-group>a.active{
  border-color:rgba(112,170,255,.25)!important;
  background:linear-gradient(90deg,rgba(46,121,238,.31),rgba(36,95,194,.16))!important;
  box-shadow:inset 3px 0 0 #62a8ff!important;
}
body.v211-shell .ph909-sidebar .v19-side-bottom{min-height:34px!important;flex:0 0 34px!important;padding:9px 7px 4px!important}

body.v211-shell .v19-content{
  margin-left:var(--kh-sidebar-expanded)!important;
  width:calc(100% - var(--kh-sidebar-expanded))!important;
  transition:margin-left .22s ease,width .22s ease!important;
}
body.v19-side-collapsed .ph909-sidebar,body.v211-shell .ph909-sidebar.is-collapsed{
  width:var(--kh-sidebar-collapsed)!important;
  padding-inline:10px!important;
}
body.v19-side-collapsed .ph909-sidebar .v19-side-top,body.v211-shell .ph909-sidebar.is-collapsed .v19-side-top{justify-content:center!important;padding-inline:0!important}
body.v19-side-collapsed .ph909-sidebar .v19-side-top span,body.v211-shell .ph909-sidebar.is-collapsed .v19-side-top span,
body.v19-side-collapsed .ph909-sidebar .v191-nav-group>small,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>small,
body.v19-side-collapsed .ph909-sidebar .v191-nav-group>a>span,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>a>span,
body.v19-side-collapsed .ph909-sidebar .v19-side-bottom small,body.v211-shell .ph909-sidebar.is-collapsed .v19-side-bottom small{display:none!important}
body.v19-side-collapsed .ph909-sidebar nav,body.v211-shell .ph909-sidebar.is-collapsed nav{gap:8px!important;padding-inline:4px!important}
body.v19-side-collapsed .ph909-sidebar .v191-nav-group,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group{gap:5px!important;padding:0 0 8px!important;border-bottom:1px solid rgba(170,199,235,.11)!important}
body.v19-side-collapsed .ph909-sidebar .v191-nav-group:last-child,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group:last-child{border-bottom:0!important}
body.v19-side-collapsed .ph909-sidebar .v191-nav-group>a,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>a{
  width:42px!important;
  height:42px!important;
  min-height:42px!important;
  max-height:42px!important;
  flex:0 0 42px!important;
  align-self:center!important;
  justify-content:center!important;
  padding:6px!important;
  overflow:hidden!important;
}
body.v19-side-collapsed .ph909-sidebar .v191-nav-group>a.active,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>a.active{box-shadow:inset 3px 0 0 #62a8ff,0 7px 16px rgba(0,18,49,.18)!important}
body.v19-side-collapsed .ph909-sidebar .ph909-nav-icon,body.v211-shell .ph909-sidebar.is-collapsed .ph909-nav-icon{width:28px!important;height:28px!important;flex:0 0 28px!important}
body.v19-side-collapsed .v19-content{margin-left:var(--kh-sidebar-collapsed)!important;width:calc(100% - var(--kh-sidebar-collapsed))!important}

.kh-mobile-nav-backdrop[hidden]{display:none!important}

/* Business hand-off surfaced by UAT: Pre-Sales becomes a traceable project. */
.ph909b-origin-banner,.ph909b-project-gate{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:16px;padding:16px 18px;border:1px solid #cdddf2;border-radius:14px;background:linear-gradient(120deg,#f6faff,#eef4ff);box-shadow:0 8px 22px rgba(34,70,119,.06)}
.ph909b-origin-banner>span,.ph909b-project-gate>div>span{color:#2868d6;font-size:8px;font-weight:900;letter-spacing:.14em;white-space:nowrap}.ph909b-origin-banner>div,.ph909b-project-gate>div{display:grid;min-width:0;gap:3px}.ph909b-origin-banner b,.ph909b-project-gate h2{margin:0;color:#183458;font-size:14px}.ph909b-origin-banner small,.ph909b-project-gate p{margin:0;color:#63758d;font-size:10px;line-height:1.45}.ph909b-origin-banner>a{color:#2762c8;font-size:10px;font-weight:800;white-space:nowrap}.ph909b-project-gate{margin-top:14px}.ph909b-project-gate.is-complete{border-color:#bfe5d0;background:linear-gradient(120deg,#f4fbf7,#edf9f3)}.ph909b-project-gate.is-complete>div>span{color:#168a55}

@media(max-width:1280px){
  body.v211-shell .workspace-topbar.v211-topbar{grid-template-columns:minmax(170px,auto) minmax(220px,1fr) auto!important}
  .ph909a-manual-button{width:36px!important;padding:0 4px!important;justify-content:center!important}
  .ph909a-manual-button .ph909a-manual-copy{display:none!important}
  .ph909-top-action{width:36px!important;padding:0!important}
  .ph909-top-action b{display:none!important}
  body.v211-shell .v211-profile-name{display:none!important}
  body.v211-shell .v211-profile>summary{grid-template-columns:32px 10px!important}
}

@media(max-width:1000px){
  body.v211-shell .workspace-topbar.v211-topbar{grid-template-columns:auto minmax(190px,1fr) auto!important;gap:10px!important}
  body.v211-shell .v211-workspace{display:none!important}
}

@media(max-width:720px){
  :root{--kh-shell-top:112px}
  body.v211-shell .workspace-topbar.v211-topbar{
    top:6px!important;
    width:calc(100% - 12px)!important;
    height:100px!important;
    min-height:100px!important;
    margin:6px 6px 0!important;
    padding:7px 9px!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:38px 40px!important;
    gap:8px!important;
  }
  body.v211-shell .v211-brand-zone{grid-column:1!important;grid-row:1!important;gap:8px!important}
  .kh-mobile-nav-toggle{display:grid!important}
  body.v211-shell .v211-actions{grid-column:2!important;grid-row:1!important}
  body.v211-shell .v211-search{grid-column:1/-1!important;grid-row:2!important;max-width:none!important;height:40px!important}
  body.v211-shell .v211-brand img{width:105px!important}
  body.v211-shell .ph909-sidebar,body.v211-shell .ph909-sidebar.is-collapsed,body.v19-side-collapsed .ph909-sidebar{
    display:flex!important;
    top:0!important;
    left:0!important;
    bottom:0!important;
    width:min(278px,84vw)!important;
    height:100dvh!important;
    padding:14px 12px!important;
    z-index:4100!important;
    transform:translateX(-105%)!important;
    box-shadow:18px 0 45px rgba(0,19,50,.27)!important;
  }
  body.kh-mobile-nav-open .ph909-sidebar{transform:translateX(0)!important}
  body.v211-shell .ph909-sidebar .v19-side-top,body.v211-shell .ph909-sidebar.is-collapsed .v19-side-top{justify-content:space-between!important;padding-inline:4px!important}
  body.v211-shell .ph909-sidebar .v19-side-top span,body.v211-shell .ph909-sidebar.is-collapsed .v19-side-top span,
  body.v211-shell .ph909-sidebar .v191-nav-group>small,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>small,
  body.v211-shell .ph909-sidebar .v191-nav-group>a>span,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>a>span,
  body.v211-shell .ph909-sidebar .v19-side-bottom small,body.v211-shell .ph909-sidebar.is-collapsed .v19-side-bottom small{display:block!important}
  body.v211-shell .ph909-sidebar nav,body.v211-shell .ph909-sidebar.is-collapsed nav{gap:13px!important;padding-inline:2px!important}
  body.v211-shell .ph909-sidebar .v191-nav-group,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group{gap:3px!important;padding:0!important;border-bottom:0!important}
  body.v211-shell .ph909-sidebar .v191-nav-group>a,body.v211-shell .ph909-sidebar.is-collapsed .v191-nav-group>a{
    width:100%!important;height:auto!important;min-height:42px!important;max-height:52px!important;flex:0 0 auto!important;align-self:stretch!important;justify-content:flex-start!important;padding:7px 9px!important;
  }
  body.v211-shell .v19-content,body.v19-side-collapsed .v19-content{margin-left:0!important;width:100%!important}
  .kh-mobile-nav-backdrop{position:fixed;inset:0;z-index:4000;border:0;background:rgba(4,20,45,.45);backdrop-filter:blur(2px);cursor:pointer}
  body.kh-mobile-nav-open{overflow:hidden}
  .ph909b-origin-banner,.ph909b-project-gate{align-items:flex-start;flex-direction:column}
}

@media(max-width:520px){
  body.v211-shell .workspace-topbar.v211-topbar{padding-inline:7px!important}
  body.v211-shell .ph33-brand-stack .ph335-release-menu{display:none!important}
  body.v211-shell .v211-brand img{width:96px!important}
  body.v211-shell .v211-actions{gap:4px!important}
  body.v211-shell .v211-profile>summary{grid-template-columns:32px!important;padding-right:2px!important}
  body.v211-shell .v211-profile>summary>i{display:none!important}
  .ph909a-manual-button,.ph909-top-action{width:34px!important;height:34px!important;min-height:34px!important}
}

@media(prefers-reduced-motion:reduce){
  body.v211-shell .ph909-sidebar,body.v211-shell .v19-content{transition:none!important}
}
