/* Nexora AI premium redesign: presentation layer only. */
:root {
  --nx-bg: #EEF1F3;
  --nx-surface: #FFFFFF;
  --nx-surface-2: #F7F8F9;
  --nx-sidebar-active: #DDF4ED;
  --nx-accent: #24B47E;
  --nx-accent-2: #BFE8DD;
  --nx-info: #7FD8C5;
  --nx-warning: #EAC9F8;
  --nx-text: #1A1D21;
  --nx-muted: #72777E;
  --nx-border: #E8ECEF;
  --nx-shadow-soft: 0 24px 70px rgba(26, 29, 33, .08);
  --nx-shadow-card: 0 16px 42px rgba(26, 29, 33, .07);
  --nx-radius-card: 28px;
  --nx-radius-button: 18px;
  --nx-radius-sidebar: 32px;
  --nx-radius-input: 18px;

  --bg: var(--nx-bg);
  --bg2: var(--nx-bg);
  --p: var(--nx-surface);
  --p2: var(--nx-surface-2);
  --sk: var(--nx-border);
  --sk2: var(--nx-border);
  --mu: var(--nx-muted);
  --so: var(--nx-text);
  --tx: var(--nx-text);
  --st: var(--nx-text);
  --bl: var(--nx-text);
  --cy: var(--nx-info);
  --gn: var(--nx-accent);
  --am: var(--nx-warning);
  --r: var(--nx-radius-card);
  --r2: 20px;
  --r3: var(--nx-radius-button);
}

