/* Inter (SIL OFL 1.1, ver fonts/LICENSE-Inter.txt), hospedada no próprio servidor por causa da CSP. */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-wght-normal.woff2) format("woff2-variations"), url(../fonts/inter-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations"), url(../fonts/inter-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef2f0;
  --border: #dde3e0;
  --text: #17201d;
  --muted: #5f6d68;
  --primary: #0f5c4d;
  --primary-2: #137a66;
  --primary-soft: #e3f1ed;
  --on-primary: #ffffff;
  --ok: #1d7a46;   --ok-soft: #e2f4e9;
  --warn: #8a5700; --warn-soft: #fdf1d8;
  --danger: #b42318; --danger-soft: #fde7e5; --on-danger: #ffffff;
  --info: #1f5fa8; --info-soft: #e4eefa;
  --radius: 12px;
  /* Escala única de tipografia e só dois raios (Etapa 3 UX) */
  /* Mínimo de 13 px em qualquer texto. --fs-mult vem da preferência "Tamanho da letra" (Normal 1, Grande 1.15, Muito grande 1.3). */
  --fs-mult: 1;
  --fs-12: calc(13px * var(--fs-mult)); --fs-13: calc(13px * var(--fs-mult)); --fs-15: calc(15px * var(--fs-mult)); --fs-18: calc(18px * var(--fs-mult)); --fs-24: calc(24px * var(--fs-mult)); --fs-32: calc(32px * var(--fs-mult));
  --r-ctl: 8px; --r-card: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 20, .06), 0 2px 8px rgba(16, 24, 20, .05);
  --sidebar: 264px;
  --content-max: 1440px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1412; --surface: #151d1a; --surface-2: #1c2622; --border: #2a3632; --text: #e6eeeb; --muted: #94a59f;
    --primary: #3fb59a; --primary-2: #56c7ac; --primary-soft: #183a32; --on-primary: #06221b;
    --ok: #5fd08f; --ok-soft: #173826; --warn: #f0b54a; --warn-soft: #3a2c10; --danger: #ff7b6e; --danger-soft: #3d1a17; --on-danger: #2a0b08; --info: #7fb1f0; --info-soft: #162a42;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1412; --surface: #151d1a; --surface-2: #1c2622; --border: #2a3632; --text: #e6eeeb; --muted: #94a59f;
  --primary: #3fb59a; --primary-2: #56c7ac; --primary-soft: #183a32; --on-primary: #06221b;
  --ok: #5fd08f; --ok-soft: #173826; --warn: #f0b54a; --warn-soft: #3a2c10; --danger: #ff7b6e; --danger-soft: #3d1a17; --on-danger: #2a0b08; --info: #7fb1f0; --info-soft: #162a42;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  background: var(--bg); color: var(--text);
  font: var(--fs-15)/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
}
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn, a.btn:hover, a.btn:focus { text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font-size: var(--fs-24); letter-spacing: -.01em; }
h2 { font-size: var(--fs-18); }
h3 { font-size: var(--fs-15); }
p { margin: .4em 0; }
.muted { color: var(--muted); }
.small, small { font-size: var(--fs-13); }
.pre { white-space: pre-wrap; word-break: break-word; }
.right { text-align: right; }
.icon { flex: none; }
code.secret { display: block; padding: 12px; margin: 8px 0; background: var(--surface-2); border-radius: var(--r-ctl); font-size: var(--fs-18); letter-spacing: .05em; word-break: break-all; user-select: all; }
:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }

/* ---------- auth */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; background: linear-gradient(160deg, var(--primary-soft), var(--bg)); }
.auth-card { width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 28px 24px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 12px; }
.auth-card.legal-card { max-width: 780px; }
.legal-card .card { border: 0; box-shadow: none; padding: 0; background: none; }
.legal-doc h3 { margin: 18px 0 6px; font-size: 1rem; }
.legal-doc p, .legal-doc li { line-height: 1.6; }
.center-screen { min-height: 100%; display: grid; place-content: center; gap: 12px; padding: 16px; }
.brand { display: flex; gap: 12px; align-items: center; }
.brand strong { display: block; }
.brand small { color: var(--muted); }
.brand-logo { width: 44px; height: 44px; border-radius: var(--r-card); display: grid; place-items: center; background: var(--primary); color: var(--on-primary); }
.steps { padding-left: 20px; }

/* ---------- shell */
.shell { display: flex; min-height: 100%; }
.sidebar {
  width: var(--sidebar); flex: none; background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; height: 100dvh; padding: calc(16px + var(--safe-t)) 12px 12px;
}
.sidebar .brand { padding: 0 6px 14px; border-bottom: 1px solid var(--border); margin-bottom: 8px; }
.sidebar .brand-logo { width: 38px; height: 38px; }
.nav-scroll { flex: 1; overflow-y: auto; }
.nav-group { padding: 6px 0; }
.nav-group-label { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; font-weight: 600; }
.nav-link {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: var(--r-ctl); color: var(--text);
  background: none; border: 0; font: inherit; cursor: pointer; text-align: left;
}
.nav-link:hover { background: var(--surface-2); text-decoration: none; }
.nav-link.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.nav-foot { border-top: 1px solid var(--border); padding-top: 8px; }
.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { flex: 1; padding: 24px 28px 40px; max-width: var(--content-max); margin: 0 auto; width: 100%; outline: none; }
.bottom-nav, .scrim, .menu-toggle { display: none; }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--r-ctl); border: 0; background: none; color: var(--text); cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); }
.bell-count { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-ctl); background: var(--danger); color: #fff; font-size: var(--fs-12); display: grid; place-items: center; font-weight: 700; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; font-size: var(--fs-13); font-weight: 700; }
.avatar:hover { text-decoration: none; }

@media (min-width: 901px) {
  /* Barra do topo alinhada ao conteúdo centralizado (e não presa no canto da tela). */
  .topbar { display: flex; justify-content: flex-end; gap: 6px; align-items: center; max-width: var(--content-max); margin: 0 auto; width: 100%; padding: 12px 28px 0; }
  .topbar .topbar-title, .topbar .topbar-search, .topbar .topbar-cta { display: none; }
  .content { padding-top: 8px; }
}

@media (max-width: 900px) {
  /* Menu lateral do celular. No Safari do iPhone, uma gaveta que entra por transform por cima de uma camada escura de tela
     cheia às vezes não recebe o toque (vai para a camada de baixo). Por isso: a gaveta ganha camada própria (translate3d +
     will-change), fica invisível e sem toque enquanto fechada, e a camada escura começa onde a gaveta termina — nunca
     fica por baixo dela. */
  body .sidebar { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: min(264px, 86vw); transform: translate3d(-102%, 0, 0); will-change: transform;
    visibility: hidden; pointer-events: none; transition: transform .2s ease, visibility 0s linear .2s; box-shadow: var(--shadow); touch-action: pan-y; }
  body.nav-open .sidebar { transform: translate3d(0, 0, 0); visibility: visible; pointer-events: auto; transition: transform .2s ease, visibility 0s; }
  /* Altura pela área VISÍVEL (top/bottom 0, sem 100vh): no Safari do iPhone 100vh é a tela com as barras do navegador
     escondidas, e o fim do menu ficava atrás da barra de baixo, sem como rolar até os últimos itens (16/11/2026). */
  body .sidebar { height: auto; max-height: none; padding-bottom: calc(12px + var(--safe-b)); }
  .sidebar .nav-scroll { min-height: 0; padding-bottom: 16px; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .sidebar a, .sidebar button { touch-action: manipulation; }
  body.nav-open .scrim { display: block; position: fixed; top: 0; right: 0; bottom: 0; left: min(264px, 86vw); background: rgba(0,0,0,.35); z-index: 30; }
  .topbar { display: flex; align-items: center; gap: 6px; padding: calc(8px + var(--safe-t)) 10px 8px; background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
  .menu-toggle { display: inline-grid; }
  .topbar-title { flex: 1; min-width: 0; font-weight: 600; font-size: var(--fs-15); line-height: 1.2; white-space: normal; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .content { padding: 16px 16px calc(112px + var(--safe-b)); }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: var(--surface); border-top: 1px solid var(--border);
    padding: 6px 4px calc(6px + var(--safe-b));
  }
  .bottom-link { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: min(var(--fs-12), 14px); color: var(--muted); background: none; border: 0; font-family: inherit; padding: 4px 2px; cursor: pointer; min-width: 0; }
  .bottom-link > span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-link.active { color: var(--primary); }
  .bottom-link:hover { text-decoration: none; }
}

/* ---------- page */
.page { display: flex; flex-direction: column; gap: 16px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.page-title { display: flex; gap: 10px; align-items: flex-start; }
.page-title .back { margin-top: 2px; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; margin: -8px 0 -8px -10px; }
.page-actions, .row-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row-actions.wrap { margin-top: 12px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); min-width: 0; }
.card-title { margin-bottom: 10px; }
.card > header, .card > footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.card > footer { margin-top: 10px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
@media (max-width: 480px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.feed { display: flex; flex-direction: column; gap: 12px; }
.announcement h3 { margin: 8px 0 4px; }
.announcement.pinned { border-left: 4px solid var(--warn); }
.announcement.unread h3::after { content: " •"; color: var(--primary); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }
.list a { display: inline-flex; gap: 6px; align-items: center; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar > * { flex: 0 1 auto; }
.search { display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 0 10px; min-width: 220px; flex: 1 1 220px; max-width: 420px; color: var(--muted); }
.search input { border: 0; outline: 0; background: none; padding: 9px 0; flex: 1; font: inherit; color: var(--text); min-width: 0; }

/* ---------- stats */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.stat { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; color: var(--text); box-shadow: var(--shadow); }
a.stat:hover { text-decoration: none; border-color: var(--primary-2); }
.stat-icon { width: 40px; height: 40px; border-radius: var(--r-ctl); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); flex: none; }
.stat-label { font-size: var(--fs-13); color: var(--muted); }
.stat-value { font-size: var(--fs-18); font-weight: 700; font-variant-numeric: tabular-nums; } /* menor que o título da página (24) */
.stat-hint { font-size: var(--fs-13); color: var(--muted); }
.stat-ok .stat-icon { background: var(--ok-soft); color: var(--ok); }
.stat-warn .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat-danger .stat-icon { background: var(--danger-soft); color: var(--danger); }
.stat-info .stat-icon { background: var(--info-soft); color: var(--info); }
@media (max-width: 480px) { .stats { grid-template-columns: 1fr 1fr; } .stat { flex-direction: column; gap: 6px; } .stat-value { font-size: var(--fs-18); } }

.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.quick { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; padding: 14px 8px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--text); font-size: var(--fs-13); }
.quick:hover { text-decoration: none; background: var(--primary-soft); color: var(--primary); }

/* ---------- table */
.table-wrap { position: relative; /* texto só para leitor de tela (.sr-only, absoluto) fica preso à rolagem da tabela, não estica a página (auditoria 14/11) */ overflow-x: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card .table-wrap { box-shadow: none; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-15); }
.table th { text-align: left; font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; font-variant-numeric: tabular-nums; }
.table-click tbody tr { cursor: pointer; }
.table-click tbody tr:hover { background: var(--surface-2); }
/* Tabela em cartões até 900 px (mesmo ponto do menu em gaveta): em tablet a tabela larga não passa mais da tela */
@media (max-width: 900px) {
  .table-wrap { border: 0; background: none; box-shadow: none; overflow: visible; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 12px; box-shadow: var(--shadow); }
  .table td { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); text-align: right; }
  .table td::before { content: attr(data-label); color: var(--muted); font-size: var(--fs-13); text-align: left; flex: none; max-width: 45%; }
  .table td[data-label=""]::before { content: none; }
  /* Cartão compacto: título na 1ª linha, sem rótulo; campos vazios e a caixa de seleção não ocupam linhas. */
  .table tr { position: relative; padding: 8px 12px; }
  .table td { padding: 4px 0; border-bottom: 0; }
  .table td.td-empty { display: none; }
  .table td.td-title { justify-content: flex-start; text-align: left; font-weight: 600; font-size: var(--fs-15); padding-right: 48px; }
  .table td.td-title::before { content: none; }
  .table td.td-check { position: absolute; top: 0; right: 0; width: 48px !important; height: 48px; padding: 0; justify-content: center !important; align-items: center; }
  .table td.td-check::before { content: none; }
  .table td.td-check input { width: 22px; height: 22px; }
  .table tr:has(.td-check) .td-title { padding-right: 48px; }
  .table td:last-child { border-bottom: 0; }
  .table .right { text-align: right; }
}
@media (max-width: 700px) {
  /* Filtros num painel que abre e fecha */
  .toolbar-filters { width: 100%; }
  .toolbar-filters > summary { list-style: none; width: 100%; justify-content: flex-start; border: 1px solid var(--border); }
  .toolbar-filters > summary::-webkit-details-marker { display: none; }
  .toolbar-filters[open] > summary { margin-bottom: 8px; }
  .toolbar-filters > .toolbar > * { flex: 1 1 100%; }
}

/* ---------- badges, alerts */
.badge { display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: var(--fs-12); font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--muted); }
.badge-ok { background: var(--ok-soft); color: var(--ok); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-ctl); }
.alert-danger { background: var(--danger-soft); color: var(--danger); }
.alert-info { background: var(--info-soft); color: var(--info); }
.alert-warn { background: var(--warn-soft); color: var(--warn); }
.alert-ok { background: var(--ok-soft); color: var(--ok); }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 32px 16px; color: var(--muted); text-align: center; }
.empty p { margin: 0; max-width: 46ch; }
.empty .empty-title { color: var(--text); font-weight: 600; }
.empty > .btn, .empty > a.btn { margin-top: 8px; }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 40px; color: var(--muted); }
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- buttons */
.btn { max-width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 9px 14px; border-radius: var(--r-ctl); border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; white-space: normal; text-align: center; min-height: 40px; }
.btn-sm { padding: 5px 10px; min-height: 32px; font-size: var(--fs-13); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover:not(:disabled) { background: var(--primary-2); }
.btn-ghost { background: var(--surface-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: var(--border); }
.btn-outline { background: var(--surface); border-color: var(--primary); color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary-soft); }
.btn-danger { background: var(--danger); color: var(--on-danger); }
.vote-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }

