/* Shared theme controls and contrast layer */
.theme-switcher {
  position:relative;
  display:inline-block;
}
.theme-trigger {
  display:inline-flex;
  width:38px;
  min-width:38px;
  height:36px;
  align-items:center;
  justify-content:center;
  gap:0;
  padding:0;
  border:1px solid #d9e1ec;
  border-radius:9px;
  color:#445269;
  background:#f7f9fc;
  font:600 11px/1 Inter,system-ui,sans-serif;
  cursor:pointer;
}
.theme-trigger:hover { color:#1746c7; border-color:#bfccec; background:#fff; }
.theme-trigger span { font-size:13px; }

/* Stronger light-mode contrast */
html[data-theme="light"] .landing-page { --muted:#526078; }
html[data-theme="light"] .landing-page :is(.hero-copy>p,.section-heading>p,.feature-card p,.step-card p,.developer-copy p,.cta-inner p,.footer-brand p) { color:#526078; }
html[data-theme="light"] .landing-page :is(.price-card li,.pricing-note,.status-track,.hero-proof p) { color:#5d6a80; }
html[data-theme="light"] .landing-page :is(.feature-card h3,.step-card h3,.price-card strong) { color:#14213a; }

/* Landing dark mode */
html[data-theme="dark"] .landing-page {
  --ink:#eef4ff;
  --muted:#b5c1d3;
  --line:#263750;
  --soft:#0d192a;
  --white:#0b1728;
  color:#e8eef8;
  background:#071220;
}
html[data-theme="dark"] .landing-page .site-header { border-color:#263750; background:rgba(7,18,32,.90); }
html[data-theme="dark"] .landing-page :is(.brand,.desktop-nav a,.text-link) { color:#dce6f5; }
html[data-theme="dark"] .landing-page .hero { background:linear-gradient(180deg,#091728 0%,#0b192b 100%); }
html[data-theme="dark"] .landing-page .hero::after { border-color:#20324a; }
html[data-theme="dark"] .landing-page :is(.hero-copy h1,.section-heading h2,.cta-inner h2) { color:#f3f7ff; }
html[data-theme="dark"] .landing-page :is(.hero-copy>p,.section-heading>p,.feature-card p,.step-card p,.cta-inner p,.pricing-note,.hero-proof p) { color:#b8c4d5; }
html[data-theme="dark"] .landing-page .button-ghost,
html[data-theme="dark"] .landing-page .button-outline { color:#dce6f5; border-color:#34465f; background:#101f33; }
html[data-theme="dark"] .landing-page .status-strip { border-color:#263750; background:#0a1727; }
html[data-theme="dark"] .landing-page :is(.status-title,.status-track) { color:#b7c3d4; }
html[data-theme="dark"] .landing-page .section { background:#071220; }
html[data-theme="dark"] .landing-page .steps-section { background:#0b1728; }
html[data-theme="dark"] .landing-page :is(.feature-card,.step-card,.price-card) { border-color:#263750; background:#0d1b2d; }
html[data-theme="dark"] .landing-page :is(.feature-card h3,.step-card h3,.price-top span,.price strong) { color:#eef4ff; }
html[data-theme="dark"] .landing-page :is(.feature-card p,.step-card p,.price-card li,.price-top strong) { color:#b9c5d7; }
html[data-theme="dark"] .landing-page .payload-demo { border-color:#2b3d56; background:#101f33; }
html[data-theme="dark"] .landing-page .payload-demo code { color:#8dc8ff; }
html[data-theme="dark"] .landing-page .merchant-list span { border-color:#2a3c54; background:#101f33; }
html[data-theme="dark"] .landing-page .merchant-list b { color:#dce6f5; }
html[data-theme="dark"] .landing-page .steps-grid { border-color:#263750; background:#263750; }
html[data-theme="dark"] .landing-page .pricing-section { background:#071220; }
html[data-theme="dark"] .landing-page .price { border-color:#2a3c54; }
html[data-theme="dark"] .landing-page .developer-section { background:#071220; }
html[data-theme="dark"] .landing-page .cta-section { background:#071220; }
html[data-theme="dark"] .landing-page .hero-console { border-color:#33465f; background:#0b192b; box-shadow:0 35px 90px rgba(0,0,0,.35); }
html[data-theme="dark"] .landing-page .console-topbar { border-color:#2a3b52; background:#101f33; }
html[data-theme="dark"] .landing-page :is(.console-brand,.console-heading h3,.mini-stats strong,.chart-label strong,.activity-row b) { color:#edf4ff; }
html[data-theme="dark"] .landing-page .console-content { background:#0b192b; }
html[data-theme="dark"] .landing-page :is(.mini-stats>div,.chart-card,.activity-card) { border-color:#2a3b52; background:#101f33; }
html[data-theme="dark"] .landing-page :is(.mini-stats span,.console-heading small,.activity-row small,.chart-label span) { color:#aab8cc; }
html[data-theme="dark"] .landing-page .bars { border-color:#33465f; background:repeating-linear-gradient(to bottom,transparent 0,transparent 34px,#263750 35px); }
html[data-theme="dark"] .landing-page .activity-row { border-color:#293a52; }
html[data-theme="dark"] .landing-page .floating-payment { border-color:#2b4a47; background:#102239; }
html[data-theme="dark"] .landing-page .floating-payment strong { color:#eef4ff; }
html[data-theme="dark"] .landing-page .floating-payment small { color:#b2bfd1; }

html[data-theme="dark"] .theme-trigger { color:#c1cde0; border-color:#34465f; background:#0e1d30; }
html[data-theme="dark"] .theme-trigger:hover { color:#fff; border-color:#496282; background:#14263d; }

@media(max-width:1180px) { .header-theme .theme-trigger { min-width:38px; width:38px; padding:0; justify-content:center; } }
@media(max-width:760px) { .header-actions { gap:9px; } }

/* Switcher placement */
.auth-panel { position:relative; }
.auth-theme { position:absolute; top:24px; right:28px; }
.sidebar-theme { margin:4px 20px 10px; }
.sidebar-theme.theme-switcher { display:block; width:38px; }
.docs-theme { margin:0 8px 17px; }
.docs-theme.theme-switcher { display:block; width:38px; }
.checkout-theme { display:flex; min-height:49px; align-items:center; justify-content:space-between; gap:12px; padding:7px 24px; border-bottom:1px solid #e5eaf1; background:#fafbfd; }
.checkout-theme>span { color:#657188; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.08em; }
.checkout-theme .theme-trigger { width:31px; min-width:31px; height:29px; padding:0; font-size:10px; }

/* Stronger contrast across application pages */
html[data-theme="light"] .auth-card :is(.auth-heading p,.auth-help) { color:#58667d; }
html[data-theme="light"] .auth-card .form-group label { color:#344157; }
html[data-theme="light"] .app-layout {
  --text-primary:#17243b;
  --text-secondary:#536177;
  --text-muted:#6f7c91;
  --accent:#1746c7;
  --accent-hover:#123aa7;
  --success:#087d68;
  --warning:#8a5500;
  --danger:#c32f43;
  --info:#087695;
}
html[data-theme="light"] .docs-page :is(p,li,td) { color:#536177; }
html[data-theme="light"] .docs-page nav a { color:#55647a; }
html[data-theme="light"] .playground-notice small,
html[data-theme="light"] .playground-sidebar-footer small { color:#65738a; }
html[data-theme="light"] .checkout-body :is(.checkout-hint,.timer-label,.payment-state-copy,.checkout-guide li) { color:#59677e; }

/* Authentication dark mode */
html[data-theme="dark"] .auth-body { color:#e9f0fb; background:#071220; }
html[data-theme="dark"] .auth-panel { background:#091626; }
html[data-theme="dark"] .auth-heading h2 { color:#f2f6fd; }
html[data-theme="dark"] .auth-heading p,
html[data-theme="dark"] .auth-help { color:#b1bfd2; }
html[data-theme="dark"] .auth-back { color:#b6c3d5; }
html[data-theme="dark"] .auth-card .login-tabs { border-color:#2a3c55; background:#0d1c2f; }
html[data-theme="dark"] .auth-card .login-tabs button { color:#aebbd0; }
html[data-theme="dark"] .auth-card .login-tabs button.active { color:#fff; background:#1b2e48; box-shadow:none; }
html[data-theme="dark"] .auth-card .form-group label { color:#d2dcea; }
html[data-theme="dark"] .auth-card .form-group input { color:#eef4ff; border-color:#30435d; background:#0d1b2d; }
html[data-theme="dark"] .auth-card .form-group input::placeholder { color:#7f8ea4; }

/* Dashboard and Playground dark mode */
html[data-theme="dark"] .app-layout {
  --bg-primary:#071220;
  --bg-secondary:#0c192a;
  --bg-card:#0d1b2d;
  --bg-card-hover:#122238;
  --bg-input:#0a1728;
  --bg-sidebar:#091626;
  --border:#283a53;
  --border-light:#38506e;
  --text-primary:#e8eef8;
  --text-secondary:#b7c3d4;
  --text-muted:#91a0b5;
  --text-heading:#f4f7fc;
  --success-bg:rgba(8,189,165,.13);
  --warning-bg:rgba(245,158,11,.14);
  --danger-bg:rgba(239,68,68,.14);
  --info-bg:rgba(59,130,246,.14);
  --shadow:0 18px 50px rgba(0,0,0,.28);
  --shadow-sm:0 5px 18px rgba(0,0,0,.22);
}
html[data-theme="dark"] :is(.playground-page,.checkout-body) { background:#071220; }
html[data-theme="dark"] .app-layout .sidebar { border-color:#283a53; background:#091626; box-shadow:4px 0 24px rgba(0,0,0,.18); }
html[data-theme="dark"] .dashboard-brand { color:#eef4ff; }
html[data-theme="dark"] .app-layout .nav-item:hover { color:#fff; background:#102138; }
html[data-theme="dark"] .app-layout .nav-item.active { color:#9eb8ff; border-color:#314a71; background:#172b48; }
html[data-theme="dark"] .sidebar-footer,
html[data-theme="dark"] .playground-sidebar-footer { border-color:#283a53; }
html[data-theme="dark"] .sidebar-user-copy .user-name { color:#f1f5fb; }
html[data-theme="dark"] .sidebar-user-copy span,
html[data-theme="dark"] .playground-sidebar-footer small { color:#98a8bd; }
html[data-theme="dark"] .account-summary { border-color:#2d405a; background:linear-gradient(100deg,#0d1b2d,#102139); }
html[data-theme="dark"] .account-plan strong,
html[data-theme="dark"] .account-metrics strong { color:#eef4ff; }
html[data-theme="dark"] .account-plan small,
html[data-theme="dark"] .account-metrics small { color:#a0aec1; }
html[data-theme="dark"] .account-metrics div { border-color:#34465e; }
html[data-theme="dark"] .dashboard-welcome p,
html[data-theme="dark"] .quick-heading p,
html[data-theme="dark"] .card-header p { color:#aab8cb; }
html[data-theme="dark"] .app-layout :is(.card,.stat-card,.quick-grid button) { border-color:#283a53; background:#0d1b2d; }
html[data-theme="dark"] .quick-grid button:hover { border-color:#3a5270; }
html[data-theme="dark"] .quick-grid strong,
html[data-theme="dark"] .recent-item>div>strong { color:#e7eef9; }
html[data-theme="dark"] .quick-grid small,
html[data-theme="dark"] .recent-item small { color:#9facbf; }
html[data-theme="dark"] .recent-item { border-color:#283a53; }
html[data-theme="dark"] .app-layout :is(input,select,textarea) { color:#e9f0fa; border-color:#30435c; background:#0a1728; }
html[data-theme="dark"] .app-layout :is(thead th) { color:#9faec2; border-color:#283a53; }
html[data-theme="dark"] .app-layout tbody td { color:#d1dbea; border-color:#283a53; }
html[data-theme="dark"] .app-layout tbody tr:hover { background:#112238; }
html[data-theme="dark"] .app-layout .modal,
html[data-theme="dark"] .app-layout .toast { border-color:#30435c; background:#0d1b2d; }
html[data-theme="dark"] .playground-notice { border-color:#2d466b; background:#10233e; }
html[data-theme="dark"] .playground-notice strong { color:#dce7f6; }
html[data-theme="dark"] .playground-notice small { color:#aab9cd; }
html[data-theme="dark"] .playground-page #apiTabs { border-color:#2b3e57; background:#091727; }
html[data-theme="dark"] .playground-page #apiTabs button { color:#aebdd0; }
html[data-theme="dark"] .playground-page #apiTabs button.active { color:#fff; background:#1a2d48; box-shadow:none; }
html[data-theme="dark"] .playground-page #codeTabs button.active { color:#b7c9ff; background:#172a47; }

/* Documentation dark mode */
html[data-theme="dark"] .docs-page { color:#e7eef8; background:#071220; }
html[data-theme="dark"] .docs-page aside { border-color:#283a53; background:#091626; }
html[data-theme="dark"] .docs-page .brand { color:#eff4fc; }
html[data-theme="dark"] .docs-page .brand small { color:#9eacc0; }
html[data-theme="dark"] .docs-page .docs-version { color:#b5c1d2; border-color:#2d4059; background:#0d1b2d; }
html[data-theme="dark"] .docs-page nav strong { color:#7f90a8; }
html[data-theme="dark"] .docs-page nav a { color:#adbbce; }
html[data-theme="dark"] .docs-page nav a:hover,
html[data-theme="dark"] .docs-page nav a.active { color:#c4d2ff; background:#172a47; }
html[data-theme="dark"] .docs-page .hero { border-color:#2d4059; background:linear-gradient(130deg,#0e1d31,#0b272b); }
html[data-theme="dark"] .docs-page :is(.hero h1,h2,h3) { color:#f0f5fd; }
html[data-theme="dark"] .docs-page :is(.hero p,p,li,td) { color:#b8c4d5; }
html[data-theme="dark"] .docs-page .hero-actions :is(a,button):not(.docs-action) { color:#d5dfed; border-color:#334963; background:#112136; }
html[data-theme="dark"] .docs-page .endpoint { color:#cdd8e7; border-color:#30445e; background:#0e1c2f; }
html[data-theme="dark"] .docs-page .card { border-color:#2d4059; background:#0d1b2d; box-shadow:none; }
html[data-theme="dark"] .docs-page table { border-color:#2d4059; }
html[data-theme="dark"] .docs-page th { color:#aab8ca; border-color:#2d4059; background:#101f33; }
html[data-theme="dark"] .docs-page td { color:#c2cedd; border-color:#2d4059; background:#0b192a; }
html[data-theme="dark"] .docs-page .note { color:#c7d5e7; border-color:#2c4a72; border-left-color:#4d8fe1; background:#10223b; }
html[data-theme="dark"] .docs-page .note.warn { border-color:#5a4827; border-left-color:#d38b15; background:#281f10; }
html[data-theme="dark"] .docs-page .note.danger { border-color:#5c2d39; border-left-color:#d84b66; background:#29141a; }
html[data-theme="dark"] .docs-page .docs-footer { border-color:#283a53; color:#96a6ba; }

/* Checkout dark mode */
html[data-theme="dark"] .checkout-page { background:radial-gradient(circle at 14% 10%,rgba(23,70,199,.17),transparent 30%),radial-gradient(circle at 88% 84%,rgba(8,189,165,.13),transparent 30%),#071220; }
html[data-theme="dark"] .checkout-page::before { opacity:.15; }
html[data-theme="dark"] .checkout-page .checkout-card { color:#e9f0fa; border-color:#2d4059; background:#0d1b2d; }
html[data-theme="dark"] .checkout-brand-row,
html[data-theme="dark"] .checkout-theme,
html[data-theme="dark"] .checkout-footer { border-color:#2b3e57; background:#0b192a; }
html[data-theme="dark"] .checkout-brand { color:#f0f5fc; }
html[data-theme="dark"] .secure-badge,
html[data-theme="dark"] .checkout-theme>span { color:#aebcd0; }
html[data-theme="dark"] .checkout-page .checkout-card .amount { color:#f3f7fd; }
html[data-theme="dark"] .checkout-body :is(.checkout-hint,.timer-label,.payment-state-copy,.checkout-guide li) { color:#b2bfd1; }
html[data-theme="dark"] .checkout-page .qr-wrapper { border-color:#33465e; }
html[data-theme="dark"] .checkout-guide { border-color:#2c3e57; }
html[data-theme="dark"] .checkout-guide>strong { color:#dde6f3; }
html[data-theme="dark"] .checkout-reference { background:#101f33; }
html[data-theme="dark"] .checkout-reference span { color:#9eacc0; }
html[data-theme="dark"] .checkout-reference code { color:#c7d3e4; }
html[data-theme="dark"] .checkout-footer { color:#99a8bc; }

@media(max-width:850px) { .docs-theme { position:absolute; top:71px; right:14px; width:38px; margin:0; } }
@media(max-width:600px) { .auth-theme { top:18px; right:18px; }.checkout-theme .theme-trigger { min-width:34px; width:34px; justify-content:center; } }
