:root {
  /* Anitra — paleta da marca */
  --coral: #FF6B4A;
  --coral-dark: #E85537;
  --coral-soft: #FFE8DF;
  --verde: #5DAA6E;
  --verde-dark: #4A8A58;
  --verde-soft: #B8DCC0;
  --pessego: #FFC9A8;
  --creme: #FFF4ED;
  --cacau: #3D1F12;

  /* Neutros quentes (substituem a escala slate, harmonizados com creme) */
  --neutral-50: #FBF7F3;
  --neutral-100: #F4EEE6;
  --neutral-200: #E8DFD2;
  --neutral-300: #D6C9B8;
  --neutral-400: #B0A294;
  --neutral-500: #8B7E72;
  --neutral-600: #6B5C50;
  --neutral-700: #4D413A;
  --neutral-800: #3A302A;
  --neutral-900: #2A2117;

  --red-600: #dc2626;
  --white: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--cacau);
  background: var(--creme);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-weight: 600;
  letter-spacing: -0.01em;
}

a { color: var(--coral); text-decoration: none; }
a:hover { text-decoration: underline; }

.muted { color: var(--neutral-500); }

/* ----------- Anitra wordmark (logo tipográfico)
   Renderiza "anitra" com i e a em verde-folha, conforme brandbook.
   Uso: <span class="anitra-wordmark">an<span class="hl">i</span>tr<span class="hl">a</span></span>
   ou helper Jinja em _topbar.html / base.html.
   ----------- */
.anitra-wordmark {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-weight: 500;
  color: var(--cacau);
  letter-spacing: -0.01em;
  line-height: 1;
}
.anitra-wordmark .hl { color: var(--verde); }
.anitra-wordmark--inverse { color: var(--creme); }
.anitra-wordmark--inverse .hl { color: var(--verde-soft); }

/* Detalhe em Fraunces itálico — citações, manifesto, frases de pausa */
.anitra-quote {
  font-family: "Fraunces", "Georgia", serif;
  font-style: italic;
  font-weight: 400;
  color: var(--verde);
}

/* ----------- Microtipografia editorial -----------
   Inspirado em Flodesk/HoneyBook — labels CAPS letter-spaced funcionam
   como "pontuação editorial" sem precisar de mais ilustração.
   ----------- */

/* Eyebrow — rótulo curto acima de seções (substitui ou acompanha h2) */
.eyebrow {
  display: inline-block;
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--neutral-500);
  margin: 0;
  line-height: 1.4;
}
.eyebrow--coral { color: var(--coral); }
.eyebrow--verde { color: var(--verde-dark); }

/* Fraunces inline — para destacar UMA palavra dentro de heading sans.
   Uso: <h1>Suas <em class="brand-em">cartilhas</em></h1>
   Cria contraste editorial sem virar tipografia "duas famílias inteiras". */
.brand-em {
  font-family: "Fraunces", "Georgia", serif;
  font-style: italic;
  font-weight: 500;
  color: var(--verde);
  letter-spacing: 0;
  /* Compensa a altura visual da serifa no fluxo do sans */
  padding-right: 0.05em;
}

/* Display number — número de impacto, ~3x body, peso forte */
.display-number {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--cacau);
}

/* ----------- Auth ----------- */
.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
  background: linear-gradient(135deg, var(--coral-soft) 0%, var(--neutral-50) 100%);
}

/* ----------- Seletor de idioma ----------- */
.locale-selector {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  background: var(--white);
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(61, 31, 18, 0.06);
}
.locale-selector .locale-form {
  margin: 0;
  display: inline-flex;
}
.locale-pill {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--neutral-700);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.locale-pill:hover {
  background: var(--neutral-100);
}
.locale-pill.is-active {
  background: var(--coral);
  color: var(--white);
  cursor: default;
}
.locale-pill.is-active:hover {
  background: var(--coral);
}
@media (max-width: 520px) {
  .locale-pill {
    font-size: 11px;
    padding: 5px 9px;
  }
}

/* Variante compacta — botão de bandeira que abre popup com 5 opções.
   Usada no header de páginas autenticadas. */
