.hub-shell-header {
  position: relative;
  top: auto;
  z-index: 30;
  min-height: clamp(92px, 8vw, 126px);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  border: 1.5px solid rgba(245, 164, 0, 0.78);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.03), rgba(0, 0, 0, 0.58)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.56), transparent 38%, rgba(0, 0, 0, 0.48)),
    var(--hub-page-header-image, var(--hub-shell-header-image, url("/assets/audit-cover-banner-default.jpg")));
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.2),
    0 14px 38px rgba(0, 0, 0, 0.36),
    0 0 24px rgba(245, 164, 0, 0.16);
  padding: 0;
  margin-bottom: 10px;
}

.hub-shell-header::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 194, 71, 0.16), transparent 46%),
    linear-gradient(90deg, rgba(245, 164, 0, 0.18), transparent 22%, transparent 78%, rgba(245, 164, 0, 0.16));
}

.hub-shell-header::after {
  display: none;
}

.hub-shell-header > * {
  position: relative;
  z-index: 1;
}

.hub-shell-header .hub-header-customer {
  position: absolute;
  left: 12px;
  bottom: 9px;
  z-index: 3;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  width: auto;
  min-width: 190px;
  max-width: min(390px, calc(100% - 430px));
  min-height: 48px;
  margin: 0;
  padding: 4px 12px 4px 4px;
  overflow: hidden;
  border: 1px solid rgba(255, 194, 71, 0.72);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(24, 22, 17, 0.94), rgba(0, 0, 0, 0.9)),
    #050505;
  color: #fff8e8;
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.1),
    0 8px 22px rgba(0, 0, 0, 0.32),
    0 0 18px rgba(245, 164, 0, 0.14);
  cursor: pointer;
  text-align: left;
}

.hub-shell-header .hub-header-customer[hidden] {
  display: none !important;
}

.hub-shell-header .hub-header-customer:hover,
.hub-shell-header .hub-header-customer:focus-visible {
  border-color: #ffc247;
  background:
    linear-gradient(180deg, rgba(55, 39, 12, 0.96), rgba(5, 5, 5, 0.94)),
    #050505;
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.2),
    0 8px 24px rgba(0, 0, 0, 0.38),
    0 0 22px rgba(245, 164, 0, 0.24);
}

.hub-header-customer-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 194, 71, 0.46);
  border-radius: 7px;
  background: #fffdf7;
  color: #6d4500;
  font-size: 12px;
  font-weight: 900;
}

.hub-header-customer-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.hub-header-customer-copy {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.hub-header-customer-copy small {
  color: #ffc247;
  font-size: calc(10px * var(--hub-ui-scale, 1));
  font-weight: 850;
  line-height: 1;
  text-transform: uppercase;
}

.hub-header-customer-copy strong {
  min-width: 0;
  overflow: hidden;
  color: #fff;
  font-size: calc(14px * var(--hub-ui-scale, 1));
  font-weight: 850;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-header-title {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
}

.hub-shell-header h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  color: #fff8e8;
  text-shadow: 0 0 26px rgba(245, 164, 0, 0.18), 0 3px 20px rgba(0, 0, 0, 0.82);
}

.hub-header-kicker {
  display: none;
}

.hub-header-context {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  color: rgba(255, 248, 232, 0.78);
  font-size: calc(10px * var(--hub-ui-scale, 1));
  margin-right: 0;
  min-width: 0;
}

.hub-header-context span,
.hub-shell-header .status-pill {
  min-width: 0;
  border: 1px solid rgba(245, 164, 0, 0.32);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(18, 17, 14, 0.92), rgba(0, 0, 0, 0.82)),
    rgba(0, 0, 0, 0.72);
  color: #fff3d2;
  padding: 3px 7px;
  box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.06);
  white-space: nowrap;
}

.hub-shell-header .topbar-actions {
  position: absolute;
  left: auto;
  right: 12px;
  bottom: 9px;
  display: flex;
  width: auto;
  min-height: 26px;
  align-self: flex-end;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  max-width: calc(100% - 24px);
  gap: 6px;
  padding: 0;
  z-index: 2;
}

.hub-shell-header #appSyncStatus,
.hub-shell-header #hubStatus {
  display: none !important;
}

.hub-shell-header #sessionStatus {
  min-width: 0;
  margin-right: 0;
  font-size: calc(10px * var(--hub-ui-scale, 1));
}

.hub-shell-header #logoutButton,
.hub-shell-header .hub-back-button {
  min-height: 30px;
  border-color: rgba(255, 194, 71, 0.42);
  background:
    linear-gradient(180deg, rgba(17, 16, 13, 0.96), rgba(0, 0, 0, 0.94)),
    #050505;
  color: #fff3d2;
  box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.08);
  font-size: calc(10px * var(--hub-ui-scale, 1));
  padding-inline: 8px;
}

.hub-shell-header .hub-back-button {
  border-width: 1.5px;
  border-color: rgba(255, 194, 71, 0.9);
  background:
    linear-gradient(180deg, rgba(245, 164, 0, 0.32), rgba(88, 55, 0, 0.2)),
    linear-gradient(180deg, rgba(17, 16, 13, 0.98), rgba(0, 0, 0, 0.96)),
    #050505;
  color: #fff8e8;
  font-weight: 950;
  letter-spacing: 0;
  padding-inline: 11px 13px;
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.18),
    0 0 0 1px rgba(245, 164, 0, 0.16),
    0 0 18px rgba(245, 164, 0, 0.32);
}

.hub-shell-header .hub-back-button::before {
  content: "\2190";
  margin-right: 7px;
  color: #ffc247;
  font-weight: 950;
}

body[data-hub-shell-view="dashboard"] .hub-back-button {
  display: none;
}

.hub-back-button {
  white-space: nowrap;
}

@media (min-width: 761px) {
  body.hub-shell-ready:not([data-view]) .hub-shell-header .topbar-actions {
    top: 50%;
    right: 14px;
    bottom: auto;
    transform: translateY(-50%);
  }

  body.hub-shell-ready:not([data-view]) .hub-shell-header .hub-back-button {
    min-height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(245, 164, 0, 0.24), rgba(78, 50, 5, 0.2)),
      rgba(5, 5, 5, 0.9);
    box-shadow:
      inset 0 0 0 1px rgba(255, 194, 71, 0.12),
      0 6px 18px rgba(0, 0, 0, 0.3),
      0 0 14px rgba(245, 164, 0, 0.2);
  }
}

.zertifikate-shell .hub-header-context {
  margin-right: 0;
}

.gbu-shell .hub-header-context {
  margin-right: 0;
}

.zertifikate-shell .hub-shell-header .topbar-actions,
.gbu-shell .hub-shell-header .topbar-actions,
.audit-shell .hub-shell-header .topbar-actions,
.begehung-shell .hub-shell-header .topbar-actions,
.qualimatrix-shell .hub-shell-header .topbar-actions,
.arbeitsanweisung-shell .hub-shell-header .topbar-actions,
.org-handbuch-shell .hub-shell-header .topbar-actions,
.organigramm-shell .hub-shell-header .topbar-actions,
.monatsbericht-shell .hub-shell-header .topbar-actions,
.projektradar-shell .hub-shell-header .topbar-actions,
.routenplaner-shell .hub-shell-header .topbar-actions,
.prueffristen-shell .hub-shell-header .topbar-actions,
.todo-shell .hub-shell-header .topbar-actions {
  left: auto;
  right: 12px;
  bottom: 9px;
  width: auto;
  max-width: calc(100% - 24px);
  justify-content: flex-end;
}

