.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));
  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-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(9px * 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: 12px;
  right: 12px;
  bottom: 9px;
  width: auto;
  min-height: 26px;
  align-self: flex-end;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: nowrap;
  max-width: none;
  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(9px * 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;
}

.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 {
  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-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-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-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 .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: 176px;
  aspect-ratio: 1.08 / 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: minmax(82px, 1fr) minmax(32px, auto);
  place-items: center;
  gap: 10px;
  border: 1.5px solid rgba(245, 164, 0, 0.82);
  border-radius: var(--hub-shell-card-radius);
  padding: 18px 14px 16px;
  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:focus-visible {
  outline: 2px solid var(--hub-shell-gold-bright);
  outline-offset: 3px;
}

.hub-app-card .app-logo {
  width: clamp(70px, 6.8vw, 88px);
  height: clamp(70px, 6.8vw, 88px);
  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(12px, 0.9vw, 14px);
  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: none;
}

.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(164px, 1fr));
  gap: 16px;
}

.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);
  align-items: end;
  overflow: hidden;
  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-card > div:last-child {
  min-width: 0;
  display: grid;
  gap: 7px;
  align-content: end;
}

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

body[data-view="customers"].hub-shell-ready .customer-editor-card 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-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;
}

.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 .topbar-actions {
    min-height: auto;
    flex-wrap: wrap;
    align-items: center;
  }

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

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