/* ---------- forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: var(--fs-13); font-weight: 600; }
.field .req { color: var(--danger); }
.field input, .field select, .field textarea, .select, .date-input .date-text {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font: inherit; min-height: 42px;
}
.select { width: auto; min-width: 160px; }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .select:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.field-check label { display: flex; gap: 8px; align-items: center; font-weight: 500; cursor: pointer; }
.field-check input { width: 18px; height: 18px; min-height: 0; accent-color: var(--primary); }
.hint { color: var(--muted); font-size: var(--fs-12); }
.field-error, .form-error { color: var(--danger); font-size: var(--fs-13); min-height: 0; }
.form-error:empty, .field-error:empty { display: none; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.form-inline .form-actions { justify-content: flex-start; }

/* ---------- modal, toast */
.modal-overlay { position: fixed; inset: 0; background: rgba(6, 10, 9, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 100; display: grid; place-items: center; padding: 16px; animation: fade .15s ease; }
.modal { background: var(--surface); border-radius: var(--r-card); width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.modal-wide { max-width: 760px; }
.modal-xl { max-width: min(1180px, 96vw); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 16px 20px; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); }
@media (max-width: 600px) {
  .modal-overlay { place-items: end center; padding: 0; }
  .modal, .modal-wide { max-width: 100%; border-radius: var(--r-card) var(--r-card) 0 0; max-height: 92vh; padding-bottom: var(--safe-b); }
}
@keyframes fade { from { opacity: 0; } }
#toasts { pointer-events: none; position: fixed; z-index: 200; left: 50%; transform: translateX(-50%); bottom: calc(80px + var(--safe-b)); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); }
.toast { pointer-events: auto; display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-radius: var(--r-card); background: var(--text); color: var(--bg); box-shadow: 0 8px 24px rgba(0,0,0,.2); transition: opacity .4s, transform .4s; }
.toast-error { background: var(--danger); color: var(--on-danger); }
.toast > span { flex: 1; }
.toast-x { flex: none; margin: -6px -6px -6px 4px; width: 32px; height: 32px; display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: transparent; color: inherit; cursor: pointer; }
.toast-x:hover { background: rgba(0,0,0,.12); }
.toast.hide { opacity: 0; transform: translateY(8px); }

/* ---------- tabs, details, bars, notifications */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; margin-bottom: 14px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
/* flex: none — no Safari/iOS o item flexível dentro de faixa com rolagem horizontal encolhia abaixo do texto (nowrap) e os rótulos se sobrepunham. */
.tab { flex: none; padding: 10px 14px; background: none; border: 0; border-bottom: 2px solid transparent; font: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; font-weight: 600; }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-body { display: flex; flex-direction: column; gap: 14px; }
.details { display: grid; grid-template-columns: minmax(0, max-content) minmax(0, 1fr); gap: 6px 16px; margin: 0; min-width: 0; }
.details dt { color: var(--muted); font-size: var(--fs-15); overflow-wrap: anywhere; min-width: 0; }
.details dd { margin: 0; word-break: break-word; overflow-wrap: anywhere; min-width: 0; }
/* Celular: rótulo em cima do valor (rótulos longos empurravam valores para fora da tela — Reforma tributária, TI →
   Sistema e Backups; auditoria de go-live, 16/11/2026). */
@media (max-width: 600px) { .details { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .details dd { margin-bottom: 8px; } }
.bars, .poll-results { display: flex; flex-direction: column; gap: 8px; margin: 8px 0; }
.bar-row { display: grid; grid-template-columns: minmax(80px, 160px) 1fr auto; gap: 10px; align-items: center; font-size: var(--fs-15); }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--surface-2); border-radius: var(--r-ctl); overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: var(--r-ctl); min-width: 2px; }
/* No celular: rótulo e valor na primeira linha, barra inteira embaixo (valores longos como fração ideal não espremem a barra). */
@media (max-width: 600px) {
  .bar-row { grid-template-columns: 1fr auto; row-gap: 4px; }
  .bar-row .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .bar-label { white-space: normal; }
}
.bar-ok { background: var(--ok); } .bar-warn { background: var(--warn); } .bar-danger { background: var(--danger); } .bar-info { background: var(--info); }
.bar-value { font-variant-numeric: tabular-nums; color: var(--muted); }
.notif-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.notif-list a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); color: var(--text); }
.notif-list a:hover { text-decoration: none; border-color: var(--primary-2); }
.notif-list li.unread a { border-left: 4px solid var(--primary); }
.notif-list p { margin: 2px 0; color: var(--muted); }
.prose ul { padding-left: 20px; }
.timeline { list-style: none; padding: 0; margin: 0; border-left: 2px solid var(--border); }
.timeline li { padding: 0 0 12px 14px; position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calendar .cal-head { font-size: var(--fs-12); color: var(--muted); text-align: center; font-weight: 600; text-transform: uppercase; }
.calendar .cal-day { min-height: 64px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 4px; font-size: var(--fs-12); overflow: hidden; }
.calendar .cal-day.other { opacity: .4; }
.calendar .cal-day.today { border-color: var(--primary); }
.calendar .cal-ev { display: block; background: var(--primary-soft); color: var(--primary); border-radius: var(--r-ctl); padding: 1px 4px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .calendar .cal-day { min-height: 44px; } .calendar .cal-ev { font-size: 0; height: 6px; padding: 0; } }
.code-big { font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-32); letter-spacing: .2em; text-align: center; padding: 12px; background: var(--surface-2); border-radius: var(--r-ctl); }
@media print { .sidebar, .topbar, .bottom-nav, .page-actions, .toolbar { display: none !important; } .content { padding: 0; } }
[hidden] { display: none !important; }
@media (min-width: 901px) { .menu-toggle { display: none !important; } }

.license-banner { margin: 12px 28px 0; }
@media (max-width: 900px) { .license-banner { margin: 12px 16px 0; } }

