.mv-theme {
  --bg0: #0B0908;
  --bg1: #16110E;
  --bg2: #201A16;
  --line: rgba(255,255,255,0.07);
  --ink: #F5EFEA;
  --ink-soft: #A89C92;
  --terra: #D77156;
  --coral: #F17762;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--bg0);
  color: var(--ink);
  border-radius: 0;
  padding: 0;
  width: 100%;
  max-width: none;
  /* Estende o fundo escuro até as bordas da tela, mesmo dentro de um container
     "boxed" do Elementor (some a borda branca dos lados) */
  box-shadow: 0 0 0 100vmax var(--bg0);
  clip-path: inset(0 -100vmax);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-variant-numeric: tabular-nums;
}
/* O fundo da página também acompanha o tema (cobre cima/baixo do container) */
body.mv-page { background: #0B0908; }
body.mv-page.mv-page-light { background: #F7F3EF; }
.mv-theme img { max-width: 100%; height: auto; }
.mv-theme h1, .mv-theme h2, .mv-theme .mv-h1 { font-family: 'Space Grotesk', 'Inter', sans-serif; }
.mv-theme .stat .val, .mv-theme .mv-ring-block .txt .n, .mv-theme table.mv-summary td.num,
.mv-theme .mv-total-card .val, .mv-theme .mv-sim-row .fat, .mv-theme button {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}
.mv-theme .mv-logo { height: 24px; width: auto; display: block; }
.mv-theme .mv-logo-light { display: none; }
.mv-theme[data-theme="light"] .mv-logo-dark { display: none; }
.mv-theme[data-theme="light"] .mv-logo-light { display: block; }
.mv-theme * { box-sizing: border-box; }
.mv-theme .mv-wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: clamp(16px, 4vw, 32px) clamp(14px, 4vw, 24px) 40px; padding-left: max(clamp(14px, 4vw, 24px), env(safe-area-inset-left)); padding-right: max(clamp(14px, 4vw, 24px), env(safe-area-inset-right)); }

.mv-theme .mv-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.mv-theme .mv-brand { display: flex; align-items: center; gap: 9px; }
.mv-theme .mv-brand .dot { width: 9px; height: 9px; border-radius: 999px; background: var(--coral); }
.mv-theme .mv-brand span { font-size: 13px; font-weight: 600; letter-spacing: 0.3px; color: var(--ink-soft); }
.mv-theme h2.mv-h1 { font-size: 21px; font-weight: 700; margin: 0 0 4px; color: var(--ink); }
.mv-theme h2.mv-h1 .accent { color: var(--coral); }
.mv-theme p.mv-lead { font-size: 13px; color: var(--ink-soft); margin: 0 0 22px; max-width: 480px; }

.mv-theme .mv-card { background: var(--bg1); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin-bottom: 14px; }
.mv-theme .mv-card-title { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }

.mv-theme .mv-segmented { display: flex; flex-wrap: wrap; background: var(--bg2); border-radius: 12px; padding: 4px; gap: 4px; margin-bottom: 16px; }
.mv-theme .mv-segmented button { flex: 1 1 auto; min-width: 90px; border: none; background: transparent; color: var(--ink-soft); font-family: inherit; font-size: 12px; font-weight: 600; padding: 10px 6px; border-radius: 9px; cursor: pointer; line-height: 1.25; }
.mv-theme .mv-segmented button.active { background: var(--terra); color: #fff; }

.mv-theme .mv-stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.mv-theme .mv-stat { background: var(--bg2); border-radius: 14px; padding: 14px; }
.mv-theme .mv-stat .lbl { font-size: 11px; color: var(--ink-soft); margin-bottom: 6px; }
.mv-theme .mv-stat .val { font-size: 21px; font-weight: 700; color: var(--ink); }
.mv-theme .mv-stat .val.accent { color: var(--coral); }

.mv-theme .mv-ring-block { display: flex; align-items: center; gap: 16px; margin-top: 14px; }
.mv-theme .mv-ring-block .txt { flex: 1; }
.mv-theme .mv-ring-block .txt .n { font-size: 24px; font-weight: 700; }
.mv-theme .mv-ring-block .txt .l { font-size: 11.5px; color: var(--ink-soft); }

.mv-theme .mv-field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mv-theme .mv-field-grid > *, .mv-theme .mv-prod-grid > *, .mv-theme .mv-stat-row > *, .mv-theme .mv-totals > * { min-width: 0; }
.mv-theme label.mv-field { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; color: var(--ink-soft); font-weight: 500; }
.mv-theme .mv-lbl-row { display: flex; align-items: center; gap: 5px; }
.mv-theme input[type="number"], .mv-theme input[type="text"], .mv-theme input[type="email"], .mv-theme input[type="password"] {
  width: 100%; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg2); color: var(--ink); font-size: 15px; font-family: inherit; font-weight: 500;
  text-align: left;
}
.mv-theme input:focus { outline: 2px solid var(--terra); outline-offset: 1px; }

.mv-theme table.mv-summary { width: 100%; border-collapse: collapse; font-size: 13px; }
.mv-theme table.mv-summary th { text-align: left; font-size: 10.5px; color: var(--ink-soft); font-weight: 600; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.mv-theme table.mv-summary td { padding: 12px 0; border-bottom: 1px solid var(--line); }
.mv-theme table.mv-summary tr:last-child td { border-bottom: none; }
.mv-theme table.mv-summary td.num, .mv-theme table.mv-summary th.num { text-align: right; font-weight: 700; }

.mv-theme .mv-sim-row { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line); gap: 10px; }
.mv-theme .mv-sim-row:last-of-type { border-bottom: none; }
.mv-theme .mv-sim-row .name { font-size: 12.5px; font-weight: 600; flex: 1; }
.mv-theme .mv-sim-row input[type="number"] { width: 64px; text-align: center; padding: 8px 4px; font-size: 13px; }
.mv-theme .mv-sim-row .fat { width: 92px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--coral); }

