/* Casa Arcana — folha de estilo principal.
   As cores vêm da marca (variáveis definidas no <head> do layout). */

*, *::before, *::after { box-sizing: border-box; }
:root {
  --line: color-mix(in srgb, var(--accent) 32%, transparent);
  --line-soft: color-mix(in srgb, var(--ink) 14%, transparent);
  --ink-soft: color-mix(in srgb, var(--ink) 72%, var(--bg));
  --paper-ink: var(--bg);
  --paper-soft: color-mix(in srgb, var(--bg) 68%, var(--paper));
  --radius: 4px;
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 18px; line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; }
img, svg { max-width: 100%; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 400; line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.005em; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.2rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
small, .small { font-size: .86rem; }
.muted { color: var(--ink-soft); }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 720px; }
.prose { max-width: 66ch; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }

/* ---------- cabeçalho ---------- */
.site-header { border-bottom: 1px solid var(--line); background: var(--bg); position: sticky; top: 0; z-index: 30; }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 1.3rem; }
.brand img, .brand svg { height: 40px; width: auto; display: block; }
.brand:hover { text-decoration: none; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { color: var(--ink); text-decoration: none; padding: 8px 12px; border-radius: var(--radius); font-size: .98rem; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--surface); }
.nav form { margin: 0; }
.nav-toggle { display: none; }
@media (max-width: 860px) {
  .nav-toggle { display: block; position: relative; }
  .nav-toggle summary { list-style: none; cursor: pointer; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius); line-height: 0; }
  .nav-toggle summary::-webkit-details-marker { display: none; }
  .nav-toggle[open] summary { background: var(--surface); }
  .nav-desktop { display: none; }
  .nav-mobile { position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; flex-direction: column; align-items: stretch; min-width: 220px; box-shadow: 0 18px 40px rgba(0,0,0,.35); }
  .nav-mobile a, .nav-mobile button { padding: 12px 14px; }
}
@media (min-width: 861px) { .nav-mobile { display: none; } }

/* ---------- botões e formulários ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 1rem; font-weight: 600; line-height: 1.2;
  padding: 13px 22px; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg); text-decoration: none; cursor: pointer;
  transition: background .15s, color .15s, transform .15s;
}
.btn:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn.is-loading { opacity: .6; cursor: progress; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--surface); }
.btn-small { padding: 8px 14px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-danger { background: transparent; color: #e7a39a; border-color: color-mix(in srgb, #e7a39a 45%, transparent); }
.linklike { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; text-underline-offset: 3px; }

label { display: block; font-size: .95rem; margin-bottom: 6px; color: var(--ink); }
.field { margin-bottom: 18px; }
.field .hint { font-size: .84rem; color: var(--ink-soft); margin-top: 6px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=url], input[type=search], select, textarea {
  width: 100%; font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; min-height: 48px;
}
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--ink) 45%, transparent); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); flex: none; }
.row { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
fieldset { border: 0; padding: 0; margin: 0 0 18px; }
legend { font-family: var(--display); font-size: 1.15rem; margin-bottom: 12px; padding: 0; }

/* escolha em “pílulas” (questionário) */
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { margin: 0; }
.choices input { position: absolute; opacity: 0; pointer-events: none; }
.choices span { display: inline-block; padding: 9px 16px; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .95rem; transition: background .15s; }
.choices input:checked + span { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.choices input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- avisos ---------- */
.flash-stack { margin: 18px auto 0; }
.flash { padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); margin-bottom: 10px; font-size: .97rem; }
.flash-error { border-color: #b8645a; background: color-mix(in srgb, #b8645a 18%, var(--surface)); }
.flash-success { border-color: var(--second); background: color-mix(in srgb, var(--second) 18%, var(--surface)); }

/* ---------- página inicial ---------- */
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(48px, 7vw, 88px); }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero h1 { max-width: 15ch; }
.hero p.lead { font-size: 1.18rem; max-width: 46ch; color: var(--ink-soft); }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 28px; }
.hero-table { position: relative; aspect-ratio: 5 / 4; }
.hero-table .tcard { position: absolute; width: 34%; aspect-ratio: 3 / 5; perspective: 900px; }
.hero-table .tcard:nth-child(1) { left: 2%; top: 14%; transform: rotate(-7deg); }
.hero-table .tcard:nth-child(2) { left: 33%; top: 2%; z-index: 2; }
.hero-table .tcard:nth-child(3) { left: 64%; top: 14%; transform: rotate(7deg); }
.hero-table .tcard .pos { position: absolute; left: 0; right: 0; bottom: -34px; text-align: center; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 860px) { .hero .wrap { grid-template-columns: 1fr; } .hero-table { max-width: 440px; margin: 0 auto 30px; width: 100%; } }

.flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .9s cubic-bezier(.2,.7,.2,1); }
.flip.is-up { transform: rotateY(180deg); }
.flip > .side { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.flip > .side svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 18px rgba(0,0,0,.35)); }
.flip > .front { transform: rotateY(180deg); }
.flip.is-reversed > .front svg { transform: rotate(180deg); }

.section { padding: clamp(48px, 8vw, 96px) 0; border-top: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 36px; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; counter-reset: s; border-left: 1px solid var(--line); }
.steps li { list-style: none; padding: 4px 24px 8px; border-right: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s); display: block; font-family: var(--display); font-size: 2.4rem; color: var(--accent); line-height: 1; margin-bottom: 14px; }
.steps h3 { font-size: 1.15rem; }
.steps p { color: var(--ink-soft); font-size: .98rem; margin: 0; }
.steps { padding: 0; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr 1fr; row-gap: 28px; } }
@media (max-width: 520px) { .steps { grid-template-columns: 1fr; } }

/* mapas das tiragens */
.spread-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 28px 32px; }
.spread-item h3 { margin-top: 14px; }
.spread-item p { color: var(--ink-soft); font-size: .97rem; }
.spread-map { position: relative; background: var(--surface); border-radius: var(--radius); height: 170px; }
.spread-map i { position: absolute; width: 22px; height: 36px; border: 1px solid var(--accent); border-radius: 3px; background: color-mix(in srgb, var(--accent) 12%, transparent); font-style: normal; font-size: .7rem; display: grid; place-items: center; color: var(--ink); }
.tag { display: inline-block; font-size: .78rem; padding: 2px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-soft); vertical-align: middle; }
.tag-accent { border-color: var(--accent); color: var(--accent); }

/* ---------- planos ---------- */
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.plan { padding: 30px 26px; border-right: 1px solid var(--line); display: flex; flex-direction: column; background: var(--bg); }
.plan:last-child { border-right: 0; }
.plan.is-highlight { background: var(--surface); }
.plan h3 { font-size: 1.4rem; margin-bottom: 4px; }
.plan .price { font-family: var(--display); font-size: 2.3rem; line-height: 1; margin: 18px 0 4px; }
.plan .price small { font-family: var(--body); font-size: 1rem; color: var(--ink-soft); }
.plan ul { padding: 0; margin: 18px 0 26px; list-style: none; flex: 1; }
.plan li { padding: 7px 0 7px 22px; position: relative; font-size: .97rem; border-top: 1px solid var(--line-soft); }
.plan li::before { content: ""; position: absolute; left: 2px; top: 15px; width: 8px; height: 8px; transform: rotate(45deg); background: var(--accent); }
.plan .pay-with { font-size: .82rem; color: var(--ink-soft); margin-top: 10px; text-align: center; }
@media (max-width: 760px) { .plan { border-right: 0; border-bottom: 1px solid var(--line); } }
.plan-group-title { margin: 48px 0 16px; }

