/* Birth Reviews · painel do cliente */
:root {
  --brand: #6d5ce8;
  --brand-hover: #5e4ddb;
  --brand-soft: #efecfd;
  --text: #18181b;
  --muted: #6b6b76;
  --line: #e4e4ea;
  --bg: #f6f6f8;
  --panel: #ffffff;
  --ok: #1f7a4d;
  --ok-soft: #e8f6ee;
  --err: #b42318;
  --err-soft: #fdecea;
  --warn: #7a5600;
  --warn-soft: #fff7e0;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: Manrope, system-ui, sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Estilos de texto */
.heading-2 { font-size: 48px; line-height: 48px; font-weight: 600; }
.heading-4 { font-size: 30px; line-height: 36px; font-weight: 600; text-wrap: balance; }
.heading-5 { font-size: 24px; line-height: 32px; font-weight: 600; text-wrap: balance; }
.heading-6 { font-size: 20px; line-height: 28px; font-weight: 600; text-wrap: balance; }
.title-2 { font-size: 18px; line-height: 28px; font-weight: 500; }
.title-3 { font-size: 16px; line-height: 24px; font-weight: 500; }
.title-4 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-5 { font-size: 14px; line-height: 20px; font-weight: 500; }
.body-6 { font-size: 14px; line-height: 20px; font-weight: 400; text-wrap: pretty; }
.button-md { font-size: 16px; line-height: 24px; font-weight: 600; }
.button-sm { font-size: 14px; line-height: 20px; font-weight: 600; }
.caption-3 { font-size: 12px; line-height: 16px; font-weight: 600; }
.caption-4 { font-size: 12px; line-height: 16px; font-weight: 500; }
.caption-5 { font-size: 12px; line-height: 16px; font-weight: 400; }
.muted { color: var(--muted); }
.accent { color: var(--brand); }
.center { text-align: center; }
.link { color: var(--brand); text-decoration: none; }
.link:hover { text-decoration: underline; }

.skip { position: absolute; left: 16px; top: -48px; background: var(--text); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 50; text-decoration: none; }
.skip:focus { top: 12px; }

/* Ícones e botões */
.ic { width: 18px; height: 18px; flex: none; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 8px 12px; border-radius: 8px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .3s var(--ease), background-color .3s var(--ease), border-color .3s var(--ease), opacity .3s var(--ease); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--brand-hover); }
.btn.ghost { background: var(--panel); border-color: var(--line); }
.btn.ghost:hover:not(:disabled) { background: var(--bg); }
.btn.block { width: 100%; }
.btn.icon-only { padding: 8px; }
.btn.danger:hover { color: var(--err); border-color: #f3c5c0; background: var(--err-soft); }
.btn.is-loading { opacity: .7; pointer-events: none; }

/* Marca */
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; min-width: 0; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 600; font-size: 18px; flex: none; }

/* Alertas */
.alert { padding: 12px 16px; border-radius: 12px; border: 1px solid transparent; }
.alert-success { background: var(--ok-soft); color: var(--ok); border-color: #c4e8d3; }
.alert-error { background: var(--err-soft); color: var(--err); border-color: #f3c5c0; }
.alert-info { background: var(--brand-soft); color: #4b3cc4; border-color: #ddd7fb; }
.page > .alert { margin-bottom: 16px; }

/* Formulários */
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 4px; }
.input { width: 100%; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 16px; line-height: 24px; transition: border-color .3s var(--ease), box-shadow .3s var(--ease); }
.input:hover { border-color: #cfcfd8; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.input.is-invalid { border-color: var(--err); }
.field-error { color: var(--err); }
.check { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; }
.check input { margin-top: 2px; accent-color: var(--brand); width: 16px; height: 16px; flex: none; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Telas de acesso */
.auth-body { align-items: center; justify-content: center; padding: 40px 16px; gap: 24px; }
.auth-wrap { width: 100%; display: flex; justify-content: center; }
.auth-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 32px; display: grid; gap: 16px; }
.auth-card.wide { max-width: 640px; }
.auth-card.center { justify-items: center; text-align: center; }
.auth-card > .brand { margin-bottom: 8px; }
.auth-legal { display: flex; gap: 8px; color: var(--muted); }
.auth-legal a { color: var(--muted); text-decoration: none; }
.auth-legal a:hover { color: var(--text); }
.prose h2 { margin-top: 8px; }

/* Instalador */
.checks { list-style: none; display: grid; gap: 8px; }
.checks li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 8px 12px; border-radius: 8px; background: var(--bg); }
.checks li.ok { background: var(--ok-soft); }
.checks li.bad { background: var(--err-soft); }
.checks li.warn { background: var(--warn-soft); }
.checks .full { flex-basis: 100%; }

/* Topo do painel */
.topbar { position: sticky; top: 12px; z-index: 20; padding: 0 16px; margin-top: 12px; }
.topbar-in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 24px; padding: 8px 8px 8px 16px; border: 1px solid var(--line); border-radius: 16px; background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.mainnav { display: flex; gap: 4px; flex: 1; }
.mainnav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); text-decoration: none; transition: background-color .3s var(--ease), color .3s var(--ease); }
.mainnav a:hover { color: var(--text); background: var(--bg); }
.mainnav a.is-active { color: var(--brand); background: var(--brand-soft); }
.logout { display: flex; align-items: center; gap: 12px; }

