/* =====================================================================
   ADSUITE SHORTS — DESIGN SYSTEM
   HTML + CSS puro · compatível com Jinja + HTMX (sem frameworks)
   Importe no seu base.html (tudo hospedado localmente, sem CDN):
     <link rel="stylesheet" href="{{ url_for('static', path='/design-system.css') }}">
     <link rel="stylesheet" href="{{ url_for('static', path='/fonts/fonts.css') }}">
     <link rel="stylesheet" href="{{ url_for('static', path='/vendor/phosphor/regular/style.css') }}">
     <link rel="stylesheet" href="{{ url_for('static', path='/vendor/phosphor/fill/style.css') }}">
   Veja o README.md do pacote para baixar fontes e ícones localmente.
   Se as fontes não estiverem instaladas, os fallbacks (system-ui/Georgia)
   seguram o layout sem quebrar nada.
   ===================================================================== */

/* ------------------------------------------------------------------ */
/* 1. TOKENS (variáveis)                                               */
/* ------------------------------------------------------------------ */
:root {
  /* Marca / primária */
  --color-primary:        #5A45E4;
  --color-primary-hover:  #4B37CE;
  --color-primary-soft:   #F1EFFE;   /* fundo de destaque suave */
  --color-primary-text:   #4B37CE;   /* texto sobre fundo soft */
  --gradient-primary:     linear-gradient(120deg, #9B5FE0, #7A3FD0);
  --gradient-brand:       linear-gradient(150deg, #6E5CEE, #5A45E4);

  /* Neutros / superfícies */
  --color-bg:        #F4F4F1;   /* fundo da aplicação */
  --color-surface:   #FFFFFF;   /* cards, painéis */
  --color-surface-2: #F7F6F2;   /* superfície secundária */
  --color-hover:     #F6F6F3;   /* hover neutro */

  /* Texto */
  --color-text:       #1B1A22;  /* principal */
  --color-text-muted: #75747C;  /* secundário */
  --color-text-soft:  #9A99A1;  /* terciário / placeholders */

  /* Bordas */
  --color-border:        #ECEBE6;
  --color-border-strong: #E2E1DB;
  --color-input-border:  #E6E5DF;

  /* Estados semânticos */
  --color-success:      #0E7A3D;  --color-success-bg: #E7F6EC;
  --color-warning:      #B26A00;  --color-warning-bg: #FBF0DA;
  --color-danger:       #C0353A;  --color-danger-bg:  #FBECEC;
  --color-info:         #2A6FDB;  --color-info-bg:    #EAF1FD;

  /* Tipografia */
  --font-sans:  'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;

  --text-xs:   11.5px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   16px;
  --text-lg:   20px;
  --text-xl:   24px;
  --text-2xl:  32px;

  /* Espaçamento (escala de 4) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* Radius */
  --radius-sm:   8px;
  --radius-md:   11px;
  --radius-lg:   14px;
  --radius-xl:   18px;
  --radius-pill: 999px;

  /* Sombras */
  --shadow-sm:  0 1px 2px rgba(24,24,31,.04);
  --shadow-md:  0 1px 2px rgba(24,24,31,.04), 0 12px 26px -20px rgba(24,24,31,.28);
  --shadow-lg:  0 1px 2px rgba(24,24,31,.04), 0 16px 34px -24px rgba(24,24,31,.30);
  --shadow-primary: 0 6px 16px -6px rgba(90,69,228,.6);

  /* Transição padrão */
  --transition: .18s ease;
}

/* ------------------------------------------------------------------ */
/* 2. BASE / RESET LEVE                                                */
/* ------------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; }

.font-serif { font-family: var(--font-serif); font-weight: 500; letter-spacing: -.4px; }

/* títulos utilitários */
.h1 { font-family: var(--font-serif); font-weight: 500; font-size: var(--text-2xl); letter-spacing: -.5px; }
.h2 { font-weight: 700; font-size: var(--text-xl);  letter-spacing: -.3px; }
.h3 { font-weight: 700; font-size: var(--text-md); }
.text-muted { color: var(--color-text-muted); }
.text-soft  { color: var(--color-text-soft); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #DCDBD5; border-radius: var(--radius-sm); border: 3px solid var(--color-bg); }

/* ------------------------------------------------------------------ */
/* 3. BOTÕES                                                          */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: inherit;
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background var(--transition), filter var(--transition), border-color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled, .btn.is-disabled {
  background: #D8D5E6 !important;
  color: #fff !important;
  cursor: not-allowed;
  box-shadow: none !important;
}

/* variantes */
.btn-primary {
  background: var(--color-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-primary:hover { background: var(--color-primary-hover); }

.btn-gradient {
  background: var(--gradient-primary);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.btn-gradient:hover { filter: brightness(1.06); }

.btn-dark { background: var(--color-text); color: #fff; }
.btn-dark:hover { background: #000; }

.btn-secondary {
  background: var(--color-surface);
  color: var(--color-text);
  border-color: var(--color-border-strong);
}
.btn-secondary:hover { background: var(--color-hover); }

.btn-ghost { background: transparent; color: var(--color-text-muted); }
.btn-ghost:hover { background: var(--color-hover); color: var(--color-text); }

.btn-link {
  background: transparent;
  color: var(--color-primary);
  padding: 0;
  box-shadow: none;
}
.btn-link:hover { text-decoration: underline; }

/* tamanhos */
.btn-sm    { padding: 8px 13px;  font-size: var(--text-sm); }
.btn-lg    { padding: 15px 22px; font-size: 15.5px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

/* botão-ícone quadrado */
.btn-icon {
  width: 40px; height: 40px;
  padding: 0;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-input-border);
  color: var(--color-text-muted);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn-icon:hover { background: var(--color-hover); color: var(--color-text); }
.btn-icon-sm { width: 32px; height: 32px; border-radius: var(--radius-sm); }

/* ------------------------------------------------------------------ */
/* 4. CARDS                                                            */
/* ------------------------------------------------------------------ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}
.card-sm { border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.card-pad     { padding: var(--space-5); }
.card-pad-lg  { padding: var(--space-6); }

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: 18px 22px;
  border-bottom: 1px solid #F1F0EC;
}
.card-title    { font-size: var(--text-md); font-weight: 700; }
.card-subtitle { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 2px; }

/* KPI */
.kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.kpi-value { font-size: 28px; font-weight: 800; letter-spacing: -.5px; line-height: 1; }
.kpi-label { font-size: var(--text-sm); color: var(--color-text-muted); margin-top: 6px; }
.kpi-icon {
  width: 38px; height: 38px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  font-size: 19px;
}

/* ------------------------------------------------------------------ */
/* 5. BADGES / CHIPS                                                   */
/* ------------------------------------------------------------------ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-surface-2);
  color: var(--color-text-muted);
}
.badge-dot::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.badge-success { background: var(--color-success-bg); color: var(--color-success); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger); }
.badge-info    { background: var(--color-info-bg);    color: var(--color-info); }
.badge-primary { background: var(--color-primary-soft); color: var(--color-primary-text); }

/* ------------------------------------------------------------------ */
/* 6. INPUTS / FORMULÁRIOS                                             */
/* ------------------------------------------------------------------ */
.field { margin-bottom: var(--space-4); }
.label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 700;
  margin-bottom: 7px;
}
.label .req { color: var(--color-danger); }
.help { margin: 6px 2px 0; font-size: 12px; color: var(--color-text-soft); }

.input, .select, .textarea {
  width: 100%;
  border: 1.5px solid var(--color-input-border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  font-family: inherit;
  font-size: var(--text-base);
  color: var(--color-text);
  background: var(--color-surface);
  outline: none;
  transition: border-color var(--transition);
}
.input::placeholder, .textarea::placeholder { color: var(--color-text-soft); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--color-primary); }

.input.is-valid   { border-color: var(--color-success); }
.input.is-invalid { border-color: var(--color-danger); }

/* select com seta custom */
.select {
  appearance: none;
  padding-right: 40px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%239A99A1' stroke-width='1.5'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
}

/* input com ícone (wrapper) */
.input-group {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 1.5px solid var(--color-input-border);
  border-radius: var(--radius-md);
  padding: 11px 14px;
  transition: border-color var(--transition);
}
.input-group:focus-within { border-color: var(--color-primary); }
.input-group input { flex: 1; border: none; outline: none; font-family: inherit; font-size: var(--text-base); background: transparent; }

.form-row { display: flex; gap: var(--space-4); flex-wrap: wrap; }
.form-row > * { flex: 1; min-width: 160px; }

/* ------------------------------------------------------------------ */
/* 7. TABELAS                                                          */
/* ------------------------------------------------------------------ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
}
.table thead th {
  text-align: left;
  padding: 12px 22px;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--color-text-soft);
}
.table tbody td {
  padding: 13px 22px;
  font-size: var(--text-base);
  border-top: 1px solid #F1F0EC;
}
.table tbody tr:hover { background: #FBFBF9; }
.table .num { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.table .col-tight { padding-left: 12px; padding-right: 12px; }

/* ------------------------------------------------------------------ */
/* 8. ALERTAS / BANNERS                                                */
/* ------------------------------------------------------------------ */
.alert {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  border-radius: var(--radius-lg);
  padding: 13px 16px;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  flex-wrap: wrap;
}
.alert-title { font-weight: 700; font-size: var(--text-base); margin: 0 0 2px; }
.alert-text  { margin: 0; font-size: var(--text-sm); }
.alert-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.alert-body { flex: 1; min-width: 200px; }

.alert-success { background: var(--color-success-bg); border-color: #C7E7D2; }
.alert-warning { background: linear-gradient(100deg,#FEF6E7,#FDFBF4 65%); border-color: #F3E5C1; }
.alert-danger  { background: var(--color-danger-bg);  border-color: #F3D6D6; }
.alert-info    { background: linear-gradient(100deg,#F1EFFE,#FBFAFF 60%); border-color: #E4E0FA; }

/* ------------------------------------------------------------------ */
/* 9. NAVEGAÇÃO (sidebar)                                              */
/* ------------------------------------------------------------------ */
.nav-section {
  margin: 16px 8px 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  color: #A7A6AE;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
  font-weight: 500;
  font-size: var(--text-base);
  text-decoration: none;
  position: relative;
  transition: background var(--transition);
}
.nav-item:hover { background: var(--color-hover); }
.nav-item.active {
  background: var(--color-primary-soft);
  color: var(--color-primary-text);
  font-weight: 600;
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -14px; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px;
  background: var(--color-primary);
}

/* ------------------------------------------------------------------ */
/* 10. HELPERS DE ESTADO (HTMX)                                        */
/* ------------------------------------------------------------------ */
/* Empty state */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 48px 24px;
  color: var(--color-text-muted);
}
.empty-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--color-primary-soft);
  color: var(--color-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  margin-bottom: 16px;
}

/* Spinner de carregamento (use com HTMX: hx-indicator) */
.spinner {
  width: 20px; height: 20px;
  border: 2.5px solid var(--color-primary-soft);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: ds-spin .7s linear infinite;
}
@keyframes ds-spin { to { transform: rotate(360deg); } }

/* HTMX indicator: mostra .htmx-indicator só durante o request */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator { display: inline-flex; }

/* Barra de progresso */
.progress { height: 7px; border-radius: 7px; background: #F1F0EC; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: 7px; background: var(--gradient-brand); }

/* ------------------------------------------------------------------ */
/* 11. UTILITÁRIOS DE LAYOUT                                           */
/* ------------------------------------------------------------------ */
.stack   { display: flex; flex-direction: column; gap: var(--space-5); }
.row     { display: flex; align-items: center; gap: var(--space-3); }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); }
.wrap    { flex-wrap: wrap; }
.grid-kpi { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: var(--space-4); }

/* ------------------------------------------------------------------ */
/* 11b. COMPLEMENTOS DE COMPONENTES (sem estilo inline nos partials)   */
/* ------------------------------------------------------------------ */
/* Alert: cor do ícone por variante */
.alert-icon i { font-size: 21px; }
.alert-success .alert-icon i { color: var(--color-success); }
.alert-warning .alert-icon i { color: #C7891A; }
.alert-danger  .alert-icon i { color: var(--color-danger); }
.alert-info    .alert-icon i { color: var(--color-primary); }

/* Empty state */
.empty-text   { max-width: 340px; color: var(--color-text-muted); }
.empty-action { margin-top: 14px; }

/* Nav: contador à direita */
.nav-item .badge { margin-left: auto; }

/* Tabela: modificadores de célula */
.table .cell-bold  { font-weight: 600; }
.table .cell-muted { color: var(--color-text-muted); }

/* ------------------------------------------------------------------ */
/* 11c. LAYOUT DO APP (shell: sidebar + topbar + conteúdo)             */
/* ------------------------------------------------------------------ */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 256px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-right: 1px solid var(--color-border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar-brand { padding: 22px; display: flex; align-items: center; gap: 11px; }
.sidebar-logo {
  width: 34px; height: 34px;
  border-radius: 10px;
  background: var(--gradient-brand);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 18px;
  box-shadow: var(--shadow-primary);
}
.sidebar-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.sidebar-brand-name { font-weight: 700; font-size: 15px; letter-spacing: -.2px; }
.sidebar-brand-sub  { font-weight: 500; font-size: 11px; color: var(--color-text-soft); letter-spacing: 1px; }
.sidebar-nav { padding: 6px 14px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 66px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
}
.topbar-title { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; }

.content { padding: 24px 28px 48px; max-width: 1200px; width: 100%; }

@media (max-width: 900px) {
  .sidebar { display: none; }   /* mobile: troque por um drawer/menu próprio */
  .content { padding: 16px 16px 40px; }
}

/* ------------------------------------------------------------------ */
/* 13. MARCA / AUTENTICAÇÃO                                            */
/* ------------------------------------------------------------------ */
:root { --font-brand: 'Saira', 'Plus Jakarta Sans', sans-serif; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand img { height: 36px; width: auto; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: .9; }
.brand-name { font-family: var(--font-brand); font-weight: 700; font-size: 16px; letter-spacing: .5px; }
.brand-sub  { font-family: var(--font-brand); font-style: italic; font-weight: 700; font-size: 13px; color: #2A6FDB; }

/* Página de auth em 2 colunas (login/cadastro) */
.auth-page { min-height: 100vh; display: flex; }
.auth-col-form { flex: 1 1 480px; display: flex; flex-direction: column; padding: 28px 36px; }
.auth-center { flex: 1; display: flex; align-items: center; justify-content: center; padding: 32px 0; }
.auth-box { width: 100%; max-width: 400px; }
.auth-title { font-weight: 700; font-size: 27px; letter-spacing: -.4px; margin: 0 0 8px; }
.auth-sub { margin: 0 0 28px; font-size: 14.5px; color: var(--color-text-muted); line-height: 1.55; }
.auth-footer { margin: 0; font-size: 12px; color: #A7A6AE; text-align: center; }
.auth-footer a { color: #A7A6AE; }
.auth-alt { margin: 10px 0 0; font-size: 13.5px; color: var(--color-text-muted); text-align: center; }
.auth-alt a, .link-primary { color: var(--color-primary); font-weight: 600; text-decoration: none; }
.auth-alt a:hover, .link-primary:hover { text-decoration: underline; }

/* Painel de marca (coluna direita escura) */
.auth-col-brand {
  flex: 1 1 460px;
  background: linear-gradient(160deg, #211C3D, #151228);
  display: flex; flex-direction: column; justify-content: center;
  padding: 56px; position: relative; overflow: hidden;
}
.auth-col-brand h2 { color: #fff; font-weight: 700; font-size: 30px; letter-spacing: -.5px; line-height: 1.25; margin: 0 0 14px; }
.auth-col-brand .lead { color: #B9B5D6; font-size: 15px; line-height: 1.6; margin: 0 0 32px; }
.brand-feature { display: flex; align-items: center; gap: 13px; }
.brand-feature + .brand-feature { margin-top: 16px; }
.brand-feature-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: rgba(255,255,255,.08);
  display: flex; align-items: center; justify-content: center;
  color: #8B7BF2; font-size: 19px; flex-shrink: 0;
}
.brand-feature span { color: #DDDAF0; font-size: 14.5px; }
@media (max-width: 860px) { .auth-col-brand { display: none; } }

/* Card central (redefinir senha, esqueci senha, checkout status) */
.auth-single { min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: 28px 20px; }
.auth-single-header { width: 100%; max-width: 1080px; display: flex; align-items: center; }
.auth-single-center { flex: 1; display: flex; align-items: center; justify-content: center; width: 100%; padding: 32px 0; }
.auth-card { width: 100%; max-width: 440px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-xl); padding: 32px; box-shadow: var(--shadow-lg); }
.auth-card-icon { width: 52px; height: 52px; border-radius: 14px; background: var(--color-primary-soft); color: var(--color-primary); display: flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 18px; }

/* Hero de status (sucesso / recusado / e-mail enviado) */
.status-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.status-hero-icon { width: 80px; height: 80px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 44px; margin-bottom: 20px; }
.status-hero-icon.success { background: var(--color-success-bg); color: #12A150; }
.status-hero-icon.danger  { background: var(--color-danger-bg);  color: #E5484D; }
.status-hero h1 { font-weight: 700; font-size: 24px; letter-spacing: -.4px; margin: 0 0 8px; }
.status-hero p { margin: 0 0 26px; font-size: 14px; color: var(--color-text-muted); line-height: 1.55; max-width: 340px; }

/* ------------------------------------------------------------------ */
/* 14. FAIXA DE AVISO (trial) — topo do app                            */
/* ------------------------------------------------------------------ */
.announce-strip {
  background: #1B1A22; color: #fff;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 20px; font-size: 13.5px; flex-wrap: wrap;
}
.announce-strip i { font-size: 17px; color: #F0C36A; }
.announce-strip strong { color: #F0C36A; font-weight: 700; }
.announce-strip .spacer { flex: 1; }
.announce-strip .btn { padding: 7px 13px; font-size: 12.5px; }

/* ------------------------------------------------------------------ */
/* 15. SEGMENTED CONTROL (radios, sem JS)                              */
/* ------------------------------------------------------------------ */
.segmented { display: inline-flex; gap: 3px; background: #F3F3F0; border: 1px solid #EAE9E3; border-radius: 10px; padding: 3px; }
.segmented input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.segmented label {
  padding: 8px 15px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: #6B6A74;
  cursor: pointer; white-space: nowrap; user-select: none;
  display: inline-flex; align-items: center; gap: 7px;
  transition: background var(--transition), color var(--transition);
}
.segmented label:hover { color: var(--color-text); }
.segmented input:checked + label { background: var(--color-primary-soft); color: var(--color-primary-text); box-shadow: var(--shadow-sm); }

/* ------------------------------------------------------------------ */
/* 16. CÓDIGO / SNIPPET (script do GTM)                                */
/* ------------------------------------------------------------------ */
.code-block {
  background: #1B1A22; color: #E8E6F4;
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  font-size: 12.5px; line-height: 1.6;
  overflow-x: auto; white-space: pre;
}
.code-row { display: flex; align-items: flex-start; gap: 10px; }
.code-row .code-block { flex: 1; min-width: 0; }

/* ------------------------------------------------------------------ */
/* 17. PLANOS                                                          */
/* ------------------------------------------------------------------ */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-4); align-items: stretch; }
.plan-card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-xl); padding: 24px;
  box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.plan-card.featured { border: 2px solid var(--color-primary); box-shadow: var(--shadow-lg); }
.plan-flag {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  background: var(--color-primary); color: #fff;
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
  padding: 4px 12px; border-radius: var(--radius-pill); white-space: nowrap;
}
.plan-name { font-weight: 700; font-size: 16px; }
.plan-desc { font-size: 13px; color: var(--color-text-muted); min-height: 34px; }
.plan-price { font-size: 32px; font-weight: 800; letter-spacing: -.5px; margin-top: 6px; }
.plan-price small { font-size: 13px; font-weight: 600; color: var(--color-text-soft); letter-spacing: 0; }
.plan-features { list-style: none; margin: 14px 0 18px; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.plan-features li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.5px; color: #3B3A43; }
.plan-features li i { color: #12A150; font-size: 16px; margin-top: 1px; }
.plan-card .btn { margin-top: auto; }

/* ------------------------------------------------------------------ */
/* 18. CHECKOUT                                                        */
/* ------------------------------------------------------------------ */
.checkout-grid { display: grid; grid-template-columns: 1fr 380px; gap: 28px; align-items: start; width: 100%; max-width: 1080px; }
@media (max-width: 900px) { .checkout-grid { grid-template-columns: 1fr; } }

.summary-card { position: sticky; top: 20px; }
.summary-line { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; padding: 8px 0; }
.summary-line .muted { color: var(--color-text-muted); }
.summary-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--color-border); margin-top: 8px; padding-top: 14px; font-weight: 800; font-size: 18px; }

.card-flags { display: flex; gap: 5px; }
.flag { width: 34px; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 8px; font-weight: 800; letter-spacing: .3px; color: #fff; }
.flag-visa { background: #1A1F71; }
.flag-master { background: #F7F7F7; border: 1px solid var(--color-input-border); }
.flag-master .c1, .flag-master .c2 { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.flag-master .c1 { background: #EB001B; }
.flag-master .c2 { background: #F79E1B; margin-left: -5px; }
.flag-amex { background: #006FCF; font-size: 7px; }
.flag-elo  { background: #CB2026; font-size: 7px; }

.choice-row { display: flex; gap: 12px; }
.choice-row .choice { flex: 1; }
.choice input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.choice label {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; background: var(--color-surface);
  border: 1.5px solid var(--color-input-border); border-radius: var(--radius-md);
  padding: 12px; font-weight: 600; font-size: 13.5px; color: var(--color-text-muted);
  cursor: pointer; transition: border-color var(--transition), background var(--transition);
}
.choice input:checked + label { background: var(--color-primary-soft); border-color: var(--color-primary); color: var(--color-primary-text); }

.trust-row { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 14px; flex-wrap: wrap; }
.trust-row span { font-size: 12px; color: var(--color-text-soft); display: inline-flex; align-items: center; gap: 6px; }
.trust-row i { color: #12A150; font-size: 14px; }

/* ------------------------------------------------------------------ */
/* 19. HOME / ONBOARDING                                               */
/* ------------------------------------------------------------------ */
.step-row { display: flex; align-items: center; gap: 14px; padding: 17px 22px; }
.step-icon { width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.step-icon.done    { background: var(--color-success-bg); color: var(--color-success); }
.step-icon.pending { background: var(--color-primary-soft); color: var(--color-primary); }
.step-kicker { font-size: 12px; font-weight: 600; color: var(--color-text-soft); letter-spacing: .3px; }
.step-title  { font-size: 15px; font-weight: 700; }

/* Prévia da vitrine (mock de navegador) */
.browser-mock { border: 1px solid #EBEAE4; border-radius: 13px; overflow: hidden; background: var(--color-surface-2); }
.browser-bar { height: 32px; display: flex; align-items: center; gap: 6px; padding: 0 12px; border-bottom: 1px solid #EBEAE4; background: var(--color-surface); }
.browser-bar .dot { width: 8px; height: 8px; border-radius: 50%; }
.browser-bar .url { margin-left: 8px; font-size: 11px; color: var(--color-text-soft); background: #F3F3F0; border-radius: 6px; padding: 2px 10px; }
.skeleton { border-radius: 6px; background: #E7E5DE; }
.video-tiles { display: flex; gap: 9px; }
.video-tile {
  width: 58px; height: 100px; border-radius: 10px; flex-shrink: 0;
  background-image: repeating-linear-gradient(135deg, #EEEDE8 0 7px, #F6F5F1 7px 14px);
  border: 1px solid #E7E5DE;
  display: flex; align-items: center; justify-content: center;
  color: #C4C2B9; font-size: 20px;
}
.video-tile.active {
  padding: 2px; border: none;
  background: linear-gradient(150deg, #7A68EC, #E5744D);
}
.video-tile.active > span {
  width: 100%; height: 100%; border-radius: 8px;
  background-image: repeating-linear-gradient(135deg, #EDE9FB 0 7px, #F5F2FE 7px 14px);
  display: flex; align-items: center; justify-content: center;
  color: #6E5CEE; font-size: 22px;
}
.video-thumb {
  width: 40px; height: 71px; border-radius: 8px; flex-shrink: 0;
  background-image: repeating-linear-gradient(135deg, #EDE9FB 0 7px, #F5F2FE 7px 14px);
  border: 1px solid #E7E2F7;
  display: flex; align-items: center; justify-content: center;
  color: #8B7BF2; font-size: 18px;
  position: relative; overflow: hidden;
}
/* capa real do vídeo (avatar 9:16): a <img> NUNCA sai do contêiner — o seletor
   pega qualquer img dentro de .video-thumb (não depende de classe extra) e a
   própria img leva .video-thumb-img (testado em test_admin_video_preview) */
.video-thumb img, .video-thumb-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  max-width: 100%; max-height: 100%;
  object-fit: cover; border-radius: inherit; display: block;
}
.video-thumb-real > i { display: none; }

/* ------------------------------------------------------------------ */
/* 12. RESPONSIVIDADE                                                  */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .h1 { font-size: 26px; }
  .card-pad-lg { padding: var(--space-4); }
  .form-row > * { min-width: 100%; }
  .grid-kpi { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}
