/* Lezhou brand refresh: shared visual system override */
:root {
  --c-brand: #0f766e;
  --c-brand-light: #14b8a6;
  --c-brand-dim: #0f5f59;
  --c-brand-dark: #134e4a;
  --c-brand-glow: rgba(20, 184, 166, .18);
  --c-accent: #2563eb;
  --c-accent-light: #60a5fa;
  --c-success: #16a34a;
  --c-warning: #d97706;
  --c-info: #2563eb;
  --grad-brand: linear-gradient(135deg, #0f766e 0%, #2563eb 100%);
  --grad-brand-h: linear-gradient(135deg, #0f5f59 0%, #1d4ed8 100%);
  --bg-root: #f5f7fb;
  --bg-inset: #edf1f7;
  --bg-surface: #ffffff;
  --bg-raised: #f8fafc;
  --bg-hover: #eef4f8;
  --border-subtle: #dfe7ef;
  --border-default: #c8d3df;
  --text-primary: #122033;
  --text-secondary: #405165;
  --text-muted: #6b7b8f;
  --sidebar-bg: #0b1720;
  --sidebar-bg-top: #0c1c27;
  --sidebar-text: #b8c5d3;
  --sidebar-text-dim: rgba(184, 197, 211, .5);
  --sidebar-hover: rgba(255, 255, 255, .06);
  --sidebar-active-bg: rgba(20, 184, 166, .14);
  --sidebar-active-border: #14b8a6;
  --sidebar-divider: rgba(255, 255, 255, .08);
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-2xl: 14px;
  --shadow-xs: 0 1px 2px rgba(18, 32, 51, .04);
  --shadow-sm: 0 1px 2px rgba(18, 32, 51, .06), 0 1px 1px rgba(18, 32, 51, .03);
  --shadow: 0 8px 18px rgba(18, 32, 51, .07);
  --shadow-md: 0 14px 28px rgba(18, 32, 51, .09);
  --shadow-lg: 0 22px 45px rgba(18, 32, 51, .12);
  --shadow-glow-brand: 0 0 0 3px var(--c-brand-glow), 0 8px 24px rgba(15, 118, 110, .16);
}

[data-theme="dark"] {
  --bg-root: #081018;
  --bg-inset: #0d1722;
  --bg-surface: #101c28;
  --bg-raised: #142232;
  --bg-hover: #192a3c;
  --border-subtle: #203244;
  --border-default: #2e455a;
  --text-primary: #edf6f9;
  --text-secondary: #b8c7d5;
  --text-muted: #8394a5;
}

body {
  letter-spacing: 0;
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .04), transparent 220px),
    var(--bg-root);
}

.side-brand .brand-icon,
.brand .logo,
.avatar {
  background: var(--grad-brand) !important;
}

.side-brand .brand-icon {
  border-radius: 8px !important;
  box-shadow: none !important;
  font-weight: 800;
}

.side-brand h1,
.logo-link,
.topnav-brand {
  letter-spacing: 0 !important;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, .08), transparent 260px),
    var(--sidebar-bg) !important;
}

.nav-section {
  letter-spacing: .06em !important;
}

.nav-item {
  border-radius: 8px !important;
  border-left: 0 !important;
  border: 1px solid transparent;
}

.nav-item.active {
  border-color: rgba(20, 184, 166, .24) !important;
  box-shadow: inset 3px 0 0 var(--c-brand-light) !important;
}

.topbar,
.pricing-topbar,
.topnav {
  background: color-mix(in srgb, var(--bg-surface) 92%, transparent) !important;
  border-bottom: 1px solid var(--border-subtle) !important;
  box-shadow: 0 1px 0 rgba(18, 32, 51, .03);
}

.panel,
.card,
.stat-card,
.chart-card,
.pricing-table,
.compare-card,
.endpoint,
.step,
.package-card {
  border-radius: 10px !important;
  border: 1px solid var(--border-subtle) !important;
  box-shadow: var(--shadow-sm) !important;
}

.panel-header,
.card-header {
  background: var(--bg-surface) !important;
}

.panel-header h2,
.card-header h2,
.card-header h3,
.page-title {
  letter-spacing: 0 !important;
}

.btn,
.btn-submit,
.btn-send,
.p-tab,
.form-input,
.form-select,
.compare-selector select,
.pagination button,
.key-full,
code:not(pre code) {
  border-radius: 8px !important;
}

.btn-primary,
.btn-submit,
.p-tab.active,
.provider-filter-all {
  background: var(--c-brand) !important;
  color: #fff !important;
  border-color: var(--c-brand) !important;
  box-shadow: none !important;
}

.btn-primary:hover,
.btn-submit:hover {
  background: var(--c-brand-dim) !important;
  transform: translateY(-1px);
}

.btn-theme-toggle,
.btn-icon {
  border-radius: 8px !important;
}

th {
  letter-spacing: .02em !important;
}

