/* Isolated local preview for the Hub app launcher. */
@media screen {
  body.hub-shell-ready[data-view] .hub-brand {
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 4px;
    padding-top: 10px;
  }

  body.hub-shell-ready[data-view] .hub-brand-mark {
    position: relative;
    display: block;
    width: 50px;
    height: 50px;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    background: #f5f7fa;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  body.hub-shell-ready[data-view] .hub-brand-mark .brand-logo {
    position: absolute;
    top: -14px;
    left: -28px;
    width: 112px !important;
    height: 112px !important;
    max-width: none !important;
    max-height: none !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    object-fit: contain !important;
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view] .hub-brand-product {
    display: block !important;
    margin: 0 !important;
    color: #f8fafc;
    font-size: calc(13px * var(--hub-ui-scale, 1));
    font-weight: 780;
    line-height: 1;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  body.hub-shell-ready[data-view] .hub-brand-product span {
    display: inline !important;
    color: #4f8ee8;
    font-weight: 650;
    font-size: inherit !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
  }

  body.hub-shell-ready[data-view] .hub-brand .brand-title {
    margin-top: 1px;
    color: #f5a400;
    font-size: calc(9px * var(--hub-ui-scale, 1));
    letter-spacing: 0;
    text-transform: uppercase;
  }

  body.hub-shell-ready[data-view="dashboard"] .content {
    background:
      linear-gradient(135deg, rgba(10, 13, 18, 0.96), rgba(16, 19, 25, 0.92)),
      var(--customer-bg-image);
  }

  body.hub-shell-ready[data-view="dashboard"] #dashboardView {
    display: grid;
    gap: 18px;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head,
  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-head,
  body.hub-shell-ready[data-view="dashboard"] .app-catalog-heading,
  body.hub-shell-ready[data-view="dashboard"] .app-tile-group-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    padding: 6px 2px 0;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-customer-slot {
    min-width: 0;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head h2,
  body.hub-shell-ready[data-view="dashboard"] .app-catalog-heading h2,
  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access h2 {
    margin: 2px 0 0;
    color: #f8fafc;
    letter-spacing: 0;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head h2 {
    font-size: calc(24px * var(--hub-ui-scale, 1));
    line-height: 1.16;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head p {
    margin: 4px 0 0;
    color: #98a2b3;
    font-size: calc(13px * var(--hub-ui-scale, 1));
  }

  body.hub-shell-ready[data-view="dashboard"] .eyebrow {
    color: #f5a400;
    font-size: calc(10px * var(--hub-ui-scale, 1));
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-customer-context.sidebar-customer-picker {
    display: none !important;
  }

  html body.hub-shell-ready[data-view="dashboard"] main.content > header.topbar {
    min-height: 48px !important;
    height: 48px !important;
    margin-bottom: 12px;
    padding: 6px 10px !important;
    border-color: rgba(148, 163, 184, 0.2) !important;
    background: #11161e !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view="dashboard"] .topbar-actions [data-hub-tenant],
  body.hub-shell-ready[data-view="dashboard"] .topbar-actions #hubStatus {
    display: none !important;
  }

  body.hub-shell-ready[data-view="dashboard"] .topbar-actions {
    justify-content: flex-end !important;
  }

  body.hub-shell-ready[data-view="dashboard"] #sessionStatus.account-chip {
    display: flex !important;
    align-items: center;
    gap: 7px;
    min-width: 154px;
    min-height: 36px;
    padding: 4px 9px 4px 5px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #1a212b;
    color: #f8fafc;
    box-shadow: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .account-chip-avatar {
    display: grid;
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    place-items: center;
    border-radius: 6px;
    background: #263247;
    color: #f5a400;
    font-size: calc(11px * var(--hub-ui-scale, 1));
    font-weight: 800;
  }

  body.hub-shell-ready[data-view="dashboard"] .account-chip-copy {
    display: grid;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 6px;
    line-height: 1.05;
  }

  body.hub-shell-ready[data-view="dashboard"] .account-chip-copy small {
    grid-column: 1 / -1;
    color: #8f9bad;
    font-size: calc(8px * var(--hub-ui-scale, 1));
    font-weight: 650;
    text-transform: uppercase;
  }

  body.hub-shell-ready[data-view="dashboard"] .account-chip-copy strong {
    overflow: hidden;
    color: #f8fafc;
    font-size: calc(10.5px * var(--hub-ui-scale, 1));
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.hub-shell-ready[data-view="dashboard"] .account-chip-role {
    align-self: end;
    color: #aab4c3;
    font-size: calc(9px * var(--hub-ui-scale, 1));
    white-space: nowrap;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 12px !important;
    align-items: center !important;
    gap: 10px !important;
    width: clamp(250px, 25vw, 340px);
    min-width: 0;
    min-height: 54px;
    height: 58px !important;
    margin: 0 !important;
    padding: 7px 12px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(18, 23, 31, 0.9);
    box-shadow: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer:hover {
    border-color: rgba(245, 164, 0, 0.72);
    background: #171c24;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    transform: rotate(45deg) translateY(-2px);
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer-logo {
    width: 38px;
    height: 38px;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer-placeholder {
    display: grid;
    width: 100%;
    height: 100%;
    place-items: center;
    border-radius: 6px;
    background: #263142;
    color: #dce7f6;
    font-size: 13px;
    font-weight: 750;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer-copy {
    min-width: 0;
    text-align: left !important;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer-copy small {
    color: #8f9bad;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-header-customer-copy strong {
    color: #f8fafc;
    font-size: calc(13px * var(--hub-ui-scale, 1));
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-launcher-toolbar {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-launcher-search {
    position: relative;
    display: block;
    width: 100%;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-launcher-search .sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-launcher-search::before {
    content: "⌕";
    position: absolute;
    z-index: 1;
    left: 15px;
    top: 50%;
    transform: translateY(-54%);
    color: #8f9bad;
    font-size: 22px;
    pointer-events: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-launcher-search input {
    min-height: 48px;
    padding: 0 16px 0 44px;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: rgba(20, 25, 34, 0.92);
    color: #f8fafc;
    font-size: calc(13px * var(--hub-ui-scale, 1));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  }

  body.hub-shell-ready[data-view="dashboard"] .app-launcher-search input:focus {
    border-color: rgba(245, 164, 0, 0.75);
    outline: 3px solid rgba(245, 164, 0, 0.14);
  }

  body.hub-shell-ready[data-view="dashboard"] #appList {
    display: grid;
    gap: 18px;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access,
  body.hub-shell-ready[data-view="dashboard"] .app-tile-group {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    border-radius: 8px;
    background: rgba(22, 27, 36, 0.9);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-head h2,
  body.hub-shell-ready[data-view="dashboard"] .app-catalog-heading h2 {
    font-size: calc(17px * var(--hub-ui-scale, 1));
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-head small,
  body.hub-shell-ready[data-view="dashboard"] .app-catalog-heading > span {
    color: #8f9bad;
    font-size: calc(11px * var(--hub-ui-scale, 1));
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-head small {
    display: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
    gap: 10px;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card {
    position: relative;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 14px;
    align-items: center;
    gap: 10px;
    min-height: 76px;
    padding: 11px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #1c222c;
    transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card:hover {
    border-color: rgba(245, 164, 0, 0.62);
    background: #232a35;
    transform: translateY(-1px);
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card-link {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card-link:focus-visible {
    outline: 2px solid #f5a400;
    outline-offset: 2px;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card .app-logo,
  body.hub-shell-ready[data-view="dashboard"] .app-tile-group .hub-app-card .app-logo {
    width: 42px !important;
    height: 42px !important;
    display: grid;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--group-accent, #f5a400) 52%, transparent) !important;
    border-radius: 8px;
    background: color-mix(in srgb, var(--group-accent, #f5a400) 16%, #1a2029) !important;
    color: var(--group-accent, #f5a400);
    filter: none;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card .app-logo svg,
  body.hub-shell-ready[data-view="dashboard"] .app-tile-group .hub-app-card .app-logo svg {
    width: 100% !important;
    height: 100% !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card strong,
  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card span {
    display: block;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card strong {
    color: #f8fafc;
    font-size: calc(12px * var(--hub-ui-scale, 1));
    line-height: 1.25;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-card div > span {
    margin-top: 3px;
    color: #98a2b3;
    font-size: calc(10px * var(--hub-ui-scale, 1));
    line-height: 1.25;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-quick-arrow {
    color: #8f9bad;
    font-size: 20px;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-catalog-heading {
    padding: 4px 2px 0;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-tile-group {
    border-left: 3px solid var(--group-accent, #f5a400);
  }

  body.hub-shell-ready[data-view="dashboard"] .app-tile-group-head {
    margin: 0;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-tile-group-head h3 {
    margin: 0;
    color: #f8fafc;
    font-size: calc(14px * var(--hub-ui-scale, 1));
    font-weight: 700;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-tile-group-head p {
    margin: 3px 0 0;
    color: #8f9bad;
    font-size: calc(11px * var(--hub-ui-scale, 1));
  }

  body.hub-shell-ready[data-view="dashboard"] .app-tile-group-head > span {
    min-width: 26px;
    min-height: 24px;
    border: 1px solid rgba(148, 163, 184, 0.22);
    background: #11161d;
    color: #cbd5e1;
    font-size: calc(11px * var(--hub-ui-scale, 1));
  }

  body.hub-shell-ready[data-view="dashboard"] .app-tile-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-row.hub-app-card {
    position: relative;
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) 16px !important;
    grid-template-rows: 1fr !important;
    align-items: center;
    place-items: initial;
    gap: 10px;
    width: 100%;
    min-width: 0;
    min-height: 78px !important;
    height: 74px !important;
    aspect-ratio: auto;
    padding: 10px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    background: #1a2029;
    text-align: left;
    box-shadow: none;
    align-content: center !important;
    justify-items: initial !important;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-row.hub-app-card::after {
    content: "›";
    grid-column: 3;
    color: #8f9bad;
    font-size: 20px;
    text-align: center;
  }

  body.hub-shell-ready[data-view="dashboard"] .app-row.hub-app-card:hover {
    border-color: var(--group-accent, #f5a400);
    background: #222933;
    box-shadow: none;
    transform: translateY(-1px);
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .app-logo {
    grid-column: 1;
    grid-row: 1;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .app-title {
    grid-column: 2;
    grid-row: 1;
    width: 100% !important;
    max-width: none !important;
    min-width: 0;
    text-align: left;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .app-title strong {
    display: block;
    color: #f8fafc;
    font-size: calc(12px * var(--hub-ui-scale, 1));
    font-weight: 680;
    line-height: 1.25;
    text-shadow: none;
    white-space: normal;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .app-title span {
    display: block;
    margin-top: 3px;
    color: #98a2b3;
    font-size: calc(10px * var(--hub-ui-scale, 1));
    font-weight: 450;
    line-height: 1.25;
    white-space: normal;
  }

  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .tag-strip,
  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .state,
  body.hub-shell-ready[data-view="dashboard"] .hub-app-card .row-actions {
    display: none !important;
  }

  @media (max-width: 1440px) {
    body.hub-shell-ready[data-view="dashboard"] .app-tile-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }
  }

  @media (max-width: 1200px) and (min-width: 1101px) {
    body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-grid {
      grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    }

    body.hub-shell-ready[data-view="dashboard"] .app-tile-grid {
      grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
  }

  @media (max-width: 1100px) {
    body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-grid,
    body.hub-shell-ready[data-view="dashboard"] .app-tile-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-header-customer {
      width: min(300px, 36vw);
    }
  }

  @media (max-width: 760px) {
    body.hub-shell-ready[data-view="dashboard"] .hub-customer-context.sidebar-customer-picker {
      display: none !important;
    }

    body.hub-shell-ready[data-view="dashboard"] .topbar-actions .hub-header-context {
      display: none !important;
    }

    body.hub-shell-ready[data-view="dashboard"] #sessionStatus.account-chip {
      min-width: 96px;
      max-width: 116px;
      padding-right: 7px;
    }

    body.hub-shell-ready[data-view="dashboard"] .account-chip-copy {
      display: block;
      overflow: hidden;
    }

    body.hub-shell-ready[data-view="dashboard"] .account-chip-copy small,
    body.hub-shell-ready[data-view="dashboard"] .account-chip-role {
      display: none;
    }

    body.hub-shell-ready[data-view="dashboard"] .topbar-actions {
      justify-content: flex-end !important;
    }

    html body.hub-shell-ready[data-view="dashboard"] main.content > header.topbar {
      min-height: 48px !important;
      height: 48px !important;
      padding: 6px 8px !important;
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-header-customer {
      width: 100%;
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head {
      grid-template-columns: minmax(0, 1fr);
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-quick-access,
    body.hub-shell-ready[data-view="dashboard"] .app-tile-group {
      padding: 12px;
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-grid,
    body.hub-shell-ready[data-view="dashboard"] .app-tile-grid {
      grid-template-columns: minmax(0, 1fr) !important;
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-head,
    body.hub-shell-ready[data-view="dashboard"] .app-catalog-heading,
    body.hub-shell-ready[data-view="dashboard"] .app-tile-group-head {
      align-items: flex-start;
    }

    body.hub-shell-ready[data-view="dashboard"] .hub-quick-access-head small {
      display: none;
    }
  }

  @media (min-width: 761px) {
    body.hub-shell-ready[data-view="dashboard"] .app-tile-grid {
      grid-template-columns: repeat(auto-fill, minmax(210px, 250px)) !important;
      justify-content: start;
    }
  }
}

/* Shared clean Hub shell. The launcher established the visual contract; all
   other Hub workspaces now use the same quiet header and graphite surfaces. */
@media screen {
  body.hub-shell-ready[data-view] .content {
    background:
      linear-gradient(135deg, rgba(12, 16, 22, 0.98), rgba(17, 22, 30, 0.96)),
      var(--customer-bg-image) !important;
  }

  html body.hub-shell-ready[data-view] main.content > header.topbar {
    display: flex !important;
    min-height: 48px !important;
    height: 48px !important;
    max-height: 48px !important;
    margin: 0 0 14px !important;
    padding: 6px 10px !important;
    overflow: hidden !important;
    border: 1px solid rgba(148, 163, 184, 0.2) !important;
    border-radius: 8px !important;
    background: #11161e !important;
    box-shadow: none !important;
  }

  html body.hub-shell-ready[data-view] main.content > header.topbar::before,
  html body.hub-shell-ready[data-view] main.content > header.topbar::after,
  html body.hub-shell-ready[data-view] main.content > header.topbar > div:first-child {
    display: none !important;
  }

  body.hub-shell-ready[data-view] .topbar-actions {
    position: static !important;
    display: flex !important;
    width: 100% !important;
    max-width: none !important;
    min-height: 36px !important;
    margin-left: auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    gap: 7px !important;
    transform: none !important;
  }

  body.hub-shell-ready[data-view] .topbar-actions [data-hub-tenant],
  body.hub-shell-ready[data-view] .topbar-actions #hubStatus,
  body.hub-shell-ready[data-view] .topbar-actions .hub-back-button,
  body.hub-shell-ready[data-view] .hub-customer-context.sidebar-customer-picker,
  html body.hub-shell-ready[data-view] main.content > header.topbar > .hub-header-customer {
    display: none !important;
  }

  body.hub-shell-ready[data-view] #sessionStatus.account-chip {
    display: flex !important;
    align-items: center !important;
    gap: 7px !important;
    min-width: 154px !important;
    min-height: 36px !important;
    padding: 4px 9px 4px 5px !important;
    border: 1px solid rgba(148, 163, 184, 0.28) !important;
    border-radius: 8px !important;
    background: #1a212b !important;
    color: #f8fafc !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view] .account-chip-avatar {
    display: grid !important;
    width: 27px !important;
    height: 27px !important;
    flex: 0 0 27px !important;
    place-items: center !important;
    border-radius: 6px !important;
    background: #263247 !important;
    color: #f5a400 !important;
  }

  body.hub-shell-ready[data-view] .account-chip-copy {
    display: grid !important;
    min-width: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    column-gap: 6px !important;
    line-height: 1.05 !important;
  }

  body.hub-shell-ready[data-view] .account-chip-copy small {
    grid-column: 1 / -1 !important;
    color: #8f9bad !important;
    font-size: calc(8px * var(--hub-ui-scale, 1)) !important;
    text-transform: uppercase !important;
  }

  body.hub-shell-ready[data-view] .account-chip-copy strong {
    overflow: hidden !important;
    color: #f8fafc !important;
    font-size: calc(10.5px * var(--hub-ui-scale, 1)) !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  body.hub-shell-ready[data-view] .account-chip-role {
    align-self: end !important;
    color: #aab4c3 !important;
    font-size: calc(9px * var(--hub-ui-scale, 1)) !important;
    white-space: nowrap !important;
  }

  body.hub-shell-ready[data-view] .workspace.view {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view] .workspace.view.active {
    gap: 16px;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 58px;
    margin: 0;
    padding: 4px 2px 8px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head > div:first-child {
    min-width: 0;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head h2 {
    margin: 2px 0 0;
    color: #f8fafc;
    font-size: calc(22px * var(--hub-ui-scale, 1));
    line-height: 1.16;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head p {
    margin: 4px 0 0;
    color: #98a2b3;
    font-size: calc(12px * var(--hub-ui-scale, 1));
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head .hub-header-customer,
  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head .hub-header-customer {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) 12px !important;
    align-items: center !important;
    gap: 10px !important;
    width: clamp(250px, 25vw, 340px) !important;
    min-width: 0 !important;
    min-height: 54px !important;
    height: 58px !important;
    margin: 0 !important;
    padding: 7px 12px !important;
    border: 1px solid rgba(148, 163, 184, 0.34) !important;
    border-radius: 8px !important;
    background: rgba(18, 23, 31, 0.92) !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head .hub-header-customer::after,
  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head .hub-header-customer::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 2px solid #cbd5e1;
    border-bottom: 2px solid #cbd5e1;
    transform: rotate(45deg) translateY(-2px);
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head .hub-header-customer:hover {
    border-color: rgba(245, 164, 0, 0.72) !important;
    background: #171c24 !important;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head .hub-header-customer-logo,
  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head .hub-header-customer-logo {
    width: 38px !important;
    height: 38px !important;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head .hub-header-customer-copy strong,
  body.hub-shell-ready[data-view="dashboard"] .hub-app-page-head .hub-header-customer-copy strong {
    color: #f8fafc !important;
    font-size: calc(13px * var(--hub-ui-scale, 1)) !important;
  }

  body.hub-shell-ready[data-view] .workspace.view :is(
    .customer-editor-card,
    .customer-workspace-tabs,
    .settings-panel,
    .backup-action-card,
    .backup-overview-card,
    .backup-status-panel,
    .operations-overview,
    .operations-panel,
    .legal-hub-card
  ) {
    border-color: rgba(148, 163, 184, 0.2) !important;
    border-radius: 8px !important;
    background: rgba(22, 27, 36, 0.94) !important;
    box-shadow: none !important;
  }

  html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready[data-view] #settingsView :is(
    .settings-panel,
    .tenant-create-panel,
    .tenant-row,
    .user-row,
    .user-access-panel,
    .role-permission-preview,
    .ai-gateway-block,
    .ai-profile-card,
    .doc-panel,
    .import-panel
  ) {
    border-color: rgba(148, 163, 184, 0.2) !important;
    background: #161b24 !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view] :is(.sidebar-card, .legal-hub-card, .legal-frame-shell) {
    border-color: rgba(148, 163, 184, 0.2) !important;
    background: #161b24 !important;
    background-image: none !important;
    box-shadow: none !important;
  }

  body.hub-shell-ready[data-view] .legal-hub-links a {
    border-color: rgba(148, 163, 184, 0.24) !important;
    border-radius: 7px !important;
    background: #1a212b !important;
    background-image: none !important;
    box-shadow: none !important;
  }
}

@media screen and (max-width: 760px) {
  html body.hub-shell-ready[data-view] main.content > header.topbar {
    min-height: 52px !important;
    height: 52px !important;
    max-height: 52px !important;
  }

  body.hub-shell-ready[data-view] #sessionStatus.account-chip {
    min-width: 36px !important;
    width: 36px !important;
    padding: 4px !important;
  }

  body.hub-shell-ready[data-view] .account-chip-copy {
    display: none !important;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  body.hub-shell-ready[data-view] .workspace.view > .section-head .hub-header-customer {
    width: 100% !important;
  }
}