.locale-menu {
  position: relative;
  display: inline-flex;
}
.locale-menu-trigger {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  line-height: 1;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.locale-menu-trigger:hover {
  background: var(--neutral-100);
}
.locale-menu-trigger:focus-visible {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.18);
}
.locale-menu-trigger .flag {
  display: inline-block;
  /* Evita que cores da topbar afetem o emoji */
  filter: none;
}

.locale-menu-popup {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 200px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  box-shadow: 0 12px 32px rgba(61, 31, 18, 0.12);
  padding: 6px;
  z-index: 100;
  display: none;
}
.locale-menu.is-open .locale-menu-popup {
  display: block;
}
.locale-menu-form {
  margin: 0;
}
.locale-menu-item {
  appearance: none;
  border: 0;
  background: transparent;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  color: var(--neutral-700);
  text-align: left;
  transition: background 0.12s ease, color 0.12s ease;
}
.locale-menu-item:hover {
  background: var(--neutral-100);
}
.locale-menu-item.is-active {
  background: var(--coral-soft);
  color: var(--coral-dark);
  font-weight: 600;
}
.locale-menu-item .flag {
  font-size: 18px;
  line-height: 1;
}
.locale-menu-label {
  flex: 1;
}
.auth-card {
  background: var(--white);
  border-radius: 16px;
  padding: 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(61, 31, 18, 0.08);
}
.auth-card .logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 26px;
  line-height: 1;
  color: var(--cacau);
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.auth-card .logo .brand-symbol {
  width: 30px;
  height: 30px;
}
.auth-card .logo .hl { color: var(--verde); }
.auth-card h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.auth-card p.muted {
  margin: 0 0 24px;
}

/* ----------- Form ----------- */
.form {
  display: grid;
  gap: 16px;
  margin-top: 16px;
}
.form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
}
.form input[type="email"],
.form input[type="password"],
.form input[type="text"],
.form input[type="tel"],
.form textarea,
.form select {
  padding: 11px 13px;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
  color: var(--cacau);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.18);
}

/* ----------- Buttons ----------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.05s, opacity 0.15s;
  font-family: inherit;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--coral);
  color: var(--white);
}
.btn-primary:hover { background: var(--coral-dark); }
.btn-ghost {
  background: transparent;
  color: var(--neutral-700);
  border-color: var(--neutral-200);
}
.btn-ghost:hover { background: var(--neutral-100); }
.btn-danger {
  color: var(--red-600);
  border-color: #fecaca;
}
.btn-danger:hover { background: #fbeaea; color: var(--red-600); }

/* ----------- Alerts ----------- */
.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert.error {
  background: #fef2f2;
  color: var(--red-600);
  border: 1px solid #fecaca;
}

/* ----------- Topbar ----------- */
.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--neutral-200);
}
.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-weight: 500;
  font-size: 22px;
  line-height: 1;
  color: var(--cacau);
  letter-spacing: -0.01em;
  text-transform: none;
}
.brand:hover { text-decoration: none; }
.brand .brand-symbol {
  width: 26px;
  height: 26px;
  display: inline-block;
  flex-shrink: 0;
}
.brand .hl { color: var(--verde); }
.topnav {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 14px;
}
.btn-sm {
  padding: 7px 12px;
  font-size: 13px;
}