.mv-theme .mv-totals { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.mv-theme .mv-total-card { background: var(--bg2); border-radius: 14px; padding: 14px; }
.mv-theme .mv-total-card .lbl { font-size: 10.5px; color: var(--ink-soft); }
.mv-theme .mv-total-card .val { font-size: 19px; font-weight: 700; margin-top: 4px; }
.mv-theme .mv-total-card.hi .val { color: var(--coral); }

.mv-theme .mv-note { font-size: 11px; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; }
.mv-theme footer.mv-foot { text-align: center; font-size: 11.5px; color: var(--ink-soft); padding: 18px 0 6px; }

.mv-theme .mv-tip { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); color: var(--ink-soft); font-size: 10px; font-weight: 700; cursor: help; flex-shrink: 0; }
.mv-theme .mv-tip .bubble { display: none; position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%); width: 190px; max-width: calc(100vw - 32px); background: #000; color: #fff; font-size: 11px; font-weight: 400; line-height: 1.45; padding: 9px 11px; border-radius: 9px; z-index: 5; box-shadow: 0 6px 18px rgba(0,0,0,0.35); }
.mv-theme .mv-tip:hover .bubble, .mv-theme .mv-tip:focus .bubble, .mv-theme .mv-tip.open .bubble { display: block; }

/* TEMA CLARO (aplicado via data-theme="light" no próprio .mv-theme) */
.mv-theme[data-theme="light"] {
  --bg0: #F7F3EF; --bg1: #FFFFFF; --bg2: #F1EAE4;
  --line: rgba(0,0,0,0.08); --ink: #1A1512; --ink-soft: #6B6058;
}

/* Alternador de tema (ícone SVG, não depende de fonte/emoji) */
.mv-theme .mv-theme-toggle {
  width: 36px; height: 36px; min-width: 36px; padding: 0; margin: 0; border-radius: 999px;
  background: var(--bg2); border: 1px solid var(--line);
  color: var(--ink); display: flex; align-items: center; justify-content: center;
  cursor: pointer; line-height: 0; flex-shrink: 0; box-shadow: none; text-transform: none;
}
.mv-theme .mv-theme-toggle svg { width: 18px; height: 18px; display: block; stroke: currentColor; fill: none; pointer-events: none; }
.mv-theme .mv-theme-toggle:hover, .mv-theme .mv-theme-toggle:focus { background: var(--bg2); color: var(--coral); border-color: var(--coral); outline: none; }

/* Botão de baixar cálculo */
.mv-theme button.mv-download {
  width: 100%; margin-top: 10px; padding: 12px;
  border: 1px solid var(--terra); border-radius: 10px; background: transparent;
  color: var(--terra); font-size: 13px; font-weight: 600; font-family: inherit; cursor: pointer;
}
.mv-theme button.mv-download:hover { background: var(--bg2); }