/* Página */
.page { flex: 1; width: 100%; max-width: 1120px; margin: 0 auto; padding: 40px 16px 64px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 32px; }
.page-head p { margin-top: 8px; }
.foot { max-width: 1120px; width: 100%; margin: 0 auto; padding: 24px 16px 32px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; color: var(--muted); }
.foot a { color: var(--muted); text-decoration: none; }
.foot a:hover { color: var(--text); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 24px; display: grid; gap: 16px; align-content: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

/* Aviso do Google */
.notice { display: flex; align-items: center; gap: 16px; padding: 16px 24px; margin-bottom: 24px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.notice > div { flex: 1 1 240px; }
.notice-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; flex: none; }

/* Lista de widgets */
.cards { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.wcard { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 8px; display: grid; gap: 8px; transition: border-color .3s var(--ease), transform .5s var(--ease); }
.wcard:hover { border-color: #cfc8f7; transform: translateY(-2px); }
.wcard-main { display: flex; gap: 16px; align-items: center; padding: 8px; border-radius: 8px; text-decoration: none; }
.wcard-text { display: grid; gap: 2px; min-width: 0; }
.wname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wcard-actions { display: flex; gap: 8px; padding: 0 8px 8px; flex-wrap: wrap; }
.wcard-actions form { display: contents; }
.wcard-actions .btn.icon-only:first-of-type { margin-left: auto; }

.wthumb { width: 88px; height: 64px; flex: none; border-radius: 8px; background: var(--bg); display: grid; gap: 4px; padding: 8px; }
.wthumb i { display: block; border-radius: 4px; background: var(--a); opacity: .85; }
.wthumb.lay-carousel { grid-template-columns: repeat(3, 1fr); }
.wthumb.lay-grid { grid-template-columns: repeat(3, 1fr); grid-template-rows: 1fr 1fr; }
.wthumb.lay-grid i:nth-child(n) { opacity: .7; }
.wthumb.lay-list { grid-template-rows: repeat(3, 1fr); }
.wthumb.lay-badge { align-content: end; }
.wthumb.lay-badge i { width: 40px; height: 12px; }
.wthumb.lay-badge i + i { display: none; }

/* Estado vazio */
.empty-state { display: grid; justify-items: center; text-align: center; gap: 12px; padding: 64px 24px; background: var(--panel); border: 1px dashed var(--line); border-radius: 16px; }
.empty-ic { width: 48px; height: 48px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; }
.empty-ic .ic { width: 24px; height: 24px; }

/* Diálogo de confirmação */
.dialog { margin: auto; border: 0; border-radius: 16px; padding: 24px; max-width: 420px; width: calc(100% - 32px); box-shadow: 0 24px 64px rgba(0, 0, 0, .2); color: var(--text); }
.dialog::backdrop { background: rgba(24, 24, 27, .4); }
.dialog p { margin-bottom: 24px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.dialog .btn.danger-solid { background: var(--err); color: #fff; }
.dialog .btn.danger-solid:hover { background: #962015; }

@media (max-width: 720px) {
  .topbar-in { gap: 8px; padding-left: 12px; }
  .topbar .brand .title-3, .logout .who, .logout .btn span { display: none; }
  .mainnav a { padding: 8px; }
  .grid-2 { grid-template-columns: 1fr; }
  .page { padding-top: 32px; }
  .page-head .btn { width: 100%; }
  .page-head form { width: 100%; }
  .notice { flex-wrap: wrap; }
  .auth-card { padding: 24px; }
  .cards { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .2s !important; }
  .wcard:hover { transform: none; }
}

/* ---------- Etapa 3: Google, perfis e administração ---------- */
.mt { margin-top: 16px; }
.text-error { color: var(--err); }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.notice-error { border-color: #f3c5c0; background: var(--err-soft); }
.notice-error .notice-ic { background: #fff; color: var(--err); }
.places { margin-bottom: 24px; }
.place-list { list-style: none; display: grid; gap: 8px; }
.place-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; }
.place-info { display: grid; gap: 2px; min-width: 0; }
.place-actions { display: flex; gap: 8px; }
.disconnect { display: block; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--err); cursor: pointer; text-decoration: underline; }
.loc-list { list-style: none; display: grid; gap: 8px; }
.loc { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; transition: border-color .3s var(--ease), background-color .3s var(--ease); }
.loc > span:not(.pill) { display: grid; gap: 2px; flex: 1; min-width: 0; }
.loc:hover { background: var(--bg); }
.loc:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.loc.is-added { cursor: default; opacity: .8; }
.loc input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.seg-links { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 16px; width: fit-content; }
.seg-links a { padding: 4px 12px; border-radius: 8px; text-decoration: none; color: var(--muted); }
.seg-links a.is-active { background: var(--brand-soft); color: var(--brand); }
.copy-line { display: block; padding: 8px 12px; background: var(--bg); border-radius: 8px; font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; line-height: 16px; padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.input-sm { padding: 4px 8px; font-size: 14px; line-height: 20px; width: auto; }
.alert-action { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
