/* Ofício — sistema de design (área pública + painel) */
:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f3f5f8;
  --text: #0e1b2e;
  --text-2: #4a5568;
  --text-3: #6b7689;
  --line: #e4e7ec;
  --line-strong: #cfd5de;
  --navy: #10284a;
  --navy-700: #0b1e38;
  --navy-50: #eef2f8;
  --green: #1e7a53;
  --green-50: #e9f5ef;
  --link: #1d4f91;
  --star: #e8a317;
  --ok: #1e7a53; --ok-bg: #e9f5ef;
  --warn: #9a5b00; --warn-bg: #fdf4e3;
  --bad: #b42318; --bad-bg: #fdeeec;
  --info: #1d4f91; --info-bg: #eaf1fb;
  --sidebar: #0b1e38;
  --sidebar-text: #b3bfd1;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(14, 27, 46, .04), 0 4px 16px -6px rgba(14, 27, 46, .10);
  --shadow-lg: 0 20px 40px -12px rgba(14, 27, 46, .25);
  --ring: 0 0 0 3px rgba(29, 79, 145, .35);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a111c; --surface: #111a28; --surface-2: #162133;
    --text: #e8edf4; --text-2: #b6c0cf; --text-3: #8b97a9;
    --line: #223047; --line-strong: #2e3f5a;
    --navy: #2f66b8; --navy-700: #3d76cc; --navy-50: #15233a;
    --green: #4cc38a; --green-50: #0f2a1f; --link: #8ab4f0;
    --ok: #4cc38a; --ok-bg: #0f2a1f; --warn: #f0b34a; --warn-bg: #2b2109;
    --bad: #f3837a; --bad-bg: #2d1515; --info: #8ab4f0; --info-bg: #13233b;
    --sidebar: #070d17; --ring: 0 0 0 3px rgba(138, 180, 240, .4);
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 4px 16px -6px rgba(0,0,0,.5);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; line-height: 1.2; color: var(--text); }
h1 { font-size: 28px; font-weight: 700; }
h2 { font-size: 18px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--text-2); }
.subtle { color: var(--text-3); }
.small { font-size: 13px; }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -3px; }
.icon.sm { width: 15px; height: 15px; vertical-align: -2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip:focus { top: 12px; }

/* ---------- marca ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; font-weight: 700; font-size: 18px; color: var(--text); letter-spacing: -.02em; }
.logo:hover { text-decoration: none; }
.logo-mark { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; color: #fff; background: var(--navy); }
.logo-mark .icon { width: 16px; height: 16px; }

/* ---------- botões ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--navy); color: #fff; font: 600 14px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.btn:hover { background: var(--navy-700); text-decoration: none; }
.btn:focus-visible { box-shadow: var(--ring); border-radius: var(--radius-sm); }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.secondary { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn.secondary:hover { background: var(--surface-2); }
.btn.ghost { background: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--surface-2); color: var(--text); }
.btn.success { background: var(--green); }
.btn.success:hover { filter: brightness(.92); }
.btn.danger { color: var(--bad); }
.btn.danger:hover { background: var(--bad-bg); color: var(--bad); }
.btn.danger-solid { background: var(--bad); color: #fff; }
.btn.danger-solid:hover { filter: brightness(.92); }
.btn.sm { min-height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; }
.btn.lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn.block { width: 100%; }
.btn.icon-only { width: 32px; padding: 0; }
.btn.whatsapp { background: #1f9d55; color: #fff; }
.btn.whatsapp:hover { background: #198a4a; }
.btn.loading { color: transparent !important; pointer-events: none; }
.btn.loading::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.btn.secondary.loading::after, .btn.ghost.loading::after { border-color: var(--line-strong); border-top-color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- formulários ---------- */
label { display: block; font-size: 13px; font-weight: 550; color: var(--text); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field .opt { color: var(--text-3); font-weight: 400; }
input, select, textarea { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font: 15px var(--font); transition: border-color .15s, box-shadow .15s; }
textarea { padding: 10px 12px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--text-3); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--link); box-shadow: var(--ring); }
input[aria-invalid="true"] { border-color: var(--bad); }
select { appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7689' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
select.pill { min-height: 32px; font-size: 13px; font-weight: 550; padding: 0 30px 0 12px; border-radius: 999px; width: auto; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; cursor: pointer; min-height: 44px; }
.check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--navy); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.field-err { color: var(--bad); font-size: 12px; }
.hint { font-size: 12px; color: var(--text-3); font-weight: 400; }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw button { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.msg { display: none; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; margin-bottom: 16px; }
.msg.show { display: flex; }
.msg.error { background: var(--bad-bg); color: var(--bad); }
.msg.success { background: var(--ok-bg); color: var(--ok); }

/* ---------- superfícies ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); min-height: 60px; }
.card-body { padding: 20px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 16px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12px; font-weight: 600;
  background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.s-aprovado, .s-pago, .s-concluido { background: var(--ok-bg); color: var(--ok); }
.s-pendente { background: var(--warn-bg); color: var(--warn); }
.s-enviado, .s-agendado { background: var(--info-bg); color: var(--info); }
.s-recusado, .s-cancelado { background: var(--bad-bg); color: var(--bad); }
.badge.verified { background: var(--green-50); color: var(--green); }

.stars { display: inline-flex; gap: 1px; color: var(--star); vertical-align: -2px; }
.stars svg { width: 15px; height: 15px; fill: currentColor; stroke: none; }
.stars .off { color: var(--line-strong); }
.rating { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.rating .count { color: var(--text-3); font-weight: 500; }

.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 650; font-size: 15px; color: var(--navy); background: var(--navy-50); }
.avatar.lg { width: 76px; height: 76px; font-size: 26px; border-radius: 18px; }
.avatar.sm { width: 32px; height: 32px; font-size: 12px; }

.empty { text-align: center; padding: 44px 20px; color: var(--text-2); }
.empty > .icon { width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--surface-2); color: var(--text-3); margin-bottom: 12px; stroke-width: 1.75; }
.empty h3 { margin-bottom: 4px; }
.empty .btn { margin-top: 16px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); padding: 10px 20px; background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 14px 20px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; font-size: 12px; color: var(--text-3); margin-top: 2px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.actions-cell { text-align: right; white-space: nowrap; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); font: 550 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--text-3); color: var(--text); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip .n { font-size: 12px; opacity: .75; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-input { position: relative; flex: 1 1 220px; max-width: 320px; }
.search-input .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-3); }
.search-input input { padding-left: 38px; }

/* ---------- área pública ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1160px; margin: 0 auto; height: 64px; padding: 0 24px; display: flex; align-items: center; gap: 16px; }
.site-nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.site-nav a:not(.btn) { color: var(--text-2); font-weight: 550; font-size: 14px; padding: 8px 12px; border-radius: 8px; white-space: nowrap; }
.site-nav a:not(.btn):hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.site-nav .btn { margin-left: 4px; }
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.container.narrow { max-width: 760px; }
.page { padding: 40px 0 72px; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); }
.site-footer .inner { max-width: 1160px; margin: 0 auto; padding: 28px 24px; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; color: var(--text-3); font-size: 13px; }
.site-footer nav { margin-left: auto; display: flex; gap: 20px; }
.site-footer a { color: var(--text-2); }

.landing-hero { padding: 72px 0 64px; border-bottom: 1px solid var(--line); background: var(--surface); }
.landing-hero .grid { display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--green); margin-bottom: 16px; }
.landing-hero h1 { font-size: clamp(34px, 4.4vw, 50px); font-weight: 750; letter-spacing: -.035em; line-height: 1.08; }
.landing-hero .lead { font-size: 18px; color: var(--text-2); margin-top: 18px; max-width: 520px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 30px; }
.checks { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 8px; color: var(--text-2); font-size: 14px; }
.checks li { display: flex; gap: 8px; align-items: center; }
.checks .icon { color: var(--green); }

.preview { position: relative; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.preview-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; }
.preview-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line-strong); }
.preview-bar span { margin-left: 8px; font-size: 12px; color: var(--text-3); }
.preview .kpis { grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.preview .kpi { padding: 12px 14px; }
.preview .kpi b { font-size: 18px; margin-top: 4px; }
.preview .quote-card { padding: 14px 16px; }
.preview-note { position: absolute; right: 14px; bottom: -11px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; font-size: 11px; color: var(--text-3); }

.section { padding: 72px 0; }
.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head h2 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; }
.section-head p { color: var(--text-2); margin-top: 10px; font-size: 16px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { padding: 22px; }
.feature .ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-50); color: var(--navy); margin-bottom: 14px; }
.feature p { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.steps { counter-reset: s; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { padding: 22px; }
.step::before { counter-increment: s; content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--green-50); color: var(--green); font-weight: 700; font-size: 13px; margin-bottom: 12px; }
.step p { color: var(--text-2); font-size: 14px; margin-top: 6px; }
.audience { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.audience .card { padding: 28px; display: flex; flex-direction: column; gap: 10px; }
.audience .card p { color: var(--text-2); }
.audience .card .btn { align-self: flex-start; margin-top: 8px; }
.audience .tag { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.final-cta { background: var(--navy); color: #fff; border-radius: 16px; padding: 44px; display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.final-cta h2 { color: #fff; font-size: 26px; }
.final-cta p { color: #c8d3e3; margin-top: 6px; }
.final-cta .btn { background: #fff; color: #10284a; }
.final-cta .btn:hover { background: #e9eef5; }

.auth-page { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth-side { background: #0b1e38; color: #c8d3e3; padding: 40px 48px; display: flex; flex-direction: column; }
.auth-side .logo { color: #fff; }
.auth-side .logo-mark { background: rgba(255,255,255,.12); }
.auth-side h2 { color: #fff; font-size: 26px; margin: auto 0 12px; max-width: 420px; letter-spacing: -.025em; }
.auth-side ul { list-style: none; padding: 0; margin: 12px 0 auto; display: grid; gap: 10px; }
.auth-side li { display: flex; gap: 10px; align-items: center; }
.auth-side li .icon { color: #7fd1a8; }
.auth-col { display: flex; flex-direction: column; min-height: 100vh; background: var(--surface); }
.auth-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 40px 24px; background: var(--surface); }
.auth-box { width: 100%; max-width: 400px; margin: 0 auto; }
.auth-box h1 { font-size: 26px; }
.auth-box > p.muted { margin: 8px 0 24px; }
.auth-alt { text-align: center; margin-top: 20px; font-size: 14px; color: var(--text-2); }
.auth-top { display: none; }
.legal { font-size: 12px; color: var(--text-3); margin-top: 14px; text-align: center; }

.hero { padding: 64px 0 48px; text-align: center; background: var(--surface); border-bottom: 1px solid var(--line); }
.hero h1 { font-size: clamp(30px, 4.5vw, 44px); font-weight: 750; letter-spacing: -.03em; max-width: 720px; margin: 0 auto; }
.hero .lead { font-size: 17px; color: var(--text-2); max-width: 580px; margin: 14px auto 0; }
.search-bar { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--line-strong); border-radius: 12px; padding: 6px; box-shadow: var(--shadow); max-width: 720px; margin: 28px auto 0; }
.search-bar .seg { flex: 1; display: flex; align-items: center; gap: 10px; padding: 0 12px; min-width: 0; color: var(--text-3); }
.search-bar .seg + .seg { border-left: 1px solid var(--line); }
.search-bar input { border: 0; box-shadow: none; padding: 0; min-height: 44px; background: transparent; }
.search-bar input:focus { box-shadow: none; }
.search-bar .seg:focus-within { color: var(--link); }
.results-head { display: flex; align-items: baseline; justify-content: space-between; margin: 36px 0 16px; }
.pro-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pro-card { display: flex; flex-direction: column; gap: 14px; padding: 20px; color: inherit; transition: border-color .15s, box-shadow .15s; }
.pro-card:hover { text-decoration: none; border-color: var(--line-strong); box-shadow: var(--shadow); }
.pro-card .top { display: flex; gap: 14px; align-items: center; }
.pro-card .meta { color: var(--text-2); font-size: 13px; }
.pro-card .bio { color: var(--text-2); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pro-card .foot { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); margin-top: auto; font-size: 13px; }
.pro-card .cta { color: var(--link); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }

.profile-hero { display: flex; gap: 24px; align-items: flex-start; padding: 28px; }
.profile-hero .info { flex: 1; min-width: 0; }
.profile-hero .meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--text-2); font-size: 14px; margin: 8px 0 14px; }
.profile-hero .meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-hero .bio { color: var(--text-2); max-width: 620px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.stats > div { padding: 18px 28px; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats b { display: block; font-size: 22px; letter-spacing: -.02em; }
.stats .lbl { display: block; font-size: 13px; color: var(--text-3); margin-top: 2px; }
.reviews { list-style: none; margin: 0; padding: 0; }
.review { padding: 18px 20px; border-top: 1px solid var(--line); display: flex; gap: 14px; }
.review:first-child { border-top: 0; }
.review .body { flex: 1; min-width: 0; }
.review .who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.review .who b { font-size: 14px; }
.review p { margin-top: 8px; }
.review .svc { font-size: 12px; color: var(--text-3); margin-top: 6px; }

.doc-head { padding: 24px 28px; border-bottom: 1px solid var(--line); }
.doc-head .from { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); margin-bottom: 14px; }
.doc-body table td, .doc-body table th { padding-left: 28px; padding-right: 28px; }
.doc-total { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; background: var(--surface-2); border-top: 1px solid var(--line); font-weight: 600; }
.doc-total b { font-size: 22px; letter-spacing: -.02em; }
.doc-notes { padding: 18px 28px; border-top: 1px solid var(--line); color: var(--text-2); font-size: 14px; white-space: pre-wrap; }
.doc-actions { padding: 20px 28px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.amount { font-size: 40px; font-weight: 750; letter-spacing: -.035em; margin: 6px 0 4px; }
.pix { margin-top: 20px; padding: 16px; border: 1px dashed var(--line-strong); border-radius: var(--radius); background: var(--surface-2); }
.pix code { display: block; font: 600 15px ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; margin: 8px 0 14px; color: var(--text); }
.center-card { max-width: 520px; margin: 0 auto; }

.rate { display: flex; flex-direction: row-reverse; justify-content: center; gap: 6px; margin: 8px 0 22px; }
.rate input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; }
.rate label { cursor: pointer; color: var(--line-strong); padding: 2px; border-radius: 8px; }
.rate label svg { width: 40px; height: 40px; fill: currentColor; stroke: none; display: block; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: var(--star); }
.rate input:focus-visible + label { box-shadow: var(--ring); }

/* ---------- painel ---------- */
.app-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: var(--sidebar); color: var(--sidebar-text); display: flex; flex-direction: column; padding: 20px 12px; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { color: #fff; padding: 0 10px 24px; }
.sidebar .logo-mark { background: rgba(255,255,255,.1); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 8px; background: none; color: inherit;
  font: 550 14px var(--font); cursor: pointer; text-align: left; transition: background .15s, color .15s; }
.nav button:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav button.on { background: rgba(255,255,255,.1); color: #fff; }
.nav button.on .icon { color: #7fd1a8; }
.nav button:focus-visible { box-shadow: 0 0 0 2px #8ab4f0; }
.sidebar .bottom { margin-top: auto; border-top: 1px solid rgba(255,255,255,.08); padding-top: 12px; display: grid; gap: 2px; }
.sidebar .bottom a, .sidebar .bottom button { display: flex; align-items: center; gap: 12px; min-height: 38px; padding: 0 12px; border-radius: 8px; color: inherit; font: 550 14px var(--font); background: none; border: 0; cursor: pointer; }
.sidebar .bottom a:hover, .sidebar .bottom button:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.me { display: flex; align-items: center; gap: 10px; padding: 10px 10px 2px; }
.me .avatar { background: rgba(127,209,168,.14); color: #7fd1a8; }
.me b { color: #fff; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me span { font-size: 12px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me > div { min-width: 0; }

.main { min-width: 0; }
.main-inner { max-width: 1100px; margin: 0 auto; padding: 32px 32px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head p { color: var(--text-2); margin-top: 4px; font-size: 14px; }
.mobile-top { display: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.kpi { padding: 18px 20px; }
.kpi .label { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 550; color: var(--text-2); }
.kpi .label .icon { color: var(--text-3); }
.kpi b { display: block; font-size: 26px; font-weight: 700; letter-spacing: -.03em; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--text-3); font-size: 12px; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid > .card { display: flex; flex-direction: column; }

.list { list-style: none; margin: 0; padding: 0; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 12px 20px; border-top: 1px solid var(--line); min-height: 60px; }
.list-item:first-child { border-top: 0; }
.list-item .amt { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.date-chip { width: 46px; flex: none; text-align: center; border-radius: 10px; background: var(--navy-50); color: var(--navy); padding: 5px 0; line-height: 1.1; }
.date-chip b { display: block; font-size: 17px; }
.date-chip span { font-size: 11px; text-transform: uppercase; font-weight: 600; }
.list-empty { padding: 28px 20px; text-align: center; color: var(--text-3); font-size: 14px; }

.onboarding { padding: 20px; margin-bottom: 16px; }
.onboarding .progress { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: 12px 0 16px; }
.onboarding .progress i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.tasks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tasks li { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: 14px; }
.tasks li .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; }
.tasks li.done { color: var(--text-3); }
.tasks li.done .dot { background: var(--green); border-color: var(--green); color: #fff; }
.tasks button { all: unset; cursor: pointer; color: var(--link); font-weight: 550; }
.tasks button:focus-visible { box-shadow: var(--ring); border-radius: 4px; }

.share { display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; margin: 14px 0; }
.share a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.quote-card { padding: 18px 20px; }
.quote-card + .quote-card { margin-top: 12px; }
.quote-card .head { display: flex; align-items: flex-start; gap: 12px; }
.quote-card .title { font-weight: 600; font-size: 15px; }
.quote-card .price { font-weight: 700; font-size: 16px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quote-card .actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.review-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--navy-50); color: var(--navy); font-size: 13px; font-weight: 550; }
.review-cta.done { background: var(--ok-bg); color: var(--ok); }
.alert { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); font-size: 14px; margin-bottom: 16px; }
.alert button { all: unset; cursor: pointer; font-weight: 650; text-decoration: underline; }

.rating-summary { display: grid; grid-template-columns: 220px 1fr; gap: 24px; padding: 24px; align-items: center; }
.rating-summary .big { font-size: 44px; font-weight: 750; letter-spacing: -.04em; line-height: 1; }
.bars { display: grid; gap: 6px; }
.bars div { display: grid; grid-template-columns: 28px 1fr 32px; gap: 10px; align-items: center; font-size: 13px; color: var(--text-2); }
.bars i { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.bars i b { display: block; height: 100%; background: var(--star); border-radius: 999px; }

.items-head, .item-row { display: grid; grid-template-columns: 1fr 72px 120px 36px; gap: 8px; align-items: center; }
.items-head { font-size: 12px; color: var(--text-3); font-weight: 600; margin-bottom: 6px; }
.item-row { margin-bottom: 8px; }
.total-line { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--surface-2); margin: 6px 0 16px; font-size: 14px; }
.total-line b { font-size: 18px; font-variant-numeric: tabular-nums; }

dialog { border: 0; padding: 0; border-radius: 14px; background: var(--surface); color: var(--text); width: min(560px, calc(100vw - 24px)); box-shadow: var(--shadow-lg); max-height: calc(100vh - 32px); }
dialog.sm { width: min(420px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(8, 15, 28, .55); }
dialog .d-head { display: flex; align-items: center; gap: 8px; padding: 18px 24px 0; }
dialog .d-body { padding: 18px 24px 4px; }
dialog .d-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 14px 14px; flex-wrap: wrap; }
dialog .d-body > p { color: var(--text-2); margin-bottom: 14px; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(16px); opacity: 0; display: flex; align-items: center; gap: 10px; background: var(--text); color: var(--surface);
  padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 550; box-shadow: var(--shadow-lg); transition: .2s; z-index: 50; pointer-events: none; max-width: calc(100vw - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--bad); color: #fff; }
.toast .icon { color: #7fd1a8; }
.toast.error .icon { color: #fff; }

.skeleton { height: 120px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface-2), var(--line), var(--surface-2)); background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- responsivo ---------- */
@media (max-width: 1024px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .landing-hero .grid { grid-template-columns: 1fr; gap: 40px; }
  .features, .steps { grid-template-columns: 1fr 1fr; }
  .tasks { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .auth-page { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-top { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
  .auth-main { justify-content: flex-start; padding-top: 32px; }
  .audience { grid-template-columns: 1fr; }
  .rating-summary { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  h1 { font-size: 24px; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; inset: auto 0 0 0; height: auto; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); z-index: 20; flex-direction: row; }
  .sidebar .logo, .sidebar .bottom { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav button { flex-direction: column; gap: 3px; min-height: 56px; padding: 0 2px; font-size: 10.5px; flex: 1; justify-content: center; text-align: center; min-width: 0; }
  .nav button .icon { width: 20px; height: 20px; }
  .mobile-top { display: flex; align-items: center; gap: 4px; height: 56px; padding: 0 8px 0 16px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
  .mobile-top .logo { margin-right: auto; font-size: 17px; }
  .mobile-top .btn { width: 44px; min-height: 44px; }
  .main-inner { padding: 20px 16px 100px; }
  .page-head > .btn, .page-head > a.btn { width: 100%; }
  .kpis { gap: 10px; }
  .kpi { padding: 14px; }
  .kpi b { font-size: 20px; }
  .btn.sm { min-height: 40px; }
  .btn.icon-only { width: 40px; }
  .chip { min-height: 40px; }
  select.pill { min-height: 40px; }
  .search-input { max-width: none; }

  /* tabelas viram cards */
  table.responsive thead { display: none; }
  table.responsive, table.responsive tbody, table.responsive tr, table.responsive td { display: block; width: 100%; }
  table.responsive tr { padding: 14px 16px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; }
  table.responsive tr:last-child { border-bottom: 0; }
  table.responsive td { padding: 0; border: 0; text-align: left; width: auto; }
  table.responsive td.primary { grid-column: 1; }
  table.responsive td.num { grid-column: 2; grid-row: 1; text-align: right; }
  table.responsive td[data-label]::before { content: attr(data-label) ": "; color: var(--text-3); font-size: 12px; }
  table.responsive td.actions-cell { grid-column: 1 / -1; display: flex; gap: 4px; align-items: center; flex-wrap: wrap; margin-top: 4px; }

  .site-header .inner { padding: 0 16px; gap: 8px; }
  .site-nav a:not(.btn) { font-size: 13px; padding: 6px 8px; }
  .site-nav .hide-sm { display: none; }
  .container { padding: 0 16px; }
  .landing-hero { padding: 40px 0 48px; }
  .cta-row .btn { flex: 1 1 100%; }
  .features, .steps { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 24px; }
  .final-cta { padding: 28px; }
  .final-cta .btn { width: 100%; }
  .preview .kpis { grid-template-columns: 1fr 1fr; }
  .preview .kpis .kpi:last-child { display: none; }
  .hero { padding: 40px 0 32px; }
  .search-bar { flex-direction: column; align-items: stretch; padding: 8px; }
  .search-bar .seg + .seg { border-left: 0; border-top: 1px solid var(--line); }
  .search-bar .btn { margin-top: 6px; }
  .profile-hero { flex-direction: column; padding: 22px; gap: 16px; }
  .profile-hero .btn { width: 100%; }
  .stats > div { padding: 14px 16px; }
  .stats b { font-size: 18px; }
  .form-grid { grid-template-columns: 1fr; }
  .doc-head, .doc-total, .doc-notes, .doc-actions { padding-left: 20px; padding-right: 20px; }
  .doc-body table td, .doc-body table th { padding-left: 16px; padding-right: 16px; }
  .doc-actions .btn { flex: 1 1 100%; }
  .items-head, .item-row { grid-template-columns: 1fr 52px 84px 40px; gap: 6px; }
  .amount { font-size: 34px; }
  .site-footer nav { margin-left: 0; }
  dialog .d-head, dialog .d-body, dialog .d-foot { padding-left: 18px; padding-right: 18px; }
}
