:root {
    --green: #1fa855;
    --green-dark: #128c4a;
    --teal: #075e54;
    --bg: #f3f5f4;
    --card: #ffffff;
    --text: #1d2420;
    --muted: #5e6b64;
    --border: #e1e6e3;
    --danger: #c0392b;
    --radius: 14px;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); line-height: 1.5; }
h1 { font-size: 1.6rem; margin: 0 0 .5rem; line-height: 1.25; }
h2 { font-size: 1.15rem; margin: 0 0 1rem; }
h3 { font-size: 1rem; margin: 0 0 .25rem; }
p { margin: 0 0 1rem; }

.topbar { background: var(--teal); color: #fff; padding: 14px 16px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.15rem; display: inline-flex; align-items: center; gap: 8px; }
.brand-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--green); display: grid; place-items: center; }

.container { max-width: 1080px; margin: 0 auto; padding: 24px 16px 48px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
.narrow { max-width: 480px; margin: 40px auto; }
.center { text-align: center; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: .85rem; margin-top: .4rem; }
.error { color: var(--danger); font-size: .9rem; margin: .5rem 0 1rem; }

.btn { display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid var(--border); background: #fff; color: var(--text); font-size: 1rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn-primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn-primary:hover { background: var(--green-dark); }
.btn-block { width: 100%; margin-top: 1rem; }
.link { background: none; border: 0; padding: 0; color: var(--green-dark); font: inherit; cursor: pointer; text-decoration: underline; }

/* Cadastro */
.signup { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.signup-form { position: sticky; top: 16px; }
.signup.is-login { grid-template-columns: minmax(0, 420px); justify-content: center; }
.signup.is-login .steps { display: none; }
label { display: block; font-weight: 600; margin-bottom: .4rem; }
.phone-input { display: flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.phone-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 168, 85, .15); }
.ddi { padding: 12px; background: #f0f3f1; color: var(--muted); font-weight: 600; }
.phone-input input { flex: 1; min-width: 0; border: 0; padding: 12px; font-size: 1.1rem; outline: none; }
.back { margin-bottom: 1rem; text-decoration: none; }
.code-input { width: 100%; border: 1px solid var(--border); border-radius: 10px; padding: 12px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 1.8rem; letter-spacing: .4em; text-align: center; outline: none; }
.code-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(31, 168, 85, .15); }

.code-box { border: 2px dashed var(--border); border-radius: var(--radius); padding: 24px 12px; text-align: center; margin: 1rem 0 .25rem; }
.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: clamp(1.8rem, 8vw, 2.6rem); font-weight: 700; letter-spacing: .12em; color: var(--teal); }
.copy { margin-top: .5rem; font-size: .9rem; }
.loading { color: var(--muted); display: inline-flex; gap: 10px; align-items: center; }
.waiting { margin-top: 1rem; padding: 12px; border-radius: 10px; background: #eaf7ef; color: var(--green-dark); font-size: .92rem; display: flex; gap: 10px; align-items: center; }
.qr-alt { margin-top: 1rem; }
.qr-alt summary { cursor: pointer; color: var(--green-dark); font-weight: 600; }
.qr-alt img { display: block; max-width: 240px; width: 100%; margin: .5rem auto 0; }
.check { width: 64px; height: 64px; margin: 0 auto 1rem; border-radius: 50%; background: var(--green); color: #fff; font-size: 2rem; display: grid; place-items: center; }

.step-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 20px; }
.step { display: grid; grid-template-columns: 140px 1fr; gap: 16px; align-items: center; }
.step img { width: 140px; height: auto; border-radius: 16px; box-shadow: 0 6px 18px rgba(0, 0, 0, .1); background: #fff; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }
.step-number { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--green); color: #fff; font-size: .85rem; font-weight: 700; margin-bottom: .35rem; }

.spinner { width: 18px; height: 18px; border: 3px solid rgba(31, 168, 85, .25); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--green); animation: pulse 1.4s ease-in-out infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 50% { opacity: .25; } }

/* Painel */
.dashboard { display: grid; gap: 20px; max-width: 760px; margin: 0 auto; }
.account-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.badge { padding: 4px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: #fdecea; color: var(--danger); white-space: nowrap; }
.badge-connected { background: #eaf7ef; color: var(--green-dark); }
.import-banner { display: flex; gap: 10px; align-items: center; padding: 12px; border-radius: 10px; background: #eaf7ef; color: var(--green-dark); margin: 1rem 0; font-size: .92rem; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 1rem; }
.stat { background: var(--bg); border-radius: 10px; padding: 16px; text-align: center; }
.stat strong { display: block; font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .85rem; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--border); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: #dfe8e3; display: grid; place-items: center; font-weight: 700; color: var(--teal); }

/* Menu */
.topbar { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; position: sticky; top: 0; z-index: 20; padding-top: max(14px, env(safe-area-inset-top)); }
.topbar .brand { margin-right: auto; }
.topbar-actions { display: flex; align-items: center; gap: 4px; order: 2; }
.icon-btn { position: relative; display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: #fff; cursor: pointer; text-decoration: none; }
.icon-btn:hover, .icon-btn.active { background: rgba(255, 255, 255, .14); }
.icon-btn:focus-visible, .nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.icon-badge { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ff5a4e; color: #fff; font-size: .7rem; font-weight: 700; line-height: 18px; text-align: center; box-shadow: 0 0 0 2px var(--teal); }
.menu-toggle { display: none; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; order: 1; }
.nav a { color: rgba(255, 255, 255, .85); text-decoration: none; padding: 6px 12px; border-radius: 8px; font-weight: 600; font-size: .95rem; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a.active { background: rgba(255, 255, 255, .18); color: #fff; }
@media (max-width: 820px) {
    .topbar { padding-top: max(8px, env(safe-area-inset-top)); padding-bottom: 8px; }
    .menu-toggle { display: grid; }
    .nav { order: 3; display: none; flex-direction: column; flex-wrap: nowrap; width: 100%; gap: 2px; padding: 6px 0 4px; border-top: 1px solid rgba(255, 255, 255, .15); }
    .menu-open .nav { display: flex; }
    .nav a { padding: 12px; font-size: 1.05rem; border-radius: 10px; }
}

/* Menu inferior (celular) */
.tabbar { display: none; }
@media (max-width: 820px) {
    body:has(.tabbar) { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
    .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; align-items: stretch; height: calc(64px + env(safe-area-inset-bottom)); padding: 0 6px env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0, 0, 0, .06); }
    .tab { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--muted); text-decoration: none; font-size: .7rem; font-weight: 600; }
    .tab > span:not(.tab-home-btn) { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tab.active { color: var(--teal); }
    .tab:focus-visible { outline: 2px solid var(--teal); outline-offset: -4px; border-radius: 10px; }
    .tab-home { position: relative; }
    .tab-home-btn { position: absolute; top: -22px; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 0 0 5px var(--card), 0 6px 14px rgba(18, 140, 74, .35); }
    .tab-home.active .tab-home-btn, .tab-home:hover .tab-home-btn { background: var(--green-dark); }
}

/* Páginas internas */
.page { display: grid; gap: 20px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.page-head p { max-width: 620px; margin: 0; }
.small { font-size: .85rem; }
.btn-sm { padding: 6px 12px; font-size: .85rem; border-radius: 8px; }
.btn-ghost { border-color: transparent; color: var(--muted); }
.flash { padding: 12px 16px; border-radius: 10px; background: #eaf7ef; color: var(--green-dark); font-weight: 600; }
.badge-off { background: var(--bg); color: var(--muted); }
.badge-proposed { background: #fff4de; color: #9a6400; }
.badge-cancelled { background: var(--bg); color: var(--muted); }
.badge-confirmed { background: #eaf7ef; color: var(--green-dark); }

/* Miniapps */
.miniapp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.miniapp { display: flex; flex-direction: column; }
.miniapp-on { border-color: var(--green); }
.miniapp-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: .5rem; }
.miniapp-head h2 { margin: 0; }
.miniapp-actions { display: flex; gap: 8px; margin-top: auto; }

/* Agenda */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label { font-size: .85rem; margin: 0; }
.form-grid input, .form-grid textarea { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; }
.form-grid .full { grid-column: 1 / -1; }
.label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.hours { width: 100%; border-collapse: collapse; }
.hours td { padding: 3px 4px 3px 0; }
.hours tr.off td:not(:first-child) { opacity: .4; }
.hours input[type=time] { margin-top: 0; }
.check-label { display: flex; gap: 8px; align-items: center; font-weight: 400; white-space: nowrap; }
.form-grid .check-label input { display: inline; width: auto; margin: 0; }
.slots { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.slot { padding: 4px 10px; border: 1px solid var(--border); border-radius: 999px; background: #fff; font: inherit; font-size: .85rem; cursor: pointer; }
.slot:hover, .slot.active { border-color: var(--green); background: #eaf7ef; color: var(--green-dark); }
.form-grid select { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; background: #fff; }
.form-page { max-width: 640px; margin: 0 auto; width: 100%; }
.contact-picker { display: flex; gap: 8px; align-items: flex-start; }
.contact-search { position: relative; flex: 1; min-width: 0; }
.contact-search input { margin-top: 0; }
.contact-results { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 5; list-style: none; margin: 0; padding: 4px; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(0, 0, 0, .12); max-height: 280px; overflow-y: auto; }
.contact-results li { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; cursor: pointer; font-weight: 400; }
.contact-results li:hover, .contact-results li.active { background: var(--bg); }
.contact-results .empty { cursor: default; color: var(--muted); }
.contact-chosen { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--green); border-radius: 10px; background: #eaf7ef; flex: 1; min-width: 0; font-weight: 400; }
.contact-chosen span:nth-child(2) { flex: 1; min-width: 0; }
.btn-icon { width: 42px; height: 42px; padding: 0; font-size: 1.4rem; line-height: 1; flex: none; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; }
.modal { border: 0; border-radius: var(--radius); padding: 24px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 20px 48px rgba(0, 0, 0, .25); }
.modal::backdrop { background: rgba(0, 0, 0, .4); }
.modal h2 { margin-bottom: .5rem; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-head h2 { margin: 0; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--border); border-left: 1px solid var(--border); }
.cal-wd { padding: 6px; font-size: .78rem; font-weight: 700; color: var(--muted); text-align: center; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg); }
.cal-day { min-height: 92px; padding: 4px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-out { background: #fafbfa; }
.cal-out .cal-num { color: #b3bcb7; }
.cal-num { font-size: .8rem; font-weight: 600; color: var(--muted); }
.cal-today .cal-num { background: var(--green); color: #fff; border-radius: 999px; width: 22px; height: 22px; display: grid; place-items: center; }
.cal-ev { font-size: .74rem; line-height: 1.25; padding: 2px 5px; border-radius: 5px; background: #eaf7ef; color: var(--green-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-ev-proposed { background: #fff4de; color: #9a6400; }
.appt-list { list-style: none; margin: 0; padding: 0; }
.appt { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); align-items: center; }
.appt-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.appt-cancelled .appt-title strong { text-decoration: line-through; color: var(--muted); }
.appt-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.cal-ev { text-decoration: none; display: block; }
.cal-ev:hover { filter: brightness(.95); }
.appt-link { color: inherit; text-decoration: none; }
.appt-link:hover { text-decoration: underline; }

.appt-toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.appt-sheet { display: grid; gap: 20px; }
.sheet-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.sheet-head h1 { margin: 2px 0 0; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; margin: 0; }
.sheet-grid dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.sheet-grid dd { margin: 2px 0 0; }
.sheet-section h2 { font-size: 1rem; margin-bottom: .5rem; }
.pre { white-space: pre-wrap; margin: 0; }
.chat { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; background: var(--bg); border-radius: 10px; }
.chat li { max-width: 80%; padding: 6px 10px; border-radius: 10px; background: var(--card); border: 1px solid var(--border); word-break: break-word; }
.chat li.me { align-self: flex-end; background: #dcf8c6; border-color: #c8e8b0; }
.chat-meta { display: block; font-size: .72rem; color: var(--muted); }
.history { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.history li { font-size: .92rem; padding-left: 12px; border-left: 2px solid var(--border); }

@media print {
    @page { margin: 14mm; }
    body { background: #fff; }
    .topbar, .tabbar, .no-print { display: none !important; }
    .container { max-width: none; padding: 0; }
    .appt-sheet { border: 0; padding: 0; }
    .badge, .chat, .chat li { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .chat li { break-inside: avoid; }
}

@media (max-width: 820px) {
    .signup { grid-template-columns: 1fr; }
    .signup-form { position: static; }
}
@media (max-width: 480px) {
    .card { padding: 18px; }
    .step { grid-template-columns: 96px 1fr; }
    .step img { width: 96px; }
    .stats { grid-template-columns: 1fr; }
    .cal-day { min-height: 56px; }
    .cal-ev { font-size: 0; padding: 0; height: 6px; }
    .appt { flex-direction: column; align-items: flex-start; }
    .appt-actions { justify-content: flex-start; }
}

.assistant-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 16px; align-items: start; }
.style-form { margin-top: 16px; }
.style-form textarea { font-size: .92rem; line-height: 1.45; }
.check-box { align-items: flex-start; white-space: normal; padding: 12px; border: 1px solid var(--border); border-radius: 10px; }
.form-grid .check-box input { margin-top: 4px; }
@media (max-width: 820px) {
    .assistant-grid { grid-template-columns: 1fr; }
}

/* Pagamentos */
.checkout .card { display: grid; gap: 16px; }
.checkout-head { text-align: center; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.checkout-amount { font-size: 2.2rem; font-weight: 800; color: var(--teal); line-height: 1.2; margin: 4px 0; }
.checkout-done h1 { font-size: 1.3rem; }
.checkout-done p { margin: 0; }
.pix { display: grid; gap: 8px; }
.pix-qr { width: 220px; max-width: 100%; margin: 0 auto; display: block; }
.pix-code { width: 100%; resize: none; padding: 10px; border: 1px solid var(--border); border-radius: 10px; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .8rem; word-break: break-all; background: var(--bg); }
.pix .btn-block { margin-top: 0; }
.pix .hint { margin: 0; }
.checkout-message { padding: 12px; border-radius: 10px; font-weight: 600; font-size: .92rem; }
.checkout-message.ok { background: #eaf7ef; color: var(--green-dark); }
.checkout-message.fail { background: #fdecea; color: var(--danger); }
.charge-form { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.charge-form label { font-size: .85rem; margin: 0; }
.charge-form input, .charge-form select { display: block; margin-top: 4px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; font-weight: 400; background: #fff; }
.charge-form input { width: 120px; }
.mp-connect { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.mp-connect strong { margin-right: 6px; }

.service-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.service-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.service-card:hover, .service-card:focus-visible { border-color: var(--green); box-shadow: 0 4px 16px rgba(0, 0, 0, .06); }
.service-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; font-size: 1.05rem; }
.service-price { font-weight: 700; color: var(--green-dark); white-space: nowrap; }
.service-desc { margin: 0; color: var(--text); }
.service-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger-zone { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-color: #f2c4bf; }
.danger-zone h2 { margin-bottom: .25rem; }
.danger-zone p { margin: 0; }

/* Ajuda: ícone "?" ao lado dos títulos, abre a explicação numa janela */
.help-btn { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; padding: 0; border: 1.5px solid currentColor; border-radius: 50%; background: transparent; color: var(--muted); font: 700 .8rem/1 system-ui, sans-serif; vertical-align: middle; cursor: pointer; opacity: .8; }
.help-btn:hover, .help-btn:focus-visible { color: var(--green-dark); opacity: 1; }
h1 .help-btn { width: 24px; height: 24px; font-size: .85rem; position: relative; top: -2px; }
.help-body p { margin: 0 0 .75rem; color: var(--text); }
.help-modal .form-actions { justify-content: flex-end; }

/* Contatos */
.contacts-search { display: flex; gap: 8px; }
.contacts-search input { flex: 1; min-width: 0; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; }
.contact-list li:has(.contact-row) { padding: 0; }
.contact-row { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 0; color: inherit; text-decoration: none; }
.contact-row:hover strong { text-decoration: underline; }
.contact-row-text { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.contact-row .avatar { flex: none; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 12px; }

/* Contador de valor e métricas */
.stats-4 { grid-template-columns: repeat(4, 1fr); margin-top: 0; }
.stats-4 .stat strong { font-size: 1.4rem; overflow-wrap: anywhere; }
.value-foot { margin: 12px 0 0; }
.reply-quote { margin: 4px 0; padding: 4px 8px; border-left: 3px solid var(--border); color: var(--text); }
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-tabs a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--card); color: var(--muted); text-decoration: none; font-size: .9rem; font-weight: 600; }
.filter-tabs a.active { border-color: var(--green); background: #eaf7ef; color: var(--green-dark); }
.metric-table { width: 100%; border-collapse: collapse; }
.metric-table th, .metric-table td { text-align: left; padding: 10px 8px; border-top: 1px solid var(--border); vertical-align: top; }
.metric-table th { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; border-top: 0; }
.metric-ok { color: var(--green-dark); font-weight: 700; }
.metric-bad { color: var(--danger); font-weight: 700; }
.caveats { margin: 0; padding-left: 1.2rem; display: grid; gap: 8px; }
@media (max-width: 820px) {
    .stats-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .stats-4 { grid-template-columns: repeat(2, 1fr); }
    .metric-table th:nth-child(3), .metric-table td:nth-child(3) { display: none; }
}
.summary-preview { background: var(--bg); border-radius: 10px; padding: 12px; }

/* Primeiros passos */
.checklist { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: center; }
.checklist li.done span:last-child { color: var(--muted); text-decoration: line-through; }
.check-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; }
.checklist li.done .check-dot { background: var(--green); border-color: var(--green); }
.niche-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.niche-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; padding: 18px; color: inherit; text-decoration: none; }
.niche-card:hover, .niche-card:focus-visible { border-color: var(--green); }
.niche-icon { font-size: 1.8rem; line-height: 1; }
.niche-services { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.niche-services li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.niche-services li.off { opacity: .55; }
.niche-fields { display: flex; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; align-items: center; }
.niche-fields input { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font: inherit; }
.niche-fields > input { flex: 1 1 160px; min-width: 0; }
.niche-fields label { display: flex; gap: 4px; align-items: center; margin: 0; font-weight: 400; }
.niche-fields label input { width: 84px; }
.risk-note { margin-top: 1rem; font-size: .85rem; color: var(--muted); }
.risk-note summary { cursor: pointer; font-weight: 600; color: var(--text); }
.risk-note ul { margin: .5rem 0 0; padding-left: 1.1rem; display: grid; gap: 4px; }

/* Equipe */
.team-card summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; list-style: none; }
.team-card summary::-webkit-details-marker { display: none; }
.team-card summary::after { content: '›'; margin-left: auto; color: var(--muted); transition: transform .15s; }
.team-card[open] summary::after { transform: rotate(90deg); }
.team-card[open] summary { margin-bottom: 14px; }
.check-list { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.check-list legend { font-weight: 600; margin-bottom: 6px; padding: 0; }

/* Pets */
.pet-list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; }
.pet-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pet-form { margin-top: 8px; }
.size-prices summary { cursor: pointer; font-weight: 600; }
.size-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 10px; }
@media (max-width: 520px) { .size-grid { grid-template-columns: 1fr; } }

/* Entregáveis digitais e histórico de pagamentos */
.deliverables-box { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; display: grid; gap: 10px; margin: 0; min-width: 0; }
.deliverables-box legend { font-weight: 700; padding: 0 6px; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.file-list { list-style: none; margin: 0 0 12px; padding: 0; }
.file-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.file-upload { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.file-upload input[type=file] { max-width: 100%; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.filter-row .btn.active { background: var(--teal); color: #fff; border-color: var(--teal); }
.pager { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; }
.delivery-box { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; }
.appt-actions form { display: flex; margin: 0; }

/* Catálogo de fotos */
.photo-grid { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.photo-grid li { display: grid; gap: 6px; justify-items: center; }
.photo-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); background: var(--bg, #f3f4f6); }

/* Assinatura */
.billing-banner { display: block; max-width: 760px; margin: 0 auto 16px; padding: 12px 16px; border-radius: 10px; background: #fff7e0; border: 1px solid #f3d27a; color: #6b4e00; text-decoration: none; font-size: .95rem; }
.billing-banner-off { background: #fdecec; border-color: #f1b0b0; color: #8a1f1f; }
.billing-status p { margin: 10px 0 0; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.plan-card { display: grid; gap: 4px; padding: 16px 40px 16px 16px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; position: relative; }
.plan-card input { position: absolute; top: 14px; right: 14px; }
.plan-card:has(input:checked) { border-color: var(--teal); box-shadow: 0 0 0 2px rgba(10, 94, 84, .15); }
.plan-name { font-weight: 700; }
.plan-price { font-size: 1.5rem; font-weight: 800; }
.plan-price small { font-size: .9rem; font-weight: 500; color: var(--muted); }

/* Termos e privacidade */
.legal { max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h2 { font-size: 1.15rem; margin: 28px 0 8px; }
.legal ul { padding-left: 20px; }
.legal li { margin-bottom: 6px; }
.terms-check { align-items: flex-start; margin: 4px 0 12px; }
.terms-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 16px; }
.terms-card p { margin: 4px 0 0; }
.caveats-card summary { cursor: pointer; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.caveats-card[open] summary { margin-bottom: 8px; }