html,
body,
.app {
  background: var(--nx-bg) !important;
  color: var(--nx-text) !important;
  font-family: Inter, "DM Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

.app {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 42% 32% at 88% -6%, rgba(127, 216, 197, .22), transparent 62%),
    radial-gradient(ellipse 36% 28% at 20% 4%, rgba(234, 201, 248, .16), transparent 60%),
    linear-gradient(180deg, #F8FAFA 0%, var(--nx-bg) 54%, #F5F7F8 100%) !important;
}

.app::before {
  display: none !important;
}

button,
[role="button"],
.tab,
.home-quick,
.home-action,
.home-stage,
.home-btn,
.plog-btn {
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.tab:focus-visible {
  outline: 3px solid rgba(36, 180, 126, .22) !important;
  outline-offset: 3px !important;
}

body.ap-vertical-shell .tabs,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed),
body.ap-vertical-shell .tabs.ap-nav-peek {
  position: fixed !important;
  inset: 28px auto 28px 28px !important;
  width: 260px !important;
  height: auto !important;
  z-index: 120 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
  padding: 12px !important;
  overflow: hidden !important;
  border: 1px solid rgba(232, 236, 239, .92) !important;
  border-radius: var(--nx-radius-sidebar) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 24px 70px rgba(26, 29, 33, .10) !important;
  backdrop-filter: blur(22px) !important;
  transition: width .46s cubic-bezier(.19, 1, .22, 1), border-radius .46s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) {
  position: fixed !important;
  inset: 28px auto 28px 28px !important;
  width: 72px !important;
  height: auto !important;
  z-index: 120 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 0 !important;
  padding: 12px 8px !important;
  overflow: hidden !important;
  border: 1px solid rgba(232, 236, 239, .92) !important;
  border-radius: var(--nx-radius-sidebar) !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: 0 24px 70px rgba(26, 29, 33, .10) !important;
  backdrop-filter: blur(22px) !important;
  transition: width .4s cubic-bezier(.19, 1, .22, 1), align-items .4s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell .tabs::before,
body.ap-vertical-shell .tabs::after {
  display: none !important;
}

/* Sidebar brand permanently hidden — Nexora logo lives in the header only */
body.ap-vertical-shell .ap-sidebar-brand,
body.ap-vertical-shell .ap-sidebar-mark,
body.ap-vertical-shell .ap-sidebar-logo {
  display: none !important;
}

body.ap-vertical-shell .ap-sidebar-copy,
body.ap-vertical-shell .ap-sidebar-toggle,
body.ap-vertical-shell .ap-cmd-trigger,
body.ap-vertical-shell .ap-workspace-label,
body.ap-vertical-shell .ap-tab-glow {
  display: none !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-tab-label,
body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-section-text {
  display: none !important;
}

body.ap-vertical-shell .ap-sidebar-section {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 8px 4px 6px !important;
  pointer-events: none !important;
}

body.ap-vertical-shell .ap-section-line {
  flex: 1 !important;
  height: 1px !important;
  border-radius: 1px !important;
}

body.ap-vertical-shell .ap-section-text {
  font-size: 9px !important;
  font-weight: 800 !important;
  letter-spacing: .18em !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-section-line,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-section-line {
  background: linear-gradient(90deg, transparent, rgba(36, 180, 126, .18) 30%, rgba(36, 180, 126, .06)) !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-section-line {
  background: linear-gradient(90deg, transparent, rgba(36, 180, 126, .12), transparent) !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-section-text,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-section-text {
  color: #188D68 !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-section {
  height: 1px !important;
  margin: 10px 6px 8px !important;
  padding: 0 !important;
  overflow: hidden !important;
}

body.ap-vertical-shell .ap-sidebar-nav,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-sidebar-nav,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-sidebar-nav {
  order: 2 !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 6px !important;
  padding: 0 0 4px !important;
  margin: 0 !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-nav {
  order: 2 !important;
  width: 100% !important;
  flex: 1 1 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 12px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow-y: auto !important;
  scrollbar-width: none !important;
}

body.ap-vertical-shell .ap-sidebar-nav::-webkit-scrollbar {
  display: none;
}

body.ap-vertical-shell .tab,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab,
body.ap-vertical-shell .tabs.ap-nav-peek .tab {
  width: 100% !important;
  height: 45px !important;
  min-height: 45px !important;
  margin: 0 !important;
  padding: 0 11px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #344054 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: transform .18s ease, background-color .18s ease, color .18s ease !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #344054 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: transform .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab:hover,
body.ap-vertical-shell .tabs.ap-nav-peek .tab:hover {
  background: var(--nx-surface-2) !important;
  color: var(--nx-accent) !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab.active,
body.ap-vertical-shell .tabs.ap-nav-peek .tab.active {
  background: var(--nx-sidebar-active) !important;
  color: #188D68 !important;
  box-shadow: inset 0 0 0 1px rgba(36, 180, 126, .10) !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab:hover {
  background: var(--nx-surface-2) !important;
  color: var(--nx-accent) !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab.active {
  background: var(--nx-sidebar-active) !important;
  color: #188D68 !important;
  box-shadow: inset 0 0 0 1px rgba(36, 180, 126, .10) !important;
}

body.ap-vertical-shell .tab .ap-tab-icon,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab .ap-tab-icon,
body.ap-vertical-shell .tabs.ap-nav-peek .tab .ap-tab-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(36, 180, 126, .08) !important;
  border-radius: 10px !important;
  background: rgba(36, 180, 126, .04) !important;
  color: currentColor !important;
  box-shadow: none !important;
  transition: background .2s ease, transform .3s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab.active .ap-tab-icon,
body.ap-vertical-shell .tabs.ap-nav-peek .tab.active .ap-tab-icon {
  background: rgba(36, 180, 126, .10) !important;
  border-color: rgba(36, 180, 126, .15) !important;
}

body.ap-vertical-shell .tab .ap-tab-icon svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 1.8 !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-tab-label,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-tab-label {
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  white-space: nowrap !important;
  text-overflow: ellipsis !important;
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #344054 !important;
  line-height: 1.2 !important;
  letter-spacing: -.01em !important;
  transition: opacity .25s ease, transform .38s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab.active .ap-tab-label,
body.ap-vertical-shell .tabs.ap-nav-peek .tab.active .ap-tab-label {
  color: #188D68 !important;
  font-weight: 750 !important;
}

/* Badge number (shown after generation) → mint to match active label */
body.ap-vertical-shell .tab .tbadge {
  color: #188D68 !important;
  background: rgba(36, 180, 126, .12) !important;
  border-color: rgba(36, 180, 126, .20) !important;
}

/* Keyboard shortcut pill → mint theme */
body.ap-vertical-shell .tab .ap-tab-shortcut {
  color: rgba(36, 180, 126, .78) !important;
  background: rgba(36, 180, 126, .08) !important;
  border-color: rgba(36, 180, 126, .14) !important;
}
body.ap-vertical-shell .tab.active .ap-tab-shortcut {
  color: #0f1b2e !important;
  background: rgba(36, 180, 126, .72) !important;
  border-color: rgba(36, 180, 126, .72) !important;
}

body.ap-vertical-shell .tab[data-tab="story"],
body.ap-vertical-shell .tab[data-tab="maestro"],
body.ap-vertical-shell .tab[data-tab="nexus"],
body.ap-vertical-shell .tab[data-tab="calendar"],
body.ap-vertical-shell .tab[data-tab="cp"],
body.ap-vertical-shell .tab[data-tab="ms"],
body.ap-vertical-shell .tab[data-tab="cost"],
body.ap-vertical-shell .tab[data-tab="histogram"],
body.ap-vertical-shell .tab[data-tab="filesreview"],
body.ap-vertical-shell .tab[data-tab="docai"],
body.ap-vertical-shell .tab[data-tab="chat"] {
  display: none !important;
}

body.ap-vertical-shell .ap-settings-shortcut,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-settings-shortcut,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-settings-shortcut {
  order: 3 !important;
  width: auto !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 8px 0 4px !important;
  padding: 0 11px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  border: 0 !important;
  border-top: 1px solid rgba(36, 180, 126, .10) !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #344054 !important;
  box-shadow: none !important;
  cursor: pointer !important;
  transition: background .2s ease, color .2s ease !important;
}

body.ap-vertical-shell .ap-settings-shortcut svg {
  width: 20px !important;
  height: 20px !important;
  flex: 0 0 20px !important;
  stroke-width: 1.8 !important;
}

body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-settings-shortcut:hover,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-settings-shortcut:hover,
body.ap-vertical-shell .ap-settings-shortcut:hover {
  background: var(--nx-surface-2) !important;
  color: var(--nx-accent) !important;
}

body.ap-vertical-shell .ap-sidebar-foot,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-sidebar-foot,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-sidebar-foot {
  order: 9999 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-height: 52px !important;
  margin-top: 4px !important;
  padding: 6px 10px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  border: 1px solid rgba(36, 180, 126, .10) !important;
  border-radius: 14px !important;
  background: rgba(36, 180, 126, .03) !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

body.ap-vertical-shell .ap-account-avatar,
body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-account-avatar,
body.ap-vertical-shell .tabs.ap-nav-peek .ap-account-avatar {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 999px !important;
  background: #2DBE9F !important;
  color: #10231F !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  box-shadow: none !important;
}

body.ap-vertical-shell .ap-account-copy {
  display: none !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-foot {
  order: 4 !important;
  width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  padding: 0 !important;
  margin: 0 !important;
  display: grid !important;
  place-items: center !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-account-avatar {
  width: 36px !important;
  height: 36px !important;
  display: grid !important;
  place-items: center !important;
  border-radius: 50% !important;
  background: var(--nx-sidebar-active) !important;
  color: var(--nx-text) !important;
  border: 0 !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  box-shadow: none !important;
}

.hdr,
body.ap-vertical-shell .hdr,
body.ap-vertical-shell .hdr:not(.ap-nav-collapsed),
body.ap-vertical-shell .hdr.ap-nav-peek {
  position: fixed !important;
  top: 24px !important;
  left: 316px !important;
  right: 28px !important;
  z-index: 110 !important;
  height: 64px !important;
  padding: 0 0 0 0 !important;
  display: grid !important;
  grid-template-columns: minmax(240px, auto) minmax(260px, 430px) auto !important;
  align-items: center !important;
  gap: 18px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transition: left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell .hdr.ap-nav-collapsed:not(.ap-nav-peek) {
  position: fixed !important;
  top: 24px !important;
  left: 130px !important;
  right: 28px !important;
  z-index: 110 !important;
  height: 64px !important;
  padding: 0 0 0 0 !important;
  display: grid !important;
  grid-template-columns: minmax(240px, auto) minmax(260px, 430px) auto !important;
  align-items: center !important;
  gap: 18px !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transition: left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell::before {
  content: "" !important;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 100px !important;
  z-index: 105 !important;
  background: #F8FAFA !important;
  border-bottom: 1px solid rgba(20, 60, 48, .06) !important;
  pointer-events: none !important;
}

.hdr .logo,
body.ap-vertical-shell .hdr .logo {
  min-width: 240px !important;
  max-width: none !important;
  width: auto !important;
  margin: 0 !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.hdr .logo-ico,
body.ap-vertical-shell .hdr .logo-ico,
body.ap-vertical-shell .hdr.ap-nav-collapsed:not(.ap-nav-peek) .logo-ico {
  width: 292px !important;
  height: 60px !important;
  flex: 0 0 292px !important;
  background-image: url("../../assets/nexora-ai-theme05-logo.png") !important;
  background-size: contain !important;
  background-position: left center !important;
  background-repeat: no-repeat !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.hdr .logo>div:last-child {
  display: none !important;
}

.hdr-search {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  border-radius: var(--nx-radius-input);
  background: rgba(255, 255, 255, .86);
  border: 1px solid var(--nx-border);
  box-shadow: 0 16px 38px rgba(26, 29, 33, .06);
}

.hdr-search svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: #4A5568;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hdr-search input {
  width: 100%;
  min-width: 0;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--nx-text) !important;
  font-size: 14px !important;
  font-weight: 500;
}

.hdr-search input::placeholder {
  color: #9AA1AA;
}

.hdr-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hdr-icon-btn,
.hdr-profile {
  height: 56px;
  border: 1px solid var(--nx-border);
  background: rgba(255, 255, 255, .88);
  color: var(--nx-text);
  box-shadow: 0 16px 38px rgba(26, 29, 33, .06);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

.hdr-icon-btn {
  position: relative;
  width: 56px;
  display: grid;
  place-items: center;
  border-radius: var(--nx-radius-input);
}

.hdr-icon-btn svg,
.hdr-profile svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hdr-notification-dot {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #A58AF2;
  border: 2px solid #FFFFFF;
}

.hdr-profile {
  display: grid;
  grid-template-columns: 40px minmax(112px, auto) 18px;
  align-items: center;
  gap: 12px;
  min-width: 228px;
  padding: 0 16px 0 10px;
  border-radius: 20px;
  text-align: left;
}

.hdr-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #1A1D21, #49515A);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 800;
}

.hdr-profile-copy b,
.hdr-profile-copy small {
  display: block;
  white-space: nowrap;
}

.hdr-profile-copy b {
  font-size: 13px;
  line-height: 1.15;
}

.hdr-profile-copy small {
  margin-top: 3px;
  color: var(--nx-muted);
  font-size: 11px;
}

.hdr-icon-btn:hover,
.hdr-profile:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 44px rgba(26, 29, 33, .09);
}

.nx-hidden-engine {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.body,
body.ap-vertical-shell .body,
body.ap-vertical-shell .body:not(.ap-body-closed) {
  background-color: #fafdff !important;
  padding: 114px 34px 54px 316px !important;
  margin: 0 !important;
  min-height: 100vh !important;
  position: relative !important;
  z-index: 1 !important;
  transition: padding-left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

body.ap-vertical-shell .body.ap-body-closed {
  background-color: #fafdff !important;
  padding: 114px 34px 54px 130px !important;
  margin: 0 !important;
  min-height: 100vh !important;
  position: relative !important;
  z-index: 1 !important;
  transition: padding-left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

.panel,
.card,
.home-card,
.modal,
.docai-card,
.dsett-card,
.home-quick,
.home-action,
.home-stage,
.home-kpi,
.home-mini-gantt,
.home-logic-card,
.home-snapshot,
.home-command-hero,
.plog-card,
.map-card,
.m2-card,
.nexus-card,
.maestro-card,
.forge-sbox,
.forge-cpm-card,
.forge-con,
.forge-board-wrap {
  background: rgba(255, 255, 255, .92) !important;
  border: 1px solid rgba(232, 236, 239, .94) !important;
  border-radius: var(--nx-radius-card) !important;
  color: var(--nx-text) !important;
  box-shadow: var(--nx-shadow-card) !important;
}

input,
textarea,
select,
.input,
.chat-input,
.docai-input,
.dsett-input {
  min-height: 44px;
  border-radius: var(--nx-radius-input) !important;
  background: #FFFFFF !important;
  border: 1px solid var(--nx-border) !important;
  color: var(--nx-text) !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(36, 180, 126, .55) !important;
  box-shadow: 0 0 0 4px rgba(36, 180, 126, .12) !important;
}

.hbtn,
.home-btn,
.btn,
.apr-btn,
.dsett-btn,
.plog-btn {
  border-radius: var(--nx-radius-button) !important;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease, border-color .18s ease !important;
}

.home-btn-primary,
.btn.primary,
.primary-btn,
.apr-btn.pri,
.dsett-btn--primary {
  background: #0F1720 !important;
  border-color: #0F1720 !important;
  color: #FFFFFF !important;
  box-shadow: 0 16px 30px rgba(26, 29, 33, .16) !important;
}

.home-btn-primary:hover,
.btn.primary:hover,
.primary-btn:hover,
.apr-btn.pri:hover,
.dsett-btn--primary:hover {
  transform: translateY(-1px);
  background: #1A1D21 !important;
  box-shadow: 0 18px 34px rgba(26, 29, 33, .20) !important;
}

.home-btn-ghost,
.btn:not(.primary),
.apr-btn.sec,
.dsett-btn {
  background: #FFFFFF !important;
  border: 1px solid var(--nx-border) !important;
  color: var(--nx-text) !important;
}

.home-btn-ghost:hover,
.btn:not(.primary):hover,
.apr-btn.sec:hover,
.dsett-btn:hover {
  border-color: rgba(36, 180, 126, .32) !important;
  background: var(--nx-surface-2) !important;
}

.aipe-result-out table,
.tree-table,
.acts-tbl,
.lk-tbl,
.lb-tbl,
.h-tbl,
.h-mtbl {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  overflow: hidden !important;
  border-radius: 22px !important;
  border: 1px solid var(--nx-border) !important;
  background: #FFFFFF !important;
}

.aipe-result-out table thead th,
.tree-table thead th,
.acts-tbl thead th,
.lk-tbl thead th,
.lb-tbl thead th,
.h-tbl thead th,
.h-mtbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #F7F8F9 !important;
  color: #44505C !important;
  border-bottom: 1px solid var(--nx-border) !important;
  font-size: 12px !important;
  letter-spacing: 0 !important;
}

.aipe-result-out table tbody tr:hover,
.tree-table tbody tr:hover,
.acts-tbl tbody tr:hover,
.lk-tbl tbody tr:hover,
.lb-tbl tbody tr:hover {
  background: rgba(221, 244, 237, .42) !important;
}

#tp-home {
  padding: 0 !important;
}

#home-root {
  max-width: 1660px;
  margin: 0 auto;
}

.home-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
  /* Compact scale for the whole dashboard. Tune 0.75–1.0 to taste. */
  zoom: .82;
}

.home-empty {
  padding: 22px 16px;
  border-radius: 16px;
  background: #F6F8F9;
  color: var(--nx-muted);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

.home-welcome {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  border-radius: 34px;
  padding: 42px 46px;
  background:
    radial-gradient(ellipse 46% 62% at 88% 28%, rgba(127, 216, 197, .28), transparent 62%),
    linear-gradient(135deg, #EAF7F4 0%, #F8FCFB 58%, #FFFFFF 100%);
  border: 1px solid rgba(255, 255, 255, .96);
  box-shadow: var(--nx-shadow-soft);
}

.home-welcome::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    repeating-radial-gradient(ellipse at 72% 52%, rgba(36, 180, 126, .12) 0 1px, transparent 1px 12px);
  mask-image: linear-gradient(90deg, transparent 46%, black 100%);
  opacity: .72;
}

.home-welcome::after {
  content: "";
  position: absolute;
  right: 70px;
  top: 38px;
  width: 300px;
  height: 198px;
  opacity: .82;
  background:
    linear-gradient(90deg, transparent 20%, rgba(36, 180, 126, .18) 21% 22%, transparent 23%),
    linear-gradient(0deg, transparent 48%, rgba(36, 180, 126, .16) 49% 50%, transparent 51%),
    linear-gradient(135deg, rgba(36, 180, 126, .10), rgba(234, 201, 248, .18));
  border: 1px solid rgba(36, 180, 126, .18);
  border-radius: 28px;
  transform: perspective(560px) rotateY(-16deg) rotateX(8deg);
  box-shadow: 0 24px 70px rgba(36, 180, 126, .14);
}

.home-welcome-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.home-eyebrow,
.home-section-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #15966C;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.home-section-label::before,
.home-eyebrow::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--nx-info);
  box-shadow: 0 0 0 5px rgba(127, 216, 197, .24);
}

.home-welcome h1,
.home-command-title {
  margin: 12px 0 12px;
  color: var(--nx-text);
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.home-command-title {
  margin: 8px 0 10px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
}

.home-welcome p,
.home-command-sub {
  margin: 0;
  color: #4F5C68;
  font-size: 17px;
  line-height: 1.7;
}

.home-command-sub {
  font-size: 14px;
  line-height: 1.55;
  max-width: 60ch;
}

.home-hero-actions,
.home-command-actions,
.home-active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 26px;
}

.home-btn {
  min-height: 54px;
  padding: 0 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
}

.home-btn svg,
.home-quick svg,
.home-action svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(320px, .98fr);
  gap: 20px;
}

.home-card {
  padding: 28px;
}

.home-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.home-card-title {
  margin: 0;
  color: var(--nx-text);
  font-size: 18px;
  font-weight: 800;
}

.home-getstarted-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: start;
  margin-bottom: 24px;
}

.home-step {
  position: relative;
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 12px;
}

.home-step:not(:last-child)::after {
  content: "";
  position: absolute;
  top: 31px;
  left: calc(50% + 56px);
  width: calc(100% - 92px);
  border-top: 2px dashed #D9DEE3;
}

.home-step-num {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(calc(-50% - 30px));
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--nx-accent);
  color: #FFFFFF;
  font-size: 12.5px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 3px #FFFFFF, 0 4px 10px rgba(36, 180, 126, .35);
  z-index: 2;
}

.home-step-icon,
.home-quick-icon,
.home-action-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(180deg, #F1FAF7, #EAF4F1);
  color: #1A9B75;
  border: 1px solid rgba(36, 180, 126, .10);
}

.home-step b,
.home-quick b,
.home-action b {
  display: block;
  color: var(--nx-text);
  font-size: 15px;
  line-height: 1.35;
}

.home-step small,
.home-quick small,
.home-action small {
  display: block;
  margin-top: 5px;
  color: var(--nx-muted);
  font-size: 13px;
  line-height: 1.45;
}

.home-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.home-plan-name {
  color: var(--nx-text);
  font-size: 18px;
  font-weight: 800;
}

.home-plan-badge {
  padding: 8px 18px;
  border-radius: 999px;
  background: #E8F8F3 !important;
  color: #188D68 !important;
  font-size: 13px;
  font-weight: 800;
}

.home-usage-bar {
  height: 8px;
  margin: 28px 0 14px;
  overflow: hidden;
  border-radius: 999px;
  background: #E8ECEF;
}

.home-usage-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6EC6B4, var(--nx-accent)) !important;
}

.home-usage small {
  color: #66717E;
  font-size: 14px;
}

.home-plan-note {
  margin-top: 26px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 16px;
  align-items: center;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(234, 201, 248, .32), rgba(221, 244, 237, .38));
  color: #5E6670;
  line-height: 1.55;
}

.home-plan-note span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #A88AF0;
  color: #FFFFFF;
}

.home-quick-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px 20px;
}

.home-quick,
.home-action {
  min-height: 84px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: 18px;
  padding: 14px 18px;
  border-radius: 16px !important;
  text-align: left;
  font: inherit;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease !important;
}

.home-quick:hover,
.home-action:hover,
.home-stage:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 180, 126, .26) !important;
  box-shadow: 0 22px 46px rgba(26, 29, 33, .09) !important;
}

.home-quick-icon,
.home-action-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
}

.home-command-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(460px, .9fr);
  gap: 16px;
  align-items: stretch;
}

.home-command-hero {
  padding: 26px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 36% 60% at 96% 10%, rgba(127, 216, 197, .24), transparent 62%),
    linear-gradient(135deg, #FFFFFF 0%, #F4FBF9 100%) !important;
}

.home-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.home-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: #F1F5F4;
  color: #4E5965;
  font-size: 13px;
  font-weight: 700;
}

.home-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--nx-accent);
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.home-kpi {
  min-height: 100px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  border-radius: 20px !important;
}