/* ----------- Layout ----------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}
.page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-head h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.page-head p.muted {
  margin: 0;
}

/* ----------- Cartilha cards ----------- */
.empty-card {
  background: var(--white);
  border: 1px dashed var(--neutral-200);
  border-radius: 14px;
  padding: 48px 24px;
  text-align: center;
}
.empty-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.cartilha-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}
.cartilha-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
.cartilha-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.cartilha-card h3 {
  margin: 0;
  font-size: 15px;
  letter-spacing: -0.01em;
  flex: 1;
}
.cartilha-card .actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}
.status {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.status-pending,
.status-analyzing,
.status-generating_avatar,
.status-generating_exercises,
.status-rendering_pdf {
  background: #fef3c7;
  color: #92400e;
}
.status-done {
  background: #d1fae5;
  color: #065f46;
}
.status-failed {
  background: #fee2e2;
  color: var(--red-600);
}

/* ----------- Breadcrumb ----------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--neutral-500);
  margin-bottom: 8px;
}
.breadcrumb a { color: var(--neutral-500); }
.breadcrumb a:hover { color: var(--coral); }
.breadcrumb .sep { color: var(--neutral-200); }

/* ----------- Container variants ----------- */
.container.narrow {
  max-width: 720px;
}

/* ----------- Template grid ----------- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}
.template-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.1s, box-shadow 0.15s;
}
.template-card:hover:not(.disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(61, 31, 18, 0.08);
}
.template-card.disabled { opacity: 0.55; }
.template-thumb {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--coral-soft), var(--neutral-100));
  display: grid;
  place-items: center;
}
.template-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.template-body {
  padding: 16px 18px 8px;
  flex: 1;
}
.template-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  letter-spacing: -0.01em;
}
.template-body p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
}
.template-meta {
  font-size: 12px;
  color: var(--neutral-500);
}
.template-card .btn {
  margin: 0 18px 18px;
}

/* ----------- Form cards ----------- */
.card-form {
  gap: 20px;
}
.form-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 22px;
  display: grid;
  gap: 12px;
}
.form-card h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.form-card p.muted {
  margin: 0 0 8px;
}
.form-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--neutral-700);
}
.form-card .hint {
  color: var(--neutral-500);
  font-weight: 400;
  font-size: 12px;
}
.form-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.photo-preview {
  margin-top: 4px;
  border: 1px dashed var(--neutral-200);
  border-radius: 10px;
  padding: 8px;
  text-align: center;
}
.photo-preview img {
  max-height: 220px;
  max-width: 100%;
  border-radius: 6px;
}
.steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--neutral-700);
}

/* ----------- Progress card ----------- */
.progress-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 28px;
  display: grid;
  gap: 16px;
}
.progress-card h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.01em;
}
.progress-bar {
  height: 8px;
  background: var(--neutral-100);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--coral), var(--coral));
  transition: width 0.6s ease;
}
.progress-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.progress-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--neutral-500);
}
.progress-steps .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--neutral-200);
  flex-shrink: 0;
}
.progress-steps li.active {
  color: var(--cacau);
  font-weight: 600;
}
.progress-steps li.active .dot {
  background: var(--coral);
  box-shadow: 0 0 0 4px rgba(255, 107, 74, 0.22);
}
.progress-steps li.done { color: var(--neutral-700); }
.progress-steps li.done .dot {
  background: var(--coral);
}
.error-box {
  background: #fef2f2;
  color: var(--red-600);
  border: 1px solid #fecaca;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

/* ----------- Admin nav ----------- */
.topnav-link {
  font-size: 14px;
  color: var(--neutral-500);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.1s, color 0.1s;
}
.topnav-link:hover { background: var(--neutral-100); color: var(--cacau); text-decoration: none; }
.topnav-link.active { color: var(--coral); font-weight: 600; }

/* ----------- Admin table ----------- */
.admin-table-wrap {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  overflow: hidden;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.admin-table th {
  background: var(--neutral-50);
  padding: 10px 14px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--neutral-200);
}
.admin-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--neutral-100);
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr.row-inactive td { opacity: 0.5; }
.cell-main { font-weight: 500; }
.cell-sub { font-size: 12px; color: var(--neutral-500); margin-top: 2px; }
.center { text-align: center; }
.actions-cell { white-space: nowrap; }

/* ----------- Badges ----------- */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-gray  { background: var(--neutral-100); color: var(--neutral-500); }

/* ----------- Tags de área ----------- */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
}
.tag-fisioterapia { background: #dbeafe; color: #1e40af; }
.tag-pilates      { background: #fce7f3; color: #9d174d; }
.tag-academia     { background: #fef3c7; color: #92400e; }

/* ----------- Form helpers ----------- */
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}
.checkbox-label input { width: 16px; height: 16px; }
.form-card-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  padding: 2px 0 8px;
}
.form-card-summary::-webkit-details-marker { display: none; }
.form-card-summary h2 { margin: 0; }
.summary-hint { font-size: 12px; color: var(--neutral-500); }
details.form-card[open] .summary-hint { display: none; }
.slug-code {
  font-size: 11px;
  color: var(--neutral-500);
  background: var(--neutral-100);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
}

/* ----------- Layout cards ----------- */
.layout-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.layout-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.layout-card-inactive { opacity: 0.6; }
.layout-swatch {
  display: flex;
  height: 10px;
}
.swatch-strip { flex: 1; }
.layout-card-body { padding: 16px 18px 8px; flex: 1; }
.layout-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
}
.layout-card-head h3 { margin: 0 0 4px; font-size: 15px; }
.layout-meta { font-size: 12px; color: var(--neutral-500); margin-top: 8px; }
.layout-meta .sep { margin: 0 4px; }
.layout-card-actions { padding: 0 18px 16px; }