.hub-shell-ready .workspace,
.hub-shell-ready .right-panel,
.hub-shell-ready .form-block,
.hub-shell-ready .settings-panel,
.hub-shell-ready .customer-editor-card,
.hub-shell-ready .document-preview-card {
  border-color: rgba(245, 164, 0, 0.28);
  background:
    linear-gradient(180deg, rgba(12, 11, 9, 0.88), rgba(6, 6, 5, 0.84)),
    rgba(5, 5, 5, 0.82);
  color: var(--hub-shell-text);
}

.hub-shell-ready .section-head h2,
.hub-shell-ready .section-head h3,
.hub-shell-ready .workspace h2,
.hub-shell-ready .workspace h3,
.hub-shell-ready .right-panel h2 {
  color: #fff8e8;
}

.hub-shell-ready .section-head p,
.hub-shell-ready .workspace p,
.hub-shell-ready .right-panel p {
  color: var(--hub-shell-muted);
}

.hub-shell-ready .tenant-row,
.hub-shell-ready .tenant-create-panel,
.hub-shell-ready .tenant-limit-panel,
.hub-shell-ready .tenant-user-scope,
.hub-shell-ready .user-row,
.hub-shell-ready .user-form,
.hub-shell-ready .user-toolbar,
.hub-shell-ready .security-form#adminPasswordForm,
.hub-shell-ready .user-access-panel,
.hub-shell-ready .role-permission-preview,
.hub-shell-ready .edit-state,
.hub-shell-ready .access-check,
.hub-shell-ready .security-workflow,
.hub-shell-ready .settings-link-row,
.hub-shell-ready .openai-test-result {
  border-color: rgba(245, 164, 0, 0.3);
  background:
    linear-gradient(180deg, rgba(17, 16, 13, 0.9), rgba(5, 5, 5, 0.84)),
    rgba(0, 0, 0, 0.76);
  color: var(--hub-shell-text);
  box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.05);
}

.hub-shell-ready .tenant-row.is-suspended {
  border-color: rgba(245, 164, 0, 0.52);
  background:
    linear-gradient(180deg, rgba(47, 28, 0, 0.68), rgba(5, 5, 5, 0.88)),
    rgba(0, 0, 0, 0.78);
}

.hub-shell-ready .tenant-row strong,
.hub-shell-ready .tenant-create-panel summary,
.hub-shell-ready .tenant-user-scope strong,
.hub-shell-ready .user-row strong,
.hub-shell-ready .user-access-panel strong,
.hub-shell-ready .role-permission-preview strong,
.hub-shell-ready .access-check strong,
.hub-shell-ready .settings-link-row strong {
  color: #fff8e8;
}

.hub-shell-ready .tenant-row span,
.hub-shell-ready .tenant-create-panel summary small,
.hub-shell-ready .tenant-user-scope span,
.hub-shell-ready .tenant-user-scope small,
.hub-shell-ready .tenant-user-scope strong small,
.hub-shell-ready .user-row span,
.hub-shell-ready .user-access-panel small,
.hub-shell-ready .role-permission-preview p,
.hub-shell-ready .access-check small,
.hub-shell-ready .settings-link-row span {
  color: rgba(255, 248, 232, 0.72);
}

.hub-shell-ready .user-status-pill {
  border-color: rgba(245, 164, 0, 0.48);
  background: rgba(245, 164, 0, 0.12);
  color: #ffd27a;
}

.hub-shell-ready .role-badge,
.hub-shell-ready .user-meta-grid small,
.hub-shell-ready .role-rule-note {
  border-color: rgba(245, 164, 0, 0.34);
  background: rgba(245, 164, 0, 0.12);
  color: #ffd27a;
}

.hub-shell-ready .role-admin .role-badge,
.hub-shell-ready .role-masteradmin .role-badge {
  border-color: rgba(34, 197, 94, 0.34);
  background: rgba(34, 197, 94, 0.12);
  color: #bbf7d0;
}

.hub-shell-ready .role-reader .role-badge {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(96, 165, 250, 0.12);
  color: #dbeafe;
}

.hub-shell-ready .user-warning {
  color: #fecaca;
}

.hub-shell-ready .tenant-title-line em,
.hub-shell-ready .tenant-chip-row small {
  border-color: rgba(245, 164, 0, 0.34);
  background: rgba(245, 164, 0, 0.12);
  color: #ffd27a;
}

.hub-shell-ready .tenant-app-access,
.hub-shell-ready .tenant-limit-panel {
  border-top-color: rgba(245, 164, 0, 0.22);
}

.hub-shell-ready .tenant-limit-grid input,
.hub-shell-ready .tenant-user-scope select,
.hub-shell-ready .user-toolbar input,
.hub-shell-ready .user-access-head input,
.hub-shell-ready .user-form input,
.hub-shell-ready .user-form select,
.hub-shell-ready .security-form input {
  border-color: rgba(245, 164, 0, 0.32);
  background: rgba(0, 0, 0, 0.6);
  color: #fff8e8;
}

.hub-shell-ready .tenant-reader-limit input,
.hub-shell-ready .access-check input {
  accent-color: #f5a400;
}

.hub-shell-ready .app-tile-group-head h3 {
  color: #fff8e8;
  font-size: calc(18px * var(--hub-ui-scale, 1));
}

.hub-shell-ready .app-tile-group-head span {
  border: 1px solid rgba(245, 164, 0, 0.44);
  background: rgba(245, 164, 0, 0.13);
  color: var(--hub-shell-gold-bright);
}

.hub-app-card {
  position: relative;
  min-height: clamp(112px, calc(146px * var(--hub-ui-scale, 1)), 156px);
  aspect-ratio: 1.26 / 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(58px, 1fr) minmax(28px, auto);
  place-items: center;
  gap: 8px;
  border: 1.5px solid rgba(245, 164, 0, 0.82);
  border-radius: var(--hub-shell-card-radius);
  padding: clamp(12px, calc(14px * var(--hub-ui-scale, 1)), 16px) 12px clamp(11px, calc(13px * var(--hub-ui-scale, 1)), 15px);
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 194, 71, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(255, 194, 71, 0.08), transparent 26%),
    linear-gradient(180deg, rgba(17, 17, 15, 0.99), rgba(0, 0, 0, 0.99)),
    #050505;
  color: var(--hub-shell-text);
  text-align: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.12),
    inset 0 0 36px rgba(255, 178, 31, 0.06),
    0 0 18px rgba(245, 164, 0, 0.14),
    0 20px 44px rgba(0, 0, 0, 0.36);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
  cursor: pointer;
}

.hub-app-card:hover {
  border-color: var(--hub-shell-gold-bright);
  box-shadow:
    0 0 0 1px rgba(255, 194, 71, 0.48),
    0 24px 58px rgba(0, 0, 0, 0.48),
    0 0 34px rgba(245, 164, 0, 0.32);
  transform: translateY(-2px);
}

.hub-app-card .app-card-link {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  color: inherit;
  text-decoration: none;
}