/* ---------- painéis ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3.5vw, 32px); }
.panel + .panel { margin-top: 20px; }
.page { padding: clamp(32px, 6vw, 64px) 0 80px; }
.page-title { margin-bottom: 28px; }
.page-title p { color: var(--ink-soft); max-width: 60ch; }
.auth-box { max-width: 460px; margin: 0 auto; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 28px; align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr !important; } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 18px; margin: 0; }
.kv dt { color: var(--ink-soft); }
.kv dd { margin: 0; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.list-plain li:first-child { border-top: 0; }

/* tabelas */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
th { font-weight: 600; color: var(--ink-soft); font-size: .86rem; }
.status { display: inline-block; font-size: .8rem; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.status-paid, .status-active, .status-done { border-color: var(--second); color: color-mix(in srgb, var(--second) 70%, var(--ink)); }
.status-pending, .status-in_progress, .status-awaiting_payment, .status-past_due { border-color: var(--accent); color: var(--accent); }
.status-failed, .status-canceled, .status-expired, .status-refunded { color: var(--ink-soft); }

/* ---------- questionário ---------- */
.intake { max-width: 760px; }
.intake-steps { display: flex; gap: 6px; margin-bottom: 26px; padding: 0; list-style: none; }
.intake-steps li { flex: 1; height: 3px; background: var(--line-soft); border-radius: 2px; }
.intake-steps li.on { background: var(--accent); }
.intake .step { display: none; }
.intake .step.on, .no-js .intake .step { display: block; }
.intake .step-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 26px; }
.qbox textarea { font-size: 1.15rem; min-height: 150px; font-family: var(--body); }
.counter { text-align: right; font-size: .82rem; color: var(--ink-soft); margin-top: 4px; }
.tip { font-size: .95rem; color: var(--ink-soft); border-left: 2px solid var(--accent); padding: 2px 0 2px 14px; margin: 14px 0; }

/* ---------- escolha das cartas ---------- */
.understood { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px; margin-bottom: 30px; }
@media (max-width: 860px) { .understood { grid-template-columns: 1fr; } }
.understood ul { margin: 0; padding-left: 18px; }
.understood li { margin-bottom: 6px; }
.slots { display: flex; gap: 10px; flex-wrap: wrap; margin: 18px 0 24px; }
.slot { width: 74px; text-align: center; font-size: .72rem; color: var(--ink-soft); line-height: 1.25; }
.slot .ph { width: 74px; aspect-ratio: 3 / 5; border: 1px dashed var(--line); border-radius: 6px; margin-bottom: 6px; display: grid; place-items: center; font-family: var(--display); color: var(--accent); }
.slot.filled .ph { border-style: solid; border-color: var(--accent); background: var(--surface); }
.deck {
  --w: clamp(46px, 7.5vw, 74px);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(calc(var(--w) * .55), 1fr));
  padding: 18px 18px 18px calc(var(--w) * .45 + 18px); row-gap: 12px;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--surface) 92%, var(--accent) 8%), var(--bg) 78%);
  border: 1px solid var(--line); border-radius: 10px;
}
.deck button { all: unset; width: var(--w); aspect-ratio: 3 / 5; margin-left: calc(var(--w) * -.45); cursor: pointer; transition: transform .18s ease; position: relative; }
.deck button img { width: 100%; height: 100%; display: block; filter: drop-shadow(-3px 3px 4px rgba(0,0,0,.4)); }
.deck button:hover, .deck button:focus-visible { transform: translateY(-10px); z-index: 2; }
.deck button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.deck button.taken { transform: translateY(-14px); opacity: .25; pointer-events: none; }
.deck-actions { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-top: 22px; }
.shuffle-note { font-size: .92rem; color: var(--ink-soft); }
.deck.shuffling button { animation: riffle .55s ease both; }
@keyframes riffle { 0% { transform: translateX(0); } 40% { transform: translateX(calc(var(--d, 1) * 14px)) rotate(calc(var(--d, 1) * 3deg)); } 100% { transform: none; } }

/* ---------- mesa (resultado) ---------- */
.table-felt { background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--surface) 90%, var(--accent) 10%), var(--bg) 80%); border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px, 4vw, 40px) 12px clamp(28px, 4vw, 44px); }
.board { position: relative; margin: 0 auto; }
.board .slotcard { position: absolute; display: block; text-decoration: none; color: var(--ink); }
.board .slotcard .flip { aspect-ratio: 3 / 5; height: auto; }
.board .slotcard .num { position: absolute; top: -10px; left: -10px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: .78rem; font-weight: 700; display: grid; place-items: center; z-index: 3; }
.board .slotcard.crossing { z-index: 2; }
.board .slotcard.crossing .num { top: auto; bottom: -10px; left: auto; right: -10px; }
.board .label { position: absolute; left: -10%; right: -10%; top: calc(100% + 6px); text-align: center; font-size: .72rem; line-height: 1.2; color: var(--ink-soft); }
.board .slotcard.crossing .label { display: none; }