/* ----------- Color preview ----------- */
.color-preview {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  min-height: 28px;
  margin-bottom: 10px;
}
.color-swatch-preview {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,0.08);
}
.color-helper { margin-top: 10px; }
.color-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.color-key {
  font-size: 11px;
  background: var(--neutral-100);
  padding: 3px 7px;
  border-radius: 4px;
  cursor: pointer;
  font-family: monospace;
  transition: background 0.1s;
}
.color-key:hover { background: var(--neutral-200); }

/* ─────────────────────────────────────────────
   Wizard de criação de cartilha (3 etapas)
───────────────────────────────────────────── */

.container.narrow { max-width: 680px; }

/* Barra de progresso */
.wizard-nav {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 32px;
}
.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-500);
  min-width: 64px;
}
.wizard-step.active { color: var(--coral); font-weight: 600; }
.wizard-step.done { color: var(--coral); }
.wizard-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--neutral-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  background: var(--white);
  color: var(--neutral-500);
}
.wizard-step.active .wizard-circle {
  border-color: var(--coral);
  color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.18);
}
.wizard-step.done .wizard-circle {
  background: var(--coral);
  border-color: var(--coral);
  color: #fff;
  font-size: 12px;
}
.wizard-line {
  flex: 1;
  height: 2px;
  background: var(--neutral-200);
  margin-bottom: 18px;
}
.wizard-line.done { background: var(--coral); }
.wizard-title {
  margin: 0 0 20px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

/* Cards de escolha de avatar */
.avatar-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 4px;
}
.avatar-choice-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 2px solid var(--neutral-200);
  border-radius: 14px;
  padding: 18px 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.avatar-choice-card.selected {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.14);
}
.avatar-choice-card.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.avatar-choice-icon { color: var(--coral); flex-shrink: 0; }
.avatar-choice-icon.muted { color: var(--neutral-500); }
.avatar-choice-check {
  display: none;
  margin-left: auto;
  color: var(--coral);
  font-weight: 700;
  font-size: 16px;
}
.avatar-choice-card.selected .avatar-choice-check { display: block; }

/* Preview de foto */
.photo-preview-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
}
.photo-preview-img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--neutral-200);
}

/* Layout picker (etapa 2) */
.layout-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}
.layout-picker-card {
  background: var(--white);
  border: 2px solid var(--neutral-200);
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
  display: flex;
  flex-direction: column;
}
.layout-picker-card.selected {
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.14);
}
.layout-swatch-row {
  display: flex;
  height: 12px;
}
.layout-swatch { flex: 1; }
.layout-picker-body {
  padding: 14px 16px;
  flex: 1;
}
.layout-picker-check {
  display: none;
  position: absolute;
  top: 20px;
  right: 14px;
  color: var(--coral);
  font-weight: 700;
  font-size: 16px;
  background: var(--white);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.layout-picker-card.selected .layout-picker-check { display: flex; }

/* Exercise picker (etapa 3) */
.ex-picker {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.ex-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 14px 16px;
  transition: opacity 0.15s;
}
.ex-row-disabled { opacity: 0.45; }
.ex-check-label {
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
}
.ex-check-label input { position: absolute; opacity: 0; width: 0; }
.ex-check-box {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 2px solid var(--neutral-200);
  border-radius: 6px;
  background: var(--white);
  transition: background 0.1s, border-color 0.1s;
}
.ex-check-label input:checked ~ .ex-check-box {
  background: var(--coral);
  border-color: var(--coral);
}
.ex-check-label input:checked ~ .ex-check-box::after {
  content: '';
  display: block;
  width: 5px;
  height: 9px;
  border: 2px solid #fff;
  border-top: none;
  border-left: none;
  transform: rotate(45deg) translate(-1px, -1px);
}
.ex-info { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ex-name { font-size: 14px; font-weight: 600; }
.ex-area { font-size: 12px; }
.ex-muscles { font-size: 12px; }
.ex-reps-group { flex-shrink: 0; }
.ex-reps-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  font-weight: 500;
  color: var(--neutral-700);
}
.ex-reps-input {
  width: 100px;
  padding: 7px 10px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--white);
}
.ex-reps-input:focus {
  outline: none;
  border-color: var(--coral);
  box-shadow: 0 0 0 3px rgba(255, 107, 74, 0.14);
}
.ex-counter {
  font-size: 13px;
  color: var(--neutral-500);
  margin-bottom: 24px;
  padding-left: 2px;
}
.ex-limit-bar {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--neutral-100);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--neutral-600);
  margin-bottom: 20px;
  transition: background .2s, border-color .2s, color .2s;
}
.ex-limit-bar strong { color: var(--neutral-800); }
.ex-limit-bar--full {
  background: var(--coral-soft);
  border-color: var(--coral);
  color: var(--coral);
  font-weight: 600;
}
.ex-limit-bar--full strong { color: var(--coral); }