tbody tr:nth-child(even) td {
  background: color-mix(in srgb, var(--bg-raised) 66%, transparent) !important;
}

.badge-info,
.role-badge,
.speed-medium,
.provider-tag {
  background: rgba(15, 118, 110, .1) !important;
  color: var(--c-brand) !important;
}

.login-page {
  background:
    linear-gradient(180deg, #eef4f7 0%, #f7fafc 48%, #edf4f3 100%) !important;
  color: var(--text-primary);
}

.login-page .bg-orb,
.login-page #particles {
  display: none !important;
}

.login-page .bg-grid {
  background-image:
    linear-gradient(rgba(18, 32, 51, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 32, 51, .045) 1px, transparent 1px) !important;
  background-size: 40px 40px !important;
  mask-image: linear-gradient(#000, transparent 84%) !important;
}

.login-card {
  background: rgba(255, 255, 255, .86) !important;
  border: 1px solid rgba(18, 32, 51, .1) !important;
  box-shadow: 0 28px 70px rgba(18, 32, 51, .14) !important;
  border-radius: 14px !important;
}

.login-card .brand h1 {
  color: #122033 !important;
}

.login-card .brand h1 em {
  background: none !important;
  -webkit-background-clip: initial !important;
  -webkit-text-fill-color: var(--c-brand) !important;
  color: var(--c-brand) !important;
}

.login-card .brand p,
.toggle-link,
.form-hint {
  color: rgba(64, 81, 101, .72) !important;
}

.login-card .mode-toggle {
  background: #edf3f7 !important;
  border-color: #dfe7ef !important;
}

.login-card .mode-toggle button {
  color: #657789 !important;
}

.login-card .mode-toggle button.active {
  background: #fff !important;
  color: var(--c-brand) !important;
  box-shadow: 0 1px 2px rgba(18, 32, 51, .08) !important;
}

.login-card .field input {
  background: #fff !important;
  color: #122033 !important;
  border-color: #cfd9e5 !important;
}

.login-card .field input::placeholder {
  color: #8b99a8 !important;
}

.pricing-hero h1,
.hero h1 {
  color: var(--text-primary) !important;
  background: none !important;
  -webkit-text-fill-color: currentColor !important;
}

.pricing-hero,
.hero {
  max-width: 980px !important;
}

.pricing-page,
.section-full,
.section#errors,
.footer {
  background: var(--bg-root) !important;
}

.pricing-page {
  color: var(--text-primary);
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .06), transparent 270px),
    var(--bg-root) !important;
}

[data-theme="dark"] .pricing-page {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, .08), transparent 300px),
    var(--bg-root) !important;
}

.pricing-topbar {
  min-height: 62px;
  gap: 1rem;
}

.pricing-topbar .logo-link {
  color: var(--text-primary) !important;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  white-space: nowrap;
}

.pricing-topbar .logo-link::before {
  content: "乐";
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  font-size: .86rem;
  font-weight: 800;
}

.pricing-nav {
  padding: .18rem;
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  background: color-mix(in srgb, var(--bg-raised) 82%, transparent);
}

.pricing-nav a {
  border-radius: 8px !important;
  color: var(--text-secondary) !important;
}

.pricing-nav a.active {
  background: var(--bg-surface) !important;
  color: var(--c-brand) !important;
  box-shadow: var(--shadow-xs);
}

.pricing-hero {
  text-align: left !important;
  max-width: 1100px !important;
  padding: 3.2rem 1.5rem 2rem !important;
}

.pricing-hero h1 {
  font-size: clamp(1.8rem, 3vw, 2.4rem) !important;
  margin-bottom: .55rem !important;
}

.pricing-hero > p {
  max-width: 620px;
  color: var(--text-secondary) !important;
}

.provider-tabs {
  justify-content: flex-start !important;
  gap: .5rem !important;
  margin-top: 1.6rem;
  margin-bottom: 0 !important;
}

.p-tab {
  border-radius: 8px !important;
  background: var(--bg-surface) !important;
  border-color: var(--border-subtle) !important;
  color: var(--text-secondary) !important;
  min-height: 34px;
}

.p-tab.active {
  background: var(--c-brand) !important;
  border-color: var(--c-brand) !important;
  color: #fff !important;
}

.pricing-table-wrapper,
.compare-cards {
  max-width: 1100px !important;
}

.pricing-table-wrapper {
  overflow-x: auto;
}

.pricing-table {
  min-width: 900px;
  border-radius: 10px !important;
  background: var(--bg-surface) !important;
}

.pricing-table thead {
  background: var(--bg-raised) !important;
}

.pricing-table th {
  color: var(--text-secondary) !important;
  border-bottom-color: var(--border-subtle) !important;
}

.pricing-table td {
  color: var(--text-secondary) !important;
  border-bottom-color: var(--border-subtle) !important;
}

.pricing-table td strong,
.compare-card h3,
.spec-value {
  color: var(--text-primary) !important;
}

