/* CAMADA-MED R8.5 · Flow Studio Aesthetic (additive polish over frozen R6.30 Safira/Ouro identity).
   Zero modifications to camadamed-showcase-r630.css; WCAG 2.1 AA+ verified; reduced-motion compliant. */
:root {
  --flow-bg: #050a14;
  --flow-surface: rgba(12, 22, 38, 0.72);
  --flow-surface-strong: rgba(15, 28, 48, 0.88);
  --flow-border: rgba(186, 214, 250, 0.14);
  --flow-border-strong: rgba(186, 214, 250, 0.28);
  --flow-glow-cyan: rgba(45, 212, 191, 0.14);
  --flow-glow-blue: rgba(134, 185, 255, 0.16);
  --flow-glow-gold: rgba(231, 194, 126, 0.14);
}

html body.cm-gateway-page.cm-r630 {
  background:
    radial-gradient(65% 45% at 50% -8%, rgba(86, 156, 255, 0.22), transparent 68%),
    radial-gradient(45% 35% at 88% 14%, rgba(45, 212, 191, 0.11), transparent 62%),
    radial-gradient(50% 40% at 12% 38%, rgba(231, 194, 126, 0.08), transparent 64%),
    linear-gradient(180deg, #050a14 0%, #070e1c 48%, #050a14 100%) !important;
  color: #f3f7ff;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Floating frosted cinema header & pill navigation */
body.cm-gateway-page.cm-r630 .cm-header {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin-bottom: 24px;
  padding: 12px 16px;
  border-radius: 26px;
  background: rgba(8, 15, 28, 0.72);
  border: 1px solid var(--flow-border);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
  box-shadow: 0 18px 46px -22px rgba(0, 0, 0, 0.78), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body.cm-gateway-page.cm-r630 .cm-hub-tabs {
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(14, 26, 44, 0.65);
  border: 1px solid rgba(186, 214, 250, 0.1);
}

body.cm-gateway-page.cm-r630 .cm-hub-tabs a {
  border-radius: 999px;
  transition: background 0.22s ease, color 0.22s ease, transform 0.22s ease;
}

body.cm-gateway-page.cm-r630 .cm-hub-tabs a:hover,
body.cm-gateway-page.cm-r630 .cm-hub-tabs a:focus-visible,
body.cm-gateway-page.cm-r630 .cm-hub-tabs a[aria-current="page"] {
  background: rgba(134, 185, 255, 0.16);
  color: #f7fbff;
}

body.cm-gateway-page.cm-r630 .cm-login {
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(231, 194, 126, 0.2), rgba(134, 185, 255, 0.14));
  border: 1px solid rgba(231, 194, 126, 0.42);
  color: #f7f9ff;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

body.cm-gateway-page.cm-r630 .cm-login:hover {
  transform: translateY(-1px);
  border-color: rgba(231, 194, 126, 0.78);
  box-shadow: 0 10px 26px -12px rgba(231, 194, 126, 0.48);
}

/* Expansive Flow-inspired Hero & Editorial Typography */
body.cm-gateway-page.cm-r630 .cm-profile-card {
  border-radius: 32px;
  background:
    radial-gradient(80% 70% at 50% 0%, rgba(134, 185, 255, 0.12), transparent 65%),
    var(--flow-surface);
  border: 1px solid var(--flow-border);
  box-shadow: 0 28px 70px -30px rgba(0, 0, 0, 0.82), inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

body.cm-gateway-page.cm-r630 .cm-profile-lead {
  letter-spacing: -0.032em;
  line-height: 1.05;
  color: #f6faff;
}

body.cm-gateway-page.cm-r630 .cm-profile-lead em {
  background: linear-gradient(96deg, #e7c27e 0%, #f8e4b7 45%, #86b9ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}

body.cm-gateway-page.cm-r630 .cm-hero-links a {
  border-radius: 999px;
  padding: 12px 20px;
  border: 1px solid var(--flow-border-strong);
  background: rgba(16, 30, 50, 0.72);
  color: #eff6ff;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

body.cm-gateway-page.cm-r630 .cm-hero-links a:first-child {
  background: linear-gradient(135deg, #dcecff, #9fc9ff);
  color: #081220;
  border-color: transparent;
  font-weight: 700;
}

body.cm-gateway-page.cm-r630 .cm-hero-links a:hover {
  transform: translateY(-1px);
  border-color: rgba(134, 185, 255, 0.65);
}

/* Seamless Cinema Video Framing */
body.cm-gateway-page.cm-r630 .cm-atlas-player {
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid var(--flow-border-strong);
  box-shadow: 0 36px 90px -32px rgba(0, 0, 0, 0.88), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

/* Unified Dark Glass Cards & Generous Section Breathing Room */
body.cm-gateway-page.cm-r630 .cm-deep-section,
body.cm-gateway-page.cm-r630 .cm-stats,
body.cm-gateway-page.cm-r630 .cm-commerce-stats {
  border-radius: 28px;
  border-color: var(--flow-border);
  box-shadow: 0 22px 58px -30px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* Language Gate Cinema Card */
body.cm-gateway-page.cm-r630 .cm-language-card {
  border-radius: 30px;
  background:
    radial-gradient(85% 60% at 50% 0%, rgba(134, 185, 255, 0.14), transparent 70%),
    rgba(9, 17, 30, 0.92);
  border: 1px solid var(--flow-border-strong);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.82);
}

body.cm-gateway-page.cm-r630 .cm-language-options button {
  border-radius: 18px;
  border: 1px solid var(--flow-border-strong);
  background: rgba(16, 30, 50, 0.78);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

body.cm-gateway-page.cm-r630 .cm-language-options button:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.65);
  background: rgba(20, 38, 62, 0.9);
}

@media (max-width: 640px) {
  body.cm-gateway-page.cm-r630 .cm-header {
    top: 6px;
    padding: 10px 12px;
    border-radius: 22px;
  }
  body.cm-gateway-page.cm-r630 .cm-profile-card,
  body.cm-gateway-page.cm-r630 .cm-deep-section {
    border-radius: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.cm-gateway-page.cm-r630 * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}


/* ═══ R8.6 · Unificação Visual Flow Studio (Diagnóstico, Demonstração, Pós-Compra, Jurídicas & Admin) ═══
   Preserva 100% do Liquid Glass Safira (.cm-glass) e bordas dinâmicas (.cm-glass::before, .aura, .cmc-moving-rim). */

/* 1. Funil de Diagnóstico (PT/ES) */
html body.cm-diagnostic-page.cm-diagnostic-r631 {
  background:
    radial-gradient(68% 42% at 50% -6%, rgba(92, 162, 255, 0.22), transparent 68%),
    radial-gradient(42% 32% at 90% 18%, rgba(45, 212, 191, 0.11), transparent 62%),
    linear-gradient(180deg, #050a14 0%, #071020 55%, #050a14 100%) !important;
  color: #f3f7ff;
  -webkit-font-smoothing: antialiased;
}

body.cm-diagnostic-page.cm-diagnostic-r631 .cm-diagnostic-header {
  border-radius: 999px;
  padding: 10px 14px;
  background: rgba(8, 16, 30, 0.76);
  border: 1px solid rgba(186, 214, 250, 0.16);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 18px 46px -22px rgba(0, 0, 0, 0.78);
}

body.cm-diagnostic-page.cm-diagnostic-r631 :is(.btn-back, .btn-close) {
  border-radius: 999px;
  border: 1px solid rgba(186, 214, 250, 0.22);
  background: rgba(16, 30, 50, 0.78);
  color: #eff6ff;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

body.cm-diagnostic-page.cm-diagnostic-r631 :is(.btn-back, .btn-close):hover {
  transform: translateY(-1px);
  border-color: rgba(134, 185, 255, 0.62);
  background: rgba(22, 42, 68, 0.92);
}

body.cm-diagnostic-page.cm-diagnostic-r631 .sticky {
  background: rgba(6, 13, 25, 0.84);
  border-top: 1px solid rgba(186, 214, 250, 0.14);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}

body.cm-diagnostic-page.cm-diagnostic-r631 .cta {
  border-radius: 999px;
  letter-spacing: -0.01em;
  box-shadow: 0 14px 32px -14px rgba(134, 185, 255, 0.45);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

body.cm-diagnostic-page.cm-diagnostic-r631 .cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px -14px rgba(134, 185, 255, 0.62);
}

body.cm-diagnostic-page.cm-diagnostic-r631 .fbox {
  border-radius: 28px;
  border: 1px solid rgba(186, 214, 250, 0.24);
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(134, 185, 255, 0.14), transparent 68%),
    rgba(9, 18, 32, 0.94);
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.85);
}

/* 2. Demonstração Pública */
body:has(> main.cm-demo-public-main) {
  background:
    radial-gradient(65% 45% at 50% -8%, rgba(86, 156, 255, 0.22), transparent 68%),
    radial-gradient(45% 35% at 85% 20%, rgba(45, 212, 191, 0.12), transparent 60%),
    linear-gradient(180deg, #050a14 0%, #081224 100%) !important;
  -webkit-font-smoothing: antialiased;
}

.cm-demo-public-main {
  border-radius: 30px !important;
  border: 1px solid rgba(186, 214, 250, 0.22) !important;
  background:
    radial-gradient(85% 60% at 50% 0%, rgba(134, 185, 255, 0.14), transparent 68%),
    rgba(11, 22, 39, 0.84) !important;
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 32px 86px -28px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
}

.cm-demo-public-main h1 {
  letter-spacing: -0.028em;
  color: #f6faff;
}

.cm-demo-public-actions :is(button, a) {
  border-radius: 999px !important;
  padding: 11px 18px !important;
  font-weight: 650;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.cm-demo-public-actions button:first-child {
  background: linear-gradient(135deg, #dcecff, #9fc9ff) !important;
  color: #081220 !important;
  border-color: transparent !important;
}

.cm-demo-public-actions :is(button, a):hover {
  transform: translateY(-1px);
  border-color: rgba(231, 194, 126, 0.72) !important;
}

/* 3. Pós-compra & Jurídicas (Obrigado, Acesso Liberado, Privacidade, Termos) */
html body.cm149-theme:not(.cm-platform-page) {
  background:
    radial-gradient(65% 45% at 50% -8%, rgba(86, 156, 255, 0.2), transparent 68%),
    radial-gradient(45% 35% at 88% 16%, rgba(45, 212, 191, 0.1), transparent 62%),
    linear-gradient(180deg, #050a14 0%, #071020 55%, #050a14 100%) !important;
  color: #eef5ff !important;
  -webkit-font-smoothing: antialiased;
}

body.cm149-theme:not(.cm-platform-page) :is(main, .wrap, .container, .legal-wrap) {
  max-width: 820px;
  margin-inline: auto;
}

body.cm149-theme:not(.cm-platform-page) :is(.card, .panel, .box, .glass, article) {
  border-radius: 24px !important;
  border: 1px solid rgba(186, 214, 250, 0.16) !important;
  background: rgba(12, 23, 40, 0.8) !important;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  box-shadow: 0 22px 58px -28px rgba(0, 0, 0, 0.76), inset 0 1px 0 rgba(255, 255, 255, 0.06) !important;
  color: #eef5ff !important;
}

body.cm149-theme:not(.cm-platform-page) :is(h1, h2, h3) {
  color: #f6faff !important;
  letter-spacing: -0.02em;
}

body.cm149-theme:not(.cm-platform-page) :is(p, li) {
  color: #d6e4f7 !important;
  line-height: 1.65;
}

body.cm149-theme:not(.cm-platform-page) :is(.btn, button, a.cta) {
  border-radius: 999px !important;
}

/* 4. Painel Administrativo (Admin Login & Dashboard) */
body:has(> .login-shell) .login-card {
  border-radius: 28px !important;
  border: 1px solid rgba(186, 214, 250, 0.2) !important;
  background:
    radial-gradient(80% 55% at 50% 0%, rgba(134, 185, 255, 0.14), transparent 68%),
    rgba(10, 20, 36, 0.88) !important;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 32px 84px rgba(0, 0, 0, 0.82) !important;
}

body:has(> .login-shell) .login-button {
  border-radius: 999px !important;
  font-weight: 700;
}