.ex-categoria-header {
  font-size: 16px;
  font-weight: 700;
  color: var(--neutral-800);
  margin: 28px 0 4px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--neutral-200);
}
.ex-categoria-header:first-of-type { margin-top: 0; }

.ex-group-header {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neutral-500);
  padding: 16px 2px 6px;
  border-bottom: 1px solid var(--neutral-200);
  margin-bottom: 4px;
}
.ex-group-header:first-of-type { padding-top: 0; }

/* ─────────────────────────────────────────────
   Dashboard redesign — stats, patients, sections
───────────────────────────────────────────── */

/* Hero / cabeçalho */
.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.dashboard-hero h1 {
  margin: 0 0 4px;
  font-size: 28px;
  letter-spacing: -0.02em;
}
.dashboard-hero p.muted { margin: 0; }
.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Stats */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 36px;
}
@media (max-width: 560px) {
  .stat-cards { grid-template-columns: 1fr 1fr; }
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 14px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card--accent {
  background: var(--coral-soft);
  border-color: rgba(255, 107, 74, 0.22);
}
.stat-value {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cacau);
  line-height: 1;
  margin-bottom: 4px;
}
.stat-card--accent .stat-value { color: var(--coral); }
.stat-label {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--neutral-500);
}

/* Sections */
.dash-section {
  margin-bottom: 40px;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 16px;
}
.section-head h2 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.section-link {
  font-size: 13px;
  color: var(--coral);
  font-weight: 500;
  white-space: nowrap;
}
.section-link:hover { text-decoration: underline; }

/* Empty inline state */
.empty-inline {
  background: var(--white);
  border: 1px dashed var(--neutral-200);
  border-radius: 14px;
  padding: 28px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.empty-inline p { margin: 0; }

/* Patient scroll row */
.patient-scroll {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--neutral-200) transparent;
}
.patient-scroll::-webkit-scrollbar { height: 4px; }
.patient-scroll::-webkit-scrollbar-thumb { background: var(--neutral-200); border-radius: 4px; }

.patient-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  flex-shrink: 0;
  width: 88px;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid var(--neutral-200);
  background: var(--white);
  transition: transform 0.1s, box-shadow 0.15s;
}
.patient-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(61, 31, 18, 0.08);
  text-decoration: none;
}
.patient-card--add {
  border-style: dashed;
  opacity: 0.7;
}
.patient-card--add:hover { opacity: 1; }

.patient-avatar-wrap {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.patient-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.patient-avatar-placeholder,
.patient-avatar-add {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  font-weight: 700;
  font-size: 20px;
  display: grid;
  place-items: center;
}
.patient-avatar-add { font-size: 26px; }

/* Avatar status dot */
.avatar-status-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--white);
}
.avatar-status-dot--avatar_ready { background: #10b981; }
.avatar-status-dot--failed { background: var(--red-600); }
.avatar-status-dot--pending { background: var(--neutral-300); }
.avatar-status-dot--analyzing,
.avatar-status-dot--generating_avatar,
.avatar-status-dot--awaiting_analysis_approval,
.avatar-status-dot--awaiting_avatar_approval { background: #f59e0b; }

.patient-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--cacau);
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.patient-meta {
  font-size: 11px;
  color: var(--neutral-500);
  text-align: center;
}

/* Cartilha card enhancements */
.cartilha-card-thumb {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--neutral-100);
  margin-bottom: 4px;
}
.cartilha-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
/* Preview retangular da cartilha (página dos exercícios). Aspecto ~A4
   paisagem (1123×794 → 1.414). object-position top centraliza onde
   ficam capa/título quando o layout é multi-página. */