.hub-app-card .app-logo,
.hub-app-card .app-title,
.hub-app-card .tag-strip,
.hub-app-card .state,
.hub-app-card .port {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hub-app-card .row-actions,
.hub-app-card .app-order-controls {
  position: relative;
  z-index: 3;
}

.hub-app-card .app-card-link:focus-visible {
  outline: 2px solid var(--hub-shell-gold-bright);
  outline-offset: 3px;
}

.hub-app-card:focus-visible {
  outline: 2px solid var(--hub-shell-gold-bright);
  outline-offset: 3px;
}

.hub-app-card .app-logo {
  width: clamp(50px, calc(76px * var(--hub-ui-scale, 1)), 78px);
  height: clamp(50px, calc(76px * var(--hub-ui-scale, 1)), 78px);
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: var(--hub-shell-gold-bright);
  overflow: visible;
  box-shadow: none;
  filter: drop-shadow(0 0 8px rgba(255, 178, 31, 0.7)) drop-shadow(0 0 20px rgba(245, 164, 0, 0.25));
}

.hub-app-card .app-logo svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.hub-app-card .app-title {
  display: block;
  width: 100%;
}

.hub-app-card .app-title strong {
  display: -webkit-box;
  color: #ffffff;
  font-size: clamp(11px, calc(13px * var(--hub-ui-scale, 1)), 13.5px);
  line-height: 1.16;
  font-weight: 760;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.86);
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow-wrap: normal;
  hyphens: auto;
}

.hub-app-card .state {
  color: #fff8e8;
}

.hub-app-card .app-title span,
.hub-app-card .port {
  color: rgba(255, 248, 232, 0.7);
}

.hub-app-card .app-title span {
  display: -webkit-box;
  margin-top: 3px;
  color: rgba(255, 248, 232, 0.66);
  font-size: clamp(9px, calc(10px * var(--hub-ui-scale, 1)), 10.5px);
  font-weight: 620;
  line-height: 1.16;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.hub-app-card .tag-strip,
.hub-app-card .state,
.hub-app-card .port {
  display: none;
}

.hub-app-card .tag {
  border-color: rgba(245, 164, 0, 0.34);
  background: rgba(245, 164, 0, 0.1);
  color: #ffe5aa;
}

.hub-app-card .hub-app-start {
  position: absolute;
  width: 1px;
  height: 1px;
  min-width: 0;
  min-height: 0;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hub-shell-ready .app-tile-grid {
  grid-template-columns: repeat(auto-fill, minmax(clamp(132px, calc(164px * var(--hub-ui-scale, 1)), 164px), 1fr));
  gap: clamp(10px, calc(14px * var(--hub-ui-scale, 1)), 14px);
}

.hub-shell-ready .app-row .row-actions {
  display: none;
}

.hub-shell-ready .app-order-controls {
  display: none;
}

.hub-shell-ready .empty-tile-note {
  border-color: rgba(245, 164, 0, 0.38);
  background: rgba(5, 5, 5, 0.62);
  color: var(--hub-shell-muted);
}

body[data-view="customers"].hub-shell-ready .customer-editor-card {
  min-height: 176px;
  grid-template-columns: 132px minmax(0, 1fr) minmax(260px, 0.78fr);
  align-items: end;
  overflow: visible;
  border: 1.5px solid rgba(245, 164, 0, 0.72);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.76)),
    linear-gradient(90deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.18) 62%, rgba(0, 0, 0, 0.54)),
    var(--customer-bg-image);
  background-size: cover;
  background-position: center;
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.14),
    0 22px 54px rgba(0, 0, 0, 0.34),
    0 0 30px rgba(245, 164, 0, 0.14);
  padding: 20px;
}

body[data-view="customers"].hub-shell-ready .customer-editor-logo {
  width: 104px;
  height: 104px;
  align-self: center;
  border: 1.5px solid rgba(255, 194, 71, 0.78);
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(18, 17, 14, 0.92), rgba(0, 0, 0, 0.9)),
    rgba(0, 0, 0, 0.72);
  color: var(--hub-shell-gold-bright);
  font-size: calc(34px * var(--hub-ui-scale, 1));
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.12),
    0 0 24px rgba(245, 164, 0, 0.24);
}

body[data-view="customers"].hub-shell-ready .customer-editor-logo img {
  background: rgba(255, 255, 255, 0.94);
  padding: 8px;
}

body[data-view="customers"].hub-shell-ready .customer-editor-main {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: end;
}

body[data-view="customers"].hub-shell-ready .customer-editor-main span,
body[data-view="customers"].hub-shell-ready .customer-editor-main small {
  color: rgba(255, 248, 232, 0.78);
}

body[data-view="customers"].hub-shell-ready .customer-editor-main strong {
  color: #ffffff;
  font-size: clamp(28px, 4vw, 46px);
  line-height: 1.03;
  text-shadow: 0 3px 24px rgba(0, 0, 0, 0.84);
}

body[data-view="customers"].hub-shell-ready .customer-editor-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 4px;
}

body[data-view="customers"].hub-shell-ready .customer-editor-facts span {
  border: 1px solid rgba(245, 164, 0, 0.32);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.58);
  color: #fff3d2;
  padding: 5px 9px;
  font-size: calc(12px * var(--hub-ui-scale, 1));
  white-space: nowrap;
}

body[data-view="customers"].hub-shell-ready .customer-access-card {
  align-self: end;
  justify-self: end;
  width: min(100%, 390px);
  min-height: 0;
  max-height: none;
  overflow: visible;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.72), rgba(10, 9, 7, 0.88)),
    rgba(0, 0, 0, 0.62);
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.1),
    0 10px 28px rgba(0, 0, 0, 0.28);
}

body[data-view="customers"].hub-shell-ready .customer-access-card.has-open-menu {
  z-index: 90;
}

body[data-view="customers"].hub-shell-ready .customer-access-head {
  align-items: flex-start;
}

body[data-view="customers"].hub-shell-ready .customer-access-head span,
body[data-view="customers"].hub-shell-ready .customer-access-head strong,
body[data-view="customers"].hub-shell-ready .customer-access-head small,
body[data-view="customers"].hub-shell-ready .customer-access-empty {
  color: #fff3d2;
  text-shadow: none;
}

body[data-view="customers"].hub-shell-ready .customer-access-head strong {
  font-size: calc(15px * var(--hub-ui-scale, 1));
  line-height: 1.05;
}

body[data-view="customers"].hub-shell-ready .customer-access-list {
  overflow: visible;
}

body[data-view="customers"].hub-shell-ready .customer-access-user {
  min-height: 40px;
}

body[data-view="customers"].hub-shell-ready .customer-access-menu {
  z-index: 60;
}

@supports (-moz-appearance: none) {
  body[data-view="customers"].hub-shell-ready .customer-access-card {
    width: min(100%, 400px);
  }

  body[data-view="customers"].hub-shell-ready .customer-access-user-menu > summary.customer-access-user {
    display: flex;
    list-style: none;
    appearance: none;
    -moz-appearance: none;
  }

  body[data-view="customers"].hub-shell-ready .customer-access-user-menu > summary.customer-access-user::marker {
    content: "";
    font-size: 0;
  }
}

.hub-shell-ready .tenant-user-scope select,
.hub-shell-ready .tenant-user-scope select:enabled,
.hub-shell-ready .tenant-user-scope select:focus,
.hub-shell-ready .user-form select,
.hub-shell-ready .user-form select:enabled,
.hub-shell-ready .user-form select:focus {
  color-scheme: dark !important;
  background-color: #050505 !important;
  background-image: linear-gradient(180deg, rgba(10, 9, 7, 0.98), rgba(0, 0, 0, 0.98)) !important;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
}

.hub-shell-ready .tenant-user-scope select option,
.hub-shell-ready .tenant-user-scope select optgroup,
.hub-shell-ready .user-form select option,
.hub-shell-ready .user-form select optgroup {
  background-color: #050505 !important;
  color: #fff8e8 !important;
}

.hub-shell-ready .tenant-user-scope select option:checked,
.hub-shell-ready .tenant-user-scope select option:hover,
.hub-shell-ready .user-form select option:checked,
.hub-shell-ready .user-form select option:hover {
  background-color: #332205 !important;
  color: #fff8e8 !important;
}

