/* ==========================================================================
   Bot Uptime — Sky Blue Studio (v19)
   Hallmark · pre-emit critique: P5 H5 E5 S5 R5 V5
   Zahir Arabic + Readex Pro + IBM Plex + JetBrains Mono
   frontend-design + make-interfaces-feel-better + better-layout
   ========================================================================== */

/* --- Self-Hosted Fonts --- */
@font-face {
  font-family: 'Zahir Arabic';
  src: url('/fonts/zahir-arabic.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Readex Pro';
  src: url('/fonts/readex-arabic.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Readex Pro';
  src: url('/fonts/readex-latin.woff2') format('woff2');
  font-weight: 200 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-arabic-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-latin-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-arabic-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-latin-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-arabic-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-latin-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-arabic-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200E, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: 'IBM Plex Sans Arabic';
  src: url('/fonts/plex-latin-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+2000-206F;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/fonts/jbmono-latin.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

/* --- Sky Blue Palette Tokens --- */
:root {
  color-scheme: dark;

  /* Deep Ocean Midnight Surfaces */
  --bg: #081221;
  --bg-2: #0c182c;
  --surface: #0e1c33;
  --surface-2: #142746;
  --well: #060d18;

  --border: rgba(56, 189, 248, 0.17);
  --border-strong: rgba(125, 211, 252, 0.34);

  /* Verified Ink */
  --ink: #f0f8ff;
  --ink-soft: #bdd4eb;
  --ink-muted: #8fb3d4;

  /* Vibrant Sky Blue Accents */
  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-deep: #0ea5e9;
  --accent-ink: #041726;
  --ice: #bae6fd;

  /* Cloud Horizon Layers */
  --cloud-back: #7dd3fc;
  --cloud-mid: #12558d;
  --cloud-front: #081221;

  /* Semantic Accents */
  --emerald: #22c55e;
  --emerald-bright: #4ade80;
  --amber: #fbbf24;
  --rose: #fb7185;
  --discord: #4f5ce6;
  --discord-hover: #5865f2;

  /* Typography */
  --font-display: 'Zahir Arabic', 'Readex Pro', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-sans: 'Zahir Arabic', 'IBM Plex Sans Arabic', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;

  /* Layered Elevation Shadows */
  --shadow-card: 0 1px 2px rgba(2, 8, 20, 0.35), 0 10px 28px rgba(2, 8, 20, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-card-hover: 0 2px 4px rgba(2, 8, 20, 0.40), 0 22px 52px rgba(2, 10, 24, 0.56), inset 0 1px 0 rgba(186, 230, 253, 0.14);

  /* Geometry & Motion */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 22px;
  --r-xl: 26px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-ui: cubic-bezier(0.2, 0, 0, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --t-fast: 160ms;
  --t-base: 260ms;
}

/* --- Base & Reset --- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
  scroll-padding-bottom: 100px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background-color: var(--bg);
  background-image:
    radial-gradient(ellipse 75% 420px at 50% 0%, rgba(56, 189, 248, 0.20), transparent 72%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.78;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.has-sky { background-image: none; }
main { flex: 1 0 auto; }

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  font-style: normal;
  letter-spacing: -0.015em;
  color: #ffffff;
  text-wrap: balance;
  overflow-wrap: anywhere;
  min-width: 0;
}
p { text-wrap: pretty; }
code, pre, .mono { font-family: var(--font-mono); }

a[href], button:not(:disabled), summary, select:not(:disabled),
label[for], label.button, input[type="checkbox"]:not(:disabled),
[role="button"]:not([aria-disabled="true"]), [role="tab"] {
  cursor: pointer;
}
button:disabled, [aria-disabled="true"] { cursor: not-allowed; }

:focus-visible {
  outline: 2px solid var(--accent-hover);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; top: -100px; inset-inline-start: 16px; z-index: 100;
  padding: 10px 18px; border-radius: var(--r-sm);
  background: #ffffff; color: #06263d; font-weight: 700;
}
.skip-link:focus { top: 12px; }

.ico {
  width: 18px; height: 18px; flex: 0 0 auto;
  stroke: currentColor; fill: none;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.ico-sm { width: 15px; height: 15px; }
.ico-lg { width: 22px; height: 22px; }

.wrap { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }

/* --- Topbar Navigation --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 18, 33, 0.84);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(125, 211, 252, 0.12);
  transition: background var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
body.has-sky .topbar {
  background: rgba(11, 108, 178, 0.72);
  border-bottom-color: rgba(255, 255, 255, 0.14);
}
.topbar.scrolled {
  background: rgba(8, 18, 33, 0.94);
  border-bottom-color: rgba(56, 189, 248, 0.24);
  box-shadow: 0 10px 30px rgba(2, 8, 20, 0.48);
}

.topbar-inner {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #ffffff;
  white-space: nowrap;
}
.brand-logo {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 4px 12px rgba(56, 189, 248, 0.35));
  transition: transform var(--t-base) var(--ease-spring), filter var(--t-fast) var(--ease);
}
.brand:hover .brand-logo {
  transform: scale(1.08) rotate(-4deg);
  filter: drop-shadow(0 6px 16px rgba(125, 211, 252, 0.55));
}

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  color: rgba(240, 249, 255, 0.90);
  font-size: 14.5px;
  font-weight: 500;
  border-radius: 9px;
  transition: color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  white-space: nowrap;
}
.nav-links a:hover { color: #ffffff; background: rgba(255, 255, 255, 0.14); }
.nav-links a.active { color: #ffffff; font-weight: 700; background: rgba(255, 255, 255, 0.20); }

.nav-actions { display: flex; align-items: center; gap: 8px; }
.nav-actions form { margin: 0; display: flex; }
.util-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  color: #f0f9ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.util-btn:hover {
  background: rgba(255, 255, 255, 0.20);
  border-color: rgba(186, 230, 253, 0.55);
  color: #ffffff;
  transform: translateY(-1px);
}
.util-btn:active { transform: scale(0.95); }
.util-btn.icon-only { width: 38px; padding: 0; position: relative; }
.topbar .nav-actions .button-small { height: 38px; min-height: 38px; padding: 0 14px; line-height: 1; }
.theme-toggle svg {
  position: absolute;
  transition: opacity 280ms var(--ease-ui), transform 280ms var(--ease-ui), filter 280ms var(--ease-ui);
}
.theme-toggle .ico-sun { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0px); }
.theme-toggle .ico-moon { opacity: 0; transform: scale(0.25) rotate(-30deg); filter: blur(4px); pointer-events: none; }
.theme-toggle:hover .ico-sun { transform: scale(1.06) rotate(18deg); }

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  min-height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.13);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  max-width: 170px;
}
.user-chip-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-bright); flex: 0 0 auto; }
.user-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 38px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
}
.nav-links a.mobile-only-link,
.mobile-only-link { display: none; }

/* --- Buttons --- */
.button {
  border: 1px solid transparent;
  border-radius: 11px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-base) var(--ease);
}
.button:active:not(:disabled) { transform: scale(0.97); }

/* Hero Crisp White Button on Light Blue Sky */
.button-white {
  color: #06263d;
  background: #ffffff;
  box-shadow: 0 10px 28px rgba(4, 34, 62, 0.30);
}
.button-white:hover:not(:disabled) {
  background: #f0f9ff;
  transform: translateY(-2px);
  box-shadow: 0 16px 36px rgba(4, 34, 62, 0.42);
}
.button-white .btn-arrow { transition: transform var(--t-fast) var(--ease); }
.button-white:hover .btn-arrow { transform: translateX(-4px); }
html[dir="ltr"] .button-white:hover .btn-arrow { transform: translateX(4px); }

/* Primary Vibrant Sky Blue CTA (8.48:1 contrast!) */
.button-primary {
  color: var(--accent-ink);
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 55%, #0ea5e9 100%);
  border-color: rgba(186, 230, 253, 0.55);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.30);
}
.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #bae6fd 0%, #7dd3fc 55%, #38bdf8 100%);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(56, 189, 248, 0.46);
}

.button-discord {
  color: #ffffff;
  background: linear-gradient(135deg, #5865f2 0%, #4752d6 100%);
  border-color: rgba(165, 180, 252, 0.32);
  box-shadow: 0 8px 22px rgba(88, 101, 242, 0.32);
}
.button-discord:hover:not(:disabled) {
  background: linear-gradient(135deg, #6c78ff 0%, #5865f2 100%);
  transform: translateY(-2px);
}

.button-emerald {
  color: #052014;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 6px 20px rgba(34, 197, 94, 0.28);
}
.button-emerald:hover:not(:disabled) {
  background: linear-gradient(135deg, #86efac 0%, #34d399 100%);
  transform: translateY(-2px);
}

.button-soft {
  color: #f0f8ff;
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.20);
}
.button-soft:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(186, 230, 253, 0.48);
  transform: translateY(-1px);
}

.button-sky {
  color: #bae6fd;
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(56, 189, 248, 0.38);
}
.button-sky:hover:not(:disabled) { background: rgba(56, 189, 248, 0.26); transform: translateY(-1px); }

.button-amber {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.14);
  border-color: rgba(251, 191, 36, 0.34);
}
.button-amber:hover:not(:disabled) { background: rgba(251, 191, 36, 0.24); transform: translateY(-1px); }

.button-danger {
  color: #fecdd3;
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.34);
}
.button-danger:hover:not(:disabled) { background: rgba(244, 63, 94, 0.24); transform: translateY(-1px); }

.button-small { min-height: 36px; padding: 7px 14px; font-size: 13px; border-radius: 9px; }
.button-lg { min-height: 50px; padding: 12px 26px; font-size: 15.5px; border-radius: 13px; }
.button:disabled, .button[aria-disabled="true"] { opacity: 0.54; transform: none !important; box-shadow: none; }

.link-underline {
  color: #ffffff;
  font-weight: 700;
  font-size: 15px;
  padding: 8px 4px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.55);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.link-underline:hover { border-color: #ffffff; color: #f0f9ff; }

.text-link {
  color: var(--accent-hover);
  font-weight: 600;
  background: none; border: 0; padding: 0;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--t-fast) var(--ease);
}
.text-link:hover { color: #ffffff; }

/* ==========================================================================
   SKY BLUE HERO + ICE CLOUDS + INTERACTIVE DASHBOARD WINDOW
   ========================================================================== */

.sky-hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 68% 54% at 78% 8%, rgba(125, 211, 252, 0.42), transparent 62%),
    radial-gradient(ellipse 58% 48% at 18% 22%, rgba(56, 189, 248, 0.30), transparent 60%),
    linear-gradient(180deg, #0b6db8 0%, #1182d1 46%, #0b64a8 100%);
  padding-top: 64px;
  padding-bottom: 0;
}
.sky-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.055) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 85% 70% at 50% 24%, #000 18%, transparent 82%);
  -webkit-mask-image: radial-gradient(ellipse 85% 70% at 50% 24%, #000 18%, transparent 82%);
  pointer-events: none;
  z-index: 1;
}

.hero-top-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 44px;
  align-items: center;
  margin-bottom: 52px;
  position: relative;
  z-index: 3;
}

.sky-hero h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.24;
  color: #ffffff;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 18px rgba(4, 34, 62, 0.20);
  animation: heroRise 650ms var(--ease) both;
}
html[dir="ltr"] .sky-hero h1 {
  font-size: clamp(30px, 3.6vw, 46px);
  line-height: 1.18;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  animation: heroRise 700ms var(--ease) 100ms both;
}
.hero-lead {
  margin: 0;
  font-size: 17px;
  line-height: 1.78;
  color: #ffffff;
  max-width: 46ch;
}
.hero-cta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}
.hero-runtime-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 7px 15px;
  border-radius: 999px;
  background: rgba(6, 32, 56, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.26);
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.hero-runtime-strip:hover { background: rgba(6, 32, 56, 0.52); border-color: rgba(255, 255, 255, 0.45); }
.mini-dots { display: inline-flex; gap: 5px; }
.mini-dots i { width: 9px; height: 9px; border-radius: 50%; display: block; }

/* Centered Interactive App Window Rising from Ice-Blue Clouds */
.showcase-wrap {
  position: relative;
  z-index: 4;
  max-width: 980px;
  margin-inline: auto;
  animation: heroRise 820ms var(--ease) 180ms both;
}
@keyframes heroRise {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-window {
  background: #0a1526;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 20px;
  box-shadow:
    0 2px 6px rgba(3, 14, 30, 0.45),
    0 18px 46px rgba(3, 14, 30, 0.50),
    0 42px 96px rgba(3, 14, 30, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.10);
  overflow: hidden;
  display: grid;
  grid-template-columns: 215px minmax(0, 1fr);
  min-height: 410px;
}

.app-sidebar {
  background: #07101f;
  border-inline-end: 1px solid rgba(56, 189, 248, 0.14);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.app-sb-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 14.5px; color: #fff;
}
.app-sb-nav { display: grid; gap: 4px; }
.app-sb-btn {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px 11px;
  border-radius: 9px; border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13.5px; font-weight: 500;
  text-align: start;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.app-sb-btn:hover { background: rgba(56, 189, 248, 0.10); color: #fff; }
.app-sb-btn.active { background: rgba(56, 189, 248, 0.20); color: #ffffff; font-weight: 600; }

.app-sb-group { margin-top: 6px; padding-top: 12px; border-top: 1px solid rgba(56, 189, 248, 0.12); }
.app-sb-label { font-size: 11.5px; color: var(--ink-muted); padding: 0 10px 6px; font-weight: 600; }
.app-sb-proj {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px; border-radius: 8px;
  font-size: 13px; color: var(--ink-soft);
}
.app-sb-proj.current { background: rgba(56, 189, 248, 0.12); color: #fff; font-weight: 600; }
.app-sb-count {
  font-family: var(--font-mono); font-size: 11px; font-variant-numeric: tabular-nums;
  padding: 1px 7px; border-radius: 99px;
  background: rgba(56, 189, 248, 0.22); color: #bae6fd;
}

.app-main { padding: 18px 24px 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.app-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}
.app-search-bar {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(56, 189, 248, 0.16);
  color: var(--ink-muted); font-size: 12.5px;
  min-width: 220px;
}
.app-proj-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.app-proj-head h2 { margin: 0; font-size: 20px; }
.app-proj-head p { margin: 2px 0 0; font-size: 13px; color: var(--ink-muted); }

.app-tabs { display: flex; gap: 18px; border-bottom: 1px solid rgba(56, 189, 248, 0.14); }
.app-tab {
  padding: 8px 2px 11px;
  border: 0; border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font-size: 13.5px; font-weight: 600;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.app-tab:hover { color: #fff; }
.app-tab.active { color: #ffffff; border-bottom-color: var(--accent); }

.app-view { animation: tabFade 220ms var(--ease); }
@keyframes tabFade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.app-rows { display: grid; }
.app-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) 110px 110px 76px;
  gap: 12px;
  align-items: center;
  padding: 13px 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.10);
  border-radius: 8px;
  transition: background var(--t-fast) var(--ease);
}
.app-row:last-child { border-bottom: 0; }
.app-row:hover { background: rgba(56, 189, 248, 0.08); }
.app-row-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.app-row-title > div { min-width: 0; }
.app-row-ico {
  width: 32px; height: 32px; flex: 0 0 auto;
  display: inline-grid; place-items: center;
  background: transparent; border: 0; border-radius: 0;
}
.app-row-ico.lang-ico-lg { width: 38px; height: 38px; }
.lang-img { width: 30px; height: 30px; object-fit: contain; display: block; }
.lang-ico-lg .lang-img { width: 36px; height: 36px; }
.lang-img-rust { filter: brightness(0) invert(0.95); }
.lang-img-java { filter: brightness(1.32) saturate(1.18); }
.ico-py, .ico-js, .ico-jv, .ico-rs,
.ico-python, .ico-nodejs, .ico-java, .ico-rust {
  background: transparent; border: 0;
}
.app-row-name { font-weight: 700; font-size: 14px; color: #fff; direction: ltr; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html[dir="ltr"] .app-row-name { text-align: left; }
.app-row-sub { font-size: 12px; color: var(--ink-muted); text-align: start; }
.app-row-kind { font-size: 13px; color: var(--ink-soft); }
.app-row-status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--emerald-bright); }
.app-row-status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--emerald-bright); }
.app-row-ram { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-muted); direction: ltr; text-align: left; font-variant-numeric: tabular-nums; }
html[dir="ltr"] .app-row-ram { text-align: right; }
.app-row-act { font-size: 12.5px; font-weight: 600; color: var(--accent-hover); text-align: end; }

.app-preview-console {
  background: #060d18;
  border: 1px solid rgba(56, 189, 248, 0.16);
  border-radius: 12px;
  padding: 15px 16px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  line-height: 1.9;
  direction: ltr;
  text-align: left;
  color: #cce6ff;
}

/* Sculpted Layered SVG Cloud Horizon */
.clouds-horizon {
  position: relative;
  z-index: 6;
  margin-top: -115px;
  line-height: 0;
  pointer-events: none;
  overflow: hidden;
}
.clouds-horizon svg {
  max-width: none;
  width: 114%;
  margin-inline: -7%;
  overflow: visible;
  height: auto;
  min-height: 135px;
  max-height: 210px;
}
.cloud-back { fill: var(--cloud-back); animation: cloudSwayA 18s ease-in-out infinite alternate; transform-origin: center; transition: fill 320ms var(--ease); }
.cloud-mid  { fill: var(--cloud-mid); animation: cloudSwayB 14s ease-in-out infinite alternate; transform-origin: center; transition: fill 320ms var(--ease); }
.cloud-front{ fill: var(--cloud-front); animation: cloudSwayA 22s ease-in-out infinite alternate-reverse; transform-origin: center; transition: fill 320ms var(--ease); }
@keyframes cloudSwayA { from { transform: translateX(-18px); } to { transform: translateX(18px); } }
@keyframes cloudSwayB { from { transform: translateX(22px); } to { transform: translateX(-22px); } }

/* ==========================================================================
   SECTIONS BELOW THE CLOUDS
   ========================================================================== */

.section { padding-block: 76px; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 44px; }
.section-head.section-head-split {
  text-align: start;
  max-width: none;
  margin: 0 0 40px;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: end;
}
.section-head-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.section-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 14px; border-radius: 999px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(125, 211, 252, 0.34);
  color: #bae6fd;
  font-size: 12.5px; font-weight: 700;
  margin-bottom: 14px;
}
.section-head h2 { margin: 0 0 12px; font-size: clamp(26px, 3.6vw, 40px); line-height: 1.26; }
.section-head.section-head-split h2 { margin-bottom: 0; }
.section-head p { margin: 0; color: var(--ink-soft); font-size: 16px; }