.cartilha-preview {
  display: block;
  width: 100%;
  aspect-ratio: 1.414 / 1;
  background: var(--neutral-100);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 4px;
  position: relative;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.cartilha-preview:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.cartilha-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.cartilha-preview-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--neutral-100), var(--neutral-200));
  color: var(--neutral-400);
  font-size: 48px;
  font-weight: 600;
  font-family: var(--font-display, inherit);
}
.cartilha-preview-fallback img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  opacity: 0.6;
}
/* × pequeno no canto superior direito do card. Z-index acima do <a>
   da preview pra ser clicável (e sai do flow do flex pra não empurrar). */
.cartilha-delete-x {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  z-index: 2;
}
.cartilha-delete-x button {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--neutral-500);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.cartilha-delete-x button:hover {
  background: var(--red-600);
  color: var(--white);
  transform: scale(1.05);
}
.cartilha-card-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}
.cartilha-card-info h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cartilha-patient-name {
  font-size: 12px;
  color: var(--neutral-500);
}

/* Status badge extra */
.status-awaiting_analysis_approval,
.status-awaiting_avatar_approval {
  background: #ede9fe;
  color: #5b21b6;
}

/* Patient list (pacientes_lista.html) */
.patients-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.patient-list-card {
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
  transition: background 0.1s, transform 0.1s;
}
.patient-list-card:hover {
  background: var(--coral-soft);
  transform: translateX(2px);
  text-decoration: none;
}
.patient-list-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.patient-list-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.patient-list-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 20px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.patient-list-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chevron {
  color: var(--neutral-400);
  font-size: 16px;
}

/* Patient profile (paciente_detalhe.html) */
.patient-profile {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 40px;
  background: var(--white);
  border: 1px solid var(--neutral-200);
  border-radius: 16px;
  padding: 28px;
  flex-wrap: wrap;
}
.patient-profile-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--neutral-100);
  display: flex;
  align-items: center;
  justify-content: center;
}
.patient-profile-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.patient-profile-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral);
  font-size: 48px;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.patient-profile-info { flex: 1; }
.patient-profile-info h1 { margin: 0 0 6px; font-size: 26px; letter-spacing: -0.02em; }
.patient-profile-info p.muted { margin: 0 0 16px; font-size: 14px; }
.patient-profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   Admin billing — Fase 5
   KPI cards, formulários estreitos, ledger table accents
   ============================================================ */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 16px 0 32px;
}
.kpi-card {
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  padding: 16px 18px;
}
.kpi-label {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--neutral-500);
  margin-bottom: 8px;
}
.kpi-value {
  font-family: "General Sans", "Inter", system-ui, sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--cacau);
  line-height: 1;
}

.form-narrow {
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 20px;
}
.form-narrow label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--neutral-700);
}
.form-narrow label.checkbox {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
}
.form-narrow label.checkbox input { margin-top: 3px; }
.form-narrow input[type="text"],
.form-narrow input[type="number"],
.form-narrow textarea,
.form-narrow select {
  padding: 8px 10px;
  border: 1px solid var(--neutral-300);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 400;
  font-family: inherit;
}
.form-narrow .cell-sub {
  font-weight: 400;
  color: var(--neutral-500);
  font-size: 12px;
  margin-top: 2px;
}

.inline-edit {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--neutral-50);
  border-radius: 8px;
  margin-top: 8px;
  min-width: 280px;
}
.inline-edit label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  font-weight: 600;
  color: var(--neutral-700);
}
.inline-edit input,
.inline-edit select {
  padding: 5px 8px;
  border: 1px solid var(--neutral-300);
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
}
.inline-edit label.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 8px;
}

.filter-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}
.filter-form select {
  padding: 7px 10px;
  border: 1px solid var(--neutral-300);
  border-radius: 6px;
  font-size: 14px;
}