body[data-view="customers"].hub-shell-ready .customer-access-add select,
body[data-view="customers"].hub-shell-ready .customer-access-add select:focus {
  color-scheme: dark;
  background: #050505;
  color: #fff8e8;
  -webkit-text-fill-color: #fff8e8;
}

body[data-view="customers"].hub-shell-ready .customer-access-add select option {
  background: #050505;
  color: #fff8e8;
}

@media (max-width: 1100px) {
  body[data-view="customers"].hub-shell-ready .customer-editor-card {
    grid-template-columns: 112px minmax(0, 1fr);
    overflow: visible;
  }

  body[data-view="customers"].hub-shell-ready .customer-access-card {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }
}

body[data-view="customers"].hub-shell-ready .customer-form .form-block h3,
body[data-view="customers"].hub-shell-ready .customer-form details.form-block > summary h3 {
  color: #171410;
}

body[data-view="customers"].hub-shell-ready .customer-form details.form-block > summary {
  color: #171410;
}

body[data-view="customers"].hub-shell-ready .customer-form .form-block,
body[data-view="customers"].hub-shell-ready .customer-form details.form-block {
  border-color: rgba(245, 164, 0, 0.32) !important;
  background:
    linear-gradient(135deg, rgba(17, 17, 14, 0.96), rgba(4, 4, 3, 0.94)),
    radial-gradient(circle at 18% 0%, rgba(245, 164, 0, 0.13), transparent 44%) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 36px rgba(0, 0, 0, 0.24) !important;
  color: #fff8e8 !important;
}

body[data-view="customers"].hub-shell-ready .customer-form details.form-block > summary {
  background:
    linear-gradient(90deg, rgba(245, 164, 0, 0.16), rgba(0, 0, 0, 0.02)) !important;
  border-bottom-color: rgba(245, 164, 0, 0.24) !important;
  color: #fff8e8 !important;
}

body[data-view="customers"].hub-shell-ready .customer-form .form-block h3,
body[data-view="customers"].hub-shell-ready .customer-form details.form-block > summary h3,
body[data-view="customers"].hub-shell-ready .customer-form label,
body[data-view="customers"].hub-shell-ready .customer-form .subsection-heading,
body[data-view="customers"].hub-shell-ready .customer-form .single-sync-result,
body[data-view="customers"].hub-shell-ready .customer-form .document-source-panel strong,
body[data-view="customers"].hub-shell-ready .customer-form .document-source-panel span {
  color: #fff8e8 !important;
}

body[data-view="customers"].hub-shell-ready .customer-form label {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}

body[data-view="customers"].hub-shell-ready .customer-form input,
body[data-view="customers"].hub-shell-ready .customer-form select,
body[data-view="customers"].hub-shell-ready .customer-form textarea,
body[data-view="customers"].hub-shell-ready .customer-form .customer-link-form input,
body[data-view="customers"].hub-shell-ready .customer-form .document-upload-grid input,
body[data-view="customers"].hub-shell-ready .customer-form .document-filter-grid input,
body[data-view="customers"].hub-shell-ready .customer-form .document-filter-grid select {
  color-scheme: dark;
  border-color: rgba(245, 164, 0, 0.42) !important;
  background: rgba(0, 0, 0, 0.72) !important;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body[data-view="customers"].hub-shell-ready .customer-form input::placeholder,
body[data-view="customers"].hub-shell-ready .customer-form textarea::placeholder {
  color: rgba(255, 248, 232, 0.52) !important;
  -webkit-text-fill-color: rgba(255, 248, 232, 0.52);
}

body[data-view="customers"].hub-shell-ready .customer-form input:focus,
body[data-view="customers"].hub-shell-ready .customer-form select:focus,
body[data-view="customers"].hub-shell-ready .customer-form textarea:focus {
  border-color: rgba(245, 164, 0, 0.9) !important;
  box-shadow:
    0 0 0 3px rgba(245, 164, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

body[data-view="customers"].hub-shell-ready .customer-form select option {
  background: #11100d;
  color: #fff8e8;
}

body[data-view="customers"].hub-shell-ready .customer-form .nested-row,
body[data-view="customers"].hub-shell-ready .customer-form .document-source-panel,
body[data-view="customers"].hub-shell-ready .customer-form .document-table-wrap,
body[data-view="customers"].hub-shell-ready .customer-form .customer-link-list,
body[data-view="customers"].hub-shell-ready .customer-form .document-workspace {
  border-color: rgba(245, 164, 0, 0.22) !important;
  background: rgba(0, 0, 0, 0.28) !important;
  color: #fff8e8 !important;
}

body[data-view="customers"].hub-shell-ready .customer-form .document-table th,
body[data-view="customers"].hub-shell-ready .customer-form .document-table td,
body[data-view="customers"].hub-shell-ready .customer-form .customer-link-list,
body[data-view="customers"].hub-shell-ready .customer-form .empty-cell {
  color: #fff8e8 !important;
  border-color: rgba(245, 164, 0, 0.18) !important;
}

.hub-shell-ready .theme-form {
  border: 1px solid rgba(245, 164, 0, 0.24);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(12, 11, 9, 0.72), rgba(4, 4, 4, 0.68)),
    rgba(0, 0, 0, 0.4);
  padding: 12px;
  margin-top: 10px;
}

.hub-shell-ready #appHeaderThemeForm {
  grid-template-columns: minmax(220px, 0.9fr) minmax(150px, 0.55fr) minmax(210px, 1fr) auto;
}

.hub-shell-ready .theme-preview {
  min-height: 126px;
  border-radius: 18px;
  border-color: rgba(245, 164, 0, 0.48);
  box-shadow:
    inset 0 0 0 1px rgba(255, 194, 71, 0.09),
    0 0 22px rgba(245, 164, 0, 0.12);
}

.hub-shell-ready .header-theme-preview {
  min-height: 92px;
}

@media (max-width: 860px) {
  .hub-shell-header {
    min-height: 104px;
  }

  .hub-shell-header .hub-header-customer {
    left: 8px;
    top: 8px;
    bottom: auto;
    grid-template-columns: 34px minmax(0, 1fr);
    min-width: 0;
    max-width: calc(100% - 16px);
    min-height: 40px;
    padding: 3px 9px 3px 3px;
  }

  .hub-shell-header .hub-header-customer-logo {
    width: 34px;
    height: 34px;
  }

  .hub-shell-header .hub-header-customer-copy strong {
    font-size: 12px;
  }

  .hub-shell-header .topbar-actions {
    left: auto;
    right: 10px;
    min-height: auto;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
  }

  .hub-header-context {
    width: auto;
    justify-content: flex-end;
  }

  .hub-shell-ready #appHeaderThemeForm,
  .hub-shell-ready .theme-form {
    grid-template-columns: 1fr;
  }
}


.hub-app-context-row {
  display: grid;
  grid-template-columns: 48px minmax(260px, 0.72fr) minmax(220px, 1fr);
  align-items: center;
  gap: 11px;
  margin: 0 0 8px;
  padding: 10px 12px;
  border: 1px solid rgba(245, 164, 0, 0.48);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(18, 15, 8, 0.92), rgba(4, 4, 3, 0.9)),
    radial-gradient(circle at 18% 0%, rgba(245, 164, 0, 0.14), transparent 36%);
  box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.07), 0 10px 28px rgba(0, 0, 0, 0.3);
}

