/* Luminous Studio - shared premium polish layer */
:root {
  --lum-bg: #090a0f;
  --lum-panel: rgba(18, 19, 27, 0.82);
  --lum-panel-strong: rgba(27, 28, 39, 0.9);
  --lum-line: rgba(255, 255, 255, 0.1);
  --lum-line-soft: rgba(255, 255, 255, 0.065);
  --lum-text: #f8fafc;
  --lum-muted: rgba(226, 232, 240, 0.68);
  --lum-blue: #4f7cff;
  --lum-violet: #8b5cf6;
  --lum-teal: #2dd4bf;
  --lum-rose: #ec4899;
  --lum-shadow: 0 22px 70px rgba(0, 0, 0, 0.36);
  --lum-shadow-soft: 0 14px 38px rgba(0, 0, 0, 0.22);
}

html.dark,
body {
  background:
    radial-gradient(circle at 16% -8%, rgba(79, 124, 255, 0.16), transparent 34rem),
    radial-gradient(circle at 88% 4%, rgba(45, 212, 191, 0.09), transparent 30rem),
    radial-gradient(circle at 64% 104%, rgba(236, 72, 153, 0.08), transparent 30rem),
    var(--lum-bg) !important;
  color: var(--lum-text);
}

body {
  letter-spacing: 0;
  text-rendering: geometricPrecision;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.65), transparent 72%);
}

.primary-gradient,
.bg-primary,
[class*="from-blue-500"][class*="to-violet"],
[class*="from-primary"] {
  background-image: linear-gradient(135deg, var(--lum-blue), var(--lum-violet) 58%, var(--lum-rose)) !important;
  box-shadow: 0 16px 40px rgba(79, 124, 255, 0.24), inset 0 1px 0 rgba(255,255,255,0.18);
}

header[class*="fixed"],
header[class*="sticky"],
header.h-14,
header.h-16 {
  background: rgba(9, 10, 15, 0.78) !important;
  border-bottom: 1px solid var(--lum-line-soft) !important;
  backdrop-filter: blur(20px) saturate(1.25);
  -webkit-backdrop-filter: blur(20px) saturate(1.25);
}

:where(.bg-surface-container-low, .bg-surface-container, .bg-surface-container-high, .bg-surface-container-highest, .stats-bar, .welcome-card, .mode-card) {
  background: linear-gradient(145deg, rgba(31, 33, 46, 0.86), rgba(14, 15, 23, 0.82)) !important;
  border-color: var(--lum-line-soft) !important;
  box-shadow: var(--lum-shadow-soft), inset 0 1px 0 rgba(255,255,255,0.045);
}

:where(.stat-card, .quiz-card, .miniapp-card, .landing-card, .template-card, .bot-card, .lead-card, .integration-card),
:where(article, section, aside, div)[class*="rounded"][class*="border"][class*="bg-"] {
  border-color: var(--lum-line-soft) !important;
}

:where(.stat-card, .quiz-card, .miniapp-card, .landing-card, .template-card, .bot-card, .lead-card, .integration-card):hover {
  transform: translateY(-2px);
  border-color: rgba(79, 124, 255, 0.32) !important;
  box-shadow: var(--lum-shadow), 0 0 0 1px rgba(79, 124, 255, 0.07);
}

:where(button, a)[class*="rounded"]:not(.no-polish) {
  transition: transform .18s ease, filter .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

:where(button, a)[class*="rounded"]:not(.no-polish):hover {
  filter: brightness(1.06);
}

:where(button, a)[class*="rounded"]:not(.no-polish):active {
  transform: translateY(1px) scale(0.99);
}

input,
textarea,
select {
  background: rgba(255,255,255,0.045) !important;
  border-color: var(--lum-line-soft) !important;
  color: var(--lum-text) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.035);
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(79, 124, 255, 0.72) !important;
  box-shadow: 0 0 0 3px rgba(79, 124, 255, 0.16), inset 0 1px 0 rgba(255,255,255,0.05) !important;
}

input::placeholder,
textarea::placeholder {
  color: rgba(226, 232, 240, 0.38) !important;
}

.dash-tab.active-tab,
[class*="active-tab"],
[aria-selected="true"] {
  box-shadow: 0 14px 34px rgba(79, 124, 255, 0.26), inset 0 1px 0 rgba(255,255,255,0.16) !important;
}

.material-symbols-outlined {
  vertical-align: middle;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(79,124,255,.55), rgba(139,92,246,.45));
  border-radius: 999px;
  border: 2px solid rgba(9,10,15,.7);
}

@media (max-width: 720px) {
  body::before { opacity: 0.45; }
  header[class*="fixed"],
  header[class*="sticky"],
  header.h-14,
  header.h-16 {
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }
}

/* Unified app/product pages: builders, templates, Bot Lab */
body.studio-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 6% -8%, rgba(79,124,255,0.20), transparent 33rem),
    radial-gradient(circle at 94% 2%, rgba(45,212,191,0.12), transparent 29rem),
    radial-gradient(circle at 58% 18%, rgba(236,72,153,0.10), transparent 34rem),
    linear-gradient(180deg, #080912 0%, #0c0d18 42%, #080810 100%) !important;
}