td.positive { color: #047857; font-weight: 600; }
td.negative { color: #b91c1c; font-weight: 600; }

/* ============================================================
   Página de assinatura — Fase 7
   ============================================================ */

.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin: 20px 0 32px;
}
.plan-card {
  border: 1px solid var(--neutral-200);
  border-radius: 12px;
  padding: 22px 22px 20px;
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.plan-card.plan-current {
  border-color: var(--coral);
  box-shadow: 0 0 0 2px rgba(255, 107, 74, 0.18);
}
.plan-card h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.plan-price {
  font-size: 28px;
  font-weight: 700;
  color: var(--cacau);
  margin: 6px 0 8px;
}
.plan-period {
  font-size: 14px;
  font-weight: 400;
  color: var(--neutral-500);
  margin-left: 4px;
}
.plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 14px;
  color: var(--neutral-700);
}
.plan-features li::before {
  content: "✓ ";
  color: var(--coral);
  font-weight: 700;
  margin-right: 4px;
}
.plan-cta {
  display: block;
  text-align: center;
  padding: 11px 14px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.plan-cta-current {
  background: var(--coral);
  color: #fff;
}
.plan-cta-disabled {
  background: var(--neutral-200);
  color: var(--neutral-500);
  cursor: not-allowed;
}

.info-box {
  background: var(--neutral-50);
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 24px;
}
.info-box h2 {
  margin: 0 0 10px;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.info-box ul {
  margin: 0;
  padding-left: 20px;
  font-size: 14px;
  color: var(--neutral-700);
}
.info-box li {
  margin-bottom: 6px;
}

/* ============================================================
   Painel admin (hub) — cards categorizados
   ============================================================ */

.hub-section {
  margin: 32px 0 8px;
}
.hub-section h2 {
  margin: 0 0 4px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.hub-section > p.muted {
  margin: 0 0 14px;
  font-size: 13px;
}
.hub-section-secondary {
  opacity: 0.85;
}

.hub-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}
.hub-card {
  display: block;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--neutral-200);
  border-radius: 10px;
  text-decoration: none;
  color: var(--cacau);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}
.hub-card:hover {
  border-color: var(--coral);
  box-shadow: 0 2px 8px rgba(255, 107, 74, 0.10);
  transform: translateY(-1px);
}
.hub-card-primary {
  border-color: var(--coral);
  background: linear-gradient(180deg, rgba(255, 107, 74, 0.06) 0%, #fff 100%);
}
.hub-card-muted {
  background: var(--neutral-50);
}
.hub-card-title {
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 4px;
}
.hub-card-desc {
  font-size: 13px;
  color: var(--neutral-500);
  line-height: 1.4;
}

/* ============================================================
   Botão "voltar ao painel" e formulários admin com fieldsets
   ============================================================ */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: var(--neutral-100);
  color: var(--neutral-700);
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  margin-bottom: 12px;
  transition: background 120ms ease, color 120ms ease;
}
.back-btn:hover {
  background: var(--neutral-200);
  color: var(--cacau);
}

.field-group {
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  padding: 14px 16px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.field-group legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--neutral-500);
}

.form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

/* ============================================================
   Painel admin: info-bar, radio-block (modo auto/manual), advanced
   ============================================================ */

.info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  background: var(--neutral-50);
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.info-bar > div { font-size: 14px; }

.radio-block {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--neutral-200);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease;
  flex-direction: row !important;
  font-weight: 400 !important;
}
.radio-block input[type="radio"] {
  margin-top: 3px;
  flex-shrink: 0;
}
.radio-block:hover {
  border-color: var(--neutral-300);
}
.radio-block-active {
  border-color: var(--coral);
  background: rgba(255, 107, 74, 0.05);
}
.radio-block strong {
  font-size: 14px;
}

.advanced-details {
  border: 1px dashed var(--neutral-200);
  border-radius: 8px;
  padding: 12px 16px;
}
.advanced-details summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--neutral-600);
  font-weight: 600;
  user-select: none;
}
.advanced-details summary:hover { color: var(--cacau); }
.advanced-details[open] summary { margin-bottom: 14px; }
.advanced-details .advanced-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.restore-action {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--neutral-200);
  flex-wrap: wrap;
}
.restore-action form { margin: 0; }

code {
  background: var(--neutral-100);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.92em;
}
