/* Unified authenticated workspace shell.
   Page components stay in workspace-v2; this file owns header, rail and frame. */
body[data-scope="app"][data-auth] {
  --shell-navy: #071d33;
  --shell-navy-2: #0d2b48;
  --shell-blue: #2f668e;
  --shell-teal: #1f7a6d;
  --shell-ink: #10283e;
  --shell-muted: #687b8b;
  --shell-soft: #8a99a6;
  --shell-canvas: #edf2f5;
  --shell-line: #dce5ea;
  --shell-line-soft: #e9eef1;
  --shell-header-height: 64px;
  --shell-frame: 1440px;
  --shell-sidebar: 188px;
  min-height: 100vh;
  padding-top: 0 !important;
  overflow-x: clip;
  color: var(--shell-ink) !important;
  background: var(--shell-canvas) !important;
  font-family: "IBM Plex Sans", Arial, sans-serif !important;
  font-size: 13px;
  font-weight: 400 !important;
}

body[data-scope="app"][data-auth] *,
body[data-scope="app"][data-auth] *::before,
body[data-scope="app"][data-auth] *::after { box-sizing: border-box; }

body[data-scope="app"][data-auth] h1,
body[data-scope="app"][data-auth] h2,
body[data-scope="app"][data-auth] h3,
body[data-scope="app"][data-auth] h4,
body[data-scope="app"][data-auth] strong,
body[data-scope="app"][data-auth] b,
body[data-scope="app"][data-auth] .ui-title { font-weight: 400 !important; }

body[data-scope="app"][data-auth] a { color: inherit; }

/* Compact marketing-style header, shared with the dashboard. */
body[data-scope="app"][data-auth] .site-header {
  position: fixed !important;
  inset: 0 0 auto !important;
  z-index: 1100 !important;
  display: block !important;
  width: 100% !important;
  height: var(--shell-header-height) !important;
  min-height: var(--shell-header-height) !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  transform: none !important;
}

body[data-scope="app"][data-auth] .site-header .header-inner {
  display: grid !important;
  width: min(calc(100% - 36px), var(--shell-frame)) !important;
  max-width: var(--shell-frame) !important;
  height: var(--shell-header-height) !important;
  min-height: var(--shell-header-height) !important;
  margin-inline: auto !important;
  padding: 0 !important;
  grid-template-columns: var(--shell-sidebar) minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 24px !important;
  overflow: visible !important;
}

body[data-scope="app"][data-auth] .site-header .nav-toggle { display: none !important; }

body[data-scope="app"][data-auth] .site-header .logo {
  position: static !important;
  display: inline-flex !important;
  width: max-content !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  color: var(--shell-navy) !important;
  font-size: 21px !important;
  line-height: 1 !important;
  letter-spacing: -.045em !important;
  text-decoration: none !important;
}

body[data-scope="app"][data-auth] .site-header .logo::after {
  content: "BUSINESS" !important;
  display: inline-block !important;
  margin-left: 11px !important;
  padding-left: 11px !important;
  border-left: 1px solid #d7e0e6 !important;
  color: #718290 !important;
  font-size: 8px !important;
  line-height: 17px !important;
  letter-spacing: .14em !important;
}

body[data-scope="app"][data-auth] .dashboard-header-space { display: block !important; min-width: 0; }

body[data-scope="app"][data-auth] .site-header .header-actions {
  position: static !important;
  grid-column: 3 !important;
  display: flex !important;
  width: auto !important;
  height: 40px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 2px !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
}

body[data-scope="app"][data-auth] .notif-menu,
body[data-scope="app"][data-auth] .profile-menu {
  position: relative;
  z-index: 2;
  display: inline-flex;
  height: 40px;
  align-items: center;
  overflow: visible;
}

body[data-scope="app"][data-auth] .notif-trigger,
body[data-scope="app"][data-auth] .profile-trigger {
  position: relative !important;
  display: inline-flex !important;
  width: 36px !important;
  min-width: 36px !important;
  height: 36px !important;
  min-height: 36px !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #52697b !important;
  background: transparent !important;
  box-shadow: none !important;
  cursor: pointer;
}