.hub-app-context-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 164, 0, 0.58);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 253, 245, 0.98), rgba(232, 224, 210, 0.96));
  color: #7a4d00;
  font-size: calc(13px * var(--hub-ui-scale, 1));
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28), inset 0 0 0 1px rgba(255, 255, 255, 0.52);
}

.hub-app-context-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.hub-app-context-logo[data-empty="1"] {
  background:
    radial-gradient(circle at 34% 20%, rgba(245, 164, 0, 0.2), transparent 42%),
    linear-gradient(180deg, rgba(255, 248, 232, 0.14), rgba(0, 0, 0, 0.42));
  color: #fff3d2;
}

.hub-app-context-control {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.hub-app-context-kicker {
  color: rgba(255, 239, 199, 0.72);
  font-size: calc(11px * var(--hub-ui-scale, 1));
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
  white-space: nowrap;
}

.hub-app-context-row select {
  min-height: 36px;
  width: 100%;
  border: 1px solid rgba(245, 164, 0, 0.5);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(8, 8, 7, 0.98), rgba(0, 0, 0, 0.96));
  color: #fff8e8;
  padding: 0 12px;
  font: inherit;
  font-size: calc(13px * var(--hub-ui-scale, 1));
  box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.05);
}

.hub-app-context-row select:focus-visible {
  outline: 2px solid rgba(245, 164, 0, 0.78);
  outline-offset: 2px;
}

.hub-app-context-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 248, 232, 0.82);
  font-size: calc(12px * var(--hub-ui-scale, 1));
}