/* Scroll Reveal */
html.js-ready [data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
  transition-delay: var(--d, 0ms);
}
html.js-ready [data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Asymmetric 12-Col Bento Feature Cards (Concentric Radii & Layered Shadows) */
.feature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.feature-grid.bento-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.bento-wide { grid-column: span 7; }
.bento-narrow { grid-column: span 5; }
.feature-card {
  padding: 28px;
  border-radius: var(--r-lg);
  background: linear-gradient(160deg, #10223e 0%, #0b172b 100%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(125, 211, 252, 0.48);
  box-shadow: var(--shadow-card-hover);
}
.feature-card-highlight {
  background:
    radial-gradient(ellipse 65% 85% at 10% 0%, rgba(56, 189, 248, 0.22), transparent 65%),
    linear-gradient(155deg, #0f2c4e 0%, #0a182d 100%);
  border-color: rgba(125, 211, 252, 0.34);
}
.feature-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.feature-meta-pill {
  font-size: 11.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(125, 211, 252, 0.24);
  color: #bae6fd;
  white-space: nowrap;
}
.icon-tile { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; flex: 0 0 auto; }
.tile-indigo  { color: #7dd3fc; background: rgba(56, 189, 248, 0.16); border: 1px solid rgba(125, 211, 252, 0.34); }
.tile-sky     { color: #bae6fd; background: rgba(14, 165, 233, 0.18); border: 1px solid rgba(56, 189, 248, 0.36); }
.tile-emerald { color: #86efac; background: rgba(34, 197, 94, 0.16); border: 1px solid rgba(74, 222, 128, 0.32); }
.tile-amber   { color: #fde68a; background: rgba(251, 191, 36, 0.16); border: 1px solid rgba(251, 191, 36, 0.32); }
.feature-card h3 { margin: 0 0 10px; font-size: 21px; line-height: 1.32; }
.feature-card p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.80; }

/* Languages Grid */
.lang-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.lang-card {
  padding: 24px 20px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform var(--t-base) var(--ease), border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.lang-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-card-hover); }
.lang-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lang-card h3 { margin: 4px 0 0; font-size: 17px; }
.lang-card p { margin: 0; color: var(--ink-muted); font-size: 13.5px; line-height: 1.72; }
.lang-card-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; font-size: 12.5px;
}
.lang-card-foot code { color: #bae6fd; background: rgba(56, 189, 248, 0.14); padding: 3px 9px; border-radius: 7px; direction: ltr; }

/* Luminous Horizon-Beam Pricing Cards (Obsidian Free · Sky-Cyan Beam Developer · Royal Violet Beam Pro) */
.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; align-items: stretch; }
.plan-card {
  position: relative; overflow: hidden;
  padding: 32px 28px 30px; border-radius: 22px;
  background: linear-gradient(180deg, #091324 0%, #050b16 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.16);
  box-shadow: 0 20px 54px rgba(2, 8, 20, 0.56);
  display: flex; flex-direction: column;
  transition: transform 260ms var(--ease), box-shadow 260ms var(--ease), border-color 260ms var(--ease);
}
.plan-card:hover { transform: translateY(-5px); }

/* Tier 1: Free — Deep Obsidian Matte Navy */
.plan-tier-free {
  background: linear-gradient(180deg, #0b1526 0%, #060d19 100%);
  border-color: rgba(148, 163, 184, 0.18);
}
.plan-tier-free:hover {
  border-color: rgba(148, 163, 184, 0.34);
  box-shadow: 0 26px 60px rgba(2, 8, 20, 0.72);
}

/* Tier 2: Developer — Electric Sky-Cyan Luminous Horizon Beam */
.plan-tier-starter, .plan-card.featured {
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg,
      #061121 0%,
      #0a1d35 28%,
      #0b365e 52%,
      #082452 72%,
      #050e20 100%
    ) padding-box,
    linear-gradient(180deg,
      rgba(148, 163, 184, 0.30) 0%,
      rgba(186, 230, 253, 0.92) 42%,
      rgba(56, 189, 248, 0.95) 66%,
      rgba(37, 99, 235, 0.78) 100%
    ) border-box;
  box-shadow: 0 24px 64px rgba(14, 165, 233, 0.24), inset 0 1px 0 rgba(186, 230, 253, 0.16);
}
.plan-tier-starter:hover, .plan-card.featured:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 78px rgba(14, 165, 233, 0.36), inset 0 1px 0 rgba(224, 242, 254, 0.28);
}

/* Tier 3: Pro — Royal Violet-Magenta Luminous Horizon Beam */
.plan-tier-pro {
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg,
      #080d1d 0%,
      #1a1030 28%,
      #421863 52%,
      #1d1147 72%,
      #060918 100%
    ) padding-box,
    linear-gradient(180deg,
      rgba(148, 163, 184, 0.30) 0%,
      rgba(245, 208, 254, 0.92) 42%,
      rgba(192, 38, 211, 0.95) 66%,
      rgba(126, 34, 206, 0.80) 100%
    ) border-box;
  box-shadow: 0 24px 64px rgba(168, 85, 247, 0.24), inset 0 1px 0 rgba(245, 208, 254, 0.16);
}
.plan-tier-pro:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 78px rgba(168, 85, 247, 0.36), inset 0 1px 0 rgba(250, 232, 255, 0.28);
}

/* Header & Tracked Uppercase Tier Title */
.plan-head { position: relative; z-index: 2; }
.plan-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.plan-head h3 {
  margin: 0; font-size: 13.5px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: #f1f7ff;
}
.plan-head p {
  margin: 0; font-size: 13.5px; line-height: 1.55;
  color: rgba(203, 213, 225, 0.72);
  min-height: 42px;
}

/* Subtle Refined Tier Badges */
.plan-badge-free { background: rgba(148, 163, 184, 0.12); color: #cbd5e1; border: 1px solid rgba(148, 163, 184, 0.24); font-size: 11px; padding: 3px 9px; }
.plan-badge-starter { background: rgba(56, 189, 248, 0.18); color: #bae6fd; border: 1px solid rgba(125, 211, 252, 0.40); font-size: 11px; padding: 3px 9px; }
.plan-badge-pro { background: rgba(192, 132, 252, 0.18); color: #f5d0fe; border: 1px solid rgba(232, 121, 249, 0.40); font-size: 11px; padding: 3px 9px; }
.plan-badge-gold { background: linear-gradient(135deg, #f59e0b, #f97316); color: #09111f; border: 0; font-weight: 800; box-shadow: 0 4px 14px rgba(245, 158, 11, 0.36); }

/* Large Crisp Price Numeral */
.plan-price {
  position: relative; z-index: 2;
  margin: 22px 0 24px;
  font-family: var(--font-display); font-size: 44px; font-weight: 600; color: #ffffff;
  font-variant-numeric: tabular-nums; letter-spacing: -0.03em; line-height: 1.05;
  display: flex; align-items: baseline; gap: 8px;
}
.plan-price-num { color: #ffffff; }
.plan-price small { font-size: 13px; color: rgba(226, 232, 240, 0.72); font-weight: 500; letter-spacing: 0; }

/* Luminous Horizon Light Beam Anchored Dead-Center Behind the Pill Button */
.plan-action {
  position: relative; z-index: 2;
  margin-bottom: 28px;
}
.plan-tier-starter .plan-action::before,
.plan-tier-pro .plan-action::before {
  content: '';
  position: absolute;
  left: -32px; right: -32px;
  top: 50%; transform: translateY(-50%);
  height: 210px;
  z-index: 0;
  pointer-events: none;
}
.plan-tier-starter .plan-action::before {
  background:
    radial-gradient(ellipse 95% 42% at 50% 50%, rgba(255, 255, 255, 0.92) 0%, rgba(186, 230, 253, 0.72) 28%, rgba(56, 189, 248, 0.42) 55%, transparent 82%),
    linear-gradient(180deg,
      rgba(56, 189, 248, 0) 0%,
      rgba(125, 211, 252, 0.28) 26%,
      rgba(224, 242, 254, 0.85) 45%,
      rgba(255, 255, 255, 0.96) 50%,
      rgba(56, 189, 248, 0.82) 58%,
      rgba(2, 132, 199, 0.52) 74%,
      rgba(2, 132, 199, 0) 100%
    );
  filter: blur(8px);
}
.plan-tier-pro .plan-action::before {
  background:
    radial-gradient(ellipse 95% 42% at 50% 50%, rgba(255, 255, 255, 0.92) 0%, rgba(245, 208, 254, 0.72) 28%, rgba(192, 38, 211, 0.44) 55%, transparent 82%),
    linear-gradient(180deg,
      rgba(192, 38, 211, 0) 0%,
      rgba(216, 180, 254, 0.28) 26%,
      rgba(250, 232, 255, 0.85) 45%,
      rgba(255, 255, 255, 0.96) 50%,
      rgba(217, 70, 239, 0.82) 58%,
      rgba(126, 34, 206, 0.54) 74%,
      rgba(126, 34, 206, 0) 100%
    );
  filter: blur(8px);
}

/* Pill CTA Buttons */
.plan-card .button { width: 100%; border-radius: 999px; min-height: 46px; }
.plan-cta { position: relative; z-index: 2; overflow: hidden; font-weight: 700; font-size: 14px; border: 0; border-radius: 999px; }
.plan-cta-free {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #f8fafc;
}
.plan-cta-free:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.28);
  color: #ffffff;
}
.plan-cta-starter,
.plan-cta-pro {
  background: #ffffff;
  color: #060f1e;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.26), 0 0 24px rgba(255, 255, 255, 0.35);
}
.plan-cta-starter:hover,
.plan-cta-pro:hover {
  background: #f0f9ff;
  color: #030b17;
  transform: translateY(-1px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.34), 0 0 32px rgba(255, 255, 255, 0.52);
}
.plan-cta-gold {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 55%, #f97316 100%);
  color: #0b1120; box-shadow: 0 8px 24px rgba(245, 158, 11, 0.38);
}
.plan-cta-gold:hover { filter: brightness(1.07); color: #0b1120; box-shadow: 0 12px 30px rgba(245, 158, 11, 0.54); }

/* Clean Minimal Feature List Below Pill CTA */
.plan-list {
  position: relative; z-index: 2;
  margin: 0; padding: 0; list-style: none;
  display: grid; gap: 13px;
  color: rgba(226, 238, 252, 0.88); font-size: 13.8px; line-height: 1.48;
}
.plan-tier-free .plan-list { color: rgba(203, 213, 225, 0.80); }
.plan-list li { display: flex; align-items: flex-start; gap: 10px; }
.plan-tick {
  width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px;
  display: grid; place-items: center;
  background: transparent; color: rgba(226, 238, 252, 0.78);
}
.plan-tier-starter .plan-tick { color: #bae6fd; }
.plan-tier-pro .plan-tick { color: #f5d0fe; }
.plan-tier-pro .plan-feat-hot strong { color: #fde68a; }
.plan-tier-starter .plan-feat-hot { color: #ffffff; }

/* Radiant $1 No-Renewal Pass Icon */
.renew-pass-ico {
  width: 46px; height: 46px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.26), rgba(249, 115, 22, 0.22));
  border: 1px solid rgba(251, 191, 36, 0.48); color: #fcd34d;
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.24);
}

/* Editorial Split FAQ */
.faq-split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 40px;
  align-items: start;
}
.faq-aside {
  position: sticky;
  top: 96px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
}
.faq-aside .section-kicker { margin-bottom: 0; }
.faq-aside h2 { margin: 0; font-size: clamp(26px, 3.2vw, 36px); line-height: 1.26; }
.faq-aside p { margin: 0 0 4px; color: var(--ink-soft); font-size: 15.5px; }
.faq-list { display: grid; gap: 12px; min-width: 0; }
.faq-item { border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card); overflow: hidden; transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.faq-item[open] { border-color: rgba(125, 211, 252, 0.48); }
.faq-item summary { list-style: none; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center; gap: 14px; font-family: var(--font-display); font-size: 16.5px; font-weight: 700; color: #fff; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-chevron { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: rgba(56, 189, 248, 0.16); color: #7dd3fc; flex: 0 0 auto; transition: transform var(--t-base) var(--ease); }
.faq-item[open] .faq-chevron { transform: rotate(180deg); }
.faq-body { padding: 0 22px 20px; color: var(--ink-soft); font-size: 14.5px; line-height: 1.84; }
.faq-body code { color: #bae6fd; background: rgba(56, 189, 248, 0.15); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; direction: ltr; display: inline-block; }
.faq-body .text-link { display: inline; text-decoration: underline; text-underline-offset: 3px; }

/* Final Light-Blue Sky CTA Banner */
.cta-banner {
  padding: 44px 38px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(circle at 12% 20%, rgba(125, 211, 252, 0.34), transparent 50%),
    linear-gradient(135deg, #0d7ec9 0%, #085999 100%);
  border: 1px solid rgba(186, 230, 253, 0.40);
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.cta-banner h2 { margin: 0 0 8px; font-size: clamp(24px, 3.2vw, 34px); }
.cta-banner p { margin: 0; color: #f0f9ff; font-size: 15.5px; max-width: 52ch; }

/* ==========================================================================
   APP SCREENS — Dashboard, Bot Control Panel, Guides, Admin, Auth, Legal
   ========================================================================== */

.page { padding-block: 40px 80px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 28px; }
.page-head h1 { margin: 0; font-size: clamp(26px, 3.8vw, 40px); line-height: 1.2; }
.page-head p { margin: 8px 0 0; color: var(--ink-soft); max-width: 62ch; font-size: 15px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.panel-pad { padding: 26px; }
.panel-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 20px; }
.panel-head h2, .panel-head h3 { margin: 0; font-size: 20px; }
.panel-head p { margin: 5px 0 0; color: var(--ink-muted); font-size: 14px; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 11px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  border: 1px solid transparent; white-space: nowrap;
}
.badge-python  { color: #fde68a; background: rgba(251, 191, 36, 0.14); border-color: rgba(251, 191, 36, 0.30); }
.badge-node    { color: #86efac; background: rgba(34, 197, 94, 0.14); border-color: rgba(74, 222, 128, 0.30); }
.badge-java    { color: #fdba74; background: rgba(249, 115, 22, 0.14); border-color: rgba(251, 146, 60, 0.30); }
.badge-rust    { color: #fda4af; background: rgba(244, 63, 94, 0.14); border-color: rgba(251, 113, 133, 0.30); }
.badge-indigo  { color: #bae6fd; background: rgba(56, 189, 248, 0.18); border-color: rgba(125, 211, 252, 0.38); }
.badge-emerald { color: #86efac; background: rgba(34, 197, 94, 0.16); border-color: rgba(74, 222, 128, 0.34); }
.badge-sky     { color: #bae6fd; background: rgba(56, 189, 248, 0.15); border-color: rgba(56, 189, 248, 0.34); }
.badge-danger  { color: #fecdd3; background: rgba(244, 63, 94, 0.15); border-color: rgba(244, 63, 94, 0.34); }
.badge-neutral { color: var(--ink-soft); background: rgba(255, 255, 255, 0.07); border-color: var(--border-strong); }

/* Stat Cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-grid.monitor-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stat-card {
  padding: 20px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.stat-label { font-size: 13px; color: var(--ink-muted); font-weight: 500; }
.stat-value { font-family: var(--font-display); font-size: 25px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.stat-foot { font-size: 12px; color: var(--ink-muted); }

/* Forms */
.form-grid { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(220px, 1fr) auto; gap: 14px; align-items: end; }
.form-grid-single { display: grid; grid-template-columns: minmax(220px, 1fr) auto; gap: 14px; align-items: end; }
.form-grid .button, .form-grid-single .button, .inline-form .button, .var-card-row .button { min-height: 45px; }
.picker-label { display: block; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.field { display: block; }
.field label, .field > span:first-child { display: block; color: var(--ink-soft); font-size: 13.5px; font-weight: 600; margin-bottom: 7px; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input, .select, .textarea {
  width: 100%; min-height: 45px;
  color: #fff; background: var(--well);
  border: 1px solid var(--border-strong);
  border-radius: 11px; padding: 10px 14px; font-size: 14.5px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-muted); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.22);
}
.select option { background: #0e1c33; color: #fff; }
.pw-toggle { position: absolute; inset-inline-end: 7px; min-height: 32px; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.pw-toggle:hover { color: #fff; border-color: var(--border-strong); }
.input-has-toggle { padding-inline-end: 74px; }
.field small, .legal-small { display: block; color: var(--ink-muted); font-size: 12px; margin-top: 6px; }

.lang-picker { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.lang-pick-btn { min-height: 54px; display: flex; align-items: center; gap: 10px; padding: 10px 13px; border-radius: 12px; border: 1px solid var(--border); background: var(--well); color: var(--ink-soft); text-align: start; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.lang-pick-btn > span { min-width: 0; line-height: 1.38; }
.lang-pick-btn:active { transform: scale(0.98); }
.lang-pick-btn:hover { border-color: var(--border-strong); }
.lang-pick-btn.selected { border-color: var(--accent); background: rgba(56, 189, 248, 0.16); color: #fff; }
.lang-pick-btn strong { display: block; font-size: 13.5px; color: #fff; }
.lang-pick-btn small { display: block; font-size: 11.5px; color: var(--ink-muted); }

/* Bot List */
.bot-list { display: grid; gap: 12px; }
.bot-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease); }
.bot-row:hover { transform: translateY(-2px); border-color: rgba(125, 211, 252, 0.48); }
.bot-ident { display: flex; align-items: center; gap: 13px; min-width: 0; }
.bot-name { font-family: var(--font-display); font-size: 17px; font-weight: 700; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bot-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 4px; font-size: 12.5px; color: var(--ink-muted); }
.row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* Notices & Empty State */
.notice { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(251, 191, 36, 0.34); background: rgba(251, 191, 36, 0.10); color: #fde68a; font-size: 14px; line-height: 1.72; }
.notice + .notice { margin-top: 10px; }
.notice.error { border-color: rgba(244, 63, 94, 0.40); background: rgba(244, 63, 94, 0.12); color: #fecdd3; }
.notice.success { border-color: rgba(34, 197, 94, 0.36); background: rgba(34, 197, 94, 0.12); color: #bbf7d0; }
.notice.info { border-color: rgba(56, 189, 248, 0.34); background: rgba(56, 189, 248, 0.12); color: #e0f2fe; }

.empty-state { padding: 42px 22px; border: 1px dashed var(--border-strong); border-radius: var(--r-lg); text-align: center; color: var(--ink-muted); background: var(--surface); display: grid; justify-items: center; gap: 8px; }
.empty-state strong { color: #fff; font-size: 17px; }

/* --- Bot Control Panel Studio --- */
.control-top { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 20px 24px; margin-bottom: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); }
.control-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.control-title h1 { margin: 0; font-size: clamp(20px, 2.8vw, 26px); line-height: 1.25; }
.power-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.05); color: var(--ink-soft); white-space: nowrap; }
.status::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.status.running { color: #86efac; border-color: rgba(74, 222, 128, 0.36); background: rgba(34, 197, 94, 0.14); }
.status.running::before { background: var(--emerald-bright); }
.status.offline { color: #fecdd3; border-color: rgba(244, 63, 94, 0.34); background: rgba(244, 63, 94, 0.12); }
.status.offline::before { background: var(--rose); }

.resource-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.resource-card { padding: 18px 20px; border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--border); }
.resource-body { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.resource-head { display: flex; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 600; }
.resource-mark { padding: 2px 7px; border-radius: 6px; font: 700 10.5px/1.4 var(--font-mono); }
.rc-ram .resource-mark { color: #7dd3fc; background: rgba(56, 189, 248, 0.18); }
.rc-cpu .resource-mark { color: #bae6fd; background: rgba(14, 165, 233, 0.22); }
.rc-ssd .resource-mark { color: #86efac; background: rgba(34, 197, 94, 0.16); }
.resource-val { display: block; margin-top: 6px; font-family: var(--font-mono); font-size: 15px; font-weight: 700; color: #fff; direction: ltr; text-align: right; font-variant-numeric: tabular-nums; }
html[dir="ltr"] .resource-val { text-align: left; }

.gauge-ring { width: 54px; height: 54px; flex: 0 0 auto; position: relative; display: grid; place-items: center; }
.gauge-ring svg { width: 54px; height: 54px; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(255, 255, 255, 0.08); stroke-width: 5; }
.gauge-fill { fill: none; stroke-width: 5; stroke-linecap: round; stroke-dasharray: 138.2; stroke-dashoffset: 138.2; transition: stroke-dashoffset 450ms var(--ease), stroke 250ms ease; }
.rc-ram .gauge-fill { stroke: #38bdf8; }
.rc-cpu .gauge-fill { stroke: #7dd3fc; }
.rc-ssd .gauge-fill { stroke: #4ade80; }
.gauge-pct { position: absolute; font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: #fff; }

.progress { height: 7px; margin-top: 12px; border-radius: 99px; background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.progress > span { display: block; width: 0; height: 100%; border-radius: inherit; transition: width 400ms var(--ease); }
.rc-ram .progress > span, .bar-sky, .bar-indigo { background: linear-gradient(90deg, #0284c7, #7dd3fc); }
.rc-cpu .progress > span { background: linear-gradient(90deg, #0ea5e9, #bae6fd); }
.rc-ssd .progress > span, .bar-emerald { background: linear-gradient(90deg, #16a34a, #4ade80); }

.tabbar { display: inline-flex; gap: 5px; padding: 5px; margin-bottom: 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); max-width: 100%; }
.tab-button { min-height: 40px; padding: 8px 16px; border: 0; border-radius: 9px; background: transparent; color: var(--ink-muted); font-size: 14px; font-weight: 600; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.tab-button:active { transform: scale(0.97); }
.tab-button:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.tab-button.active { color: var(--accent-ink); background: var(--accent); font-weight: 700; }
.tab-panel { min-width: 0; animation: tabFade 220ms var(--ease); }

.console-shell { border: 1px solid var(--border); border-radius: var(--r-md); overflow: hidden; background: var(--well); }
.console-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.console-box { direction: ltr; text-align: left; min-height: 360px; max-height: 54dvh; overflow: auto; padding: 16px 18px; background: var(--well); color: #d0e7ff; font-family: var(--font-mono); font-size: 12.5px; white-space: pre-wrap; word-break: break-word; line-height: 1.82; }
.console-line { padding: 1px 0; }
.console-line.log-error { color: #fda4af; }
.console-line.log-warn  { color: #fde68a; }
.console-line.log-ok    { color: #86efac; }
.console-line.log-sys   { color: #7dd3fc; }

.file-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.file-path { color: #bae6fd; background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(125, 211, 252, 0.28); border-radius: 8px; direction: ltr; padding: 4px 10px; font-size: 12.5px; }
.file-dropzone { margin-bottom: 14px; padding: 14px 16px; border-radius: 12px; border: 1px dashed var(--border-strong); background: rgba(255, 255, 255, 0.02); color: var(--ink-muted); font-size: 13.5px; text-align: center; transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease); }
.file-dropzone.drag-over { border-color: var(--accent); background: rgba(56, 189, 248, 0.12); color: #fff; }
.file-type-tag { display: inline-grid; place-items: center; min-width: 34px; height: 24px; padding-inline: 6px; border-radius: 6px; font: 700 10.5px/1 var(--font-mono); background: rgba(255, 255, 255, 0.07); color: var(--ink-soft); flex: 0 0 auto; }
.file-type-dir { color: #fde68a; background: rgba(251, 191, 36, 0.15); }
.file-type-zip { color: #bae6fd; background: rgba(56, 189, 248, 0.20); }

.table-scroll { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.data-table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: 13.5px; }
.data-table th { text-align: start; color: var(--ink-muted); font-size: 12px; font-weight: 600; background: var(--well); white-space: nowrap; }
.data-table th, .data-table td { padding: 12px 15px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .col-end { text-align: end; }
.data-table tbody tr:hover td { background: rgba(56, 189, 248, 0.07); }
.file-name { max-width: 400px; overflow-wrap: anywhere; text-align: start; }
.table-note { color: var(--ink-muted); font-size: 12.5px; }
.table-select { min-width: 126px; min-height: 36px; padding: 6px 10px; font-size: 13px; }
.reason-input { min-height: 36px; padding: 6px 10px; font-size: 13px; width: 150px; }
.admin-user { display: grid; gap: 3px; }
.admin-user small { color: var(--ink-muted); font-size: 12px; }
.admin-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.admin-actions form { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; margin: 0; }

.var-card { padding: 18px 20px; border-radius: 12px; border: 1px solid var(--border); background: var(--well); display: grid; gap: 10px; }
.var-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.var-card-row { display: flex; gap: 10px; align-items: center; }
.var-card-row .input { flex: 1; }

/* Modals & Toasts */
.modal-backdrop { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 18px; background: rgba(3, 10, 22, 0.82); backdrop-filter: blur(8px); }
.modal-card { width: min(900px, 100%); max-height: 90dvh; display: flex; flex-direction: column; overflow: hidden; border-radius: 18px; border: 1px solid var(--border-strong); background: #0e1c33; box-shadow: 0 32px 84px rgba(0, 0, 0, 0.64); animation: tabFade 220ms var(--ease); }
.modal-head, .modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 20px; border-bottom: 1px solid var(--border); }
.modal-foot { justify-content: flex-end; border-top: 1px solid var(--border); border-bottom: 0; }
.modal-card textarea { flex: 1; min-height: 380px; resize: vertical; border: 0; border-radius: 0; background: var(--well); color: #f0f8ff; padding: 16px 20px; font-size: 13px; line-height: 1.75; direction: ltr; text-align: left; }
.name-modal-card { width: min(490px, 100%); max-height: min(90dvh, 540px); }
.name-modal-card .modal-head { align-items: flex-start; }
.name-modal-card .modal-head p { margin: 4px 0 0; }
.name-modal-body { padding: 20px; }
.name-modal-body .field { display: grid; gap: 8px; }
.name-modal-body .input { min-height: 46px; direction: ltr; text-align: left; }
.field-error { margin-top: 10px; color: #fda4af; font-size: 13px; }

.toast { position: fixed; bottom: 20px; inset-inline-start: 20px; z-index: 70; max-width: min(430px, calc(100vw - 40px)); padding: 13px 18px; border-radius: 12px; border: 1px solid rgba(74, 222, 128, 0.42); background: #0b2620; color: #bbf7d0; font-size: 13.5px; font-weight: 600; box-shadow: 0 18px 44px rgba(0, 0, 0, 0.48); animation: tabFade 220ms var(--ease); }
.toast.error { border-color: rgba(244, 63, 94, 0.46); background: #311520; color: #ffe4e6; }

/* Auth Pages */
.auth-page { display: grid; place-items: center; min-height: calc(100dvh - 160px); padding-block: 44px 72px; }
.auth-card { width: min(100%, 480px); display: grid; gap: 18px; padding: 32px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r-xl); box-shadow: 0 28px 72px rgba(3, 12, 26, 0.56); }
.auth-logo { width: 46px; height: 46px; object-fit: contain; filter: drop-shadow(0 6px 18px rgba(56, 189, 248, 0.34)); }
.auth-card h1 { margin: 0; font-size: clamp(25px, 4vw, 33px); }
.auth-divider { display: flex; align-items: center; gap: 12px; color: var(--ink-muted); font-size: 12.5px; }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.stack-form { display: grid; gap: 15px; }
.stack-form .button { width: 100%; }
.checkbox-row { display: flex; align-items: flex-start; gap: 10px; color: var(--ink-soft); font-size: 13.5px; line-height: 1.75; }
.checkbox-row input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 4px; accent-color: var(--accent); }
.checkbox-row a { color: #7dd3fc; text-decoration: underline; text-underline-offset: 3px; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 18px; padding-top: 12px; border-top: 1px solid var(--border); }
.auth-links a { color: #7dd3fc; font-size: 13.5px; font-weight: 600; }
.auth-links a:hover { color: #fff; }
.inline-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.inline-form .field { flex: 1; min-width: 180px; }

/* Guides & Legal */
.stack { display: grid; gap: 16px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.guide-card { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); display: flex; flex-direction: column; gap: 10px; }
.guide-card h2, .guide-card h3 { margin: 2px 0 0; font-size: 19px; }
.guide-card p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.78; }
.guide-card > .table-note:last-child { margin-top: auto; padding-top: 6px; }
.guide-card code:not(pre code) { color: #bae6fd; background: rgba(56, 189, 248, 0.14); padding: 2px 7px; border-radius: 6px; font-size: 12.5px; direction: ltr; display: inline-block; }
.code-block-wrap { border: 1px solid var(--border); border-radius: 12px; background: var(--well); overflow: hidden; margin-top: 4px; }
.code-block-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 13px; border-bottom: 1px solid var(--border); background: rgba(255, 255, 255, 0.03); font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); direction: ltr; }
.copy-btn { min-height: 30px; padding: 4px 10px; border-radius: 7px; border: 1px solid var(--border-strong); background: rgba(255, 255, 255, 0.06); color: var(--ink-soft); font-family: var(--font-sans); font-size: 12px; font-weight: 600; transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease); }
.copy-btn:active { transform: scale(0.96); }
.copy-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.copy-btn.copied { border-color: rgba(74, 222, 128, 0.45); color: #86efac; background: rgba(34, 197, 94, 0.16); }
.code-block-wrap pre { margin: 0; max-width: 100%; overflow-x: auto; padding: 14px 16px; color: #d0e7ff; direction: ltr; text-align: left; font-size: 12.5px; line-height: 1.78; }

.checklist { margin: 8px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; counter-reset: step; }
.checklist li { counter-increment: step; display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 11px; background: var(--well); border: 1px solid var(--border); color: var(--ink-soft); font-size: 14px; }
.checklist li::before { content: counter(step); width: 25px; height: 25px; border-radius: 7px; flex: 0 0 auto; display: grid; place-items: center; font-family: var(--font-display); font-size: 13px; font-weight: 700; color: var(--accent-ink); background: var(--accent); }

.legal-page { max-width: 840px; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.legal-tabs a { min-height: 40px; display: inline-flex; align-items: center; padding: 8px 15px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--ink-soft); font-size: 13.5px; font-weight: 600; }
.legal-tabs a.active { border-color: var(--accent); color: #fff; background: rgba(56, 189, 248, 0.20); }
.legal-copy { display: grid; gap: 15px; line-height: 1.95; }
.legal-copy h1 { margin: 0; font-size: clamp(24px, 3.8vw, 34px); }
.legal-copy h2 { margin: 16px 0 0; padding-top: 16px; border-top: 1px solid var(--border); font-size: 18px; }
.legal-copy p, .legal-copy li { color: var(--ink-soft); font-size: 14.5px; max-width: 72ch; }
.legal-copy ul { margin: 0; padding-inline-start: 22px; display: grid; gap: 8px; }
.legal-copy a { color: #7dd3fc; text-decoration: underline; text-underline-offset: 3px; }
.legal-link-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.legal-link-list a { min-height: 44px; display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-radius: 11px; border: 1px solid var(--border); background: var(--well); color: #bae6fd; font-size: 14px; font-weight: 600; }
.legal-link-list a:hover { border-color: var(--accent); color: #fff; }

/* Footer */
.footer { margin-top: auto; border-top: 1px solid var(--border); background: #050c17; padding-block: 28px; color: var(--ink-muted); font-size: 13.5px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.footer-nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.footer-nav a { color: var(--ink-soft); transition: color var(--t-fast) var(--ease); }
.footer-nav a:hover { color: #7dd3fc; }

/* ==========================================================================
   RESPONSIVE REFLOW
   ========================================================================== */

@media (max-width: 980px) {
  .hero-top-grid { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-bottom: 38px; }
  .section-head.section-head-split { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .feature-grid.bento-grid { grid-template-columns: minmax(0, 1fr); }
  .bento-wide, .bento-narrow { grid-column: auto; }
  .faq-split { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .faq-aside { position: static; }
  .app-window { grid-template-columns: minmax(0, 1fr); }
  .app-sidebar { display: none; }
  .lang-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plan-grid { grid-template-columns: minmax(0, 1fr); }
  .stat-grid, .stat-grid.monitor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lang-picker { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .control-top { flex-direction: column; align-items: stretch; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 768px) {
  .nav-toggle { display: inline-flex; }
  .nav-links { display: none; order: 4; width: 100%; flex-direction: column; align-items: stretch; padding: 10px 0 6px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
  .topbar.nav-open .nav-links { display: flex; }
  .nav-links a { min-height: 44px; padding: 10px 12px; }
  .topbar-inner { flex-wrap: wrap; padding-block: 10px; gap: 10px; min-height: 62px; }
  .nav-actions { margin-inline-start: auto; gap: 6px; }
  .user-chip, .hide-xs { display: none; }
  .nav-links a.mobile-only-link,
  .mobile-only-link { display: inline-flex; }
}

@media (max-width: 640px) {
  .wrap { width: min(100% - 26px, 1180px); }
  .brand { font-size: 15.5px; gap: 8px; }
  .brand-logo { width: 30px; height: 30px; }
  .nav-toggle { width: 38px; padding: 0; }
  .nav-toggle-label { display: none; }
  .topbar .nav-actions .button-small { padding: 0 11px; font-size: 12.5px; }
  .util-btn { padding: 0 9px; font-size: 12px; }
  .sky-hero { padding-top: 38px; }
  .sky-hero h1 { font-size: clamp(30px, 9.2vw, 42px); }
  html[dir="ltr"] .sky-hero h1 { font-size: clamp(28px, 8.2vw, 38px); }
  .hero-lead { font-size: 15.5px; }
  .hero-cta-row { width: 100%; }
  .hero-cta-row .button-white { flex: 1 1 auto; }
  .app-main { padding: 14px 14px 18px; }
  .app-search-bar { display: none; }
  .app-row { grid-template-columns: minmax(0, 1fr) auto; }
  .app-row-kind, .app-row-ram, .app-row-act { display: none; }
  .clouds-horizon { margin-top: -54px; }
  .section { padding-block: 44px; }
  .feature-grid, .lang-grid, .resource-grid, .stat-grid, .stat-grid.monitor-grid, .form-grid, .lang-picker { grid-template-columns: minmax(0, 1fr); }
  .page { padding-block: 28px 54px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 14px; }
  .bot-row { flex-direction: column; align-items: stretch; }
  .row-actions { width: 100%; }
  .row-actions .button { flex: 1 1 auto; }
  .power-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .tabbar { display: flex; width: 100%; }
  .tab-button { flex: 1; padding-inline: 8px; font-size: 13px; }
  .panel-pad { padding: 18px; }
  .auth-card { padding: 24px 18px; }
  .cta-banner { padding: 28px 20px; }
  .var-card-row { flex-direction: column; align-items: stretch; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .lang-trigger .lang-code,
  .lang-trigger .lang-caret { display: none; }
  .lang-trigger { width: 38px; padding: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  html.js-ready [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ==========================================================================
   LIGHT MODE — Daylight Sky & Frosted Ice Studio (WCAG AA/AAA)
   ========================================================================== */

body[data-theme="light"] {
  color-scheme: light;
  --bg: #f2f8ff;
  --bg-2: #e7f2fe;
  --surface: #ffffff;
  --surface-2: #eef6ff;
  --well: #f6faff;

  --border: rgba(14, 116, 190, 0.16);
  --border-strong: rgba(14, 116, 190, 0.30);

  --ink: #071b2e;
  --ink-soft: #264563;
  --ink-muted: #456585;

  --accent: #0275b8;
  --accent-hover: #0369a1;
  --accent-deep: #075985;
  --accent-ink: #ffffff;

  --cloud-back: #ffffff;
  --cloud-mid: #bae6fd;
  --cloud-front: #f2f8ff;

  --shadow-card: 0 1px 2px rgba(7, 27, 46, 0.05), 0 8px 24px rgba(7, 27, 46, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-card-hover: 0 2px 6px rgba(7, 27, 46, 0.07), 0 20px 44px rgba(7, 27, 46, 0.11), inset 0 1px 0 rgba(255, 255, 255, 1);

  background-color: var(--bg);
  background-image: radial-gradient(ellipse 75% 420px at 50% 0%, rgba(56, 189, 248, 0.18), transparent 72%);
  color: var(--ink);
}
body[data-theme="light"].has-sky { background-image: none; }

/* Theme toggle contextual icon animation (scale + opacity + blur cross-fade) */
body[data-theme="light"] .theme-toggle .ico-sun { opacity: 0; transform: scale(0.25) rotate(30deg); filter: blur(4px); pointer-events: none; }
body[data-theme="light"] .theme-toggle .ico-moon { opacity: 1; transform: scale(1) rotate(0deg); filter: blur(0px); pointer-events: auto; }
body[data-theme="light"] .theme-toggle:hover .ico-moon { transform: scale(1.06) rotate(-14deg); }

/* Light Mode Typography */
body[data-theme="light"] h1,
body[data-theme="light"] h2,
body[data-theme="light"] h3,
body[data-theme="light"] h4 {
  color: #071b2e;
}
body[data-theme="light"] .sky-hero h1,
body[data-theme="light"] .app-window h2,
body[data-theme="light"] .app-window h3,
body[data-theme="light"] .cta-banner h2 {
  color: #ffffff;
}

/* Light Mode Topbar (frosted white on subpages & scrolled; translucent sky on hero top) */
body[data-theme="light"]:not(.has-sky) .topbar,
body[data-theme="light"] .topbar.scrolled {
  background: rgba(255, 255, 255, 0.90);
  border-bottom-color: rgba(14, 116, 190, 0.18);
  box-shadow: 0 8px 26px rgba(7, 27, 46, 0.08);
}
body[data-theme="light"]:not(.has-sky) .brand,
body[data-theme="light"] .topbar.scrolled .brand {
  color: #071b2e;
}
body[data-theme="light"]:not(.has-sky) .brand-logo,
body[data-theme="light"] .topbar.scrolled .brand-logo {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  filter: brightness(0) drop-shadow(0 4px 10px rgba(7, 27, 46, 0.14));
}
body[data-theme="light"]:not(.has-sky) .brand:hover .brand-logo,
body[data-theme="light"] .topbar.scrolled .brand:hover .brand-logo {
  filter: brightness(0) drop-shadow(0 6px 14px rgba(7, 27, 46, 0.24));
}
body[data-theme="light"]:not(.has-sky) .nav-links a,
body[data-theme="light"] .topbar.scrolled .nav-links a {
  color: #264563;
}
body[data-theme="light"]:not(.has-sky) .nav-links a:hover,
body[data-theme="light"] .topbar.scrolled .nav-links a:hover {
  color: #071b2e;
  background: rgba(2, 132, 199, 0.10);
}
body[data-theme="light"]:not(.has-sky) .nav-links a.active,
body[data-theme="light"] .topbar.scrolled .nav-links a.active {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.14);
}
body[data-theme="light"]:not(.has-sky) .util-btn,
body[data-theme="light"] .topbar.scrolled .util-btn,
body[data-theme="light"]:not(.has-sky) .nav-toggle,
body[data-theme="light"] .topbar.scrolled .nav-toggle {
  background: #eef6ff;
  border-color: rgba(14, 116, 190, 0.24);
  color: #071b2e;
}
body[data-theme="light"]:not(.has-sky) .util-btn:hover,
body[data-theme="light"] .topbar.scrolled .util-btn:hover {
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.45);
  color: #0369a1;
}
body[data-theme="light"]:not(.has-sky) .user-chip,
body[data-theme="light"] .topbar.scrolled .user-chip {
  background: #eef6ff;
  border-color: rgba(14, 116, 190, 0.24);
  color: #071b2e;
}
body[data-theme="light"]:not(.has-sky) .topbar .button-soft,
body[data-theme="light"] .topbar.scrolled .button-soft {
  color: #071b2e;
  background: #eef6ff;
  border-color: rgba(14, 116, 190, 0.24);
}
body[data-theme="light"]:not(.has-sky) .topbar .button-soft:hover,
body[data-theme="light"] .topbar.scrolled .button-soft:hover {
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.44);
}

/* Light Mode Sky Hero keeps airy daylight sky */
body[data-theme="light"] .sky-hero {
  background:
    radial-gradient(ellipse 68% 54% at 78% 8%, rgba(186, 230, 253, 0.44), transparent 62%),
    radial-gradient(ellipse 58% 48% at 18% 22%, rgba(56, 189, 248, 0.34), transparent 60%),
    linear-gradient(180deg, #0b6db8 0%, #148ce0 48%, #26a4f0 100%);
}
body[data-theme="light"] .app-window {
  --ink: #f0f8ff;
  --ink-soft: #bdd4eb;
  --ink-muted: #8fb3d4;
  --border: rgba(56, 189, 248, 0.17);
  --border-strong: rgba(125, 211, 252, 0.34);
  --accent: #38bdf8;
  --accent-ink: #041726;
  color: #f0f8ff;
  box-shadow: 0 30px 76px rgba(7, 36, 68, 0.32), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
}

/* Light Mode Buttons */
body[data-theme="light"] .button-primary {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9 0%, #0275b8 100%);
  border-color: rgba(2, 117, 184, 0.35);
  box-shadow: 0 8px 22px rgba(2, 117, 184, 0.24);
}
body[data-theme="light"] .button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
  box-shadow: 0 12px 28px rgba(2, 117, 184, 0.34);
}
body[data-theme="light"].has-sky .topbar:not(.scrolled) .button-primary {
  color: #06263d;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.72);
  box-shadow: 0 6px 18px rgba(4, 34, 62, 0.22);
}
body[data-theme="light"].has-sky .topbar:not(.scrolled) .button-primary:hover:not(:disabled) {
  background: #f0f9ff;
  box-shadow: 0 10px 24px rgba(4, 34, 62, 0.30);
}
body[data-theme="light"] .app-window .button-primary {
  color: #041726;
  background: linear-gradient(135deg, #7dd3fc 0%, #38bdf8 55%, #0ea5e9 100%);
}
body[data-theme="light"] .button-soft {
  color: #071b2e;
  background: #ffffff;
  border-color: rgba(14, 116, 190, 0.24);
  box-shadow: 0 2px 6px rgba(7, 27, 46, 0.04);
}
body[data-theme="light"] .button-soft:hover:not(:disabled) {
  background: #eef6ff;
  border-color: rgba(2, 132, 199, 0.45);
}
body[data-theme="light"] .cta-banner .button-soft,
body[data-theme="light"].has-sky .topbar:not(.scrolled) .button-soft {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.28);
  box-shadow: none;
}
body[data-theme="light"] .cta-banner .button-soft:hover,
body[data-theme="light"].has-sky .topbar:not(.scrolled) .button-soft:hover {
  background: rgba(255, 255, 255, 0.24);
}
body[data-theme="light"] .button-sky {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.32);
}
body[data-theme="light"] .button-sky:hover:not(:disabled) { background: #bae6fd; }
body[data-theme="light"] .button-amber {
  color: #92400e;
  background: #fef3c7;
  border-color: rgba(217, 119, 6, 0.32);
}
body[data-theme="light"] .button-amber:hover:not(:disabled) { background: #fde68a; }
body[data-theme="light"] .button-danger {
  color: #9f1239;
  background: #ffe4e6;
  border-color: rgba(225, 29, 72, 0.30);
}
body[data-theme="light"] .button-danger:hover:not(:disabled) { background: #fecdd3; }
body[data-theme="light"] .button-emerald {
  color: #052e16;
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}
body[data-theme="light"] .text-link { color: #0369a1; }
body[data-theme="light"] .text-link:hover { color: #071b2e; }

/* Light Mode Section Kickers, Cards & Plans */
body[data-theme="light"] .section-kicker {
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.28);
  color: #075985;
}
body[data-theme="light"] .feature-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: var(--shadow-card);
}
body[data-theme="light"] .feature-card:hover {
  border-color: rgba(2, 132, 199, 0.42);
  box-shadow: var(--shadow-card-hover);
}
body[data-theme="light"] .feature-card-highlight {
  background:
    radial-gradient(ellipse 65% 85% at 10% 0%, rgba(56, 189, 248, 0.18), transparent 68%),
    linear-gradient(155deg, #eaf5ff 0%, #ffffff 74%);
  border-color: rgba(2, 132, 199, 0.34);
}
body[data-theme="light"] .feature-meta-pill {
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.24);
  color: #075985;
}
body[data-theme="light"] .tile-indigo  { color: #0369a1; background: #e0f2fe; border-color: rgba(2, 132, 199, 0.26); }
body[data-theme="light"] .tile-sky     { color: #075985; background: #dbeafe; border-color: rgba(3, 105, 161, 0.26); }
body[data-theme="light"] .tile-emerald { color: #065f46; background: #d1fae5; border-color: rgba(5, 150, 105, 0.26); }
body[data-theme="light"] .tile-amber   { color: #92400e; background: #fef3c7; border-color: rgba(217, 119, 6, 0.26); }

body[data-theme="light"] .lang-card,
body[data-theme="light"] .plan-card,
body[data-theme="light"] .panel,
body[data-theme="light"] .stat-card,
body[data-theme="light"] .bot-row,
body[data-theme="light"] .resource-card,
body[data-theme="light"] .guide-card,
body[data-theme="light"] .control-top,
body[data-theme="light"] .faq-item,
body[data-theme="light"] .empty-state {
  box-shadow: 0 6px 20px rgba(7, 27, 46, 0.05);
}
/* Light Mode: Daylight Prismatic Horizon-Beam Plan Cards */
body[data-theme="light"] .plan-tier-free {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  border: 1.5px solid rgba(148, 163, 184, 0.34);
  box-shadow: 0 12px 34px rgba(7, 27, 46, 0.06);
}
body[data-theme="light"] .plan-tier-free:hover {
  border-color: rgba(100, 116, 139, 0.52);
  box-shadow: 0 18px 42px rgba(7, 27, 46, 0.10);
}
body[data-theme="light"] .plan-tier-free .plan-head h3,
body[data-theme="light"] .plan-tier-free .plan-price-num { color: #071b2e; }
body[data-theme="light"] .plan-tier-free .plan-head p,
body[data-theme="light"] .plan-tier-free .plan-price small,
body[data-theme="light"] .plan-tier-free .plan-list { color: #475569; }
body[data-theme="light"] .plan-tier-free .plan-tick { color: #059669; }
body[data-theme="light"] .plan-badge-free { background: #f1f5f9; color: #334155; border-color: #cbd5e1; }
body[data-theme="light"] .plan-cta-free { background: #0f172a; color: #ffffff; border-color: #0f172a; }
body[data-theme="light"] .plan-cta-free:hover { background: #1e293b; color: #ffffff; }

body[data-theme="light"] .plan-tier-starter,
body[data-theme="light"] .plan-card.featured {
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg,
      #ffffff 0%,
      #f0f9ff 30%,
      #e0f2fe 54%,
      #f4faff 78%,
      #ffffff 100%
    ) padding-box,
    linear-gradient(180deg,
      rgba(56, 189, 248, 0.35) 0%,
      rgba(14, 165, 233, 0.85) 48%,
      rgba(37, 99, 235, 0.65) 100%
    ) border-box;
  box-shadow: 0 18px 46px rgba(14, 165, 233, 0.16);
}
body[data-theme="light"] .plan-tier-starter:hover,
body[data-theme="light"] .plan-card.featured:hover {
  box-shadow: 0 24px 56px rgba(14, 165, 233, 0.24);
}
body[data-theme="light"] .plan-tier-starter .plan-head h3 { color: #0369a1; }
body[data-theme="light"] .plan-tier-starter .plan-head p { color: #3b5b7a; }
body[data-theme="light"] .plan-tier-starter .plan-price,
body[data-theme="light"] .plan-tier-starter .plan-price-num { color: #071b2e; }
body[data-theme="light"] .plan-badge-starter { background: #e0f2fe; color: #0369a1; border-color: rgba(2, 132, 199, 0.34); }
body[data-theme="light"] .plan-tier-starter .plan-action::before {
  background:
    radial-gradient(ellipse 96% 46% at 50% 50%, rgba(14, 165, 233, 0.56) 0%, rgba(56, 189, 248, 0.42) 34%, rgba(125, 211, 252, 0.22) 60%, transparent 84%),
    linear-gradient(180deg,
      rgba(56, 189, 248, 0) 0%,
      rgba(125, 211, 252, 0.28) 28%,
      rgba(56, 189, 248, 0.62) 50%,
      rgba(14, 165, 233, 0.42) 62%,
      rgba(56, 189, 248, 0) 100%
    );
  filter: blur(10px);
}
body[data-theme="light"] .plan-cta-starter {
  background: #ffffff;
  color: #0369a1;
  border: 1px solid rgba(14, 165, 233, 0.26);
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.22);
}
body[data-theme="light"] .plan-cta-starter:hover {
  background: #0284c7;
  color: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 12px 30px rgba(2, 132, 199, 0.34);
}
body[data-theme="light"] .plan-tier-starter .plan-list { color: #1e3a5f; }
body[data-theme="light"] .plan-tier-starter .plan-feat-hot { color: #071b2e; }
body[data-theme="light"] .plan-tier-starter .plan-tick { background: transparent; color: #0284c7; }

body[data-theme="light"] .plan-tier-pro {
  border: 1.5px solid transparent;
  background:
    linear-gradient(180deg,
      #ffffff 0%,
      #faf5ff 30%,
      #f3e8ff 54%,
      #fdf7ff 78%,
      #ffffff 100%
    ) padding-box,
    linear-gradient(180deg,
      rgba(192, 132, 252, 0.35) 0%,
      rgba(192, 38, 211, 0.80) 48%,
      rgba(126, 34, 206, 0.65) 100%
    ) border-box;
  box-shadow: 0 18px 46px rgba(147, 51, 234, 0.15);
}
body[data-theme="light"] .plan-tier-pro:hover {
  box-shadow: 0 24px 56px rgba(147, 51, 234, 0.24);
}
body[data-theme="light"] .plan-tier-pro .plan-head h3 { color: #7e22ce; }
body[data-theme="light"] .plan-tier-pro .plan-head p { color: #583c72; }
body[data-theme="light"] .plan-tier-pro .plan-price,
body[data-theme="light"] .plan-tier-pro .plan-price-num { color: #1e0b36; }
body[data-theme="light"] .plan-badge-pro { background: #f3e8ff; color: #7e22ce; border-color: rgba(147, 51, 234, 0.32); }
body[data-theme="light"] .plan-tier-pro .plan-action::before {
  background:
    radial-gradient(ellipse 96% 46% at 50% 50%, rgba(192, 38, 211, 0.50) 0%, rgba(168, 85, 247, 0.40) 34%, rgba(232, 121, 249, 0.20) 60%, transparent 84%),
    linear-gradient(180deg,
      rgba(192, 132, 252, 0) 0%,
      rgba(216, 180, 254, 0.28) 28%,
      rgba(192, 38, 211, 0.54) 50%,
      rgba(147, 51, 234, 0.38) 62%,
      rgba(168, 85, 247, 0) 100%
    );
  filter: blur(10px);
}
body[data-theme="light"] .plan-cta-pro {
  background: #ffffff;
  color: #7e22ce;
  border: 1px solid rgba(168, 85, 247, 0.28);
  box-shadow: 0 10px 26px rgba(147, 51, 234, 0.20);
}
body[data-theme="light"] .plan-cta-pro:hover {
  background: linear-gradient(135deg, #9333ea, #c026d3);
  color: #ffffff;
  border-color: #9333ea;
  box-shadow: 0 12px 30px rgba(147, 51, 234, 0.32);
}
body[data-theme="light"] .plan-tier-pro .plan-list { color: #3b2254; }
body[data-theme="light"] .plan-tier-pro .plan-feat-hot strong { color: #9333ea; }
body[data-theme="light"] .plan-tier-pro .plan-tick { background: transparent; color: #9333ea; }
body[data-theme="light"] .renew-pass-ico { background: #fef3c7; border-color: rgba(217, 119, 6, 0.36); color: #b45309; box-shadow: none; }
body[data-theme="light"] .plan-price,
body[data-theme="light"] .stat-value,
body[data-theme="light"] .bot-name,
body[data-theme="light"] .resource-val,
body[data-theme="light"] .gauge-pct,
body[data-theme="light"] .empty-state strong,
body[data-theme="light"] .faq-item summary {
  color: #071b2e;
}
body[data-theme="light"] .plan-tick {
  background: transparent;
  color: #059669;
}
body[data-theme="light"] .faq-chevron {
  background: #e0f2fe;
  color: #0369a1;
}
body[data-theme="light"] .lang-card-foot code,
body[data-theme="light"] .faq-body code,
body[data-theme="light"] .guide-card code:not(pre code),
body[data-theme="light"] .file-path {
  color: #075985;
  background: #e0f2fe;
  border-color: rgba(2, 132, 199, 0.26);
}

/* Light Mode Badges */
body[data-theme="light"] .badge-python  { color: #92400e; background: #fef3c7; border-color: rgba(217, 119, 6, 0.28); }
body[data-theme="light"] .badge-node    { color: #065f46; background: #d1fae5; border-color: rgba(5, 150, 105, 0.28); }
body[data-theme="light"] .badge-java    { color: #9a3412; background: #ffedd5; border-color: rgba(234, 88, 12, 0.28); }
body[data-theme="light"] .badge-rust    { color: #9f1239; background: #ffe4e6; border-color: rgba(225, 29, 72, 0.28); }
body[data-theme="light"] .badge-indigo  { color: #075985; background: #e0f2fe; border-color: rgba(2, 132, 199, 0.30); }
body[data-theme="light"] .badge-emerald { color: #065f46; background: #d1fae5; border-color: rgba(5, 150, 105, 0.30); }
body[data-theme="light"] .badge-sky     { color: #075985; background: #e0f2fe; border-color: rgba(2, 132, 199, 0.30); }
body[data-theme="light"] .badge-danger  { color: #9f1239; background: #ffe4e6; border-color: rgba(225, 29, 72, 0.30); }
body[data-theme="light"] .badge-neutral { color: #264563; background: #eef6ff; border-color: rgba(14, 116, 190, 0.24); }
body[data-theme="light"] .app-window .badge-indigo {
  color: #bae6fd; background: rgba(56, 189, 248, 0.18); border-color: rgba(125, 211, 252, 0.38);
}

/* Light Mode Icons & Resource Marks */
body[data-theme="light"] .lang-img-rust { filter: none; }
body[data-theme="light"] .app-window .lang-img-rust { filter: brightness(0) invert(0.95); }
body[data-theme="light"] .lang-img-java { filter: none; }
body[data-theme="light"] .app-window .lang-img-java { filter: brightness(1.32) saturate(1.18); }

body[data-theme="light"] .rc-ram .resource-mark { color: #075985; background: #e0f2fe; }
body[data-theme="light"] .rc-cpu .resource-mark { color: #0369a1; background: #dbeafe; }
body[data-theme="light"] .rc-ssd .resource-mark { color: #065f46; background: #d1fae5; }
body[data-theme="light"] .gauge-track { stroke: rgba(14, 116, 190, 0.14); }
body[data-theme="light"] .progress { background: rgba(14, 116, 190, 0.12); }

/* Light Mode Status Pills, Notices, Forms & Tables */
body[data-theme="light"] .status { background: #eef6ff; color: #264563; }
body[data-theme="light"] .status.running { color: #065f46; background: #d1fae5; border-color: rgba(5, 150, 105, 0.34); }
body[data-theme="light"] .status.offline { color: #9f1239; background: #ffe4e6; border-color: rgba(225, 29, 72, 0.32); }

body[data-theme="light"] .notice { background: #fffbeb; border-color: rgba(217, 119, 6, 0.32); color: #92400e; }
body[data-theme="light"] .notice.error { background: #fff1f2; border-color: rgba(225, 29, 72, 0.32); color: #9f1239; }
body[data-theme="light"] .notice.success { background: #ecfdf5; border-color: rgba(5, 150, 105, 0.32); color: #065f46; }
body[data-theme="light"] .notice.info { background: #e0f2fe; border-color: rgba(2, 132, 199, 0.32); color: #075985; }

body[data-theme="light"] .input,
body[data-theme="light"] .select,
body[data-theme="light"] .textarea {
  color: #071b2e;
  background: #ffffff;
  border-color: rgba(14, 116, 190, 0.28);
}
body[data-theme="light"] .select option { background: #ffffff; color: #071b2e; }
body[data-theme="light"] .pw-toggle { background: #eef6ff; color: #264563; border-color: rgba(14, 116, 190, 0.22); }
body[data-theme="light"] .pw-toggle:hover { color: #071b2e; background: #e0f2fe; }
body[data-theme="light"] .lang-pick-btn { background: #f6faff; color: #264563; }
body[data-theme="light"] .lang-pick-btn strong { color: #071b2e; }
body[data-theme="light"] .lang-pick-btn.selected { background: #e0f2fe; border-color: #0284c7; color: #071b2e; }
body[data-theme="light"] .tab-button:hover { color: #071b2e; background: #eef6ff; }
body[data-theme="light"] .tab-button.active { color: #ffffff; background: #0275b8; }

body[data-theme="light"] .file-dropzone { background: #f6faff; color: #456585; }
body[data-theme="light"] .file-dropzone.drag-over { background: #e0f2fe; color: #071b2e; border-color: #0284c7; }
body[data-theme="light"] .file-type-tag { background: #e7f2fe; color: #264563; }
body[data-theme="light"] .file-type-dir { color: #92400e; background: #fef3c7; }
body[data-theme="light"] .file-type-zip { color: #075985; background: #e0f2fe; }
body[data-theme="light"] .app-window .file-type-tag { background: rgba(255, 255, 255, 0.08); color: #bdd4eb; }
body[data-theme="light"] .app-window .file-type-dir { color: #fde68a; background: rgba(251, 191, 36, 0.15); }

/* Keep Developer Console & Code Blocks Dark Studio in Light Mode */
body[data-theme="light"] .console-shell,
body[data-theme="light"] .code-block-wrap {
  background: #081221;
  border-color: rgba(14, 116, 190, 0.28);
}
body[data-theme="light"] .console-header,
body[data-theme="light"] .code-block-head {
  background: #0e1c33;
  border-bottom-color: rgba(56, 189, 248, 0.18);
  color: #93c5fd;
}
body[data-theme="light"] .console-header .table-note { color: #93c5fd; }
body[data-theme="light"] .console-box,
body[data-theme="light"] .code-block-wrap pre {
  background: #060d18;
  color: #d0e7ff;
}
body[data-theme="light"] .copy-btn {
  background: #eef6ff;
  border-color: rgba(14, 116, 190, 0.28);
  color: #075985;
}
body[data-theme="light"] .copy-btn:hover { background: #e0f2fe; color: #071b2e; }
body[data-theme="light"] .console-header .copy-btn,
body[data-theme="light"] .code-block-head .copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(125, 211, 252, 0.30);
  color: #e0f2fe;
}
body[data-theme="light"] .console-header .copy-btn:hover,
body[data-theme="light"] .code-block-head .copy-btn:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

/* Light Mode Modals, Auth, Legal & Footer */
body[data-theme="light"] .modal-backdrop { background: rgba(7, 27, 46, 0.55); }
body[data-theme="light"] .modal-card { background: #ffffff; box-shadow: 0 28px 72px rgba(7, 27, 46, 0.24); }
body[data-theme="light"] .modal-card textarea { background: #081221; color: #f0f8ff; }
body[data-theme="light"] .field-error { color: #be123c; }
body[data-theme="light"] .toast { background: #ecfdf5; border-color: rgba(5, 150, 105, 0.42); color: #065f46; box-shadow: 0 14px 36px rgba(7, 27, 46, 0.16); }
body[data-theme="light"] .toast.error { background: #fff1f2; border-color: rgba(225, 29, 72, 0.42); color: #9f1239; }

body[data-theme="light"] .auth-card { box-shadow: 0 22px 60px rgba(7, 27, 46, 0.10); }
body[data-theme="light"] .auth-logo {
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  filter: brightness(0) drop-shadow(0 6px 14px rgba(7, 27, 46, 0.14));
}
body[data-theme="light"] .auth-card .button-white {
  color: #ffffff;
  background: linear-gradient(135deg, #0ea5e9 0%, #0275b8 100%);
  box-shadow: 0 8px 22px rgba(2, 117, 184, 0.24);
}
body[data-theme="light"] .auth-card .button-white:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #0284c7 100%);
}
body[data-theme="light"] .checkbox-row a,
body[data-theme="light"] .auth-links a,
body[data-theme="light"] .legal-copy a { color: #0369a1; }
body[data-theme="light"] .auth-links a:hover { color: #071b2e; }
body[data-theme="light"] .legal-tabs a.active { background: #e0f2fe; color: #075985; border-color: #0284c7; }
body[data-theme="light"] .legal-link-list a { background: #f6faff; color: #0369a1; }
body[data-theme="light"] .legal-link-list a:hover { background: #e0f2fe; color: #071b2e; }

body[data-theme="light"] .footer {
  background: #ffffff;
  border-top-color: rgba(14, 116, 190, 0.16);
  color: #456585;
}
body[data-theme="light"] .footer-nav a { color: #264563; }
body[data-theme="light"] .footer-nav a:hover { color: #0369a1; }

@media (max-width: 768px) {
  body[data-theme="light"]:not(.has-sky) .nav-links,
  body[data-theme="light"] .topbar.scrolled .nav-links {
    border-top-color: rgba(14, 116, 190, 0.16);
  }
}

/* ==========================================================================
   FULL-BLEED BLENDED WORKSPACE DASHBOARD SHELL
   ========================================================================== */

.dash-page {
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
}
.dash-notices { display: grid; gap: 10px; }
.dash-notice { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dash-notice-body { min-width: 0; }
.notice-dismiss {
  width: 28px; height: 28px; flex: 0 0 auto;
  border-radius: 8px; border: 1px solid currentColor;
  background: transparent; color: inherit; opacity: 0.7;
  display: grid; place-items: center; font-size: 17px; line-height: 1;
  transition: opacity var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.notice-dismiss:hover { opacity: 1; background: rgba(255, 255, 255, 0.10); }
.notice-dismiss:active { transform: scale(0.94); }

.dash-window {
  width: 100%;
  flex: 1 0 auto;
  background: transparent;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: calc(100dvh - 134px);
}

.dash-sidebar {
  background: rgba(8, 18, 33, 0.30);
  border-inline-end: 1px solid rgba(56, 189, 248, 0.12);
  padding: 24px 16px 26px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.dash-sb-section-label {
  font-size: 11.5px;
  color: var(--ink-muted);
  padding: 0 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: -8px;
}
.dash-sb-nav { display: grid; gap: 4px; }
.dash-sb-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 11px 13px;
  border-radius: 10px; border: 0;
  background: transparent; color: var(--ink-muted);
  font-size: 14.5px; font-weight: 500; text-align: start;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.dash-sb-btn:hover { background: rgba(56, 189, 248, 0.10); color: #ffffff; }
.dash-sb-btn.active { background: rgba(56, 189, 248, 0.20); color: #ffffff; font-weight: 700; }
.dash-sb-btn:active { transform: scale(0.98); }

.dash-sb-group {
  margin-top: 4px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: grid; gap: 4px;
}
.dash-sb-label { font-size: 11.5px; color: var(--ink-muted); padding: 0 12px 6px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.dash-sb-proj {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; padding: 10px 12px; border-radius: 9px; border: 0;
  background: transparent; font-size: 14px; color: var(--ink-soft); text-align: start;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dash-sb-proj:hover { background: rgba(56, 189, 248, 0.10); color: #ffffff; }
.dash-sb-proj.current { background: rgba(56, 189, 248, 0.14); color: #ffffff; font-weight: 700; }
.dash-sb-count {
  font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  padding: 2px 8px; border-radius: 99px;
  background: rgba(56, 189, 248, 0.22); color: #bae6fd;
}

.dash-sb-foot {
  margin-top: auto;
  padding: 15px 14px;
  border-radius: 13px;
  background: rgba(14, 28, 51, 0.64);
  border: 1px solid var(--border);
  display: grid; gap: 10px;
}
.dash-sb-meter-top {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12.5px; color: var(--ink-soft); font-weight: 600;
}
.dash-sb-specs {
  display: flex; flex-wrap: wrap; gap: 6px;
  font-size: 11.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums;
  direction: ltr;
}
.dash-sb-specs span {
  padding: 3px 8px; border-radius: 6px;
  background: rgba(56, 189, 248, 0.12); color: #bae6fd;
}

.dash-main {
  padding: 26px clamp(22px, 2.6vw, 40px) 44px;
  min-width: 0;
  background: transparent;
}
.dash-main-inner {
  width: 100%;
  max-width: none;
  margin-inline: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.dash-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}
.dash-search-wrap {
  display: flex; align-items: center; gap: 9px;
  flex: 1 1 320px; max-width: 520px;
  padding: 0 14px; min-height: 42px; border-radius: 11px;
  background: rgba(14, 28, 51, 0.45);
  border: 1px solid var(--border);
  color: var(--ink-muted);
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.dash-search-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.dash-search-input {
  width: 100%; border: 0; background: transparent; color: var(--ink);
  font-size: 14px; outline: none;
}
.dash-search-input::placeholder { color: var(--ink-muted); }
.dash-topbar-meta { display: flex; align-items: center; gap: 8px; }

.dash-proj-head {
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
}
.dash-proj-head h1 { margin: 0; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.24; }
.dash-proj-head p { margin: 5px 0 0; font-size: 14.5px; color: var(--ink-muted); }

.dash-mp-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}
.dash-mp-head h1 { margin: 8px 0 6px; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.dash-mp-head p { margin: 0; font-size: 14.5px; color: var(--ink-muted); max-width: 640px; }
.dash-mp-controls { margin-bottom: 20px; }
.dash-mp-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
body[data-theme="light"] .dash-mp-head { border-bottom-color: var(--border); }

/* Renewal & Billing UI (v26) */
.dash-renew-pill { font-size: 11px; padding: 2px 8px; }
.renew-pass-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 18px 20px; border-radius: 14px; margin-bottom: 20px;
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.12), rgba(56, 189, 248, 0.08));
  border: 1px solid rgba(245, 158, 11, 0.28);
}
.renew-pass-body { min-width: 0; flex: 1 1 280px; }
.dash-billing-plans {
  padding: 20px; border-radius: 14px;
  background: rgba(14, 28, 51, 0.34);
  border: 1px solid rgba(56, 189, 248, 0.13);
}
.renew-modal-card { max-width: 540px; }
.renew-modal-sub { margin: 12px 0 14px; font-size: 14px; color: var(--ink-soft); }
.renew-ad-box {
  padding: 16px; border-radius: 12px;
  background: rgba(8, 18, 33, 0.72);
  border: 1px solid rgba(125, 211, 252, 0.22);
}
.renew-ad-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.renew-ad-sec { font-size: 13px; font-weight: 700; color: #bae6fd; }
.renew-ad-sponsor {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px; border-radius: 10px;
  background: rgba(14, 28, 51, 0.72);
  border: 1px dashed rgba(125, 211, 252, 0.24);
}
.renew-ad-sponsor-ico {
  width: 44px; height: 44px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: rgba(56, 189, 248, 0.16); color: #7dd3fc;
}
.renew-ad-sponsor strong { display: block; font-size: 15px; color: #ffffff; margin-bottom: 4px; }
.renew-ad-sponsor p { margin: 0; font-size: 13px; color: var(--ink-muted); line-height: 1.5; }
.renew-ad-frame-wrap {
  width: 100%; height: 220px; border-radius: 10px; overflow: hidden;
  border: 1px solid rgba(125, 211, 252, 0.2); background: #071222;
}
.renew-ad-frame { width: 100%; height: 100%; border: 0; display: block; }
.renew-ad-progress { margin-top: 14px; }
.renew-timer-status { margin-top: 8px; font-size: 12.5px; color: var(--ink-muted); text-align: center; }
.renew-modal-foot { justify-content: space-between; flex-wrap: wrap; gap: 10px; }
body[data-theme="light"] .renew-pass-card { background: linear-gradient(135deg, #fffbeb, #f0f9ff); border-color: rgba(217, 119, 6, 0.30); }
body[data-theme="light"] .dash-billing-plans { background: #ffffff; border-color: var(--border); box-shadow: var(--shadow-card); }
body[data-theme="light"] .renew-ad-box { background: #f4f9ff; border-color: var(--border-strong); }
body[data-theme="light"] .renew-ad-sec { color: #0369a1; }
body[data-theme="light"] .renew-ad-sponsor { background: #ffffff; border-color: rgba(2, 132, 199, 0.24); }
body[data-theme="light"] .renew-ad-sponsor strong { color: #071b2e; }

/* Seamless 2-Column Inline Paddle Checkout (v27) */
.checkout-page { max-width: 1060px; }
.checkout-back-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.checkout-switcher {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px;
  border-radius: 12px; background: rgba(14, 28, 51, 0.65); border: 1px solid var(--border);
}
.checkout-sw-pill {
  padding: 6px 12px; border-radius: 8px; font-size: 13px; font-weight: 600;
  color: var(--ink-muted); transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.checkout-sw-pill:hover { color: #ffffff; background: rgba(56, 189, 248, 0.12); }
.checkout-sw-pill.active { color: #041322; background: var(--accent); font-weight: 700; }
.checkout-grid {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.15fr); gap: 22px; align-items: start;
}
.checkout-summary, .checkout-payment-panel { padding: 24px; }
.checkout-brand-row {
  display: flex; align-items: center; gap: 12px; padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.checkout-brand-row strong { display: block; font-size: 16px; color: #ffffff; }
.checkout-item-head { padding: 20px 0 16px; border-bottom: 1px solid var(--border); }
.checkout-item-head h1 { margin: 0 0 8px; font-size: 24px; line-height: 1.2; }
.checkout-price { font-size: 34px; font-weight: 800; color: var(--accent-hover); letter-spacing: -0.02em; }
.checkout-desc { margin: 8px 0 0; font-size: 14px; color: var(--ink-muted); line-height: 1.55; }
.checkout-feats { margin: 18px 0; }
.checkout-account-box {
  padding: 13px 15px; border-radius: 11px;
  background: rgba(8, 18, 33, 0.58); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.checkout-account-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-muted); font-weight: 700; margin-bottom: 4px; }
.checkout-account-val { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.checkout-account-val span { color: var(--ink-muted); font-size: 12.5px; }
.checkout-trust {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: var(--ink-muted); padding-top: 12px; border-top: 1px solid var(--border);
}
.checkout-trust span { display: inline-flex; align-items: center; gap: 6px; }
.checkout-pay-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding-bottom: 14px; margin-bottom: 14px; border-bottom: 1px solid var(--border);
}
.checkout-pay-head h2 { margin: 0; font-size: 18px; }
.checkout-loading {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 44px 16px; color: var(--ink-muted); font-size: 14px;
}
.checkout-spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(56, 189, 248, 0.25); border-top-color: var(--accent);
  animation: buSpin 0.8s linear infinite;
}
@keyframes buSpin { to { transform: rotate(360deg); } }
.checkout-paddle-frame { min-height: 480px; width: 100%; }
body[data-theme="light"] .checkout-switcher { background: #ffffff; border-color: var(--border); }
body[data-theme="light"] .checkout-sw-pill:hover { color: #071b2e; background: #e0f2fe; }
body[data-theme="light"] .checkout-sw-pill.active { color: #ffffff; background: #0275b8; }
body[data-theme="light"] .checkout-brand-row strong { color: #071b2e; }
body[data-theme="light"] .checkout-account-box { background: #f4f9ff; }
@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
}

/* Mobile-only fallback tabs: sidebar handles navigation on desktop */
.dash-tabs {
  display: none; gap: 22px; border-bottom: 1px solid var(--border);
}
.dash-tab {
  padding: 9px 2px 13px; border: 0; border-bottom: 2px solid transparent;
  background: transparent; color: var(--ink-muted);
  font-size: 14.5px; font-weight: 600;
  display: inline-flex; align-items: center; gap: 8px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.dash-tab:hover { color: var(--ink); }
.dash-tab.active { color: #ffffff; border-bottom-color: var(--accent); }
.dash-tab-num {
  font-family: var(--font-mono); font-size: 11.5px; font-variant-numeric: tabular-nums;
  padding: 1px 8px; border-radius: 99px;
  background: rgba(56, 189, 248, 0.18); color: #bae6fd;
}

.dash-view { animation: tabFade 220ms var(--ease); min-width: 0; }
.dash-rows {
  display: grid;
  border-radius: 14px;
  background: rgba(14, 28, 51, 0.32);
  border: 1px solid rgba(56, 189, 248, 0.13);
  overflow: hidden;
}
.dash-row {
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(168px, 220px) 124px 96px auto;
  gap: 16px;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease);
}
.dash-row:last-child { border-bottom: 0; }
.dash-row:hover { background: rgba(56, 189, 248, 0.08); }
.dash-row-title { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dash-row-ident { min-width: 0; }
.dash-row-name {
  display: block; font-family: var(--font-display); font-weight: 700; font-size: 16px; color: #ffffff;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.dash-row-name:hover { color: var(--accent-hover); }
.dash-row-sub {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  margin-top: 3px; font-size: 12.5px; color: var(--ink-muted);
}
.dash-id-btn {
  padding: 1px 7px; border-radius: 6px;
  border: 1px solid rgba(125, 211, 252, 0.22);
  background: rgba(56, 189, 248, 0.10);
  color: #bae6fd; font-size: 11.5px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dash-id-btn:hover { background: rgba(56, 189, 248, 0.22); color: #ffffff; }
.dash-row-kind { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-width: 0; }
.dash-row-kind .badge { white-space: nowrap; }

.dash-row-status {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 600; color: var(--ink-muted); white-space: nowrap;
}
.dash-row-status::before {
  content: ''; width: 8px; height: 8px; border-radius: 50%;
  background: var(--ink-muted); flex: 0 0 auto;
}
.dash-row-status.is-online { color: var(--emerald-bright); }
.dash-row-status.is-online::before { background: var(--emerald-bright); box-shadow: 0 0 8px rgba(74, 222, 128, 0.65); }
.dash-row-status.is-offline { color: #fda4af; }
.dash-row-status.is-offline::before { background: var(--rose); }
.dash-row-status.is-starting { color: #fde68a; }
.dash-row-status.is-starting::before { background: var(--amber); }

.dash-row-ram {
  font-size: 13.5px; color: var(--ink-soft); direction: ltr; text-align: left;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
html[dir="ltr"] .dash-row-ram { text-align: right; }
.dash-row-actions { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.dash-row-actions form { margin: 0; display: flex; }
.dash-empty { margin-top: 4px; }

.dash-quota-strip {
  margin-top: 18px;
  padding: 16px 22px;
  border-radius: 14px;
  background: rgba(14, 28, 51, 0.26);
  border: 1px solid rgba(56, 189, 248, 0.13);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.dash-q-item { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.dash-q-label { font-size: 12px; color: var(--ink-muted); font-weight: 600; }
.dash-q-item strong { font-size: 15.5px; color: #f0f8ff; font-variant-numeric: tabular-nums; text-align: start; }

/* Light Mode Blended Workspace Dashboard Overrides */
body[data-theme="light"] .dash-window { background: transparent; }
body[data-theme="light"] .dash-sidebar {
  background: rgba(255, 255, 255, 0.72);
  border-inline-end-color: var(--border);
}
body[data-theme="light"] .dash-sb-btn { color: #456585; }
body[data-theme="light"] .dash-sb-btn:hover { background: #e0f2fe; color: #071b2e; }
body[data-theme="light"] .dash-sb-btn.active { background: #dbeafe; color: #0369a1; }
body[data-theme="light"] .dash-sb-group { border-top-color: var(--border); }
body[data-theme="light"] .dash-sb-proj { color: #264563; }
body[data-theme="light"] .dash-sb-proj:hover { background: #e0f2fe; color: #071b2e; }
body[data-theme="light"] .dash-sb-proj.current { background: #e0f2fe; color: #075985; }
body[data-theme="light"] .dash-sb-count { background: #bae6fd; color: #075985; }
body[data-theme="light"] .dash-sb-foot { background: #ffffff; border-color: var(--border); box-shadow: var(--shadow-card); }
body[data-theme="light"] .dash-sb-specs span { background: #e0f2fe; color: #075985; }

body[data-theme="light"] .dash-topbar { border-bottom-color: var(--border); }
body[data-theme="light"] .dash-search-wrap { background: #ffffff; border-color: var(--border-strong); color: #456585; box-shadow: 0 2px 6px rgba(7, 27, 46, 0.04); }
body[data-theme="light"] .dash-search-input { color: #071b2e; }
body[data-theme="light"] .dash-tabs { border-bottom-color: var(--border); }
body[data-theme="light"] .dash-tab.active { color: #0369a1; border-bottom-color: #0275b8; }
body[data-theme="light"] .dash-tab-num { background: #e0f2fe; color: #075985; }

body[data-theme="light"] .dash-rows { background: #ffffff; border-color: var(--border); box-shadow: var(--shadow-card); }
body[data-theme="light"] .dash-row { border-bottom-color: var(--border); }
body[data-theme="light"] .dash-row:hover { background: #f4f9ff; }
body[data-theme="light"] .dash-row-name { color: #071b2e; }
body[data-theme="light"] .dash-row-name:hover { color: #0369a1; }
body[data-theme="light"] .dash-id-btn { background: #e0f2fe; border-color: rgba(2, 132, 199, 0.26); color: #075985; }
body[data-theme="light"] .dash-id-btn:hover { background: #bae6fd; color: #071b2e; }
body[data-theme="light"] .dash-row-status.is-online { color: #047857; }
body[data-theme="light"] .dash-row-status.is-online::before { background: #10b981; box-shadow: none; }
body[data-theme="light"] .dash-row-status.is-offline { color: #be123c; }
body[data-theme="light"] .dash-row-status.is-starting { color: #b45309; }
body[data-theme="light"] .dash-quota-strip { background: #ffffff; border-color: var(--border); box-shadow: var(--shadow-card); }
body[data-theme="light"] .dash-q-item strong { color: #071b2e; }

@media (max-width: 980px) {
  .dash-window { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .dash-sidebar { display: none; }
  .dash-tabs { display: flex; }
  .dash-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .dash-row-kind, .dash-row-ram { display: none; }
}
@media (max-width: 640px) {
  .dash-main { padding: 18px 14px 40px; }
  .dash-row { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px 16px; }
  .dash-row-actions { justify-content: flex-start; }
  .dash-row-actions > a,
  .dash-row-actions > form { flex: 1 1 auto; }
  .dash-row-actions > form .button { width: 100%; }
  .dash-quota-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid-single { grid-template-columns: minmax(0, 1fr); }
}


/* ==========================================================================
   HOVER + CLICK 39-LANGUAGE FLAG SWITCHER
   ========================================================================== */

.lang-menu {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.lang-trigger {
  gap: 7px;
  padding: 0 11px;
}
.flag-ico {
  width: 20px;
  height: 15px;
  border-radius: 3px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22);
  display: block;
}
.lang-option .flag-ico {
  width: 22px;
  height: 16px;
}
.lang-code {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.lang-caret {
  width: 13px;
  height: 13px;
  opacity: 0.8;
  transition: transform 200ms var(--ease);
}
.lang-menu:hover .lang-caret,
.lang-menu:focus-within .lang-caret,
.lang-menu.is-open .lang-caret {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-end: 0;
  width: 430px;
  max-width: calc(100vw - 24px);
  background: rgba(9, 20, 38, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(2, 8, 20, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 12px;
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px) scale(0.98);
  transform-origin: top right;
  transition: opacity 180ms var(--ease), transform 200ms var(--ease), visibility 0ms linear 180ms;
}
html[dir="rtl"] .lang-dropdown {
  transform-origin: top left;
}
/* Invisible hover bridge so moving mouse from trigger to menu never drops hover */
.lang-dropdown::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
.lang-menu:hover .lang-dropdown,
.lang-menu:focus-within .lang-dropdown,
.lang-menu.is-open .lang-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
  transition: opacity 180ms var(--ease), transform 200ms var(--ease), visibility 0ms linear 0ms;
}

.lang-search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  height: 38px;
  margin-bottom: 10px;
  border-radius: 10px;
  background: rgba(6, 13, 24, 0.85);
  border: 1px solid rgba(125, 211, 252, 0.22);
  color: var(--ink-muted);
}
.lang-search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.18);
}
.lang-search-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: #f0f8ff;
  font-size: 13px;
  outline: none;
}
.lang-search-input::placeholder {
  color: var(--ink-muted);
}

.lang-grid-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  max-height: 368px;
  overflow-y: auto;
  padding-inline-end: 2px;
  padding-bottom: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.30) transparent;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  color: #e2f1ff;
  text-align: start;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.lang-option:hover {
  background: rgba(56, 189, 248, 0.14);
  border-color: rgba(125, 211, 252, 0.24);
  color: #ffffff;
}
.lang-option.is-active {
  background: rgba(56, 189, 248, 0.22);
  border-color: rgba(125, 211, 252, 0.48);
  color: #ffffff;
}
.lang-opt-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.lang-opt-native {
  font-size: 13px;
  font-weight: 700;
  color: inherit;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lang-opt-en {
  font-size: 11px;
  color: var(--ink-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lang-opt-check {
  margin-inline-start: auto;
  color: var(--accent-hover);
  flex: 0 0 auto;
}
.lang-empty {
  padding: 18px 10px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-muted);
}

/* Light Mode Flag Language Dropdown */
body[data-theme="light"] .lang-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(14, 116, 190, 0.22);
  box-shadow: 0 22px 58px rgba(7, 27, 46, 0.18), inset 0 1px 0 rgba(255, 255, 255, 1);
}
body[data-theme="light"] .flag-ico {
  box-shadow: 0 0 0 1px rgba(7, 27, 46, 0.14);
}
body[data-theme="light"] .lang-search-box {
  background: #f4f9ff;
  border-color: rgba(14, 116, 190, 0.24);
  color: #456585;
}
body[data-theme="light"] .lang-search-input {
  color: #071b2e;
}
body[data-theme="light"] .lang-option {
  color: #071b2e;
}
body[data-theme="light"] .lang-option:hover {
  background: #eaf5ff;
  border-color: rgba(2, 132, 199, 0.26);
  color: #0369a1;
}
body[data-theme="light"] .lang-option.is-active {
  background: #dbeafe;
  border-color: rgba(2, 117, 184, 0.45);
  color: #075985;
}
body[data-theme="light"] .lang-opt-check {
  color: #0275b8;
}

@media (max-width: 640px) {
  .lang-dropdown {
    position: fixed;
    top: 64px;
    left: 12px;
    right: 12px;
    inset-inline-end: auto;
    width: auto;
    max-width: none;
  }
  .lang-dropdown::before { display: none; }
  .lang-grid-menu {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: 60dvh;
  }
}
@media (max-width: 400px) {
  .lang-grid-menu {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================================
   PLUG-AND-PLAY BOT MARKETPLACE, 1-CLICK DEPLOY & UPGRADE MODAL (v20)
   ========================================================================== */

.ico-xs { width: 14px; height: 14px; }

/* Editorial Marketplace Header */
.mp-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 24px;
  margin-bottom: 22px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}
.mp-hero-text h1 {
  margin: 0 0 8px;
  font-size: clamp(26px, 3.3vw, 36px);
  letter-spacing: -0.025em;
  line-height: 1.12;
}
.mp-hero-text p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 58ch;
  font-size: 14.5px;
  line-height: 1.55;
}
.mp-quota-strip {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 14px 12px 16px;
  border-radius: 14px;
  background: rgba(12, 24, 44, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.16);
}
.mp-quota-main {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 170px;
}
.mp-quota-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}
.mp-quota-label { color: var(--ink-muted); font-weight: 600; }
.mp-quota-num { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.mp-quota-sub { font-size: 12px; color: var(--ink-muted); max-width: 240px; line-height: 1.4; }
.mp-quota-track {
  height: 5px;
  border-radius: 99px;
  background: rgba(148, 163, 184, 0.14);
  overflow: hidden;
}
.mp-quota-track > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

/* Unified Command Toolbar (Tabs + Inline Search) */
.mp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.mp-controls {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.mp-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.mp-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease);
}
.mp-pill:hover {
  background: rgba(148, 163, 184, 0.08);
  color: var(--ink);
}
.mp-pill-count {
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--ink-muted);
}
.mp-pill.active {
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.94);
  color: #071324;
  box-shadow: 0 4px 14px rgba(2, 12, 27, 0.28);
}
.mp-pill.active .mp-pill-count {
  background: rgba(7, 19, 36, 0.12);
  color: #071324;
}
.mp-search-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 13px;
  height: 38px;
  width: min(100%, 290px);
  border-radius: 10px;
  background: rgba(12, 24, 44, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: var(--ink-muted);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}
.mp-controls .mp-search-wrap { width: 100%; height: 42px; }
.mp-search-wrap:focus-within {
  border-color: rgba(56, 189, 248, 0.55);
  background: rgba(12, 24, 44, 0.95);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
}
.mp-search-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 13.5px;
  outline: none;
}
.mp-search-input::placeholder { color: var(--ink-muted); }

/* Bespoke Bot Directory Grid & Cards */
.mp-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.mp-card {
  --mp-c: #38bdf8;
  --mp-c-soft: rgba(56, 189, 248, 0.16);
  --mp-c-border: rgba(56, 189, 248, 0.34);
  --mp-c-glow: rgba(56, 189, 248, 0.20);
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #0b1628;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 18px;
  padding: 0;
  box-shadow: 0 10px 30px rgba(2, 8, 20, 0.36);
  transition: transform 220ms var(--ease), border-color 220ms var(--ease), box-shadow 220ms var(--ease);
}
.mp-card:hover {
  transform: translateY(-4px);
  border-color: var(--mp-c-border);
  box-shadow: 0 18px 44px rgba(2, 8, 20, 0.52), 0 0 0 1px var(--mp-c-soft);
}
.mp-theme-sky     { --mp-c: #38bdf8; --mp-c-soft: rgba(56, 189, 248, 0.18); --mp-c-border: rgba(56, 189, 248, 0.44); --mp-c-glow: rgba(14, 165, 233, 0.24); }
.mp-theme-indigo  { --mp-c: #818cf8; --mp-c-soft: rgba(129, 140, 248, 0.18); --mp-c-border: rgba(129, 140, 248, 0.44); --mp-c-glow: rgba(99, 102, 241, 0.24); }
.mp-theme-emerald { --mp-c: #34d399; --mp-c-soft: rgba(52, 211, 153, 0.18); --mp-c-border: rgba(52, 211, 153, 0.44); --mp-c-glow: rgba(16, 185, 129, 0.24); }
.mp-theme-amber   { --mp-c: #fbbf24; --mp-c-soft: rgba(251, 191, 36, 0.18); --mp-c-border: rgba(251, 191, 36, 0.44); --mp-c-glow: rgba(245, 158, 11, 0.22); }
.mp-theme-violet  { --mp-c: #c084fc; --mp-c-soft: rgba(192, 132, 252, 0.18); --mp-c-border: rgba(192, 132, 252, 0.44); --mp-c-glow: rgba(168, 85, 247, 0.24); }
.mp-theme-rose    { --mp-c: #fb7185; --mp-c-soft: rgba(251, 113, 133, 0.18); --mp-c-border: rgba(251, 113, 133, 0.44); --mp-c-glow: rgba(244, 63, 94, 0.24); }

/* Visual Top Stage with Architectural Dot Grid & Subtle Signature Glow */
.mp-card-stage {
  position: relative;
  padding: 18px 20px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  background:
    radial-gradient(ellipse 85% 110% at 12% 0%, var(--mp-c-glow), transparent 68%),
    radial-gradient(rgba(148, 163, 184, 0.16) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 30, 54, 0.85) 0%, rgba(11, 22, 40, 0.96) 100%);
  background-size: 100% 100%, 16px 16px, 100% 100%;
}
.mp-card-stage::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mp-c), transparent 72%);
  opacity: 0.72;
  transition: opacity 220ms var(--ease);
}
.mp-card:hover .mp-card-stage::before { opacity: 1; }
.mp-stage-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mp-stage-preview {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border-radius: 8px;
  background: rgba(6, 13, 25, 0.78);
  border: 1px solid rgba(148, 163, 184, 0.18);
  font-size: 12px;
  color: #e2eefc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.mp-online-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.75);
  flex: 0 0 auto;
}

.mp-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.mp-card-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}
.mp-ram-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-soft);
  background: var(--surface-2);
  border: 1px solid var(--border);
}
.mp-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.badge-amber {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(251, 191, 36, 0.36);
}
body[data-theme="light"] .badge-amber {
  color: #92400e;
  background: #fef3c7;
  border-color: rgba(217, 119, 6, 0.34);
}

.mp-ico-tile,
.mp-ico-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 1px solid transparent;
}
.mp-ico-tile {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 6px 16px rgba(2, 8, 20, 0.34);
}
.mp-ico-sm {
  width: 36px;
  height: 36px;
  border-radius: 11px;
}
.mp-accent-sky     { color: #38bdf8; background: rgba(56, 189, 248, 0.16); border-color: rgba(56, 189, 248, 0.36); }
.mp-accent-indigo  { color: #a5b4fc; background: rgba(129, 140, 248, 0.16); border-color: rgba(129, 140, 248, 0.36); }
.mp-accent-emerald { color: #34d399; background: rgba(52, 211, 153, 0.16); border-color: rgba(52, 211, 153, 0.36); }
.mp-accent-amber   { color: #fcd34d; background: rgba(251, 191, 36, 0.16); border-color: rgba(251, 191, 36, 0.36); }
.mp-accent-violet  { color: #d8b4fe; background: rgba(167, 139, 250, 0.16); border-color: rgba(167, 139, 250, 0.36); }
.mp-accent-rose    { color: #fda4af; background: rgba(251, 113, 133, 0.16); border-color: rgba(251, 113, 133, 0.36); }

.mp-card-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 18px 20px 16px;
}
.mp-cat-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--mp-c);
  margin-bottom: 5px;
}
.mp-card-body h2 {
  margin: 0 0 7px;
  font-size: 18px;
  letter-spacing: -0.015em;
  line-height: 1.28;
  color: #f8fbff;
}
.mp-card-desc {
  margin: 0 0 14px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Crisp Discord Slash-Command Strip */
.mp-cmd-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 14px;
}
.mp-cmd-chip {
  font-size: 11.5px;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
}

/* Scannable 2-Item Highlights */
.mp-highlights {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.mp-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.8px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.mp-hl-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--mp-c);
  margin-top: 7px;
  flex: 0 0 auto;
  opacity: 0.85;
}
.mp-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.mp-features li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-soft);
}
.mp-feat-tick {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  flex: 0 0 auto;
  margin-top: 2px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(52, 211, 153, 0.14);
  color: #34d399;
}

/* Refined Split Footer (Tier Pill Left + Tactile Accent Action Right) */
.mp-card-foot {
  margin-top: auto;
  padding: 13px 20px;
  border-top: 1px solid rgba(148, 163, 184, 0.10);
  background: rgba(7, 15, 29, 0.42);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.mp-tier-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
}
.mp-tier-free { color: #94a3b8; }
.mp-tier-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}
.mp-tier-paid {
  padding: 3px 9px;
  border-radius: 99px;
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(251, 191, 36, 0.30);
}
.mp-card-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 10px;
  border: 1px solid var(--mp-c-border);
  background: var(--mp-c-soft);
  color: #f8fbff;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 180ms var(--ease), color 180ms var(--ease), border-color 180ms var(--ease), transform 180ms var(--ease), box-shadow 180ms var(--ease);
}
.mp-card-cta:hover {
  background: var(--mp-c);
  border-color: var(--mp-c);
  color: #061221;
  box-shadow: 0 6px 18px var(--mp-c-glow);
  transform: translateY(-1px);
}
.mp-card-cta.is-lock-cta {
  border-color: rgba(251, 191, 36, 0.34);
  background: rgba(245, 158, 11, 0.12);
  color: #fde68a;
}
.mp-card-cta.is-lock-cta:hover {
  background: #f59e0b;
  border-color: #f59e0b;
  color: #0b1120;
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.28);
}
.mp-deploy-btn {
  width: 100%;
  justify-content: center;
}

/* Landing Page Marketplace Teaser */
.mp-teaser-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}
.mp-teaser-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: var(--shadow-card);
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.mp-teaser-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card-hover);
}
.mp-teaser-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.mp-teaser-card p {
  margin: 0 0 16px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  flex: 1 1 auto;
}
.mp-teaser-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

/* Upgrade Conversion Modal */
.mp-upgrade-card {
  max-width: 680px;
  width: min(94vw, 680px);
  padding: 22px;
}
.mp-upgrade-head-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
}
.mp-upgrade-body {
  margin: 12px 0 18px;
  color: var(--ink-soft);
  font-size: 14.5px;
  line-height: 1.6;
}
.mp-plan-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.mp-mini-plan {
  position: relative;
  overflow: hidden;
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 240ms var(--ease), border-color 240ms var(--ease), box-shadow 240ms var(--ease);
}
.mp-mini-plan::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  pointer-events: none;
}
.mp-mini-plan:hover { transform: translateY(-3px); }
.mp-mini-plan.mp-mini-tier-free {
  background: linear-gradient(160deg, rgba(16, 185, 129, 0.16) 0%, rgba(10, 22, 42, 0.92) 65%);
  border-color: rgba(52, 211, 153, 0.38);
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.10);
}
.mp-mini-plan.mp-mini-tier-free::before { background: linear-gradient(90deg, transparent, #34d399, #10b981, transparent); }
.mp-mini-plan.mp-mini-tier-free:hover { border-color: rgba(52, 211, 153, 0.68); box-shadow: 0 16px 34px rgba(16, 185, 129, 0.20); }
.mp-mini-plan.mp-mini-tier-starter,
.mp-mini-plan.is-featured {
  background: linear-gradient(160deg, rgba(14, 165, 233, 0.26) 0%, rgba(99, 102, 241, 0.16) 46%, rgba(10, 22, 44, 0.94) 100%);
  border-color: rgba(56, 189, 248, 0.62);
  box-shadow: 0 14px 36px rgba(14, 165, 233, 0.24);
}
.mp-mini-plan.mp-mini-tier-starter::before { height: 3px; background: linear-gradient(90deg, #38bdf8, #818cf8, #22d3ee); }
.mp-mini-plan.mp-mini-tier-starter:hover { border-color: rgba(125, 211, 252, 0.88); box-shadow: 0 20px 44px rgba(14, 165, 233, 0.34); }
.mp-mini-plan.mp-mini-tier-pro {
  background: linear-gradient(160deg, rgba(168, 85, 247, 0.26) 0%, rgba(236, 72, 153, 0.14) 46%, rgba(12, 18, 38, 0.94) 100%);
  border-color: rgba(192, 132, 252, 0.56);
  box-shadow: 0 14px 36px rgba(168, 85, 247, 0.22);
}
.mp-mini-plan.mp-mini-tier-pro::before { height: 3px; background: linear-gradient(90deg, #a855f7, #ec4899, #fbbf24); }
.mp-mini-plan.mp-mini-tier-pro:hover { border-color: rgba(232, 121, 249, 0.86); box-shadow: 0 20px 44px rgba(168, 85, 247, 0.34); }
.mp-mini-plan.is-current {
  border-style: dashed;
}
.mp-mini-plan-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 15px;
}
.mp-mini-price {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--accent);
}
.mp-mini-plan.mp-mini-tier-free .mp-mini-price { color: #6ee7b7; }
.mp-mini-plan.mp-mini-tier-starter .mp-mini-price { color: #7dd3fc; }
.mp-mini-plan.mp-mini-tier-pro .mp-mini-price { color: #f5d0fe; }
.mp-mini-plan.mp-mini-tier-pro .mp-mini-specs li:nth-child(2) strong { color: #fde68a; }
.mp-mini-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12.5px;
  color: var(--ink-soft);
}
.mp-upgrade-foot {
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

/* 1-Click Deploy Page */
.mp-deploy-back { margin-bottom: 16px; }
.mp-deploy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(260px, 0.9fr);
  gap: 20px;
  align-items: start;
}
.mp-deploy-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}
.mp-deploy-head h1 {
  margin: 6px 0 4px;
  font-size: 24px;
}
.mp-deploy-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.mp-guide {
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: 14px;
  margin-bottom: 20px;
  overflow: hidden;
}
.mp-guide summary {
  list-style: none;
  cursor: pointer;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.mp-guide summary::-webkit-details-marker { display: none; }
.mp-guide[open] .faq-chevron { transform: rotate(180deg); }
.mp-guide-steps {
  margin: 0;
  padding: 0 22px 16px 34px;
  padding-inline-start: 34px;
  padding-inline-end: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--ink-soft);
}
.mp-config-form .field {
  margin-bottom: 4px;
}
.input-pw-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.input-pw-wrap .input {
  width: 100%;
  padding-inline-end: 84px;
}
html[dir="rtl"] .input-pw-wrap .input[dir="ltr"] {
  padding-left: 84px;
  padding-right: 14px;
  text-align: right;
}
.mp-config-form .input::placeholder {
  font-family: var(--font-body, 'IBM Plex Sans Arabic', sans-serif);
}
.mp-config-form select.input option {
  background: var(--surface);
  color: var(--ink);
}
.mp-req {
  color: #fb7185;
  font-weight: 700;
}
.mp-field-help {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--ink-muted);
}
.mp-deploy-submit-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}
.mp-deploy-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mp-deploy-aside h3 {
  margin: 0;
  font-size: 16.5px;
}
.mp-auto-steps {
  margin: 12px 0 0;
  padding-inline-start: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-soft);
}
.mp-tpl-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Light Mode Marketplace Overrides */
body[data-theme="light"] .mp-hero { border-bottom-color: var(--border); }
body[data-theme="light"] .mp-quota-strip { background: #ffffff; border-color: var(--border); box-shadow: var(--shadow-card); }
body[data-theme="light"] .mp-quota-track { background: #e2eef9; }
body[data-theme="light"] .mp-pill:hover { background: #eaf4ff; color: #071b2e; }
body[data-theme="light"] .mp-pill-count { background: #e7f2fe; color: #456585; }
body[data-theme="light"] .mp-pill.active {
  background: #071b2e;
  border-color: #071b2e;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(7, 27, 46, 0.16);
}
body[data-theme="light"] .mp-pill.active .mp-pill-count { background: rgba(255, 255, 255, 0.18); color: #ffffff; }
body[data-theme="light"] .mp-search-wrap { background: #ffffff; border-color: var(--border); }
body[data-theme="light"] .mp-search-wrap:focus-within { background: #ffffff; }
body[data-theme="light"] .mp-card {
  background: #ffffff;
  border-color: var(--border);
  box-shadow: 0 8px 26px rgba(7, 27, 46, 0.06);
}
body[data-theme="light"] .mp-card:hover {
  box-shadow: 0 16px 38px rgba(7, 27, 46, 0.12);
}
body[data-theme="light"] .mp-card-stage {
  border-bottom-color: var(--border);
  background:
    radial-gradient(ellipse 85% 110% at 12% 0%, var(--mp-c-soft), transparent 72%),
    radial-gradient(rgba(15, 23, 42, 0.09) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  background-size: 100% 100%, 16px 16px, 100% 100%;
}
body[data-theme="light"] .mp-stage-preview {
  background: #ffffff;
  border-color: var(--border);
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(7, 27, 46, 0.06);
}
body[data-theme="light"] .mp-card-body h2 { color: #071b2e; }
body[data-theme="light"] .mp-cmd-chip { background: #f1f7fd; border-color: #dce9f7; color: #1e3a5f; }
body[data-theme="light"] .mp-card-foot { background: #f8fbff; border-top-color: var(--border); }
body[data-theme="light"] .mp-tier-free { color: #475569; }
body[data-theme="light"] .mp-tier-paid { background: #fef3c7; color: #92400e; border-color: rgba(217, 119, 6, 0.30); }
body[data-theme="light"] .mp-card-cta { color: #071b2e; }
body[data-theme="light"] .mp-card-cta:hover { color: #ffffff; }
body[data-theme="light"] .mp-card-cta.is-lock-cta { background: #fef3c7; color: #92400e; border-color: rgba(217, 119, 6, 0.36); }
body[data-theme="light"] .mp-card-cta.is-lock-cta:hover { background: #d97706; color: #ffffff; }
body[data-theme="light"] .mp-theme-sky     { --mp-c: #0284c7; --mp-c-soft: rgba(2, 132, 199, 0.12); }
body[data-theme="light"] .mp-theme-indigo  { --mp-c: #4f46e5; --mp-c-soft: rgba(79, 70, 229, 0.12); }
body[data-theme="light"] .mp-theme-emerald { --mp-c: #059669; --mp-c-soft: rgba(5, 150, 105, 0.12); }
body[data-theme="light"] .mp-theme-amber   { --mp-c: #d97706; --mp-c-soft: rgba(217, 119, 6, 0.12); }
body[data-theme="light"] .mp-theme-violet  { --mp-c: #7c3aed; --mp-c-soft: rgba(124, 58, 237, 0.12); }
body[data-theme="light"] .mp-theme-rose    { --mp-c: #e11d48; --mp-c-soft: rgba(225, 29, 72, 0.12); }
body[data-theme="light"] .mp-accent-sky     { color: #0369a1; background: #e0f2fe; border-color: rgba(2, 132, 199, 0.28); }
body[data-theme="light"] .mp-accent-indigo  { color: #4338ca; background: #e0e7ff; border-color: rgba(79, 70, 229, 0.28); }
body[data-theme="light"] .mp-accent-emerald { color: #047857; background: #d1fae5; border-color: rgba(5, 150, 105, 0.28); }
body[data-theme="light"] .mp-accent-amber   { color: #b45309; background: #fef3c7; border-color: rgba(217, 119, 6, 0.28); }
body[data-theme="light"] .mp-accent-violet  { color: #6d28d9; background: #ede9fe; border-color: rgba(124, 58, 237, 0.28); }
body[data-theme="light"] .mp-accent-rose    { color: #be123c; background: #ffe4e6; border-color: rgba(225, 29, 72, 0.28); }
body[data-theme="light"] .mp-feat-tick      { background: #d1fae5; color: #047857; }
body[data-theme="light"] .mp-ram-pill       { background: #eef6ff; color: #264563; }
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-free {
  background: linear-gradient(160deg, #ecfdf5 0%, #ffffff 74%);
  border-color: rgba(16, 185, 129, 0.40);
  box-shadow: 0 8px 22px rgba(16, 185, 129, 0.10);
}
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-free .mp-mini-price { color: #047857; }
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-starter,
body[data-theme="light"] .mp-mini-plan.is-featured {
  background: linear-gradient(160deg, #e0f2fe 0%, #eef2ff 50%, #ffffff 85%);
  border-color: rgba(14, 165, 233, 0.54);
  box-shadow: 0 10px 26px rgba(2, 132, 199, 0.15);
}
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-starter .mp-mini-price { color: #0369a1; }
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-pro {
  background: linear-gradient(160deg, #faf5ff 0%, #fdf2f8 50%, #ffffff 85%);
  border-color: rgba(168, 85, 247, 0.48);
  box-shadow: 0 10px 26px rgba(147, 51, 234, 0.14);
}
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-pro .mp-mini-price { color: #7e22ce; }
body[data-theme="light"] .mp-mini-plan.mp-mini-tier-pro .mp-mini-specs li:nth-child(2) strong { color: #7e22ce; }

/* Responsive Breakpoints */
@media (max-width: 1100px) {
  .mp-teaser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .mp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mp-hero { grid-template-columns: 1fr; }
  .mp-deploy-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .mp-toolbar .mp-search-wrap { width: 100%; }
  .mp-quota-strip { width: 100%; justify-content: space-between; }
}
@media (max-width: 640px) {
  .mp-grid,
  .mp-teaser-grid,
  .mp-plan-compare { grid-template-columns: 1fr; }
  .mp-deploy-head { flex-direction: column; }
}


/* ==========================================================================
   CREATE BOT MODE CHOOSER (BUILD MYSELF VS READY PRESET) & SLOT LOCKS (v21)
   ========================================================================== */

.dash-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.dash-mode-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1.5px solid var(--border);
  background: var(--well);
  color: var(--ink);
  text-align: start;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.dash-mode-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
}
.dash-mode-card.selected {
  border-color: var(--accent);
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.14) 0%, var(--surface) 75%);
  box-shadow: 0 10px 26px rgba(14, 165, 233, 0.14);
}
.dash-mode-copy {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.dash-mode-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-mode-copy strong {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.dash-mode-copy small {
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink-soft);
}

.dash-preset-head {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}
.dash-preset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.dash-preset-card {
  display: flex;
  flex-direction: column;
  background: var(--well);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  transition: border-color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.dash-preset-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.dash-preset-card.is-locked {
  background: linear-gradient(165deg, rgba(244, 63, 94, 0.06) 0%, var(--well) 45%);
}
.dash-preset-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}
.dash-preset-card p {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink-soft);
  flex: 1 1 auto;
}
.dash-preset-foot {
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.dash-slot-full {
  background: var(--well);
  border: 1px solid rgba(251, 191, 36, 0.36);
  border-radius: 18px;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.dash-slot-full-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.dash-slot-full-head h2 {
  margin: 0 0 6px;
  font-size: 19px;
}
.dash-slot-full-head p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
}

.mp-slot-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

body[data-theme="light"] .dash-mode-card {
  background: #ffffff;
}
body[data-theme="light"] .dash-mode-card.selected {
  background: linear-gradient(155deg, #e0f2fe 0%, #ffffff 78%);
  border-color: #0275b8;
}
body[data-theme="light"] .dash-preset-card {
  background: #ffffff;
}
body[data-theme="light"] .dash-preset-card.is-locked {
  background: linear-gradient(165deg, #fff1f2 0%, #ffffff 45%);
}
body[data-theme="light"] .dash-slot-full {
  background: #fffbeb;
  border-color: rgba(217, 119, 6, 0.34);
}

@media (max-width: 1024px) {
  .dash-preset-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .dash-mode-picker,
  .dash-preset-grid { grid-template-columns: 1fr; }
}


/* ==========================================================================
   VS CODE-STYLE ADVANCED CODING MODE (STUDIO IDE, v23)
   ========================================================================== */

.bot-tabs-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.bot-tabs-row .tabbar {
  margin-bottom: 0;
}
.ide-launch-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

body.ide-mode-open {
  overflow: hidden;
}

.ide-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: flex;
  flex-direction: column;
  background: #0a1424;
  color: #e2effc;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 210ms cubic-bezier(0.22, 1, 0.36, 1), transform 210ms cubic-bezier(0.22, 1, 0.36, 1);
}
.ide-overlay.is-open {
  opacity: 1;
  transform: scale(1);
}

/* Header Bar */
.ide-header {
  height: 48px;
  flex: 0 0 48px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #07101e;
  border-bottom: 1px solid rgba(56, 189, 248, 0.16);
}
.ide-header-start {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ide-bot-title {
  font-size: 14.5px;
  color: #f0f8ff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ide-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}
.ide-power-group {
  display: inline-flex;
  align-items: center;
  background: rgba(14, 28, 51, 0.85);
  border: 1px solid rgba(56, 189, 248, 0.18);
  border-radius: 9px;
  overflow: hidden;
}
.ide-pwr-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  font-size: 11px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background var(--t-fast) var(--ease);
}
.ide-pwr-btn:hover { background: rgba(255, 255, 255, 0.08); }
.ide-pwr-btn.is-start { color: #4ade80; }
.ide-pwr-btn.is-restart { color: #38bdf8; font-size: 14px; }
.ide-pwr-btn.is-stop { color: #fbbf24; font-size: 10px; }

.ide-hdr-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(56, 189, 248, 0.18);
  background: rgba(14, 28, 51, 0.72);
  color: #cbe3fb;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ide-hdr-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  border-color: rgba(125, 211, 252, 0.36);
  color: #ffffff;
}
.ide-save-btn {
  min-height: 32px;
  padding: 0 13px;
}
.ide-save-btn.is-dirty {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45), 0 6px 18px rgba(14, 165, 233, 0.35);
}
.ide-exit-btn {
  min-height: 32px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ide-icon-btn {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: #9ec0df;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.ide-icon-btn:hover {
  background: rgba(56, 189, 248, 0.16);
  color: #ffffff;
}

/* Split Body */
.ide-body {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
  transition: grid-template-columns 180ms var(--ease);
}
.ide-overlay.sidebar-collapsed .ide-body {
  grid-template-columns: 0px minmax(0, 1fr);
}
.ide-overlay.sidebar-collapsed .ide-sidebar {
  overflow: hidden;
  border-right-width: 0;
}

/* Left Explorer Sidebar */
.ide-sidebar {
  background: #081222;
  border-right: 1px solid rgba(56, 189, 248, 0.14);
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}
.ide-explorer-head {
  height: 38px;
  padding: 0 8px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.10);
}
.ide-explorer-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #7ca3c7;
}
.ide-explorer-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}
.ide-filter-wrap {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(56, 189, 248, 0.08);
}
.ide-filter-input {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  border-radius: 7px;
  border: 1px solid rgba(56, 189, 248, 0.16);
  background: #060d18;
  color: #e2effc;
  font: inherit;
  font-size: 12.5px;
  outline: none;
}
.ide-filter-input:focus {
  border-color: #38bdf8;
}
.ide-inline-create {
  padding: 8px 10px;
  background: rgba(56, 189, 248, 0.08);
  border-bottom: 1px solid rgba(56, 189, 248, 0.18);
}
.ide-inline-label {
  font-size: 11px;
  color: #7dd3fc;
  margin-bottom: 5px;
  font-weight: 600;
}
.ide-inline-form {
  display: flex;
  align-items: center;
  gap: 4px;
}
.ide-inline-input {
  flex: 1 1 auto;
  min-width: 0;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: #060d18;
  color: #ffffff;
  font-size: 12.5px;
  outline: none;
}

.ide-tree {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 211, 252, 0.25) transparent;
}
.ide-tree-empty {
  padding: 18px 14px;
  font-size: 12.5px;
  color: #7ca3c7;
}
.ide-tree-row {
  height: 30px;
  padding-right: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #c5dcf3;
  font-size: 13px;
  border-left: 2px solid transparent;
  user-select: none;
  transition: background 120ms ease, color 120ms ease;
}
.ide-tree-row:hover {
  background: rgba(56, 189, 248, 0.10);
  color: #ffffff;
}
.ide-tree-row.is-active {
  background: rgba(56, 189, 248, 0.18);
  border-left-color: #38bdf8;
  color: #ffffff;
  font-weight: 600;
}
.ide-tree-row.is-selected-dir {
  background: rgba(56, 189, 248, 0.08);
}
.ide-tree-chev {
  width: 12px;
  flex: 0 0 12px;
  text-align: center;
  font-size: 11px;
  color: #7ca3c7;
}
.ide-tree-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ide-tree-del {
  opacity: 0;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #fda4af;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  transition: opacity 120ms ease, background 120ms ease;
}
.ide-tree-row:hover .ide-tree-del { opacity: 0.85; }
.ide-tree-del:hover { opacity: 1 !important; background: rgba(244, 63, 94, 0.22); }

/* Language File Tags */
.ide-ftag {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 4px;
  flex: 0 0 auto;
  letter-spacing: 0.02em;
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}
.ide-ftag.tag-dir  { background: rgba(56, 189, 248, 0.18); color: #7dd3fc; }
.ide-ftag.tag-js   { background: rgba(250, 204, 21, 0.18); color: #fde047; }
.ide-ftag.tag-ts   { background: rgba(59, 130, 246, 0.22); color: #93c5fd; }
.ide-ftag.tag-py   { background: rgba(56, 189, 248, 0.20); color: #38bdf8; }
.ide-ftag.tag-rs   { background: rgba(251, 113, 133, 0.20); color: #fda4af; }
.ide-ftag.tag-java { background: rgba(251, 146, 60, 0.20); color: #fdba74; }
.ide-ftag.tag-json { background: rgba(52, 211, 153, 0.18); color: #6ee7b7; }
.ide-ftag.tag-env  { background: rgba(167, 139, 250, 0.22); color: #c4b5fd; }
.ide-ftag.tag-cfg  { background: rgba(244, 114, 182, 0.18); color: #f9a8d4; }
.ide-ftag.tag-md   { background: rgba(125, 211, 252, 0.18); color: #bae6fd; }

/* Main Editor Column */
.ide-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  background: #0a1424;
  position: relative;
}
.ide-tabbar {
  min-height: 38px;
  flex: 0 0 auto;
  display: flex;
  align-items: stretch;
  overflow-x: auto;
  background: #07101e;
  border-bottom: 1px solid rgba(56, 189, 248, 0.14);
  scrollbar-width: none;
}
.ide-tabbar::-webkit-scrollbar { display: none; }
.ide-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 10px 0 12px;
  height: 38px;
  font-size: 13px;
  color: #8fb3d4;
  background: transparent;
  border-right: 1px solid rgba(56, 189, 248, 0.10);
  border-top: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
  transition: background 120ms ease, color 120ms ease;
}
.ide-tab:hover { background: rgba(56, 189, 248, 0.08); color: #e2effc; }
.ide-tab.active {
  background: #0a1424;
  color: #ffffff;
  border-top-color: #38bdf8;
}
.ide-tab-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #38bdf8;
  display: none;
}
.ide-tab.dirty .ide-tab-dot { display: inline-block; }
.ide-tab-close {
  width: 20px;
  height: 20px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #7ca3c7;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
}
.ide-tab-close:hover { background: rgba(255, 255, 255, 0.12); color: #ffffff; }

/* Quick Find Bar */
.ide-findbar {
  position: absolute;
  top: 46px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #0e1c33;
  border: 1px solid rgba(125, 211, 252, 0.34);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}
.ide-find-input {
  width: 210px;
  height: 28px;
  padding: 0 9px;
  border-radius: 6px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: #060d18;
  color: #ffffff;
  font-size: 12.5px;
  outline: none;
}
.ide-find-input:focus { border-color: #38bdf8; }
.ide-find-count {
  font-size: 11.5px;
  color: #9ec0df;
  min-width: 44px;
  text-align: center;
}

/* Welcome Empty Screen */
.ide-welcome {
  flex: 1 1 auto;
  display: grid;
  place-items: center;
  padding: 28px;
}
.ide-welcome-card {
  max-width: 460px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.ide-welcome-ico {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.14);
  border: 1px solid rgba(56, 189, 248, 0.30);
  color: #38bdf8;
  display: grid;
  place-items: center;
}
.ide-welcome-card h2 { margin: 4px 0 0; font-size: 20px; color: #f0f8ff; }
.ide-welcome-card p { margin: 0; font-size: 14px; color: #8fb3d4; line-height: 1.55; }
.ide-quick-files {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.ide-quick-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 11px;
  border-radius: 9px;
  border: 1px solid rgba(56, 189, 248, 0.22);
  background: #0e1c33;
  color: #e2effc;
  font-family: var(--font-mono);
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease;
}
.ide-quick-chip:hover { border-color: #38bdf8; background: rgba(56, 189, 248, 0.14); }
.ide-shortcuts {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  font-size: 12px;
  color: #7ca3c7;
}
.ide-shortcuts kbd {
  padding: 2px 6px;
  border-radius: 5px;
  background: #142746;
  border: 1px solid rgba(125, 211, 252, 0.22);
  color: #e2effc;
  font-family: var(--font-mono);
  font-size: 11px;
}

/* Layered Syntax-Highlighted Editor */
.ide-editor-wrap {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  overflow: hidden;
  background: #0a1424;
}
.ide-gutter {
  padding: 14px 10px 14px 6px;
  text-align: right;
  font-size: 13.5px;
  line-height: 1.65;
  color: #4f7091;
  background: #081120;
  border-right: 1px solid rgba(56, 189, 248, 0.10);
  white-space: pre;
  overflow: hidden;
  user-select: none;
}
.ide-code-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.ide-highlight,
.ide-textarea {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 14px 18px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 13.5px;
  line-height: 1.65;
  tab-size: 2;
  white-space: pre;
  word-wrap: normal;
  overflow: auto;
  border: 0;
  box-sizing: border-box;
  letter-spacing: 0;
}
.ide-highlight {
  pointer-events: none;
  color: #e2effc;
  background: transparent;
}
.ide-highlight code {
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
}
.ide-textarea {
  width: 100%;
  height: 100%;
  resize: none;
  outline: none;
  background: transparent;
  color: transparent;
  -webkit-text-fill-color: transparent;
  caret-color: #38bdf8;
}
.ide-textarea::selection {
  background: rgba(56, 189, 248, 0.30);
}

/* VS Code Dark+ Inspired Syntax Colors */
.tok-kw   { color: #c084fc; font-weight: 500; }
.tok-str  { color: #86efac; }
.tok-cm   { color: #6484a6; font-style: italic; }
.tok-num  { color: #fbbf24; }
.tok-bool { color: #38bdf8; font-weight: 500; }
.tok-key  { color: #7dd3fc; }

/* Collapsible Read-Only Console Drawer */
.ide-console-drawer {
  flex: 0 0 210px;
  display: flex;
  flex-direction: column;
  background: #060d18;
  border-top: 1px solid rgba(56, 189, 248, 0.22);
  min-height: 0;
}
.ide-console-head {
  height: 32px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #7ca3c7;
  border-bottom: 1px solid rgba(56, 189, 248, 0.10);
}
.ide-console-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 8px 14px;
  font-size: 12.5px;
  line-height: 1.55;
  color: #cbd5e1;
}

/* Bottom Status Bar */
.ide-statusbar {
  height: 26px;
  flex: 0 0 26px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #0b4f82;
  color: #e6f5ff;
  font-size: 11.5px;
  user-select: none;
}
.ide-sb-left,
.ide-sb-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ide-sb-btn {
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-radius: 4px;
  padding: 1px 7px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.ide-sb-btn:hover { background: rgba(255, 255, 255, 0.22); }
.ide-status-pill {
  padding: 0 7px;
  border-radius: 4px;
  font-weight: 600;
}
.ide-status-pill.is-dirty { background: rgba(251, 191, 36, 0.25); color: #fef08a; }
.ide-status-pill.is-saved { background: rgba(74, 222, 128, 0.22); color: #bbf7d0; }

/* Light Mode VS Code Studio */
body[data-theme="light"] .ide-overlay { background: #ffffff; color: #071b2e; }
body[data-theme="light"] .ide-header { background: #f2f8ff; border-bottom-color: var(--border); }
body[data-theme="light"] .ide-bot-title { color: #071b2e; }
body[data-theme="light"] .ide-power-group { background: #ffffff; border-color: var(--border); }
body[data-theme="light"] .ide-hdr-btn { background: #ffffff; border-color: var(--border); color: #264563; }
body[data-theme="light"] .ide-hdr-btn:hover { background: #e0f2fe; color: #0369a1; }
body[data-theme="light"] .ide-icon-btn { color: #456585; }
body[data-theme="light"] .ide-icon-btn:hover { background: #e0f2fe; color: #0369a1; }
body[data-theme="light"] .ide-sidebar { background: #f7fbff; border-right-color: var(--border); }
body[data-theme="light"] .ide-filter-input,
body[data-theme="light"] .ide-inline-input,
body[data-theme="light"] .ide-find-input { background: #ffffff; color: #071b2e; border-color: var(--border-strong); }
body[data-theme="light"] .ide-tree-row { color: #264563; }
body[data-theme="light"] .ide-tree-row:hover { background: #eaf5ff; color: #071b2e; }
body[data-theme="light"] .ide-tree-row.is-active { background: #dbeafe; border-left-color: #0275b8; color: #075985; }
body[data-theme="light"] .ide-tabbar { background: #eef6ff; border-bottom-color: var(--border); }
body[data-theme="light"] .ide-tab { color: #456585; border-right-color: var(--border); }
body[data-theme="light"] .ide-tab.active { background: #ffffff; color: #071b2e; border-top-color: #0275b8; }
body[data-theme="light"] .ide-main,
body[data-theme="light"] .ide-editor-wrap { background: #ffffff; }
body[data-theme="light"] .ide-gutter { background: #f7fbff; color: #64748b; border-right-color: var(--border); }
body[data-theme="light"] .ide-highlight { color: #0f172a; }
body[data-theme="light"] .ide-textarea { caret-color: #0275b8; }
body[data-theme="light"] .tok-kw   { color: #7c3aed; }
body[data-theme="light"] .tok-str  { color: #047857; }
body[data-theme="light"] .tok-cm   { color: #64748b; }
body[data-theme="light"] .tok-num  { color: #b45309; }
body[data-theme="light"] .tok-bool { color: #0275b8; }
body[data-theme="light"] .tok-key  { color: #0369a1; }
body[data-theme="light"] .ide-welcome-card h2 { color: #071b2e; }
body[data-theme="light"] .ide-welcome-card p { color: #456585; }
body[data-theme="light"] .ide-quick-chip { background: #f2f8ff; color: #071b2e; border-color: var(--border); }
body[data-theme="light"] .ide-shortcuts kbd { background: #eef6ff; color: #071b2e; border-color: var(--border); }
body[data-theme="light"] .ide-findbar { background: #ffffff; border-color: var(--border-strong); box-shadow: 0 10px 28px rgba(7, 27, 46, 0.14); }
body[data-theme="light"] .ide-statusbar { background: #0275b8; color: #ffffff; }

@media (max-width: 780px) {
  .ide-body { grid-template-columns: 210px minmax(0, 1fr); }
  .hide-sm { display: none; }
}
@media (max-width: 580px) {
  .ide-body { grid-template-columns: 1fr; }
  .ide-sidebar { display: none; }
  .ide-overlay:not(.sidebar-collapsed) .ide-sidebar {
    display: flex;
    position: absolute;
    z-index: 15;
    inset: 48px auto 26px 0;
    width: 250px;
    box-shadow: 12px 0 36px rgba(0, 0, 0, 0.45);
  }
}
