/* ==========================================================================
   Síndico em Dia — sistema visual
   Conceito: "planta do prédio". Uma barra lateral azul-marinho com a trama
   discreta de uma prancheta técnica é o único elemento de destaque; o resto é
   calmo, alinhado e com números tabulares, para transmitir ordem e confiança.
   ========================================================================== */
:root {
  --canvas: #f2f4f7;
  --surface: #ffffff;
  --ink: #0f1e2e;
  --ink-2: #334155;
  --muted: #5e6c7e;
  --line: #e2e7ee;
  --line-2: #eef1f5;
  --navy: #0e2a47;
  --gold: #f2b33d;
  --font-display: "Sora", "IBM Plex Sans", system-ui, sans-serif;
  --navy-2: #163a60;
  --blue: #1d5fd1;
  --blue-ink: #164baa;
  --blue-50: #ebf2ff;
  --green: #0e8a5f;
  --green-50: #e6f5ef;
  --amber: #a86400;
  --amber-50: #fff4e2;
  --red: #c2352b;
  --red-50: #fdeceb;
  /* compatibilidade com nomes antigos usados nas telas */
  --brand: var(--blue);
  --brand-soft: var(--blue-50);
  --brand-ink: #fff;
  --accent: #d9822b;
  --red-soft: var(--red-50);
  --amber-soft: var(--amber-50);
  --green-soft: var(--green-50);
  --bg: var(--canvas);
  --card: var(--surface);

  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --shadow-1: 0 1px 2px rgba(15, 30, 46, .06);
  --shadow-2: 0 1px 2px rgba(15, 30, 46, .05), 0 8px 24px -12px rgba(15, 30, 46, .18);
  --shadow-3: 0 24px 64px -16px rgba(15, 30, 46, .35);
  --sb-w: 256px;
  --focus: 0 0 0 3px rgba(29, 95, 209, .28);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 15px/1.55 "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-ink); }
h1, h2, h3 { margin: 0; color: var(--ink); line-height: 1.25; }
h1 { font-size: 26px; font-weight: 700; letter-spacing: -.015em; }
h2 { font-size: 17px; font-weight: 600; letter-spacing: -.005em; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num, .stat b, .when, .kpis b, .rtable .num, .rsummary b { font-variant-numeric: tabular-nums; }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -4px; }
.ic.sm { width: 16px; height: 16px; vertical-align: -3px; }
.ic.lg { width: 24px; height: 24px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

/* ---------- estrutura ---------- */
.app { min-height: 100vh; }
.sidebar { display: none; }
.mtop {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  height: 56px; padding: 0 16px; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.mtop .brand { display: flex; align-items: center; gap: 10px; color: var(--navy); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.mtop .grow { flex: 1; }
.iconbtn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--ink-2); background: none; border: 0; cursor: pointer; }
.iconbtn:hover { background: var(--line-2); color: var(--ink); }
.iconbtn .count, .sb-link .count { position: absolute; top: 4px; right: 3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.avatar { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--blue-50); color: var(--blue-ink); font-weight: 700; font-size: 13px; flex: none; }

.view { max-width: 1160px; margin: 0 auto; padding: 20px 16px calc(96px + env(safe-area-inset-bottom)); }
body.public .view { padding-bottom: 32px; }

.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; display: flex; background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(10px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 9px 0 10px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
.tabbar a .ic { width: 22px; height: 22px; }
.tabbar a.on { color: var(--blue); }
.tabbar a.on .ic { stroke-width: 2.2; }

@media (min-width: 1024px) {
  .mtop, .tabbar { display: none !important; }
  .app { display: grid; grid-template-columns: var(--sb-w) 1fr; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
    color: #c9d6e6; background-color: var(--navy);
    /* fundo liso: azul da marca com um leve brilho dourado no topo e degradê suave até a base */
    background-image:
      radial-gradient(140% 30% at 0% 0%, rgba(242, 179, 61, .10), transparent 65%),
      linear-gradient(180deg, #11304f 0%, var(--navy) 40%, #0a2036 100%);
    border-right: 1px solid rgba(255, 255, 255, .06);
    scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.2) transparent;
  }
  .view { padding: 28px 40px 48px; width: 100%; }
  body.public .app { display: block; }
  body.public .sidebar { display: none; }
}

/* ---------- barra lateral ---------- */
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 22px 20px 18px; color: #fff; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.sb-brand img { border-radius: 8px; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.sb-link { position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: #c9d6e6; font-size: 14.5px; font-weight: 500; }
.sb-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-link.on { background: rgba(255, 255, 255, .12); color: #fff; box-shadow: inset 3px 0 0 var(--gold); }
.sb-link .count { position: static; margin-left: auto; }
.sb-link .tag { margin-left: auto; font-size: 11.5px; font-weight: 600; color: #ffd28a; }
.sb-section { margin: 18px 12px 0; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sb-label { padding: 0 12px 8px; font-size: 12px; font-weight: 600; color: #8ea4bd; letter-spacing: .01em; }
.sb-switch {
  width: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); color: #fff; font: inherit; font-weight: 600; cursor: pointer; text-align: left;
}
.sb-switch:hover { background: rgba(255, 255, 255, .12); }
.sb-switch span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-switch small { display: block; font-weight: 400; font-size: 12px; color: #9fb3c9; }
.sb-group { padding: 10px 12px 4px; font-size: 11.5px; color: #8ea4bd; }
.sb-foot { margin-top: auto; padding: 12px; border-top: 1px solid rgba(255, 255, 255, .1); }
.sb-me { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; color: #fff; }
.sb-me:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.sb-me .avatar { background: rgba(255, 255, 255, .14); color: #fff; }
.sb-me small { display: block; color: #9fb3c9; font-size: 12px; }
.popover {
  position: fixed; z-index: 60; min-width: 260px; max-height: 60vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow-3); padding: 6px;
}
.popover a { display: flex; flex-direction: column; padding: 9px 12px; border-radius: 8px; color: var(--ink); font-weight: 500; }
.popover a small { color: var(--muted); font-weight: 400; }
.popover a:hover, .popover a.on { background: var(--line-2); }

/* ---------- cabeçalho de página ---------- */
.crumbs { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); font-weight: 500; }
.crumbs a:hover { color: var(--blue); }
.crumbs .ic { width: 14px; height: 14px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head .sub { color: var(--muted); margin-top: 4px; font-size: 14px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; color: var(--muted); }
.back:hover { color: var(--blue); }

/* ---------- utilidades de layout ---------- */
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.between { justify-content: space-between; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cols { display: grid; gap: 16px; }
@media (min-width: 1024px) { .cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: start; } }
.wrap-text { white-space: normal !important; }

/* ---------- superfícies ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-1); }
.pad { padding: 18px; }
@media (min-width: 760px) { .pad { padding: 22px; } }

/* ---------- indicadores ---------- */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stats.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 760px) { .stats.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .stats > :nth-child(3):last-child { grid-column: span 2; } }
.stat { position: relative; display: flex; flex-direction: column-reverse; gap: 4px; padding: 14px 16px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); }
.stat b { font-size: 22px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stats.four .stat b { font-size: 20px; }
.stat span { font-size: 13px; color: var(--muted); }
.stat::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--line); }
.stat.red::before { background: var(--red); } .stat.red b { color: var(--red); }
.stat.amber::before { background: #e3a008; } .stat.amber b { color: var(--amber); }
.stat.green::before { background: var(--green); } .stat.green b { color: var(--green); }
a.stat:hover { border-color: #c8d3e1; }

/* ---------- títulos de seção ---------- */
.section-title { display: flex; align-items: center; gap: 8px; margin: 28px 0 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.section-title .ic { color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ---------- listas ---------- */
.list { list-style: none; margin: 0; padding: 0; overflow: hidden; }
.item { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px 14px 18px; border-bottom: 1px solid var(--line-2); }
.item:last-child { border-bottom: 0; }
.list.card .item:hover, .item[data-tx]:hover, .item[data-occ]:hover, .item[data-k]:hover, .item[data-s]:hover { background: #f8fafc; }
.item .when { text-align: right; white-space: nowrap; font-size: 13px; color: var(--ink-2); }
.item a.title { color: var(--ink); font-weight: 600; display: block; }
.item a.title:hover { color: var(--blue); }
.item .sub { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.item.unread::after { content: ""; position: absolute; right: 10px; top: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.bar { position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.bar.vencida { background: var(--red); }
.bar.semana { background: #e3a008; }
.bar.proxima { background: var(--blue); }
.bar.concluida { background: var(--green); }
@media (max-width: 520px) {
  .item { flex-wrap: wrap; row-gap: 8px; }
  .item > .grow { min-width: 55%; }
  .item > .row { width: 100%; justify-content: flex-end; }
}

/* ---------- selos ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.5; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .85; }
.badge.vencida { background: var(--red-50); color: var(--red); }
.badge.semana { background: var(--amber-50); color: var(--amber); }
.badge.proxima, .badge.ok { background: var(--blue-50); color: var(--blue-ink); }
.badge.concluida { background: var(--green-50); color: var(--green); }
.chip { display: inline-block; padding: 2px 8px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); font-size: 12px; font-weight: 500; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 10px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 600;
  background: var(--blue); color: #fff; box-shadow: 0 1px 2px rgba(15, 30, 46, .12); transition: background .15s, border-color .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:hover { background: var(--blue-ink); color: #fff; }
.btn .ic { width: 18px; height: 18px; }
.btn.ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line); box-shadow: var(--shadow-1); }
.btn.ghost:hover { background: #f8fafc; border-color: #cdd6e2; color: var(--ink); }
.btn.soft { background: var(--blue-50); color: var(--blue-ink); box-shadow: none; }
.btn.soft:hover { background: #dbe7fd; color: var(--blue-ink); }
.btn.danger { background: var(--surface); color: var(--red); border-color: #f2c6c2; box-shadow: none; }
.btn.danger:hover { background: var(--red-50); color: var(--red); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn.sm .ic { width: 16px; height: 16px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: default; }
.btn.wa { background: #e7f7ee; color: #12753f; box-shadow: none; }
.btn.wa:hover { background: #d3f0e0; color: #0f6435; }

/* ---------- formulários ---------- */
label { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; min-height: 44px; font: inherit; font-size: 15px; padding: 10px 12px; border: 1px solid #d3dbe5; border-radius: 10px;
  background: #fff; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #94a2b3; }
input:hover, select:hover, textarea:hover { border-color: #b9c5d3; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: var(--focus); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235e6c7e' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
textarea { min-height: 96px; resize: vertical; line-height: 1.5; }
input[type=file] { padding: 8px; min-height: auto; font-size: 13.5px; background: #f8fafc; border-style: dashed; }
.field + .field { margin-top: 14px; }
.check { display: flex; align-items: flex-start; gap: 10px; font-weight: 500; font-size: 14.5px; padding: 8px 0; margin: 0; color: var(--ink); cursor: pointer; }
.check input { width: 18px; height: 18px; min-height: 0; margin-top: 2px; flex: none; accent-color: var(--blue); }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 400; margin-top: 4px; }
.err { color: var(--red); font-size: 13.5px; min-height: 0; }
.err:not(:empty) { padding: 8px 12px; background: var(--red-50); border-radius: 8px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset[disabled] input, fieldset[disabled] select, fieldset[disabled] textarea { background: #f8fafc; color: var(--ink-2); }
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(-45deg); transition: transform .15s; flex: none; }
details[open] > summary::before { transform: rotate(45deg); }
code { background: var(--line-2); padding: 4px 8px; border-radius: 6px; font-size: 13px; }

/* ---------- segmento, filtros e abas ---------- */
.seg { display: flex; background: var(--line-2); border-radius: 10px; padding: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 8px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-1); }
.filters { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filters button { flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 6px 14px; font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.filters button:hover { border-color: #c8d3e1; }
.filters button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.chips { display: flex; gap: 6px; overflow-x: auto; padding: 4px 0 2px; margin: 0 -16px; padding-left: 16px; padding-right: 16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips a { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.chips a .ic { width: 16px; height: 16px; }
.chips a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (min-width: 1024px) { .chips { display: none; } }

/* ---------- avisos em caixa ---------- */
.callout { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-50); border: 1px solid #f1d7a7; color: #5c3c00; border-radius: var(--r); padding: 12px 14px; font-size: 14px; }
.callout.info { background: var(--blue-50); border-color: #cbdcfb; color: #183c7a; }
.callout.ok { background: var(--green-50); border-color: #bfe5d4; color: #0b5a3e; }
.callout a { font-weight: 600; }

/* ---------- vazio, carregando ---------- */
.empty { text-align: center; padding: 40px 24px; }
.empty .eic { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 16px; background: var(--blue-50); color: var(--blue); margin-bottom: 14px; }
.empty .eic .ic { width: 26px; height: 26px; }
.empty h1, .empty h2 { margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 420px; margin: 6px auto 18px; }
.skeleton { display: grid; gap: 14px; }
.sk { border-radius: 12px; background: linear-gradient(90deg, #e8edf3 0%, #f3f6f9 50%, #e8edf3 100%); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- toast e modal ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(84px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(16px);
  display: flex; align-items: center; gap: 10px; background: var(--navy); color: #fff; padding: 12px 16px; border-radius: 12px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-3); opacity: 0; pointer-events: none; transition: .2s; z-index: 80; max-width: calc(100% - 32px);
}
.toast .ic { color: #7fe0b5; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
@media (min-width: 1024px) { .toast { left: auto; right: 28px; bottom: 28px; transform: translateY(16px); } .toast.show { transform: none; } }
dialog { border: 0; border-radius: 18px; padding: 0; width: min(560px, calc(100% - 24px)); max-height: calc(100vh - 48px); box-shadow: var(--shadow-3); color: var(--ink); }
dialog::backdrop { background: rgba(14, 42, 71, .45); backdrop-filter: blur(2px); }
dialog form, dialog > div { padding: 24px; }
dialog h2 { font-size: 19px; }
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }
@media (max-width: 640px) {
  dialog { width: 100%; max-width: 100%; margin: auto 0 0; border-radius: 20px 20px 0 0; max-height: 92vh; }
  dialog form, dialog > div { padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
  dialog form::before, dialog > div::before { content: ""; display: block; width: 40px; height: 4px; border-radius: 4px; background: #d3dbe5; margin: -8px auto 14px; }
  @keyframes pop { from { transform: translateY(40px); } }
}

/* ---------- acesso (login) ---------- */
.auth-wrap { min-height: 100vh; display: grid; }
.auth-side { display: none; }
.auth { width: 100%; max-width: 420px; margin: 0 auto; padding: 32px 0; align-self: center; }
.auth .logo { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth .logo h1 { font-size: 22px; }
.auth-hero { display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; min-height: 190px; padding: 20px 20px 22px; color: #fff; background-color: var(--navy); text-shadow: 0 1px 10px rgba(6,20,36,.5); }
.auth-hero .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.auth-hero p { margin: 0; color: #dbe6f2; font-size: 14.5px; max-width: 360px; }
.auth-hero + .auth-side + .auth .logo { display: none; }
@media (max-width: 1023px) { .auth-wrap { align-content: start; } }
@media (min-width: 1024px) {
  .auth-wrap { grid-template-columns: 1.05fr 1fr; margin: -28px -40px -48px; }
  .auth-side {
    display: flex; flex-direction: column; justify-content: space-between; padding: 48px 56px; color: #e3ebf5; background-color: var(--navy);
    text-shadow: 0 1px 12px rgba(6,20,36,.45);
  }
  .auth-hero { display: none !important; }
  .auth-side .brand { display: flex; align-items: center; gap: 12px; color: #fff; font-weight: 700; font-size: 18px; }
  .auth-side h2 { color: #fff; font-size: 38px; line-height: 1.12; font-weight: 700; letter-spacing: -.025em; max-width: 520px; }
  .auth-side ul { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 460px; }
  .auth-side li { display: flex; gap: 12px; font-size: 15.5px; }
  .auth-side li .ic { color: var(--gold); margin-top: 2px; }
  .auth-side .foot { font-size: 13px; color: #8ea4bd; }
  .auth { padding: 48px; }
  .auth .logo { display: none; }
}

/* ---------- painel do condomínio ---------- */
.group-title { display: flex; align-items: baseline; gap: 10px; margin: 26px 0 10px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.group-title small { font-weight: 400; color: var(--muted); }
.hub { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
@media (max-width: 520px) { .hub { grid-template-columns: 1fr 1fr; gap: 10px; } }
.hubitem { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; color: var(--ink); transition: border-color .15s, box-shadow .15s; }
.hubitem:hover { border-color: #c3d2e6; box-shadow: var(--shadow-2); color: var(--ink); }
.hubitem b { font-size: 15px; margin-top: 10px; }
.hubitem .hi { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); }
.hubitem.money .hi { background: var(--green-50); color: var(--green); }
.hubitem.people .hi { background: #f1edfb; color: #5b3fb3; }
.hubitem em { position: absolute; top: 14px; right: 14px; font-style: normal; background: var(--red-50); color: var(--red); font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.hubitem em.neutral { background: var(--line-2); color: var(--ink-2); }

.chart { display: grid; grid-template-columns: repeat(var(--n, 6), 1fr); gap: 10px; align-items: end; height: 150px; padding-top: 8px; }
.chart .col { display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; gap: 3px; align-items: flex-end; height: 120px; }
.chart .bars i { display: block; width: 12px; border-radius: 4px 4px 0 0; background: var(--green); min-height: 2px; }
.chart .bars i.out { background: #9fb3c9; }
.chart span { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard { color: var(--ink); display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s; }
.pcard:hover { border-color: #c3d2e6; box-shadow: var(--shadow-2); color: var(--ink); }
.pcard h2 { font-size: 16px; }
.pcard .status { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; padding: 10px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.kpis b { display: block; font-size: 15px; } .kpis span { font-size: 11.5px; color: var(--muted); }
.reasons { color: var(--red); font-size: 13px; } .reasons.ok { color: var(--green); }
.progress { height: 8px; background: var(--line-2); border-radius: 999px; overflow: hidden; margin-top: 8px; }
.progress.big { height: 10px; }
.progress i { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.onboard { color: var(--ink); align-items: center; gap: 14px; }
.onboard:hover { color: var(--ink); border-color: #c3d2e6; }
.onboard .hi { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: var(--green-50); color: var(--green); flex: none; }

/* ---------- morador ---------- */
.quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.quick a { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; color: var(--ink); font-size: 14px; font-weight: 600; }
.quick a:hover { border-color: #c3d2e6; box-shadow: var(--shadow-2); color: var(--ink); }
.quick .hi { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); }
@media (max-width: 640px) { .quick { grid-template-columns: 1fr 1fr; } }
.hero-res { padding: 26px 22px 22px; min-height: 170px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: var(--r-lg); color: #fff; background-color: var(--navy); text-shadow: 0 1px 10px rgba(6,20,36,.45); }
.cover { position: relative; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; min-height: 168px; padding: 22px 24px; border-radius: var(--r-lg); color: #fff; background-color: var(--navy); text-shadow: 0 1px 10px rgba(6,20,36,.45); margin-bottom: 20px; }
.cover h1 { color: #fff; font-size: 26px; }
.cover .crumbs, .cover .crumbs a, .cover .muted { color: #d2deeb; }
.cover .chip { text-shadow: none; }
.cover .cover-edit { position: absolute; top: 14px; right: 14px; background: rgba(255,255,255,.16); color: #fff; border: 1px solid rgba(255,255,255,.3); backdrop-filter: blur(6px); text-shadow: none; }
.cover .cover-edit:hover { background: rgba(255,255,255,.26); color: #fff; }
@media (max-width: 640px) { .cover { min-height: 140px; padding: 18px; } .cover h1 { font-size: 21px; } }
.pcard { overflow: hidden; }
.pthumb { position: relative; height: 104px; margin: -18px -18px 2px; background-color: var(--navy); }
@media (min-width: 760px) { .pthumb { margin: -22px -22px 2px; } }
.pthumb .badge { position: absolute; top: 12px; right: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.18); }
.photo-field { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.photo-field .pv { width: 140px; height: 84px; border-radius: 10px; background-color: var(--navy); flex: none; }
.hero-res h1 { color: #fff; }
.hero-res .muted { color: #b6c7da; }
.assbanner { align-items: center; color: var(--ink); border-color: #f1d7a7; background: var(--amber-50); gap: 14px; }
.assbanner:hover { color: var(--ink); }
.assbanner .hi { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--amber); flex: none; }
.ann.unread { box-shadow: inset 3px 0 0 var(--blue), var(--shadow-1); }
.annbody { margin: 10px 0; color: var(--ink-2); line-height: 1.6; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.cmt { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14.5px; }
.cmt.internal { background: var(--amber-50); border-color: #f1d7a7; }
.votes { display: flex; flex-wrap: wrap; gap: 8px; }
.vote { min-height: 44px; border: 1.5px solid var(--line); background: #fff; border-radius: 10px; padding: 0 18px; font: inherit; font-weight: 600; cursor: pointer; color: var(--ink); }
.vote:hover:not([disabled]) { border-color: var(--blue); }
.vote.on { border-color: var(--blue); background: var(--blue-50); color: var(--blue-ink); }
.vote[disabled] { cursor: default; opacity: .65; }
.results { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.rbar { display: grid; grid-template-columns: 120px 1fr 96px; gap: 10px; align-items: center; font-size: 13.5px; }
.rbar div { height: 10px; background: var(--line-2); border-radius: 999px; overflow: hidden; }
.rbar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.rbar b { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- anexos ---------- */
.files { display: flex; flex-direction: column; gap: 10px; }
.filelist { display: flex; flex-wrap: wrap; gap: 8px; }
.file { position: relative; display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 10px; padding: 6px 30px 6px 6px; background: #fff; max-width: 100%; }
.file img, .ficon { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; cursor: pointer; flex: none; }
.ficon { display: grid; place-items: center; background: var(--blue-50); color: var(--blue-ink); font-size: 10.5px; font-weight: 700; }
.fname { font-size: 13.5px; color: var(--ink); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border: 0; border-radius: 6px; background: none; font-size: 18px; line-height: 1; cursor: pointer; color: var(--muted); }
.file .x:hover { background: var(--red-50); color: var(--red); }
.upl { align-self: flex-start; cursor: pointer; }
.upl.busy { opacity: .5; pointer-events: none; }
.doctext { white-space: pre-wrap; font: 14px/1.65 "IBM Plex Serif", Georgia, serif; background: #fbfcfd; border: 1px solid var(--line); border-radius: 10px; padding: 18px; max-height: 60vh; overflow: auto; margin: 0; color: var(--ink); }
.logo-prev { height: 52px; border-radius: 10px; border: 1px solid var(--line); background: #fff; padding: 6px; }
.itembox { background: #fbfcfd; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 16px; font-size: 14.5px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
@media (max-width: 520px) { .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: 10px; } }
.pos { color: var(--green); }
.neg { color: var(--red); }

/* ---------- prestação de contas ---------- */
.report { padding: 32px; }
.report h1 { font-size: 24px; }
.report h2 { font-size: 15px; margin: 28px 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line); color: var(--navy); }
.rhead { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-bottom: 18px; border-bottom: 2px solid var(--navy); }
.rkicker { font-size: 13px; font-weight: 600; color: var(--blue); margin-bottom: 4px; }
.rbrand { display: flex; align-items: center; gap: 14px; padding-bottom: 14px; margin-bottom: 14px; }
.rbrand img { max-height: 52px; max-width: 180px; object-fit: contain; }
.rsummary { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.rsummary div { padding: 14px 16px; border-right: 1px solid var(--line); }
.rsummary div:last-child { border-right: 0; background: var(--navy); color: #fff; }
.rsummary div:last-child span { color: #b6c7da; }
.rsummary span { display: block; font-size: 12.5px; color: var(--muted); }
.rsummary b { font-size: 18px; }
.rsummary div:last-child b { color: #fff; }
@media (max-width: 640px) {
  .rsummary { grid-template-columns: 1fr 1fr; }
  .rsummary div:nth-child(2) { border-right: 0; }
  .rsummary div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .report { padding: 18px; }
  .rtable.small { display: block; overflow-x: auto; }
}
.rtable { width: 100%; border-collapse: collapse; font-size: 14px; }
.rtable.small { font-size: 13px; }
.rtable th { text-align: left; font-size: 12.5px; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); background: #f8fafc; }
.rtable td { padding: 8px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.rtable tfoot td { font-weight: 700; border-top: 1px solid var(--line); border-bottom: 0; }
.rtable .num { text-align: right; white-space: nowrap; }
.signs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; text-align: center; font-size: 13px; }
.signs div { border-top: 1px solid var(--ink); padding-top: 8px; }
@media print {
  @page { size: A4; margin: 14mm; }
  body { background: #fff; font-size: 12px; }
  .sidebar, .mtop, .tabbar, .no-print, .toast, .chips, .crumbs { display: none !important; }
  .app { display: block; }
  .view { max-width: none; padding: 0; }
  .report { border: 0; box-shadow: none; padding: 0; }
  .rtable tr, .rsummary, .rbrand { break-inside: avoid; }
  .report h2 { break-after: avoid; }
  .rsummary div:last-child { background: #fff; color: var(--ink); }
  .rsummary div:last-child b, .rsummary div:last-child span { color: var(--ink); }
}

/* ---------- assistente ---------- */
.chat { max-width: 960px; margin-left: auto; margin-right: auto; width: 100%; }
.msgs { display: flex; flex-direction: column; gap: 12px; margin: 18px 0; min-height: 40vh; }
.msg { max-width: 86%; padding: 12px 16px; border-radius: 16px; font-size: 15px; line-height: 1.6; }
.msg p { margin: 0 0 8px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0 8px; padding-left: 20px; }
.msg.user { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 4px; }
.msg.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); border-bottom-left-radius: 4px; box-shadow: var(--shadow-1); }
.msg.typing { color: var(--muted); }
.sugs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 640px) { .sugs { grid-template-columns: 1fr; } }
.sug { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; font: inherit; font-size: 14.5px; cursor: pointer; color: var(--ink); box-shadow: var(--shadow-1); }
.sug:hover { border-color: var(--blue); }
.askbar { position: sticky; bottom: calc(68px + env(safe-area-inset-bottom)); display: flex; gap: 8px; align-items: flex-end; background: var(--canvas); padding: 10px 0; }
@media (min-width: 1024px) { .askbar { bottom: 0; } }
.askbar textarea { min-height: 48px; max-height: 160px; resize: none; }
.askbar .btn { min-height: 48px; }

/* ---------- correções de layout ---------- */
.main { min-width: 0; }
.cols { grid-template-columns: minmax(0, 1fr); }
.cols > * { min-width: 0; }
@media (min-width: 1024px) { .cols { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); } }
body.public .view { max-width: none; padding: 0; }
body.public .auth { padding: 32px 16px; }
@media (min-width: 1024px) { body.public .auth-wrap { margin: 0; } body.public .auth { padding: 48px; } }
.sb-brand img, .mtop .brand img { box-shadow: 0 0 0 1px rgba(255, 255, 255, .22); }
.mtop .brand img { box-shadow: none; }
a.card, a.card b, a.card h2, a.card h3 { color: var(--ink); }
a.card:hover { color: var(--ink); }

/* v5: capas com foto */
body.public .mtop { display: none; }
.grid2 > .field, .grid2 > .grid2 { align-self: start; }
@media (max-width: 640px) {
  .cover .crumbs { display: none; }
  .cover .cover-edit { padding: 0; width: 38px; height: 38px; justify-content: center; }
  .cover .cover-edit .lbl { display: none; }
}

/* v6: segurança */
.vbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 16px 16px 0; padding: 10px 14px; border-radius: 10px; background: var(--amber-50); border: 1px solid #f1d7a7; color: var(--ink); font-size: 14px; }
.vbar[hidden] { display: none; }
.vbar span { flex: 1; min-width: 200px; }
@media (min-width: 1024px) { .vbar { margin: 20px 40px 0; } }
.qrbox { display: grid; place-items: center; padding: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; width: max-content; margin: 0 auto; }
.qrbox svg { display: block; }
.secret { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .08em; word-break: break-all; background: var(--line-2); padding: 8px 10px; border-radius: 8px; font-size: 14px; }
.codes { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 15px; background: var(--line-2); padding: 12px 14px; border-radius: 10px; }
.otp { font-size: 22px; letter-spacing: .3em; text-align: center; font-variant-numeric: tabular-nums; }
.secrow { display: flex; align-items: center; gap: 12px; }
.secrow .hi { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--green-50); color: var(--green); flex: none; }
.secrow .hi.off { background: var(--line-2); color: var(--ink-2); }
.row.end { justify-content: flex-end; }
#pw .grid2 > .field { align-self: start; }

/* v8: identidade visual Síndico em Dia */
h1, h2, .auth-side h2, .cover h1, .hero-res h1, dialog h2, .stat b { font-family: var(--font-display); }
h1 { letter-spacing: -.025em; }
h2 { letter-spacing: -.012em; }
.sb-brand { padding: 22px 20px 18px; }
.sb-brand img, .mtop .brand img, .auth-side .brand img, .auth-hero .brand img, .auth .logo img { box-shadow: none; border-radius: 0; display: block; width: auto; }
.mtop .brand img { height: 26px; }
.auth .logo { margin-bottom: 28px; }
.sb-link.on .ic { color: var(--gold); }
.rfoot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--ink-3, #6b7a8c); font-size: 12px; }
.rfoot img { height: 18px; width: auto; }
.auth-side .brand img { height: 42px; }

/* v10: adesão, indicação, push, admin */
.pbar { background: var(--blue-50); border-color: #c9dbf7; }
.adesao .pctbig { font-family: var(--font-display); font-size: 34px; font-weight: 700; line-height: 1; }
.pctbig.green { color: var(--green); } .pctbig.amber { color: var(--amber); } .pctbig.red { color: var(--red); }
.meter { height: 10px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 100%; border-radius: inherit; background: var(--green); transition: width .4s; }
.meter.amber i { background: #d99a1c; } .meter.red i { background: var(--red); }
.refpromo { align-items: center; gap: 14px; color: var(--ink); border-color: #f1dfb4; background: linear-gradient(0deg, #fffaf0, #fffaf0); }
.refpromo:hover { color: var(--ink); border-color: #e9c977; }
.refpromo .hi, .refhero .hi { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: #fff3d6; color: #8a6a1f; flex: none; }
.refhero .hi.big { width: 56px; height: 56px; border-radius: 16px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); font-weight: 600; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }
.kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 10px; }

/* v11: console mestre e assinatura */
.mtabs { margin-bottom: 4px; }
.gbar { display: flex; flex-direction: column; gap: 8px; margin: 16px 16px 0; }
.gbar[hidden] { display: none; }
@media (min-width: 1024px) { .gbar { margin: 20px 40px 0; } }
.gline { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px; font-size: 14px; border: 1px solid #c9dbf7; background: var(--blue-50); color: var(--ink); }
.gline.alerta { background: var(--amber-50); border-color: #f1d7a7; }
.gline span { flex: 1; min-width: 200px; }
.ubar { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.tbl tr.click { cursor: pointer; } .tbl tr.click:hover td { background: var(--line-2); }
.planon { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.subhero .stats { margin: 0; }
.stat a, a.stat { color: var(--ink); }
.subpromo { border-color: #c9dbf7; background: #f5f9ff; } .subpromo .hi { background: var(--blue-50); color: var(--blue); }
.pctbig { font-family: var(--font-display); font-size: 28px; font-weight: 700; color: var(--navy); line-height: 1.1; }
.chips.mtabs { display: flex !important; flex-wrap: wrap; overflow: visible; margin: 0 0 4px; padding: 0; }
@media print { .chips.mtabs { display: none !important; } }
.chart { grid-template-columns: repeat(var(--n, 6), minmax(0, 1fr)); }
.chart .col { min-width: 0; }
.chart.dense { gap: 4px; }
.chart.dense .bars i { width: 8px; }
.chart.dense span { font-size: 10px; white-space: nowrap; }
.chart.dense .col:nth-child(odd) span { visibility: hidden; }
div.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
div.kv span { color: var(--ink-2); } div.kv b { text-align: right; font-weight: 600; }
.ok-call { background: var(--green-50); border-color: #bfe6d3; }

/* atributo hidden sempre esconde (mesmo em .grid2, .field etc.) */
[hidden] { display: none !important; }

/* escolha da forma de pagamento */
.paychoice { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: left; padding: 14px 16px;
  border: 1px solid var(--line, #dfe3e8); border-radius: 12px; background: var(--card, #fff); color: inherit; font: inherit; cursor: pointer; }
.paychoice span { font-size: 13px; color: var(--muted, #5b6875); }
.paychoice.on { border: 2px solid var(--green, #1f7a4d); cursor: default; }
button.paychoice:hover { border-color: var(--primary, #0e2a47); }

/* botão flutuante de suporte no WhatsApp */
.supfab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: inline-flex; align-items: center; gap: 8px;
  background: #1fa855; color: #fff; border-radius: 999px; padding: 12px 16px; font-weight: 600; font-size: 14px; text-decoration: none;
  box-shadow: 0 6px 20px rgba(14, 42, 71, .22); }
.supfab .ic { width: 20px; height: 20px; stroke: #fff; }
.supfab:hover { filter: brightness(1.06); }
.supfab.logged { bottom: calc(84px + env(safe-area-inset-bottom)); } /* acima da barra de abas no celular */
@media (max-width: 1023px) { .supfab span { display: none; } .supfab { padding: 13px; } }
@media (min-width: 1024px) { .supfab.logged { bottom: 20px; } }
@media print { .supfab { display: none !important; } }

/* parceiros */
.pfilters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: end; }
.pfilters .field { margin: 0 !important; }
@media (max-width: 760px) { .pfilters { grid-template-columns: 1fr 1fr; } }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pcard .hi, .card > .hi, .card .row > .hi { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); }
.pcard .badge .ic { width: 14px; height: 14px; margin-right: 3px; vertical-align: -2px; }
.stars { color: #d5d9df; letter-spacing: 1px; }
.stars .on { color: #e8a317; }
.rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rate input { position: absolute; opacity: 0; pointer-events: none; }
.rate label { font-size: 32px; line-height: 1; color: #d5d9df; cursor: pointer; }
.rate input:checked ~ label, .rate label:hover, .rate label:hover ~ label { color: #e8a317; }
.rate input:focus-visible + label { outline: 2px solid var(--blue); border-radius: 4px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.checks li { display: flex; gap: 8px; align-items: baseline; font-size: 14px; }
.checks li::before { flex: none; font-weight: 700; width: 18px; text-align: center; }
.checks li.ok::before { content: "✓"; color: var(--green); }
.checks li.no::before { content: "✕"; color: var(--red); }
.checks li.wait::before { content: "…"; color: var(--amber); }
.badge.ptop { background: #fff3d6; color: #7a5200; }
.rate.sm label { font-size: 22px; }
.pcrit { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pcrit > div { background: var(--bg, #f5f6f8); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; gap: 2px; }
.pcrit b { font-size: 18px; }
.pcrit-in { display: grid; gap: 6px; }
.pcrit-in > div { display: flex; justify-content: space-between; align-items: center; gap: 12px; }

/* cartões em colunas que se encaixam (sem buracos quando um é mais alto que o outro) */
.masonry { columns: 2 360px; column-gap: 16px; }
.masonry > * { break-inside: avoid; margin-bottom: 16px; width: 100%; }

/* telas largas: aproveita melhor o espaço */
@media (min-width: 1600px) { .view { max-width: 1440px; } }
/* cartão "adicionar" que completa as grades de cartões */
.addcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 140px; text-align: center;
  border: 2px dashed var(--line); background: transparent; box-shadow: none; color: var(--ink-2); font: inherit; cursor: pointer; text-decoration: none; padding: 20px; border-radius: var(--r, 14px); }
.addcard:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.addcard b { font-size: 16px; } .addcard span { font-size: 13px; color: var(--muted); }

/* grade que ocupa a linha toda (planos e opções lado a lado) */
.grid-cards.fit { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Perfil em telas largas: cartões em duas colunas que se encaixam */
@media (min-width: 1280px) {
  .perfil { display: block; columns: 2 480px; column-gap: 16px; }
  .perfil > * { break-inside: avoid; margin: 0 0 16px; width: 100%; }
  .perfil > h1, .perfil > :last-child { column-span: all; }
}
/* campos lado a lado começam na mesma altura */
.grid2 > .field + .field, .grid2 > * + .field, .grid2 > .field + * { margin-top: 0; }
.grid2 + .grid2 { margin-top: 12px; }

/* assinatura eletrônica */
.sigpad { position: relative; border: 1px dashed var(--line); border-radius: 12px; background: #fff; }
.sigpad canvas { display: block; width: 100%; height: 180px; touch-action: none; cursor: crosshair; }
.sigpad::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 40px; border-bottom: 1px solid #c9d1db; pointer-events: none; }
.sigpad .btn { position: absolute; top: 8px; right: 8px; }
.sigrow { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.sigmini { border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-align: center; display: flex; flex-direction: column; gap: 2px; }
.sigmini img { max-height: 56px; max-width: 100%; margin: 0 auto; }
.sigmini span { font-size: 12px; color: var(--muted); } .sigmini em { font-size: 12px; color: var(--red); font-style: normal; }
.sigmini.stale { opacity: .7; border-color: #f1c4c0; }
.sigimg { display: block; max-height: 60px; max-width: 100%; margin: -60px auto 6px; }
.signs > div { position: relative; }

.signopt { display: flex; gap: 14px; align-items: flex-start; text-align: left; width: 100%; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; font: inherit; color: inherit; }
.signopt:hover { border-color: var(--blue); background: var(--blue-50); }
.signopt .hi { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--blue-50); color: var(--blue); }
.govsteps { margin: 0; padding-left: 20px; display: grid; gap: 14px; }
.govsteps .btn, .govsteps input { margin-top: 6px; }
.govseal { display: inline-flex; align-items: center; gap: 4px; margin: 6px auto; font-size: 12px; font-weight: 700; color: var(--green); background: var(--green-50); border-radius: 999px; padding: 4px 10px; }
.govseal .ic { width: 14px; height: 14px; }
/* colunas de formulário nunca empurram a tela para os lados (opções longas em selects) */
.grid2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
select, input, textarea { max-width: 100%; min-width: 0; }
@media (max-width: 520px) { .grid2:has(select) { grid-template-columns: minmax(0, 1fr); } }