/* folha de leitura (papel) */
.sheet { background: var(--paper); color: var(--paper-ink); border-radius: var(--radius); padding: clamp(22px, 5vw, 56px); margin-top: 28px; box-shadow: 0 20px 50px rgba(0,0,0,.28); }
.sheet a { color: color-mix(in srgb, var(--accent) 55%, var(--paper-ink)); }
.sheet h2, .sheet h3 { color: var(--paper-ink); }
.sheet .q { font-family: var(--display); font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.35; margin: 0 0 6px; }
.sheet .meta { font-size: .9rem; color: color-mix(in srgb, var(--paper-ink) 65%, var(--paper)); }
.sheet section { padding: 28px 0; border-top: 1px solid color-mix(in srgb, var(--paper-ink) 15%, transparent); }
.sheet section:first-of-type { border-top: 0; }
.sheet p { max-width: 68ch; line-height: 1.7; }
.reading-card { display: grid; grid-template-columns: 96px 1fr; gap: 20px; padding: 20px 0; border-top: 1px solid color-mix(in srgb, var(--paper-ink) 12%, transparent); scroll-margin-top: 90px; }
.reading-card:first-child { border-top: 0; }
.reading-card .mini svg { width: 96px; height: auto; display: block; filter: drop-shadow(0 4px 8px rgba(0,0,0,.18)); }
.reading-card .mini.rev svg { transform: rotate(180deg); }
.reading-card h3 { margin: 0 0 2px; font-size: 1.2rem; }
.reading-card .pos { font-size: .88rem; color: color-mix(in srgb, var(--paper-ink) 65%, var(--paper)); margin: 0 0 8px; }
.reading-card .kw { font-size: .88rem; font-style: italic; color: color-mix(in srgb, var(--paper-ink) 70%, var(--paper)); margin: 0 0 8px; }
.reading-card p { margin: 0; }
@media (max-width: 520px) { .reading-card { grid-template-columns: 64px 1fr; gap: 14px; } .reading-card .mini svg { width: 64px; } }
.verdict { display: inline-block; font-family: var(--display); font-size: 1.5rem; padding: 6px 18px; border: 1px solid currentColor; border-radius: 999px; margin-bottom: 14px; }
.understood-sheet { font-size: .95rem; }

/* galeria de cartas */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 22px 18px; }
.gallery a { color: var(--ink); text-decoration: none; font-size: .9rem; text-align: center; display: block; }
.gallery a svg { display: block; width: 100%; height: auto; margin-bottom: 8px; transition: transform .2s; }
.gallery a:hover svg { transform: translateY(-4px); }
.card-page { display: grid; grid-template-columns: 300px 1fr; gap: clamp(24px, 5vw, 56px); align-items: start; }
.card-page .art svg { width: 100%; height: auto; filter: drop-shadow(0 14px 26px rgba(0,0,0,.4)); }
@media (max-width: 760px) { .card-page { grid-template-columns: 1fr; } .card-page .art { max-width: 240px; margin: 0 auto; } }
.meaning h2 { font-size: 1.35rem; margin-top: 1.6em; }

/* pix */
.pix { display: grid; grid-template-columns: 260px 1fr; gap: 28px; align-items: start; }
.pix .qr { background: #fff; padding: 14px; border-radius: var(--radius); }
.pix .qr img { display: block; width: 100%; height: auto; }
.copy-box { display: flex; gap: 8px; }
.copy-box input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
@media (max-width: 680px) { .pix { grid-template-columns: 1fr; } .pix .qr { max-width: 260px; } }
.wait { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); }
.wait::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); border-right-color: transparent; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* consultas */
.contact-card { border: 1px solid var(--accent); border-radius: var(--radius); padding: 22px; }
.contact-card .btn { margin-top: 8px; }

/* ---------- rodapé ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 34px; margin-top: 40px; font-size: .92rem; color: var(--ink-soft); }
.site-footer .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer a { color: var(--ink); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .disclaimer { grid-column: 1 / -1; border-top: 1px solid var(--line-soft); padding-top: 18px; font-size: .84rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

.support-box { border-left: 3px solid var(--accent); padding-left: 20px; }
.empty { padding: 36px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }

/* sem animação ao reabrir uma leitura salva */
.no-anim .flip { transition: none; }
.board .slotcard.crossing .flip { transform-origin: 50% 50%; }