/* Login e troca de senha — cartão centralizado */
.mv-theme .mv-auth-wrap { max-width: 360px; margin: 30px auto; padding: 12px; }
.mv-theme .mv-auth-card { background: var(--bg1); border: 1px solid var(--line); border-radius: 20px; padding: 30px 26px; }
.mv-theme .mv-auth-card h2 { font-size: 21px; font-weight: 700; text-align: center; margin: 0 0 6px; }
.mv-theme .mv-auth-card h2 .accent { color: var(--coral); }
.mv-theme .mv-auth-sub { text-align: center; font-size: 12px; color: var(--ink-soft); margin: 0 0 22px; }
.mv-theme .mv-auth-card label.field { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--ink-soft); font-weight: 500; margin-bottom: 14px; text-align: left; }
.mv-theme .mv-auth-links { display: flex; flex-direction: column; align-items: center; gap: 8px; margin-top: 16px; font-size: 12px; }
.mv-theme .mv-auth-links a { color: var(--ink-soft); text-decoration: none; }
.mv-theme .mv-auth-links a:hover { color: var(--coral); }
.mv-theme .mv-auth-error { background: rgba(241,119,98,0.14); border: 1px solid var(--coral); color: var(--coral); font-size: 12px; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }
.mv-theme .mv-auth-success { background: rgba(21,128,61,0.12); border: 1px solid #15803d; color: #15803d; font-size: 12px; padding: 10px 12px; border-radius: 8px; margin-bottom: 14px; }

/* Catálogo de produtos */
.mv-theme .mv-prod-row { background: var(--bg2); border-radius: 12px; padding: 12px; margin-bottom: 10px; }
.mv-theme .mv-prod-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mv-theme .mv-prod-row label { display: flex; flex-direction: column; gap: 4px; font-size: 10.5px; color: var(--ink-soft); font-weight: 500; }
.mv-theme .mv-prod-row input { padding: 9px 10px; font-size: 13px; }
.mv-theme .mv-prod-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.mv-theme .mv-prod-custo { font-size: 12px; color: var(--coral); font-weight: 700; font-family: 'Space Grotesk', sans-serif; }
.mv-theme .mv-prod-remove { background: none; border: none; color: var(--ink-soft); font-size: 11.5px; cursor: pointer; text-decoration: underline; padding: 0; }
.mv-theme .mv-prod-remove:hover { color: var(--coral); }
.mv-theme .mv-prod-check { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.mv-theme .mv-prod-check:last-child { border-bottom: none; }
.mv-theme .mv-prod-check input[type="checkbox"] { width: 17px; height: 17px; accent-color: var(--terra); flex-shrink: 0; }
.mv-theme .mv-prod-check .pc-name { flex: 1; }
.mv-theme .mv-prod-check .pc-custo { color: var(--ink-soft); font-size: 11.5px; }


/* Botão e aviso do login (antes sem estilo) */
.mv-theme button.submit { width: 100%; padding: 13px; border: none; border-radius: 10px; background: var(--terra); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.mv-theme a.submit { padding: 13px; border-radius: 10px; background: var(--terra); color: #fff; font-size: 14px; font-weight: 600; }
.mv-theme .notice { margin-top: 18px; padding: 12px 14px; border-radius: 10px; background: var(--bg2); color: var(--ink-soft); font-size: 12px; line-height: 1.5; }

/* ===== RESPONSIVO ===== */
@media (min-width: 1100px) {
  .mv-theme .mv-wrap { max-width: 760px; }
}

/* Tablet e celular */
@media (max-width: 640px) {
  .mv-theme .mv-card { padding: 14px; border-radius: 16px; }
  /* 16px evita o zoom automático do iPhone ao tocar no campo */
  .mv-theme input[type="number"], .mv-theme input[type="text"], .mv-theme input[type="email"], .mv-theme input[type="password"] { font-size: 16px; min-height: 44px; }
  .mv-theme .mv-sim-row input[type="number"] { font-size: 16px; }
  .mv-theme .mv-prod-row input { font-size: 16px; padding: 10px; }
  .mv-theme .mv-segmented button { flex: 1 1 calc(50% - 4px); min-width: 0; font-size: 12.5px; padding: 12px 8px; }
  .mv-theme .mv-tip { width: 20px; height: 20px; font-size: 11px; }
  .mv-theme .mv-prod-check { padding: 11px 0; }
  .mv-theme .mv-prod-check input[type="checkbox"] { width: 22px; height: 22px; }
  .mv-theme button.mv-download { padding: 14px; font-size: 14px; }
  .mv-theme .mv-prod-remove { padding: 8px 0; }
  .mv-theme .mv-auth-wrap { margin: 16px auto; }
  .mv-theme .mv-auth-card { padding: 24px 18px; }
}

/* Celulares pequenos */
@media (max-width: 420px) {
  .mv-theme .mv-field-grid, .mv-theme .mv-prod-grid { grid-template-columns: 1fr; }
  .mv-theme .mv-stat .val { font-size: 18px; }
  .mv-theme .mv-total-card .val { font-size: 17px; }
  .mv-theme .mv-ring-block svg { width: 60px; height: 60px; }
  .mv-theme .mv-sim-row { flex-wrap: wrap; }
  .mv-theme .mv-sim-row .name { flex: 1 1 100%; }
  .mv-theme .mv-sim-row .fat { flex: 1; width: auto; }
  .mv-theme .mv-prod-foot { flex-wrap: wrap; gap: 6px; }
}
@media (max-width: 340px) {
  .mv-theme .mv-stat-row, .mv-theme .mv-totals { grid-template-columns: 1fr; }
  .mv-theme .mv-segmented button { flex: 1 1 100%; }
}