.home-kpi small {
  color: var(--nx-muted);
  font-size: 12px;
  font-weight: 700;
}

.home-kpi b {
  color: var(--nx-text);
  font-size: clamp(24px, 2.1vw, 34px);
  line-height: 1;
}

.home-kpi span {
  color: #188D68;
  font-size: 12px;
  font-weight: 800;
}

.home-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.05fr) minmax(340px, .9fr) minmax(280px, .62fr);
  gap: 16px;
  align-items: start;
}

.home-stages {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-stage {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 96px 80px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border-radius: 18px;
  background: #FFFFFF;
  border: 1px solid var(--nx-border);
  box-shadow: 0 8px 20px rgba(26, 29, 33, .035);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.home-stage-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #EDF8F5;
  color: #188D68;
  font-weight: 900;
}

.home-stage-name {
  min-width: 0;
}

.home-stage-name b {
  display: block;
  overflow: hidden;
  color: var(--nx-text);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-stage-name small,
.home-stage-meta,
.home-stage-status {
  color: var(--nx-muted);
  font-size: 12px;
  font-weight: 700;
}

.home-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #E8ECEF;
}

.home-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #7FD8C5, #24B47E);
}

.home-stage-status {
  justify-self: end;
  padding: 6px 10px;
  border-radius: 999px;
  background: #F1F8F6;
  color: #188D68;
}