/* ---------- painel administrativo ---------- */
.admin { display: grid; grid-template-columns: 230px 1fr; min-height: 100vh; }
.admin-side { background: var(--surface); border-right: 1px solid var(--line); padding: 22px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .brand { font-size: 1.1rem; margin: 0 8px 22px; }
.admin-side nav a { display: block; color: var(--ink); text-decoration: none; padding: 9px 12px; border-radius: var(--radius); font-size: .95rem; }
.admin-side nav a:hover, .admin-side nav a[aria-current] { background: var(--bg); }
.admin-side nav .sep { margin: 14px 12px 6px; font-size: .78rem; color: var(--ink-soft); }
.admin-main { padding: 28px clamp(16px, 3vw, 40px) 60px; min-width: 0; }
.admin-main h1 { font-size: 1.9rem; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 22px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 26px; }
.stats div { padding: 18px 20px; border-right: 1px solid var(--line); }
.stats div:last-child { border-right: 0; }
.stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 1.7rem; }
.stats span { font-size: .85rem; color: var(--ink-soft); }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--ink-soft); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current] { color: var(--ink); border-color: var(--accent); }
.checks li { display: flex; gap: 10px; align-items: baseline; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; }
.dot.ok { background: var(--second); } .dot.no { background: #c46a5e; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; background: var(--bg); border: 1px solid var(--line-soft); padding: 8px 10px; border-radius: var(--radius); word-break: break-all; display: block; }
.inline-form { display: inline; }
.color-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.color-row input[type=color] { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); padding: 3px; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 90px; border-bottom: 1px solid var(--line); }
.bars i { flex: 1; background: var(--accent); min-height: 2px; border-radius: 2px 2px 0 0; }
.preview-logo { max-height: 56px; background: var(--bg); padding: 8px; border-radius: var(--radius); border: 1px solid var(--line); }
@media (max-width: 900px) { .admin { grid-template-columns: 1fr; } .admin-side { position: static; height: auto; } .admin-side nav { display: flex; flex-wrap: wrap; gap: 2px; } .admin-side nav .sep { display: none; } }
.panel :is(input:not([type]), input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea) { background-color: var(--bg); }

/* Calendário e histórico de cortesias: componentes novos no visual original. */
.membership { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.membership-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.membership-heading h3 { font-size: 1.2rem; margin: 0; }
.membership-form { display: grid; grid-template-columns: minmax(155px,.7fr) minmax(160px,1fr); gap: 12px 16px; margin-top: 18px; }
.membership-form .field { margin: 0; }
.membership-form button { justify-self: start; }
.membership-form > p { grid-column: 1/-1; margin: 0; }
.gift-box { padding-top: 20px; }
.gift-box summary { cursor: pointer; color: var(--accent); font-weight: 600; }
.gift-box form { margin-top: 22px; }
.benefit-history { list-style: none; padding: 0; font-size: .86rem; }
.benefit-history li { padding: 14px 0; border-bottom: 1px solid var(--line-soft); overflow-wrap: anywhere; }

@media (max-width:620px) {
 .membership-form { grid-template-columns:1fr; }
 .membership-heading { align-items:start; }
 .kv { grid-template-columns:1fr; gap:2px; }
 .kv dd { margin-bottom:12px; overflow-wrap:anywhere; }
}
/* Navegação recolhida em tablets, preservando a composição original no desktop. */
@media (min-width:861px) and (max-width:1160px) {
 .nav-desktop { display:none; }
 .nav-toggle { display:block;position:relative; }
 .nav-toggle summary { list-style:none;cursor:pointer;padding:10px;border:1px solid var(--line);border-radius:4px;line-height:0; }
 .nav-toggle summary::-webkit-details-marker { display:none; }
 .nav-mobile { display:flex;position:absolute;right:0;top:calc(100% + 10px);background:var(--surface);border:1px solid var(--line);border-radius:4px;padding:10px;flex-direction:column;align-items:stretch;min-width:240px;box-shadow:0 18px 40px rgba(0,0,0,.35); }
}

/* páginas de texto (Painel → Páginas) */
.text-page h2 { margin-top: 2.2em; }
.text-page h3 { margin-top: 1.6em; }
.text-page ul, .text-page ol { padding-left: 1.3em; }
.text-page li { margin: .35em 0; }
.text-page hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.text-page .page-updated { margin-top: 3em; }
.disclaimer.company { margin-top: 4px; }