/* Lightweight white-label patch for New API.
   Keeps the app close to the original light UI, hides upstream branding,
   and avoids expensive filters or continuous animations. */
:root {
  --lingbai-page: #f6f8fb;
  --lingbai-panel: rgba(255, 255, 255, 0.92);
  --lingbai-line: rgba(24, 40, 67, 0.08);
  --lingbai-accent: #23b8c7;
  --lingbai-accent-2: #637dff;
  --lingbai-ink: #172338;
}

html,
body {
  background:
    linear-gradient(180deg, rgba(22, 119, 255, 0.035), transparent 260px),
    var(--lingbai-page) !important;
}

body.codex-tech-theme footer,
body.codex-tech-theme .semi-layout-footer,
body.codex-tech-theme [data-codex-hidden-brand="true"] {
  display: none !important;
}

body.codex-tech-theme::before,
body.codex-tech-theme::after,
#codex-neural-bg {
  display: none !important;
}

body.codex-tech-theme .semi-layout,
body.codex-tech-theme .semi-layout-content,
body.codex-tech-theme .semi-navigation,
body.codex-tech-theme .semi-card,
body.codex-tech-theme .semi-table,
body.codex-tech-theme .semi-tabs-content,
body.codex-tech-theme .pricing-content,
body.codex-tech-theme .pricing-sidebar {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.codex-tech-theme .semi-card,
body.codex-tech-theme .semi-table,
body.codex-tech-theme .semi-modal-content,
body.codex-tech-theme .semi-sidesheet-content {
  border-color: var(--lingbai-line) !important;
  box-shadow: 0 8px 26px rgba(24, 40, 67, 0.06);
}

body.codex-tech-theme .semi-button-primary {
  box-shadow: 0 6px 16px rgba(22, 119, 255, 0.18);
}

body.codex-tech-theme .classic-home-page .semi-input-wrapper {
  box-shadow: 0 8px 22px rgba(24, 40, 67, 0.06);
}

body.codex-tech-theme .lingbai-shell-brand {
  position: fixed;
  top: 12px;
  left: 14px;
  z-index: 1200;
  display: inline-grid;
  grid-template-columns: 36px auto;
  grid-template-rows: 18px 14px;
  align-items: center;
  gap: 1px 9px;
  min-width: 178px;
  min-height: 42px;
  padding: 4px 12px 4px 4px;
  border: 1px solid rgba(35, 184, 199, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 26px rgba(35, 80, 120, 0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--lingbai-ink);
  text-decoration: none;
}

body.codex-tech-theme .lingbai-shell-brand img {
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  display: block;
}

body.codex-tech-theme .lingbai-shell-brand strong {
  font-size: 15px;
  line-height: 1;
  font-weight: 850;
  color: var(--lingbai-ink);
}

body.codex-tech-theme .lingbai-shell-brand small {
  font-size: 10px;
  line-height: 1;
  color: #66758c;
  letter-spacing: 0.3px;
}

body.codex-tech-theme .semi-navigation,
body.codex-tech-theme .semi-navigation-list,
body.codex-tech-theme aside {
  --semi-color-primary: var(--lingbai-accent);
}

body.codex-tech-theme .semi-navigation-item-selected,
body.codex-tech-theme .semi-navigation-item-active,
body.codex-tech-theme .semi-tabs-tab-active,
body.codex-tech-theme .semi-button-primary {
  background: linear-gradient(135deg, rgba(35, 184, 199, 0.12), rgba(99, 125, 255, 0.10)) !important;
}

body.codex-tech-theme .semi-button-primary {
  background: linear-gradient(135deg, #1677ff, #13b9b4) !important;
  border: 0 !important;
}

body.codex-tech-theme .lingbai-register-link {
  position: absolute;
  right: 30px;
  bottom: 32px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  min-height: 30px;
  padding: 6px 14px;
  border: 1px solid rgba(35, 184, 199, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #0f8f93;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  box-shadow: 0 8px 20px rgba(35, 80, 120, 0.08);
}

body.codex-tech-theme .lingbai-login-card {
  position: relative !important;
}

body.codex-tech-theme .lingbai-register-link:hover {
  color: #1677ff;
  border-color: rgba(22, 119, 255, 0.28);
  background: #ffffff;
}

@media (max-width: 720px) {
  body.codex-tech-theme .lingbai-shell-brand {
    display: none;
  }
}