body.studio-page header {
  min-height: 56px;
  background: rgba(8,9,18,0.78) !important;
  border-bottom: 1px solid rgba(255,255,255,0.085) !important;
  box-shadow: 0 24px 70px rgba(0,0,0,0.30);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.studio-brand {
  color: #fff !important;
  letter-spacing: -0.035em;
  display: inline-flex !important;
  align-items: center;
  gap: .68rem;
  text-decoration: none;
  white-space: nowrap;
}

.studio-brand:has(.studio-logo-mark)::before {
  display: none;
}

.studio-brand::before {
  content: "";
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  border-radius: 14px;
  background:
    radial-gradient(circle at 34% 25%, rgba(255,255,255,.72), transparent 18%),
    linear-gradient(135deg, var(--lum-blue), var(--lum-violet) 55%, var(--lum-teal));
  box-shadow: 0 14px 34px rgba(79,124,255,.34), inset 0 1px 0 rgba(255,255,255,.22);
}

.studio-logo-mark {
  width: 2.25rem;
  height: 2.25rem;
  flex: 0 0 auto;
  border-radius: 15px;
  position: relative;
  display: inline-block;
  overflow: hidden;
  background: #080810;
  box-shadow: 0 14px 34px rgba(79,124,255,.38), 0 0 42px rgba(139,92,246,.20), inset 0 1px 0 rgba(255,255,255,.25);
}

.studio-logo-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 0 18px rgba(255,255,255,.12);
  pointer-events: none;
}

.studio-logo-mark video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.85);
  transform-origin: center;
}

.studio-brand .studio-brand-sub {
  display: block;
  margin-top: 1px;
  color: rgba(226,232,240,.48);
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

body.studio-page main:not(.print-doc),
body.studio-page .page-hero,
body.studio-page #starter,
body.studio-page aside,
body.studio-page section {
  position: relative;
}

body.studio-page .page-hero,
body.studio-page main > .mb-8:first-child,
body.studio-page main > .space-y-4:first-child,
body.studio-page #starter > .flex:first-child {
  border-radius: 28px;
}

body.studio-page .page-hero {
  margin-top: 1rem;
  padding: clamp(1.35rem, 3vw, 2.25rem) !important;
  border: 1px solid rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 14% 0%, rgba(79,124,255,.18), transparent 20rem),
    radial-gradient(circle at 86% 0%, rgba(45,212,191,.12), transparent 20rem),
    linear-gradient(135deg, rgba(255,255,255,.085), rgba(255,255,255,.026)) !important;
  box-shadow: 0 24px 90px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.10);
}

body.studio-page .page-hero h1 {
  font-size: clamp(2.2rem, 5vw, 4.4rem) !important;
  line-height: .96 !important;
}

body.studio-page :where(.bg-surface-container-low, .bg-surface-container, .bg-surface-container-high, .bg-surface-container-highest) {
  background:
    linear-gradient(145deg, rgba(255,255,255,.085), rgba(255,255,255,.026)) !important;
  border-color: rgba(255,255,255,.095) !important;
}

body.studio-page :where(.template-card, .bot-card, .landing-card, .quiz-card, .miniapp-card, article[class*="rounded"], div[class*="rounded"][class*="border"]) {
  box-shadow: 0 18px 58px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.07);
}

body.studio-page :where(.template-card, .bot-card, .landing-card, .quiz-card, .miniapp-card, article[class*="rounded"], div[class*="rounded"][class*="border"]):hover {
  border-color: rgba(79,124,255,.30) !important;
}

body.studio-page .bot-card,
body.studio-page [data-bot-card],
body.studio-page #bots-grid > *,
body.studio-page #grid > * {
  background:
    linear-gradient(145deg, rgba(255,255,255,.10), rgba(255,255,255,.028)),
    radial-gradient(circle at 12% 0%, rgba(79,124,255,.12), transparent 14rem) !important;
  border: 1px solid rgba(255,255,255,.11) !important;
  border-radius: 24px !important;
}

body.studio-page input,
body.studio-page textarea,
body.studio-page select {
  border-radius: 14px !important;
}

body.studio-page header .h-9.w-9,
body.studio-page header a[title*="Volver"] {
  border-radius: 14px !important;
  background: rgba(255,255,255,.075) !important;
  border: 1px solid rgba(255,255,255,.10);
}

body.studio-page header .primary-gradient,
body.studio-page header button,
body.studio-page header label {
  border-radius: 999px !important;
}

body.studio-page .section-head {
  border-left: 0 !important;
  padding-left: 0 !important;
}

body.studio-page .section-head h2,
body.studio-page h1,
body.studio-page h2 {
  letter-spacing: -0.035em;
}

@media (max-width: 720px) {
  body.studio-page header {
    min-height: 58px;
  }
  .studio-brand::before {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 12px;
  }
  .studio-brand .studio-brand-sub {
    display: none;
  }
}