.pricing-table input[type="checkbox"] {
  accent-color: var(--c-brand);
}

.compare-selector {
  justify-content: flex-start !important;
}

.compare-card {
  border-radius: 10px !important;
}

.compare-remove {
  border-radius: 8px !important;
}

#pricingLangSwitcher select,
#compareLangSwitcher select,
#portalLangSwitcher select,
#adminLangSwitcher select,
#langSwitcher select {
  min-height: 32px;
  border-radius: 8px !important;
  background: var(--bg-surface) !important;
  color: var(--text-secondary) !important;
  border-color: var(--border-default) !important;
}

.image-gen-panel {
  height: calc(100vh - 57px);
  display: flex;
  flex-direction: column;
  background: var(--bg-root);
}

.image-gen-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
}

.image-gen-title {
  display: flex;
  align-items: center;
  gap: .7rem;
  min-width: 0;
}

.image-gen-mark {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: var(--grad-brand);
  color: #fff;
  font-weight: 800;
}

.image-gen-title strong {
  display: block;
  font-size: .98rem;
}

.image-gen-title span {
  display: block;
  color: var(--text-muted);
  font-size: .78rem;
}

.image-gen-frame-wrap {
  flex: 1;
  min-height: 0;
  border-top: 0;
  background: var(--bg-root);
}

#imageGenFrame {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: var(--bg-root);
}

#relayNav {
  height: 52px !important;
  padding: 0 .95rem !important;
  background: #0b1720 !important;
  color: #edf6f9 !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

#relayNav a {
  color: #b8c7d5 !important;
}

#relayNav a:hover {
  color: #fff !important;
}

#relayNav .relay-brand-pill {
  background: rgba(20, 184, 166, .16) !important;
  color: #7dd3c7 !important;
  border: 1px solid rgba(20, 184, 166, .24);
}

body.lezou-image-shell {
  background: var(--bg-root) !important;
}

body.lezou-image-shell.standalone-image-shell {
  padding-top: 52px;
}

body.lezou-image-shell.standalone-image-shell #relayNav {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2147483000 !important;
  display: flex !important;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06), 0 12px 28px rgba(0, 0, 0, .18);
}

body.lezou-image-shell.standalone-image-shell #root {
  min-height: calc(100vh - 52px) !important;
}

body.lezou-image-shell.embedded-image-shell {
  padding-top: 0;
}

body.lezou-image-shell.embedded-image-shell #root {
  height: 100vh !important;
  min-height: 100vh !important;
}

body.lezou-image-shell #root {
  background:
    linear-gradient(180deg, rgba(15, 118, 110, .04), transparent 240px),
    var(--bg-root) !important;
}

body.lezou-image-shell.dark #root {
  background:
    linear-gradient(180deg, rgba(20, 184, 166, .07), transparent 240px),
    #05090d !important;
}

body.lezou-image-shell [data-home-main] {
  padding-left: 1rem;
  padding-right: 1rem;
}

body.lezou-image-shell .rounded-3xl,
body.lezou-image-shell .rounded-\[2rem\],
body.lezou-image-shell .rounded-\[1\.5rem\] {
  border-radius: 14px !important;
}

body.lezou-image-shell .rounded-2xl,
body.lezou-image-shell .rounded-xl {
  border-radius: 10px !important;
}

body.lezou-image-shell .rounded-lg {
  border-radius: 8px !important;
}

body.lezou-image-shell .bg-blue-500,
body.lezou-image-shell .hover\:bg-blue-600:hover {
  background-color: var(--c-brand) !important;
}

body.lezou-image-shell .text-blue-500,
body.lezou-image-shell .text-blue-600,
body.lezou-image-shell .dark\:text-blue-400:is(.dark *) {
  color: var(--c-brand-light) !important;
}

body.lezou-image-shell .border-blue-500,
body.lezou-image-shell .border-blue-400,
body.lezou-image-shell .border-blue-200,
body.lezou-image-shell .border-blue-200\/80 {
  border-color: color-mix(in srgb, var(--c-brand) 42%, var(--border-default)) !important;
}

body.lezou-image-shell .accent-blue-500 {
  accent-color: var(--c-brand) !important;
}

body.lezou-image-shell .shadow-2xl,
body.lezou-image-shell .shadow-xl {
  box-shadow: 0 18px 40px rgba(18, 32, 51, .12) !important;
}

@media (max-width: 760px) {
  .topbar,
  .pricing-topbar,
  .topnav {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  .image-gen-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pricing-topbar {
    align-items: flex-start !important;
    flex-wrap: wrap;
  }

  .pricing-nav {
    order: 3;
    width: 100%;
    overflow-x: auto;
  }

  .pricing-hero {
    padding-top: 2rem !important;
  }

  .compare-selector {
    align-items: stretch !important;
    flex-direction: column;
  }

  .compare-selector select {
    width: 100%;
    min-width: 0 !important;
  }
}