.hub-shell-ready main[class$="-shell-main"] {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.hub-shell-ready main[class$="-shell-main"] > section[class$="-frame-card"] {
  flex: 1 1 auto;
  min-height: calc(100vh - 168px);
}

.hub-shell-ready main[class$="-shell-main"] iframe[class$="-frame"] {
  height: calc(100vh - 174px);
}

@media (max-width: 860px) {
  .hub-app-context-row {
    grid-template-columns: 42px minmax(0, 1fr);
    padding: 9px;
  }

  .hub-app-context-control {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .hub-app-context-logo {
    width: 42px;
    height: 42px;
    border-radius: 9px;
  }

  .hub-app-context-summary {
    grid-column: 1 / -1;
    white-space: normal;
  }
}
﻿
/* Hub-Shell: Kunden-Auswahl klar lesbar erzwingen. */
.hub-app-context-row select,
.hub-app-context-row select:enabled,
.hub-app-context-row select:focus {
  color-scheme: dark !important;
  background-color: #050505 !important;
  background-image: linear-gradient(180deg, rgba(10, 9, 7, 0.98), rgba(0, 0, 0, 0.98)) !important;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
  border-color: rgba(245, 164, 0, 0.72) !important;
}

.hub-app-context-row select option,
.hub-app-context-row select optgroup {
  background-color: #050505 !important;
  color: #fff8e8 !important;
}

.hub-app-context-row select option:checked,
.hub-app-context-row select option:hover {
  background-color: #332205 !important;
  color: #fff8e8 !important;
}

/* Hub settings: force dark, readable fields in the black/gold shell. */
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-stack,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-panel {
  color: #fff8e8;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-panel,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-create-panel,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-row,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-user-scope,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .user-form,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .user-toolbar,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .user-row,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .user-access-panel,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .access-check,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .role-permission-preview,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .edit-state,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .security-workflow,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .package-flow-hint,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-link-row,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .openai-test-result,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .openai-usage-grid article,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-card,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .doc-panel,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .import-panel,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .sync-grid > section,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .sync-check-list,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .sync-preview-list,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .storage-status-list > *,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .admin-guide-list > * {
  border-color: rgba(245, 164, 0, 0.32) !important;
  background:
    linear-gradient(135deg, rgba(17, 17, 14, 0.96), rgba(4, 4, 3, 0.94)),
    radial-gradient(circle at 18% 0%, rgba(245, 164, 0, 0.13), transparent 44%) !important;
  color: #fff8e8 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 12px 28px rgba(0, 0, 0, 0.20);
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView details.settings-panel > summary,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-create-panel > summary,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-panel.collapsible-panel > .section-head {
  border-color: rgba(245, 164, 0, 0.24) !important;
  background:
    linear-gradient(90deg, rgba(245, 164, 0, 0.16), rgba(0, 0, 0, 0.02)) !important;
  color: #fff8e8 !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .openai-usage-grid strong {
  color: #ffffff !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .openai-usage-grid span {
  color: #d8c9a8 !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-usage-heading > div > span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-usage-section-head > div > span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-title > div > span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-metrics span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-card small,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-app-usage-card span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-usage-empty {
  color: #d8c9a8 !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-title > strong,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-usage-date,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-usage-section-head > span {
  color: #e8ddff !important;
  background: rgba(111, 66, 193, 0.24) !important;
  border-color: rgba(185, 156, 255, 0.5) !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-card.near-limit {
  border-color: rgba(245, 158, 11, 0.7) !important;
  background: rgba(83, 55, 5, 0.72) !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .ai-user-usage-card.limit-reached {
  border-color: rgba(239, 68, 68, 0.74) !important;
  background: rgba(82, 20, 20, 0.72) !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView h2,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView h3,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView label,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView strong,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView summary,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .section-head h2,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .section-head h3,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-link-row strong,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-user-scope strong,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .user-row strong,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .access-check strong,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .legal-settings-form label {
  color: #fff8e8 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.32);
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView p,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView small,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .section-head p,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-create-panel summary small,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .tenant-user-scope strong small,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .user-row span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .settings-link-row span,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView .openai-test-result {
  color: rgba(255, 248, 232, 0.74) !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView select,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView textarea {
  color-scheme: dark !important;
  border-color: rgba(245, 164, 0, 0.42) !important;
  background: rgba(0, 0, 0, 0.72) !important;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input::placeholder,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView textarea::placeholder {
  color: rgba(255, 248, 232, 0.52) !important;
  -webkit-text-fill-color: rgba(255, 248, 232, 0.52) !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input:focus,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView select:focus,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView textarea:focus {
  border-color: rgba(245, 164, 0, 0.92) !important;
  box-shadow:
    0 0 0 3px rgba(245, 164, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.07) !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView select option,
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView select optgroup {
  background: #11100d !important;
  color: #fff8e8 !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input[type="checkbox"],
html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input[type="radio"] {
  width: auto;
  accent-color: #f5a400;
  -webkit-text-fill-color: initial !important;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input[type="range"] {
  padding: 0;
  accent-color: #f5a400;
  background: transparent !important;
  box-shadow: none;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready #settingsView input[type="file"] {
  padding-top: 8px;
}

/* Hub settings field hard stop: avoid white controls with pale text in mixed theme states. */
body.hub-shell-ready #settingsView label,
body.hub-shell-ready #settingsView .openai-form label,
body.hub-shell-ready #settingsView .security-form label,
body.hub-shell-ready #settingsView .editor-form label,
body.hub-shell-ready #settingsView .tenant-form label,
body.hub-shell-ready #settingsView .user-form label,
body.hub-shell-ready #settingsView .theme-form label,
body.hub-shell-ready #settingsView .legal-settings-form label {
  color: #fff8e8 !important;
}

body.hub-shell-ready #settingsView input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.hub-shell-ready #settingsView select,
body.hub-shell-ready #settingsView textarea {
  color-scheme: dark !important;
  border-color: rgba(245, 164, 0, 0.48) !important;
  background:
    linear-gradient(180deg, rgba(9, 8, 6, 0.98), rgba(0, 0, 0, 0.96)) !important;
  color: #fff8e8 !important;
  -webkit-text-fill-color: #fff8e8 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(245, 164, 0, 0.06) !important;
}

body.hub-shell-ready #settingsView input:not([type="checkbox"]):not([type="radio"]):not([type="range"])::placeholder,
body.hub-shell-ready #settingsView textarea::placeholder {
  color: rgba(255, 248, 232, 0.50) !important;
  -webkit-text-fill-color: rgba(255, 248, 232, 0.50) !important;
}

body.hub-shell-ready #settingsView input:-webkit-autofill,
body.hub-shell-ready #settingsView input:-webkit-autofill:hover,
body.hub-shell-ready #settingsView input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #050505 inset !important;
  -webkit-text-fill-color: #fff8e8 !important;
  caret-color: #fff8e8;
}

body.hub-shell-ready #settingsView select option,
body.hub-shell-ready #settingsView select optgroup {
  background-color: #050505 !important;
  color: #fff8e8 !important;
}

body.hub-shell-ready #settingsView input[type="checkbox"],
body.hub-shell-ready #settingsView input[type="radio"] {
  accent-color: #f5a400;
}

body.hub-shell-ready #settingsView input[type="range"] {
  accent-color: #f5a400;
}

/* Cross-browser form normalization.
   Keep the existing desktop layout untouched; this only makes native controls
   render with the same dark/gold contrast in Firefox, Edge and Chrome. */
body.hub-shell-ready :where(input, select, textarea, button) {
  box-sizing: border-box;
  font-family: inherit;
  letter-spacing: 0;
}

body.hub-shell-ready :where(input, select, textarea) {
  max-width: 100%;
  min-width: 0;
}

body.hub-shell-ready :where(input, textarea)::placeholder {
  opacity: 1;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready :where(input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea) {
  color-scheme: dark;
  caret-color: #fff8e8;
}

html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready :where(select option, select optgroup) {
  background-color: #050505;
  color: #fff8e8;
}

html[data-hub-resolved-theme="light"] body.hub-shell-ready :where(select option, select optgroup) {
  background-color: #fffaf0;
  color: #15110a;
}

body.hub-shell-ready input[type="file"]::file-selector-button {
  margin-right: 10px;
  border: 1px solid rgba(245, 164, 0, 0.68);
  border-radius: 10px;
  background: linear-gradient(180deg, #ffc247, #f2a70b 52%, #c97c00);
  color: #050505;
  font: inherit;
  font-weight: 800;
  min-height: 30px;
  padding: 5px 12px;
}

@supports (-moz-appearance: none) {
  body.hub-shell-ready {
    scrollbar-color: rgba(245, 164, 0, 0.72) rgba(5, 5, 5, 0.94);
    scrollbar-width: thin;
  }

  body.hub-shell-ready :where(select, input, textarea) {
    text-shadow: none !important;
  }

  html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready :where(select, input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), textarea) {
    background-color: #050505 !important;
    color: #fff8e8 !important;
  }

  html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready :where(select option, select optgroup) {
    background-color: #050505 !important;
    color: #fff8e8 !important;
  }

  html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready :where(select option:checked) {
    background-color: #3a2605 !important;
    color: #fff8e8 !important;
  }

  html:not([data-hub-resolved-theme="light"]) body.hub-shell-ready :where(input::placeholder, textarea::placeholder) {
    color: rgba(255, 248, 232, 0.54) !important;
  }

  html[data-hub-resolved-theme="light"] body.hub-shell-ready {
    scrollbar-color: rgba(171, 111, 0, 0.7) rgba(255, 250, 240, 0.9);
  }

  html[data-hub-resolved-theme="light"] body.hub-shell-ready :where(select option, select optgroup) {
    background-color: #fffaf0 !important;
    color: #15110a !important;
  }
}

/* app shell compact geometry */
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-shell-header {
  min-height: clamp(72px, 5.8vw, 92px) !important;
  margin-bottom: 6px !important;
  border-radius: 14px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-shell-navigation {
  padding: 7px 7px 9px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .brand {
  padding: 7px !important;
  gap: 5px !important;
  border-radius: 14px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .brand-logo,
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .app-brand-icon {
  width: 46px !important;
  height: 46px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .app-brand-icon svg,
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .brand-logo svg {
  width: 42px !important;
  height: 42px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .brand strong {
  font-size: calc(12px * var(--hub-ui-scale, 1)) !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .brand span {
  font-size: calc(9px * var(--hub-ui-scale, 1)) !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-nav-item {
  min-height: 36px !important;
  padding: 5px 7px !important;
  gap: 7px !important;
  border-radius: 10px !important;
  font-size: calc(11px * var(--hub-ui-scale, 1)) !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-nav-item .icon,
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-nav-item svg {
  width: 22px !important;
  height: 22px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-app-context-row {
  min-height: 54px !important;
  padding: 7px 10px !important;
  gap: 8px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-app-context-row .hub-customer-logo,
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-app-context-row img {
  max-width: 42px !important;
  max-height: 42px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) [class$="-shell-frame-card"] {
  border-radius: 13px !important;
}
/* end app shell compact geometry */

/* Embedded apps apply the personal Hub scale internally. The outer frame only
   owns its available geometry and never participates in scaling. */
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) iframe[class$="-shell-frame"] {
  transform: none;
  width: 100% !important;
  height: calc(100dvh - 98px) !important;
  min-height: 600px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) [class$="-shell-frame-card"] {
  overflow: hidden !important;
}
/* end embedded app frame visual zoom */

/* GBU keeps its larger working height for hazard editing. */
body.hub-shell-ready.gbu-shell iframe.gbu-shell-frame {
  width: 100% !important;
  height: calc(100vh - 98px) !important;
  min-height: 680px !important;
}

body.hub-shell-ready.gbu-shell:not([data-view]):not([data-hub-shell-view="dashboard"]) iframe.gbu-shell-frame {
  width: 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  height: calc(100vh - 98px) !important;
  min-height: 680px !important;
}

body.hub-shell-ready.gbu-shell .gbu-shell-frame-card {
  overflow: hidden !important;
  min-height: min(880px, calc(100vh - 98px)) !important;
}

/* GBU detail fullscreen owns the complete visible workspace. */
body.gbu-shell.is-gbu-detail-fullscreen {
  overflow: hidden !important;
}

body.gbu-shell.is-gbu-detail-fullscreen .gbu-shell-main,
body.gbu-shell.is-gbu-detail-fullscreen .gbu-shell-frame-card,
body.gbu-shell .gbu-shell-frame-card[data-detail-fullscreen] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483000 !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #050505 !important;
}

body.hub-shell-ready.gbu-shell.is-gbu-detail-fullscreen iframe.gbu-shell-frame,
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) iframe.gbu-shell-frame[data-detail-fullscreen] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483001 !important;
  display: block !important;
  width: 100vw !important;
  height: 100dvh !important;
  min-width: 100vw !important;
  min-height: 100dvh !important;
  max-width: 100vw !important;
  max-height: 100dvh !important;
  border: 0 !important;
  border-radius: 0 !important;
}

/* app shell extra compact chrome */
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-shell-header {
  min-height: clamp(62px, 5vw, 78px) !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-app-context-row {
  min-height: 46px !important;
  padding: 5px 8px !important;
}
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-app-context-row .hub-customer-logo,
body.hub-shell-ready:not([data-view]):not([data-hub-shell-view="dashboard"]) .hub-app-context-row img {
  max-width: 36px !important;
  max-height: 36px !important;
}
/* end app shell extra compact chrome */
/* customer-search-2026-06-04: searchable customer picker for integrated app shells. */
.hub-app-context-searchable .hub-app-context-control {
  grid-template-columns: auto minmax(260px, 1fr);
}

.hub-app-context-searchable .hub-app-context-native-select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  clip-path: inset(50%) !important;
}

.hub-customer-combobox {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  min-width: 0;
  width: 100%;
  isolation: isolate;
}

.hub-customer-search {
  min-height: 36px;
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(245, 164, 0, 0.62);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: linear-gradient(180deg, rgba(8, 8, 7, 0.98), rgba(0, 0, 0, 0.96)), #050505;
  color: #fff8e8;
  -webkit-text-fill-color: #fff8e8;
  padding: 0 12px;
  font: inherit;
  font-size: calc(13px * var(--hub-ui-scale, 1));
  box-shadow: inset 0 0 0 1px rgba(255, 194, 71, 0.05);
  outline: none;
}

.hub-customer-search::placeholder {
  color: rgba(255, 239, 199, 0.52);
  -webkit-text-fill-color: rgba(255, 239, 199, 0.52);
}

.hub-customer-search::-webkit-search-decoration,
.hub-customer-search::-webkit-search-cancel-button {
  filter: invert(1) sepia(1) saturate(1.4) hue-rotate(350deg);
}

.hub-customer-toggle {
  min-height: 36px;
  border: 1px solid rgba(245, 164, 0, 0.62);
  border-radius: 0 10px 10px 0;
  background: linear-gradient(180deg, rgba(46, 31, 5, 0.98), rgba(11, 8, 3, 0.98)), #130d03;
  color: #ffd36a;
  font: inherit;
  font-size: calc(13px * var(--hub-ui-scale, 1));
  font-weight: 900;
  cursor: pointer;
}

.hub-customer-search:focus-visible,
.hub-customer-combobox:focus-within .hub-customer-toggle {
  border-color: rgba(245, 164, 0, 0.92);
  box-shadow: 0 0 0 2px rgba(245, 164, 0, 0.24);
}

.hub-customer-results {
  position: absolute;
  z-index: 80;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: min(46vh, 380px);
  overflow: auto;
  padding: 6px;
  border: 1px solid rgba(245, 164, 0, 0.64);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(14, 12, 8, 0.98), rgba(2, 2, 2, 0.98)), #050505;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.62), inset 0 0 0 1px rgba(255, 194, 71, 0.07);
}

.hub-customer-result {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  width: 100%;
  min-height: 50px;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #fff8e8;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.hub-customer-result:hover,
.hub-customer-result.is-active {
  border-color: rgba(245, 164, 0, 0.58);
  background: linear-gradient(180deg, rgba(245, 164, 0, 0.18), rgba(45, 31, 5, 0.58)), #171105;
}

.hub-customer-result.is-selected {
  border-color: rgba(255, 194, 71, 0.84);
  box-shadow: inset 3px 0 0 rgba(245, 164, 0, 0.96);
}

.hub-customer-result.is-empty {
  color: rgba(255, 239, 199, 0.72);
  cursor: default;
}

.hub-customer-result-main {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: calc(13px * var(--hub-ui-scale, 1));
  font-weight: 850;
}

.hub-customer-result-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: rgba(255, 239, 199, 0.68);
  font-size: calc(11px * var(--hub-ui-scale, 1));
}

.hub-customer-result-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.hub-customer-result-tags em {
  border: 1px solid rgba(245, 164, 0, 0.36);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(245, 164, 0, 0.1);
  color: #ffd36a;
  font-size: calc(10px * var(--hub-ui-scale, 1));
  font-style: normal;
  font-weight: 760;
}

/* app-customer-rail-20260701: use the Hub customer picker style in integrated apps. */
body.hub-shell-ready:not([data-view]) .hub-app-context-row.hub-app-context-searchable {
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch;
  gap: 8px !important;
  min-height: auto !important;
  padding: 10px 12px !important;
}

body.hub-shell-ready:not([data-view]) .hub-app-context-searchable .hub-app-context-control {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.hub-shell-ready:not([data-view]) .hub-app-context-searchable .hub-app-context-summary {
  min-height: 0;
  white-space: nowrap;
  color: rgba(255, 248, 232, 0.68);
  font-size: calc(11px * var(--hub-ui-scale, 1));
}

.hub-customer-card-rail {
  display: flex;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1px 0 5px;
  scroll-snap-type: x proximity;
  scrollbar-color: rgba(245, 164, 0, 0.62) rgba(255, 255, 255, 0.18);
  scrollbar-width: thin;
}

.hub-customer-card {
  flex: 0 0 clamp(215px, 24vw, 290px);
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 58px;
  border: 1px solid rgba(245, 164, 0, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(245, 164, 0, 0.12), rgba(255, 255, 255, 0.05) 36%, rgba(0, 0, 0, 0.68)),
    #090806;
  color: #fff8e8;
  font: inherit;
  text-align: left;
  padding: 6px 9px;
  cursor: pointer;
  scroll-snap-align: start;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.hub-customer-card:hover,
.hub-customer-card.is-selected {
  border-color: rgba(255, 194, 71, 0.86);
  background:
    radial-gradient(circle at 12% 18%, rgba(245, 164, 0, 0.26), transparent 42%),
    linear-gradient(135deg, rgba(80, 52, 8, 0.95), rgba(14, 13, 10, 0.96));
}

.hub-customer-card.is-selected {
  box-shadow:
    inset 3px 0 0 rgba(245, 164, 0, 0.98),
    0 0 0 1px rgba(245, 164, 0, 0.2);
}

.hub-customer-card.is-placeholder {
  flex-basis: 100%;
  min-height: 46px;
  display: grid;
  place-items: center;
  color: rgba(255, 248, 232, 0.72);
  cursor: default;
}

.hub-customer-card-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(245, 164, 0, 0.52);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 253, 245, 0.98), rgba(233, 226, 212, 0.96));
  color: #7a4d00;
  font-size: calc(11px * var(--hub-ui-scale, 1));
  font-weight: 950;
}

.hub-customer-card-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 4px;
}

.hub-customer-card-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.hub-customer-card-copy strong,
.hub-customer-card-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-customer-card-copy strong {
  color: #fff8e8;
  font-size: calc(12px * var(--hub-ui-scale, 1));
  font-weight: 850;
}

.hub-customer-card-copy small {
  color: rgba(255, 248, 232, 0.66);
  font-size: calc(10px * var(--hub-ui-scale, 1));
  font-weight: 650;
}

.hub-app-context-row.is-customer-locked .hub-app-context-control,
.hub-app-context-row.is-customer-locked .hub-app-context-summary,
.hub-app-context-row.is-customer-locked .hub-app-context-native-select,
.hub-app-context-row.is-customer-locked .hub-customer-combobox,
.hub-app-context-row.is-customer-locked .hub-customer-card-rail {
  display: none !important;
}

.hub-customer-locked-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(245, 164, 0, 0.5);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245, 164, 0, 0.16), rgba(0, 0, 0, 0.36));
  color: #fff8e8;
}

.hub-customer-locked-logo {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(245, 164, 0, 0.46);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  color: #5f4300;
  font-size: calc(12px * var(--hub-ui-scale, 1));
  font-weight: 950;
}

.hub-customer-locked-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hub-customer-locked-context > div {
  display: grid;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}

.hub-customer-locked-context span {
  color: #f5a400;
  font-size: calc(10px * var(--hub-ui-scale, 1));
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-customer-locked-context strong,
.hub-customer-locked-context small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-customer-locked-context strong {
  font-size: calc(15px * var(--hub-ui-scale, 1));
  font-weight: 900;
}

.hub-customer-locked-context small {
  color: rgba(255, 248, 232, 0.72);
  font-size: calc(11px * var(--hub-ui-scale, 1));
}

@media (max-width: 860px) {
  body.hub-shell-ready:not([data-view]) .hub-app-context-searchable .hub-app-context-control {
    grid-template-columns: 1fr;
  }

  .hub-customer-card {
    flex-basis: min(76vw, 260px);
  }
}

@media (max-width: 860px) {
  .hub-app-context-searchable .hub-app-context-control {
    grid-template-columns: 1fr;
  }

  .hub-customer-results {
    max-height: min(58vh, 420px);
  }
}

/* customer-search-stack-2026-06-04: keep app customer search above embedded iframes. */
.hub-app-context-searchable {
  position: relative;
  z-index: 12;
  overflow: visible;
}

/* customer-overflow-guard-20260606: keep hub customer cards inside the visible shell. */
body[data-view="customers"].hub-shell-ready #customersView,
body[data-view="customers"].hub-shell-ready .customer-layout,
body[data-view="customers"].hub-shell-ready .customer-form {
  min-width: 0 !important;
  max-width: 100% !important;
  overflow-x: hidden;
  overflow-x: clip;
}

body[data-view="customers"].hub-shell-ready .customer-form > *,
body[data-view="customers"].hub-shell-ready .customer-editor-card,
body[data-view="customers"].hub-shell-ready .customer-link-tiles,
body[data-view="customers"].hub-shell-ready .customer-open-points,
body[data-view="customers"].hub-shell-ready .customer-insights,
body[data-view="customers"].hub-shell-ready .customer-form .form-block,
body[data-view="customers"].hub-shell-ready .customer-form details.form-block {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-view="customers"].hub-shell-ready .customer-editor-card,
body[data-view="customers"].hub-shell-ready .customer-link-tiles,
body[data-view="customers"].hub-shell-ready .customer-open-points,
body[data-view="customers"].hub-shell-ready .customer-insights {
  width: 100% !important;
}


/* locked-customer-card-polish-20260708: visible active customer card for customer-bound apps. */
.hub-app-context-row.is-customer-locked {
  align-items: stretch;
  min-height: calc(76px * var(--hub-ui-scale, 1));
  padding: calc(8px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-context {
  display: grid;
  grid-template-columns: calc(58px * var(--hub-ui-scale, 1)) minmax(0, 1fr) auto;
  align-items: center;
  gap: calc(12px * var(--hub-ui-scale, 1));
  width: 100%;
  min-width: 0;
  min-height: calc(60px * var(--hub-ui-scale, 1));
  padding: calc(8px * var(--hub-ui-scale, 1)) calc(10px * var(--hub-ui-scale, 1));
  border: 1px solid rgba(245, 164, 0, 0.5);
  border-radius: calc(15px * var(--hub-ui-scale, 1));
  background:
    radial-gradient(circle at 8% 12%, rgba(245, 164, 0, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(47, 33, 8, 0.68));
  box-shadow: inset 0 0 0 1px rgba(255, 220, 120, 0.08), 0 12px 28px rgba(0, 0, 0, 0.26);
  color: #fff8e8;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-logo {
  width: calc(54px * var(--hub-ui-scale, 1));
  height: calc(54px * var(--hub-ui-scale, 1));
  border-radius: calc(13px * var(--hub-ui-scale, 1));
  border: 1px solid rgba(245, 164, 0, 0.56);
  background: rgba(255, 255, 255, 0.96);
  color: #5f4300;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.24);
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-copy {
  display: grid;
  gap: calc(3px * var(--hub-ui-scale, 1));
  min-width: 0;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-kicker {
  color: #f5a400;
  font-size: calc(9px * var(--hub-ui-scale, 1));
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-copy strong {
  display: block;
  overflow: hidden;
  color: #fffaf0;
  font-size: calc(17px * var(--hub-ui-scale, 1));
  font-weight: 950;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-copy small {
  display: block;
  overflow: hidden;
  color: rgba(255, 248, 232, 0.76);
  font-size: calc(11px * var(--hub-ui-scale, 1));
  font-weight: 700;
  line-height: 1.22;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hub-app-context-row.is-customer-locked .hub-customer-change-btn {
  justify-self: end;
  min-width: calc(124px * var(--hub-ui-scale, 1));
  white-space: nowrap;
}

@media (max-width: 760px) {
  .hub-app-context-row.is-customer-locked .hub-customer-locked-context {
    grid-template-columns: calc(48px * var(--hub-ui-scale, 1)) minmax(0, 1fr);
  }

  .hub-app-context-row.is-customer-locked .hub-customer-change-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* locked-customer-fullwidth-20260708: locked customer card must span the app content width. */
.hub-app-context-row.is-customer-locked {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 0;
  margin-bottom: calc(12px * var(--hub-ui-scale, 1));
  padding: calc(8px * var(--hub-ui-scale, 1));
  overflow: visible;
}

.hub-app-context-row.is-customer-locked > .hub-app-context-logo {
  display: none !important;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-context {
  grid-column: 1 / -1;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
}

.hub-app-context-row.is-customer-locked + * {
  position: relative;
  z-index: 1;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: calc(5px * var(--hub-ui-scale, 1));
}


/* locked-customer-single-card-20260709: remove doubled frame around active customer card. */
.hub-app-context-row.is-customer-locked {
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  margin: 0 0 calc(10px * var(--hub-ui-scale, 1)) !important;
  padding: 0 !important;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-context {
  min-height: calc(66px * var(--hub-ui-scale, 1));
  padding: calc(10px * var(--hub-ui-scale, 1)) calc(12px * var(--hub-ui-scale, 1));
  border-radius: calc(14px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-logo {
  width: calc(50px * var(--hub-ui-scale, 1));
  height: calc(50px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-copy strong,
.hub-app-context-row.is-customer-locked .hub-customer-locked-copy small {
  max-width: 100%;
}


/* locked-customer-spacing-20260709: polished vertical rhythm for active customer card. */
.hub-app-context-row.is-customer-locked {
  margin: calc(2px * var(--hub-ui-scale, 1)) 0 calc(14px * var(--hub-ui-scale, 1)) !important;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-context {
  grid-template-columns: calc(56px * var(--hub-ui-scale, 1)) minmax(0, 1fr) auto;
  min-height: calc(72px * var(--hub-ui-scale, 1));
  padding: calc(10px * var(--hub-ui-scale, 1)) calc(14px * var(--hub-ui-scale, 1));
  border-radius: calc(16px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-logo {
  width: calc(52px * var(--hub-ui-scale, 1));
  height: calc(52px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-copy {
  align-content: center;
  gap: calc(4px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-kicker {
  line-height: 1;
}

.hub-app-context-row.is-customer-locked .hub-customer-locked-copy strong {
  font-size: calc(18px * var(--hub-ui-scale, 1));
  line-height: 1.05;
}

.hub-app-context-row.is-customer-locked .hub-customer-change-btn {
  align-self: center;
  min-height: calc(36px * var(--hub-ui-scale, 1));
}

.hub-app-context-row.is-customer-locked + section,
.hub-app-context-row.is-customer-locked + .cert-shell-frame-card,
.hub-app-context-row.is-customer-locked + .gbu-shell-frame-card,
.hub-app-context-row.is-customer-locked + .begehung-shell-frame-card,
.hub-app-context-row.is-customer-locked + .audit-shell-frame-card,
.hub-app-context-row.is-customer-locked + .qualimatrix-shell-frame-card {
  margin-top: calc(2px * var(--hub-ui-scale, 1));
}