.home-mini-gantt {
  position: relative;
  padding: 20px;
}

.home-gantt-axis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 4px 0 14px;
  padding-left: 106px;
  color: #9098A2;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-gantt-axis span:not(:first-child) {
  text-align: center;
}

.home-gantt-axis span:last-child {
  text-align: right;
}

.home-gantt-plot {
  position: relative;
}

.home-gantt-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  align-items: center;
  height: 42px;
}

.home-gantt-row span {
  color: #586371;
  font-size: 12px;
  font-weight: 700;
}

.home-gantt-track {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background: #EDF1F3;
}

.home-gantt-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  border-radius: inherit;
  background: #7FD8C5;
}

.home-gantt-bar.is-critical {
  background: #24B47E;
}

.home-gantt-today {
  position: absolute;
  top: 16px;
  bottom: 6px;
  width: 2px;
  background: #A58AF2;
  border-radius: 2px;
  z-index: 1;
  pointer-events: none;
}

.home-gantt-today::before {
  content: "Today";
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  color: #7B61D8;
  font-size: 11px;
  font-weight: 800;
}

.home-logic-card {
  padding: 20px;
}

.home-logic-score {
  width: 128px;
  height: 128px;
  margin: 6px auto 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(var(--nx-accent) calc(var(--score, 0) * 1%), #E8ECEF 0);
}

.home-logic-score span {
  width: 98px;
  height: 98px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--nx-text);
  font-size: 30px;
  font-weight: 900;
}

.home-logic-list,
.home-snapshot-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.home-logic-list div,
.home-snapshot-list div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 13px;
  border-bottom: 1px solid var(--nx-border);
  color: #5E6874;
  font-size: 13px;
}

.home-logic-list div:last-child,
.home-snapshot-list div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.home-logic-list b,
.home-snapshot-list b {
  color: var(--nx-text);
}

.home-third-grid {
  display: grid;
  grid-template-columns: minmax(430px, 1.1fr) minmax(300px, .78fr) minmax(280px, .62fr);
  gap: 16px;
  align-items: start;
}

.home-actions-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.home-action {
  min-height: 70px;
  grid-template-columns: 46px 1fr auto;
  padding: 12px 14px;
  border-radius: 18px !important;
}

.home-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 15px;
}

.home-action .home-action-open {
  color: #188D68;
  font-size: 20px;
}

.home-snapshot {
  padding: 26px;
}

.home-seeall {
  border: 0;
  background: transparent;
  color: #188D68;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
}