body[data-scope="app"][data-auth] .notif-trigger:hover,
body[data-scope="app"][data-auth] .profile-trigger:hover { color: var(--shell-navy) !important; background: transparent !important; }
body[data-scope="app"][data-auth] .notif-ico,
body[data-scope="app"][data-auth] .profile-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
body[data-scope="app"][data-auth] .notif-ico svg { width: 18px; height: 18px; stroke-width: 1.55; }
body[data-scope="app"][data-auth] .profile-trigger { width: 38px !important; min-width: 38px !important; }
body[data-scope="app"][data-auth] .profile-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: #416983;
  background: #edf2f5;
}
body[data-scope="app"][data-auth] .profile-ico--initials { font-size: 10.5px; line-height: 1; letter-spacing: .045em; }
body[data-scope="app"][data-auth] .profile-trigger:hover .profile-ico,
body[data-scope="app"][data-auth] .profile-trigger[aria-expanded="true"] .profile-ico { color: #fff; background: var(--shell-navy-2); }
body[data-scope="app"][data-auth] .profile-caret,
body[data-scope="app"][data-auth] .profile-trigger__copy { display: none !important; }

body[data-scope="app"][data-auth] .notif-badge,
body[data-scope="app"][data-auth] .chat-badge {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border: 2px solid #fff;
  border-radius: 999px;
  color: #fff;
  background: #b74751;
  font-size: 9px;
  line-height: 12px;
  text-align: center;
}

body[data-scope="app"][data-auth] .notif-dropdown,
body[data-scope="app"][data-auth] .profile-dropdown {
  position: absolute !important;
  top: calc(100% + 8px) !important;
  right: 0 !important;
  bottom: auto !important;
  left: auto !important;
  z-index: 1300 !important;
  display: none;
  overflow: visible !important;
  border: 1px solid #e4eaee !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 16px 42px rgba(7, 29, 51, .12) !important;
  transform-origin: top right;
}
body[data-scope="app"][data-auth] .notif-dropdown { width: 310px !important; }
body[data-scope="app"][data-auth] .profile-dropdown { width: 272px !important; }
body[data-scope="app"][data-auth] .notif-dropdown.open,
body[data-scope="app"][data-auth] .profile-dropdown.open { display: block; animation: workspace-menu-in 150ms ease-out both; }

@keyframes workspace-menu-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

body[data-scope="app"][data-auth] .notif-head {
  display: flex;
  min-height: 52px;
  padding: 0 16px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--shell-line-soft);
  color: var(--shell-navy);
  font-size: 13px;
}
body[data-scope="app"][data-auth] .notif-head__icon { display: inline-flex; color: var(--shell-blue); line-height: 0; }
body[data-scope="app"][data-auth] .notif-head__icon svg { width: 17px; height: 17px; stroke-width: 1.55; }
body[data-scope="app"][data-auth] .notif-list { max-height: 360px; overflow-y: auto; }
body[data-scope="app"][data-auth] .notif-empty { display: grid; min-height: 148px; padding: 23px 22px 25px; place-items: center; align-content: center; gap: 6px; color: var(--shell-muted); text-align: center; }
body[data-scope="app"][data-auth] .notif-empty__icon { display: inline-flex; margin-bottom: 3px; color: #6f899b; line-height: 0; }
body[data-scope="app"][data-auth] .notif-empty__icon svg { width: 23px; height: 23px; stroke-width: 1.4; }
body[data-scope="app"][data-auth] .notif-empty__title { color: var(--shell-navy); font-size: 12.5px; }
body[data-scope="app"][data-auth] .notif-empty__text { font-size: 10.5px; }
body[data-scope="app"][data-auth] .notif-item { display: grid; padding: 13px 15px; grid-template-columns: 9px minmax(0, 1fr); gap: 9px; border-bottom: 1px solid var(--shell-line-soft); color: inherit; background: transparent; text-decoration: none; }
body[data-scope="app"][data-auth] .notif-item:hover { background: #f7f9fa; }
body[data-scope="app"][data-auth] .notif-dot { width: 5px; height: 5px; margin-top: 6px; border-radius: 50%; background: var(--shell-blue); }
body[data-scope="app"][data-auth] .notif-title { color: var(--shell-navy); font-size: 11.5px; line-height: 1.35; }
body[data-scope="app"][data-auth] .notif-text { margin-top: 3px; color: var(--shell-muted); font-size: 10px; line-height: 1.45; }
body[data-scope="app"][data-auth] .notif-time { margin-top: 6px; color: var(--shell-soft); font-size: 9px; }

body[data-scope="app"][data-auth] .profile-head--dashboard {
  display: grid !important;
  min-height: 70px;
  padding: 13px 15px !important;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  border-bottom: 1px solid var(--shell-line-soft);
  background: transparent !important;
}
body[data-scope="app"][data-auth] .profile-head__avatar { display: inline-grid; width: 34px; height: 34px; place-items: center; border-radius: 50%; color: #fff; background: var(--shell-navy-2); font-size: 10.5px; letter-spacing: .045em; }
body[data-scope="app"][data-auth] .profile-head__copy { min-width: 0; }
body[data-scope="app"][data-auth] .profile-name { color: var(--shell-navy); font-size: 12px; line-height: 1.3; }
body[data-scope="app"][data-auth] .profile-meta { margin-top: 2px; overflow: hidden; color: var(--shell-muted); font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }
body[data-scope="app"][data-auth] .profile-dropdown > .menu-item,
body[data-scope="app"][data-auth] .profile-dropdown > .lang-picker > .menu-item { min-height: 41px; padding: 9px 15px; gap: 10px; color: #304b60; font-size: 11.5px; }
body[data-scope="app"][data-auth] .profile-dropdown .menu-item:hover { color: var(--shell-navy); background: #f7f9fa !important; }
body[data-scope="app"][data-auth] .profile-dropdown .menu-item .mi-ico { width: 18px; color: #718695; }
body[data-scope="app"][data-auth] .profile-dropdown .menu-item .mi-ico svg { width: 15px; height: 15px; stroke-width: 1.5; }
body[data-scope="app"][data-auth] .profile-dropdown .menu-divider { background: var(--shell-line-soft); }
body[data-scope="app"][data-auth] .profile-dropdown .logout { color: #85515a; }
body[data-scope="app"][data-auth] .profile-dropdown .lang-dropdown { top: auto !important; right: calc(100% + 8px) !important; bottom: 0 !important; left: auto !important; width: 190px; border: 1px solid #e4eaee !important; border-radius: 10px !important; box-shadow: 0 14px 34px rgba(7, 29, 51, .11) !important; }

/* Dashboard-sized frame and rail. */
body[data-scope="app"][data-auth] .workspace-frame {
  display: grid !important;
  width: min(calc(100% - 36px), var(--shell-frame)) !important;
  max-width: var(--shell-frame) !important;
  min-height: calc(100vh - var(--shell-header-height));
  margin: var(--shell-header-height) auto 0 !important;
  padding: 22px 0 44px !important;
  grid-template-columns: var(--shell-sidebar) minmax(0, 1fr) !important;
  align-items: start;
  gap: 52px !important;
}

body[data-scope="app"][data-auth] .workspace-sidebar {
  position: static !important;
  top: auto !important;
  left: auto !important;
  z-index: 10;
  display: block !important;
  width: auto !important;
  min-width: 0;
  max-height: none;
  margin: 0 !important;
  padding: 4px 0 24px !important;
  overflow: visible;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body[data-scope="app"][data-auth] .workspace-sidebar__context { position: relative; display: block; margin-bottom: 28px; }
body[data-scope="app"][data-auth] .workspace-sidebar__context-copy { display: grid; gap: 4px; }
body[data-scope="app"][data-auth] .workspace-sidebar__close { display: none; }
body[data-scope="app"][data-auth] .workspace-sidebar__eyebrow,
body[data-scope="app"][data-auth] .workspace-nav-section__title { color: #778895; font-size: 9.5px; line-height: 1.35; letter-spacing: .13em; text-transform: uppercase; }
body[data-scope="app"][data-auth] .workspace-sidebar__title { color: var(--shell-navy); font-size: 19px; line-height: 1.2; letter-spacing: -.025em; }
body[data-scope="app"][data-auth] .workspace-sidebar__path { color: var(--shell-blue); font-size: 11.5px; }
body[data-scope="app"][data-auth] .workspace-sidebar__nav { display: grid; gap: 20px; }
body[data-scope="app"][data-auth] .workspace-nav-section__title { margin-bottom: 7px; padding: 0 12px; }

body[data-scope="app"][data-auth] .workspace-sidebar .nav {
  position: static !important;
  inset: auto !important;
  display: grid !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  gap: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  transform: none !important;
}

body[data-scope="app"][data-auth] .workspace-sidebar .nav-link {
  position: relative;
  display: flex !important;
  width: 100% !important;
  min-height: 40px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 11px !important;
  border: 0 !important;
  border-radius: 4px !important;
  color: #647787 !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  text-decoration: none !important;
}
body[data-scope="app"][data-auth] .workspace-sidebar .nav-link:hover { color: var(--shell-navy) !important; background: #eaf0f3 !important; }
body[data-scope="app"][data-auth] .workspace-sidebar .nav-link.active { color: var(--shell-navy) !important; background: #e3ebf0 !important; box-shadow: inset 2px 0 0 var(--shell-blue) !important; }
body[data-scope="app"][data-auth] .workspace-sidebar .nav-link::before,
body[data-scope="app"][data-auth] .workspace-sidebar .nav-link::after { display: none !important; }
body[data-scope="app"][data-auth] .workspace-sidebar .nav-ico { display: inline-flex !important; width: 17px !important; height: 17px !important; flex: 0 0 17px; align-items: center; justify-content: center; color: #82929e !important; background: transparent !important; }
body[data-scope="app"][data-auth] .workspace-sidebar .nav-link:hover .nav-ico,
body[data-scope="app"][data-auth] .workspace-sidebar .nav-link.active .nav-ico { color: var(--shell-blue) !important; }
body[data-scope="app"][data-auth] .workspace-sidebar .nav-ico svg { width: 17px !important; height: 17px !important; stroke-width: 1.5; }
body[data-scope="app"][data-auth] .workspace-sidebar .chat-badge { position: static; width: 6px; min-width: 6px; height: 6px; margin-left: auto; padding: 0; border: 0; color: transparent; background: #b74751; font-size: 0; line-height: 0; }

body[data-scope="app"][data-auth] .nav-scrim { display: none; }
body[data-scope="app"][data-auth] main.page-content { width: 100% !important; min-width: 0; margin: 0 !important; padding: 0 !important; background: transparent !important; }
body[data-scope="app"][data-auth] main.page-content::before { display: none !important; }
body[data-scope="app"][data-auth] main.page-content > .container { width: 100% !important; max-width: 1200px !important; margin: 0 auto !important; padding: 0 !important; }
body[data-scope="app"][data-auth] main.page-content > .container > .page-content,
body[data-scope="app"][data-auth] main.page-content > .container > .page-content > .container { width: 100% !important; max-width: none !important; margin: 0 !important; padding: 0 !important; }

body[data-scope="app"][data-auth] .page-titlebar,
body[data-scope="app"][data-auth] .page-head { margin: 4px 0 0 !important; }
body[data-scope="app"][data-auth] .page-titlebar .ui-title,
body[data-scope="app"][data-auth] .page-head .ui-title { color: var(--shell-navy) !important; font-size: clamp(24px, 2.2vw, 29px) !important; line-height: 1.12 !important; letter-spacing: -.035em !important; }
body[data-scope="app"][data-auth] .page-titlebar .title-ico,
body[data-scope="app"][data-auth] .page-head .title-ico { display: none !important; }
body[data-scope="app"][data-auth] .page-subhead { margin: 8px 0 20px !important; }
body[data-scope="app"][data-auth] .page-intro { color: var(--shell-muted) !important; font-size: 11.5px !important; line-height: 1.55 !important; }

body[data-scope="app"][data-auth] footer.site-footer-v2 { width: 100% !important; margin-left: 0 !important; }

@media (max-width: 1220px) {
  body[data-scope="app"][data-auth] .workspace-frame,
  body[data-scope="app"][data-auth] .site-header .header-inner { width: min(calc(100% - 28px), var(--shell-frame)) !important; gap: 18px !important; }
}

@media (min-width: 1600px) {
  body[data-scope="app"][data-auth] .site-header .header-inner {
    width: min(calc(100% - 36px), calc(var(--shell-frame) + 96px)) !important;
    max-width: calc(var(--shell-frame) + 96px) !important;
  }
  body[data-scope="app"][data-auth] .workspace-sidebar {
    margin-left: -48px !important;
  }
}

@media (max-width: 900px) {
  body[data-scope="app"][data-auth] { --shell-header-height: 56px; font-size: 12.5px; }
  body[data-scope="app"][data-auth] .site-header .header-inner { width: calc(100% - 24px) !important; grid-template-columns: 38px minmax(0, 1fr) auto !important; gap: 4px !important; }
  body[data-scope="app"][data-auth] .site-header .nav-toggle { display: inline-flex !important; width: 38px; height: 38px; min-height: 38px !important; padding: 0 !important; align-items: center; justify-content: center; border: 0 !important; border-radius: 0 !important; color: var(--shell-navy) !important; background: transparent !important; box-shadow: none !important; }
  body[data-scope="app"][data-auth] .site-header .nav-toggle .hamburger { width: 19px; height: 14px; }
  body[data-scope="app"][data-auth] .site-header .nav-toggle .hamburger span { height: 1px; background: currentColor; }
  body[data-scope="app"][data-auth] .site-header .logo { grid-column: 2; min-height: 38px !important; font-size: 18.5px !important; }
  body[data-scope="app"][data-auth] .site-header .logo::after { display: none !important; }
  body[data-scope="app"][data-auth] .dashboard-header-space { display: none !important; }
  body[data-scope="app"][data-auth] .site-header .header-actions { grid-column: 3 !important; height: 38px !important; gap: 0 !important; }
  body[data-scope="app"][data-auth] .notif-menu,
  body[data-scope="app"][data-auth] .profile-menu { height: 38px; }
  body[data-scope="app"][data-auth] .notif-trigger,
  body[data-scope="app"][data-auth] .profile-trigger { width: 34px !important; min-width: 34px !important; height: 34px !important; min-height: 34px !important; }
  body[data-scope="app"][data-auth] .profile-ico { width: 30px; height: 30px; }

  body[data-scope="app"][data-auth] .workspace-frame { display: block !important; width: 100% !important; min-height: calc(100vh - var(--shell-header-height)); margin-top: var(--shell-header-height) !important; padding: 16px 12px 32px !important; }
  body[data-scope="app"][data-auth] main.page-content > .container { max-width: 720px !important; }
  body[data-scope="app"][data-auth] .workspace-sidebar {
    position: fixed !important;
    inset: var(--shell-header-height) auto 0 0 !important;
    z-index: 1085;
    width: min(304px, calc(100vw - 42px)) !important;
    max-height: none;
    padding: 20px 14px 28px !important;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff !important;
    margin: 0 !important;
    transform: translateX(-105%) !important;
    transition: transform 210ms ease;
  }
  html.nav-open body[data-scope="app"][data-auth] .workspace-sidebar { transform: translateX(0) !important; }
  body[data-scope="app"][data-auth] .workspace-sidebar__context { margin-bottom: 21px; padding: 2px 42px 0 8px; }
  body[data-scope="app"][data-auth] .workspace-sidebar__title { font-size: 18px; }
  body[data-scope="app"][data-auth] .workspace-sidebar__nav { gap: 16px; }
  body[data-scope="app"][data-auth] .workspace-nav-section__title { margin-bottom: 5px; padding-inline: 10px; }
  body[data-scope="app"][data-auth] .workspace-sidebar__close { position: absolute; top: -4px; right: 2px; display: inline-flex; width: 36px; height: 36px; padding: 0; align-items: center; justify-content: center; border: 0; border-radius: 0; color: #62798a; background: transparent; }
  body[data-scope="app"][data-auth] .workspace-sidebar__close svg { width: 19px; height: 19px; stroke-width: 1.5; }
  body[data-scope="app"][data-auth] .workspace-sidebar .nav-link { min-height: 43px !important; padding-inline: 10px !important; }
  body[data-scope="app"][data-auth] .nav-scrim { position: fixed; inset: var(--shell-header-height) 0 0; z-index: 1080; display: block; background: rgba(6, 26, 46, .32); }
  body[data-scope="app"][data-auth] .nav-scrim[hidden] { display: none; }
  html.nav-open body[data-scope="app"][data-auth] .nav-scrim { display: block; }

  body[data-scope="app"][data-auth] .page-titlebar,
  body[data-scope="app"][data-auth] .page-head { margin-top: 0 !important; }
  body[data-scope="app"][data-auth] .page-titlebar .ui-title,
  body[data-scope="app"][data-auth] .page-head .ui-title { font-size: clamp(22px, 4vw, 27px) !important; overflow-wrap: anywhere; }
  body[data-scope="app"][data-auth] .page-subhead { margin-bottom: 16px !important; gap: 12px !important; }
}

@media (max-width: 680px) {
  body[data-scope="app"][data-auth] .workspace-frame { padding: 13px 10px 28px !important; }
  body[data-scope="app"][data-auth] .page-titlebar .ui-title,
  body[data-scope="app"][data-auth] .page-head .ui-title { font-size: clamp(21px, 6vw, 24px) !important; }
  body[data-scope="app"][data-auth] .page-subhead { align-items: flex-start !important; flex-direction: column; }
  body[data-scope="app"][data-auth] .page-actions { width: 100%; }
}

@media (max-width: 440px) {
  body[data-scope="app"][data-auth] .site-header .header-inner { width: calc(100% - 16px) !important; }
  body[data-scope="app"][data-auth] .site-header .logo { font-size: 17.5px !important; }
  body[data-scope="app"][data-auth] .notif-dropdown,
  body[data-scope="app"][data-auth] .profile-dropdown { position: fixed !important; top: calc(var(--shell-header-height) - 1px) !important; right: 8px !important; left: auto !important; width: calc(100vw - 16px) !important; max-width: 324px; }
  body[data-scope="app"][data-auth] .profile-dropdown .lang-dropdown {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    width: 100% !important;
    max-height: calc(100vh - var(--shell-header-height) - 16px);
  }
}

@media (prefers-reduced-motion: reduce) {
  body[data-scope="app"][data-auth] *,
  body[data-scope="app"][data-auth] *::before,
  body[data-scope="app"][data-auth] *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
