@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap; src: url(fonts/manrope-400.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap; src: url(fonts/manrope-600.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap; src: url(fonts/manrope-700.woff2) format("woff2"); }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap; src: url(fonts/manrope-800.woff2) format("woff2"); }
/* Conta e painel admin do LetraCerta: mesmo idioma do programa.
   Neutro escuro, terracota só na ação principal e no estado ativo. Sem degradê, sem brilho, sem caixa alta. */
:root {
  --bg: #131211; --side: #0f0e0d; --surface: #191817; --raised: #22201e; --hover: #2b2826;
  --line: #262422; --line-2: #363230;
  --text: #efebe7; --text-2: #b4ada7; --muted: #857e78;
  --accent: #c4573a; --accent-hover: #d2644a; --accent-text: #e88f75; --accent-weak: rgba(196, 87, 58, .14);
  --amber: #e0a33a; --amber-text: #ecc277; --red: #e5534b; --red-text: #f19a94;
  --font: "Manrope", "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --display: "Manrope", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent-text); text-underline-offset: 3px; }
b, strong { font-weight: 600; }
h1 { font: 600 22px/1.2 var(--display); letter-spacing: -.015em; margin: 0 0 20px; }
h2 { font: 600 14px/1.3 var(--font); color: var(--text); margin: 0 0 12px; }
h3 { font: 600 15px/1.3 var(--display); margin: 18px 0 8px; }
code, pre { font-family: "Cascadia Mono", Consolas, ui-monospace, monospace; font-size: 12.5px; color: var(--text); }
code { background: var(--raised); border: 1px solid var(--line-2); border-radius: 5px; padding: 2px 6px; }
pre { background: var(--side); border: 1px solid var(--line); border-radius: 8px; padding: 10px; white-space: pre-wrap; }
small { display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: auto; }
.narrow { width: min(400px, 100%); display: flex; flex-direction: column; gap: 14px; padding: 26px 26px 22px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.brand b { font: 800 16px var(--display); letter-spacing: -.03em; }
.brand small { font-size: 12px; }
.mark { width: 28px; height: 28px; border-radius: 7px; flex: none; display: block; }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 500; font-size: 13px; color: var(--text-2); }
label.check { flex-direction: row; align-items: center; gap: 8px; margin: 10px 0; color: var(--text); }
label.check input { accent-color: var(--accent); width: 16px; height: 16px; }
.input { height: 36px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--side); color: var(--text); padding: 0 11px; font: 14px var(--font); outline: none; width: 100%; }
.input::placeholder { color: #5e5853; }
.input:focus { border-color: var(--accent); }
select.input option { background: var(--raised); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 7px; border: 1px solid var(--line-2); background: var(--raised); color: var(--text); cursor: pointer; font: 500 13.5px var(--font); text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.danger { background: none; color: var(--red-text); }
.btn.danger:hover { border-color: var(--red); }
.btn.ghost { background: none; border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--raised); color: var(--text); }
.btn.sm { height: 30px; padding: 0 11px; font-size: 13px; }
.btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn:disabled { opacity: .5; pointer-events: none; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.row.between { justify-content: space-between; align-items: center; }
.row > label { flex: 1 1 150px; }
.row > label.grow { flex: 3 1 240px; }
.err { color: var(--red-text); min-height: 1em; margin: 0; font-size: 13px; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 4px; }
.tag.g { color: var(--accent-text); }
.tag.a { color: var(--amber-text); }
.tag.r { color: var(--red-text); }
.note { padding: 10px 12px; border-radius: 7px; background: var(--raised); border-left: 2px solid var(--line-2); color: var(--text-2); margin-bottom: 16px; font-size: 13.5px; }
.note b { color: var(--text); }
.note.ok { border-left-color: var(--accent); }
.note.warn { border-left-color: var(--amber); }

/* painel admin */
.layout { display: grid; grid-template-columns: 208px 1fr; min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 18px 12px 14px; display: flex; flex-direction: column; background: var(--side); }
.side .brand { padding: 0 8px; }
.side nav { display: flex; flex-direction: column; gap: 1px; margin-top: 18px; }
.side nav button { text-align: left; height: 34px; padding: 0 10px; border-radius: 7px; border: 0; background: none; color: var(--text-2); font: 500 14px var(--font); cursor: pointer; }
.side nav button:hover { background: var(--surface); color: var(--text); }
.side nav button.on { background: var(--raised); color: var(--text); }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 0 8px; font-size: 12px; color: var(--muted); word-break: break-all; }
main { padding: 32px 36px; max-width: 1180px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 16px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.stat span { color: var(--muted); font-size: 12.5px; }
.stat b { display: block; font: 600 22px/1.3 var(--display); font-variant-numeric: tabular-nums; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12.5px; font-weight: 500; }
tbody tr:hover { background: var(--raised); }
td { font-variant-numeric: tabular-nums; }
.li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }

/* planos e conta */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.plan-card { display: flex; flex-direction: column; gap: 4px; background: var(--side); border-color: var(--line-2); }
.plan-card .price { font: 600 26px/1.3 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.plan-card.cur { border-color: var(--accent); }
.copy { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.meter { height: 6px; background: var(--hover); border-radius: 999px; overflow: hidden; margin: 10px 0 8px; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 999px; }

#toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; z-index: 50; }
.toast { padding: 10px 14px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line-2); border-left: 2px solid var(--line-2); max-width: 360px; box-shadow: 0 8px 24px rgba(0,0,0,.45); }
.toast.err { border-left-color: var(--red); }
.toast.ok { border-left-color: var(--accent); }
@media (max-width: 760px) {
  .layout { grid-template-columns: 1fr; }
  .side { border-right: 0; border-bottom: 1px solid var(--line); }
  .side nav { flex-direction: row; flex-wrap: wrap; }
  main { padding: 20px 16px; }
}

/* celular: campo com menos de 16 px faz o iPhone dar zoom ao tocar, e a página passa a deslizar pros lados */
html, body { overflow-x: clip; }
p, li, td, dd, label, small, .note { overflow-wrap: break-word; }
@media (max-width: 760px) {
  .input, select, textarea { font-size: 16px; }
}
@media (max-width: 420px) {
  .btn { white-space: normal; height: auto; min-height: 36px; padding-top: 8px; padding-bottom: 8px; text-align: center; line-height: 1.3; }
  .btn.lg { min-height: 46px; }
}

/* Pix (checkout e Minha conta) */
.pix-box { display: flex; gap: 20px; flex-wrap: wrap; align-items: flex-start; margin-top: 4px; }
.pix-qr { width: 208px; height: 208px; background: #fff; padding: 8px; border-radius: 12px; flex: none; }
.pix-side { flex: 1 1 220px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.pix-amount { font-size: 22px; }
.pix-code-l { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.pix-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12px; word-break: break-all; resize: none; }
.pix-status { margin: 0; font-size: 13px; }
.pix-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 4px; animation: pixpulse 1.2s ease-in-out infinite; }
@keyframes pixpulse { 50% { opacity: .25; } }
@media (max-width: 520px) { .pix-qr { width: 100%; height: auto; max-width: 260px; margin: 0 auto; } }