.brand-img { object-fit: cover; background: var(--surface-2); }
.avatar { overflow: hidden; }
.avatar-inner { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; overflow: hidden; }
.avatar-inner img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 72px; height: 72px; background: var(--primary); color: var(--on-primary); font-size: var(--fs-24); font-weight: 700; flex: none; }
.photo-row { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.photo-row .brand-logo { width: 72px; height: 72px; border-radius: var(--r-card); }

/* ---------- Assembleia virtual ---------- */
.vote-btn { min-height: 56px; flex: 1 1 140px; font-size: var(--fs-18); justify-content: center; }
.live-item { border-left: 4px solid var(--warn); }
.msg-hidden { opacity: .45; }
.room-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.minutes-pre { white-space: pre-wrap; font: inherit; margin: 0; }
.poll-results { margin-top: 10px; }
@media print { .sidebar, .topbar, .bottom-nav, .room-actions, button { display: none !important; } .minutes-pre { font-size: 11pt; } }
/* ---------- CRM de cobrança / pagamento automático ---------- */
.terms-box { max-height: 40vh; overflow: auto; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
tr.overdue-promise td { background: var(--danger-soft); }
/* ---------- QR Code (v1.5) ---------- */
.qr-panel { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.qr-panel .code-big { width: 100%; max-width: 280px; }
.qr-frame { background: #ffffff; padding: 8px; border-radius: var(--r-card); border: 1px solid var(--border); line-height: 0; }
.qr-svg { display: block; width: min(232px, 70vw); height: auto; image-rendering: pixelated; }
.qr-actions, .qr-validate-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.qr-validate-actions { justify-content: flex-start; margin-top: 10px; }
.qr-scan { position: relative; width: 100%; max-width: 420px; margin: 0 auto; aspect-ratio: 1; background: #000; border-radius: var(--r-card); overflow: hidden; }
.qr-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.qr-scan-target { position: absolute; inset: 18%; border: 3px solid rgba(255, 255, 255, .85); border-radius: var(--r-card); box-shadow: 0 0 0 999px rgba(0, 0, 0, .25); z-index: 1; pointer-events: none; }
.qr-verdict { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 28px 16px; border-radius: var(--r-card); }
.qr-verdict-ok { background: var(--ok-soft); color: var(--ok); }
.qr-verdict-danger { background: var(--danger-soft); color: var(--danger); }
.qr-verdict-title { font-size: clamp(1.6rem, 6vw, 2.6rem); font-weight: 800; line-height: 1.15; color: var(--text); word-break: break-word; }
.qr-verdict-line { font-size: clamp(1.05rem, 3.6vw, 1.4rem); color: var(--text); }
/* ---------- Assembleia (v1.5) ---------- */
.asm-hero-slot { display: grid; gap: 12px; margin-bottom: 12px; }
.asm-hero-slot:empty { display: none; }
.asm-hero { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); border-left: 6px solid var(--info); min-width: 0; }
.asm-hero > svg { flex: none; margin-top: 2px; }
.asm-hero h2 { font-size: var(--fs-18); margin: 0 0 6px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.asm-hero p { margin: 0 0 6px; }
.asm-hero-body, .asm-hero > div { flex: 1; min-width: 0; }
.asm-hero-wait { border-left-color: var(--warn); background: var(--warn-soft); }
.asm-hero-wait > svg { color: var(--warn); }
.asm-hero-go { border-left-color: var(--primary); background: var(--primary-soft); }
.asm-hero-ok { border-left-color: var(--ok); background: var(--ok-soft); }
.asm-hero-ok h2 { color: var(--ok); }
.asm-hero-live { border-left-color: var(--warn); }
.asm-hero-info > svg { color: var(--info); }
.asm-hero-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.asm-btn-xl { min-height: 52px; padding: 12px 22px; font-size: var(--fs-18); }
.asm-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.asm-chip { background: var(--surface-2); border-radius: 999px; padding: 4px 10px; font-size: var(--fs-13); }
.asm-otp-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: var(--fs-15); }
.asm-otp-line.danger { color: var(--danger); }
.asm-otp-line > span { flex: 1 1 220px; }
.asm-voting { border-left: 4px solid var(--warn); }
.asm-voting .vote-options .btn { flex: 1 1 140px; min-height: 56px; font-size: var(--fs-18); white-space: normal; }
.asm-live-card { border-left: 4px solid var(--warn); }
.asm-receipt { display: block; font-family: ui-monospace, Menlo, monospace; opacity: .85; word-break: break-all; }
.asm-composer textarea:disabled { background: var(--surface-2); }
.asm-note { display: flex; gap: 6px; align-items: flex-start; color: var(--info); margin: 0 0 6px; }
.asm-note.warn { color: var(--warn); }
.asm-otp, .asm-scan, .asm-qr-box { display: grid; gap: 8px; }
.asm-otp-input, .asm-scan-input { font: inherit; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); width: 100%; box-sizing: border-box; }
.asm-otp-input { font-family: ui-monospace, Menlo, monospace; font-size: var(--fs-24); letter-spacing: .4em; text-align: center; }
.asm-scan-area { min-height: 60px; border-radius: var(--r-ctl); overflow: hidden; }
.asm-scan-area video { width: 100%; max-height: 50vh; object-fit: cover; }
.asm-qr { display: flex; justify-content: center; padding: 8px; background: #fff; border-radius: var(--r-ctl); }
.asm-qr svg { max-width: 100%; height: auto; }
.asm-token, .asm-hash, .asm-mono { font-family: ui-monospace, Menlo, monospace; word-break: break-all; }
.asm-token { display: block; text-align: center; padding: 8px; background: var(--surface-2); border-radius: var(--r-ctl); }
.asm-accept { display: flex; gap: 8px; align-items: center; font-weight: 600; cursor: pointer; }
.asm-accept input { width: 20px; height: 20px; accent-color: var(--primary); }
.asm-sign-list { margin-top: 10px; }
.asm-sign-row { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.center { text-align: center; }
.asm-auth .details { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); }
.asm-auth .details dd { min-width: 0; overflow-wrap: anywhere; }
.asm-auth .badge { white-space: normal; }
@media (max-width: 600px) {
  .asm-hero { flex-direction: column; padding: 14px; }
  .asm-hero-actions .btn, .asm-hero-actions a.btn { flex: 1 1 100%; white-space: normal; }
  .asm-otp-line .btn { flex: 1 1 100%; }
}

/* ---------- Contabilidade (v1.5) ---------- */
/* Conselho fiscal: comentários e pareceres */
.ctb-thread { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px; }
.ctb-thread-title { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0 0 8px; font-size: var(--fs-15); }
.ctb-comments { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 8px; }
.ctb-comment { border: 1px solid var(--border); border-radius: var(--radius); padding: 8px 12px; background: var(--surface); }
.ctb-comment-query { border-left: 4px solid var(--warn); }
.ctb-comment-reply { margin-left: 18px; background: var(--surface-2); }
.ctb-comment-head { display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.ctb-comment-body { margin: 6px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.ctb-composer, .ctb-vote { display: grid; gap: 8px; margin-top: 8px; }
.ctb-composer textarea, .ctb-vote textarea, .ctb-vote select { width: 100%; box-sizing: border-box; }
.ctb-check, .ctb-file { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ctb-file input { max-width: 100%; }
.ctb-cmt-ind { display: inline-flex; gap: 4px; align-items: center; flex-wrap: wrap; color: var(--primary); }
.ctb-opinion { white-space: pre-wrap; font: inherit; margin: 0; line-height: 1.5; max-height: 60vh; overflow: auto; }
.ctb-status-line { margin-bottom: 12px; }
.ctb-sub { margin: 14px 0 6px; font-size: var(--fs-15); }
/* Fotos */
.ctb-thumb-btn { border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 0; background: var(--surface-2); cursor: zoom-in; width: 56px; height: 56px; overflow: hidden; flex: none; }
.ctb-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.ctb-photo-box { text-align: center; }
.ctb-photo-full { max-width: 100%; max-height: 70vh; border-radius: var(--r-ctl); }
/* Leitura de medidores (pensada primeiro para o celular) */
.ctb-read { display: grid; gap: 12px; max-width: 720px; }
.ctb-read-controls { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ctb-seg { display: flex; flex-wrap: wrap; gap: 6px; }
.ctb-seg-btn { display: inline-flex; gap: 6px; align-items: center; justify-content: center; min-height: 44px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.ctb-seg-btn.active { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.ctb-comp { display: flex; gap: 6px; align-items: center; }
.ctb-progress-box { display: grid; gap: 6px; }
.ctb-progress { height: 12px; border-radius: 999px; background: var(--surface-2); overflow: hidden; border: 1px solid var(--border); }
.ctb-progress-fill { height: 100%; background: var(--ok); transition: width .3s; }
.ctb-unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin: 8px 0; }
.ctb-unit-grid.ctb-condo { grid-template-columns: 1fr; }
.ctb-unit-btn { display: inline-flex; gap: 4px; align-items: center; justify-content: center; min-height: 48px; padding: 6px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.ctb-unit-btn.read { background: var(--ok-soft); color: var(--ok); border-color: var(--ok); }
.ctb-unit-btn.pending { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.ctb-unit-btn.anomaly { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.ctb-read-panel { display: grid; gap: 10px; }
.ctb-read-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ctb-read-head h2 { margin: 0; font-size: var(--fs-18); flex: 1 1 auto; }
.ctb-read-form { display: grid; gap: 10px; }
.ctb-photo-preview { min-height: 120px; border: 2px dashed var(--border); border-radius: var(--radius); display: grid; place-items: center; overflow: hidden; background: var(--surface-2); }
.ctb-photo-preview img { width: 100%; max-height: 320px; object-fit: contain; display: block; }
.ctb-reading-label { display: grid; gap: 4px; font-weight: 600; }
.ctb-reading-input { font-size: var(--fs-32); padding: 10px 12px; border: 2px solid var(--border); border-radius: var(--radius); width: 100%; box-sizing: border-box; font-variant-numeric: tabular-nums; background: var(--surface); color: var(--text); }
.ctb-reading-input:focus { border-color: var(--primary); outline: none; }
.ctb-calc { display: grid; gap: 6px; }
.ctb-calc-value { font-size: var(--fs-18); }
.ctb-read-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ctb-read-actions .btn { flex: 1 1 160px; justify-content: center; min-height: 48px; }
.ctb-anomaly { color: var(--danger); display: inline-flex; gap: 2px; align-items: flex-start; }
@media (max-width: 600px) {
  .ctb-seg-btn { flex: 1 1 0; padding: 8px 6px; }
  .ctb-read-controls .ctb-seg { width: 100%; }
  .ctb-comment-reply { margin-left: 8px; }
}

/* ---------- Etapa 1 UX (v1.6): paginação, valores, links de linha ---------- */
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; }
.pager .select-sm, .select-sm { min-width: 0; padding: 6px 30px 6px 10px; font-size: var(--fs-13); background-position: right 8px center; }
.neg, .stat-value.neg { color: var(--danger); }
.stat > div { min-width: 0; } /* valores longos (datas) quebram; "R$ 1.234,56" não, pelo espaço não separável */
td.right { white-space: nowrap; }
.row-link { color: inherit; text-decoration: none; font-weight: inherit; }
.row-link:hover { text-decoration: underline; }
.table-click tbody tr:focus-visible { outline: 2px solid var(--primary-2); outline-offset: -2px; }
.btn-danger-outline { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger-outline:hover { background: var(--danger-soft); }
.actions-split { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; width: 100%; }
.modal-actions { flex-wrap: wrap; }
.modal-actions > .btn-danger-outline:first-child { margin-right: auto; } /* ação destrutiva afastada das demais */
.month-nav { display: flex; align-items: center; gap: 4px; }
.month-nav-label { min-width: 150px; text-align: center; }

/* ---------- Etapa 2 UX (v1.6): menu em grupos, menu fininho, tema, painéis, busca, tabelas ---------- */
.sidebar { transition: width .25s ease; z-index: 10; }
.sidebar .brand { position: relative; }
.brand-text { min-width: 0; }
.brand-home { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1; color: inherit; text-decoration: none; border-radius: var(--r-ctl); }
.brand-home:hover { text-decoration: none; }
.brand-text strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-collapse { position: absolute; right: -24px; top: 10px; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); transition: transform .25s ease; z-index: 2; }
.nav-collapse:hover { color: var(--primary); border-color: var(--primary-2); }
.nav-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 4px 0 6px; padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface-2); color: var(--muted); font: inherit; font-size: var(--fs-15); cursor: pointer; text-align: left; }
.nav-search:hover { border-color: var(--primary-2); }
.nav-cta { width: 100%; justify-content: center; gap: 8px; margin: 2px 0 8px; flex-shrink: 0; }
.nav-search kbd { margin-left: auto; font: 600 .7rem/1 system-ui, sans-serif; padding: 3px 5px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); }
.nav-text { transition: opacity .2s ease; white-space: nowrap; }
.nav-group { padding: 1px 0; }
.nav-group-head { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: var(--r-ctl); background: none; color: var(--text); font: inherit; font-size: var(--fs-15); font-weight: 600; cursor: pointer; text-align: left; }
.nav-group-head:hover { background: var(--surface-2); }
.nav-group-head .icon { color: var(--muted); transition: color .2s; }
.nav-chev { margin-left: auto; display: grid; flex-shrink: 0; color: var(--muted); transition: transform .25s ease; }
/* Rótulo longo (ex.: "Administração do Sistema") encurta com reticências em vez de empurrar a seta para fora. */
.nav-group-head > .nav-text { min-width: 0; white-space: normal; overflow-wrap: anywhere; line-height: 1.25; text-align: left; }
.nav-group-head > .icon, .nav-group-head > .nav-dot { flex-shrink: 0; }
.nav-group.open > .nav-group-head { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); }
.nav-group.open > .nav-group-head .icon, .nav-group.current > .nav-group-head .icon { color: var(--primary); }
.nav-group.open > .nav-group-head .nav-chev { transform: rotate(180deg); }
.nav-dot { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--primary); }
.nav-group.current:not(.open) .nav-dot { display: block; }
.nav-sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.nav-group.open > .nav-sub { grid-template-rows: 1fr; }
.nav-sub-inner { overflow: hidden; min-height: 0; }
.nav-fly-title { display: none; }
.nav-sub .nav-link { padding: 7px 10px 7px 40px; font-size: var(--fs-15); color: var(--muted); }
.nav-sub .nav-link:hover { color: var(--text); }
.nav-sub .nav-link.active { background: none; color: var(--primary); font-weight: 700; }
.nav-group-solo .nav-sub .nav-link { padding-left: 10px; color: var(--text); font-size: inherit; }
.nav-group-solo .nav-sub .nav-link.active { background: var(--primary-soft); }
.nav-group-solo > .nav-group-head { font-size: var(--fs-12); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 8px 10px 4px; font-weight: 700; box-shadow: none; background: none; }
.nav-group-solo > .nav-group-head > .icon { display: none; }
.nav-tip { position: fixed; left: 70px; transform: translateY(-50%); background: var(--text); color: var(--bg); font-size: var(--fs-13); padding: 5px 9px; border-radius: var(--r-ctl); pointer-events: none; z-index: 60; white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .nav-sub, .nav-chev, .sidebar, .nav-text, .nav-collapse { transition: none; } }

/* Menu fininho (só acima de 900px; no celular há gaveta e barra inferior) */
@media (min-width: 901px) {
  .nav-mini { --sidebar: 62px; }
  .nav-mini .sidebar { padding-left: 8px; padding-right: 8px; }
  .nav-mini .nav-text, .nav-mini .nav-chev, .nav-mini .nav-group-solo > .nav-group-head { opacity: 0; width: 0; overflow: hidden; padding: 0; margin: 0; }
  .nav-mini .nav-group-solo > .nav-group-head { height: 0; }
  .nav-mini .nav-collapse { transform: rotate(180deg); }
  .nav-mini .sidebar .brand { justify-content: center; padding-left: 0; padding-right: 0; }
  .nav-mini .brand-home { flex: none; }
  .nav-mini .nav-search { justify-content: center; padding: 8px 0; }
  .nav-mini .nav-search kbd { display: none; }
  .nav-mini .nav-cta { padding: 8px 0; gap: 0; }
  .nav-mini .nav-link.solo, .nav-mini .nav-group-head { justify-content: center; padding: 9px 0; gap: 0; }
  .nav-mini .nav-group-solo > .nav-sub { grid-template-rows: 1fr; }
  .nav-mini .nav-group:not(.nav-group-solo) > .nav-sub { grid-template-rows: 0fr; }
  .nav-mini .nav-group.open > .nav-group-head { box-shadow: none; }
  .nav-mini .nav-group.current > .nav-group-head { background: var(--primary-soft); }
  .nav-mini .nav-dot { display: none !important; }
  .nav-mini .nav-group.fly > .nav-sub { position: fixed; left: 62px; display: block; min-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); box-shadow: 0 12px 30px rgba(0,0,0,.18); padding: 6px; z-index: 50; }
  .nav-mini .nav-group.fly .nav-sub-inner { overflow: visible; }
  .nav-mini .nav-group.fly .nav-fly-title { display: flex; align-items: center; gap: 8px; font-weight: 700; padding: 6px 10px 8px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
  .nav-mini .nav-group.fly .nav-sub .nav-link { padding-left: 10px; }
}
@media (max-width: 900px) { .nav-collapse { display: none; } }

/* Topo: tema, sino, avatar e painéis suspensos */
.avatar-btn { border: 0; background: none; padding: 0; cursor: pointer; border-radius: 50%; display: grid; }
.avatar-btn:focus-visible { outline: 2px solid var(--primary-2); outline-offset: 2px; }
.theme-btn .icon { transition: transform .3s ease; }
.theme-btn:hover .icon { transform: rotate(15deg); }
html { transition: background-color .25s ease; }
body, .sidebar, .card, .stat, .table-wrap, .topbar, .bottom-nav { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
.popover { position: fixed; z-index: 90; width: min(360px, calc(100vw - 16px)); max-height: min(70vh, 560px); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(0,0,0,.2); overflow: hidden; animation: fade .12s ease; }
.pop-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.link-btn { border: 0; background: none; color: var(--primary); font: inherit; font-size: var(--fs-13); cursor: pointer; padding: 0; }
.link-btn:hover { text-decoration: underline; }
.notif-pop-list { overflow-y: auto; }
.notif-pop-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); }
.notif-pop-item:hover { background: var(--surface-2); text-decoration: none; }
.notif-pop-item.unread { box-shadow: inset 3px 0 0 var(--primary); }
.pop-foot { display: block; text-align: center; padding: 10px; font-weight: 600; font-size: var(--fs-15); }
.avatar-pop { width: min(300px, calc(100vw - 16px)); }
.pop-user { display: flex; flex-direction: column; padding: 14px; border-bottom: 1px solid var(--border); }
.pop-menu { display: flex; flex-direction: column; padding: 6px; }
.pop-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-ctl); color: var(--text); border: 0; background: none; font: inherit; cursor: pointer; text-align: left; width: 100%; }
.pop-link:hover { background: var(--surface-2); text-decoration: none; }
.pop-link.danger { color: var(--danger); margin: 0 6px 6px; width: auto; }
.pop-theme { display: flex; flex-direction: column; gap: 6px; padding: 8px 14px 12px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.seg-btn { display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-13); font-weight: 600; padding: 6px 10px; border-radius: var(--r-ctl); cursor: pointer; }
.seg-btn.on { background: var(--surface); color: var(--primary); box-shadow: var(--shadow); }

/* Busca no menu (Ctrl+K) */
.palette { display: flex; flex-direction: column; gap: 8px; }
.palette-input { width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-15); }
.palette-input:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px var(--primary-soft); }
.palette-list { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; }
.palette-list li { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: var(--r-ctl); cursor: pointer; }
.palette-list li small { margin-left: auto; }
.palette-list li.on { background: var(--primary-soft); color: var(--primary); }

/* Tabelas: cabeçalho fixo, ordenação, seleção, filtros em etiquetas e ações em lote */
.table-scroll { max-height: calc(100vh - 150px); overflow: auto; }
.table-scroll .table thead th { position: sticky; top: 0; z-index: 2; }
.th-sort { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 0; font: inherit; color: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.th-sort:hover, .th-sort.active { color: var(--primary); }
.th-arrow { font-size: .85em; opacity: .55; }
.th-sort.active .th-arrow { opacity: 1; }
.th-check, .td-check { width: 36px; }
.th-check input, .td-check input { width: 17px; height: 17px; accent-color: var(--primary); cursor: pointer; }
.table tbody tr.selected td { background: var(--primary-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 999px; background: var(--primary-soft); color: var(--primary); font-size: var(--fs-13); font-weight: 600; }
.chip-x { display: grid; place-items: center; width: 20px; height: 20px; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.chip-x:hover { background: var(--surface); }
.chip-clear { border: 0; background: none; color: var(--muted); font: inherit; font-size: var(--fs-13); cursor: pointer; text-decoration: underline; }
.selection-bar { position: sticky; bottom: 12px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: var(--r-card); background: var(--text); color: var(--bg); box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.selection-bar .btn-ghost { background: rgba(255,255,255,.14); color: inherit; }
.selection-bar .btn-ghost:hover:not(:disabled) { background: rgba(255,255,255,.24); }
.selection-bar .sel-total { margin-left: auto; font-variant-numeric: tabular-nums; }
.totals-line { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: var(--fs-15); color: var(--muted); }
.totals-line strong { color: var(--text); font-variant-numeric: tabular-nums; }
.fees-tag { display: inline-flex; align-items: center; gap: 4px; color: var(--warn); font-size: var(--fs-13); font-weight: 600; cursor: help; }
@media (max-width: 900px) {
  .selection-bar { bottom: calc(76px + var(--safe-b)); }
  .topbar .theme-btn { display: inline-grid; }
  /* A busca fica dentro do menu no celular: libera espaço para o nome do condomínio no topo */
  .topbar .topbar-search { display: none; }
}
@media (max-width: 900px) {
  .table-scroll { max-height: none; overflow: visible; }
  .td-check { justify-content: flex-start !important; }
}
/* Uma cor por etapa do fluxo e prioridade como ponto (fora da paleta dos badges de situação) */
:root { --violet: #6d3fc0; --violet-soft: #efe8fb; --teal: #0e7490; --teal-soft: #e0f3f7; --orange: #b45309; --orange-soft: #fdeedc; }
:root[data-theme="dark"] { --violet: #b69cf5; --violet-soft: #2b2140; --teal: #5cc8dc; --teal-soft: #12313a; --orange: #f5a25a; --orange-soft: #3b2512; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --violet: #b69cf5; --violet-soft: #2b2140; --teal: #5cc8dc; --teal-soft: #12313a; --orange: #f5a25a; --orange-soft: #3b2512; } }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-teal { background: var(--teal-soft); color: var(--teal); }
.badge-orange { background: var(--orange-soft); color: var(--orange); }
.prio { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-15); white-space: nowrap; }
.prio-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: none; }
.prio-urgente .prio-dot { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.prio-alta .prio-dot { background: var(--orange); }
.prio-media .prio-dot { background: var(--muted); }
.prio-baixa .prio-dot { background: transparent; border: 2px solid var(--border); }
.sla-late { display: inline-flex; align-items: center; gap: 4px; color: var(--danger); font-weight: 600; white-space: nowrap; }
.check-line { display: flex; align-items: center; gap: 8px; margin-top: 12px; cursor: pointer; font-size: var(--fs-15); }
.check-line input { width: 17px; height: 17px; accent-color: var(--primary); }
.nav-sub .nav-link .nav-text { white-space: normal; }
.nav-group-solo.open > .nav-group-head { box-shadow: none; background: none; }
.totals-line strong.neg { color: var(--danger); }
@media (min-width: 901px) {
  .nav-mini .nav-group.fly .nav-sub .nav-text { opacity: 1; width: auto; overflow: visible; }
  .nav-mini .nav-group.fly .nav-sub .nav-link { justify-content: flex-start; padding: 7px 10px; }
}
@media (min-width: 901px) {
  .nav-mini .nav-text, .nav-mini .nav-sub .nav-link .nav-text { white-space: nowrap; }
  .nav-mini .nav-group.fly .nav-sub .nav-link .nav-text { white-space: normal; }
  .nav-mini .nav-group.fly > .nav-sub { max-height: calc(100vh - 16px); overflow-y: auto; }
}
/* Tema no menu do avatar: três colunas iguais com o ícone em cima do nome, para "Automático" caber com folga no
   popover estreito (antes o botão selecionado encostava/passava da borda; print do Eduardo, 14/11/2026). */
.avatar-pop .seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; padding: 4px; width: 100%; box-sizing: border-box; }
.avatar-pop .seg .seg-btn { flex-direction: column; justify-content: center; min-width: 0; padding: 6px 4px; font-size: var(--fs-12, 12px); gap: 2px; line-height: 1.2; border-radius: 14px; white-space: nowrap; }
@media (max-width: 900px) { .sidebar { z-index: 40; } .nav-search kbd { display: none; } }

/* ---------- Etapa 3 UX (v1.6): Início, cards por status ---------- */
.stat { height: 100%; }
.stat .stat-icon, .stat-ok .stat-icon, .stat-warn .stat-icon, .stat-danger .stat-icon, .stat-info .stat-icon { background: var(--surface-2); color: var(--muted); }
.stat-attn { border-color: var(--warn); box-shadow: inset 3px 0 0 var(--warn), var(--shadow); }
.stat-attn.stat-danger { border-color: var(--danger); box-shadow: inset 3px 0 0 var(--danger), var(--shadow); }
.stat-danger:not(.stat-zero) .stat-value { color: var(--danger); }
.stat-attn.stat-warn:not(.stat-zero) .stat-value { color: var(--warn); }
.stat-zero { padding: 10px 14px; }
.stat-zero .stat-value { color: var(--muted); font-size: var(--fs-18); }
.stat-zero .stat-icon { width: 32px; height: 32px; }
.home-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: var(--radius); background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-2); }
.home-banner:hover { text-decoration: none; filter: brightness(.98); }
.home-banner > div { flex: 1; min-width: 0; }
.home-banner.live { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.attn-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; color: var(--warn); }
.attn-head h2 { color: var(--text); }
.attn-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.attn-item { display: grid; grid-template-columns: 4.5rem 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-ctl); background: var(--surface-2); color: var(--text); border-left: 3px solid var(--warn); }
.attn-item:hover { text-decoration: none; background: var(--warn-soft); }
.attn-item.danger { border-left-color: var(--danger); }
.attn-item.danger .attn-value { color: var(--danger); }
.attn-item > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.attn-value { font-size: var(--fs-18); font-weight: 700; color: var(--warn); min-width: 2ch; text-align: center; font-variant-numeric: tabular-nums; }
.attn-value-txt { font-size: var(--fs-13); line-height: 1.2; overflow-wrap: anywhere; }
.home-group { display: flex; flex-direction: column; gap: 8px; }
.home-group-title { font-size: var(--fs-13); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
details.home-group > summary { display: flex; align-items: center; gap: 10px; cursor: pointer; list-style: none; min-height: 32px; font-weight: 600; }
details.home-group > summary::-webkit-details-marker { display: none; }
details.home-group > summary > .muted { text-transform: none; letter-spacing: 0; font-weight: 400; }
details.home-group > summary > svg { margin-left: auto; transition: transform .15s; }
details.home-group[open] > summary > svg { transform: rotate(180deg); }
details.home-group > .stats { margin-top: 2px; }
/* Primeiros passos (implantação) */
.onb-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.onb-head h2 { margin: 0 0 2px; }
.onb-bar { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; margin: 12px 0 8px; }
.onb-bar > span { display: block; height: 100%; background: var(--primary); border-radius: inherit; }
.onb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.onb-aviso { color: var(--warn); font-weight: 600; }
.onb-depois { margin-top: 10px; }
.onb-depois > summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--muted); font-weight: 600; }
.onb-step { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.onb-step > a { flex: 1; display: flex; flex-direction: column; gap: 2px; color: var(--text); text-decoration: none; min-width: 0; }
.onb-step > a:hover strong { text-decoration: underline; }
.onb-check { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border); color: var(--muted); }
.onb-step.done .onb-check { background: var(--ok); border-color: transparent; color: var(--surface); }
.onb-step.done strong { color: var(--muted); text-decoration: line-through; }
/* Aparência e marca da empresa (white-label) */
.brand-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 1000px) { .brand-grid { grid-template-columns: 1fr; } }
.swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.swatch { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: var(--fs-13); cursor: pointer; }
.swatch.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); font-weight: 600; }
.swatch-dot { width: 16px; height: 16px; border-radius: 50%; }
.swatch input[type=color] { width: 22px; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.logo-row { display: flex; gap: 10px; flex-wrap: wrap; }
.logo-box { flex: 1 1 180px; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px; border: 1px dashed var(--border); border-radius: var(--r-card); background: #f4f6f5; color: #17201d; text-align: center; }
.logo-box.dark { background: #0e1412; color: #e6eeeb; border-color: #2a3632; }
.brand-preview { display: grid; gap: 10px; }
.bp { display: grid; grid-template-columns: 120px 1fr; border: 1px solid var(--border); border-radius: var(--r-card); overflow: hidden; background: var(--bg); color: var(--text); font-size: var(--fs-12); }
.bp-side { background: var(--surface); border-right: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; gap: 3px; }
.bp-brand { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-width: 0; }
.bp-brand strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bp-logo { width: 20px; height: 20px; border-radius: var(--r-ctl); display: grid; place-items: center; background: var(--primary); color: var(--on-primary); flex: none; }
.bp-item, .bp-sub { padding: 3px 6px; border-radius: var(--r-ctl); color: var(--muted); }
.bp-item.on { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.bp-group { display: flex; gap: 4px; align-items: center; padding: 3px 6px; border-radius: var(--r-ctl); background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); font-weight: 600; }
.bp-group .icon { color: var(--primary); }
.bp-sub { padding-left: 22px; }
.bp-sub.on { color: var(--primary); font-weight: 700; }
.bp-main { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.bp-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 8px; }
.bp-card small { color: var(--muted); }
.bp-row { display: flex; gap: 8px; align-items: center; }
.bp-btn { background: var(--primary); color: var(--on-primary); border-radius: var(--r-ctl); padding: 4px 10px; font-weight: 600; }
.bp-badge { background: var(--primary-soft); color: var(--primary); border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.bp-link { color: var(--primary); }
/* Componentes próprios: select com seta, seletor de mês, arrastar e soltar, rolagem fina */
.select, .field select { appearance: none; -webkit-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='%235f6d68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 34px; }
/* Seta das listas no tema escuro (a cor da seta clara some no fundo escuro). */
:root[data-theme="dark"] .select, :root[data-theme="dark"] .field select { 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='%2394a59f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .select, :root:not([data-theme="light"]) .field select { 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='%2394a59f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
}
input.select, .month-btn { background-image: none; padding-right: 12px; }
.field select[multiple] { background-image: none; padding-right: 12px; }
.month-input { position: relative; display: inline-flex; }
.field .month-input { display: flex; }
.month-btn { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; text-align: left; min-width: 150px; width: 100%; }
.month-btn span { flex: 1; }
.month-btn .icon { color: var(--muted); }
.month-pop { position: absolute; z-index: 95; top: calc(100% + 6px); left: 0; width: 248px; padding: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); box-shadow: 0 16px 40px rgba(0,0,0,.2); }
.mp-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.mp-m { border: 0; background: none; padding: 8px 0; border-radius: var(--r-ctl); font: inherit; font-size: var(--fs-13); color: var(--text); cursor: pointer; text-transform: capitalize; }
.mp-m:hover:not(:disabled) { background: var(--surface-2); }
.mp-m.now { box-shadow: inset 0 0 0 1px var(--primary-2); }
.mp-m.on { background: var(--primary); color: var(--on-primary); font-weight: 600; }
.mp-m:disabled { opacity: .35; cursor: default; }
.mp-foot { display: flex; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.field-label { font-size: var(--fs-13); font-weight: 600; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 18px 14px; border: 2px dashed var(--border); border-radius: var(--r-card); background: var(--surface-2); color: var(--muted); text-align: center; cursor: pointer; position: relative; transition: border-color .15s, background-color .15s; }
.dropzone strong { color: var(--text); }
.dropzone:hover, .dropzone.over, .dropzone:focus-within { border-color: var(--primary-2); background: var(--primary-soft); }
.drop-input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.drop-preview { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: center; color: var(--text); }
.drop-preview img { max-width: 120px; max-height: 90px; border-radius: var(--r-ctl); object-fit: cover; border: 1px solid var(--border); }
* { scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: var(--r-ctl); }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-button { display: none; height: 0; width: 0; }
/* Calendário: eventos sem corte (até 2 linhas; o texto completo aparece ao passar o mouse) */
.calendar .cal-ev { white-space: normal; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; padding: 2px 4px; }
@media (max-width: 600px) { .calendar .cal-ev { display: block; -webkit-line-clamp: unset; } }

/* Quem pediu menos movimento ao sistema operacional: sem animações nem transições (WCAG 2.3.3). */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* Meus boletos: o que pagar no topo; PIX com QR Code */
.pay-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-card); background: var(--primary-soft); border: 1px solid var(--primary); }
.pay-banner.overdue { background: var(--danger-soft); border-color: var(--danger); }
.pay-banner strong { font-size: var(--fs-18); }
#em-aberto { scroll-margin-top: 80px; }
.pix-box { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.pix-box .details, .pix-box code { align-self: stretch; text-align: left; }

/* Somente para leitores de tela */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* Toque (lei de Fitts): alvos de pelo menos 44 px no celular e em qualquer tela de toque, como tablet deitado (WCAG 2.5.8) */
@media (max-width: 700px), (pointer: coarse) {
  .icon-btn { width: 44px; height: 44px; }
  .avatar-btn { padding: 5px; margin: -5px; }
  .btn, .btn-sm { min-height: 44px; }
  .chip { min-height: 36px; }
  .chip-x { width: 36px; height: 36px; margin-right: -8px; }
  details > summary { min-height: 44px; display: flex; align-items: center; }
  .pager .select-sm { min-height: 44px; }
  .field input[type=checkbox] { width: 22px; height: 22px; }
  .field-check label { min-height: 44px; display: flex; align-items: center; gap: 10px; }
  .nav-link, .tab { min-height: 44px; }
  .nav-collapse::after { content: ''; position: absolute; inset: -10px; border-radius: 50%; } /* área de toque de 44 px sem aumentar o botão */
  .field input:not([type=checkbox]):not([type=radio]):not([type=file]), .field select, .select { min-height: 44px; }
}

/* Tela de conclusão (regra do pico-final) */
.done-box { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; }
.done-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); }
.done-msg { margin: 0; }
.done-code { align-self: stretch; }
.done-next { align-self: stretch; text-align: left; background: var(--surface-2); border-radius: var(--r-ctl); padding: 10px 14px; }
.done-next ol { margin: 6px 0 0; padding-left: 20px; }
.done-next li + li { margin-top: 4px; }

/* Calendário: passados apagados, pendentes mais claros, dia tocável no celular */
.calendar .cal-day.past { opacity: .55; }
.calendar .cal-ev.pending { opacity: .7; border: 1px dashed currentColor; }
.calendar .cal-tap { cursor: pointer; }
.calendar .cal-tap:active { background: var(--surface-2); }
@media (max-width: 600px) { .calendar .cal-ev { height: 8px; border-radius: 99px; } }

/* Acessibilidade: títulos dos cartões em h2 (ordem de títulos), links dentro de texto sublinhados, atalho para o conteúdo */
.feed-title { font-size: var(--fs-18); margin: 8px 0 4px; }
p a, .prose a, .small a, .alert a, .list li > a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.skip-link { position: fixed; left: 8px; top: -60px; z-index: 300; padding: 10px 14px; min-height: 44px; display: inline-flex; align-items: center; border-radius: var(--r-ctl); background: var(--primary); color: var(--on-primary); font-weight: 600; text-decoration: none; }
.skip-link:focus { top: 8px; }
.form-dirty { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; color: var(--warn); font-size: var(--fs-13); font-weight: 600; }
.form-dirty[hidden] { display: none; }

/* Campo de data dd/mm/aaaa com botão de calendário */
.date-input { position: relative; display: flex; align-items: stretch; min-width: 0; }
.date-input .date-text { flex: 1; min-width: 0; padding-right: 44px; }
.date-input .date-btn { position: absolute; right: 2px; top: 50%; transform: translateY(-50%); width: 40px; height: 36px; display: grid; place-items: center; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--muted); cursor: pointer; }
.date-input .date-btn:hover { background: var(--surface-2); color: var(--text); }
.date-pop { left: auto; right: 0; width: 280px; }
.dp-titulo { text-transform: none; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-sem span { text-align: center; font-size: var(--fs-12, 12px); color: var(--muted); padding: 2px 0; }
.dp-d { padding: 7px 0; min-height: 40px; min-width: 0; }
.dp-sem span { min-width: 0; }
@media (max-width: 420px) { .date-pop { width: min(100%, 320px); max-width: calc(100vw - 32px); } }
.toolbar .date-input .date-text { width: 9.5em; }
/* ---------- uso do sistema: barra de progresso pequena nos Primeiros passos e cartaz A4 com QR Code ---------- */
.onb-bar-sm { display: block; height: 6px; margin-top: 6px; max-width: 240px; }
.poster-wrap { max-width: 820px; margin: 0 auto; }
.poster-actions { margin-bottom: 12px; }
.poster { background: #ffffff; color: #111111; border: 1px solid var(--border); border-radius: var(--r-card); padding: 40px 48px; text-align: center; }
.poster-kicker { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: #555555; margin: 0; }
.poster h1 { font-size: 40px; line-height: 1.1; margin: 8px 0 12px; color: #111111; }
.poster-lead { font-size: 18px; margin: 0 auto 20px; max-width: 560px; }
.poster-qr { display: inline-block; padding: 12px; border: 3px solid #111111; border-radius: 16px; line-height: 0; }
.poster-qr .qr-svg { width: 300px; }
.poster-url { font-size: 20px; font-weight: 700; margin: 12px 0 20px; word-break: break-all; }
.poster-steps { text-align: left; font-size: 18px; max-width: 600px; margin: 0 auto 20px; display: grid; gap: 10px; }
.poster-foot { font-size: 16px; color: #333333; margin: 0; }
@media print {
  .poster-actions { display: none !important; }
  .poster { border: none; padding: 0; }
  .poster-wrap { max-width: none; }
  @page { size: A4; margin: 16mm; }
}
/* ---------- modo essencial do menu (síndico) ---------- */
.nav-mode { padding: 8px 0 4px; border-top: 1px solid var(--border); margin-top: 6px; }
.nav-mode-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: none; border-radius: var(--r-ctl); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-14, 14px); cursor: pointer; text-align: left; }
.nav-mode-btn:hover { background: var(--surface-2); color: var(--text); }
.nav-mini .nav-mode-btn { justify-content: center; padding: 8px 0; }
/* ---------- reserva: grade de horários com legenda ---------- */
.slot-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: var(--fs-13); color: var(--muted); margin-bottom: 10px; }
.slot-legend span { display: inline-flex; align-items: center; gap: 6px; }
.slot-dot { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 44px; padding: 6px 4px; border-radius: var(--r-ctl); border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; }
.slot small { font-weight: 400; font-size: var(--fs-12); color: var(--muted); }
.slot-livre, .slot-dot.slot-livre { border-color: var(--ok, #2e7d32); background: var(--ok-soft, #e8f5e9); }
.slot-ocupado, .slot-dot.slot-ocupado { background: var(--surface-2); color: var(--muted); text-decoration: line-through; cursor: not-allowed; }
.slot-bloqueado, .slot-dot.slot-bloqueado { background: repeating-linear-gradient(45deg, var(--danger-soft) 0 6px, var(--surface) 6px 12px); color: var(--danger); cursor: not-allowed; }
.slot.slot-escolhido, .slot-dot.slot-escolhido { background: var(--primary); border-color: var(--primary); color: var(--on-primary); text-decoration: none; }
.slot.slot-escolhido small { color: var(--on-primary); }
.slot:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.slot-summary { margin: 10px 0 0; font-weight: 600; }
/* ---------- histórico por mês e informe anual ---------- */
.month-groups { display: grid; gap: 8px; }
.month-group { border: 1px solid var(--border); border-radius: var(--r-ctl); padding: 6px 10px; }
.month-group > summary { cursor: pointer; padding: 6px 0; display: list-item; }
.month-group > summary > * { display: inline; }
.informe { background: #ffffff; color: #111111; border: 1px solid var(--border); border-radius: var(--r-card); padding: 32px; }
.informe h1 { font-size: 24px; margin: 0 0 6px; color: #111111; }
.informe h2 { font-size: 16px; margin: 20px 0 8px; color: #111111; }
.informe-total { font-size: 18px; font-weight: 700; margin: 16px 0 8px; }
@media print { .informe { border: none; padding: 0; } }
.informe .muted, .informe .small.muted { color: #4a4f4d; }
/* ---------- esqueletos de carregamento ---------- */
.sk { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--border) 37%, var(--surface-2) 63%); background-size: 400% 100%; animation: sk-shine 1.4s ease infinite; }
.sk-block { display: grid; gap: 10px; padding: 16px 0; }
.sk-line { height: 12px; }
.sk-page { display: grid; gap: 14px; padding: 4px 0; }
.sk-title { height: 28px; width: 40%; }
.sk-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.sk-card { height: 88px; border-radius: var(--r-card); }
.sk-list { display: grid; gap: 8px; }
.sk-row { height: 44px; }
@keyframes sk-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
@media (prefers-reduced-motion: reduce) { .sk { animation: none; } }
.guia-list { display: grid; gap: 10px; padding-left: 20px; }
.guia-list li a { display: block; color: inherit; }
.guia-list li span { display: block; color: #333333; }
.label-reader { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px; border: 1px dashed var(--border); border-radius: var(--r-ctl); background: var(--surface-2); }
.kb-ask { display: flex; gap: 8px; flex-wrap: wrap; }
.kb-ask .search { flex: 1 1 260px; max-width: none; }
.kb-answer { margin-top: 12px; display: grid; gap: 8px; }
.kb-text { font-size: var(--fs-15); margin: 0; }
.kb-sources { display: grid; gap: 4px; }
.kb-sources summary { cursor: pointer; font-weight: 600; }
pre.terms-box { white-space: pre-wrap; word-break: break-word; overflow-x: hidden; font-family: inherit; }
.modal select.input { width: 100%; }
.text-danger { color: var(--danger); }
.bench-good { color: var(--ok); font-weight: 700; }
.bench-bad { color: var(--danger); font-weight: 700; }

/* Documentação técnica (markdown) dentro do app */
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md h2, .md h3, .md h4, .md h5 { margin: 1.2em 0 .4em; }
.md h2:first-child { margin-top: 0; }
.md code { background: var(--surface-2); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
.md { min-width: 0; max-width: 100%; }
.md pre.md-code { max-width: 100%; background: var(--surface-2); padding: 12px; border-radius: var(--r-ctl); overflow-x: auto; font-size: var(--fs-13, 13px); }
.md pre.md-code code { background: none; padding: 0; }
.md blockquote { margin: .8em 0; padding: 8px 14px; border-left: 3px solid var(--primary); background: var(--surface-2); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }
.md ul, .md ol { padding-left: 1.4em; }
.md .md-table td, .md .md-table th { vertical-align: top; }

/* Códigos de recuperação do MFA */
.recovery-codes { columns: 2; gap: 24px; padding-left: 24px; margin: 12px 0; }
.recovery-codes li { margin: 4px 0; }
.recovery-codes code { font-size: var(--fs-15); letter-spacing: .04em; }
.asm-my-votes { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.asm-my-votes li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.done-extra { align-self: stretch; text-align: left; max-height: 40vh; overflow: auto; }
.toast-action { flex: none; margin: -4px 0 -4px 8px; padding: 6px 10px; min-height: 36px; border: 1px solid currentColor; border-radius: var(--r-ctl); background: transparent; color: inherit; font: inherit; font-weight: 700; cursor: pointer; }
.lock-box { display: grid; gap: 8px; }
.lock-box input[name=pin] { font-size: var(--fs-24); letter-spacing: .3em; text-align: center; }
.device-list { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 10px; }
.device-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--border); }

/* Página "Assinar": cartões de plano */
.signup { display: flex; flex-direction: column; gap: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.plan-card { text-align: left; background: var(--surface); border: 2px solid var(--border); border-radius: var(--r-card); padding: 16px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; color: inherit; font: inherit; min-height: 44px; }
.plan-card:hover { border-color: var(--primary); }
.plan-card-on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.plan-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.plan-price { font-size: 1.6rem; font-weight: 700; }
.plan-price small { font-size: .9rem; font-weight: 400; color: var(--muted); }
.plan-items { margin: 0; padding-left: 20px; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.plan-summary { background: var(--primary-soft); border-radius: var(--r-card); padding: 12px 14px; }
.plan-consulta { grid-column: 1 / -1; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; display: grid; gap: 8px; justify-items: start; }
.plan-faixa { grid-column: 1 / -1; margin: 0; }
.plan-tabela { margin: 8px 0; }
.plan-tabela summary { cursor: pointer; }
.contract-summary { margin: 8px 0 12px; }
.contract-summary ul { margin: 6px 0 0; padding-left: 18px; }

/* Página de vendas (#/conheca) e perguntas frequentes */
.sales-page { max-width: 1040px; margin: 0 auto; padding: 24px 16px 48px; }
.sales-page > .brand { margin-bottom: 8px; }
.sales-hero { padding: 32px 0 16px; }
.sales-hero h1 { font-size: clamp(28px, 6vw, 46px); line-height: 1.1; margin: 4px 0 12px; }
.sales-hero > p { font-size: 18px; max-width: 680px; }
.sales-sec { padding: 24px 0; border-top: 1px solid var(--border); }
.sales-sec h2 { margin: 0 0 12px; }
.sales-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.sales-card h3 { margin: 8px 0 6px; font-size: 17px; }
.sales-shots { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.sales-shots img { width: 100%; height: auto; border-radius: var(--r-card); box-shadow: 0 6px 20px rgba(0, 0, 0, .12); }
.sales-foot { padding-top: 24px; border-top: 1px solid var(--border); }
.faq details { border-bottom: 1px solid var(--border); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq p { margin: 8px 0 0; }
.demo-entry { background: var(--primary-soft); border-radius: var(--r-card); padding: 12px 14px; margin-bottom: 12px; }
.mfa-qr { display: flex; justify-content: center; padding: 8px; background: #fff; border-radius: 8px; width: max-content; margin: 8px auto; }

/* ---------- vidro (barras e botões): vidro fosco com desfoque do que passa por trás. Mesmo código no site e nos apps
   (Capacitor). Só barras e botões; cartões, tabelas e formulários continuam opacos para a leitura. Quem pede menos
   transparência ou mais contraste no sistema operacional, ou navegador sem backdrop-filter, vê as barras opacas. */
:root {
  --glass-bg: rgba(255, 255, 255, .82); --glass-bg-strong: rgba(255, 255, 255, .86); --glass-border: rgba(255, 255, 255, .6);
  --glass-edge: rgba(15, 30, 25, .10); --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .7); --glass-blur: saturate(180%) blur(18px);
  --glass-btn: rgba(255, 255, 255, .55);
}
:root[data-theme="dark"] {
  --glass-bg: rgba(21, 29, 26, .80); --glass-bg-strong: rgba(21, 29, 26, .84); --glass-border: rgba(255, 255, 255, .08);
  --glass-edge: rgba(0, 0, 0, .35); --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .06); --glass-btn: rgba(255, 255, 255, .07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --glass-bg: rgba(21, 29, 26, .80); --glass-bg-strong: rgba(21, 29, 26, .84); --glass-border: rgba(255, 255, 255, .08);
    --glass-edge: rgba(0, 0, 0, .35); --glass-hi: inset 0 1px 0 rgba(255, 255, 255, .06); --glass-btn: rgba(255, 255, 255, .07);
  }
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  /* Barras */
  .sidebar, .topbar, .bottom-nav {
    background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border-color: var(--glass-edge); box-shadow: var(--glass-hi);
  }
  @media (max-width: 900px) { .sidebar { background: var(--glass-bg-strong); } }
  .selection-bar {
    background: color-mix(in srgb, var(--text) 82%, transparent); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    box-shadow: 0 10px 30px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .12);
  }
  /* Botões: claros/contornados em vidro; o principal e o de perigo mantêm a cor cheia (contraste do texto) com brilho de vidro. */
  .btn-ghost, .btn-outline, .icon-btn:hover {
    background: var(--glass-btn); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
    border-color: var(--glass-border); box-shadow: var(--glass-hi), 0 1px 2px var(--glass-edge);
  }
  .btn-outline { border-color: var(--primary); }
  .btn-ghost:hover:not(:disabled), .btn-outline:hover:not(:disabled) { background: color-mix(in srgb, var(--glass-btn) 60%, var(--primary-soft)); }
  .btn-primary, .btn-danger {
    background-image: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 55%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 1px 2px rgba(0, 0, 0, .15);
  }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .sidebar, .topbar, .bottom-nav { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; border-color: var(--border); box-shadow: none; }
  .selection-bar { background: var(--text); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .btn-ghost { background: var(--surface-2); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .btn-outline { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; box-shadow: none; }
  .btn-primary, .btn-danger { background-image: none; box-shadow: none; }
}
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }

/* Seletor de mês dentro de janelas (ex.: "Gerar cobranças do mês"): abre no fluxo da janela, que cresce e rola, em vez
   de flutuar e ser cortado pela borda dela. */
.modal .month-input { display: block; }
.modal .month-pop { position: static; width: 100%; max-width: 360px; margin-top: 8px; box-shadow: none; }
.modal .month-pop .mp-m { min-height: 40px; }

/* Campos de texto e o botão do seletor de mês usam a classe .select só pelo tamanho: sem a setinha de lista. No tema
   escuro a regra da setinha tem mais peso e ela voltava repetida no fundo do campo (ex.: "Nome exibido no sistema"). */
input.select, .select.month-btn { background-image: none !important; padding-right: 12px; }

/* Demonstração: perfis em blocos clicáveis, iguais nos principais e em "Outros perfis". */
.demo-entry { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; margin-bottom: 14px; display: grid; gap: 10px; }
.demo-entry-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.demo-entry-head p { margin: 0; color: var(--muted); font-size: var(--fs-13); }
.demo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.demo-tile { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 12px; min-height: 56px; border: 1px solid var(--border); border-radius: var(--r-ctl); background: var(--surface); color: var(--text); font: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.demo-tile:hover:not(:disabled), .demo-tile:focus-visible { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); outline: none; }
.demo-tile:active:not(:disabled) { transform: translateY(1px); }
.demo-tile:disabled { opacity: .6; cursor: progress; }
.demo-tile-ic { flex: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.demo-tile-txt { flex: 1; min-width: 0; display: grid; gap: 1px; }
.demo-tile-txt strong { font-size: var(--fs-14, 14px); }
.demo-tile-txt small { color: var(--muted); font-size: var(--fs-12); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-tile-go { flex: none; color: var(--muted); }
.demo-tile:hover .demo-tile-go { color: var(--primary); }
.demo-more summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; list-style: none; font-size: var(--fs-13); font-weight: 600; color: var(--primary); padding: 4px 0; }
.demo-more summary::-webkit-details-marker { display: none; }
.demo-more summary .icon { transition: transform .15s; transform: rotate(-90deg); }
.demo-more[open] summary .icon { transform: none; }
.demo-more[open] .demo-grid { margin-top: 8px; }
.demo-pass { margin: 0; font-size: var(--fs-12); color: var(--muted); }
.demo-pass code { font-size: inherit; padding: 1px 5px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); }
@media (max-width: 420px) { .demo-grid { grid-template-columns: 1fr; } }
.demo-status { margin: 0; padding: 8px 10px; border-radius: var(--r-ctl); background: var(--danger-soft); color: var(--danger); font-size: var(--fs-13); }
.demo-status[hidden] { display: none; }
.demo-tile { touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.demo-tile.busy { border-color: var(--primary); }
.demo-tile.busy .demo-tile-go { animation: spin 0.8s linear infinite; }

/* Avisos (toasts) no alto da tela quando há uma janela aberta ou numa tela de entrada (troca de senha, MFA, códigos
   de recuperação): embaixo eles cobriam os botões Copiar/Baixar e a caixa "Guardei os códigos" no celular. */
body:has(.modal-overlay) #toasts, body:has(.auth) #toasts { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto; }

/* 1.8.5 — ajustes de usabilidade */
/* Ações rápidas da portaria: os <button> herdavam a borda padrão do navegador (os links não). */
button.quick { border: 0; font: inherit; cursor: pointer; }
/* Quadros dos logos têm fundo fixo (claro e escuro): os botões dentro deles seguem o fundo, não o tema da tela. */
.logo-box .btn { background: #ffffff; color: #17201d; border: 1px solid #c9d3cf; box-shadow: none; }
.logo-box.dark .btn { background: #1b2421; color: #e6eeeb; border-color: #3a4844; }
/* Número de notificações legível no tema escuro (texto escuro sobre o vermelho claro). */
.bell-count { color: var(--on-danger, #fff); }
/* Lista do "Pagar tudo com um PIX": alinhada à esquerda (a caixa do PIX é centralizada). */
.pix-box .pix-list { text-align: left; padding-left: 18px; margin: 8px 0; }

/* Teclado da portaria: tecla com contorno visível também no tema claro (branco sobre branco). */
.keypad-key { border: 1px solid var(--border-strong, var(--border)); background: var(--surface-2); }
/* Ações rápidas: link e botão com a mesma letra ("Rondas" saía menor que os outros). */
a.quick, button.quick { font-family: inherit; font-size: var(--fs-13); font-weight: 500; line-height: 1.3; border: 0; cursor: pointer; }
/* Caixas de marcar nunca encolhem ao lado de um texto longo (aceite do contrato no celular). */
.field input[type=checkbox], .field input[type=radio] { flex: 0 0 auto; min-width: 22px; min-height: 22px; }
/* Escolhas lado a lado (PIX / Cartão): cada opção numa linha só e do mesmo tamanho. */
.pay-forma { display: grid; gap: 8px; align-items: start; }
.pay-forma .field-check:has(input[aria-invalid=true]) { outline: 2px solid var(--danger, #c0392b); outline-offset: 2px; border-radius: var(--r-ctl, 8px); }
.chips-eq { width: 100%; }
.chips-eq { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.chips-eq .btn { white-space: nowrap; justify-content: center; min-height: 44px; border: 1px solid var(--border); }
.chips-eq .btn-primary { border-color: transparent; }

/* Página de vendas: oferta na primeira tela, barra fixa no celular, listas das seções novas */
.sales-oferta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin: 12px 0 4px; }
.sales-oferta-preco { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.sales-oferta-preco strong { font-size: clamp(30px, 8vw, 40px); line-height: 1; }
.sales-oferta-garantia { display: flex; align-items: center; gap: 8px; background: var(--primary-soft); border-radius: var(--r-card); padding: 8px 12px; font-size: 14px; }
.sales-hero-acoes .btn { min-height: 44px; }
.sales-garantia { display: flex; align-items: center; gap: 6px; font-weight: 600; margin: 10px 0 0; }
.sales-lista { margin: 6px 0 0; padding-left: 18px; }
.sales-lista li { margin: 3px 0; }
.sales-barra { display: none; }
@media (max-width: 720px) {
  .sales-hero-acoes .btn { width: 100%; justify-content: center; }
  .sales-com-barra { padding-bottom: 76px; } /* a barra fixa não cobre o rodapé da página */
  .sales-barra { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); box-shadow: 0 -4px 16px rgba(0, 0, 0, .1); transform: translateY(110%); visibility: hidden; transition: transform .2s, visibility .2s; }
  .sales-barra.on { transform: none; visibility: visible; }
  .sales-barra .btn { width: 100%; justify-content: center; min-height: 48px; }
}

/* Página Assinar: duas etapas no celular (no computador, tudo numa página só) */
.signup .so-cel { display: none; }
.signup-plano { display: flex; flex-direction: column; gap: 14px; }
.passo-tit { font-size: 1.15rem; margin: 6px 0 0; }
.passo-ind { align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.passo-barra { flex: 1 0 100%; height: 6px; border-radius: 3px; background: var(--border); overflow: hidden; }
.passo-barra i { display: block; height: 100%; background: var(--primary); }
.signup .passo-nav .btn, .signup .passo-voltar { min-height: 44px; }
@media (max-width: 720px) {
  .signup .so-cel { display: flex; }
  .signup[data-passo="1"] .passo-2, .signup[data-passo="2"] .passo-1 { display: none; }
  .signup .passo-nav .btn { width: 100%; justify-content: center; }
  .signup .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .signup .form-actions .btn, .signup .signup-ajuda .btn { width: 100%; justify-content: center; min-height: 48px; }
}
@media (min-width: 721px) {
  .signup .form-actions { justify-content: flex-start; }
}

/* 1.9.1 — portaria: busca de unidade, atualização automática, passagem de turno, teclado no celular */
.unit-picker { position: relative; }
.unit-input { width: 100%; text-transform: uppercase; }
.unit-input::placeholder { text-transform: none; }
.unit-list { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--border-strong, var(--border)); border-radius: var(--r-ctl); background: var(--surface); max-height: 260px; overflow-y: auto; box-shadow: var(--shadow); }
.unit-opt, .unit-none { min-height: 44px; display: flex; align-items: center; padding: 6px 12px; border-radius: var(--r-ctl); cursor: pointer; font-size: var(--fs-14, 1rem); touch-action: manipulation; }
.unit-none { cursor: default; color: var(--muted); }
.unit-opt:hover, .unit-opt.active { background: var(--primary-soft, var(--surface-2)); color: var(--primary); font-weight: 600; }
.portaria-stamp { white-space: nowrap; }
.portaria-stamp.stale { color: var(--danger); }
.approval-banner { margin-bottom: 10px; }
.approved-new { border-left: 4px solid var(--ok, #1a7f4b); padding-left: 8px; background: var(--ok-soft, rgba(26, 127, 75, .1)); border-radius: 6px; animation: approvedPulse 1.6s ease-out 2; }
.approved-new .badge { margin-left: 6px; }
@keyframes approvedPulse { from { background: rgba(26, 127, 75, .35); } to { background: var(--ok-soft, rgba(26, 127, 75, .1)); } }
@media (prefers-reduced-motion: reduce) { .approved-new { animation: none; } }
.undo-inline { display: inline-flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.shift-card { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.shift-card.has-pending { border-color: var(--warn, #b7791f); border-left-width: 5px; }
.shift-head { display: flex; gap: 8px 12px; flex-wrap: wrap; align-items: baseline; }
.shift-body p, .shift-item p { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.shift-label { font-weight: 600; color: var(--muted); }
.shift-pending { font-weight: 600; }
.shift-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.shift-item { padding: 10px 0; border-bottom: 1px solid var(--border); }
.shift-item:last-child { border-bottom: 0; }
/* Celular: o teclado de validação nunca fica atrás da barra fixa (espaço extra embaixo e teclas maiores). */
@media (max-width: 900px) {
  .keypad-key { min-height: 56px !important; touch-action: manipulation; }
  .qr-validate-actions { margin-bottom: 8px; }
  .shift-card .btn { min-height: 44px; }
}

/* ---------- Simulação de uso (07/11/2026): ajuda, tamanho de letra, alvos de toque */
:root.fs-grande { --fs-mult: 1.15; }
:root.fs-muito { --fs-mult: 1.3; }
.legal-doc h3 { font-size: calc(1rem * var(--fs-mult)); }
/* Aviso flutuante sempre acima da barra inferior do celular (que cresce com a letra grande). */
@media (max-width: 900px) { #toasts { bottom: calc(96px * var(--fs-mult) + var(--safe-b)); } }
/* Alvos de toque de pelo menos 44 px: links de lista do Início, caixas de marcar (com o texto como área clicável) e botões de tema. */
.list li > a:not(.btn) { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }
.quick { min-height: 44px; }
.field-check label, .check-line { min-height: 44px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.field input[type=checkbox], .check-line input[type=checkbox] { width: 22px; height: 22px; min-width: 22px; min-height: 22px; }
.theme-btn, .seg-btn { min-width: 44px; min-height: 44px; }
.bottom-link { min-height: 48px; justify-content: center; }
.tag-fixado { margin: 0 6px 0 4px; font-weight: 600; color: var(--warn); }
.ciente-ok { display: inline-flex; align-items: center; gap: 4px; color: var(--ok); }
.announcement.unread { border-left: 4px solid var(--primary); }
/* Painel "Preciso de ajuda" */
.help-list { display: grid; gap: 8px; }
.help-item { display: flex; align-items: center; gap: 12px; justify-content: flex-start; text-align: left; white-space: normal; min-height: 56px; width: 100%; padding: 10px 14px; }
.help-item > span { display: flex; flex-direction: column; gap: 2px; }
.help-item-demo { border: 1px dashed var(--border); border-radius: var(--r-ctl); color: var(--text); }
.overdue-card { align-items: center; }
.overdue-card .row-actions { margin-top: 6px; }
.next-due-card { align-items: center; }
.next-due-card .row-actions { margin-top: 6px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:last-child { border-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }

/* ---------- Simulação de uso (07/11/2026): financeiro (Meus boletos, acordo, conciliação) */
.acordo-resumo { margin: 0; padding: 10px 12px; border-radius: var(--r-ctl, 8px); background: var(--primary-soft); font-weight: 700; font-size: var(--fs-16, 1rem); }
.aceite-acordo { min-height: 44px; display: flex; align-items: center; gap: 12px; cursor: pointer; }
.aceite-acordo input[type=checkbox] { width: 24px; height: 24px; min-width: 24px; min-height: 24px; flex: none; }
.acordo-parcelas > summary, .acordo-cobrancas-incl > summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; font-weight: 600; }
.card-destaque { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.destaque-vencido { border-color: var(--danger); box-shadow: 0 0 0 2px var(--danger-soft, rgba(220, 38, 38, .25)); }
.pay-banner-nota { flex-basis: 100%; margin: 0; }
.acordo-equipe fieldset { border: 1px solid var(--border); border-radius: var(--r-ctl, 8px); padding: 8px 12px; margin: 0; }
.acordo-equipe legend { font-weight: 600; padding: 0 6px; }
.acordo-total { margin: 0; font-weight: 600; }
.acordo-previa { border-top: 1px solid var(--border); padding-top: 10px; }

/* Demonstração: "Assine agora" na barra de cima do celular (compacto, sem quebrar a barra). */
@media (max-width: 900px) { .topbar-cta { flex-shrink: 0; white-space: nowrap; padding: 6px 10px; font-size: 13px; min-height: 36px; } }

/* ---- Conversas e denúncias ---- */
.cv-msgs { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.cv-msg { max-width: min(560px, 92%); padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-card); background: var(--surface-2); overflow-wrap: anywhere; }
.cv-msg.me { align-self: flex-end; background: var(--primary-soft); }
.cv-msg.sys { align-self: center; max-width: 100%; background: none; border: 0; color: var(--muted); font-size: var(--fs-13); text-align: center; }
.cv-msg.hid { border-style: dashed; color: var(--muted); font-style: italic; }
.cv-msg-head { display: flex; gap: 8px; flex-wrap: wrap; font-size: var(--fs-13); color: var(--muted); margin-bottom: 4px; }
.cv-msg-body { white-space: pre-wrap; }
.cv-compose textarea { width: 100%; min-height: 88px; }
.cv-code { font: 600 clamp(18px, 5vw, 26px)/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; padding: 14px; border: 2px dashed var(--primary); border-radius: var(--r-card); background: var(--primary-soft); text-align: center; user-select: all; overflow-wrap: anywhere; }
.cv-list-item { display: flex; flex-direction: column; gap: 2px; }
.cv-unread { font-weight: 700; }
.nav-badge { margin-left: auto; min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: var(--on-danger); font-size: var(--fs-12); line-height: 20px; text-align: center; }
.bottom-link { position: relative; }
.bottom-link .nav-badge { position: absolute; top: 0; left: 50%; margin: 0; min-width: 16px; line-height: 16px; padding: 0 4px; }

/* ---- Meus condomínios (#/meus-condominios) ---- */
.auth-card.cond-pagina { max-width: 1120px; }
.cond-painel { display: flex; flex-direction: column; gap: 16px; }
.cond-titulo { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: flex-start; justify-content: space-between; }
.cond-titulo h1 { margin: 0 0 4px; }
.cond-titulo p { margin: 0; max-width: 60ch; }
.cond-topo { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cond-topo-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-card); padding: 10px 12px; min-width: 0; }
.cond-topo-valor { font-size: var(--fs-18); font-weight: 700; overflow-wrap: anywhere; }
.cond-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 12px; align-items: start; }
.cond-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card); padding: 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cond-cab { display: flex; gap: 8px; align-items: center; color: var(--primary); }
.auth-card .cond-card .cond-cab h2 { margin: 0; font-size: var(--fs-18); font-weight: 700; letter-spacing: 0; background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--text); overflow-wrap: anywhere; }
.cond-estado { display: flex; flex-direction: column; gap: 10px; }
.cond-alertas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cond-alerta { display: flex; gap: 8px; align-items: flex-start; border-radius: var(--r-ctl); padding: 7px 10px; font-size: var(--fs-13); font-weight: 600; }
.cond-alerta svg { flex: none; margin-top: 2px; }
.cond-alerta { color: var(--text); border-left: 4px solid var(--muted); background: var(--surface-2); }
.cond-alerta-danger { background: var(--danger-soft); border-left-color: var(--danger); }
.cond-alerta-warn { background: var(--warn-soft); border-left-color: var(--warn); }
.cond-alerta-info { background: var(--info-soft); border-left-color: var(--info); }
.cond-alerta-danger svg { color: var(--danger); } .cond-alerta-warn svg { color: var(--warn); } .cond-alerta-info svg { color: var(--info); }
.cond-tudo-ok { margin: 0; color: var(--ok); font-size: var(--fs-13); display: flex; gap: 6px; align-items: center; }
.cond-numeros { display: flex; flex-direction: column; gap: 4px; font-size: var(--fs-13); }
.cond-linha { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.cond-linha strong { text-align: right; overflow-wrap: anywhere; }
.cond-linha.cond-danger strong { color: var(--danger); }
.cond-linha.cond-warn strong { color: var(--warn); }
.cond-rodape { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
@media (max-width: 480px) { .cond-titulo .row-actions { width: 100%; } .cond-titulo .row-actions .btn { flex: 1 1 auto; } }

/* Tabela de preços por faixa: legenda com a largura toda também quando a tabela vira cartões (celular). */
.plan-table caption { caption-side: top; text-align: left; padding: 0 0 8px; width: 100%; display: block; }

/* Código de acompanhamento da denúncia: cada grupo de 5 é um bloco; a linha quebra só entre os grupos e a caixa nunca
   passa da largura da janela (antes o Safari não quebrava no hífen e cortava o código à direita). */
.cv-code { overflow-wrap: normal; word-break: keep-all; max-width: 100%; min-width: 0; box-sizing: border-box; }
.cv-code-grupo { display: inline-block; white-space: nowrap; }

/* Configurações financeiras em seções recolhíveis, com atalhos no topo. */
.cfg-atalhos { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.cfg-atalho { min-height: 40px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--primary); font: inherit; font-size: var(--fs-14); font-weight: 600; cursor: pointer; }
.cfg-atalho:hover { background: var(--primary-soft); }
.cfg-secoes { display: flex; flex-direction: column; gap: 4px; }
.cfg-secao { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 10px; scroll-margin-top: 72px; }
.cfg-secao > summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; min-height: 52px; cursor: pointer; list-style: none; }
.cfg-secao > summary::-webkit-details-marker { display: none; }
.cfg-secao > summary > svg { flex: none; transition: transform .15s; color: var(--muted); }
.cfg-secao[open] > summary > svg { transform: rotate(180deg); }
.cfg-secao-titulo { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cfg-secao-corpo { padding: 0 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.cfg-secao-corpo > .card, .cfg-secao-corpo > div > .card { box-shadow: none; }
.saiba-mais { margin-top: 4px; }
.saiba-mais > summary { cursor: pointer; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.saiba-mais ul { margin: 6px 0 0; padding-left: 18px; }
.taxa-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.taxa-linha .input { width: 96px; min-height: 44px; }
.alert a.btn { text-decoration: none; }
.search-wide { width: min(480px, 100%); max-width: 100%; }
.qr-frame { width: fit-content; margin-inline: auto; }
@media (max-width: 480px) {
  .taxa-linha { display: grid; grid-template-columns: auto 1fr; gap: 6px 10px; }
  .taxa-linha > span { align-self: center; }
  .taxa-linha > .btn { grid-column: 1 / -1; }
}
.taxa-linha input.input { padding: 8px 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); font: inherit; }
@media (max-width: 480px) { .taxa-linha .input { width: 100%; } }

/* ===================================================================== "O prédio agora" (web/js/predio.js) */
.predio .pm-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.predio .pm-head .card-title { margin: 0; }
.predio .pm-head p { margin: 2px 0 0; }
.pm-head-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pm-tabs { display: flex; gap: 4px; padding: 4px; border-radius: var(--r-ctl); background: var(--surface-2); border: 1px solid var(--border); flex-wrap: wrap; }
.pm-tab { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 0; border-radius: calc(var(--r-ctl) - 2px); background: transparent; color: var(--muted); font: inherit; font-size: var(--fs-13, 13px); font-weight: 600; cursor: pointer; }
.pm-tab:hover { color: var(--text); }
.pm-tab.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.pm-corpo { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.pm-mapa { flex: 999 1 520px; min-width: 0; }
.pm-blocos { display: flex; gap: 28px; flex-wrap: wrap; overflow-x: auto; padding: 4px 2px 8px; }
.pm-bloco { display: flex; flex-direction: column; gap: 6px; }
.pm-bloco-nome { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 4px 30px; }
.pm-andar { display: flex; align-items: center; gap: 6px; }
.pm-andar-n { width: 24px; flex: none; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pm-un { min-width: 54px; height: 40px; padding: 0 6px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--muted);
  font: inherit; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; }
.pm-un:hover { transform: translateY(-1px); color: var(--text); border-color: var(--muted); }
.pm-un:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.pm-un.pm-vaga { border-style: dashed; background: transparent; }
.pm-amostra { width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--border); background: var(--surface-2); }
.pm-ponto { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 5px; background: var(--border); border: 1px solid var(--muted); }
/* Em atraso: preenchido (mais escuro); as demais camadas: fundo suave com borda forte — diferem também na luminosidade. */
.pm-atraso { background: var(--danger); border-color: var(--danger); color: var(--on-danger); }
.pm-acordo { background: var(--warn-soft); border-color: var(--warn); color: var(--warn); box-shadow: inset 0 0 0 1px var(--warn); }
.pm-enc { background: var(--info-soft); border-color: var(--info); color: var(--info); box-shadow: inset 0 0 0 1px var(--info); }
.pm-res { background: var(--violet-soft); border-color: var(--violet); color: var(--violet); box-shadow: inset 0 0 0 1px var(--violet); }
.pm-ch { background: var(--orange-soft); border-color: var(--orange); color: var(--orange); box-shadow: inset 0 0 0 1px var(--orange); }
.pm-un.pm-atraso:hover, .pm-un.pm-acordo:hover, .pm-un.pm-enc:hover, .pm-un.pm-res:hover, .pm-un.pm-ch:hover { border-color: currentColor; }
.pm-un.pm-atraso:hover { color: var(--on-danger); border-color: var(--danger); }
.pm-un.sel { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--text); }
.pm-legenda { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: var(--fs-13, 13px); color: var(--muted); }
.pm-legenda > span { display: inline-flex; align-items: center; gap: 8px; }
.pm-amostra.pm-vaga { border-style: dashed; background: transparent; border-color: var(--muted); }
.pm-ficha { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: var(--r-card); background: var(--surface-2); border: 1px solid var(--border); }
.pm-ficha .btn { align-self: flex-start; }
.pm-ficha-num { font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.pm-fatos { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; }
.pm-fatos li { display: flex; gap: 10px; padding: 9px 0; border-top: 1px solid var(--border); }
.pm-fatos li:first-child { border-top: 0; }
.pm-fatos small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.pm-ponto.pm-atraso, .pm-ponto.pm-acordo, .pm-ponto.pm-enc, .pm-ponto.pm-res, .pm-ponto.pm-ch { box-shadow: none; }
.pm-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pm-blocos-sel { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.pm-bsel { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted); font: inherit; font-size: var(--fs-13, 13px); font-weight: 600; cursor: pointer; }
.pm-bsel:hover { color: var(--text); }
.pm-bsel.on { background: var(--text); border-color: var(--text); color: var(--surface); }
.pm-bsel-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center; font-size: 11px; box-shadow: none; }
@media (max-width: 700px) {
  .pm-tab span { display: none; }
  .pm-tab { padding: 0 10px; }
  .pm-un { min-width: 48px; }
}
.pm-bsel.on .pm-bsel-n { background: var(--surface); color: var(--text); border-color: var(--surface); }

/* Saídas pendentes da portaria (e conferência na passagem de turno): toque ≥ 44 px */
.pend-exits { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.pend-exit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.pend-exit:last-child { border-bottom: 0; }
.pend-info { display: flex; flex-direction: column; min-width: 0; }
.pend-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.pend-actions .btn, [data-visual="cristal"] .pend-actions .btn { min-height: 44px; }
.shift-check-box { margin-bottom: 12px; }

/* Indicador com valor em texto ("2 meses em análise"): fonte menor e uma linha quando couber, para não desalinhar os cartões vizinhos */
.stat-value.stat-value-txt { font-size: var(--fs-15); line-height: 1.25; }
.stat-zero .stat-value.stat-value-txt { font-size: var(--fs-15); }

/* Logo para tema claro: o cartão é sempre claro, então o botão também (no tema escuro o texto herdava a cor clara do tema) */
[data-visual] .logo-box:not(.dark) .btn, .logo-box:not(.dark) .btn { background: #ffffff; color: #17201d; border-color: #c9d3cf; }
[data-visual] .logo-box.dark .btn { background: #1b2421; color: #e6eeeb; border-color: #3a4844; }

/* Alvos de toque de 44 px em celular, tablet e telas de toque (achado M2 da auditoria 14/11/2026): a ÁREA clicável cresce; o desenho quase não muda */
@media (max-width: 900px), (pointer: coarse) {
  .btn-sm { min-height: 44px; }
  .date-input .date-btn { width: 44px; height: 44px; right: 0; }
  .chip { min-height: 36px; }
  .chip-x { width: 44px; height: 44px; margin: -8px -4px -8px 0; }
  .pm-tab, .pm-bsel { min-height: 44px; min-width: 44px; justify-content: center; }
  .pm-un { height: 44px; }
  .row-link { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .table input[type=checkbox], .th-check input, .td-check input { box-sizing: content-box; width: 22px; height: 22px; padding: 11px; margin: 0; }
  .table td.td-check input { width: 22px; height: 22px; }
  .table td.td-check { width: 48px !important; height: 48px; }
}
/* "Atrasado desde…" quebra a linha em vez de passar do cartão (B1) */
@media (max-width: 900px) { .sla-late { white-space: normal; min-width: 0; text-align: right; justify-content: flex-end; } }
@media (max-width: 900px), (pointer: coarse) {
  .link-btn { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
  .search input { min-height: 44px; }
}
@media (max-width: 900px) { html { scroll-padding-bottom: calc(96px + var(--safe-b)); } }
@media (max-width: 900px), (pointer: coarse) {
  .table td > button:not(.btn):not(.link-btn) { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }
}

/* Alvos de toque de 44 px no celular/tablet (16/11/2026): só altura mínima; o computador (≥ 1024 px) não muda. */
@media (max-width: 900px) {
  .sidebar .nav-link, .sidebar .nav-group-head, .sidebar .nav-sub .nav-link { min-height: 44px; }
  details.home-group > summary.home-group-title { min-height: 44px; }
  .nav-search, .nav-mode-btn, .brand-home { min-height: 44px; }
  .cfg-atalho { min-height: 44px; }
  .guia-list li a { min-height: 44px; display: flex; align-items: center; padding: 10px 0; }
  .guia-list li { margin-bottom: -6px; }
  /* Calendário: texto do evento quebra por palavra (e por letra só se a palavra não couber), sem corte com reticências */
  .calendar .cal-ev { font-size: 11px; letter-spacing: -.01em; overflow-wrap: anywhere; word-break: break-word; -webkit-line-clamp: 4; line-clamp: 4; min-width: 0; }
  .calendar .cal-day { min-width: 0; }
}
/* Barras de evento da agenda (8 px, sem texto, só links): a barra continua fina, mas a área de toque tem 44 px. */
@media (max-width: 600px) {
  .calendar a.cal-ev { box-sizing: content-box; height: 8px; padding: 18px 0; background-clip: content-box !important; }
}

/* "Quero que me liguem" na página de vendas (Etapa B, 21/11/2026). A isca fica fora da tela (robôs preenchem). */
.sales-ligar { display: grid; gap: 10px; max-width: 520px; }
.sales-isca { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.sales-ligar-ok { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--ok); }

@media (pointer: coarse) { .dp-d { min-height: 44px; } }

/* Aviso da taxa da reserva (24/11/2026): vermelho e negrito, nos dois temas. */
.aviso-taxa { color: var(--danger); font-weight: 700; background: var(--danger-soft); border: 1px solid var(--danger); border-radius: var(--r-ctl, 10px); padding: 10px 12px; margin: 0 0 12px; line-height: 1.45; }

/* Downloads e manual → Treinamentos por perfil (25/11/2026) */
.treinamentos { margin-top: 28px; }
.treinamentos .section-title { font-size: 1.35rem; margin: 0 0 6px; }
.treinamentos > .muted { margin: 0 0 14px; }

/* Demonstração → página de vendas (26/11/2026): "Conheça o sistema" como botão secundário (contorno claro) abaixo do "Assine agora". */
.nav-cta-grupo { display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; margin: 2px 0 10px; }
.nav-cta-grupo .nav-cta { margin: 0; }
html .nav-cta-grupo a.btn.nav-conheca, html[data-visual] .nav-cta-grupo a.btn.nav-conheca { background: transparent; color: #fff; border: 1.5px solid rgba(255, 255, 255, .55); box-shadow: none; }
html .nav-cta-grupo a.btn.nav-conheca:hover, html[data-visual] .nav-cta-grupo a.btn.nav-conheca:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }
.demo-assinar { align-items: center; }
.demo-assinar > span { flex-basis: 100%; }
.demo-assinar .btn { flex: 1 1 180px; justify-content: center; padding-inline: 14px; white-space: nowrap; }