@media (max-width: 1280px) {

  .home-command-grid,
  .home-dashboard-grid,
  .home-third-grid,
  .home-grid {
    grid-template-columns: 1fr;
  }

  .home-kpi-grid,
  .home-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {

  body.ap-vertical-shell .tabs,
  body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek),
  body.ap-vertical-shell .tabs.ap-nav-peek {
    inset: auto 14px 14px 14px !important;
    width: auto !important;
    height: 76px !important;
    flex-direction: row !important;
    padding: 10px 14px !important;
  }

  body.ap-vertical-shell .ap-sidebar-brand,
  body.ap-vertical-shell .ap-settings-shortcut,
  body.ap-vertical-shell .ap-sidebar-foot {
    display: none !important;
  }

  body.ap-vertical-shell .ap-sidebar-nav {
    flex-direction: row !important;
    overflow-x: auto !important;
  }

  .hdr,
  body.ap-vertical-shell .hdr {
    left: 16px !important;
    right: 16px !important;
    top: 14px !important;
    grid-template-columns: 1fr auto !important;
  }

  .hdr-search {
    display: none;
  }

  .hdr-profile {
    min-width: 56px;
    width: 56px;
    padding: 0;
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .hdr-profile-copy,
  .hdr-profile>svg {
    display: none;
  }

  .body,
  body.ap-vertical-shell .body,
  body.ap-vertical-shell .body:not(.ap-body-closed),
  body.ap-vertical-shell .body.ap-body-closed {
    padding: 94px 16px 112px !important;
  }

  .home-welcome {
    padding: 30px 24px;
  }

  .home-welcome::after {
    display: none;
  }

  .home-getstarted-flow,
  .home-kpi-grid,
  .home-quick-grid {
    grid-template-columns: 1fr;
  }

  .home-step:not(:last-child)::after {
    display: none;
  }

  .home-stage {
    grid-template-columns: 40px minmax(0, 1fr);
  }

  .home-stage-meta,
  .home-stage-status {
    justify-self: start;
    grid-column: 2;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
}

/* Final cascade lock against legacy shell/theme offsets loaded earlier. */
html body.ap-vertical-shell .hdr,
html body.ap-vertical-shell .hdr:not(.ap-nav-collapsed),
html body.ap-vertical-shell .hdr.ap-nav-peek {
  top: 24px !important;
  left: 316px !important;
  right: 28px !important;
  width: auto !important;
  max-width: none !important;
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  transition: left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

html body.ap-vertical-shell .hdr.ap-nav-collapsed:not(.ap-nav-peek) {
  top: 24px !important;
  left: 130px !important;
  right: 28px !important;
  width: auto !important;
  max-width: none !important;
  height: 64px !important;
  min-height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  transition: left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

html body.ap-vertical-shell .hdr .logo,
html body.ap-vertical-shell .hdr:not(.ap-nav-collapsed) .logo,
html body.ap-vertical-shell .hdr.ap-nav-peek .logo,
html body.ap-vertical-shell .hdr.ap-nav-collapsed:not(.ap-nav-peek) .logo {
  display: flex !important;
  width: 292px !important;
  min-width: 292px !important;
  max-width: 292px !important;
  opacity: 1 !important;
  visibility: visible !important;
  margin: 0 !important;
  transform: none !important;
  filter: none !important;
}

html body.ap-vertical-shell .hdr .logo-ico,
html body.ap-vertical-shell .hdr.ap-nav-collapsed:not(.ap-nav-peek) .logo-ico {
  width: 292px !important;
  min-width: 292px !important;
  max-width: 292px !important;
  height: 60px !important;
  flex: 0 0 292px !important;
  opacity: 1 !important;
}

html body.ap-vertical-shell .body,
html body.ap-vertical-shell .body:not(.ap-body-closed) {
  left: auto !important;
  right: auto !important;
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 114px 34px 54px 316px !important;
  transform: none !important;
  transition: padding-left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

html body.ap-vertical-shell .body.ap-body-closed {
  left: auto !important;
  right: auto !important;
  width: 100vw !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 114px 34px 54px 130px !important;
  transform: none !important;
  transition: padding-left .4s cubic-bezier(.19, 1, .22, 1) !important;
}

html body .home-btn.home-btn-primary,
html body .home-active .home-btn.home-btn-primary,
html body .home-getstarted .home-btn.home-btn-primary {
  background: #0F1720 !important;
  border-color: #0F1720 !important;
  color: #FFFFFF !important;
  box-shadow: 0 16px 30px rgba(26, 29, 33, .16) !important;
}

html body .home-btn.home-btn-primary:hover {
  background: #1A1D21 !important;
  box-shadow: 0 18px 34px rgba(26, 29, 33, .20) !important;
}

html body .home-step-icon svg,
html body .home-quick-icon svg,
html body .home-action-icon svg,
html body .home-plan-note svg,
html body .home-action-open svg {
  width: 22px !important;
  height: 22px !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 1.75 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

html body.ap-vertical-shell .tab[data-tab="compress"],
html body.ap-vertical-shell .tab[data-tab="ai-rel-lab"],
html body.ap-vertical-shell .tab[data-tab="packages"] {
  display: none !important;
}

html body.ap-vertical-shell .tab,
html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab,
html body.ap-vertical-shell .tabs.ap-nav-peek .tab {
  width: 100% !important;
  height: 45px !important;
  min-height: 45px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  padding: 0 11px !important;
  border-radius: 14px !important;
}

html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 !important;
  gap: 0 !important;
  border-radius: 14px !important;
}

html body.ap-vertical-shell .tab .ap-tab-icon,
html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab .ap-tab-icon,
html body.ap-vertical-shell .tabs.ap-nav-peek .tab .ap-tab-icon,
html body.ap-vertical-shell .tab.active .ap-tab-icon,
html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab.active .ap-tab-icon,
html body.ap-vertical-shell .tabs.ap-nav-peek .tab.active .ap-tab-icon {
  flex: 0 0 30px !important;
  width: 30px !important;
  height: 30px !important;
  display: grid !important;
  place-items: center !important;
  border: 1px solid rgba(36, 180, 126, .08) !important;
  border-radius: 10px !important;
  background: rgba(36, 180, 126, .04) !important;
  color: currentColor !important;
  box-shadow: none !important;
}

html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab .ap-tab-icon,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab.active .ap-tab-icon {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  color: currentColor !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

html body.ap-vertical-shell .tab .ap-tab-icon svg,
html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-peek .tab .ap-tab-icon svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 1.8 !important;
  color: currentColor !important;
  stroke: currentColor !important;
}

html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab .ap-tab-icon svg {
  color: currentColor !important;
  stroke: currentColor !important;
}

html body.ap-vertical-shell .ap-settings-shortcut,
html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-settings-shortcut,
html body.ap-vertical-shell .tabs.ap-nav-peek .ap-settings-shortcut {
  width: auto !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 8px 0 4px !important;
  padding: 0 11px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 10px !important;
  border: 0 !important;
  border-top: 1px solid rgba(36, 180, 126, .10) !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #344054 !important;
  box-shadow: none !important;
  cursor: pointer !important;
}

html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-settings-shortcut {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  flex: 0 0 42px !important;
  height: 42px !important;
  min-height: 42px !important;
  margin: 6px auto 2px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: transparent !important;
  color: #344054 !important;
  cursor: pointer !important;
}

html body.ap-vertical-shell .ap-settings-shortcut svg {
  width: 20px !important;
  height: 20px !important;
  stroke-width: 1.8 !important;
  color: currentColor !important;
  stroke: currentColor !important;
}

html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-settings-shortcut:hover,
html body.ap-vertical-shell .tabs.ap-nav-peek .ap-settings-shortcut:hover,
html body.ap-vertical-shell .ap-settings-shortcut:hover {
  background: var(--nx-surface-2) !important;
  color: var(--nx-accent) !important;
}

html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-foot {
  width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  display: grid !important;
  place-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-account-avatar {
  width: 38px !important;
  height: 38px !important;
  font-size: 11px !important;
}

html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-sidebar-foot,
html body.ap-vertical-shell .tabs.ap-nav-peek .ap-sidebar-foot {
  order: 9999 !important;
  flex: 0 0 auto !important;
  width: auto !important;
  min-height: 52px !important;
  margin-top: 4px !important;
  padding: 6px 10px !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 10px !important;
  border: 1px solid rgba(36, 180, 126, .10) !important;
  border-radius: 14px !important;
  background: rgba(36, 180, 126, .03) !important;
  cursor: pointer !important;
}

html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .ap-account-avatar,
html body.ap-vertical-shell .tabs.ap-nav-peek .ap-account-avatar {
  width: 32px !important;
  height: 32px !important;
  flex: 0 0 32px !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  background: #2DBE9F !important;
  color: #10231F !important;
}

html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab:not(.active) .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-peek .tab:not(.active) .ap-tab-icon svg {
  color: #344054 !important;
  stroke: #344054 !important;
}

html body.ap-vertical-shell .tabs:not(.ap-nav-collapsed) .tab.active .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-peek .tab.active .ap-tab-icon svg {
  color: #188D68 !important;
  stroke: #188D68 !important;
}

html body.ap-vertical-shell .tab:not(.active) .ap-tab-icon svg,
html body.ap-vertical-shell .tab:not(.active) .ap-tab-icon svg *,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab:not(.active) .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab:not(.active) .ap-tab-icon svg * {
  color: #344054 !important;
  stroke: #344054 !important;
}

html body.ap-vertical-shell .tab.active .ap-tab-icon svg,
html body.ap-vertical-shell .tab.active .ap-tab-icon svg *,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab.active .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .tab.active .ap-tab-icon svg * {
  color: #188D68 !important;
  stroke: #188D68 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   COLLAPSED RAIL — group dividers (reference-match)
   One clean centered hairline between every icon group. No text, no
   double lines. Soft neutral fade so it reads as a quiet separator on
   the light rail — matches the reference sidebar exactly.
   ══════════════════════════════════════════════════════════════════════ */

/* Section wrapper becomes a centered slot that holds one drawn line */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-section {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: auto !important;
  margin: 13px auto 11px !important;
  padding: 0 !important;
  overflow: visible !important;
  pointer-events: none !important;
}

/* Kill the raw label + the two stock gradient lines in the rail */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-section-text,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-section-line {
  display: none !important;
}

/* The divider itself — a single fading hairline, centered */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-section::after {
  content: "" !important;
  display: block !important;
  width: 26px !important;
  height: 1px !important;
  border-radius: 1px !important;
  background: linear-gradient(90deg,
      transparent,
      rgba(26, 29, 33, .16) 22%,
      rgba(26, 29, 33, .16) 78%,
      transparent) !important;
}

/* No line above the first group — separators sit BETWEEN groups only */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-nav > .ap-sidebar-section:first-child {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   COLLAPSED RAIL — start at Home
   Drop the brand mark + the search pill from the compact rail so the first
   thing in it is the Home icon. Both still show in the expanded/peek rail.
   ══════════════════════════════════════════════════════════════════════ */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-sidebar-brand,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) .ap-cmd-trigger {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════════════════
   SLEEP STATE — the rail idles to a slimmer bar
   `.ap-nav-sleep` is toggled by the shell JS 1s after the rail is left
   untouched while collapsed. Hover peeks it open; leaving re-sleeps it.
   Strong, springy motion on width / padding / icon sizing.
   ══════════════════════════════════════════════════════════════════════ */

/* Punchy spring on the collapse ⇄ sleep width change */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek) {
  transition:
    width .52s cubic-bezier(.34, 1.56, .44, 1),
    padding .52s cubic-bezier(.34, 1.56, .44, 1),
    border-radius .46s cubic-bezier(.19, 1, .22, 1) !important;
}

/* Every NON-sleep state keeps its normal top/bottom anchoring — no transform */
html body.ap-vertical-shell .tabs,
html body.ap-vertical-shell .tabs.ap-nav-peek,
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-sleep):not(.ap-nav-peek) {
  transform: none !important;
}

/* ── SLEEP ── a calm mini-capsule: vertically centered, short, dimmed,
   showing only a few icons (one per group + the active one). */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) {
  width: 54px !important;
  top: 50% !important;
  bottom: auto !important;
  height: auto !important;
  max-height: 82vh !important;
  transform: translateY(-50%) !important;
  padding: 12px 6px !important;
  border-radius: 24px !important;
  justify-content: center !important;
  /* calmer, faded surface */
  background: rgba(255, 255, 255, .72) !important;
  border-color: rgba(232, 236, 239, .68) !important;
  box-shadow: 0 18px 46px rgba(26, 29, 33, .07) !important;
  transition:
    width .5s cubic-bezier(.34, 1.56, .44, 1),
    top .52s cubic-bezier(.19, 1, .22, 1),
    transform .52s cubic-bezier(.19, 1, .22, 1),
    padding .5s cubic-bezier(.34, 1.56, .44, 1),
    border-radius .46s cubic-bezier(.19, 1, .22, 1),
    background .5s ease, box-shadow .5s ease !important;
}

/* nav hugs its content instead of stretching full height */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-sidebar-nav {
  flex: 0 0 auto !important;
  gap: 8px !important;
  overflow: visible !important;
}

/* drop everything that adds height: footer, group dividers */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-sidebar-foot,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-sidebar-section {
  display: none !important;
}

/* show FEWER icons — first 7 visible tabs + active + settings (controlled by JS) */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-sidebar-nav .tab {
  display: none !important;
}
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-sidebar-nav .tab[data-sleep-lead],
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-sidebar-nav .tab.active {
  display: grid !important;
  flex: 0 0 36px !important;
  width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  transition:
    width .5s cubic-bezier(.34, 1.56, .44, 1),
    height .5s cubic-bezier(.34, 1.56, .44, 1) !important;
}
/* settings shortcut in sleep mode — same size as tab icons */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-settings-shortcut {
  display: grid !important;
  flex: 0 0 36px !important;
  width: 36px !important;
  max-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  order: 9999 !important;
  transition:
    width .5s cubic-bezier(.34, 1.56, .44, 1),
    height .5s cubic-bezier(.34, 1.56, .44, 1) !important;
}

/* settings icon in sleep — same faded look and size as others */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-settings-shortcut svg,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-settings-shortcut svg * {
  color: #9AA0A6 !important;
  stroke: #9AA0A6 !important;
  opacity: .85 !important;
}
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-settings-shortcut svg {
  width: 24px !important;
  height: 24px !important;
}

/* smaller icons for the quiet state */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .ap-tab-icon {
  width: 24px !important;
  height: 24px !important;
}

/* Everything in sleep is faded the same — including the active icon.
   The active tab also drops its highlight tint so it matches its siblings. */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab.active {
  background: transparent !important;
  box-shadow: none !important;
}
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab .ap-tab-icon,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab .ap-tab-icon svg *,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab.active .ap-tab-icon,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab.active .ap-tab-icon svg,
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) .tab.active .ap-tab-icon svg * {
  color: #9AA0A6 !important;
  stroke: #9AA0A6 !important;
  opacity: .85 !important;
}

/* Sleep state: body expands to reclaim space around the 54px capsule */
html body.ap-vertical-shell .tabs.ap-nav-collapsed.ap-nav-sleep:not(.ap-nav-peek) ~ .body {
  padding: 114px 34px 54px 112px !important;
}

/* ══════════════════════════════════════════════════════════════════════
   BOOT — stable, no flicker
   Tabs register progressively over the deferred boot (~15s) and the
   MutationObserver re-appends them on each addition, which restarted the
   `apNavEnter` opacity animation every time → the rail blinked on/off for
   the whole boot. Drop the entrance animation outright: the rail simply
   appears and stays put.
   ══════════════════════════════════════════════════════════════════════ */
html body.ap-vertical-shell .tab,
html body.ap-vertical-shell .ap-sidebar-section,
html body.ap-vertical-shell.ap-nav-booting .tab,
html body.ap-vertical-shell.ap-nav-booting .ap-sidebar-section {
  animation: none !important;
  opacity: 1 !important;
}

/* ══════════════════════════════════════════════════════════════════════
   COLLAPSED (pre-sleep) rail — a touch shorter than full height
   Pull the top & bottom in so the 72px bar floats with clearer margins,
   without touching the sleep capsule (which anchors via top:50%).
   ══════════════════════════════════════════════════════════════════════ */
html body.ap-vertical-shell .tabs.ap-nav-collapsed:not(.ap-nav-peek):not(.ap-nav-sleep) {
  inset: 52px auto 52px 28px !important;
}

/* ══════════════════════════════════════════════════════════════════════
   HEADER — notifications are Home-only, search is global
   ══════════════════════════════════════════════════════════════════════ */
html body.ap-vertical-shell:not(.nx-on-home) .hdr-actions {
  display: none !important;
}

/* Header as an adaptive flex row instead of a fixed 3-column grid:
   logo (far left) → any per-tab toolbar buttons → search → notifications.
   Search is pushed right (margin-left:auto): it sits right after the tab
   buttons when they exist, otherwise starts from the far right. */
html body.ap-vertical-shell .hdr,
html body.ap-vertical-shell .hdr:not(.ap-nav-collapsed),
html body.ap-vertical-shell .hdr.ap-nav-peek,
html body.ap-vertical-shell .hdr.ap-nav-collapsed:not(.ap-nav-peek) {
  display: flex !important;
  grid-template-columns: none !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 14px !important;
}

html body.ap-vertical-shell .hdr .logo {
  order: 0 !important;
  flex: 0 0 auto !important;
}

/* per-tab header toolbars live just after the logo */
html body.ap-vertical-shell .hdr > .aipe-header-export,
html body.ap-vertical-shell .hdr > .aipe-mapping-header-download,
html body.ap-vertical-shell .hdr > .hbtns,
html body.ap-vertical-shell .hdr > .hist-header-export,
html body.ap-vertical-shell .hdr > .ai-pill,
html body.ap-vertical-shell .hdr > .api-st {
  order: 5 !important;
}

/* search: always visible, pushed to the right, left of notifications.
   Rests as a compact icon; expands to a full field on hover / focus. */
html body.ap-vertical-shell .hdr .hdr-search,
html body.ap-vertical-shell:not(.nx-on-home) .hdr .hdr-search {
  display: flex !important;
  order: 10 !important;
  flex: 0 0 46px !important;
  width: 46px !important;
  min-width: 46px !important;
  max-width: 46px !important;
  height: 46px !important;
  margin-left: auto !important;
  padding: 0 !important;
  justify-content: center !important;
  cursor: text !important;
  border-radius: 14px !important;
  border: 1px solid var(--nx-border) !important;
  background: rgba(255, 255, 255, .70) !important;
  box-shadow: none !important;
  transition:
    flex-basis .34s cubic-bezier(.19, 1, .22, 1),
    width .34s cubic-bezier(.19, 1, .22, 1),
    min-width .34s cubic-bezier(.19, 1, .22, 1),
    max-width .34s cubic-bezier(.19, 1, .22, 1),
    padding .3s ease,
    border-color .2s ease, box-shadow .22s ease, background .2s ease !important;
}

/* search sits right AFTER the tab's toolbar buttons when they exist,
   otherwise it starts from the far right */
html body.ap-vertical-shell .hdr.nx-has-tools .hdr-search {
  margin-left: 16px !important;
}
html body.ap-vertical-shell .hdr:not(.nx-has-tools) .hdr-search {
  margin-left: auto !important;
}

html body.ap-vertical-shell .hdr .hdr-search:hover,
html body.ap-vertical-shell .hdr .hdr-search:focus-within {
  flex-basis: 360px !important;
  width: 360px !important;
  min-width: 360px !important;
  max-width: 360px !important;
  padding: 0 18px !important;
  justify-content: flex-start !important;
  background: #FFFFFF !important;
  box-shadow: 0 16px 38px rgba(26, 29, 33, .08) !important;
}

/* resting magnifier: muted; turns accent when the field opens */
html body.ap-vertical-shell .hdr-search svg { stroke: #6B7280 !important; }
html body.ap-vertical-shell .hdr-search:hover svg,
html body.ap-vertical-shell .hdr-search:focus-within svg { stroke: var(--nx-accent, #24B47E) !important; }

/* the input only shows once the field is open */
html body.ap-vertical-shell .hdr-search input {
  width: 0 !important;
  opacity: 0 !important;
  transition: opacity .2s ease, width .3s cubic-bezier(.19, 1, .22, 1) !important;
}
html body.ap-vertical-shell .hdr-search:hover input,
html body.ap-vertical-shell .hdr-search:focus-within input {
  width: 100% !important;
  opacity: 1 !important;
}

/* keep the magnifier from squashing */
html body.ap-vertical-shell .hdr-search svg {
  flex: 0 0 auto !important;
}

/* notifications: rightmost */
html body.ap-vertical-shell .hdr .hdr-actions {
  order: 20 !important;
  flex: 0 0 auto !important;
  margin-left: 0 !important;
}

/* notification icon — matches the resting search: clean, subtle, consistent */
html body.ap-vertical-shell .hdr-icon-btn {
  width: 46px !important;
  height: 46px !important;
  border-radius: 14px !important;
  border: 1px solid var(--nx-border) !important;
  background: rgba(255, 255, 255, .70) !important;
  box-shadow: none !important;
  color: #6B7280 !important;
  transition: background .18s ease, color .18s ease, border-color .18s ease !important;
}
html body.ap-vertical-shell .hdr-icon-btn:hover {
  background: #FFFFFF !important;
  color: var(--nx-accent, #24B47E) !important;
  border-color: rgba(36, 180, 126, .35) !important;
}
html body.ap-vertical-shell .hdr-icon-btn svg {
  width: 20px !important;
  height: 20px !important;
}
html body.ap-vertical-shell .hdr-notification-dot {
  top: 9px !important;
  right: 9px !important;
  width: 8px !important;
  height: 8px !important;
}

/* ── Focus polish for the search field ── */
html body.ap-vertical-shell .hdr-search {
  transition: border-color .2s ease, box-shadow .22s ease, background .2s ease !important;
}
html body.ap-vertical-shell .hdr-search:focus-within {
  background: #FFFFFF !important;
  border-color: var(--nx-accent, #24B47E) !important;
  box-shadow: 0 0 0 4px rgba(36, 180, 126, .14), 0 16px 38px rgba(26, 29, 33, .08) !important;
}
html body.ap-vertical-shell .hdr-search:focus-within svg {
  stroke: var(--nx-accent, #24B47E) !important;
}
html body.ap-vertical-shell .hdr-search input {
  caret-color: var(--nx-accent, #24B47E) !important;
}
html body.ap-vertical-shell .hdr-search input::selection {
  background: rgba(36, 180, 126, .22);
}
html body.ap-vertical-shell .hdr-search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
}

/* ══════════════════════════════════════════════════════════════════════
   HEADER SEARCH — live results dropdown
   ══════════════════════════════════════════════════════════════════════ */
html body.ap-vertical-shell .hdr-search {
  position: relative !important;
}

html body.ap-vertical-shell .hdr-search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 400;
  max-height: min(60vh, 460px);
  overflow-y: auto;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .98);
  border: 1px solid var(--nx-border, #E8ECEF);
  box-shadow: 0 24px 60px rgba(26, 29, 33, .16);
  backdrop-filter: blur(20px);
  opacity: 0;
  transform: translateY(-6px) scale(.99);
  pointer-events: none;
  transition: opacity .16s ease, transform .2s cubic-bezier(.19, 1, .22, 1);
  scrollbar-width: thin;
}

html body.ap-vertical-shell .hdr-search.hsr-open .hdr-search-results {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

html body.ap-vertical-shell .hsr-group {
  padding: 8px 12px 4px;
  font: 800 9.5px/1 'DM Sans', system-ui, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--nx-muted, #72777E);
}

html body.ap-vertical-shell .hsr-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--nx-text, #1A1D21);
  font: 600 13.5px/1.2 'DM Sans', system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
  transition: background .13s ease;
}

html body.ap-vertical-shell .hsr-item:hover,
html body.ap-vertical-shell .hsr-item.hsr-item--active {
  background: var(--nx-sidebar-active, #DDF4ED);
}

html body.ap-vertical-shell .hsr-ico {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--nx-surface-2, #F7F8F9);
  color: var(--nx-accent, #24B47E);
}
html body.ap-vertical-shell .hsr-ico svg { width: 16px; height: 16px; }
html body.ap-vertical-shell .hsr-ico--dot { background: transparent; }
html body.ap-vertical-shell .hsr-ico--dot::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--nx-accent, #24B47E);
}

html body.ap-vertical-shell .hsr-label {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
html body.ap-vertical-shell .hsr-label mark {
  background: rgba(36, 180, 126, .20);
  color: inherit;
  border-radius: 3px;
  padding: 0 1px;
}

html body.ap-vertical-shell .hsr-kind {
  flex: 0 0 auto;
  font: 700 10px/1 'DM Sans', system-ui, sans-serif;
  letter-spacing: .04em;
  color: var(--nx-muted, #72777E);
  opacity: 0;
  transition: opacity .13s ease;
}
html body.ap-vertical-shell .hsr-item:hover .hsr-kind,
html body.ap-vertical-shell .hsr-item.hsr-item--active .hsr-kind { opacity: 1; }

html body.ap-vertical-shell .hsr-empty {
  padding: 16px 14px;
  font: 600 13px/1.3 'DM Sans', system-ui, sans-serif;
  color: var(--nx-muted, #72777E);
  text-align: center;
}

/* flash target when jumping to an in-page match */
.hsr-flash {
  animation: hsrFlash 2.2s ease !important;
  border-radius: 8px;
}
@keyframes hsrFlash {
  0%, 100% { box-shadow: 0 0 0 0 rgba(36, 180, 126, 0); background-color: transparent; }
  12%      { box-shadow: 0 0 0 3px rgba(36, 180, 126, .55); background-color: rgba(36, 180, 126, .12); }
  70%      { box-shadow: 0 0 0 3px rgba(36, 180, 126, .30); background-color: rgba(36, 180, 126, .08); }
}

/* =====================================================================
   Planning Overview dashboard (post-generate home). Self-contained.
   ===================================================================== */
.pv-shell {
  --pv-green: #24B47E;
  --pv-green-soft: #7FD8C5;
  --pv-green-2: #A7E8D6;
  --pv-crit: #F4746B;
  --pv-crit-soft: #FBB4AE;
  --pv-ms: #12314F;
  --pv-warn: #E5972A;
  --pv-ink: #1A1D21;
  --pv-mut: #6B7580;
  --pv-line: #E8ECEF;
  --pv-card-r: 20px;
  --pv-head-font: 'Plus Jakarta Sans', Inter, system-ui, -apple-system, sans-serif;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1560px;
  margin: 0 auto;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -0.01em;
  /* Slightly zoomed-out so the whole dashboard reads comfortably. Tune 0.85–1.0. */
  zoom: 0.9;
}

.pv-shell *,
.pv-shell *::before,
.pv-shell *::after { box-sizing: border-box; }

.pv-hero-title,
.pv-card-head h3,
.pv-kpi > b,
.pv-donut-in b,
.pv-foot-stat b,
.pv-metric-val,
.pv-snap-row > b { font-family: var(--pv-head-font); }

.pv-card {
  background: #FFFFFF !important;
  border: 1px solid var(--pv-line) !important;
  border-radius: var(--pv-card-r) !important;
  box-shadow: 0 12px 34px rgba(26, 29, 33, .055) !important;
  padding: 20px;
  min-width: 0;
}

.pv-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.pv-card-ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: #EAF7F1;
  color: var(--pv-green);
  flex-shrink: 0;
}

.pv-card-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.pv-card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--pv-ink);
}

.pv-empty {
  padding: 22px 14px;
  border-radius: 12px;
  background: #F6F8F9;
  color: var(--pv-mut);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
}

/* ---- HERO ---- */
.pv-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .82fr);
  gap: 22px;
  align-items: center;
  padding: 28px 32px;
  border-radius: 24px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(127, 216, 197, .28), transparent 55%),
    linear-gradient(118deg, #E9F7F1 0%, #F2FBF8 52%, #EAF4FA 100%);
  border: 1px solid rgba(127, 216, 197, .4);
}

.pv-hero-title {
  margin: 0 0 10px;
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #14202A;
}

.pv-hero-meta {
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 700;
  color: #4C6A63;
}

.pv-hero-desc {
  margin: 0 0 20px;
  max-width: 54ch;
  font-size: 14px;
  line-height: 1.6;
  color: #46555E;
}

.pv-hero-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.pv-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background-color .16s ease, border-color .16s ease;
}

.pv-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-btn:hover { transform: translateY(-1px); }

.pv-btn-primary {
  background: var(--pv-green);
  border-color: var(--pv-green);
  color: #FFFFFF;
  box-shadow: 0 12px 24px rgba(36, 180, 126, .28);
}
.pv-btn-primary:hover { background: #1EA372; }

.pv-btn-ghost {
  background: rgba(255, 255, 255, .85);
  border-color: #D5E3DE;
  color: #24303A;
}
.pv-btn-ghost:hover { border-color: var(--pv-green-soft); background: #FFFFFF; }

.pv-kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 16px 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .74);
  border: 1px solid rgba(255, 255, 255, .9);
  box-shadow: 0 10px 26px rgba(26, 29, 33, .06);
}

.pv-kpi {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 4px 8px;
  min-width: 0;
  position: relative;
}
.pv-kpi:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 0; top: 18%; bottom: 18%;
  width: 1px;
  background: var(--pv-line);
}

.pv-kpi-head { display: flex; align-items: center; gap: 5px; color: var(--pv-mut); min-width: 0; }
.pv-kpi-head svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: var(--pv-green); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-kpi-head small { font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.pv-kpi > b { font-size: clamp(22px, 1.8vw, 30px); font-weight: 800; color: var(--pv-ink); line-height: 1; }

/* ---- 3-column rows ---- */
.pv-grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1.05fr) minmax(0, .78fr);
  gap: 16px;
  align-items: start;
}

/* ---- Project summary ---- */
.pv-summary-body { display: grid; grid-template-columns: 116px minmax(0, 1fr); gap: 14px; align-items: stretch; }
.pv-summary-metrics { display: flex; flex-direction: column; gap: 12px; }

.pv-metric { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.pv-metric-ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 8px; background: #F1F5F4; color: var(--pv-mut); }
.pv-metric-ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-metric-lab { font-size: 12.5px; font-weight: 600; color: var(--pv-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-metric-val { font-size: 13px; font-weight: 800; color: var(--pv-ink); white-space: nowrap; }
.pv-metric-val.is-good { color: var(--pv-green); }
.pv-metric-val.is-warn { color: var(--pv-warn); }

.pv-summary-metrics .pv-metric {
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto auto;
  row-gap: 1px;
  align-items: center;
}
.pv-summary-metrics .pv-metric-ic { grid-row: 1 / span 2; }
.pv-summary-metrics .pv-metric-lab { grid-column: 2; grid-row: 1; white-space: normal; line-height: 1.2; }
.pv-summary-metrics .pv-metric-val { grid-column: 2; grid-row: 2; justify-self: start; }

.pv-chart { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pv-chart-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.pv-chart-title span { font-size: 12.5px; font-weight: 800; color: var(--pv-ink); white-space: nowrap; }
.pv-chart-title em { font-size: 11px; font-weight: 700; font-style: normal; color: var(--pv-green); white-space: nowrap; }
.pv-chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.pv-chart-svg .pv-bar { fill: var(--pv-green-2); }
.pv-chart-svg .pv-line { fill: none; stroke: var(--pv-green); stroke-width: 2; }
.pv-chart-svg .pv-dot { fill: var(--pv-green); }
.pv-chart-svg .pv-xlab { fill: #9098A2; font-size: 10px; font-weight: 600; }

/* ---- Gantt chart summary ---- */
.pv-gantt-axis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding-left: 108px;
  margin-bottom: 10px;
  font-size: 10.5px;
  font-weight: 700;
  color: #9098A2;
}
.pv-gantt-axis span:nth-child(2), .pv-gantt-axis span:nth-child(3) { text-align: center; }
.pv-gantt-axis span:last-child { text-align: right; }

.pv-gantt-plot { position: relative; display: flex; flex-direction: column; gap: 9px; }

.pv-gantt-row { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 0; align-items: center; }
.pv-gantt-lab { font-size: 11.5px; font-weight: 700; color: #55606B; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 10px; }

.pv-gantt-track { position: relative; height: 13px; border-radius: 999px; background: #EFF2F4; }
.pv-bar-seg { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: linear-gradient(90deg, var(--pv-green-soft), var(--pv-green)); }
.pv-bar-seg.is-critical { background: linear-gradient(90deg, var(--pv-crit-soft), var(--pv-crit)); }

.pv-ms { position: absolute; top: 50%; width: 11px; height: 11px; transform: translate(-50%, -50%) rotate(45deg); background: var(--pv-ms); border: 2px solid #FFFFFF; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.pv-gantt-today { position: absolute; top: -2px; bottom: -2px; width: 2px; background: #8B6FE0; z-index: 2; pointer-events: none; }
.pv-gantt-today span { position: absolute; top: -15px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 800; color: #7358D6; }

.pv-gantt-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 16px; }
.pv-lg { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--pv-mut); }
.pv-lg::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.pv-lg-plan::before { background: var(--pv-green); }
.pv-lg-crit::before { background: var(--pv-crit); }
.pv-lg-ms::before { width: 9px; height: 9px; border-radius: 2px; transform: rotate(45deg); background: var(--pv-ms); }

.pv-gantt-foot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--pv-line); }
.pv-foot-stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pv-foot-stat small { font-size: 11px; font-weight: 600; color: var(--pv-mut); }
.pv-foot-stat b { font-size: 13px; font-weight: 800; color: var(--pv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Logic health ---- */
.pv-logic-body { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.pv-donut {
  width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0;
  background: conic-gradient(var(--pv-green) calc(var(--score, 0) * 1%), #E8ECEF 0);
}
.pv-donut-in { width: 100px; height: 100px; border-radius: 50%; background: #FFFFFF; display: grid; place-items: center; gap: 2px; }
.pv-donut-in b { font-size: 27px; font-weight: 800; color: var(--pv-ink); line-height: 1; }
.pv-donut-in small { font-size: 11px; font-weight: 700; color: var(--pv-green); }
.pv-logic-list { width: 100%; display: flex; flex-direction: column; gap: 13px; }

/* ---- Quick access ---- */
.pv-quick-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pv-quick {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 13px;
  background: #FFFFFF; border: 1px solid var(--pv-line); cursor: pointer; text-align: left; min-width: 0;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pv-quick:hover { transform: translateY(-1px); border-color: var(--pv-green-soft); box-shadow: 0 8px 18px rgba(26,29,33,.06); }
.pv-quick-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #EAF7F1; color: var(--pv-green); flex-shrink: 0; }
.pv-quick-ic svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-quick-txt { min-width: 0; }
.pv-quick-txt b { display: block; font-size: 12.5px; font-weight: 800; color: var(--pv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-quick-txt small { font-size: 11px; color: var(--pv-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* ---- Recommended actions ---- */
.pv-actions-list { display: flex; flex-direction: column; gap: 10px; }
.pv-action {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 20px; gap: 11px; align-items: center;
  padding: 11px 12px; border-radius: 13px; background: #FFFFFF; border: 1px solid var(--pv-line);
  cursor: pointer; text-align: left; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.pv-action:hover { transform: translateY(-1px); border-color: var(--pv-green-soft); box-shadow: 0 8px 18px rgba(26,29,33,.06); }
.pv-action-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #EAF7F1; color: var(--pv-green); }
.pv-action-ic svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-action-txt { min-width: 0; }
.pv-action-txt b { display: block; font-size: 13px; font-weight: 800; color: var(--pv-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-action-txt small { font-size: 11.5px; color: var(--pv-mut); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.pv-action-go { color: var(--pv-green); display: grid; place-items: center; }
.pv-action-go svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Snapshot ---- */
.pv-snap-list { display: flex; flex-direction: column; gap: 2px; }
.pv-snap-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--pv-line); }
.pv-snap-row:last-child { border-bottom: 0; }
.pv-snap-row > span { display: inline-flex; align-items: center; gap: 9px; font-size: 12.5px; font-weight: 600; color: var(--pv-mut); }
.pv-snap-row > span svg { width: 15px; height: 15px; fill: none; stroke: var(--pv-mut); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pv-snap-row > b { font-size: 13px; font-weight: 800; color: var(--pv-ink); }
.pv-badge { padding: 4px 10px; border-radius: 999px; background: #EAF7F1; color: var(--pv-green); font-size: 11.5px; }
.pv-snap-link {
  display: flex; align-items: center; justify-content: space-between; width: 100%; margin-top: 14px;
  padding: 12px 14px; border-radius: 13px; background: #F6FAF8; border: 1px solid var(--pv-line);
  cursor: pointer; font-size: 12.5px; font-weight: 800; color: var(--pv-ink);
  transition: border-color .16s ease, background-color .16s ease;
}
.pv-snap-link:hover { border-color: var(--pv-green-soft); background: #EFF8F4; }
.pv-snap-link svg { width: 16px; height: 16px; color: var(--pv-green); fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Responsive ---- */
@media (max-width: 1200px) {
  .pv-grid-3 { grid-template-columns: 1fr; }
  .pv-hero { grid-template-columns: 1fr; }
  .pv-gantt-row { grid-template-columns: 80px minmax(0, 1fr); }
  .pv-gantt-axis { padding-left: 80px; font-size: clamp(8px, 1.8vw, 10.5px); }
  .pv-gantt-lab { font-size: clamp(9px, 2vw, 11.5px); }
  .pv-gantt-plot { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .pv-gantt-track { min-width: 400px; }
}
@media (max-width: 720px) {
  .pv-kpi-strip { grid-template-columns: repeat(3, 1fr); row-gap: 14px; }
  .pv-kpi:nth-child(3)::after { display: none; }
  .pv-summary-body { grid-template-columns: 1fr; }
  .pv-gantt-foot { grid-template-columns: repeat(2, 1fr); row-gap: 12px; }
  .pv-gantt-row { grid-template-columns: 60px minmax(0, 1fr); }
  .pv-gantt-axis { padding-left: 60px; font-size: clamp(7px, 1.6vw, 9px); }
  .pv-gantt-lab { font-size: clamp(8px, 1.8vw, 10px); }
  .pv-gantt-track { min-height: 20px; }
  .pv-ms { width: 14px; height: 14px; }
}
@media (max-width: 480px) {
  .pv-gantt-foot { grid-template-columns: 1fr; }
  .pv-gantt-legend { gap: 10px; font-size: 10px; }
}

