/* Controle financeiro — layout inspirado em dashboard moderno */
@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&family=Roboto:wght@500;600;700;800&display=swap");

/* Temas: alinhar a controle-atividade — claro bg-slate-100; escuro canvas #1e1e2e (next-themes + Tailwind) */
:root {
  --bg: #f1f5f9;
  --surface: #ffffff;
  --text: #0a0f1a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --primary: #0086c9;
  --primary-hover: #0070a8;
  --warning: #f59e0b;
  --warning-bg: #fffbeb;
  --info: #0086c9;
  --info-bg: #eff6ff;
  --success: #10b981;
  --success-bg: #ecfdf5;
  --bad: #b91c1c;
  --good: #047857;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.07);
  --radius: 10px;
  --radius-lg: 14px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  /* Valores e datas em tabelas: alinhamento vertical de vírgulas e pontos */
  --font-mono: "JetBrains Mono", "Roboto Mono", ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
  /* Números dos cards KPI (substitui Inter / mono neste bloco) */
  --font-kpi: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-tabular: "Inter", system-ui, sans-serif;
  --type-display: 1.5rem; /* 24 - page titles, hero */
  --type-title: 1.125rem; /* 18 */
  --type-body: 0.9375rem; /* 15 - base ligeiramente maior que 14px padrão */
  --type-caption: 0.8125rem; /* 13 */
  --type-micro: 0.6875rem; /* 11 - labels, meta */
  --dock-h: 64px;
  /* Alinhar ao rail do controle-atividades (w-16 / w-56 em lg) */
  --dock-rail-w-compact: 4rem;
  --dock-rail-w-expanded: 14rem;
  --dock-rail-w: var(--dock-rail-w-compact);
}
html[data-dock-size="expanded"] {
  --dock-rail-w: var(--dock-rail-w-expanded);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1e1e2e;
  --surface: #2a2a3d;
  --text: #e2e8f0;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --border: rgba(100, 116, 139, 0.45);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.45);
  --info-bg: rgba(0, 134, 201, 0.12);
  --warning-bg: rgba(245, 158, 11, 0.12);
  --success-bg: rgba(16, 185, 129, 0.12);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}
/* Evita a página toda a crescer em X (carta + dock); o scroll fica em regiões com overflow: auto */
@media (max-width: 900px) {
  html {
    overflow-x: hidden;
  }
  body.app-body {
    overflow-x: hidden;
    max-width: 100%;
  }
}
body.app-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--type-body);
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01" on, "cv05" on;
}

/* Valores monetários e colunas de números: alinhamento clássico (decimais em coluna) */
.relatorio-mensal-page__td-num,
.relatorio-mensal-page__td-mono,
.dash-mes__lista-total-val,
.cobr-grupo__tot,
.cobr-subtable .cobr-cell--num,
.status-card--dashboard .status-card__n--lg,
.status-card--dashboard .status-card__sub--valor {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}
/* Valores quantitativos dos KPI: Roboto, números tabulares */
.relatorio-mensal-page__kpi-val,
.kpi-card__value,
.kpi-card__value--currency,
.kpi-card__value--count {
  font-family: var(--font-kpi);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "lnum" 1;
}

a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
}
a:hover {
  text-decoration: underline;
}

.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;
}
.muted {
  color: var(--text-secondary);
  font-size: var(--type-caption);
  line-height: 1.5;
  font-weight: 450;
}

/* ——— Top bar (padrão semelhante a controle-atividades: título, org, utilizador em pílula) ——— */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  width: 100%;
  max-width: none;
  margin: 0;
  background: #fff;
  color: #0f172a;
  border-bottom: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  padding: 0.4rem max(0.5rem, env(safe-area-inset-right, 0px)) 0.4rem
    max(0.5rem, env(safe-area-inset-left, 0px));
}
html[data-theme="dark"] .app-topbar {
  background: #1e1e2e;
  color: #e2e8f0;
  border-bottom-color: rgba(100, 116, 139, 0.35);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
}
.app-topbar--app-shell {
  /* evita o fundo a “saltar” em modos híbridos: shell usa o mesmo token que o conteúdo */
  background: var(--bg, #fff);
  color: var(--text, #0f172a);
  border-bottom-color: var(--border, #e2e8f0);
}
html[data-theme="dark"] .app-topbar--app-shell {
  background: var(--bg, #0f172a);
  color: var(--text, #f8fafc);
  border-bottom-color: var(--border, #334155);
}
.app-topbar__block {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.1rem 0.35rem 0.35rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .app-topbar__block {
    padding: 0.15rem 0.6rem 0.45rem 0.75rem;
  }
}
.app-topbar__row1 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  width: 100%;
  box-sizing: border-box;
}
.app-topbar__row1 .app-product {
  flex: 1 1 auto;
  min-width: 0;
}
.app-product__mes-wrap {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
}
.app-product__mes-wrap .dash-mes-header {
  max-width: min(100%, 20rem);
  margin: 0;
}
@media (max-width: 520px) {
  .app-product--with-mes {
    flex-direction: column;
    align-items: flex-start;
  }
  .app-product__mes-wrap {
    width: 100%;
  }
  .app-product__mes-wrap .dash-mes-header {
    max-width: 100%;
  }
}
.app-topbar__right--tr {
  flex: 0 0 auto;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}
/* Mês de referência no topo (Início / lista mensalidades) */
.dash-mes-header {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem 0.4rem;
  flex-wrap: wrap;
  max-width: min(100%, 22rem);
  margin-right: 0.15rem;
}
.dash-mes-header__ref-kicker {
  flex: 1 0 100%;
  width: 100%;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted, #64748b);
  line-height: 1.1;
  margin: 0 0 0.1rem;
}
@media (min-width: 480px) {
  .dash-mes-header__ref-kicker {
    flex: 0 0 auto;
    width: auto;
    margin: 0 0.2rem 0 0;
  }
}
.dash-mes-header__form {
  display: inline;
  margin: 0;
}
.dash-mes-header--toolbar-line .dash-mes-header__form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}
.dash-mes-header__month-combo {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
.dash-mes-header__month {
  max-width: 8.75rem;
  min-height: 2rem;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 1.75rem 0.2rem 0.4rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 0.5rem);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-sizing: border-box;
}
.dash-mes-header__cal-ico {
  position: absolute;
  right: 0.38rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: var(--text-muted, #64748b);
  opacity: 0.85;
  line-height: 0;
}
.dash-mes-header__cal-ico svg {
  display: block;
}
.dash-mes-header--toolbar-line {
  flex-wrap: nowrap !important;
  align-items: center;
  max-width: none !important;
  margin: 0;
  gap: 0.35rem 0.45rem;
}
.dash-mes-header--toolbar-line .dash-mes-header__month {
  padding: 0.2rem 0.45rem;
  max-width: 9.5rem;
  min-width: 7.5rem;
}
.dash-mes-header__cal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0 0.2rem;
  border-radius: var(--radius-lg);
  color: var(--text-muted, #64748b);
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  cursor: pointer;
  line-height: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.dash-mes-header__cal-btn:hover {
  color: var(--primary, #0086c9);
  border-color: #cbd5e1;
  background: #f1f5f9;
}
html[data-theme="dark"] .dash-mes-header__cal-btn:hover {
  background: #1e293b;
  border-color: #475569;
  color: #7dd3fc;
}
.dash-mes-header__label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dash-mes-header__step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  min-height: 1.75rem;
  padding: 0 0.2rem;
  border-radius: var(--radius-lg);
  text-decoration: none;
  font-size: 1.15rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary, #0086c9);
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.dash-mes-header__step:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.dash-mes-header__step--void {
  opacity: 0.28;
  border-style: dashed;
  pointer-events: none;
}
html[data-theme="dark"] .dash-mes-header__step:hover {
  background: #1e293b;
}
@media (max-width: 640px) {
  .dash-mes-header {
    max-width: 100%;
  }
  .dash-mes-header__label {
    display: none;
  }
}
.app-product {
  margin: 0 0.25rem 0 0;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.25;
  color: var(--text);
  min-width: 0;
}
@media (min-width: 640px) {
  .app-product {
    font-size: 0.95rem;
  }
}
.app-product__logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.app-topbar__right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.app-topbar__settings {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  color: #64748b;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
html[data-theme="dark"] .app-topbar__settings {
  color: #94a3b8;
  background: rgba(30, 41, 59, 0.6);
  border-color: #475569;
}
.app-topbar__settings:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #0f172a;
}
html[data-theme="dark"] .app-topbar__settings:hover {
  background: rgba(51, 65, 85, 0.5);
  color: #e2e8f0;
}
.app-topbar__settings.is-active {
  border-color: #0086c9;
  color: #0086c9;
  background: #eff6ff;
}
html[data-theme="dark"] .app-topbar__settings.is-active {
  border-color: #38bdf8;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.12);
}
.app-topbar__user-wrap {
  z-index: 5;
  display: flex;
  max-width: 100%;
}
/* Pílula do utilizador (canto superior direito), como no app de referência */
.top-user {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  min-height: 2.2rem;
  max-width: min(18rem, 100vw - 2rem);
  margin: 0;
  padding: 0.12rem 0.25rem 0.12rem 0.1rem;
  border-radius: 0.9rem;
  border: 1px solid rgba(100, 116, 139, 0.55);
  background: #1e293b;
  color: #f8fafc;
  font-weight: 800;
  font-size: 0.8125rem;
  line-height: 1.1;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.2);
  transition: background 0.15s ease, border-color 0.15s ease;
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="dark"] .top-user {
  background: #0f172a;
  border-color: #64748b;
}
.top-user:hover {
  background: #1e2a3d;
  border-color: #94a3b8;
}
html[data-theme="dark"] .top-user:hover {
  background: #172033;
  border-color: #94a3b8;
}
/* Referência (controle / pílula com nome longo): sem barra decorativa; avatar com inicial em azul. */
.top-user__bar {
  display: none;
}
.top-user__avatar {
  width: 1.4rem;
  height: 1.4rem;
  margin: 0 0 0 0.2rem;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: #fff;
  color: #0086c9;
  font-size: 0.58rem;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}
@media (min-width: 500px) {
  .top-user__avatar {
    width: 1.65rem;
    height: 1.65rem;
    font-size: 0.7rem;
  }
}
/* Nome visível a partir de ~400px: “Administrador” e nomes longos alinham com a referência Adonias Junior. */
.top-user__name {
  display: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  max-width: 13.5rem;
  padding: 0 0.1rem 0 0.35rem;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
@media (min-width: 400px) {
  .top-user__name {
    display: inline-block;
    vertical-align: middle;
  }
}
@media (min-width: 500px) {
  .top-user__name {
    max-width: 11rem;
  }
}
.top-user__chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  margin: 0 0.1rem 0 0.05rem;
  flex-shrink: 0;
  color: #cbd5e1;
  transition: transform 0.2s ease;
  pointer-events: none;
}
.top-user__chev-svg {
  display: block;
}
.top-user[aria-expanded="true"] .top-user__chev {
  transform: rotate(180deg);
}
.app-topbar__orgrow {
  margin-top: 0.4rem;
  min-width: 0;
  padding: 0 0.1rem 0.05rem;
  box-sizing: border-box;
}
.app-topbar__org-label {
  margin: 0 0 0.05rem;
  font-size: 0.625rem;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  font-weight: 500;
}
html[data-theme="dark"] .app-topbar__org-label {
  color: #e2e8f0;
}
.app-org--toprow {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.2;
  color: #334155;
  font-weight: 500;
}
html[data-theme="dark"] .app-org--toprow {
  color: #e2e8f0;
}
.app-org--toprow .app-org__name {
  font-weight: 500;
}
/* Compat: páginas / estilos antigos que ainda usam .app-org sozinho */
.app-org {
  margin: 0;
  font-size: var(--type-caption);
  color: var(--text-secondary);
  line-height: 1.4;
  font-weight: 450;
}
.app-org__label {
  color: var(--text-muted);
  font-weight: 500;
  margin-right: 0.35rem;
  font-size: var(--type-micro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Resíduo do layout antigo: nunca mostrar utilizador dentro do rail */
.app-dock .dock-user {
  display: none !important;
}

/* Cabeçalho do dock: só “Menu” + expandir (como controle-atividades) */
.dock-head__row {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  min-height: 2.5rem;
}
.dock-head__row .min-w-0 {
  min-width: 0;
}
.dock-head__label {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  line-height: 1.2;
}
html[data-theme="dark"] .dock-head__label {
  color: #94a3b8;
}
.dock-head__btn {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #334155;
  flex-shrink: 0;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
  transition: background 0.12s ease, border-color 0.12s ease, transform 0.18s ease;
}
html[data-theme="dark"] .dock-head__btn {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.65);
  color: #e2e8f0;
}
.dock-head__btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
}
html[data-theme="dark"] .dock-head__btn:hover {
  background: #1e293b;
  border-color: #94a3b8;
  color: #f8fafc;
}
.dock-head__chev {
  display: block;
  transition: transform 0.18s ease;
}
/* Recolhido: seta à direita (expandir). Expandido: ícone base à esquerda (recolher). */
html:not([data-dock-size="expanded"]) .dock-head__btn .dock-head__chev {
  transform: rotate(180deg);
}

.app-user {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-icon-btn {
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--text);
  box-shadow: var(--shadow);
}
.app-icon-btn:hover {
  border-color: var(--primary);
}

.app-btn-outlined {
  padding: 0.5rem 0.875rem;
  font-size: 0.8125rem;
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
}
.app-btn-outlined:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.app-logout-form {
  margin: 0;
  display: inline;
}

/* ——— Layout com dock (móvel: em baixo; desktop: rail à esquerda) ——— */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  min-width: 0;
}
.app-layout__content {
  flex: 1 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ——— Shell + bottom dock padding ——— */
.app-shell {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.5rem;
  box-sizing: border-box;
  min-width: 0;
  overflow-x: hidden;
}

.app-shell--with-dock {
  padding-bottom: calc(1.5rem + var(--dock-h) + 12px);
}
html[data-dock="hidden"] .app-shell--with-dock {
  padding-bottom: 1.5rem;
}
@media (min-width: 901px) {
  .app-shell--with-dock {
    padding-bottom: 1.5rem;
  }
}
/* Página Lançar mensalidades: preencher altura útil (evita vazio em cinzento) + form compacto */
.app-shell--mensal-lanc {
  max-width: 1200px;
  padding-top: 0.3rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
/* Altura: cabeçalho fora do main (≈5,25rem) + dock em padding */
.app-shell--mensal-lanc.app-shell--with-dock {
  min-height: calc(100dvh - 5.25rem);
  padding-bottom: calc(0.4rem + var(--dock-h) + env(safe-area-inset-bottom, 0px));
}
.app-shell--mensal-lanc .app-breadcrumb--in-main,
.app-shell--mensal-lanc .flash {
  flex-shrink: 0;
}
.app-shell--mensal-lanc .mensal-lanc-page {
  flex: 1 1 auto;
  min-height: 0;
}
.app-shell--mensal-lanc .app-breadcrumb--in-main {
  margin-bottom: 0.2rem;
  font-size: 0.8rem;
}
@media (max-width: 900px) {
  .app-shell--mensal-lanc.app-shell--with-dock {
    min-height: 0;
  }
}

/* ——— Action bar (home) ——— */
.app-actionbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.app-actionbar__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  width: 100%;
}
.app-actionbar__head > p {
  margin: 0;
  flex: 1;
  min-width: 12rem;
}
.app-ref-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.75rem;
  margin: 0;
  font-size: 0.875rem;
}
.app-ref-form__field {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-width: 0;
}
.app-ref-form label {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.8rem;
}
.app-ref-form input[type="month"] {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  min-width: 10.5em;
}
.app-ref-form__btn {
  padding: 0.4rem 0.85rem;
  font-size: 0.8125rem;
  flex-shrink: 0;
}
.app-ref-form .btn {
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}
.app-ref-hint {
  margin: 0 0 0.5rem !important;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.app-actionbar__text p {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.app-progress {
  max-width: 280px;
}
.app-progress__label {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.35rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}
.app-progress__label > span:first-child {
  flex: 1 1 12rem;
  min-width: 0;
  line-height: 1.35;
}
.app-progress__track {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
}
.app-progress__fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.25s ease;
}
.app-actionbar__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius);
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
}
.btn--primary {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.btn--primary:hover {
  background: var(--primary-hover);
  text-decoration: none;
  color: #fff;
}
.btn--ghost {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.btn--ghost:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}

/* ——— Status cards ——— */
.status-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
@media (max-width: 800px) {
  .status-row {
    grid-template-columns: 1fr;
  }
}
.status-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem 1rem 1rem 1.25rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 4.5rem;
}
.status-card--warning {
  border-left: 4px solid var(--warning);
  background: linear-gradient(90deg, var(--warning-bg) 0%, var(--surface) 40%);
}
.status-card--info {
  border-left: 4px solid var(--info);
  background: linear-gradient(90deg, var(--info-bg) 0%, var(--surface) 40%);
}
.status-card--success {
  border-left: 4px solid var(--success);
  background: linear-gradient(90deg, var(--success-bg) 0%, var(--surface) 40%);
}
.status-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.status-card__icon--lucide {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 0;
  line-height: 0;
}
.status-card__icon--lucide .status-card__svg {
  width: 1.4rem;
  height: 1.4rem;
  flex-shrink: 0;
}
.status-card__body {
  flex: 1 1 auto;
  min-width: 0;
}
.status-card--warning .status-card__icon {
  background: #fef3c7;
  color: #b45309;
}
.status-card--info .status-card__icon {
  background: #dbeafe;
  color: #1d4ed8;
}
.status-card--info .status-card__icon--clock {
  color: #1d4ed8;
  font-size: 0;
  line-height: 0;
}
html[data-theme="dark"] .status-card--info .status-card__icon--clock {
  color: #93c5fd;
}
.status-card__svg {
  display: block;
  vertical-align: middle;
}
.status-card--success .status-card__icon {
  background: #d1fae5;
  color: #047857;
}
.status-card--success .status-card__icon--lucide {
  color: #047857;
}
html[data-theme="dark"] .status-card--warning .status-card__icon {
  background: rgba(245, 158, 11, 0.2);
  color: #fbbf24;
}
html[data-theme="dark"] .status-card--info .status-card__icon {
  background: rgba(0, 134, 201, 0.2);
  color: #93c5fd;
}
html[data-theme="dark"] .status-card--success .status-card__icon {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
}
/** Tendência mês a mês (KPI) */
.kpi-trend {
  margin: 0.45rem 0 0;
  font-size: var(--type-micro);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.kpi-trend--good {
  color: var(--good);
}
.kpi-trend--bad {
  color: var(--bad);
}
.kpi-trend--flat {
  color: var(--text-secondary);
}
html[data-theme="dark"] .kpi-trend--good {
  color: #6ee7b7;
}
html[data-theme="dark"] .kpi-trend--bad {
  color: #fca5a5;
}
html[data-theme="dark"] .kpi-trend--flat {
  color: #94a3b8;
}
.status-card__n {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  margin: 0 0 0.2rem;
}
.status-card__label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0;
}
.status-card__sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0;
}

/* ——— Section ——— */
.app-section {
  margin-bottom: 1.5rem;
}
.app-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.app-section__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ——— Deadline cards grid ——— */
.deadline-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}
@media (max-width: 700px) {
  .deadline-grid {
    grid-template-columns: 1fr;
  }
}
.deadline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  min-height: 5.5rem;
}
.deadline-card__title {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
  color: var(--text);
}
.deadline-card__client {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
}
.deadline-card__meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.deadline-card__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
}
.deadline-card__hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.tag {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tag--w {
  background: #fef3c7;
  color: #b45309;
}
.tag--b {
  background: #dbeafe;
  color: #1d4ed8;
}
.tag--g {
  background: #d1fae5;
  color: #047857;
}
html[data-theme="dark"] .tag--w { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
html[data-theme="dark"] .tag--b { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
html[data-theme="dark"] .tag--g { background: rgba(16, 185, 129, 0.2); color: #34d399; }

/* ——— Filtro em listas (clientes, regras, contas) ——— */
.app-list-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
}
.app-list-filter input[type="search"] {
  flex: 1 1 12rem;
  min-width: 0;
  font: inherit;
  padding: 0.4rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
.app-list-filter__clear {
  font-size: 0.8125rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}
.app-list-filter__clear:hover {
  text-decoration: underline;
}
/* Clientes: uma linha só (busca + botão compacto), situação embaixo */
.app-list-filter--clientes {
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
}
.app-list-filter--clientes .app-list-filter__row-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}
.app-list-filter--clientes .app-list-filter__q {
  flex: 1 1 10rem;
  min-width: 0;
  min-height: 2.125rem;
  max-height: 2.125rem;
  width: auto;
  line-height: 1.3;
  padding: 0.3rem 0.5rem;
  font: inherit;
  font-size: 0.875rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}
.app-list-filter .app-list-filter__btn,
.app-list-filter--clientes .app-list-filter__btn {
  padding: 0.3rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  min-height: 2.125rem;
  height: 2.125rem;
  flex: 0 0 auto;
  width: auto;
  align-self: center;
  box-sizing: border-box;
}
.app-list-filter--clientes .app-list-filter__row-sub {
  width: 100%;
  max-width: 20rem;
}
.app-list-filter--clientes .app-list-filter__row-sub--clientes-opts {
  max-width: none;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 1rem;
}
.app-list-filter--clientes .app-list-filter__row-sub--clientes-opts .app-list-filter__select--perfil {
  min-width: 11.5rem;
  flex: 0 1 12.5rem;
}
.clientes-filtro-ativ {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.4rem;
  line-height: 1.4;
  font-size: 0.8125rem;
}
.clientes-filtro-ativ__check {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  user-select: none;
}
.clientes-filtro-ativ__check input {
  width: 1.05rem;
  height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.clientes-filtro-ativ__label-txt {
  white-space: nowrap;
}
.clientes-filtro-ativ__meta {
  font-size: 0.75rem;
  line-height: 1.4;
  width: 100%;
  max-width: 20rem;
}
.clientes-filtro-ativ__meta strong {
  font-weight: 600;
  color: var(--text);
}
.clientes-filtro-ativ__dot {
  margin: 0 0.1rem;
}
.clientes-filtro-perf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.clientes-filtro-perf__lab {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin: 0;
}
.app-list-filter__link-subtle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}
.app-list-filter__link-subtle:hover {
  text-decoration: underline;
}
.app-list-filter--clientes .app-list-filter__row-sub .app-list-filter__select {
  width: 100%;
  min-height: 2.125rem;
  padding: 0.3rem 0.45rem;
  font-size: 0.8125rem;
}
.app-list-filter__select {
  font: inherit;
  font-size: 0.8125rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  min-width: 9rem;
}
.app-list-filter__visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.td-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.75rem;
  text-align: right;
}
.form-inline {
  display: inline-flex;
  margin: 0;
  align-items: center;
}
button.linkish {
  background: none;
  border: none;
  color: var(--primary);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0 0.15rem;
}
button.linkish:hover {
  color: var(--text);
}
button.linkish.danger {
  color: #b91c1c;
}
html[data-theme="dark"] button.linkish.danger {
  color: #f87171;
}
.app-link-sm {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}
.app-link-sm:hover {
  text-decoration: underline;
}
.app-link-sm--btn {
  background: none !important;
  border: none !important;
  padding: 0 0.15rem !important;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary) !important;
  cursor: pointer;
  text-align: inherit;
  display: inline;
  line-height: inherit;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
}
.app-link-sm--btn:hover {
  text-decoration: underline;
  color: var(--primary-hover) !important;
}
.td-actions--cliente button.linkish {
  background: none !important;
  border: none !important;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 0.15rem !important;
}
.td-actions--cliente {
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.4rem 0.85rem;
}
.td-actions--cliente .form-inline {
  display: inline-flex;
  margin: 0;
  line-height: 1;
  vertical-align: middle;
}
@media (max-width: 520px) {
  .td-actions--cliente {
    flex-wrap: wrap;
  }
}
tr.row--muted {
  opacity: 0.72;
}

/* Tabela Clientes: em ecrã estreito o scroll horizontal evita cabeçalhos/ células a sobreporem-se */
.clientes-table-scroller {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  margin: 0.2rem 0 0;
  /* alinha a sombra com o conteúdo, não “corta” o sítio de rolagem */
  overscroll-behavior-x: contain;
  /* Mantém rolagem em telas estreitas, mas sem mostrar a barra */
  scrollbar-width: none; /* Firefox */
}
.clientes-table-scroller::-webkit-scrollbar {
  height: 0; /* Chrome/Safari/Edge */
}
/* Largura mínima: colunas nunca têm de encolher a zero com table-layout:fixed (causa Nome/Situação sobrepostos) */
.clientes-table-scroller .clientes-table {
  min-width: 34rem;
  margin: 0;
}
.clientes-table {
  table-layout: fixed;
  width: 100%;
}
.clientes-table th,
.clientes-table td {
  vertical-align: middle;
}
.clientes-th-nome {
  width: 28%;
  min-width: 5.5rem;
}
.clientes-th-cont {
  width: 32%;
  min-width: 5.5rem;
}
.clientes-th-sit {
  width: 6.5rem;
  min-width: 5.5rem;
}
.clientes-th-acoes {
  width: 9.5rem;
  min-width: 8.5rem;
  text-align: right;
}
.clientes-table td:nth-child(3) {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.clientes-table td:nth-child(3) .pill,
.clientes-table td:nth-child(3) .badg {
  vertical-align: middle;
  max-width: 100%;
}
.clientes-table td:nth-child(4) {
  text-align: right;
  overflow: hidden;
  white-space: nowrap;
}
.clientes-table .td-actions--cliente {
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.clientes-table .app-link-sm--btn {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.app-actionbar--report {
  margin-bottom: 0.5rem;
}
.app-report__title {
  color: var(--text);
}

/* ——— Table in card ——— */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  margin: 0 0 1rem;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}
th,
td {
  text-align: left;
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
th {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
tr:last-child td {
  border-bottom: none;
}

.organizacao-page {
  max-width: 42rem;
}
.organizacao-page__title {
  margin: 0 0 0.5rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}
.organizacao-page__nome {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
  font-weight: 500;
}
.organizacao-page__dl {
  margin: 0;
  display: grid;
  gap: 0.75rem 1rem;
}
.organizacao-page__dl > div {
  min-width: 0;
}
.organizacao-page__dl dt {
  font-size: var(--type-micro);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  font-weight: 600;
  margin: 0 0 0.15rem;
}
.organizacao-page__dl dd {
  margin: 0;
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}
.organizacao-page__hint {
  margin: 0;
}

/* Shell estilo controle-atividade: Usuários (/people) e Log — painel, FILTROS, lista zebrada */
.ca-shell-page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0.35rem 0.65rem 1rem;
  box-sizing: border-box;
}
@media (min-width: 640px) {
  .ca-shell-page {
    padding: 0.45rem 1rem 1.15rem;
  }
}
.ca-shell-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: var(--radius-lg, 12px);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.ca-shell-panel__head {
  flex-shrink: 0;
  padding: 0.45rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 88%, var(--surface));
}
html[data-theme="dark"] .ca-shell-panel__head {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
.ca-shell-panel__title {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.ca-shell-panel__lede {
  margin: 0;
  padding: 0.65rem 0.75rem 0.5rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 48rem;
}
.ca-shell-subhead {
  margin: 0;
  padding: 0.45rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, var(--surface));
}
html[data-theme="dark"] .ca-shell-subhead {
  background: color-mix(in srgb, var(--bg) 40%, transparent);
}
.ca-shell-filtros-tag {
  flex-shrink: 0;
  padding: 0.28rem 0.75rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 94%, var(--surface));
}
html[data-theme="dark"] .ca-shell-filtros-tag {
  background: color-mix(in srgb, var(--bg) 35%, transparent);
}
.ca-shell-filtros-body {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding: 0.5rem 0.75rem 0.65rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 96%, var(--surface));
}
html[data-theme="dark"] .ca-shell-filtros-body {
  background: color-mix(in srgb, var(--bg) 28%, transparent);
}
.ca-shell-filtros-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}
.ca-shell-input-search {
  width: 100%;
  max-width: 28rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  color: var(--text);
  font-size: 0.8125rem;
}
.ca-shell-input-search::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}
.ca-shell-input-search:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--primary) 55%, var(--border));
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--primary) 22%, transparent);
}
.ca-shell-filter-empty {
  margin: 0;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  border-bottom: 1px solid var(--border);
}
.ca-shell-list {
  list-style: none;
  margin: 0;
  padding: 0;
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(70vh, 32rem);
  background: var(--surface);
}
@media (min-width: 960px) {
  .ca-shell-list {
    max-height: min(75vh, 36rem);
  }
}
.ca-shell-list__item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 85%, transparent);
  font-size: 0.8125rem;
}
@media (min-width: 640px) {
  .ca-shell-list__item {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
  }
}
.ca-shell-list__item:nth-child(even) {
  background: color-mix(in srgb, var(--bg) 35%, var(--surface));
}
.ca-shell-list__item:nth-child(odd) {
  background: var(--surface);
}
html[data-theme="dark"] .ca-shell-list__item:nth-child(even) {
  background: color-mix(in srgb, var(--bg) 55%, transparent);
}
html[data-theme="dark"] .ca-shell-list__item:nth-child(odd) {
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
.ca-shell-list__main {
  min-width: 0;
  flex: 1 1 auto;
}
.ca-shell-list__primary {
  margin: 0;
  font-weight: 500;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
}
.ca-shell-list__name {
  font-weight: 600;
}
.ca-shell-list__action {
  font-weight: 500;
  color: var(--text-secondary);
}
.ca-shell-list__item--log .ca-shell-list__primary strong {
  font-weight: 700;
}
.ca-shell-list__secondary {
  margin: 0.12rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  word-break: break-word;
}
.ca-shell-list__tertiary {
  margin: 0.08rem 0 0;
  font-size: 0.72rem;
  line-height: 1.3;
}
.ca-shell-list__entity {
  font-size: 0.7rem;
}
.ca-shell-list__meta {
  flex-shrink: 0;
  font-size: 0.75rem;
  text-align: left;
}
@media (min-width: 640px) {
  .ca-shell-list__meta {
    text-align: right;
    padding-top: 0.08rem;
  }
}
.ca-shell-list__meta--nowrap {
  white-space: nowrap;
}
.ca-shell-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.38rem;
  border-radius: 0.28rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: 1px solid color-mix(in srgb, var(--primary) 35%, var(--border));
  background: color-mix(in srgb, var(--primary) 12%, var(--surface));
  color: color-mix(in srgb, var(--primary) 95%, var(--text));
}
html[data-theme="dark"] .ca-shell-badge--sky {
  border-color: color-mix(in srgb, #38bdf8 40%, var(--border));
  background: color-mix(in srgb, #0ea5e9 18%, transparent);
  color: #e0f2fe;
}
.ca-shell-badge--sky {
  border-color: color-mix(in srgb, #0284c7 45%, var(--border));
  background: color-mix(in srgb, #e0f2fe 80%, var(--surface));
  color: #0c4a6e;
}
.ca-shell-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  padding: 2rem 1rem 2.25rem;
  text-align: center;
}
.ca-shell-empty__ico {
  color: var(--text-muted);
  opacity: 0.45;
}
.ca-shell-empty__svg {
  width: 3.5rem;
  height: 3.5rem;
}
.ca-shell-empty__svg--book {
  width: 3rem;
  height: 3rem;
  opacity: 0.55;
}
.ca-shell-empty__blob {
  fill: color-mix(in srgb, var(--border) 70%, var(--surface));
}
.ca-shell-empty__arc {
  stroke: color-mix(in srgb, var(--border) 90%, var(--text-muted));
  fill: none;
}
.ca-shell-empty__txt {
  margin: 0;
  font-size: 0.8125rem;
  max-width: 22rem;
  line-height: 1.45;
}

.pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: var(--border);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ——— Flash ——— */
.flash {
  border-radius: var(--radius);
  padding: 0.65rem 0.85rem;
  margin: 0 0 1rem;
  font-size: 0.875rem;
}
.flash.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}
.flash.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
html[data-theme="dark"] .flash.error {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.4);
  color: #fecaca;
}
html[data-theme="dark"] .flash.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
}

/* ——— Form controls (páginas internas) ——— */
label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0.5rem 0 0.25rem;
}
input,
select,
textarea,
button {
  font: inherit;
}
input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}
/* Não estilizar como primário: ações em tabela (links) e variações */
button:not(.app-icon-btn):not(.app-btn-outlined):not(.app-link-sm--btn):not(.linkish):not(.cobr-btn-excluir):not(.cobr-btn-estorno):not(
    .dock-item
  ):not(.app-dialog__help-btn):not(.top-user):not(.dock-head__btn):not(.user-menu__item--theme):not(.user-menu__logout-btn):not(
    .auth-password-toggle
  ):not(.clientes-cad-btn-buscar):not(.plano-contas__hint-btn):not(.contas-banc-form__hint-btn):not(.contas-banc-rowmenu__item) {
  padding: 0.5rem 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
}
button.secondary,
.btn.secondary {
  background: var(--surface) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}
.row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* ——— Bottom dock ——— */
.app-dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  z-index: 50;
  display: flex;
  justify-content: center;
  /* safe-area + folga: o último item (Bancos) precisa de espaço visível após rolar o scroll horizontal */
  padding: 0.4rem max(0.5rem, env(safe-area-inset-left, 0px)) calc(0.35rem + env(safe-area-inset-bottom, 0px)) max(0.6rem, calc(env(safe-area-inset-right, 0px) + 0.2rem));
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 20px rgba(15, 23, 42, 0.06);
  box-sizing: border-box;
}
html[data-theme="dark"] .app-dock {
  background: #1e1e2e;
  border-color: rgba(100, 116, 139, 0.35);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.45);
}
html[data-dock="hidden"] .app-dock {
  display: none;
}

/* ——— Dock popover (menu abre “abaixo”, estilo dropdown) ——— */
.app-dialog--dock-popover {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.14);
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}
html[data-theme="dark"] .app-dialog--dock-popover {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
.app-dialog--dock-popover::backdrop {
  background: transparent;
}
.app-dialog--dock-popover .app-dialog__foot {
  display: none;
}
.app-dialog--dock-popover .app-dialog__head {
  padding: 0.6rem 0.55rem 0.5rem 0.9rem;
}
.app-dialog--dock-popover .app-dialog__title {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--text);
  line-height: 1.25;
}
html[data-theme="dark"] .app-dialog--dock-popover .app-dialog__title {
  color: #e2e8f0;
}

/* Listagens dentro do popover do dock: mesmo ritmo do rail expandido (0,875rem, 700) + ícones .dock-ico */
.app-dialog--dock-popover .app-dialog__body.dock-popover-list {
  padding: 0.15rem 0.2rem 0.35rem 0.3rem;
}
.app-dialog--dock-popover .dock-popover-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  box-sizing: border-box;
}
.app-dialog--dock-popover .dock-popover-list > * + * {
  border-top: 1px solid var(--border);
}
.app-dialog--dock-popover a.dock-popover-link {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0.5rem 0.85rem;
  margin: 0 0.2rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  text-decoration: none;
  font-family: inherit;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.app-dialog--dock-popover a.dock-popover-link .dock-ico {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  color: var(--text-muted);
  display: block;
}
.app-dialog--dock-popover a.dock-popover-link > span {
  min-width: 0;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}
html[data-theme="dark"] .app-dialog--dock-popover a.dock-popover-link > span {
  color: #e2e8f0;
}
/* Só ações, sem título/rodapé (ex. Mensalidade) — evita mostrar título a repetir o item do rail */
.app-dialog--dock-flyout-actions .app-dialog__body.dock-popover-list--text-only {
  padding: 0.3rem 0.25rem 0.35rem 0.35rem;
}
.app-dialog--dock-flyout-actions a.dock-popover-link {
  gap: 0;
  justify-content: flex-start;
  min-height: 2.6rem;
  padding: 0.55rem 0.9rem 0.55rem 0.95rem;
}
.app-dialog--dock-flyout-actions a.dock-popover-link .dock-popover-link__txt {
  display: block;
  width: 100%;
}
/* Com o flyout aberto (rail recolhido), esconde a dica `attr(data-dock-tip)` — evita o nome a sobrepor o menu */
html:not([data-dock-size="expanded"])
  .app-dock
  .app-dock__scroller
  .dock-item.dock-item--popover[aria-expanded="true"]:hover::after,
html:not([data-dock-size="expanded"])
  .app-dock
  .app-dock__scroller
  .dock-item.dock-item--popover[aria-expanded="true"]:focus-visible::after {
  content: none !important;
  display: none !important;
  padding: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
.app-dialog--dock-popover a.dock-popover-link:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
.app-dialog--dock-popover a.dock-popover-link:hover .dock-ico {
  color: var(--text);
}
html[data-theme="dark"] .app-dialog--dock-popover a.dock-popover-link:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
html[data-theme="dark"] .app-dialog--dock-popover a.dock-popover-link:hover .dock-ico {
  color: #e2e8f0;
}
.app-dialog--dock-popover a.dock-popover-link:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}
.dock-popover__split {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.2rem 0.35rem 0.1rem;
  margin: 0;
  box-sizing: border-box;
}
.dock-popover__split .dock-popover-link--in-split {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 0.1rem 0 0.15rem;
  padding: 0.5rem 0.6rem 0.5rem 0.5rem;
}
.dock-popover__split .app-dialog__help-btn {
  margin-right: 0.4rem;
  flex-shrink: 0;
  align-self: center;
}

/* ——— Menu do utilizador (popover no topo) ——— */
.user-menu.app-dialog--dock-popover {
  border-radius: 1rem; /* rounded-2xl, alinhado a controle-atividade */
}
.user-menu .app-dialog__chrome {
  background: var(--surface);
  border-radius: 1rem;
}
.user-menu__body {
  padding: 0.4rem; /* p-1.5 aprox. */
}
.user-menu__sep {
  height: 1px;
  background: var(--border);
  margin: 0.35rem 0.35rem;
}
/* Padrão alinhado a controle-atividade: ícones em linha (sem caixas 34×34), tema com “pill” à direita, Sair laranja sem bloco sólido. */
.user-menu__item,
.user-menu__item--theme {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.35;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}
.user-menu__item--theme {
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
}
.user-menu__item:hover,
.user-menu__item--theme:hover {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(15, 23, 42, 0.06);
}
html[data-theme="dark"] .user-menu__item:hover,
html[data-theme="dark"] .user-menu__item--theme:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.08);
}
.user-menu__item:focus-visible,
.user-menu__item--theme:focus-visible {
  outline: 2px solid var(--primary, #0086c9);
  outline-offset: 1px;
}
.user-menu__lead {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #64748b;
  line-height: 0;
}
html[data-theme="dark"] .user-menu__lead {
  color: #94a3b8;
}
.user-menu__lead--sun {
  color: #f59e0b;
}
html[data-theme="dark"] .user-menu__lead--sun {
  color: #fbbf24;
}
.user-menu__theme-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  font-weight: 600;
  color: var(--text);
}
.user-menu__theme-badge {
  flex-shrink: 0;
  display: inline-block;
  max-width: 5.5rem;
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: #475569;
  font-variant-numeric: tabular-nums;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  background: #f1f5f9;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
html[data-theme="dark"] .user-menu__theme-badge {
  color: #cbd5e1;
  border-color: rgba(71, 85, 105, 0.75);
  background: rgba(30, 41, 59, 0.75);
  box-shadow: none;
}
.user-menu__logout {
  margin: 0;
  padding: 0;
  border: 0;
  width: 100%;
  background: transparent;
}
.user-menu__logout-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: #e4572e;
  font-weight: 600;
  font-size: 0.875rem;
  line-height: 1.35;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="dark"] .user-menu__logout-btn {
  color: #f5a88b;
}
.user-menu__logout-btn:hover {
  background: rgba(228, 87, 46, 0.08);
  border-color: rgba(228, 87, 46, 0.12);
}
html[data-theme="dark"] .user-menu__logout-btn:hover {
  background: rgba(234, 88, 12, 0.15);
  border-color: rgba(245, 168, 139, 0.2);
}
.user-menu__logout-btn:focus-visible {
  outline: 2px solid #e4572e;
  outline-offset: 1px;
}
html[data-theme="dark"] .user-menu__logout-btn:focus-visible {
  outline-color: #f5a88b;
}
.user-menu__lead--danger {
  color: #e4572e;
}
html[data-theme="dark"] .user-menu__lead--danger {
  color: #f5a88b;
}
.app-dock__inner {
  display: flex;
  max-width: 1200px;
  width: 100%;
  justify-content: space-around;
  align-items: center;
  flex-wrap: nowrap;
  gap: 0.1rem 0.12rem;
  /* scroll horizontal se não couberem 8 itens; padding vertical leve p/ SVG (sem scale no :active) */
  padding: 0.15rem 0.1rem 0.2rem;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  box-sizing: border-box;
}
.app-dock__inner::-webkit-scrollbar {
  display: none;
}
.app-dock__scroller {
  min-width: 0;
  flex: 1 1 auto;
}
/* Rodapé do rail (só visível no desktop) */
.app-dock__footer {
  display: none;
  flex-shrink: 0;
}

.dock-head {
  display: none;
  flex-direction: column;
  flex-shrink: 0;
  align-items: stretch;
  padding: 0.5rem 0.6rem 0.55rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
}
html[data-theme="dark"] .dock-head {
  border-bottom-color: rgba(100, 116, 139, 0.35);
  background: #1e1e2e;
}
.dock-head__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

/* Submenus: popover (clique) */

/* Desktop: barra superior do rail (só menu + expandir) */
@media (min-width: 901px) {
  .dock-head {
    display: flex;
  }
  /* Recolhido: esconder rótulo "Menu" e centrar o botão (padrão do outro app) */
  html:not([data-dock-size="expanded"]) .dock-head__label {
    display: none;
  }
  html:not([data-dock-size="expanded"]) .dock-head__row {
    justify-content: center;
  }
  html:not([data-dock-size="expanded"]) .dock-head {
    padding: 0.5rem 0.35rem 0.5rem;
  }
}
.dock-item {
  flex: 1 0 auto;
  min-width: 3.25rem;
  max-width: 5.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.15rem;
  padding: 0.25rem 0.18rem 0.35rem;
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  background: transparent;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.15;
  text-align: center;
  min-height: 2.85rem;
  box-sizing: border-box;
  overflow: visible;
  -webkit-tap-highlight-color: transparent;
}
/* Só o item com .is-active deve parecer "selecionado"; foco no teclado sem parecer 2.º ativo */
button.dock-item:focus {
  outline: none;
}
button.dock-item:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.dock-item > span {
  max-width: 5.5rem;
  overflow: visible;
  word-wrap: break-word;
  hyphens: auto;
  white-space: normal;
}
.dock-label--mensalidade {
  white-space: nowrap;
  hyphens: none;
  word-break: normal;
  font-size: 0.58rem;
}
.dock-item:hover {
  background: var(--bg);
  color: var(--text);
  text-decoration: none;
}
html[data-theme="dark"] .dock-item:not(.is-active):hover {
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
}
html[data-theme="dark"] .dock-item:not(.is-active):hover .dock-ico {
  color: #f1f5f9;
  filter: brightness(1.18) drop-shadow(0 0 3px rgba(255, 255, 255, 0.12));
}
html[data-theme="dark"] .dock-item.is-active:hover {
  background: rgba(2, 38, 67, 0.65);
}
html[data-theme="dark"] .dock-item.is-active:hover .dock-ico {
  color: #7dd3fc;
  filter: brightness(1.08) drop-shadow(0 0 4px rgba(56, 189, 248, 0.35));
}
.dock-item.is-active {
  color: #075985;
}
.dock-item.is-active .dock-ico {
  color: #0369a1;
  /* evitar transform: o scroll container cortava a escala nalguns ecrãs */
}
html[data-theme="dark"] .dock-item.is-active {
  color: #bae6fd;
}
html[data-theme="dark"] .dock-item.is-active .dock-ico {
  color: #7dd3fc;
}
@media (max-width: 900px) {
  .app-dock .dock-item.is-active {
    background: #e0f2fe;
    border-radius: 0.5rem;
  }
  html[data-theme="dark"] .app-dock .dock-item.is-active {
    background: rgba(2, 38, 67, 0.4);
  }
}

/* Mensalidade no dock abre modal (não é página): não deve parecer "selecionada". */
#btnDockMensalidade.dock-item,
#btnDockMensalidade.dock-item.is-active {
  background: transparent !important;
  color: var(--text-muted) !important;
}
html[data-theme="dark"] #btnDockMensalidade.dock-item,
html[data-theme="dark"] #btnDockMensalidade.dock-item.is-active {
  background: transparent !important;
  color: #94a3b8 !important;
}
#btnDockMensalidade.dock-item .dock-ico {
  color: var(--text-muted) !important;
}
html[data-theme="dark"] #btnDockMensalidade.dock-item .dock-ico {
  color: #94a3b8 !important;
}
.dock-ico {
  width: 1.32rem;
  height: 1.32rem;
  display: block;
  flex-shrink: 0;
  color: var(--text-muted);
  overflow: visible;
}

/* Móvel: esta media tem de vir DEPOIS da regra .dock-item base, senão `flex: 1 0 auto`
   volta a aplicar-se, os 8 itens partilham 100% da largura e o texto trunca a "Ext...". */
@media (max-width: 900px) {
  .app-dock__inner {
    justify-content: flex-start;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    scroll-behavior: smooth;
    /* fim de scroll: o último rótulo (Bancos) não fica a meio do ecrã / cortado */
    padding-inline: 0.1rem 0.85rem;
    scroll-padding-inline: 0.4rem 0.75rem;
    overscroll-behavior-x: contain;
  }
  .app-dock .dock-item {
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: unset;
    /* largura mín = conteúdo, sem encaixe forçado; sem max-width apertado */
    max-width: none;
  }
  .app-dock .dock-item .dock-ico {
    flex-shrink: 0;
  }
  .app-dock .dock-item > span {
    /* não usar min-width:0 aqui — nalguns motores o texto comía-se com ellipsis */
    text-align: center;
    max-width: 4.4rem;
    line-height: 1.1;
    word-wrap: break-word;
    word-break: break-word;
  }
  .app-dock .dock-label--mensalidade {
    max-width: none;
    white-space: nowrap;
  }
}
@media (max-width: 420px) {
  .app-dock__inner {
    padding-inline: 0.2rem 1rem;
  }
  .app-dock .dock-item {
    font-size: 0.56rem;
    line-height: 1.1;
    padding: 0.2rem 0.14rem 0.3rem;
  }
  .app-dock .dock-item > span {
    max-width: 4rem;
  }
  .app-dock .dock-label--mensalidade {
    font-size: 0.54rem;
  }
  .app-dock .dock-ico {
    width: 1.22rem;
    height: 1.22rem;
  }
}

/* Desktop: dock fixo na lateral esquerda (ícones + rótulos em coluna) */
@media (min-width: 901px) {
  .app-layout {
    flex-direction: row;
    align-items: stretch;
  }
  .app-layout__content {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
    margin-left: var(--dock-rail-w);
  }
  .app-dock {
    order: 1;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: auto;
    width: var(--dock-rail-w);
    max-width: var(--dock-rail-w);
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    border-top: none;
    border-right: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 2px 0 18px rgba(15, 23, 42, 0.05);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 0.35rem 0.1rem calc(0.3rem + env(safe-area-inset-bottom, 0));
    z-index: 60;
    transition: width 0.2s ease, max-width 0.2s ease, box-shadow 0.2s ease;
  }
  html[data-theme="dark"] .app-dock {
    border-right-color: rgba(100, 116, 139, 0.3);
    background: #1e1e2e;
    box-shadow: 2px 0 24px rgba(0, 0, 0, 0.4);
  }
  .app-dock__scroller {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }
  .app-dock__scroller .app-dock__inner {
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: stretch;
    max-width: 100%;
    width: 100%;
    padding: 0.2rem 0.1rem 0.4rem;
    gap: 0.12rem;
    overflow: visible;
  }
  .app-dock .dock-item {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 2.9rem;
    padding: 0.35rem 0.12rem 0.4rem;
    font-size: 0.58rem;
  }
  /* Recolhido: só ícones, centrados (padrão controle-atividades) */
  html:not([data-dock-size="expanded"]) .app-dock .dock-item > span {
    display: none;
  }
  html:not([data-dock-size="expanded"]) .app-dock .dock-item {
    justify-content: center;
    align-items: center;
    min-height: 2.65rem;
    padding: 0.45rem 0.1rem;
  }
  html:not([data-dock-size="expanded"]) .app-dock .dock-item.is-active {
    background: #e0f2fe;
    color: #075985;
    border-radius: 0.5rem;
  }
  html:not([data-dock-size="expanded"]) .app-dock .dock-item.is-active .dock-ico {
    color: #0369a1;
  }
  html[data-theme="dark"]:not([data-dock-size="expanded"]) .app-dock .dock-item.is-active {
    background: rgba(2, 38, 67, 0.55);
    color: #bae6fd;
  }
  html[data-theme="dark"]:not([data-dock-size="expanded"]) .app-dock .dock-item.is-active .dock-ico {
    color: #7dd3fc;
  }
  /* Dica flutuante quando o menu está recolhido (rótulos ocultos) */
  html:not([data-dock-size="expanded"]) .app-dock .app-dock__scroller .dock-item[data-dock-tip] {
    position: relative;
  }
  html:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip]:hover::after,
  html:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip]:focus-visible::after {
    content: attr(data-dock-tip);
    position: absolute;
    left: calc(100% + 6px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 500;
    padding: 0.4rem 0.55rem;
    border-radius: 0.4rem;
    background: #0f172a;
    color: #f8fafc;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
    border: 1px solid #334155;
  }
  html[data-theme="dark"]:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip]:hover::after,
  html[data-theme="dark"]:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip]:focus-visible::after {
    background: #0f172a;
    color: #f1f5f9;
    border-color: #475569;
  }
  /* Início: sem dica ao hover (só abre menu ao clicar — ver bindDock openOnHover). */
  html:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip].dock-item--tip-hover-off:hover::after,
  html:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip].dock-item--tip-hover-off:focus-visible::after {
    content: none;
    display: none;
  }
  html[data-theme="dark"]:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip].dock-item--tip-hover-off:hover::after,
  html[data-theme="dark"]:not([data-dock-size="expanded"])
    .app-dock
    .app-dock__scroller
    .dock-item[data-dock-tip].dock-item--tip-hover-off:focus-visible::after {
    content: none;
    display: none;
  }
  html[data-dock-size="expanded"] .app-dock {
    padding: 0.45rem 0.45rem calc(0.3rem + env(safe-area-inset-bottom, 0));
  }
  html[data-dock-size="expanded"] .app-dock__scroller .app-dock__inner {
    padding: 0.25rem 0.15rem 0.5rem;
    gap: 0.25rem;
  }
  html[data-dock-size="expanded"] .app-dock .dock-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 0.65rem;
    text-align: left;
    padding: 0.5rem 0.65rem;
    font-size: 0.875rem;
    min-height: 2.75rem;
    border-radius: 0.5rem;
  }
  /* Ativo: sky-50 / text-sky-800 — mesmo critério que controle-atividade (AppSidebarNav) */
  html[data-dock-size="expanded"] .app-dock .dock-item.is-active {
    background: #f0f9ff;
    color: #075985;
  }
  html[data-dock-size="expanded"] .app-dock .dock-item.is-active .dock-ico {
    color: #0369a1;
  }
  html[data-theme="dark"][data-dock-size="expanded"] .app-dock .dock-item.is-active {
    background: rgba(2, 38, 67, 0.55);
    color: #bae6fd;
  }
  html[data-theme="dark"][data-dock-size="expanded"] .app-dock .dock-item.is-active .dock-ico {
    color: #7dd3fc;
  }
  html[data-dock-size="expanded"] .app-dock .dock-ico {
    width: 1.25rem;
    height: 1.25rem;
  }
  html[data-dock-size="expanded"] .app-dock .dock-item > span {
    max-width: none;
    line-height: 1.15;
    white-space: nowrap;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text);
  }
  html[data-theme="dark"][data-dock-size="expanded"] .app-dock .dock-item > span {
    color: #e2e8f0;
  }
  html[data-dock-size="expanded"] .app-dock__footer {
    padding: 0.7rem 0.75rem 0.55rem;
    align-items: flex-start;
    text-align: left;
  }
  .app-dock .dock-item > span {
    max-width: 100%;
    line-height: 1.1;
  }
  .app-dock .dock-ico {
    width: 1.4rem;
    height: 1.4rem;
  }
  .app-dock__footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.5rem 0.15rem 0.2rem;
    border-top: 1px solid var(--border);
    text-align: center;
  }
  .app-dock__brand-mark {
    display: grid;
    place-items: center;
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 7px;
    background: #0c2347;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1;
  }
  html[data-theme="dark"] .app-dock__brand-mark {
    background: #1a3358;
  }
  .app-dock__ver {
    font-size: 0.56rem;
    color: #94a3b8;
    font-weight: 600;
    letter-spacing: 0.02em;
  }
  .app-shell--with-dock {
    padding-bottom: 1.5rem;
  }
  .app-shell--mensal-lanc.app-shell--with-dock {
    padding-bottom: 0.4rem;
  }
  .app-shell--in-layout {
    width: 100%;
    padding-left: 1.6rem;
    padding-right: 1.35rem;
  }
}

/* Grid helpers (forms) */
.grid2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}
@media (max-width: 720px) {
  .grid2 {
    grid-template-columns: 1fr;
  }
}

/* Clientes: formulário e lista lado a lado (uma coluna em ecrã estreito) */
.clientes-page-grid {
  align-items: start;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.clientes-page-grid > .card {
  min-width: 0;
}

/* Clientes cadastrados — cabeçalho tipo controle-atividade (Exportar / Ver todos) */
.clientes-lista--cad {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
}
.clientes-cad-head {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.5rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.65);
}
html[data-theme="dark"] .clientes-cad-head {
  background: rgba(15, 23, 42, 0.55);
  border-bottom-color: rgba(100, 116, 139, 0.35);
}
.clientes-cad-title {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.01em;
}
.clientes-cad-actions {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
}
a.clientes-cad-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.28rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.65);
  background: var(--surface);
  color: var(--text-secondary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
a.clientes-cad-btn:hover {
  background: var(--bg);
  border-color: rgba(100, 116, 139, 0.55);
  color: var(--text);
  text-decoration: none;
}
a.clientes-cad-btn--all {
  border-color: rgba(56, 189, 248, 0.55);
  color: var(--primary);
  background: transparent;
}
a.clientes-cad-btn--all:hover {
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.75);
  color: var(--primary-hover, #0070a8);
}
html[data-theme="dark"] a.clientes-cad-btn {
  border-color: rgba(56, 189, 248, 0.45);
  background: transparent;
  color: #bae6fd;
  box-shadow: none;
}
html[data-theme="dark"] a.clientes-cad-btn:hover {
  background: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] a.clientes-cad-btn--all {
  border-color: rgba(56, 189, 248, 0.65);
  color: #7dd3fc;
}
html[data-theme="dark"] a.clientes-cad-btn--all:hover {
  background: rgba(56, 189, 248, 0.12);
}
.clientes-cad-filtros-bar {
  flex-shrink: 0;
  padding: 0.35rem 0.85rem;
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: rgba(241, 245, 249, 0.5);
}
html[data-theme="dark"] .clientes-cad-filtros-bar {
  background: rgba(13, 18, 24, 0.65);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}
.clientes-cad-form {
  padding: 0.65rem 0.85rem 0.85rem;
  margin: 0;
}
.clientes-cad-busca-label {
  margin-bottom: 0.35rem;
}
.clientes-cad-busca-label label {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--text);
}
html[data-theme="dark"] .clientes-cad-busca-label label {
  color: #e2e8f0;
}
.clientes-cad-search-row {
  width: 100%;
}
button.clientes-cad-btn-buscar {
  min-height: 2.45rem;
  padding: 0.45rem 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  background: var(--primary);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 134, 201, 0.25);
}
button.clientes-cad-btn-buscar:hover {
  background: var(--primary-hover, #0070a8);
  color: #fff;
}
.clientes-cad-hint {
  margin: 0.5rem 0 0;
  font-size: 0.6875rem;
  line-height: 1.45;
}
@media (min-width: 640px) {
  .clientes-cad-hint {
    display: block;
  }
}
.clientes-novo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.35rem;
}
.clientes-novo-field--wide {
  grid-column: 1 / -1;
}
@media (max-width: 640px) {
  .clientes-novo-grid {
    grid-template-columns: 1fr;
  }
}
/* Checkbox + rótulo na mesma linha (NFS-e / avulso / terceiro) */
.cliente-form-flag {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0.45rem 0 0;
}
.cliente-form-flag input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  margin: 0.15rem 0 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary, #0084c9);
}
.cliente-form-flag__col {
  flex: 1;
  min-width: 0;
}
label.cliente-form-flag__label {
  display: block;
  font-weight: 500;
  margin: 0;
  line-height: 1.35;
  cursor: pointer;
}
.cliente-form-flag__hint {
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
  line-height: 1.35;
  color: var(--text-secondary);
}
.cliente-form-flag--com-ajuda {
  margin: 0.35rem 0 0.5rem;
}
.cliente-form-flag__linha-tit {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
  min-width: 0;
}
.cliente-form-flag__linha-tit label.cliente-form-flag__label {
  margin: 0;
}
.cliente-ajuda-ico {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  margin: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface, #f8fafc);
  color: var(--primary, #0084c9);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.cliente-ajuda-ico:hover {
  background: rgba(0, 132, 201, 0.08);
  border-color: var(--primary, #0084c9);
}
html[data-theme="dark"] .cliente-ajuda-ico {
  background: #0f172a;
  color: #38bdf8;
}
.app-dialog--ajuda-avulso {
  max-width: min(22rem, 92vw);
}
.app-dialog--ajuda-avulso .app-dialog__body {
  font-size: 0.92rem;
}
.form-edit-cliente .cliente-form-flag--com-ajuda {
  margin: 0.35rem 0 0.65rem;
}

/* Página: lançar mensalidades — grelha esticada; cartões com altura igual; uma coluna em ecrã estreito */
.mensal-lanc-page {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem 1rem;
  align-items: stretch;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
}
@media (max-width: 900px) {
  .mensal-lanc-page {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}
.mensal-lanc-page__card {
  margin: 0 !important;
  padding: 0.65rem 0.8rem 0.75rem !important;
  min-width: 0;
  min-height: 0;
  border-radius: var(--radius) !important;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  box-sizing: border-box;
}
.mensal-lanc-page__card .mensal-lanc-form,
.mensal-lanc-page__card form.mensal-lanc-form {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.mensal-lanc-page__card .mensal-lanc-form__actions,
.mensal-lanc-page__card form .mensal-lanc-form__actions {
  margin-top: auto;
  padding-top: 0.4rem;
}
.mensal-lanc-page__card .flash {
  flex-shrink: 0;
  margin: 0.2rem 0 0.35rem;
  font-size: 0.82rem;
  padding: 0.4rem 0.55rem;
}
.mensal-lanc-page__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.35rem 0.55rem;
  margin-bottom: 0.4rem;
  flex-shrink: 0;
}
.mensal-lanc-page__card > .mensal-lanc-page__card-title--lote {
  margin-bottom: 0.3rem;
}
.mensal-lanc-page__card > .mensal-lanc-page__card-title,
.mensal-lanc-page__card > .mensal-lanc-page__lede--lote,
.mensal-lanc-page__card > p.mensal-lanc-page__lede--lote {
  flex-shrink: 0;
}
.mensal-lanc-page__card > .mensal-lanc-form {
  margin-top: 0;
}
.mensal-lanc-page__card-title {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text);
}
.mensal-lanc-page__lede {
  margin: 0.1rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-secondary);
  max-width: 28rem;
  font-weight: 500;
}
.mensal-lanc-page__lede--lote {
  margin: 0 0 0.3rem;
  line-height: 1.3;
  max-width: none;
}
.mensal-lanc-page__lede code {
  font-size: 0.78em;
  padding: 0.1em 0.28em;
  border-radius: 4px;
  background: var(--bg);
  font-weight: 500;
}
.mensal-lanc-page__back {
  font-size: 0.78rem;
  padding: 0.32rem 0.6rem;
  min-height: 0;
  flex: 0 0 auto;
  align-self: flex-start;
}
.mensal-lanc-form label {
  margin: 0.22rem 0 0.08rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
}
.mensal-lanc-form .mensal-lanc-form__row2 {
  gap: 0.35rem 0.55rem;
  margin: 0;
}
.mensal-lanc-form input,
.mensal-lanc-form select,
.mensal-lanc-form textarea {
  font-size: 0.88rem;
  padding: 0.38rem 0.55rem;
  box-sizing: border-box;
  border-radius: 8px;
  width: 100%;
}
.mensal-lanc-form input,
.mensal-lanc-form select {
  min-height: 2.2rem;
}
.mensal-lanc-form textarea.mensal-lanc-form__textarea {
  min-height: 4rem;
  resize: vertical;
  line-height: 1.35;
  font-family: inherit;
}
.mensal-lanc-form__actions {
  margin-top: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}
.mensal-lanc-form__actions button,
.mensal-lanc-form__actions .btn {
  min-height: 2.2rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 8px;
}
.mensal-lanc-form__btn-lote {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  min-height: 2.35rem;
  font-size: 0.86rem;
}
.mensal-lanc-page .grid2 {
  gap: 0.35rem 0.5rem;
}

button.mensal-lanc-form__linkish {
  text-decoration: none;
  font-size: 0.82rem;
  padding: 0.35rem 0.6rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.mensal-lanc-dialog--plano .app-dialog__chrome {
  max-width: min(52rem, 96vw);
  width: 100%;
}
.mensal-lanc-dialog--plano__hint {
  margin: 0 0 0.5rem;
  font-size: 0.82rem;
  line-height: 1.45;
  padding: 0 0.25rem;
}
.mensal-lanc-dialog--plano__body {
  padding: 0.5rem 0.75rem 0.75rem !important;
}
.mensal-lanc-dialog--plano__iframe {
  width: 100%;
  min-height: min(70vh, 36rem);
  border: 0;
  display: block;
  border-radius: var(--radius);
  background: var(--bg);
}
.mensal-lanc-dialog--cliente .app-dialog__chrome {
  max-width: min(28rem, 96vw);
  width: 100%;
}
.mensal-lanc-dialog--cliente__form label {
  margin: 0.22rem 0 0.08rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.mensal-lanc-dialog--cliente__form input {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.88rem;
  padding: 0.38rem 0.55rem;
  border-radius: 8px;
  min-height: 2.2rem;
}

/* Página: contas bancárias — tabela em destaque; cadastro em modal */
.contas-banc-page--one-screen {
  max-height: calc(100dvh - var(--dock-h) - 8.5rem);
  display: flex;
  flex-direction: column;
  min-height: 0;
  box-sizing: border-box;
  overflow: hidden;
}
@media (max-width: 959px) {
  .contas-banc-page--one-screen {
    max-height: none;
    overflow: visible;
  }
  .contas-banc-list-card__table-wrap {
    max-height: min(40vh, 16rem);
  }
}
.contas-banc-page {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.contas-banc-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1rem;
}
.contas-banc-page__toolbar-text {
  flex: 1 1 12rem;
  min-width: 0;
}
.contas-banc-page__head {
  margin-bottom: 0.2rem;
  flex-shrink: 0;
}
.contas-banc-page__title {
  font-size: 1.1rem;
  margin-bottom: 0.1rem !important;
}
.contas-banc-page__lede {
  margin: 0;
  max-width: 42rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: var(--text-muted);
}
.contas-banc-page__main {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
  align-items: stretch;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
@media (min-width: 960px) {
  .contas-banc-page__main {
    grid-template-columns: 1fr;
  }
  .contas-banc-list-card {
    max-height: none;
    min-height: 0;
  }
}
.contas-banc-list-card--full {
  width: 100%;
  margin: 0 !important;
}
.contas-banc-list-card__head-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.55rem 0.85rem;
  margin-bottom: 0.15rem;
}
.contas-banc-list-card__head-intro {
  flex: 1 1 12rem;
  min-width: 0;
}
.contas-banc-list-card__head-intro .contas-banc-list-card__h {
  margin: 0 !important;
  line-height: 1.3;
}
.contas-banc-list-card__head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem 0.55rem;
  flex-shrink: 0;
}
.contas-banc-list-card__btn-filtro {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.15rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8125rem;
  font-weight: 600;
}
.contas-banc-ico-inline {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  opacity: 0.9;
}
.contas-banc-list-card__btn-nova {
  flex-shrink: 0;
  white-space: nowrap;
  min-height: 2.15rem;
  padding-inline: 1rem;
  font-weight: 700;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.12);
}
html[data-theme="dark"] .contas-banc-list-card__btn-nova {
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35);
}
.contas-banc-filter-chip {
  margin: 0.28rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
}
.contas-banc-filter-chip strong {
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}
.contas-banc-filter-chip__clear {
  margin-left: 0.35rem;
  font-weight: 600;
  white-space: nowrap;
}
.contas-banc-modal-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--bg);
  padding: 0.55rem 0.65rem 0.6rem;
  margin-bottom: 0.55rem;
}
.contas-banc-modal-panel:last-child {
  margin-bottom: 0;
}
.contas-banc-modal-panel--form:last-of-type {
  margin-bottom: 0.35rem;
}
.contas-banc-modal-panel__tag {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 0.4rem;
}
.contas-banc-modal-panel__tag--inline {
  display: inline;
  margin: 0 0.35rem 0 0;
  vertical-align: middle;
}
.contas-banc-modal-panel__fields {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.contas-banc-modal-panel__min-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0;
}
.contas-banc-modal-panel__fields input[type="search"],
.contas-banc-modal-panel__fields input[type="text"] {
  width: 100%;
}
.contas-banc-modal-panel__hint {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
}
.contas-banc-modal-panel--pix {
  margin-top: 0.15rem;
}
.contas-banc-dialog--filtro {
  display: flex;
  flex-direction: column;
  width: min(26rem, calc(100vw - 1.5rem));
  max-width: 26rem;
}
.contas-banc-dialog__chrome--filtro {
  max-height: none;
}
.contas-banc-form--modal-filtro {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.contas-banc-form--modal-filtro .contas-banc-dialog__body {
  padding-bottom: 0.5rem;
}
.contas-banc-dialog__foot--filtro {
  justify-content: flex-end;
  gap: 0.5rem;
}
.contas-banc-dialog__foot--filtro .secondary {
  margin-right: auto;
}
.contas-banc-dialog__foot-link {
  font-size: 0.82rem;
  font-weight: 600;
}
.contas-banc-dialog--nova {
  display: flex;
  flex-direction: column;
  width: min(40rem, calc(100vw - 1.5rem));
  max-width: 40rem;
}
.contas-banc-dialog--nova[open]::backdrop,
.contas-banc-dialog--filtro[open]::backdrop {
  animation: contas-banc-dlg-backdrop-in 0.22s ease-out;
}
@keyframes contas-banc-dlg-backdrop-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
.contas-banc-dialog--nova[open] .app-dialog__chrome,
.contas-banc-dialog--filtro[open] .app-dialog__chrome {
  animation: contas-banc-dlg-chrome-in 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes contas-banc-dlg-chrome-in {
  from {
    opacity: 0;
    transform: translateY(0.65rem) scale(0.99);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .contas-banc-dialog--nova[open]::backdrop,
  .contas-banc-dialog--nova[open] .app-dialog__chrome,
  .contas-banc-dialog--filtro[open]::backdrop,
  .contas-banc-dialog--filtro[open] .app-dialog__chrome {
    animation: none;
  }
}
.contas-banc-dialog--nova .app-dialog__chrome,
.contas-banc-dialog--filtro .app-dialog__chrome {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.contas-banc-dialog--nova .app-dialog__chrome {
  max-height: min(92dvh, 46rem);
}
.contas-banc-form--modal {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.contas-banc-form--modal .contas-banc-dialog__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.75rem;
}
.contas-banc-form--modal .contas-banc-dialog__foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.1rem 0.9rem;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.contas-banc-form__sec {
  margin-bottom: 0.65rem;
}
.contas-banc-form__sec:last-of-type {
  margin-bottom: 0.35rem;
}
.contas-banc-form__sec-title {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.contas-banc-form__pix-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  row-gap: 0.25rem;
  column-gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.contas-banc-form__pix-head .contas-banc-modal-panel__tag--inline {
  line-height: 1.25;
}
.contas-banc-form__pix-head .contas-banc-form__pix-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: min(100%, 10rem);
  text-transform: none;
  letter-spacing: -0.01em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
}
.contas-banc-form__hint-btn {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  display: grid;
  place-items: center;
}
.contas-banc-form__hint-btn:hover,
.contas-banc-form__hint-btn:focus-visible {
  color: var(--text);
  border-color: var(--text-muted);
  outline: none;
}
#novaContaPixCreateFields[hidden] {
  display: none !important;
}
.contas-banc-nome-row {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  min-width: 0;
}
.contas-banc-nome-stack {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  min-width: 0;
}
.contas-banc-nome-stack strong {
  line-height: 1.25;
  word-break: break-word;
}
.contas-banc-nome-meta {
  font-size: 0.72rem;
  line-height: 1.25;
  word-break: break-word;
}
.contas-banc-ico {
  flex-shrink: 0;
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 6px;
  margin-top: 0.06rem;
  background: var(--border);
  background-size: cover;
  background-position: center;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] .contas-banc-ico {
  box-shadow: inset 0 0 0 1px rgba(248, 250, 252, 0.08);
}
.contas-banc-ico--gen {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--surface);
}
.contas-banc-ico--itau {
  background: linear-gradient(145deg, #ec7000 0%, #b45309 100%);
}
.contas-banc-ico--bb {
  background: linear-gradient(145deg, #feefc3 0%, #ffd54f 55%, #fbc02d 100%);
}
.contas-banc-ico--inter {
  background: linear-gradient(145deg, #ff7a18 0%, #e11d48 100%);
}
.contas-banc-ico--cef {
  background: linear-gradient(145deg, #005ca9 0%, #003b78 100%);
}
.contas-banc-ico--nubank {
  background: linear-gradient(145deg, #8a05be 0%, #530082 100%);
}
.contas-banc-ico--caixa {
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(145deg, #00a859 0%, #007a41 100%);
}
.contas-banc-pix-key {
  display: block;
  font-weight: 500;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}
.contas-banc-pix-placeholder {
  font-size: 0.78rem;
  font-style: italic;
  color: var(--text-muted);
}
.contas-banc-pix-none {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.contas-banc-tr:hover {
  background: rgba(59, 130, 246, 0.07);
}
.contas-banc-tr:hover {
  background: color-mix(in srgb, var(--primary) 7%, transparent);
}
html[data-theme="dark"] .contas-banc-tr:hover {
  background: rgba(248, 250, 252, 0.045);
}
.contas-banc-th-nome,
.contas-banc-th-pix,
.contas-banc-table th:nth-child(1),
.contas-banc-table th:nth-child(2) {
  text-align: left;
}
.contas-banc-th-st,
.contas-banc-table th:nth-child(3) {
  text-align: center;
}
.contas-banc-td-nome,
.contas-banc-td-pix {
  text-align: left;
  vertical-align: middle;
}
.contas-banc-td-st {
  text-align: center;
  vertical-align: middle;
}
.contas-banc-rowmenu {
  position: relative;
  display: inline-block;
  text-align: right;
}
.contas-banc-rowmenu__sum {
  list-style: none;
  cursor: pointer;
  width: 2.1rem;
  height: 2.1rem;
  margin: 0 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  letter-spacing: -0.06em;
  user-select: none;
}
.contas-banc-rowmenu__sum::-webkit-details-marker {
  display: none;
}
.contas-banc-rowmenu__sum:hover,
.contas-banc-rowmenu[open] .contas-banc-rowmenu__sum {
  color: var(--text);
  border-color: var(--border);
  background: var(--bg);
}
.contas-banc-rowmenu__panel {
  position: absolute;
  right: 0;
  top: calc(100% + 2px);
  z-index: 4;
  min-width: 9.5rem;
  padding: 0.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}
.contas-banc-rowmenu__item {
  width: 100%;
  margin: 0;
  padding: 0.45rem 0.55rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  border: none;
  border-radius: calc(var(--radius) - 2px);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}
.contas-banc-rowmenu__item:hover,
.contas-banc-rowmenu__item:focus-visible {
  background: var(--bg);
  outline: none;
}
.contas-banc-rowmenu__item--danger {
  color: #b91c1c;
}
html[data-theme="dark"] .contas-banc-rowmenu__item--danger {
  color: #fca5a5;
}
.contas-banc-rowmenu__form {
  margin: 0;
  padding: 0;
}
.contas-banc-form-card {
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0.5rem 0.65rem 0.6rem;
}
.contas-banc-form-card__title {
  margin: 0 0 0.35rem !important;
  font-size: 0.88rem;
  font-weight: 700;
}
.contas-banc-form {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.contas-banc-form .contas-banc-form__field--full > label:first-child,
.contas-banc-form__row > div > label {
  margin: 0 0 0.1rem;
  font-size: 0.8rem;
}
.contas-banc-form input,
.contas-banc-form select,
.contas-banc-form textarea {
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
}
.contas-banc-form__opt {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.75em;
}
.contas-banc-form__hint {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  line-height: 1.2;
  color: var(--text-muted);
}
.contas-banc-form__row--3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.32rem 0.45rem;
}
@media (min-width: 600px) {
  .contas-banc-form__row--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* Modal nova conta: grelhas com colunas iguais e inputs alinhados (rótulos com alturas diferentes) */
.contas-banc-form--modal .contas-banc-form__row--3 {
  align-items: stretch;
  gap: 0.45rem 0.55rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
@media (max-width: 479px) {
  .contas-banc-form--modal .contas-banc-form__row--3 {
    grid-template-columns: 1fr;
  }
}
.contas-banc-form--modal .contas-banc-form__row--3 > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.18rem;
}
.contas-banc-form--modal .contas-banc-form__row--3 > div > label {
  line-height: 1.28;
}
.contas-banc-form--modal .contas-banc-form__row--3 > div > input,
.contas-banc-form--modal .contas-banc-form__row--3 > div > select {
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}
.contas-banc-form--modal .grid2.contas-banc-form__row {
  align-items: stretch;
  gap: 0.45rem 0.55rem;
}
.contas-banc-form--modal .grid2.contas-banc-form__row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 0.18rem;
}
.contas-banc-form--modal .grid2.contas-banc-form__row > div > input {
  margin-top: auto;
  width: 100%;
  box-sizing: border-box;
}
.contas-banc-form__row.grid2 {
  gap: 0.32rem 0.45rem;
}
.contas-banc-form__pix-block {
  margin: 0.2rem 0 0.15rem;
  padding: 0.5rem 0.55rem 0.45rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
}
html[data-theme="dark"] .contas-banc-form__pix-block {
  background: rgba(15, 23, 42, 0.5);
}
.contas-banc-form__pix-title {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.01em;
}
.contas-banc-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
  margin-top: 0.1rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.contas-banc-form__submit {
  min-height: 2.1rem;
  padding: 0.4rem 0.95rem;
  font-size: 0.8125rem;
}
.contas-banc-list-card {
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
}
.contas-banc-list-card--flex {
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.contas-banc-list-card__head {
  padding: 0.45rem 0.65rem 0.4rem;
  flex-shrink: 0;
}
.contas-banc-list-card .app-page__listpad.contas-banc-list-card__head {
  padding: 0.45rem 0.65rem 0.4rem;
}
.contas-banc-list-card__h {
  margin: 0 0 0.35rem !important;
  font-size: 0.88rem;
  font-weight: 700;
}
.contas-banc-list-card__table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(50vh, 20rem);
}
@media (min-width: 960px) {
  .contas-banc-list-card__table-wrap {
    max-height: none;
  }
  .contas-banc-list-card {
    min-height: 0;
  }
}
.contas-banc-table {
  table-layout: fixed;
  width: 100%;
}
.contas-banc-table th,
.contas-banc-table td {
  padding: 0.4rem 0.45rem;
  font-size: 0.8rem;
  vertical-align: middle;
}
.contas-banc-table th:nth-child(1) {
  width: 30%;
  min-width: 0;
}
.contas-banc-table th:nth-child(2) {
  width: 22%;
}
.contas-banc-table th:nth-child(3) {
  width: 5.5rem;
  white-space: nowrap;
}
.contas-banc-th-acoes,
.contas-banc-table th:nth-child(4) {
  width: 3.75rem;
  min-width: 3.5rem;
  text-align: right;
}
.contas-banc-table td:nth-child(4) {
  text-align: right;
  vertical-align: middle;
  overflow: visible;
  white-space: nowrap;
}
.contas-banc-tr--caixa .contas-banc-td-ac {
  text-align: right;
}
.contas-banc-tr--caixa .contas-banc-td-ac .app-link-sm {
  font-size: 0.78rem;
}
.contas-banc-table .td-actions--cliente {
  justify-content: flex-end;
  flex-wrap: wrap;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  align-items: center;
  gap: 0.35rem 0.65rem;
}
.contas-banc-table .td-actions--cliente .form-inline {
  display: inline-flex;
  margin: 0;
  flex: 0 0 auto;
  align-items: center;
}
.contas-banc-table .td-actions--cliente .linkish {
  white-space: nowrap;
  padding: 0 0.1rem;
}
.contas-banc-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  box-shadow: 0 1px 0 var(--border);
}
html[data-theme="dark"] .contas-banc-table th {
  background: #0f172a;
}
.kpi {
  font-size: 1.35rem;
  font-weight: 700;
}

/* Páginas públicas: login, recuperar senha, registo (layout_public) — alinhado a controle-atividade */
body.auth-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem 2rem;
  background: linear-gradient(165deg, #e8eef6 0%, #dbe7f3 45%, #e4edf7 100%);
}
body.auth-page.auth-page--slate {
  width: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2.5rem 1rem 2.5rem;
  background: linear-gradient(180deg, #e8f1f9 0%, #e0eaf4 45%, #d2dce8 100%);
  color: #0f172a;
  color-scheme: light;
}
html[data-theme="dark"] body.auth-page {
  background: linear-gradient(165deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
}
html[data-theme="dark"] body.auth-page.auth-page--slate {
  background: linear-gradient(180deg, #0f172a 0%, #1e293b 45%, #0f172a 100%);
  color: #f1f5f9;
  color-scheme: dark;
}

/* Landing pública: fundo escuro (referência Gestão de Demandas) + grelha de funcionalidades + cartão claro */
body.auth-page.auth-page--landing {
  display: block;
  padding: 1.5rem 1.25rem 2.25rem;
  position: relative;
  background: radial-gradient(ellipse 100% 70% at 15% -10%, rgba(56, 189, 248, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 90% 100%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, #0a0f1a 0%, #111827 38%, #0f172a 100%) !important;
  color: #f1f5f9;
  color-scheme: dark;
}
body.auth-page.auth-page--slate.auth-page--landing {
  padding: 1.5rem 1.25rem 2.25rem;
  background: radial-gradient(ellipse 100% 70% at 15% -10%, rgba(56, 189, 248, 0.14) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 90% 100%, rgba(99, 102, 241, 0.12) 0%, transparent 45%),
    linear-gradient(180deg, #0a0f1a 0%, #111827 38%, #0f172a 100%) !important;
  color: #f1f5f9;
}
html[data-theme="dark"] body.auth-page.auth-page--slate.auth-page--landing {
  background: radial-gradient(ellipse 100% 70% at 15% -10%, rgba(56, 189, 248, 0.12) 0%, transparent 55%),
    linear-gradient(180deg, #0a0f1a 0%, #111827 38%, #0f172a 100%) !important;
}
.auth-landing {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  min-height: min(100dvh - 2.5rem, 56rem);
  box-sizing: border-box;
  overflow: hidden;
}
.auth-landing__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(1100px circle at 20% 20%, rgba(56, 189, 248, 0.22), transparent 55%),
    radial-gradient(900px circle at 80% 20%, rgba(99, 102, 241, 0.18), transparent 55%),
    radial-gradient(900px circle at 60% 80%, rgba(236, 72, 153, 0.12), transparent 55%);
}
.auth-landing__hero,
.auth-landing__aside {
  position: relative;
  z-index: 1;
}
.auth-landing__hero {
  position: relative;
  padding: 0.5rem 0.35rem 0;
  background: transparent;
  color: #f8fafc;
  border: none;
  box-shadow: none;
  box-sizing: border-box;
}
.auth-landing__badge-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  margin: 0 0 1.35rem;
  padding: 0.5rem 0.95rem;
  max-width: 100%;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.95);
  background: rgba(15, 23, 42, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}
.auth-landing__badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.7);
}
.auth-landing__badge-sep {
  opacity: 0.45;
  font-weight: 500;
}
.auth-landing__headline {
  margin: 0 0 0.85rem;
  font-size: clamp(1.45rem, 4vw, 2.05rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #ffffff;
}
.auth-landing__sub {
  margin: 0 0 1.5rem;
  font-size: 0.98rem;
  line-height: 1.65;
  font-weight: 450;
  color: #cbd5e1;
  max-width: 38rem;
}
.auth-landing__feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 520px) {
  .auth-landing__feature-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
  }
}
.auth-landing__fcard {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  padding: 1.1rem 1.1rem 1.15rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.auth-landing__fcard:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.09);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.auth-landing__fcard-ic {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: rgba(56, 189, 248, 0.12);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.22);
}
.auth-landing__fcard-body {
  min-width: 0;
}
.auth-landing__fcard-title {
  margin: 0 0 0.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
}
.auth-landing__fcard-desc {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.5;
  font-weight: 450;
  color: #e2e8f0;
}
.auth-landing__aside {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}
.auth-page__shell.auth-page__shell--landing {
  width: 100%;
  max-width: 26rem;
  margin: 0 auto;
}
@media (min-width: 960px) {
  .auth-landing {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(22rem, 27rem);
    align-items: center;
    column-gap: 2.75rem;
    row-gap: 2rem;
    min-height: min(100dvh - 2.5rem, 56rem);
  }
  .auth-landing__hero {
    padding: 0.65rem 0.35rem 0;
    align-self: center;
  }
  .auth-landing__aside {
    align-self: center;
  }
}

/* Registo: uma vista sem scroll em ecrãs desktop (hero + formulário na altura útil) */
.auth-landing--register {
  gap: 0.85rem;
  min-height: 0;
}
@media (min-width: 960px) {
  .auth-landing--register {
    grid-template-columns: minmax(0, 1fr) minmax(21rem, 25rem);
    column-gap: 1.75rem;
    row-gap: 0.65rem;
    align-items: center;
  }
}
body.auth-page--register.auth-page--landing {
  padding: 0.5rem 1rem 0.55rem;
}
body.auth-page--register .auth-landing__badge-pill {
  margin-bottom: 0.55rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.62rem;
}
body.auth-page--register .auth-landing__headline {
  margin-bottom: 0.4rem;
  font-size: clamp(1.2rem, 2.6vw, 1.55rem);
  line-height: 1.2;
}
body.auth-page--register .auth-landing__sub--register {
  margin-bottom: 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  max-width: 36rem;
}
body.auth-page--register .auth-landing__feature-grid {
  gap: 0.45rem;
}
@media (min-width: 960px) {
  body.auth-page--register .auth-landing__feature-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.45rem;
  }
}
body.auth-page--register .auth-landing__fcard {
  padding: 0.45rem 0.5rem 0.5rem;
  gap: 0.45rem;
  border-radius: 0.65rem;
}
body.auth-page--register .auth-landing__fcard-ic {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.5rem;
}
body.auth-page--register .auth-landing__fcard-ic svg {
  width: 16px;
  height: 16px;
}
body.auth-page--register .auth-landing__fcard-title {
  margin-bottom: 0;
  font-size: 0.72rem;
  line-height: 1.25;
  font-weight: 650;
}
body.auth-page--register .auth-landing__fcard-desc {
  display: none;
}
body.auth-page--register .auth-page__shell.auth-page__shell--landing {
  max-width: 24.5rem;
}
body.auth-page--register .auth-card--glass {
  padding: 1.1rem 1.2rem 1rem;
}
body.auth-page--register .auth-brand {
  margin-bottom: 0.55rem;
}
body.auth-page--register .auth-brand__mark {
  width: 2.1rem;
  height: 2.1rem;
}
body.auth-page--register .auth-brand__name {
  font-size: 0.8125rem;
}
body.auth-page--register .auth-brand__tagline {
  font-size: 0.6875rem;
}
body.auth-page--register .auth-card__title--welcome {
  margin-top: 0.15rem;
  margin-bottom: 0;
  font-size: 1.2rem;
}
body.auth-page--register .auth-card__lede--register {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  line-height: 1.4;
}
body.auth-page--register .auth-form--register .auth-field {
  margin-bottom: 0.55rem;
}
body.auth-page--register .auth-form--register .auth-field:last-of-type {
  margin-bottom: 0;
}
body.auth-page--register .auth-register-fields-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.65rem;
  margin-bottom: 0;
}
@media (max-width: 420px) {
  body.auth-page--register .auth-register-fields-row {
    grid-template-columns: 1fr;
  }
}
body.auth-page--register .auth-register-fields-row .auth-field {
  margin-bottom: 0;
}
body.auth-page--register .auth-label {
  font-size: 0.75rem;
  margin-bottom: 0.2rem;
}
body.auth-page--register .auth-input--glass {
  margin-top: 0.15rem;
  min-height: 2.4rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.875rem;
}
body.auth-page--register .auth-btn--landing-glow {
  margin-top: 0.45rem;
  min-height: 2.45rem;
  padding: 0.45rem 1rem;
  font-size: 0.9rem;
}
body.auth-page--register .auth-card__footer {
  margin: 0.55rem 0 0;
  padding-top: 0;
  font-size: 0.8125rem;
}
body.auth-page--register .auth-page__inner > .auth-flash--err,
body.auth-page--register .auth-page__inner > .auth-flash--ok {
  margin-bottom: 0.4rem;
  padding: 0.4rem 0.55rem;
  font-size: 0.8125rem;
  line-height: 1.35;
}
@media (min-width: 960px) and (min-height: 620px) {
  html:has(body.auth-page--register) {
    overflow: hidden;
    height: 100%;
  }
  body.auth-page--register.auth-page--landing {
    overflow: hidden;
    height: 100dvh;
    max-height: 100dvh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
  }
  body.auth-page--register .auth-landing--register {
    flex: 0 1 auto;
    max-height: calc(100dvh - 1.1rem);
    overflow: hidden;
    margin: 0 auto;
    width: 100%;
  }
  body.auth-page--register .auth-landing__hero {
    align-self: center;
    min-height: 0;
  }
  body.auth-page--register .auth-landing__aside {
    align-self: center;
    min-height: 0;
  }
}

/* Cartão de auth na landing: vidro escuro (alinhado a controle-atividade / Gestão de Demandas) */
body.auth-page--landing .auth-card--glass {
  color-scheme: dark;
  padding: 40px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #f8fafc;
}
html[data-theme="dark"] body.auth-page--landing .auth-card--glass {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  color: #f8fafc;
}
body.auth-page--landing .auth-card__title--welcome {
  margin-top: 0.35rem;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}
body.auth-page--landing .auth-card__lede--landing-muted {
  margin: 0 0 1.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: #cbd5e1;
  font-weight: 450;
}
body.auth-page--landing .auth-card__lede--landing-muted strong {
  color: rgba(248, 250, 252, 0.95);
  font-weight: 650;
}
body.auth-page--landing .auth-label {
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
}
body.auth-page--landing .auth-input--glass {
  margin-top: 0.35rem;
  min-height: 2.75rem;
  padding: 0.55rem 0.9rem;
  color: #fafafa;
  background: #18181b;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.35);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
body.auth-page--landing .auth-input--glass::placeholder {
  color: rgba(161, 161, 170, 0.95);
}
body.auth-page--landing .auth-input--glass:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: #18181b;
}
body.auth-page--landing .auth-input--glass:focus {
  outline: none;
  background: #18181b;
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.28);
}
body.auth-page--landing .auth-input--with-toggle {
  padding-right: 2.85rem;
}
.auth-input-password-wrap {
  position: relative;
  width: 100%;
}
.auth-password-toggle {
  position: absolute;
  right: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  background: rgba(24, 24, 27, 0.85);
  color: #d4d4d8;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.auth-password-toggle:hover {
  background: #27272a;
  border-color: rgba(255, 255, 255, 0.16);
  color: #fafafa;
}
.auth-password-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}
.auth-password-toggle__ic {
  width: 1rem;
  height: 1rem;
  display: block;
  flex-shrink: 0;
  color: inherit;
  stroke: currentColor;
  fill: none;
}
body.auth-page--landing .auth-password-toggle,
body.auth-page--landing .auth-password-toggle__ic {
  color: #d4d4d8;
  stroke: currentColor;
}
body.auth-page--landing .auth-password-toggle:hover,
body.auth-page--landing .auth-password-toggle:hover .auth-password-toggle__ic {
  color: #f4f4f5;
}
.auth-textlink--on-dark {
  color: #7dd3fc;
  font-size: 0.8125rem;
  font-weight: 600;
}
.auth-textlink--on-dark:hover {
  color: #e0f2fe;
  text-decoration: underline;
  text-underline-offset: 3px;
}
body.auth-page--landing .auth-btn--landing-glow {
  margin-top: 1.35rem;
  border-radius: 0.5rem;
  background: linear-gradient(to bottom, #0284c7, #0369a1);
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.15), 0 12px 35px rgba(56, 189, 248, 0.22);
  transition: box-shadow 0.3s ease, transform 0.08s ease, background 0.2s ease, filter 0.2s ease;
}
body.auth-page--landing .auth-btn--landing-glow:hover:not(:disabled) {
  background: linear-gradient(to bottom, #0ea5e9, #0284c7);
  filter: brightness(1.03);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.45), 0 0 28px rgba(56, 189, 248, 0.5), 0 0 56px rgba(14, 165, 233, 0.35),
    0 18px 48px rgba(56, 189, 248, 0.32);
}
body.auth-page--landing .auth-btn--landing-glow:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.auth-brand__mark {
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.75rem;
  background: linear-gradient(to bottom right, rgba(56, 189, 248, 0.95), rgba(99, 102, 241, 0.88));
  box-shadow: 0 10px 30px rgba(56, 189, 248, 0.25);
}
.auth-brand__abbr {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #0f172a;
}
.auth-brand__text {
  min-width: 0;
}
.auth-brand__name {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 650;
  line-height: 1.25;
  color: #fff;
}
.auth-brand__tagline {
  margin: 0.15rem 0 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #cbd5e1;
}
.auth-card__footer {
  margin: 1.5rem 0 0;
  padding-top: 0.25rem;
  text-align: center;
  font-size: 0.875rem;
  color: #cbd5e1;
}
a.auth-landing-link {
  font-weight: 600;
  color: #7dd3fc;
  text-decoration: underline;
  text-decoration-color: rgba(56, 189, 248, 0.45);
  text-underline-offset: 5px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease, filter 0.2s ease;
}
a.auth-landing-link:hover {
  color: #e0f2fe;
  text-decoration-color: #bae6fd;
  filter: drop-shadow(0 0 12px rgba(56, 189, 248, 0.35));
}
a.auth-landing-link:focus-visible {
  outline: none;
  border-radius: 2px;
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.5);
}
a.auth-landing-link--inline {
  font-size: inherit;
}
body.auth-page--landing .auth-card__prose--aviso--glass {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
html[data-theme="dark"] body.auth-page--landing .auth-card__prose--aviso--glass {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(251, 191, 36, 0.35);
  color: #fde68a;
}
body.auth-page--landing .auth-page__inner > .auth-flash--err {
  background: rgba(244, 63, 94, 0.12);
  border-color: rgba(251, 113, 133, 0.4);
  color: #fecdd3;
}
body.auth-page--landing .auth-page__inner > .auth-flash--ok {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}
body.auth-page--landing .auth-card--glass .auth-flash--ok {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(52, 211, 153, 0.38);
  color: #a7f3d0;
}
body.auth-page--landing .auth-card--glass .auth-flash--err {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(251, 113, 133, 0.42);
  color: #fecdd3;
}

.auth-page__shell {
  width: 100%;
  max-width: 28rem;
  margin: 0 auto;
}
.auth-page__inner {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
.auth-page__brand {
  text-align: center;
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}
html[data-theme="dark"] .auth-page__brand {
  color: #94a3b8;
}

.auth-flash {
  border-radius: 12px;
  padding: 0.7rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 0.9rem;
  box-sizing: border-box;
  border: 1px solid transparent;
}
.auth-flash--err {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.auth-flash--ok {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
html[data-theme="dark"] .auth-flash--err {
  background: rgba(127, 29, 29, 0.3);
  border-color: rgba(248, 113, 113, 0.4);
  color: #fecaca;
}
html[data-theme="dark"] .auth-flash--ok {
  background: rgba(5, 150, 105, 0.2);
  border-color: rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
}

.auth-card {
  width: 100%;
  max-width: 100%;
  margin: 0;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 1px 0 rgba(255, 255, 255, 0.6) inset;
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 1.75rem 1.65rem 1.5rem;
  box-sizing: border-box;
}
html[data-theme="dark"] .auth-card {
  background: #1e293b;
  border-color: #334155;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.auth-card--text {
  padding-bottom: 1.65rem;
}
.auth-card__prose--aviso {
  margin: 0 0 1rem;
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 10px;
  background: #fffbeb;
  color: #78350f;
  border: 1px solid #fde68a;
}
html[data-theme="dark"] .auth-card__prose--aviso {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: #fde68a;
}
.auth-card__title {
  margin: 0 0 0.4rem;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.2;
}
.auth-card__lede {
  margin: 0 0 1.35rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 450;
}
.auth-card__lede .auth-code,
.auth-code {
  font-size: 0.8em;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  color: var(--text-muted);
  font-weight: 600;
}
html[data-theme="dark"] .auth-code {
  background: #0f172a;
}
.auth-card__prose {
  margin: 0 0 1.25rem;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.auth-card__lede-inset {
  font-size: 0.82em;
  font-weight: 400;
  color: var(--text-muted);
}
.auth-card__prose--tight {
  margin-top: -0.2rem;
  margin-bottom: 1rem;
}
.auth-card__prose--subtle {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 1.1rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg);
  border-radius: 10px;
  border: 1px solid var(--border);
}
html[data-theme="dark"] .auth-card__prose--subtle {
  background: #0f172a;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.auth-field {
  margin-bottom: 1.1rem;
}
.auth-field:last-of-type {
  margin-bottom: 0;
}
.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0.01em;
  color: var(--text);
  margin-bottom: 0.4rem;
}
.auth-label-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  margin-bottom: 0.4rem;
}
.auth-label-row .auth-label {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}
.auth-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 2.7rem;
  padding: 0.55rem 0.8rem;
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--text);
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
html[data-theme="dark"] .auth-input {
  background: #0f172a;
  border-color: #334155;
  color: #f1f5f9;
}
.auth-input::placeholder {
  color: #94a3b8;
  opacity: 0.9;
}
.auth-input:hover {
  border-color: #cbd5e1;
}
.auth-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 134, 201, 0.18);
  background: #fff;
}
html[data-theme="dark"] .auth-input:focus {
  background: #1e293b;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.auth-textlink {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
}
.auth-textlink:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--primary-hover, #006fa8);
}
.auth-textlink--standout {
  font-size: 0.875rem;
  font-weight: 700;
}
.auth-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 1.35rem;
  padding: 0.72rem 1.1rem;
  min-height: 2.8rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  background: var(--primary);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.1) inset, 0 2px 6px rgba(0, 134, 201, 0.25);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}
.auth-btn:hover {
  background: var(--primary-hover, #0070a8);
  color: #fff;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 134, 201, 0.35);
}
.auth-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 134, 201, 0.4);
}
.auth-btn:active {
  transform: scale(0.99);
}
.auth-auxline {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.9rem;
}
.auth-backlink {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}
a.auth-backlink {
  line-height: 1.4;
}
.auth-backlink:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--primary-hover, #006fa8);
}


/* Breadcrumb (abaixo do header) + página unificada */
.app-breadcrumb--in-main {
  max-width: 1200px;
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem 0.4rem;
}
.app-breadcrumb__a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: none;
}
.app-breadcrumb__a:hover {
  text-decoration: underline;
}
.app-breadcrumb__sep {
  opacity: 0.45;
  user-select: none;
}
.app-breadcrumb__cur {
  color: var(--text);
  font-weight: 600;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.app-page--unified {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}
.mensal-lanc-page.app-page--unified {
  max-width: 100%;
}
.app-page__head {
  margin-bottom: 0.5rem;
}
.app-page__title {
  margin: 0 0 0.25rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.app-page__sub {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--text);
}
.app-page__listpad {
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid var(--border);
}
.app-page__head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1.25rem;
}
.app-page__head--row .app-page__title {
  margin: 0 0 0.35rem;
}

/* Página: importar extrato */
.import-page__head {
  margin-bottom: 1.15rem;
  max-width: min(44rem, 100%);
}
.import-page__head--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  max-width: 100%;
}
.import-page__head-main {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: min(50rem, 100%);
}
.import-page__help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  flex-shrink: 0;
  min-height: 2.5rem;
  padding: 0.35rem 0.9rem 0.35rem 0.7rem;
  font-size: 0.8125rem;
  font-weight: 600;
  font-family: inherit;
  color: var(--primary);
  background: var(--surface);
  border: 1px solid rgba(0, 134, 201, 0.35);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.import-page__help-btn:hover {
  background: var(--info-bg);
  border-color: var(--primary);
  text-decoration: none;
  color: var(--primary-hover);
}
.import-page__help-ico {
  display: block;
  flex-shrink: 0;
  opacity: 0.95;
}
@media (max-width: 36rem) {
  .import-page__head--actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
  }
  .import-page__help-btn {
    align-self: flex-end;
    max-width: 100%;
  }
}
.import-page__lede {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 40rem;
}
/* Referência textual ao unico botão Ajuda (canto) — nao é controle */
.import-page__lede-ajuda-ref {
  font-weight: 700;
  color: var(--primary);
}
html[data-theme="dark"] .import-page__lede-ajuda-ref {
  color: #7dd3fc;
}
/* Uma moldura, duas colunas: envio | historico */
.import-page__body {
  display: grid;
  gap: 1.1rem 1.25rem;
  align-items: start;
  grid-template-columns: 1fr;
  width: 100%;
  min-width: 0;
}
.import-page__body--split {
  gap: 0;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-top: 0.25rem;
}
@media (min-width: 1000px) {
  .import-page__body--split {
    grid-template-columns: minmax(0, 1.15fr) minmax(16rem, 0.9fr);
  }
}
@media (max-width: 999px) {
  .import-page__body--split {
    border-radius: var(--radius);
  }
}
.import-page__col {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0.85rem 0.95rem 1.05rem;
  box-sizing: border-box;
}
@media (min-width: 1000px) {
  .import-page__col--upload {
    background: linear-gradient(180deg, rgba(0, 134, 201, 0.05) 0%, var(--surface) 9rem);
    border-right: 1px solid var(--border);
  }
  .import-page__col--history {
    background: var(--surface);
  }
  html[data-theme="dark"] .import-page__col--upload {
    background: linear-gradient(180deg, rgba(0, 134, 201, 0.08) 0%, var(--surface) 9rem);
  }
}
@media (max-width: 999px) {
  .import-page__col--upload {
    border-bottom: 1px solid var(--border);
  }
  .import-page__col--history {
    background: var(--bg);
  }
  html[data-theme="dark"] .import-page__col--history {
    background: rgba(15, 23, 42, 0.4);
  }
}
.import-page__kicker {
  margin: 0 0 0.45rem;
  font-size: var(--type-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  line-height: 1.2;
  color: var(--text-muted);
  flex: 0 0 auto;
}
/* Formulário | Histórico (grelha simples, sem split) */
@media (min-width: 1000px) {
  .import-page__body:not(.import-page__body--split) {
    grid-template-columns: minmax(0, 1fr) minmax(16.5rem, 24rem);
    align-items: start;
  }
  .import-page__body:not(.import-page__body--split) .import-page__right {
    position: sticky;
    top: 0.5rem;
    min-width: 0;
  }
}
@media (min-width: 1000px) {
  .import-page__body--split .import-page__table-card--side {
    position: sticky;
    top: 0.35rem;
  }
}
.import-page__left {
  min-width: 0;
}
.import-page__form-card {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  flex: 0 0 auto;
}
.import-page__body--split .import-page__form-card,
.import-page__body--split .import-page__table-card {
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
}
.import-page__body--split .import-page__form-card {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius);
  overflow: hidden;
}
.import-page__body--split .import-page__table-card--side {
  background: var(--surface);
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow) !important;
  flex: 0 1 auto;
}
html[data-theme="dark"] .import-page__body--split .import-page__table-card--side {
  background: var(--surface);
}
.import-page__table-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--bg);
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
html[data-theme="dark"] .import-page__table-meta {
  background: #0f172a;
  color: #94a3b8;
}
.import-page__form-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 1rem 1.15rem 0.75rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.import-page__form-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.import-page__form-badge {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 0.2rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.import-form {
  padding: 1.05rem 1.15rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}
.import-form__grid {
  display: flex;
  flex-direction: column;
  gap: 0.9rem 1rem;
  width: 100%;
}
.import-form__grid--2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem 1.1rem;
}
@media (min-width: 640px) {
  .import-form__grid--2 {
    grid-template-columns: 1fr 1fr;
  }
}
.import-form__field {
  min-width: 0;
}
.import-form__field--grow {
  flex: 1 1 auto;
}
.import-form__field--file {
  width: 100%;
}
.import-form__label-text {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  margin: 0 0 0.2rem;
}
.import-form__field--file .import-form__label-text {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}
.import-form__hint {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--text-muted);
}
.import-form__hint--one-line {
  margin: 0 0 0.5rem;
  font-size: 0.7rem;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-secondary);
  text-transform: none;
}
.import-form--compact {
  gap: 0.85rem !important;
  padding: 0.9rem 1.05rem 1.1rem;
}
.import-form__opt {
  font-weight: 500;
  color: var(--text-muted);
  font-size: 0.8em;
}
.import-form .import-form__field label {
  font-weight: 600;
  color: var(--text);
  font-size: 0.85rem;
}
.import-dropzone-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease, border-color 0.2s;
}
.import-dropzone-wrap--drag {
  box-shadow: 0 0 0 3px rgba(0, 134, 201, 0.25);
}
.import-dropzone {
  display: block;
  position: relative;
  min-height: 0;
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-lg);
  background: #f8fafc;
  cursor: pointer;
  text-align: center;
  margin: 0;
  padding: 0;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  overflow: hidden;
}
html[data-theme="dark"] .import-dropzone {
  background: #1e293b;
  border-color: #475569;
}
.import-dropzone:hover,
.import-dropzone-wrap--drag .import-dropzone {
  border-color: var(--primary);
  background: #eff6fc;
}
html[data-theme="dark"] .import-dropzone:hover,
html[data-theme="dark"] .import-dropzone-wrap--drag .import-dropzone {
  background: #1a2840;
}
.import-dropzone .import-file-sr {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
  font-size: 0;
}
.import-dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem 0.5rem;
  padding: 1.1rem 1rem;
  min-height: 4.5rem;
  max-width: 32rem;
  margin: 0 auto;
  pointer-events: none;
  user-select: none;
  position: relative;
  z-index: 1;
}
.import-dropzone__inner--row {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  gap: 0.75rem 1rem;
  padding: 0.65rem 0.9rem 0.65rem 0.75rem;
  min-height: 0;
  max-width: none;
  margin: 0;
}
.import-dropzone__inner--row .import-dropzone__icon {
  font-size: 1.9rem;
  line-height: 1;
  margin: 0;
  flex: 0 0 auto;
  width: 2.75rem;
  text-align: center;
  color: var(--primary);
  opacity: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
}
.import-dropzone__svg {
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
}
.import-dropzone__texts {
  display: flex;
  flex-direction: column;
  gap: 0.1rem 0.25rem;
  min-width: 0;
  flex: 1 1 auto;
  justify-content: center;
  padding: 0.1rem 0 0.1rem 0.15rem;
}
.import-dropzone:focus-within {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.import-dropzone__icon {
  font-size: 1.5rem;
  line-height: 1;
  margin-bottom: 0.15rem;
  filter: grayscale(0.1);
  opacity: 0.9;
}
.import-dropzone__inner:not(.import-dropzone__inner--row) .import-dropzone__icon {
  margin-bottom: 0.15rem;
}
.import-dropzone__title {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.import-dropzone__sub {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}
.import-dropzone__sub strong {
  color: var(--primary);
  font-weight: 700;
}
.import-dropzone__lim {
  display: block;
  margin-top: 0.3rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #94a3b8;
}
.import-dropzone__inner--row .import-dropzone__lim {
  margin-top: 0.2rem;
}
@media (max-width: 400px) {
  .import-dropzone__inner--row {
    flex-direction: column;
    text-align: center;
    padding: 0.9rem 0.65rem;
  }
  .import-dropzone__inner--row .import-dropzone__texts {
    align-items: center;
    text-align: center;
  }
}
.import-file-picked {
  margin: 0.6rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  text-align: center;
}
html[data-theme="dark"] .import-file-picked {
  color: #7dd3fc;
}

/* Conciliação: importar extrato (caixa no topo: clique ou arrastar) */
.tx-embed-drop-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  transition: box-shadow 0.2s ease;
}
.tx-embed-dropzone {
  display: block;
  border: 1px dashed #0f172a;
  border-radius: 12px;
  background: #fff;
  min-height: 0;
  margin: 0;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.tx-embed-dropzone:focus {
  outline: none;
}
.tx-embed-dropzone:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
html[data-theme="dark"] .tx-embed-dropzone {
  background: #0f172a;
  border-color: #64748b;
}
.tx-embed-dropzone--hover,
.tx-embed-dropzone:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(0, 134, 201, 0.2);
  background: #f8fafc;
}
html[data-theme="dark"] .tx-embed-dropzone--hover,
html[data-theme="dark"] .tx-embed-dropzone:hover {
  background: #1a2840;
}
.tx-embed-dropzone__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.35rem 1rem 1.15rem;
  text-align: center;
  user-select: none;
  pointer-events: none;
}
.tx-embed-dropzone__cloud {
  display: block;
  margin-bottom: 0.35rem;
  color: #94a3b8;
}
html[data-theme="dark"] .tx-embed-dropzone__cloud {
  color: #64748b;
}
.tx-embed-dropzone__tit {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.tx-embed-dropzone__sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
}
.tx-embed-drop-actions {
  position: relative;
  justify-content: center;
  align-items: center;
}
.tx-embed-import .import-form--tx {
  margin: 0;
}
/* label estilo cápsula: Carregar (Importar extrato) + ícone nuvem/carga à direita */
.btn-tx-carregar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem 0.6rem 1.35rem;
  border: none;
  border-radius: 9999px;
  background: #0c2347;
  color: #fff;
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  letter-spacing: 0.01em;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(12, 35, 71, 0.35);
  transition: background 0.15s, box-shadow 0.15s, transform 0.08s;
  -webkit-tap-highlight-color: transparent;
}
html[data-theme="dark"] .btn-tx-carregar {
  background: #1a3358;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}
.btn-tx-carregar:hover {
  background: #0a1d3d;
  color: #fff;
  box-shadow: 0 2px 8px rgba(12, 35, 71, 0.3);
}
html[data-theme="dark"] .btn-tx-carregar:hover {
  background: #244872;
  color: #fff;
}
.btn-tx-carregar:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.btn-tx-carregar:active {
  transform: scale(0.98);
}
.btn-tx-carregar__txt {
  position: relative;
  top: 0.5px;
}
.btn-tx-carregar__ico {
  display: block;
  flex-shrink: 0;
  margin-left: 0.1rem;
  color: #fff;
  vertical-align: middle;
}
html[data-theme="dark"] .btn-tx-carregar__ico {
  color: #fff;
}

.import-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  margin: 0 -0.1rem 0 0;
}
.import-form__link-ext {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  margin-right: auto;
}
.import-form__link-ext:hover {
  color: var(--primary);
  text-decoration: underline;
}
.import-form__submit {
  min-height: 2.65rem;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}
.app-dialog--import-help .app-dialog__body.import-page__help-body {
  padding: 0.5rem 1.1rem 0.9rem;
}
.import-page__help-h {
  margin: 0.75rem 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.import-page__help-prose + .import-page__help-h {
  margin-top: 0.85rem;
}
.import-page__help-prose {
  margin: 0.35rem 0 0.2rem;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
}
.import-page__help-prose:first-child {
  margin-top: 0;
}
.import-page__help-list {
  margin: 0.25rem 0 0;
  padding: 0 0 0 1.1rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--text);
}
.import-page__help-list li {
  margin-bottom: 0.5rem;
}
.import-page__help-list li:last-child {
  margin-bottom: 0;
}
.app-dialog__foot--single {
  justify-content: center;
}
.app-dialog__foot--single .btn {
  min-width: 8.5rem;
  min-height: 2.55rem;
}
html[data-theme="dark"] .import-page__help-btn {
  background: var(--surface);
  border-color: rgba(0, 134, 201, 0.45);
}
html[data-theme="dark"] .import-page__help-btn:hover {
  background: rgba(0, 134, 201, 0.12);
}
.import-page__empty {
  padding: 1.5rem 1.15rem 1.6rem;
  text-align: center;
}
.import-page__empty-title {
  margin: 0 0 0.4rem;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--text);
}
.import-page__empty-txt {
  font-size: 0.86rem;
  line-height: 1.5;
  margin: 0;
  max-width: 22rem;
  margin-left: auto;
  margin-right: auto;
}
.import-page__table-card {
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  overflow: hidden;
  margin: 0;
  padding: 0;
}
@media (min-width: 1000px) {
  .import-page__right .import-page__table-card--side {
    display: flex;
    flex-direction: column;
    min-height: 0;
    max-height: min(75dvh, 38rem);
  }
}
.import-page__table-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 0.75rem;
  padding: 0.9rem 1.1rem 0.7rem;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.import-page__table-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text);
}
.import-page__table-scroll {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
@media (min-width: 1000px) {
  .import-page__right .import-page__table-card--side .import-page__table-scroll {
    flex: 1 1 auto;
    min-height: 0;
  }
}
.import-page__table {
  width: 100%;
  min-width: 20rem;
  font-size: 0.86rem;
  border-collapse: collapse;
}
.import-page__table th {
  text-align: left;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  background: #f1f5f9;
  padding: 0.5rem 1rem;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
html[data-theme="dark"] .import-page__table th {
  background: #0f172a;
  color: #94a3b8;
}
.import-page__table td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.import-page__table tbody tr:last-child td {
  border-bottom: none;
}
.import-page__table tr:hover td {
  background: rgba(0, 134, 201, 0.04);
}
.import-page__td-strong {
  font-weight: 600;
  color: var(--text);
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
}
.import-page__date {
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.import-page__table-empty {
  padding: 1.2rem 1.1rem !important;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.45;
}
.import-page__origem.origem-ofx {
  background: rgba(0, 134, 201, 0.1);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(0, 134, 201, 0.2);
}
.import-page__origem.origem-pdf {
  background: var(--warning-bg);
  color: #b45309;
  font-weight: 600;
  border: 1px solid rgba(245, 158, 11, 0.35);
}
html[data-theme="dark"] .import-page__origem.origem-pdf {
  color: #fcd34d;
}
.import-page__footer-note {
  margin: 0;
  padding: 0.7rem 1.1rem 0.9rem;
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.import-page__footer-note a {
  font-weight: 600;
}

/* Modal: <dialog> nativo */
.app-dialog {
  max-width: 36rem;
  width: min(36rem, calc(100vw - 1.5rem));
  /* Evita “corte” em alturas pequenas: usa a altura disponível da viewport */
  max-height: 92dvh;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: transparent;
  box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.25);
  color: inherit;
}
.app-dialog.app-dialog--import-tx {
  max-width: 40rem;
  width: min(40rem, calc(100vw - 1.5rem));
}
html[data-theme="dark"] .app-dialog {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}
.app-dialog::backdrop {
  background: rgba(15, 23, 42, 0.5);
  cursor: pointer;
}
html[data-theme="dark"] .app-dialog::backdrop {
  background: rgba(0, 0, 0, 0.6);
}
.app-dialog__chrome {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-height: inherit;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.app-dialog__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.app-dialog__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1.2;
  padding-right: 0.5rem;
}
.app-dialog__close {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  font-family: inherit;
}
.app-dialog__close:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.app-dialog__body {
  padding: 0.9rem 1.1rem 0.5rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.app-dialog__body .flash.success {
  margin-top: 0;
}
/* Documentação rápida — modal do dock (ex.: importação OFX) */
.app-dialog__nav-row--split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.9rem 1.1rem;
}
.app-dialog__nav-row--split .app-dialog__dock-link--flex {
  flex: 1;
  min-width: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}
.app-dialog__help-btn {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  flex-shrink: 0;
  cursor: help;
  line-height: 0;
  font-family: inherit;
}
.app-dialog__help-btn:hover,
.app-dialog__help-btn:focus-visible {
  color: var(--primary);
  border-color: var(--primary);
  outline: none;
}
.app-dialog__help-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary);
}
.app-dialog__help-btn svg {
  width: 0.92rem;
  height: 0.92rem;
}
.app-dialog__foot {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 0.65rem;
  padding: 0.75rem 1.1rem;
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.app-dialog__foot .secondary {
  min-height: 2.5rem;
  padding: 0.5rem 1rem;
}
.app-dialog__foot button[type="submit"] {
  min-height: 2.5rem;
  padding: 0.5rem 1.15rem;
  font-weight: 700;
}

/* Modal de edição de conta bancária: seções claras e “tudo em uma modal” */
.edit-conta-banc__sec {
  margin: 0.25rem 0 0.85rem;
  padding: 0.75rem 0.75rem 0.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.edit-conta-banc__sec-title {
  margin: 0 0 0.55rem;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.edit-conta-banc__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem 0.75rem;
}
.edit-conta-banc__grid--pix {
  grid-template-columns: 1fr 1fr;
}
.edit-conta-banc__field--full {
  grid-column: 1 / -1;
}
.edit-conta-banc__pix-atual {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  line-height: 1.35;
}
.edit-conta-banc__pix-new {
  padding: 0.55rem 0.6rem 0.6rem;
  margin: 0.15rem 0 0.6rem;
  border-radius: var(--radius);
  background: var(--info-bg);
  border: 1px solid rgba(0, 134, 201, 0.2);
}
html[data-theme="dark"] .edit-conta-banc__pix-new {
  border-color: rgba(0, 134, 201, 0.35);
}
.edit-conta-banc__pix-new-title {
  font-weight: 800;
  font-size: 0.82rem;
  margin-bottom: 0.1rem;
}
.edit-conta-banc__pix-new-hint {
  font-size: 0.78rem;
  line-height: 1.35;
  margin-bottom: 0.45rem;
}
@media (max-width: 520px) {
  .edit-conta-banc__grid {
    grid-template-columns: 1fr;
  }
  .edit-conta-banc__grid--pix {
    grid-template-columns: 1fr;
  }
}
.app-dialog--regra .app-dialog__body label:first-of-type {
  margin-top: 0.25rem;
}
.vinculo-regra-dica {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-muted);
  margin: 0 0 0.6rem;
  padding: 0.5rem 0.6rem;
  background: var(--info-bg);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 134, 201, 0.2);
}
html[data-theme="dark"] .vinculo-regra-dica {
  border-color: rgba(0, 134, 201, 0.35);
}
.app-dialog--regra .vinculo-regra-dica--mini {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.25);
  color: var(--text);
  font-size: 0.78rem;
  margin-bottom: 0.75rem;
  padding: 0.4rem 0.55rem;
}
html[data-theme="dark"] .app-dialog--regra .vinculo-regra-dica--mini {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.3);
}
.regra-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 0.75rem;
}
@media (max-width: 400px) {
  .regra-grid-2 {
    grid-template-columns: 1fr;
  }
}
.regra-prioridade-input {
  max-width: 7rem;
}
.regra-padrao-input {
  width: 100%;
  min-height: 2.5rem;
}
/* Checkbox "Ignorar OFX" no modal: texto à direita do check (evita .row { flex-wrap } empilhar em modais estreitos) */
label.regra-ignorar-ofx {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.5rem 0 0.1rem;
  font-size: 0.9rem;
  line-height: 1.35;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  font-weight: 500;
}
.regra-ignorar-ofx input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  margin: 0.1rem 0 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary, #0084c9);
}
.regra-ignorar-ofx__txt {
  flex: 1;
  min-width: 0;
}
.app-dialog--regra textarea {
  min-height: 4.5rem;
  resize: vertical;
}
.vinculo-code {
  font-size: 0.8rem;
  background: var(--bg);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.vinculos-empty {
  text-align: center;
  vertical-align: middle;
}

.tx-desc-link {
  background: transparent;
  border: none;
  color: inherit;
  font: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(2, 132, 199, 0.35);
  text-underline-offset: 2px;
  display: block;
  max-width: 40rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-desc-link:hover {
  text-decoration-color: rgba(2, 132, 199, 0.8);
}

/* Conciliação: cabeçalho + cartão de filtros (conta / checkboxes / filtrar / gerar sugestões) */
.tx-conc-head {
  margin-bottom: 0.75rem;
}
.tx-conc-head__title {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  color: var(--text);
}
.tx-conc-head__lede {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 56rem;
}

/* Caixa (espécie): demonstrativo — abas, KPIs, saldo diário, FAB */
.caixa-page.caixa-demonstrativo {
  padding-bottom: 5rem;
}
.caixa-demonstrativo__filtro {
  max-width: 42rem;
  margin-bottom: 0.75rem;
  padding: 0.65rem 1rem 0.75rem;
}
.caixa-demonstrativo__filtro-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  margin: 0;
}
.caixa-demonstrativo__lbl {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
  color: var(--text-muted);
}
.caixa-demonstrativo__ref-lbl {
  margin: 0.45rem 0 0;
  font-size: 0.88rem;
}
.caixa-demonstrativo__kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem 0.65rem;
  margin-bottom: 0.85rem;
}
@media (min-width: 900px) {
  .caixa-demonstrativo__kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.caixa-demonstrativo__kpi {
  padding: 0.55rem 0.75rem 0.6rem;
  margin: 0 !important;
}
.caixa-demonstrativo__kpi-lbl {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}
.caixa-demonstrativo__kpi-val {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.caixa-demonstrativo__kpi-sub {
  font-size: 0.75rem;
  margin-top: 0.2rem;
}
.caixa-demonstrativo__kpi--ent .caixa-demonstrativo__kpi-val {
  color: #15803d;
}
html[data-theme="dark"] .caixa-demonstrativo__kpi--ent .caixa-demonstrativo__kpi-val {
  color: #86efac;
}
.caixa-demonstrativo__kpi--sai .caixa-demonstrativo__kpi-val {
  color: #b91c1c;
}
html[data-theme="dark"] .caixa-demonstrativo__kpi--sai .caixa-demonstrativo__kpi-val {
  color: #fca5a5;
}
.caixa-demonstrativo__kpi--dest {
  border-color: color-mix(in srgb, var(--primary) 35%, var(--border));
}
.caixa-demonstrativo__tabs-card {
  margin: 0 0 0.85rem !important;
  padding: 0.55rem 0.75rem 0.75rem !important;
  min-width: 0;
}
.caixa-tabs {
  position: relative;
}
.caixa-tabs__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
  pointer-events: none;
}
.caixa-tabs__bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.55rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.35rem;
}
.caixa-tabs__tab {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.38rem 0.65rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  color: var(--text-muted);
  background: transparent;
  user-select: none;
}
.caixa-tabs__tab:hover {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.caixa-tabs__panel {
  display: none;
  min-width: 0;
}
#caixa_tab_ent:checked ~ .caixa-tabs__bar label[for="caixa_tab_ent"],
#caixa_tab_sai:checked ~ .caixa-tabs__bar label[for="caixa_tab_sai"],
#caixa_tab_todos:checked ~ .caixa-tabs__bar label[for="caixa_tab_todos"] {
  color: var(--text);
  border-color: var(--border);
  background: var(--surface);
  box-shadow: 0 1px 0 var(--bg);
}
#caixa_tab_ent:checked ~ .caixa-tabs__panels .caixa-tabs__panel--ent,
#caixa_tab_sai:checked ~ .caixa-tabs__panels .caixa-tabs__panel--sai,
#caixa_tab_todos:checked ~ .caixa-tabs__panels .caixa-tabs__panel--todos {
  display: block;
}
.caixa-tabs__panels {
  min-width: 0;
}
.caixa-demonstrativo__tipo {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.12rem 0.38rem;
  border-radius: 999px;
}
.caixa-demonstrativo__tipo--ent {
  color: #14532d;
  background: #dcfce7;
}
html[data-theme="dark"] .caixa-demonstrativo__tipo--ent {
  color: #bbf7d0;
  background: #14532d;
}
.caixa-demonstrativo__tipo--sai {
  color: #7f1d1d;
  background: #fee2e2;
}
html[data-theme="dark"] .caixa-demonstrativo__tipo--sai {
  color: #fecaca;
  background: #7f1d1d;
}
.caixa-demonstrativo__chart-wrap {
  margin: 0 0 0.65rem;
  padding: 0.45rem 0.35rem 0.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}
.caixa-demonstrativo__chart-head {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.25rem 0.25rem;
}
.caixa-demonstrativo__chart {
  display: block;
  width: 100%;
  height: 11rem;
  max-height: 40vh;
}
.caixa-demonstrativo__chart-line {
  vector-effect: non-scaling-stroke;
}
.caixa-demonstrativo__td-extrato {
  font-size: 0.74rem;
  vertical-align: middle;
}
.caixa-demonstrativo__extrato-tag {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: help;
}
.caixa-demonstrativo__fab {
  position: fixed;
  right: 1rem;
  bottom: calc(var(--dock-h, 3.5rem) + 1rem);
  z-index: 30;
  box-shadow: 0 4px 14px color-mix(in srgb, #000 22%, transparent);
  border-radius: 999px;
  padding: 0.55rem 1rem !important;
  font-weight: 800 !important;
  font-size: 0.82rem !important;
  white-space: nowrap;
}
@media (min-width: 900px) {
  .caixa-demonstrativo__fab {
    right: 1.35rem;
    bottom: calc(var(--dock-h, 3.5rem) + 1.25rem);
  }
}
.caixa-demonstrativo__dialog-saida .app-dialog__chrome {
  max-width: min(26rem, 96vw);
  width: 100%;
}
.caixa-demonstrativo__form-modal .caixa-demonstrativo__form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem 0.65rem;
  align-items: end;
}
.caixa-demonstrativo__form-modal .caixa-demonstrativo__form-grid--full {
  grid-column: 1 / -1;
}
.caixa-demonstrativo__form-modal input {
  width: 100%;
  box-sizing: border-box;
  min-height: 2.2rem;
  border-radius: 8px;
  font-size: 0.88rem;
}
.caixa-demonstrativo__col-title {
  margin: 0 0 0.25rem !important;
  font-size: 0.95rem;
  font-weight: 800;
}
.caixa-demonstrativo__col-hint {
  margin: 0 0 0.5rem;
  font-size: 0.78rem;
  line-height: 1.35;
}
.caixa-demonstrativo__table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-height: min(42vh, 18rem);
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.caixa-demonstrativo__table-wrap--wide {
  max-height: min(50vh, 22rem);
}
.caixa-demonstrativo__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}
.caixa-demonstrativo__table th,
.caixa-demonstrativo__table td {
  padding: 0.38rem 0.5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.caixa-demonstrativo__table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  box-shadow: 0 1px 0 var(--border);
}
.caixa-demonstrativo__th-num,
.caixa-demonstrativo__td-num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.caixa-demonstrativo__td-num--strong {
  font-weight: 800;
}
.caixa-demonstrativo__td-data {
  white-space: nowrap;
  color: var(--text-muted);
  width: 5.5rem;
}
.caixa-demonstrativo__desc {
  display: block;
  font-weight: 600;
  color: var(--text);
  word-break: break-word;
}
.caixa-demonstrativo__sub {
  display: block;
  font-size: 0.74rem;
  margin-top: 0.08rem;
}
.caixa-demonstrativo__empty {
  text-align: center;
  padding: 0.75rem 0.5rem !important;
}
.caixa-demonstrativo__saldo-dia {
  margin: 0 !important;
  padding: 0.65rem 0.85rem 0.85rem;
}

.tx-conc-filtros {
  padding: 0.75rem 1rem 0.85rem;
  margin-bottom: 0.75rem;
}
.tx-conc-filtros__form {
  margin: 0;
}
.tx-conc-filtros__row--conta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.tx-conc-filtros__label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex: 0 0 auto;
  min-width: 7.5rem;
}
.tx-conc-filtros__select {
  flex: 1 1 12rem;
  min-width: min(100%, 14rem);
  max-width: 32rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.9rem;
  border-radius: var(--radius, 8px);
  border: 1px solid var(--border);
  background: var(--surface, #fff);
  color: var(--text);
}
html[data-theme="dark"] .tx-conc-filtros__select {
  background: var(--surface, #1e293b);
}
.tx-conc-filtros__month {
  flex: 0 1 10.5rem;
  max-width: 12rem;
}

.tx-conc-filtros__sep {
  height: 0;
  margin: 0.65rem 0;
  border: none;
  border-top: 1px solid var(--border);
  opacity: 0.9;
}
.tx-conc-filtros__sep--forte {
  margin: 0.6rem 0 0.55rem;
  border-top-color: var(--border);
  opacity: 1;
}

.tx-conc-filtros__row--busca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  width: 100%;
}
.tx-conc-filtros__q {
  flex: 1 1 12rem;
  min-width: 0;
  max-width: 28rem;
  min-height: 2.5rem;
  padding: 0.4rem 0.6rem;
  font: inherit;
  font-size: 0.88rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
}
.tx-conc-filtros__q::placeholder {
  color: var(--text-muted);
  opacity: 0.85;
}

.tx-conc-filtros__row--botoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem 1rem;
  justify-content: space-between;
}
.tx-conc-filtros__grupo-btns {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.65rem;
  margin-left: auto;
  flex: 0 1 auto;
  justify-content: flex-end;
}
.tx-conc-filtros__grupo-btns .btn,
.tx-conc-filtros__grupo-btns .secondary {
  font-weight: 700;
  min-height: 2.5rem;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}
.tx-conc-filtros__link {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius, 8px);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  white-space: nowrap;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  box-sizing: border-box;
  min-height: 2.5rem;
}
.tx-conc-filtros__link:hover {
  text-decoration: none;
  border-color: var(--primary, #0084c9);
  color: var(--primary, #0084c9);
}

.tx-conc-filtros__checks {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.25rem;
  flex: 1 1 auto;
  min-width: 0;
}
.tx-conc-filtros__check {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.2;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
.tx-conc-filtros__check input {
  width: 1.05rem;
  height: 1.05rem;
  min-width: 1.05rem;
  min-height: 1.05rem;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--primary, #0084c9);
}
.tx-conc-filtros__acoes-filtro {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}
.tx-conc-filtros__btn-filtrar {
  margin-left: 0;
}
.tx-conc-filtros__carregar {
  flex-shrink: 0;
  align-self: center;
}
.tx-conc-filtros__acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  justify-content: space-between;
}
.tx-conc-filtros__acoes-hint {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.35;
  flex: 1 1 14rem;
}

@media (max-width: 640px) {
  .tx-conc-filtros__row--conta {
    flex-direction: column;
    align-items: stretch;
  }
  .tx-conc-filtros__label {
    min-width: 0;
  }
  .tx-conc-filtros__acoes-filtro {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .tx-conc-filtros__row--botoes {
    flex-direction: column;
    align-items: stretch;
  }
  .tx-conc-filtros__grupo-btns {
    margin-left: 0;
    width: 100%;
    justify-content: flex-start;
  }
  .tx-conc-filtros__checks {
    width: 100%;
  }
}

.tx-conc-filtros__sugerir {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.tx-conc-filtros__sugerir .secondary {
  font-weight: 700;
  min-height: 2.5rem;
  padding: 0.45rem 1rem;
}
.tx-conc-filtros__sugerir-hint {
  margin: 0;
  flex: 1 1 10rem;
  min-width: min(100%, 12rem);
  font-size: 0.8rem;
  line-height: 1.35;
}

/* Conciliação: vínculo = só nome; sugestão = linha única de baixa */
.tx-vinculo-cel__nome {
  color: var(--primary);
  font-weight: 700;
  font-size: 0.95rem;
}
.tx-sug-baixa {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.45rem;
  font-size: 0.86rem;
  line-height: 1.35;
}
.tx-sug-baixa__k {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.tx-sug-baixa__id {
  font-weight: 800;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.tx-sug-baixa__meta {
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

.tx-sug-conf {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  margin-bottom: 0.28rem;
}
.tx-sug-conf--alto {
  background: rgba(16, 185, 129, 0.22);
  color: #047857;
}
.tx-sug-conf--medio {
  background: rgba(245, 158, 11, 0.28);
  color: #b45309;
}
.tx-sug-conf--baixo {
  background: rgba(248, 113, 113, 0.22);
  color: #b91c1c;
}
html[data-theme="dark"] .tx-sug-conf--alto {
  color: #6ee7b7;
}
html[data-theme="dark"] .tx-sug-conf--medio {
  color: #fcd34d;
}
html[data-theme="dark"] .tx-sug-conf--baixo {
  color: #fca5a5;
}

.tx-conc-filtros__row--tesouraria {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.tx-conc-filtros__tes-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.tx-conc-filtros__tes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tx-conc-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  margin-top: 0.2rem;
}
@media (min-width: 1080px) {
  .tx-conc-split {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 34%);
    align-items: start;
  }
}
.tx-conc-split__col--extrato {
  min-width: 0;
}
.tx-titulos-card {
  padding: 0.65rem 0.75rem;
}
.tx-titulos-card__title {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.tx-titulos-scroll {
  max-height: min(70vh, 520px);
  overflow: auto;
}
.tx-table--compact {
  min-width: 0 !important;
  font-size: 0.82rem;
}
.tx-table--compact th,
.tx-table--compact td {
  white-space: normal;
}
.tx-drop-cobranca {
  cursor: copy;
  transition: background 0.12s ease, outline-color 0.12s ease;
}
.tx-drop-cobranca:hover {
  background: rgba(59, 130, 246, 0.08);
}
.tx-drop-cobranca--over {
  background: rgba(59, 130, 246, 0.16) !important;
  outline: 2px dashed var(--primary);
  outline-offset: -2px;
}
html[data-theme="dark"] .tx-drop-cobranca--over {
  background: rgba(59, 130, 246, 0.22) !important;
}
.tx-row-draggable {
  cursor: grab;
}
.tx-row-draggable--dragging {
  opacity: 0.68;
}
.tx-th-sort {
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  font-size: inherit;
}
.tx-th-sort:hover {
  color: var(--primary);
  text-decoration: underline;
}
.tx-th-sort__ind {
  font-weight: 800;
  color: var(--primary);
}

/* Conciliação: tabela com última coluna sempre visível */
.tx-table-card {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.5rem 0.75rem 0.2rem;
}
.tx-table-hint {
  margin: 0.1rem 0 0.6rem;
  font-size: 0.78rem;
}
.tx-table {
  width: 100%;
  min-width: 980px; /* garante colunas de vínculo/sugestão no scroll */
  border-collapse: collapse;
}
.tx-table th,
.tx-table td {
  vertical-align: middle;
}
.tx-table td {
  white-space: nowrap;
}
.tx-table td strong {
  white-space: nowrap;
}
.tx-table td .muted {
  white-space: nowrap;
}
.tx-table td:not(:nth-child(5)) {
  /* tudo numa linha; a descrição já tem ellipsis própria */
  overflow: hidden;
  text-overflow: ellipsis;
}
.tx-btn-lancar {
  font-weight: 800;
  padding: 0.45rem 0.75rem;
  border-radius: 10px;
  white-space: nowrap;
}
.tx-table th:last-child,
.tx-table td:last-child {
  position: sticky;
  right: 0;
  background: var(--surface);
  box-shadow: -10px 0 18px rgba(15, 23, 42, 0.06);
}
html[data-theme="dark"] .tx-table th:last-child,
html[data-theme="dark"] .tx-table td:last-child {
  box-shadow: -10px 0 18px rgba(0, 0, 0, 0.22);
}

/* Relatório de mensalidades */
.relatorio-mensal-page__head {
  margin-bottom: 0.9rem;
  max-width: min(48rem, 100%);
}
.relatorio-mensal-page__title {
  margin: 0 0 0.2rem;
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.relatorio-mensal-page__lede {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text-secondary);
  font-weight: 450;
  max-width: 40rem;
}
.relatorio-mensal-page__lede strong {
  color: var(--text);
  font-weight: 600;
}
.relatorio-mensal-page__lede-sep {
  margin: 0 0.3rem;
  color: var(--text-muted);
  font-weight: 400;
}
.relatorio-mensal-page__lede-meta {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  background: var(--bg);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.relatorio-mensal-page__filter {
  margin: 0 0 1.1rem;
  padding: 0.85rem 1rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.relatorio-mensal-page__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.7rem 1rem;
  justify-content: space-between;
}
.relatorio-mensal-page__form--period {
  margin: 0;
  flex: 0 0 auto;
}
.relatorio-mensal-page__form-fields--actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: flex-end;
  gap: 0.6rem 0.75rem;
  flex: 1 1 200px;
}
.relatorio-mensal-page__form-fields {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.6rem 0.75rem;
}
.relatorio-mensal-page__form-fields--periodo-datas {
  align-items: flex-end;
}
.relatorio-period-row__status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.65rem;
  padding-bottom: 0.05rem;
}
@media (min-width: 720px) {
  .relatorio-period-row__status {
    margin-left: 0.35rem;
    padding-left: 0.75rem;
    border-left: 1px solid var(--border);
  }
}
.relatorio-period-row__status-label {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  white-space: nowrap;
}
.relatorio-period-row__status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.5rem;
  align-items: center;
}
.relatorio-mensal-page__periodo-kicker {
  flex: 1 0 100%;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 0.1rem;
}
.relatorio-mensal-page__apply {
  min-height: 2.45rem;
  padding-left: 1.1rem;
  padding-right: 1.1rem;
  font-weight: 600;
}
.relatorio-mensal-page__export-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  box-sizing: border-box;
  font-weight: 600;
  white-space: nowrap;
}
.relatorio-mensal-page__export-cta:hover {
  text-decoration: none;
  border-color: var(--primary) !important;
  color: var(--primary) !important;
}
.relatorio-mensal-page__export-ico {
  flex-shrink: 0;
  opacity: 0.9;
}
.relatorio-mensal-page__lancar-modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.45rem;
  box-sizing: border-box;
  font-weight: 600;
  white-space: nowrap;
  font-family: inherit;
  cursor: pointer;
}
.relatorio-mensal-page__lancar-ico {
  flex-shrink: 0;
  opacity: 0.9;
}
.relatorio-mensal-page__baixar-extrato-form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  align-items: center;
}
.relatorio-mensal-page__baixar-extrato-btn {
  min-height: 2.45rem;
  font-weight: 600;
  white-space: nowrap;
}
.relatorio-mensal-page__baixar-bloqueado {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.75rem;
  max-width: min(100%, 22rem);
}
.relatorio-mensal-page__baixar-hint {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  flex: 1 1 12rem;
  min-width: 0;
}
.relatorio-mensal-page__baixar-hint a {
  font-weight: 600;
}
.relatorio-mensal-page__period {
  margin: 0.65rem 0 0;
  padding: 0.5rem 0 0;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--text-secondary);
}
.relatorio-mensal-page__period-label {
  font-size: var(--type-micro);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.relatorio-mensal-page__to-dash {
  display: inline-block;
  margin-left: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--primary);
}
.relatorio-mensal-page__to-dash:hover {
  text-decoration: underline;
}
.relatorio-mensal-page__kpi {
  margin: 0 0 1.2rem;
  margin-top: 0;
  gap: 0.9rem;
}
.relatorio-mensal-page__kpi .relatorio-mensal-page__kpi-val {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.relatorio-mensal-page__kpi-sub {
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 0.2rem;
}
.relatorio-mensal-page__detail {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: var(--shadow) !important;
  background: var(--surface);
}
.relatorio-mensal-page__detail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 0.75rem;
  padding: 0.9rem 1.05rem 0.8rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 100%);
  border-bottom: 1px solid var(--border);
}
.relatorio-mensal-page__detail-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.relatorio-mensal-page__detail-head-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
}
.relatorio-mensal-page__export {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  border: 1px solid rgba(0, 134, 201, 0.35);
  border-radius: var(--radius);
  padding: 0.28rem 0.6rem;
  background: var(--surface);
  white-space: nowrap;
}
.relatorio-mensal-page__export:hover {
  text-decoration: none;
  background: rgba(0, 134, 201, 0.08);
  border-color: var(--primary);
}
.pill--rel-meta {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--primary);
  background: rgba(0, 134, 201, 0.1);
  border: 1px solid rgba(0, 134, 201, 0.2);
  padding: 0.2rem 0.5rem;
}
html[data-theme="dark"] .pill--rel-meta {
  background: rgba(0, 134, 201, 0.15);
  border-color: rgba(0, 134, 201, 0.35);
  color: #7dd3fc;
}
.relatorio-mensal-page__table-outer {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.relatorio-mensal-page__table-empty {
  padding: 1.35rem 1.1rem !important;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}
.relatorio-mensal-page__td-mono {
  font-variant-numeric: tabular-nums;
  font-size: 0.86rem;
}
.relatorio-mensal-page__td-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.relatorio-mensal-page__td-st {
  white-space: nowrap;
}
.relatorio-mensal-page__reabrir {
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.22rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #94a3b8; /* alinhado ao estorno (secundário, não CTA) */
  background: #f1f5f9;
  color: #9a3412;
  cursor: pointer;
  font-family: inherit;
}
.relatorio-mensal-page__reabrir:hover {
  background: #fff7ed;
  border-color: #ea580c;
  color: #7c2d12;
}
html[data-theme="dark"] .relatorio-mensal-page__reabrir {
  background: #1e293b;
  color: #fb923c;
  border-color: #64748b;
}
html[data-theme="dark"] .relatorio-mensal-page__reabrir:hover {
  background: #334155;
  color: #ffedd5;
  border-color: #f97316;
}

/* Contas a pagar — mesmo ritmo que Contas a receber */
.relatorio-contas-pagar-page__form {
  margin: 0;
}
.relatorio-contas-pagar-page__lancar {
  min-height: 2.45rem;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.relatorio-contas-pagar-page__filtros {
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border);
}
.relatorio-contas-pagar-page__filtros-kicker {
  font-size: var(--type-micro);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin: 0 0 0.55rem;
  display: block;
}
.relatorio-contas-pagar-page__filtros-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.65rem;
}
.relatorio-contas-pagar-page__busca-wrap {
  flex: 1 1 14rem;
  min-width: 0;
}
.relatorio-contas-pagar-page__busca-label {
  display: block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.3rem;
}
.relatorio-contas-pagar-page__q {
  width: 100%;
}
.relatorio-contas-pagar-page__filtrar-btn {
  min-height: 2.45rem;
  font-weight: 600;
}
.relatorio-contas-pagar-page__td-desc {
  max-width: 18rem;
  word-break: break-word;
  font-size: 0.84rem;
}
.relatorio-mensal-table {
  width: 100%;
  font-size: 0.88rem;
  border-collapse: collapse;
  min-width: 40rem;
}
.relatorio-mensal-table th {
  text-align: left;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--text-muted);
  background: #f1f5f9;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
html[data-theme="dark"] .relatorio-mensal-table th {
  background: #0f172a;
  color: #94a3b8;
}
.relatorio-mensal-table td {
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.relatorio-mensal-table tbody tr:last-child td {
  border-bottom: none;
}
.relatorio-mensal-table tbody tr:hover td {
  background: rgba(0, 134, 201, 0.04);
}
html[data-theme="dark"] .relatorio-mensal-table tbody tr:hover td {
  background: rgba(0, 134, 201, 0.08);
}
.relatorio-mensal-table th.th-num,
.relatorio-mensal-table td.th-num {
  text-align: right;
  white-space: nowrap;
}
.app-backlink {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}
.app-backlink:hover {
  color: var(--primary);
  text-decoration: underline;
}
.td-actions {
  text-align: right;
  vertical-align: middle;
}
.app-row-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.5rem;
}
td .form-inline {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin: 0;
}

/* ——— Dashboard: painel, snapshot (quitação + KPIs) + tabela ——— */
.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1.05rem;
  margin-bottom: 1.25rem;
  transition: box-shadow 0.2s ease;
}
.dash-panel:hover {
  box-shadow: var(--shadow-md);
}
.app-actionbar--toolbar {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  margin: 0;
  padding: 0;
  border: none;
  max-width: none;
}
.app-actionbar__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.5rem 0.85rem;
  width: 100%;
}
/* Início: mês/aplicar | filtros rápidos (centro) | ações */
.app-actionbar__toolbar--dash {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.5rem 0.9rem;
  width: 100%;
}
.app-actionbar__toolbar--dash .app-ref-form--toolbar {
  flex: 0 1 auto;
  min-width: 0;
  width: max-content;
  max-width: 100%;
}
.app-actionbar__toolbar--dash .app-actionbar__toolbar-actions {
  flex-shrink: 0;
  align-items: center;
  padding-bottom: 0;
}
.app-ref-form--toolbar {
  flex: 1 1 auto;
  min-width: 0;
  align-items: flex-end;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0.5rem 0.65rem;
}
.app-ref-form--toolbar .app-btn-toolbar {
  align-self: flex-end;
}
.app-ref-form__field--shrink {
  min-width: 0;
}
.app-ref-form__min-label {
  font-size: 0.7rem !important;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.app-ref-input {
  font: inherit;
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0 0.6rem;
  line-height: 1.2;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  color: var(--text);
  min-width: 9.5em;
  max-width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.app-ref-input:hover {
  border-color: #cbd5e1;
}
.app-ref-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 134, 201, 0.2);
}
.app-ref-form__acoes-apply {
  display: inline-flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}
.app-filtro-rapido-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  min-height: 2.5rem;
  height: 2.5rem;
  box-sizing: border-box;
  font-size: 1.35rem;
  line-height: 1;
  font-weight: 500;
  text-decoration: none;
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}
.app-filtro-rapido-clear:hover {
  color: var(--text);
  border-color: #cbd5e1;
  text-decoration: none;
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
html[data-theme="dark"] .app-filtro-rapido-clear {
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border-color: rgba(148, 163, 184, 0.22);
}
html[data-theme="dark"] .app-filtro-rapido-clear:hover {
  color: #f1f5f9;
  border-color: rgba(148, 163, 184, 0.45);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.app-filtro-rapido-clear:focus-visible {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(0, 134, 201, 0.2);
}
html[data-theme="dark"] .app-filtro-rapido-clear:focus-visible {
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.45);
}
.app-ref-hoje-tag {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #fff;
  background: var(--primary);
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  vertical-align: 0.12em;
  margin-left: 0.2rem;
}
html[data-theme="dark"] .app-ref-hoje-tag {
  background: #0ea5e9;
  color: #0f172a;
}
.app-ref-input--mes-atual {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px rgba(0, 134, 201, 0.2);
}
.app-ref-form__field--ref-mes-atual .app-ref-input--mes-atual:hover {
  border-color: var(--primary-hover, #006fa8);
}
html[data-theme="dark"] .app-ref-input--mes-atual {
  border-color: #38bdf8;
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.35),
    0 0 12px rgba(56, 189, 248, 0.12);
}
html[data-theme="dark"] .app-ref-input--mes-atual:focus {
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.5),
    0 0 0 3px rgba(56, 189, 248, 0.15);
}
.app-btn-toolbar {
  min-height: 2.5rem;
  height: 2.5rem;
  padding: 0 0.9rem !important;
  font-size: 0.875rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
a.app-btn-toolbar,
.app-actionbar a.btn--ghost {
  min-height: 2.5rem;
  line-height: 1.1;
  box-sizing: border-box;
}
.app-actionbar__toolbar-sep {
  width: 1px;
  min-height: 2.5rem;
  background: var(--border);
  align-self: flex-end;
  margin-bottom: 0.1rem;
  flex-shrink: 0;
  opacity: 0.8;
}
.app-actionbar__toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.5rem;
  align-items: flex-end;
  padding-bottom: 0.1rem;
}
.dash-panel .app-ref-hint--inline {
  margin: 0.15rem 0 0 !important;
  width: 100%;
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.dash-snapshot {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.dash-quitacao {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1.15rem;
  transition: box-shadow 0.2s ease, border-color 0.2s;
}
.dash-quitacao:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
html[data-theme="dark"] .dash-quitacao:hover {
  border-color: #475569;
}
.dash-quitacao__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.dash-quitacao__kicker {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.dash-quitacao__title {
  margin: 0.1rem 0 0;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.dash-quitacao__pct {
  font-size: 1.65rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  color: var(--primary);
  flex-shrink: 0;
  letter-spacing: -0.03em;
}
.dash-quitacao__track {
  height: 0.7rem;
  min-height: 0.7rem;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] .dash-quitacao__track {
  background: #1e293b;
}
.dash-quitacao .app-progress__track--quit.dash-quitacao__track {
  height: 0.72rem;
  min-height: 0.72rem;
}
.dash-quitacao--pct-low .dash-quitacao__pct {
  color: #b91c1c;
}
.dash-quitacao--pct-mid .dash-quitacao__pct {
  color: #a16207;
}
.dash-quitacao--pct-high .dash-quitacao__pct {
  color: #15803d;
}
html[data-theme="dark"] .dash-quitacao--pct-low .dash-quitacao__pct {
  color: #fca5a5;
}
html[data-theme="dark"] .dash-quitacao--pct-mid .dash-quitacao__pct {
  color: #facc15;
}
html[data-theme="dark"] .dash-quitacao--pct-high .dash-quitacao__pct {
  color: #86efac;
}
.dash-quitacao__sub {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text-muted);
  max-width: 44rem;
}
.dash-kpi-hint {
  max-width: 44rem;
  padding: 0 0.15rem;
}
.dash-landing {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 0.5rem;
}
.dash-landing__kpi-row {
  width: 100%;
  min-width: 0;
  margin-bottom: 24px;
}
.dash-landing__kpi-scroller {
  width: 100%;
  min-width: 0;
  overflow: visible;
}
/* Em ecrãs estreitos: scroll horizontal suave em vez de 2×2 (valores não “espremem” no card) */
@media (max-width: 1099.98px) {
  .dash-landing__kpi-scroller {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.2rem;
    margin-left: -0.15rem;
    margin-right: -0.15rem;
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
  .dash-landing__kpi .dash-landing__kpi-4 {
    min-width: 42rem;
  }
}
.dash-section-title {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text, #0f172a);
}
h2.dash-section-title,
h3.dash-section-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
}
.dash-landing__toolbar {
  width: 100%;
  min-width: 0;
  margin: 0 0 20px;
  padding: 0.55rem 0.75rem 0.5rem;
  box-sizing: border-box;
  background: rgba(241, 245, 249, 0.6);
  border: none;
  border-bottom: 1px solid #cbd5e1;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}
.dash-landing__toolbar--home-filters .dash-home-search__kicker {
  display: none !important;
}
.dash-landing__toolbar--home-filters .dash-home-search__hint {
  display: none !important;
}
.dash-landing__toolbar--home-filters .dash-mes-header__ref-kicker,
.dash-landing__toolbar--home-filters .dash-mes-header__label {
  display: none !important;
}
.dash-landing__toolbar--home-filters .dash-landing__toolbar__line--home {
  min-height: 2.5rem;
  align-items: center;
}
.dash-landing__toolbar--home-filters .dash-landing__toolbar__mes-right .dash-mes-header--toolbar-line {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.45rem;
  min-height: 0;
  margin: 0;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__step,
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__cal-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  margin: 0;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__form {
  margin: 0;
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  min-width: 0;
  max-width: 100%;
  flex: 0 1 auto;
  flex-shrink: 1;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__month-combo {
  display: inline-flex;
  align-items: center;
  height: 2.5rem;
  margin: 0;
  min-width: 0;
  max-width: 100%;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__month,
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__step,
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__cal-btn {
  height: 2.5rem;
  min-height: 2.5rem;
  max-height: 2.5rem;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  padding: 0 0.4rem;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__cal-btn {
  min-width: 2.5rem;
  max-width: 2.5rem;
  width: 2.5rem;
  padding: 0;
  line-height: 0;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__cal-btn svg {
  display: block;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__month {
  line-height: 1.1;
  padding: 0 0.5rem 0 0.45rem;
  display: inline-flex;
  align-items: center;
  max-width: 11rem;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__cal-ico {
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  height: 1.1rem;
}
/* Navegação de mês no painel: setas e texto neutros (não azul de ligação) */
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__step {
  color: #0f172a;
  border-color: var(--border, #e2e8f0);
  text-decoration: none;
}
.dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__step:hover {
  color: #0f172a;
  border-color: #cbd5e1;
  background: #f1f5f9;
}
html[data-theme="dark"] .dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__step {
  color: #e2e8f0;
  border-color: #475569;
}
html[data-theme="dark"] .dash-landing__toolbar--home-filters .dash-mes-header--toolbar-line .dash-mes-header__step:hover {
  color: #f1f5f9;
  background: #1e293b;
  border-color: #64748b;
}
html[data-theme="dark"] .dash-landing__toolbar {
  background: rgba(26, 26, 40, 0.85);
  border-bottom-color: rgba(100, 116, 139, 0.35);
}
.dash-landing__toolbar__line {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 0.75rem;
  min-width: 0;
  width: 100%;
}
.dash-landing__toolbar__line--home {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  min-width: 0;
  min-height: 2.5rem;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.dash-landing__toolbar__search {
  flex: 1 1 18rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
}
.dash-landing__toolbar__line--home .dash-landing__toolbar__search {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  width: auto;
  align-self: center;
  min-height: 2.5rem;
}
.dash-landing__toolbar__mes-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
  flex: 0 0 auto;
  align-self: center;
}
.dash-landing__toolbar__mes-right .dash-mes-header--embedded {
  max-width: none !important;
  flex-wrap: nowrap;
}
@media (max-width: 720px) {
  .dash-landing__toolbar__line--home {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
  .dash-landing__toolbar__line--home .dash-landing__toolbar__search {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .dash-landing__toolbar__mes-right {
    width: 100%;
    justify-content: flex-start;
  }
}
@media (min-width: 720px) {
  .dash-landing__toolbar__line:not(.dash-landing__toolbar__line--home) .dash-landing__toolbar__search {
    flex: 1 1 58%;
    max-width: 64%;
  }
  .dash-landing__toolbar__line:not(.dash-landing__toolbar__line--home) .dash-landing__toolbar__ref {
    flex: 0 1 auto;
    min-width: 0;
  }
}
.dash-landing__toolbar__ref {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  flex: 1 1 12rem;
  justify-content: flex-end;
}
.dash-landing__toolbar__ref-lbl {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 100%;
}
.dash-landing__toolbar__mes {
  min-width: 0;
  flex: 0 1 auto;
  display: flex;
  align-items: center;
}
.dash-landing__toolbar__mes .dash-mes-header {
  max-width: 100%;
}
.dash-mes-header--embedded {
  max-width: min(100%, 20rem) !important;
  flex-wrap: nowrap;
}
.dash-landing__toolbar__trail {
  width: 100%;
  min-width: 0;
  margin-top: 0.25rem;
  padding-top: 0.2rem;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.75rem;
  justify-content: space-between;
}
html[data-theme="dark"] .dash-landing__toolbar__trail {
  border-top-color: rgba(255, 255, 255, 0.06);
}
.dash-landing__toolbar__trail .dash-home-search__active {
  margin: 0;
  margin-left: auto;
  justify-content: flex-end;
}
.dash-landing__toolbar__trail .dash-home-search__hint {
  margin: 0;
  flex: 1 1 12rem;
  min-width: 0;
}
.dash-landing__content {
  display: flex;
  flex-direction: column;
  gap: 0.75rem 1rem;
  width: 100%;
  min-width: 0;
  margin-top: 0.1rem;
}
.dash-landing__content-main {
  min-width: 0;
  order: 1;
}
.dash-landing__sidebar {
  min-width: 0;
  min-height: 0;
  order: 2;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-content: flex-start;
  align-items: stretch;
}
.dash-home-side-block--inadim:last-child,
.dash-home-side-block--qa:last-child {
  margin-bottom: 0;
}
/* Painel Início: conteúdo + barra lateral lado a lado desde ~720px (antes só a partir de 960px — em ecrãs médios a coluna «pro lado» sumia). */
@media (min-width: 720px) {
  .dash-landing__content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
    align-items: start;
    column-gap: 1rem;
    row-gap: 0.75rem;
  }
  .dash-landing__content-main {
    order: 1;
    min-height: 0;
  }
  .dash-landing__sidebar {
    order: 2;
    position: sticky;
    top: 0.5rem;
    align-self: start;
    max-width: 18rem;
    width: 100%;
  }
  .dash-landing__kpi-row {
    margin-bottom: 24px;
  }
}

@media (min-width: 960px) {
  .dash-landing__content {
    grid-template-columns: minmax(0, 1fr) minmax(15rem, 20rem);
    column-gap: 1.15rem;
  }
  .dash-landing__sidebar {
    max-width: 20rem;
  }
}
.dash-home-side-block {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: var(--radius, 0.5rem);
  background: var(--surface);
  padding: 0.6rem 0.75rem 0.7rem;
  font-size: 0.8rem;
  min-width: 0;
  box-shadow: var(--shadow, 0 1px 2px rgba(15, 23, 42, 0.05));
}
.dash-home-side-block h3.dash-section-title {
  margin: 0 0 0.4rem;
}
.dash-home-widget {
  min-width: 0;
  font-size: 0.8rem;
  box-shadow: none;
  border: 0;
  background: transparent;
  padding: 0;
  border-radius: 0;
}
h3.dash-section-title {
  text-transform: none;
  letter-spacing: -0.02em;
  color: var(--text);
}
h3 .dash-home-widget__t-sub {
  font-size: 0.78em;
  font-weight: 600;
  color: #94a3b8;
}
.dash-home-widget__t {
  margin: 0 0 0.4rem;
  color: var(--text-muted);
  line-height: 1.25;
}
h3.dash-section-title + .dash-home-qa,
h3.dash-section-title + .dash-home-widget__ol,
h3.dash-section-title + .dash-home-widget__ul,
h3.dash-section-title + p.dash-home-widget__empty {
  margin-top: 0;
}
.dash-home-widget__t-sub {
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #94a3b8;
}
.dash-home-widget__ol,
.dash-home-widget__ul {
  margin: 0;
  padding: 0 0 0 1.1rem;
  list-style: decimal;
}
.dash-home-widget__ul {
  list-style: disc;
}
.dash-home-widget__li {
  margin: 0.25rem 0;
  line-height: 1.3;
  color: var(--text);
}
.dash-home-widget__a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  display: inline;
}
.dash-home-widget__a:hover {
  color: var(--primary, #0086c9);
  text-decoration: underline;
}
.dash-home-widget__name {
  display: inline;
  word-break: break-word;
}
.dash-home-widget__meta {
  display: block;
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-top: 0.04rem;
}
.dash-home-widget__empty {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.35;
}
.dash-home-qa {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dash-home-side-block--qa .dash-home-qa {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.5rem 0.45rem;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}
.dash-home-side-block--qa .dash-home-qa > li {
  list-style: none;
  min-width: 0;
  display: block;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
.dash-home-side-block--qa .dash-home-qa > li:last-child {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}
.dash-home-side-block--qa .dash-home-qa--wa-only {
  display: flex;
  flex-direction: column;
  grid-template-columns: none;
  gap: 0.4rem;
}
.dash-home-side-block--qa .dash-home-qa--wa-only > li {
  width: 100%;
}
.dash-home-side-block--qa .dash-home-qa__btn--wa {
  width: 100%;
  max-width: 100%;
  min-height: 2.85rem;
  box-sizing: border-box;
  justify-content: center;
  text-align: center;
}
.dash-home-side-block--qa .dash-home-qa__btn--wa .dash-home-qa__tx {
  text-align: center;
  flex: 1 1 auto;
}
.dash-home-qa__btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  box-sizing: border-box;
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  border: 1px solid var(--border, #e2e8f0);
  background: #f8fafc;
  color: var(--text);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  transition: background 0.12s ease, border-color 0.12s ease;
  min-height: 2.65rem;
}
.dash-home-side-block--qa .dash-home-qa__btn {
  min-height: 2.85rem;
  padding: 0.55rem 0.5rem;
  font-size: 0.8rem;
}
@media (max-width: 400px) {
  .dash-home-side-block--qa .dash-home-qa {
    grid-template-columns: 1fr;
  }
  .dash-home-side-block--qa .dash-home-qa > li:last-child {
    grid-column: auto;
  }
}
.dash-home-qa__btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}
.dash-home-qa__btn--wa {
  border-color: rgba(37, 211, 102, 0.45);
  background: rgba(240, 253, 244, 0.55);
}
.dash-home-qa__btn--wa:hover {
  background: rgba(37, 211, 102, 0.1);
  border-color: #25d366;
}
html[data-theme="dark"] .dash-home-qa__btn {
  background: rgba(15, 23, 42, 0.5);
}
html[data-theme="dark"] .dash-home-qa__btn--wa {
  background: rgba(6, 78, 59, 0.22);
  border-color: rgba(37, 211, 102, 0.4);
}
.dash-home-qa__ic {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary, #0086c9);
}
.dash-home-qa__ic--svg {
  color: #64748b;
}
.dash-home-qa__ic--wa {
  color: #25d366;
}
.dash-home-qa__ic--svg svg {
  display: block;
  width: 1.1rem;
  height: 1.1rem;
  stroke: currentColor;
}
html[data-theme="dark"] .dash-home-qa__ic--svg {
  color: #94a3b8;
}
html[data-theme="dark"] .dash-home-qa__ic--wa {
  color: #4ade80;
}
.dash-home-qa__ic--emoji {
  font-size: 1rem;
  font-weight: 400;
}
.dash-home-qa__tx {
  flex: 1 1 auto;
  text-align: left;
  min-width: 0;
}
.dash-home-search {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding: 0.5rem 0.7rem 0.55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 0.5rem);
  background: var(--surface);
  box-shadow: var(--shadow);
  min-height: 0;
  align-self: start;
  width: 100%;
  box-sizing: border-box;
}
.dash-home-search--toolbar {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  min-height: 0;
  align-self: stretch;
  width: 100%;
}
.dash-home-search--toolbar .dash-home-search__row {
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4rem 0.55rem;
  min-height: 2.5rem;
  flex: 1 1 auto;
  min-width: 0;
}
.dash-home-search--toolbar .dash-home-search__row .dash-home-search__field {
  flex: 1 1 auto;
  min-width: 0;
}
.dash-home-search--toolbar .dash-home-search__active--inline {
  margin: 0;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  max-width: 8.5rem;
  overflow: hidden;
}
.dash-home-search--toolbar .dash-home-search__active--inline[hidden] {
  display: none !important;
}
.dash-home-search--toolbar .dash-home-search__active--inline .dash-home-search__badge {
  max-width: 8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-home-search--toolbar .dash-home-search__field {
  min-height: 2.5rem;
  max-height: 2.5rem;
  height: 2.5rem;
  border-radius: var(--radius-lg);
  align-items: center;
  box-sizing: border-box;
}
.dash-landing__toolbar--home-filters .dash-home-search--toolbar {
  align-self: center;
  justify-content: center;
  min-height: 2.5rem;
}
.dash-home-search--toolbar .dash-home-search__enter {
  display: none;
}
.dash-home-search__row {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem 0.55rem;
  flex-wrap: wrap;
  min-width: 0;
}
.dash-home-search__kicker {
  margin: 0;
  flex: 0 0 auto;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
  line-height: 1.1;
  white-space: nowrap;
}
.dash-home-search__row .dash-home-search__field {
  flex: 1 1 12rem;
  min-width: 0;
}
@media (max-width: 400px) {
  .dash-home-search__kicker {
    width: 100%;
  }
  .dash-home-search__row {
    flex-direction: column;
    align-items: stretch;
  }
  .dash-home-search__kicker {
    text-align: left;
  }
}
.dash-home-search__label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.dash-home-search__field {
  display: flex;
  align-items: center;
  gap: 0.3rem 0.35rem;
  flex: 1 1 auto;
  min-height: 2.5rem;
  max-height: 2.5rem;
  height: 2.5rem;
  padding: 0 0.4rem 0 0.45rem;
  border-radius: 0.45rem;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}
html[data-theme="dark"] .dash-home-search__field {
  border-color: #475569;
  background: rgba(15, 23, 42, 0.4);
}
.dash-home-search__field:focus-within {
  border-color: var(--primary, #0086c9);
  box-shadow: 0 0 0 1px rgba(0, 134, 201, 0.25);
}
.dash-home-search__enter {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0 0.1rem 0 0.35rem;
  margin-left: 0.05rem;
  border-left: 1px solid #e2e8f0;
  color: #94a3b8;
  user-select: none;
}
.dash-home-search__field:focus-within .dash-home-search__enter {
  color: #64748b;
  border-left-color: #cbd5e1;
}
html[data-theme="dark"] .dash-home-search__enter {
  border-left-color: #334155;
  color: #64748b;
}
.dash-home-search__enter-kbd {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
  font-family: system-ui, "Segoe UI", sans-serif;
  opacity: 0.7;
}
.dash-home-search__iconwrap {
  position: relative;
  display: flex;
  flex: 0 0 auto;
  width: 1.1rem;
  height: 1.1rem;
  color: #94a3b8;
}
.dash-home-search__icon-ico {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}
.dash-home-search__icon-ico[hidden] {
  display: none;
}
.dash-home-search__spinner {
  color: #64748b;
  animation: dashSearchSpin 0.85s linear infinite;
  transform-origin: 12px 12px;
}
@keyframes dashSearchSpin {
  to {
    transform: rotate(360deg);
  }
}
.dash-home-search__icon-ico--spin[hidden] {
  display: none;
}
.dash-cta-mes__name .search-hit,
.search-hit {
  background: linear-gradient(180deg, rgba(255, 237, 0, 0.35) 0%, rgba(255, 214, 0, 0.2) 100%);
  color: var(--text);
  font-weight: 800;
  padding: 0 0.1em;
  border-radius: 0.2em;
}
html[data-theme="dark"] .dash-cta-mes__name .search-hit,
html[data-theme="dark"] .search-hit {
  background: rgba(250, 204, 21, 0.2);
  color: #fef08a;
  box-shadow: 0 0 0 1px rgba(250, 204, 21, 0.2);
}
.dash-home-search__icon {
  display: flex;
  flex-shrink: 0;
  color: #94a3b8;
  padding: 0 0.15rem 0 0.1rem;
}
.dash-home-search__icon svg {
  width: 18px;
  height: 18px;
}
.dash-home-search__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 0.875rem;
  line-height: 1.25;
  color: var(--text);
  padding: 0.2rem 0.1rem 0.2rem 0;
  outline: none;
  height: 1.5rem;
  -webkit-appearance: none;
  appearance: none;
}
.dash-home-search__input::-webkit-search-decoration,
.dash-home-search__input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  display: none;
  appearance: none;
}
.dash-home-search__clear-in {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.4rem;
  height: 1.4rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #94a3b8;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  border-radius: 0.3rem;
  transition: color 0.12s ease, background 0.12s ease;
  align-self: center;
}
.dash-home-search__clear-in:hover,
.dash-home-search__clear-in:focus-visible {
  color: #475569;
  background: rgba(15, 23, 42, 0.06);
}
.dash-home-search__clear-in[hidden] {
  display: none !important;
  pointer-events: none;
}
html[data-theme="dark"] .dash-home-search__clear-in:hover,
html[data-theme="dark"] .dash-home-search__clear-in:focus-visible {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}
.dash-home-search__input::placeholder {
  color: #94a3b8;
  font-size: 0.8rem;
}
.dash-home-search__hint {
  margin: 0.05rem 0 0;
  font-size: 0.6rem;
  line-height: 1.3;
  color: var(--text-muted);
  max-width: 100%;
}
.dash-home-search__kbd {
  display: inline-block;
  padding: 0.04rem 0.3rem 0.08rem;
  font-size: 0.7em;
  font-family: inherit;
  line-height: 1.2;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 0.2rem;
  background: var(--card-muted, #f1f5f9);
  vertical-align: 0.04em;
}
.dash-home-search__active {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.25rem;
  min-height: 0;
  margin: 0;
}
.dash-home-search__badge {
  display: inline-block;
  max-width: 100%;
  padding: 0.2rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.2;
  color: var(--primary, #0369a1);
  background: rgba(3, 105, 145, 0.1);
  border: 1px solid rgba(3, 105, 145, 0.25);
  border-radius: 0.4rem;
  word-break: break-all;
}
html[data-theme="dark"] .dash-home-search__badge {
  color: #7dd3fc;
  background: rgba(7, 89, 133, 0.35);
  border-color: rgba(125, 211, 252, 0.2);
}
.dash-home-search__clear {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  margin: 0;
  padding: 0 0.15rem;
  font: inherit;
  font-size: 1.1rem;
  line-height: 1;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.dash-home-search__clear:hover {
  color: var(--text, #0f172a);
  background: rgba(0, 0, 0, 0.06);
}
html[data-theme="dark"] .dash-home-search__clear:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.08);
}
.dash-home-search__hint a {
  font-weight: 600;
}
.kpi-card__head--atraso {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.4rem;
}
.kpi-card__head--atraso .kpi-card__kicker {
  margin: 0;
  flex: 1 1 auto;
}
.kpi-card__alert-ico {
  display: flex;
  flex: 0 0 auto;
  color: #b91c1c;
  line-height: 0;
  filter: drop-shadow(0 0 0.2rem rgba(220, 38, 38, 0.35));
}
html[data-theme="dark"] .kpi-card__alert-ico {
  color: #fca5a5;
  filter: drop-shadow(0 0 0.2rem rgba(220, 38, 38, 0.45));
}
.kpi-card__head--ico {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.4rem;
}
.kpi-card__head--ico .kpi-card__kicker {
  margin: 0;
  flex: 1 1 auto;
}
.kpi-card__theme-ico {
  display: flex;
  flex: 0 0 auto;
  line-height: 0;
  color: #64748b;
  opacity: 0.95;
}
.kpi-card--volume .kpi-card__theme-ico {
  color: #64748b;
}
.kpi-card--em-dia .kpi-card__theme-ico {
  color: #b45309;
}
html[data-theme="dark"] .kpi-card--em-dia .kpi-card__theme-ico {
  color: #fbbf24;
}
.kpi-card--quitadas .kpi-card__theme-ico {
  color: #15803d;
}
html[data-theme="dark"] .kpi-card--quitadas .kpi-card__theme-ico {
  color: #4ade80;
}
.dash-quit-donut {
  display: flex;
  flex-direction: column;
  gap: 0.6rem 0.75rem;
  padding: 0.9rem 1rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.dash-quit-donut:hover {
  box-shadow: var(--shadow-md);
  border-color: #cbd5e1;
}
html[data-theme="dark"] .dash-quit-donut:hover {
  border-color: #475569;
}
.dash-quit-donut__kicker {
  margin: 0;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}
.dash-quit-donut__title {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--text);
}
.dash-quit-donut__text {
  flex: 0 0 auto;
  min-width: 0;
}
.dash-quit-donut__chart {
  position: relative;
  display: block;
  width: 5.5rem;
  max-width: 100%;
  flex-shrink: 0;
  align-self: center;
}
.dash-quit-donut__svg {
  display: block;
  color: #e2e8f0;
  margin: 0;
}
html[data-theme="dark"] .dash-quit-donut__svg {
  color: #1e293b;
}
.dash-quit-donut__ring {
  stroke: #e2e8f0;
  stroke-width: 3.15;
  fill: none;
  transition: stroke 0.2s ease;
}
html[data-theme="dark"] .dash-quit-donut__ring {
  stroke: #334155;
}
.dash-quit-donut__value {
  fill: none;
  stroke-width: 3.15;
}
.dash-quit-donut--pct-low .dash-quit-donut__value--low {
  stroke: #b91c1c;
}
.dash-quit-donut--pct-mid .dash-quit-donut__value--mid {
  stroke: #a16207;
}
.dash-quit-donut--pct-high .dash-quit-donut__value--high {
  stroke: #15803d;
}
html[data-theme="dark"] .dash-quit-donut--pct-low .dash-quit-donut__value--low {
  stroke: #fca5a5;
}
html[data-theme="dark"] .dash-quit-donut--pct-mid .dash-quit-donut__value--mid {
  stroke: #facc15;
}
html[data-theme="dark"] .dash-quit-donut--pct-high .dash-quit-donut__value--high {
  stroke: #86efac;
}
.dash-quit-donut__pct {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  text-align: center;
  line-height: 0.9;
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: -0.03em;
  pointer-events: none;
  max-width: 3.2rem;
}
.dash-quit-donut__pct-sign {
  font-size: 0.6em;
  font-weight: 800;
  vertical-align: 0.15em;
  margin-left: 0.04em;
}
.dash-quit-donut--pct-low .dash-quit-donut__pct {
  color: #b91c1c;
}
.dash-quit-donut--pct-mid .dash-quit-donut__pct {
  color: #a16207;
}
.dash-quit-donut--pct-high .dash-quit-donut__pct {
  color: #15803d;
}
html[data-theme="dark"] .dash-quit-donut--pct-low .dash-quit-donut__pct {
  color: #fca5a5;
}
html[data-theme="dark"] .dash-quit-donut--pct-mid .dash-quit-donut__pct {
  color: #facc15;
}
html[data-theme="dark"] .dash-quit-donut--pct-high .dash-quit-donut__pct {
  color: #86efac;
}
.dash-quit-donut__sub {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
  max-width: 100%;
}
@media (min-width: 480px) {
  .dash-quit-donut {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr;
  }
  .dash-quit-donut__text {
    grid-column: 1 / 2;
    grid-row: 1 / 2;
  }
  .dash-quit-donut__chart {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
  }
  .dash-quit-donut__sub {
    grid-column: 1 / 3;
    grid-row: 2 / 3;
  }
}
@media (min-width: 480px) and (max-width: 959.98px) {
  .dash-quit-donut__sub {
    max-width: 38rem;
  }
}
@media (min-width: 960px) {
  .dash-quit-donut {
    display: flex;
    flex-direction: column;
  }
  .dash-quit-donut__chart {
    order: 2;
    margin-top: 0.15rem;
  }
  .dash-quit-donut__text {
    order: 1;
  }
  .dash-quit-donut__sub {
    order: 3;
  }
  .dash-quit-donut {
    align-items: center;
  }
  .dash-quit-donut__sub {
    text-align: center;
  }
}
/* ——— Painel Início: cards KPI (layout unificado) ——— */
.kpi-row .kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  min-height: 7.75rem;
  margin: 0;
  padding: 1.05rem 1rem 1.1rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow) !important;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}
.kpi-row .kpi-card:hover {
  box-shadow: var(--shadow-md) !important;
  transform: translateY(-1px);
}
.kpi-card__head {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem 0.5rem;
  width: 100%;
  margin: 0 0 0.4rem;
  min-height: 1.5rem;
}
.kpi-card__head--padded {
  padding-right: 1.9rem; /* deixa o ícone de PDF respiro */
}
.kpi-card__headline {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
  flex: 1;
}
.kpi-card__kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  line-height: 1.25;
  padding: 0.1rem 0 0;
  max-width: 100%;
}
.kpi-card__kicker--tip {
  cursor: help;
}
.kpi-card__snap {
  margin: 0;
  width: 100%;
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-muted);
}
html[data-theme="dark"] .kpi-card__snap {
  color: #94a3b8;
}
.kpi-card__ico {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 0.45rem;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid var(--border);
}
.kpi-card--previsao .kpi-card__ico--previsao {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.25);
}
.kpi-card--atraso .kpi-card__ico--atraso {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}
.kpi-card--em-dia .kpi-card__ico--em-dia {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}
.kpi-card--quitadas .kpi-card__ico--quit {
  color: #15803d;
  background: #ecfdf5;
  border-color: #86efac;
}
.kpi-card__ico-svg {
  display: block;
}
.kpi-info-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  min-height: 1.4rem;
  margin: 0;
  margin-top: 0.05rem;
  padding: 0.1rem;
  border: 0;
  border-radius: 0.3rem;
  background: transparent;
  color: #475569;
  cursor: help;
  -webkit-tap-highlight-color: transparent;
  box-shadow: none;
}
.kpi-info-btn:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #0f172a;
}
.kpi-info-btn:focus-visible {
  outline: 2px solid var(--primary, #0086c9);
  outline-offset: 1px;
}
html[data-theme="dark"] .kpi-info-btn {
  background: transparent;
  color: #94a3b8;
}
html[data-theme="dark"] .kpi-info-btn:hover {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.06);
}
.kpi-info-btn__svg {
  display: block;
  flex-shrink: 0;
}
/* PDF: canto sup. direito; não empurra o título (corpo alinhado à esquerda) */
.kpi-card__pdf {
  position: absolute;
  top: 0.85rem;
  right: 0.75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.45rem;
  border: 1px solid var(--border);
  color: #64748b;
  text-decoration: none;
  background: #f8fafc;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.kpi-card__pdf:hover,
.kpi-card__pdf:focus-visible {
  color: #0c4a6e;
  border-color: #0086c9;
  background: #e0f2fe;
  outline: none;
}
.kpi-card__pdf:focus-visible {
  box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px #0086c9;
}
html[data-theme="dark"] .kpi-card__pdf {
  background: #1e293b;
  color: #94a3b8;
  border-color: #334155;
}
html[data-theme="dark"] .kpi-card__pdf:hover,
html[data-theme="dark"] .kpi-card__pdf:focus-visible {
  color: #7dd3fc;
  border-color: #38bdf8;
  background: #0c4a6e;
}
.kpi-card__pdf--subtle {
  border: 0;
  background: transparent;
  color: #94a3b8;
  width: 1.85rem;
  height: 1.85rem;
  box-shadow: none;
}
html[data-theme="dark"] .kpi-card__pdf--subtle {
  color: #64748b;
  background: transparent;
}
.kpi-card__pdf--subtle:hover,
.kpi-card__pdf--subtle:focus-visible {
  color: #475569;
  background: rgba(15, 23, 42, 0.06);
  border: 0;
  outline: none;
}
html[data-theme="dark"] .kpi-card__pdf--subtle:hover,
html[data-theme="dark"] .kpi-card__pdf--subtle:focus-visible {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.08);
}
.kpi-card__pdf--subtle:focus-visible {
  box-shadow: 0 0 0 2px var(--surface, #fff), 0 0 0 4px #0086c9;
}
html[data-theme="dark"] .kpi-card__pdf--subtle:focus-visible {
  box-shadow: 0 0 0 2px #0f172a, 0 0 0 4px #38bdf8;
}
.kpi-card__value {
  width: 100%;
  margin: 0.2rem 0 0.4rem;
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.08;
  font-family: var(--font-kpi);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  color: var(--text);
}
.kpi-card__value--currency {
  font-size: 1.8rem;
  color: var(--primary, #2563eb);
}
.kpi-card__value--atraso {
  color: #7f0d0d;
}
.kpi-card__value--count {
  font-size: 1.75rem;
}
html[data-theme="dark"] .kpi-card__value--currency {
  color: #7dd3fc;
}
html[data-theme="dark"] .kpi-card__value--atraso {
  color: #fecaca;
}
/* Painel: KPIs alinhados a controle-atividade (finance-kpi-card.tsx — default / success / amber / danger) */
.kpi-row .kpi-card--previsao {
  border: 1px solid rgba(226, 232, 240, 0.9) !important;
  border-radius: var(--radius-lg) !important;
  background: #fff !important;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
  cursor: default;
}
html[data-theme="dark"] .kpi-row .kpi-card--previsao {
  border: 1px solid rgba(100, 116, 139, 0.5) !important;
  background: rgba(15, 23, 42, 0.5) !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2) !important;
}
.kpi-card--volume .kpi-card__value--count,
.kpi-card--volume .kpi-card__value--currency {
  color: #0f172a;
  font-weight: 800;
}
html[data-theme="dark"] .kpi-card--volume .kpi-card__value--count,
html[data-theme="dark"] .kpi-card--volume .kpi-card__value--currency {
  color: #f1f5f9;
}
/* Atraso — tom danger (rose + gradiente) */
.kpi-row .kpi-card--atraso {
  border: 1px solid rgba(254, 205, 211, 0.9) !important;
  border-radius: var(--radius-lg) !important;
  background: linear-gradient(
    180deg,
    #fff1f2 0%,
    rgba(255, 228, 230, 0.9) 100%
  ) !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 0 rgba(248, 113, 113, 0.2) !important;
  cursor: default;
  outline: none;
}
html[data-theme="dark"] .kpi-row .kpi-card--atraso {
  border: 1px solid rgba(248, 113, 113, 0.45) !important;
  background: linear-gradient(
    180deg,
    rgba(127, 29, 29, 0.32) 0%,
    rgba(69, 10, 10, 0.5) 100%
  ) !important;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    inset 0 2px 8px rgba(0, 0, 0, 0.35),
    0 0 0 1px rgba(248, 113, 113, 0.2) !important;
  outline: none;
}
.kpi-card--atraso .kpi-card__value--currency {
  color: #b91c1c !important;
}
html[data-theme="dark"] .kpi-card--atraso .kpi-card__value--currency {
  color: #fecaca !important;
  text-shadow: 0 0 22px rgba(252, 165, 165, 0.4);
}
/* Em aberto (em dia) — tom âmbar */
.kpi-row .kpi-card--em-dia {
  border: 1px solid rgba(253, 230, 138, 0.9) !important;
  border-radius: var(--radius-lg) !important;
  background: linear-gradient(180deg, #fffbeb 0%, rgba(254, 243, 199, 0.85) 100%) !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 0 rgba(245, 158, 11, 0.1) !important;
  cursor: default;
}
.kpi-card--em-dia .kpi-card__value--count,
.kpi-row .kpi-card--em-dia .kpi-card__value--currency {
  color: #92400e;
  font-weight: 800;
}
html[data-theme="dark"] .kpi-row .kpi-card--em-dia {
  border: 1px solid rgba(245, 158, 11, 0.3) !important;
  background: linear-gradient(180deg, rgba(120, 53, 15, 0.35) 0%, rgba(69, 26, 3, 0.28) 100%) !important;
  box-shadow: inset 0 1px 0 0 rgba(245, 158, 11, 0.1), 0 0 0 1px rgba(245, 158, 11, 0.12) !important;
  border-radius: var(--radius-lg) !important;
}
html[data-theme="dark"] .kpi-card--em-dia .kpi-card__value--count,
html[data-theme="dark"] .kpi-row .kpi-card--em-dia .kpi-card__value--currency {
  color: #fef3c7;
  text-shadow: 0 0 22px rgba(251, 191, 36, 0.35);
}
/* Quitadas — tom success (esmeralda) */
.kpi-row .kpi-card--quitadas {
  border: 1px solid rgba(167, 243, 208, 0.95) !important;
  border-radius: var(--radius-lg) !important;
  background: linear-gradient(180deg, #ecfdf5 0%, rgba(209, 250, 229, 0.92) 100%) !important;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.05),
    inset 0 1px 0 0 rgba(52, 211, 153, 0.18) !important;
  cursor: default;
}
.kpi-card--quitadas .kpi-card__value--count,
.kpi-card--quitadas .kpi-card__value--currency {
  color: #064e3b;
  font-weight: 800;
}
html[data-theme="dark"] .kpi-row .kpi-card--quitadas {
  border: 1px solid rgba(16, 185, 129, 0.3) !important;
  background: linear-gradient(180deg, rgba(6, 78, 59, 0.35) 0%, rgba(6, 46, 32, 0.3) 100%) !important;
  box-shadow:
    inset 0 1px 0 0 rgba(52, 211, 153, 0.2),
    0 0 0 1px rgba(16, 185, 129, 0.12) !important;
  border-radius: var(--radius-lg) !important;
}
html[data-theme="dark"] .kpi-card--quitadas .kpi-card__value--count,
html[data-theme="dark"] .kpi-card--quitadas .kpi-card__value--currency {
  color: #d1fae5;
  text-shadow: 0 0 20px rgba(52, 211, 153, 0.35);
}
.kpi-card--quitadas .kpi-card__value--count--quit-standout,
.kpi-card--quitadas .kpi-card__value--currency.kpi-card__value--count--quit-standout {
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 0 1.1rem rgba(22, 163, 74, 0.35);
}
html[data-theme="dark"] .kpi-card--quitadas .kpi-card__value--count--quit-standout,
html[data-theme="dark"] .kpi-card--quitadas .kpi-card__value--currency.kpi-card__value--count--quit-standout {
  font-weight: 900;
  text-shadow: 0 0 0.5rem rgba(34, 197, 94, 0.45), 0 0 1.25rem rgba(34, 197, 94, 0.25);
  color: #bbf7d0;
}
.status-row--dashboard .status-card__body {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.status-row--dashboard .status-card__sub {
  min-height: 2.6em; /* padroniza 2 linhas e alinha o rodapé */
}
.dash-cta-mes {
  margin: 0.4rem 0 0.25rem;
  padding: 0.6rem 0.85rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}
.dash-landing__content-main > .dash-cta-mes:first-child {
  margin-top: 0;
  padding: 20px 0.75rem 0.8rem;
}
.dash-cta-mes__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.25rem;
}
.dash-cta-mes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.15rem;
}
.dash-cta-mes__head--title-row {
  flex-wrap: nowrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.4rem 0.65rem;
  margin-bottom: 0.2rem;
}
.dash-cta-mes__head--title-row .dash-cta-mes__title {
  flex: 1 1 auto;
  min-width: 0;
}
.dash-cta-mes__head--title-row .dash-cta-mes__btn--head {
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
  white-space: nowrap;
}
.dash-cta-mes__link-lista {
  flex: 0 0 auto;
  margin: 0;
  align-self: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary, #0086c9);
  text-decoration: none;
  border: 0;
  background: none;
  padding: 0.2rem 0.1rem;
  white-space: nowrap;
}
.dash-cta-mes__link-lista:hover {
  text-decoration: underline;
  color: var(--primary-hover, #0070a8);
}
.dash-cta-mes__link-lista:focus-visible {
  outline: 2px solid var(--primary, #0086c9);
  outline-offset: 2px;
  border-radius: 0.2rem;
}
.dash-cta-mes__empty-link {
  color: var(--primary, #0086c9);
  font-weight: 700;
  text-decoration: none;
}
.dash-cta-mes__empty-link:hover {
  text-decoration: underline;
}
@media (max-width: 520px) {
  .dash-cta-mes__head--title-row {
    flex-wrap: wrap;
  }
  .dash-cta-mes__head--title-row .dash-cta-mes__btn--head {
    width: 100%;
    justify-content: center;
  }
}
.dash-cta-mes__title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.5rem;
}
.dash-cta-mes__chip-pro {
  display: inline-block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #0369a1;
  background: rgba(3, 105, 145, 0.12);
  border: 1px solid rgba(3, 105, 145, 0.22);
  border-radius: 0.3rem;
  padding: 0.15rem 0.4rem 0.18rem;
  line-height: 1.2;
}
html[data-theme="dark"] .dash-cta-mes__chip-pro {
  color: #7dd3fc;
  background: rgba(7, 89, 133, 0.35);
  border-color: rgba(125, 211, 252, 0.2);
}
.dash-cta-mes__empty-card {
  margin-top: 0.65rem;
  padding: 1rem 1rem 1.1rem;
  border: 1px dashed var(--border, #e2e8f0);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(241, 245, 249, 0.9) 0%, var(--surface) 100%);
  text-align: left;
  max-width: 28rem;
}
.dash-cta-mes__empty-card--minimal {
  margin-top: 0.25rem;
  padding: 0.55rem 0.7rem 0.65rem;
  text-align: center;
  max-width: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  background: rgba(241, 245, 249, 0.5);
  border-style: solid;
  border-color: var(--border, #e2e8f0);
}
html[data-theme="dark"] .dash-cta-mes__empty-card {
  background: rgba(15, 23, 42, 0.4);
  border-color: #334155;
}
html[data-theme="dark"] .dash-cta-mes__empty-card--minimal {
  background: rgba(15, 23, 42, 0.35);
}
.dash-cta-mes__empty-illu {
  color: #94a3b8;
  opacity: 0.85;
  line-height: 0;
}
.dash-cta-mes__empty-svg {
  display: block;
}
.dash-cta-mes__empty-one {
  margin: 0;
  max-width: 24rem;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text-secondary, #475569);
  line-height: 1.45;
}
.dash-cta-mes__refresh {
  margin-top: 0.1rem;
  min-height: 1.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  opacity: 0.9;
}
.dash-cta-mes__empty-k {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text);
}
.dash-cta-mes__empty-card .btn {
  margin-top: 0.65rem;
}
.dash-cta-mes__s-pill {
  display: inline-block;
  min-width: 0;
  font-size: 0.72rem;
  font-weight: 700;
  max-width: 6.2rem;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  vertical-align: bottom;
}
.dash-cta-mes__th-act {
  text-align: center;
  width: 1%;
  min-width: 2.4rem;
}
.dash-cta-mes__act {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}
.dash-cta-mes__act .dash-cta-mes__qlink {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0.1rem;
  text-decoration: none;
  border-radius: 0.3rem;
  line-height: 0;
  transition: color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.dash-cta-mes__qlink--wa {
  color: #22c55e;
}
.dash-cta-mes__qlink--wa:hover {
  color: #15803d;
  background: rgba(34, 197, 94, 0.12);
}
.dash-cta-mes__qlink--mail {
  color: #0284c7;
}
.dash-cta-mes__qlink--mail:hover {
  color: #0369a1;
  background: rgba(2, 132, 199, 0.12);
}
.dash-cta-mes__qico {
  display: block;
}
.dash-cta-mes__act-void {
  color: var(--text-muted);
  font-size: 0.8rem;
}
html[data-theme="dark"] .dash-cta-mes__qlink--wa {
  color: #4ade80;
}
html[data-theme="dark"] .dash-cta-mes__qlink--mail {
  color: #7dd3fc;
}
.dash-cta-mes__btn {
  flex-shrink: 0;
}
.dash-cta-mes__btn--head {
  font-weight: 700;
  min-height: 2.4rem;
  min-width: 0;
  padding: 0.4rem 0.85rem;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.08);
  font-size: 0.82rem;
}
.dash-cta-mes__preview {
  margin-top: 0.45rem;
  padding-top: 0.4rem;
  border-top: 1px solid var(--border);
}
.dash-cta-mes__preview-k {
  margin: 0 0 0.5rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
}
.dash-cta-mes__tablewrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--border);
  border-radius: var(--radius, 0.5rem);
  background: #f8fafc;
}
html[data-theme="dark"] .dash-cta-mes__tablewrap {
  background: rgba(15, 23, 42, 0.5);
}
.dash-cta-mes__table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  line-height: 1.35;
}
.dash-cta-mes__table th {
  text-align: left;
  font-weight: 700;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0.45rem 0.6rem 0.35rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  white-space: nowrap;
}
.dash-cta-mes__th-n {
  text-align: right;
  width: 1%;
  white-space: nowrap;
}
.dash-cta-mes__th-venc {
  text-align: left;
  width: 1%;
  white-space: nowrap;
}
.dash-cta-mes__th-s {
  text-align: center;
  width: 1%;
  white-space: nowrap;
}
.dash-cta-mes__venc {
  font-size: 0.8rem;
  white-space: nowrap;
  color: var(--text);
}
.dash-cta-mes__lede--tight {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  line-height: 1.35;
  color: var(--text-muted);
  max-width: 36rem;
}
.dash-cta-mes__search-empty {
  margin: 0.5rem 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-muted);
  padding: 0.4rem 0.5rem;
  border-radius: 0.4rem;
  background: rgba(15, 23, 42, 0.04);
}
html[data-theme="dark"] .dash-cta-mes__search-empty {
  background: rgba(255, 255, 255, 0.04);
}
.dash-cta-mes__search-empty a {
  font-weight: 600;
}
.dash-cta-mes__table td {
  padding: 0.4rem 0.6rem;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
  color: var(--text);
}
html[data-theme="dark"] .dash-cta-mes__table td {
  border-bottom-color: #334155;
}
.dash-cta-mes__table tr:last-child td {
  border-bottom: none;
}
.dash-cta-mes__name {
  min-width: 0;
  max-width: 14rem;
}
.dash-cta-mes__name-t {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-cta-mes__val {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--text);
}
.dash-cta-mes__st {
  text-align: center;
  width: 1%;
}
.dash-cta-mes__foot {
  margin: 0.9rem 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem 1rem;
}
.dash-cta-mes__foot a {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--primary, #0084c9);
  text-decoration: none;
}
.dash-cta-mes__foot a:hover {
  text-decoration: underline;
}
.dash-cta-mes__foot a:focus-visible {
  outline: 2px solid var(--primary, #0086c9);
  outline-offset: 2px;
  border-radius: 0.2rem;
}
.dash-cta-mes__microfoot {
  margin: 0.5rem 0 0;
  max-width: 32rem;
  font-size: 0.7rem;
  line-height: 1.35;
  color: var(--text-muted);
  opacity: 0.88;
}
.dash-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.6rem;
  margin: 0 0 0.75rem;
  font-size: 0.88rem;
  line-height: 1.35;
}
.dash-breadcrumb__link {
  color: var(--primary, #0084c9);
  font-weight: 700;
  text-decoration: none;
}
.dash-breadcrumb__link:hover {
  text-decoration: underline;
}
.dash-breadcrumb__sep {
  color: var(--text-muted);
  user-select: none;
}
.dash-breadcrumb__here {
  font-weight: 700;
  color: var(--text);
}
.dash-breadcrumb__pill {
  margin-left: 0.25rem;
  vertical-align: middle;
}
.dash-panel.app-actionbar--topline,
.app-actionbar--topline.dash-panel {
  margin-bottom: 0.9rem;
}
html[data-theme="dark"] .app-ref-input {
  background: var(--surface);
}
html[data-theme="dark"] .dash-quitacao__kicker {
  color: #94a3b8;
}
@media (min-width: 900px) {
  .app-actionbar--toolbar.dash-panel,
  .dash-panel.app-actionbar--toolbar {
    flex-direction: column;
  }
}
.status-row--dashboard {
  margin-bottom: 0;
  gap: 0.9rem;
}
.status-row--kpi-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}
@media (max-width: 1200px) {
  .status-row--kpi-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
/* Início: 4 KPI sempre na mesma linha (nunca 2×2); o scroll horizontal cuida de ecrãs pequenos */
.dash-landing__kpi .status-row--kpi-4,
.dash-landing__kpi .dash-landing__kpi-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
  width: 100%;
  min-width: 0;
}
.dash-landing__kpi .kpi-card {
  min-width: 0;
  overflow: visible;
}
.dash-landing__kpi .kpi-card__value {
  overflow: visible;
  text-overflow: clip;
  max-width: 100%;
  word-break: normal;
}
.dash-landing__kpi .kpi-card__value--currency {
  font-size: clamp(1.15rem, 0.85rem + 0.85vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  min-height: 3.1rem;
}
.dash-landing__kpi .kpi-card--atraso .kpi-card__value--currency {
  font-size: clamp(1.15rem, 0.85rem + 0.8vw, 1.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  min-height: 3.1rem;
  font-weight: 800;
}
.dash-landing__kpi .kpi-card__value--count {
  font-size: clamp(1.15rem, 0.85rem + 0.8vw, 1.75rem);
  line-height: 1.12;
  min-height: 3.1rem;
}
.dash-landing__kpi .kpi-card__value {
  min-height: 3.1rem;
  display: flex;
  align-items: center;
  margin-top: 0.15rem;
  margin-bottom: 0.35rem;
  color: var(--text, #0f172a);
}
.dash-landing__kpi .kpi-card__snap {
  min-height: 2.45em;
  line-height: 1.35;
  font-size: 0.74rem;
  color: var(--text-secondary, #475569);
}
.dash-landing__kpi .kpi-card__kicker {
  font-size: 0.6rem;
  color: #64748b;
  font-weight: 800;
  letter-spacing: 0.07em;
}
html[data-theme="dark"] .dash-landing__kpi .kpi-card__snap {
  color: #94a3b8;
}
html[data-theme="dark"] .dash-landing__kpi .kpi-card__kicker {
  color: #94a3b8;
}
.cobr-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
}
.cobr-pill--pago {
  color: #14532d;
  background: #dcfce7;
  border-color: #86efac;
}
.cobr-pill--pend {
  color: #854d0e;
  background: #fef9c3;
  border-color: #facc15;
}
.cobr-pill--venc {
  color: #7f1d1d;
  background: #fee2e2;
  border-color: #fca5a5;
}
.cobr-pill--parcial {
  color: #9a3412;
  background: #ffedd5;
  border-color: #fb923c;
}
.cobr-pill--off {
  color: #475569;
  background: #f1f5f9;
  border-color: #e2e8f0;
}
html[data-theme="dark"] .cobr-pill--pago {
  color: #bbf7d0;
  background: #14532d;
  border-color: #22c55e;
}
html[data-theme="dark"] .cobr-pill--pend {
  color: #fef9c3;
  background: #422006;
  border-color: #a16207;
}
html[data-theme="dark"] .cobr-pill--venc {
  color: #fecaca;
  background: #7f1d1d;
  border-color: #b91c1c;
}
html[data-theme="dark"] .cobr-pill--parcial {
  color: #ffedd5;
  background: #7c2d12;
  border-color: #ea580c;
}
html[data-theme="dark"] .cobr-pill--off {
  color: #cbd5e1;
  background: #1e293b;
  border-color: #334155;
}
.dash-mes-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-top: 0.2rem;
}
.dash-mes-nav__link {
  font-size: 0.68rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--primary);
  padding: 0.1rem 0.35rem;
  border-radius: 0.3rem;
  border: 1px solid var(--border);
  background: var(--surface);
  line-height: 1.2;
  white-space: nowrap;
}
.dash-mes-nav__link:hover {
  border-color: var(--primary);
  background: rgba(37, 99, 235, 0.06);
  text-decoration: none;
  color: var(--primary);
}
html[data-theme="dark"] .dash-mes-nav__link:hover {
  background: rgba(37, 99, 235, 0.15);
}
.app-actionbar__toolbar--dash .app-ref-form__field--search {
  min-width: 8.5rem;
  max-width: 16rem;
  flex: 1 1 10rem;
}
.app-actionbar__toolbar--dash .app-ref-input--search {
  min-width: 0;
  width: 100%;
  max-width: 16rem;
}
.app-actionbar__toolbar--dash .app-ref-form__ref-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}
.app-progress__track--quit {
  height: 0.9rem;
  min-height: 0.9rem;
  background: #e2e8f0;
  border: 1px solid rgba(15, 23, 42, 0.08);
}
html[data-theme="dark"] .app-progress__track--quit {
  background: #1e293b;
  border-color: #334155;
}
.app-progress__fill--quit {
  min-width: 0;
  border-radius: 999px;
}
/* Cores por patamar de quitação (o painel aplica as classes low/mid/high) */
.app-progress__fill--quit.app-progress__fill--quit-low {
  background: linear-gradient(90deg, #f87171, #dc2626) !important;
  box-shadow: 0 0 10px rgba(220, 38, 38, 0.3);
}
.app-progress__fill--quit.app-progress__fill--quit-mid {
  background: linear-gradient(90deg, #facc15, #ca8a04) !important;
  box-shadow: 0 0 10px rgba(202, 138, 4, 0.28);
}
.app-progress__fill--quit.app-progress__fill--quit-high {
  background: linear-gradient(90deg, #4ade80, #15803d) !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.2);
}
.btn-ico--wa {
  color: #25d366;
}
.btn-ico--wa:hover {
  color: #128c7e;
}
.status-card--dashboard {
  min-height: 5.5rem;
  padding: 1.05rem 1.1rem 1.05rem 1.2rem;
  box-shadow: var(--shadow) !important;
  transition: transform 0.18s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.status-card--dashboard:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md) !important;
}
html[data-theme="dark"] .status-card--dashboard:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}
.status-card--dashboard .status-card__n--lg {
  font-size: 1.8rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  margin-bottom: 0.25rem;
}
.status-card--dashboard .status-card__label {
  font-size: var(--type-caption);
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}
.status-card--dashboard .status-card__sub {
  color: var(--text-secondary);
  font-weight: 450;
}
.status-card--dashboard .status-card__sub--valor {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  margin-top: 0.25rem;
}
.dash-h2 {
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 0;
  color: var(--text);
}
.dash-mes__title {
  margin: 0;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.app-section--lista {
  margin-bottom: 0.5rem;
}
.app-section__head--dash {
  align-items: center;
  margin-bottom: 0.65rem;
  gap: 0.5rem 1rem;
}
.app-section__pills--end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
}
.dash-mes {
  box-shadow: var(--shadow) !important;
  border: 1px solid var(--border) !important;
  transition: box-shadow 0.2s;
}
.dash-mes:hover {
  box-shadow: var(--shadow-md) !important;
}

.dash-filtro-rapido {
  display: flex;
  flex-direction: column;
  gap: 0.4rem 0.75rem;
  width: 100%;
  padding: 0.4rem 0 0.15rem;
  border-top: 1px solid var(--border);
  margin-top: 0.1rem;
}
.dash-filtro-rapido--inline {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.35rem 0.55rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
}
.dash-filtro-rapido--inline .dash-filtro-rapido__label {
  margin: 0;
  white-space: nowrap;
  line-height: 1.2;
  flex-shrink: 0;
}
.dash-filtro-rapido--inline .dash-filtro-rapido__chips {
  justify-content: center;
}
.dash-filtro-rapido__label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.dash-filtro-rapido__chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.4rem;
}
@media (max-width: 900px) {
  .dash-panel.app-actionbar--toolbar {
    padding: 0.95rem 0.8rem 1rem;
  }
  .app-actionbar__toolbar--dash {
    grid-template-columns: 1fr;
    align-items: stretch;
    justify-items: stretch;
    gap: 0.65rem;
  }
  .app-actionbar__toolbar--dash .app-actionbar__toolbar-actions {
    order: 3;
    justify-content: flex-start;
  }
  .app-actionbar__toolbar--dash .app-ref-form--toolbar {
    order: 1;
    width: 100%;
    max-width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 0.5rem 0.55rem;
  }
  .app-actionbar__toolbar--dash .app-ref-form--toolbar .app-ref-form__field--shrink {
    min-width: 0;
  }
  .app-actionbar__toolbar--dash .app-ref-form--toolbar .app-ref-input {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }
  .app-actionbar__toolbar--dash .app-ref-form--toolbar .app-btn-toolbar {
    flex-shrink: 0;
  }
  .dash-filtro-rapido--inline {
    order: 2;
    border-top: 1px solid var(--border);
    margin-top: 0.15rem;
    padding-top: 0.65rem;
    flex-direction: column;
    align-items: flex-start;
    align-self: stretch;
    gap: 0.5rem 0.75rem;
  }
  .dash-filtro-rapido--inline .dash-filtro-rapido__chips {
    /* 2×2 em ecrã estreito: evita 3 chips numa fila e o 4.º solto (ex.: "Pendentes" em cima de "Todos") */
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.4rem 0.45rem;
    width: 100%;
  }
  .dash-filtro-rapido--inline .dash-filtro-rapido__chips a.dash-chip {
    justify-content: center;
    text-align: center;
    min-height: 2.35rem;
    padding: 0.4rem 0.5rem;
    font-size: 0.78rem;
    line-height: 1.2;
  }
}
@media (max-width: 400px) {
  .dash-filtro-rapido--inline .dash-filtro-rapido__chips {
    /* telemóveis muito estreitos: coluna única, área de toque maior e alinhamento uniforme */
    grid-template-columns: 1fr;
    gap: 0.4rem;
  }
  .dash-filtro-rapido--inline .dash-filtro-rapido__chips a.dash-chip {
    min-height: 2.4rem;
    padding: 0.45rem 0.8rem;
    font-size: 0.8rem;
    width: 100%;
    box-sizing: border-box;
  }
}
a.dash-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  line-height: 1.2;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
a.dash-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  text-decoration: none;
}
a.dash-chip.is-active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
a.dash-chip.is-active:hover {
  background: var(--primary-hover, var(--primary));
  color: #fff;
  border-color: var(--primary-hover, var(--primary));
}
.pill--vista {
  background: rgba(0, 134, 201, 0.1);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(0, 134, 201, 0.3);
}
html[data-theme="dark"] .pill--vista {
  background: rgba(0, 134, 201, 0.15);
  border-color: rgba(0, 134, 201, 0.35);
  color: #7dd3fc;
}
.dash-kpi-hint {
  max-width: 40rem;
}

.app-section--first,
.app-section--lista {
  margin-bottom: 1.25rem;
}
.app-section--first .app-section__head,
.app-section--lista .app-section__head {
  margin-bottom: 0.5rem;
}
.dash-mes {
  border-radius: var(--radius-lg);
}

/* Lista “Mensalidades do mês”: cabeçalho no card + tabela */
.dash-mes--lista {
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
}
.dash-mes--lista.card--table-wrap {
  background: var(--surface);
}
.dash-mes__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.65rem 1.15rem;
  padding: 1.05rem 1.2rem 0.95rem;
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface) 48%);
  border-bottom: 1px solid var(--border);
}
.dash-mes__head-titles {
  min-width: 0;
  flex: 1 1 10rem;
}
.dash-mes__lede {
  margin: 0.2rem 0 0;
  max-width: 32rem;
  font-size: var(--type-caption);
  line-height: 1.45;
  color: var(--text-secondary);
  font-weight: 450;
  letter-spacing: 0.01em;
}
.dash-mes__pills {
  flex-shrink: 0;
}
.pill--periodo {
  background: rgba(0, 134, 201, 0.1);
  color: var(--primary);
  font-weight: 600;
  border: 1px solid rgba(0, 134, 201, 0.2);
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  display: inline-block;
  border-radius: 999px;
}
html[data-theme="dark"] .pill--periodo {
  background: rgba(0, 134, 201, 0.12);
  color: #7dd3fc;
  border-color: rgba(0, 134, 201, 0.3);
}
.dash-mes__unfilt {
  font-size: 0.8rem;
  white-space: nowrap;
}
.dash-mes__cont {
  min-width: 0;
  flex: 1 1 auto;
}
.dash-mes__lista-total {
  border-top: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
  padding: 0.75rem 1.1rem 0.85rem;
  margin: 0;
}
.dash-mes__lista-total-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.4rem 1rem;
}
.dash-mes__lista-total-lbl {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}
.dash-mes__lista-total-meta {
  font-size: 0.8rem;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  flex: 1 1 auto;
  text-align: center;
  min-width: 0;
}
.dash-mes__lista-total-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-size: 1.05rem;
  color: var(--text);
  letter-spacing: -0.02em;
}
.dash-mes__lista-total-hint {
  margin: 0.5rem 0 0;
  font-size: 0.75rem;
  line-height: 1.4;
  max-width: 40rem;
}
html[data-theme="dark"] .dash-mes__lista-total {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.55) 0%, rgba(15, 23, 42, 0.2) 100%);
  border-top-color: rgba(148, 163, 184, 0.22);
}
@media (max-width: 520px) {
  .dash-mes__lista-total-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.35rem;
  }
  .dash-mes__lista-total-meta {
    text-align: left;
  }
  .dash-mes__lista-total-val {
    align-self: flex-end;
  }
}
.dash-mes__empty {
  padding: 2rem 1.25rem 2.15rem;
  text-align: center;
  max-width: 24rem;
  margin: 0 auto;
}
.dash-mes__empty-title {
  margin: 0 0 0.5rem;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}
.dash-mes__empty-txt {
  margin: 0;
  line-height: 1.55;
  font-size: 0.88rem;
}

/* Flat KPI (leve) */
.status-card--flat {
  box-shadow: none;
  border: 1px solid var(--border);
  background: var(--surface);
}

/* Grupos de cobrança (accordion) */
.cobr-grupos {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.cobr-grupo {
  border-bottom: 1px solid var(--border);
}
.cobr-grupo:last-of-type {
  border-bottom: none;
}
.cobr-grupo__sum {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 0.8rem 1.15rem 0.8rem 0.9rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  box-shadow: inset 3px 0 0 transparent;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}
.cobr-grupo[open] .cobr-grupo__sum {
  background: var(--bg);
  box-shadow: inset 3px 0 0 var(--primary);
}
.cobr-grupo__sum::-webkit-details-marker {
  display: none;
}
.cobr-grupo__sum:hover {
  background: var(--bg);
}
.cobr-grupo__lead {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  flex: 1 1 7rem;
}
.cobr-grupo__chev {
  display: block;
  width: 0.4rem;
  height: 0.4rem;
  border: solid var(--text-muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-top: -0.1rem;
  transition: transform 0.2s ease, color 0.15s;
  opacity: 0.75;
}
.cobr-grupo[open] .cobr-grupo__chev {
  transform: rotate(225deg);
  margin-top: 0.1rem;
}
.cobr-grupo__sum:hover .cobr-grupo__chev {
  color: var(--primary);
  border-color: var(--primary);
  opacity: 1;
}
.cobr-grupo__nome {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.cobr-grupo__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.65rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-weight: 500;
}
.cobr-grupo__n {
  padding: 0.15rem 0.4rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.cobr-grupo__tot {
  font-weight: 700;
  color: var(--text);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.cobr-grupo__panel {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 0;
}
.cobr-subtable-scroller {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 0 0.1rem;
  overscroll-behavior-x: contain;
}
.cobr-subtable {
  font-size: 0.8125rem;
  /* Largura mín. das colunas (6): scroll só dentro do scroller, sem esmagar "VALOR" / ações */
  min-width: 32rem;
  width: 100%;
  table-layout: auto;
  margin: 0;
  background: var(--surface);
  border-collapse: separate;
  border-spacing: 0;
}
@media (min-width: 48rem) {
  .cobr-subtable {
    min-width: 0;
  }
}
.cobr-subtable th.cobr-th--compet,
.cobr-subtable .cobr-cell--compet-td {
  width: 1%;
  white-space: nowrap;
}
.cobr-subtable th.th-actions,
.cobr-subtable .cobr-td--acoes {
  /* Antes: width:1% esmagava a coluna e cortava “Estornar” → “Esto” */
  width: auto;
  min-width: 6.75rem;
  max-width: none;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}
.cobr-subtable .cobr-td--acoes {
  /* evita .td-actions no <td> (display:flex) a quebrar a grelha */
  display: table-cell;
}
.cobr-cell--status-td {
  text-align: left;
  white-space: nowrap;
  vertical-align: middle;
}
.cobr-subtable .cobr-td--acoes .cobr-actions {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.5rem;
}
.cobr-subtable th,
.cobr-subtable td {
  padding: 0.6rem 0.75rem;
  border: none;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}
.cobr-subtable tbody tr:last-child td {
  border-bottom: none;
}
.cobr-subtable__row:hover {
  background: #eff6fc;
}
html[data-theme="dark"] .cobr-subtable__row:hover {
  background: rgba(0, 134, 201, 0.1);
}
.cobr-th--num,
.cobr-th--date,
.cobr-th--compet {
  white-space: nowrap;
}
.cobr-th--num,
.cobr-th--date {
  text-align: right;
}
.cobr-subtable th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  box-shadow: 0 1px 0 var(--border);
  padding: 0.5rem 0.75rem;
}
html[data-theme="dark"] .cobr-subtable th {
  background: #1e293b;
  color: #94a3b8;
  box-shadow: 0 1px 0 #334155;
}
.cobr-subtable th:first-child {
  padding-left: 1rem;
}
.cobr-subtable td:first-child {
  padding-left: 1rem;
}
.cobr-subtable th:last-child,
.cobr-subtable td:last-child {
  padding-right: 1rem;
}
.cobr-cell--num {
  text-align: right;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cobr-cell--date {
  text-align: right;
  white-space: nowrap;
  font-size: 0.8rem;
  color: var(--text);
}
.cobr-cell--mono {
  font-variant-numeric: tabular-nums;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
}
.cobr-cell--desc {
  min-width: 0;
  max-width: 16rem;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (min-width: 1100px) {
  .cobr-cell--desc {
    max-width: 22rem;
  }
}
.td-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
  vertical-align: middle;
}
.th-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}
.cobr-actions {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.35rem 0.6rem;
}
.cobr-subtable .cobr-actions {
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem 0.5rem;
}
.cobr-subtable .cobr-actions .form-inline--cobr {
  flex: 0 0 auto;
  min-width: min-content; /* 0 esmagava o botão e cortava “Estornar” */
  justify-content: flex-end;
}
.cobr-subtable .cobr-actions .btn-ico {
  flex: 0 0 auto;
}
.cobr-subtable .cobr-actions .cobr-btn-estorno {
  flex: 0 0 auto;
}
/* Móvel (fim do ficheiro de regras): cartões em vez de tabela larga — após regras base, sobrescreve td/thead */
@media (max-width: 47.99rem) {
  .dash-mes__head {
    padding: 0.9rem 0.75rem 0.85rem;
  }
  .cobr-grupo__sum {
    padding: 0.7rem 0.65rem 0.7rem 0.75rem;
  }
  .cobr-subtable-scroller {
    overflow: visible;
    -webkit-overflow-scrolling: auto;
    padding: 0.4rem 0.45rem 0.55rem;
  }
  .cobr-subtable {
    min-width: 0 !important;
    table-layout: fixed;
    width: 100%;
  }
  .cobr-subtable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .cobr-subtable__row {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.65rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .cobr-subtable__row:last-of-type {
    margin-bottom: 0;
  }
  .cobr-subtable .cobr-td--acoes {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    white-space: normal;
  }
  .cobr-subtable__row td {
    display: flex !important;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.35rem 0.5rem;
    width: 100% !important;
    box-sizing: border-box;
    min-height: 2.2rem;
    padding: 0.55rem 0.7rem !important;
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: right;
    vertical-align: top;
  }
  .cobr-subtable__row td:last-child {
    border-bottom: none !important;
  }
  .cobr-subtable__row td::before {
    content: attr(data-label);
    flex: 0 0 5.4rem;
    max-width: 40%;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.4;
    padding-top: 0.15rem;
  }
  .cobr-subtable__row .cobr-td--acoes .cobr-actions {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    margin-left: auto;
    flex-wrap: wrap;
    max-width: 100%;
  }
  .cobr-subtable .cobr-cell--desc {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    max-width: none !important;
  }
  .cobr-subtable .cobr-cell--num,
  .cobr-subtable .cobr-cell--date,
  .cobr-subtable .cobr-cell--compet-td {
    white-space: normal !important;
  }
  .cobr-subtable .cobr-cell--num,
  .cobr-subtable .cobr-cell--date {
    font-size: 0.9rem;
    font-weight: 700;
  }
  .cobr-subtable__row:hover {
    background: #eff6fc;
  }
  html[data-theme="dark"] .cobr-subtable__row:hover {
    background: rgba(0, 134, 201, 0.1);
  }
}
/* Clientes (lista): mobile — busca em coluna; tabela em cartões (sem scroll horizontal apertado) */
@media (max-width: 47.99rem) {
  .app-list-filter--clientes .app-list-filter__row-main {
    flex-direction: column;
    align-items: stretch;
    gap: 0.45rem;
  }
  .app-list-filter--clientes .app-list-filter__q {
    flex: 1 1 auto;
    width: 100%;
    max-height: none;
    min-height: 2.4rem;
  }
  .app-list-filter--clientes .app-list-filter__btn {
    width: 100%;
    align-self: stretch;
    min-height: 2.4rem;
    height: auto;
  }
  .app-list-filter--clientes .app-list-filter__row-sub {
    max-width: none;
  }
  .clientes-table-scroller {
    overflow: visible;
    -webkit-overflow-scrolling: auto;
    margin: 0.35rem 0 0;
    padding: 0.3rem 0.1rem 0.45rem;
  }
  .clientes-table-scroller .clientes-table {
    min-width: 0 !important;
    table-layout: fixed;
    width: 100%;
  }
  .clientes-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .clientes-table__row {
    display: block;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 0.6rem;
    background: var(--surface);
    box-shadow: var(--shadow);
  }
  .clientes-table__row:last-of-type {
    margin-bottom: 0;
  }
  .clientes-table__row--empty {
    display: table-row;
  }
  .clientes-table__row--empty td {
    display: table-cell;
    text-align: center;
    border: none !important;
    padding: 1.1rem 0.75rem !important;
  }
  .clientes-table__row td {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem 0.5rem;
    width: 100% !important;
    box-sizing: border-box;
    min-height: 2.1rem;
    padding: 0.5rem 0.7rem !important;
    border: none !important;
    border-bottom: 1px solid var(--border) !important;
    text-align: right;
    white-space: normal !important;
    overflow: visible !important;
  }
  .clientes-table__row td:nth-child(3) {
    overflow: visible !important;
    text-overflow: clip;
  }
  .clientes-table__row td:last-child {
    border-bottom: none !important;
  }
  .clientes-table__row td::before {
    content: attr(data-label);
    flex: 0 0 5rem;
    max-width: 38%;
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-muted);
    text-align: left;
    line-height: 1.35;
    padding-top: 0.1rem;
  }
  .clientes-table__row .clientes-td--acoes {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
  }
  .clientes-table__row .clientes-td--acoes .td-actions--cliente {
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
    margin-left: auto;
    width: auto;
  }
  .clientes-table__row:hover {
    background: #eff6fc;
  }
  html[data-theme="dark"] .clientes-table__row:hover {
    background: rgba(0, 134, 201, 0.1);
  }
}
.form-inline--cobr {
  display: inline-flex;
  margin: 0;
  align-items: center;
}
.inativar-lista-cobr {
  max-height: 12rem;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.5rem 0.6rem 0.5rem 1.2rem;
  background: var(--bg);
}
.app-dialog__foot .danger,
button.danger:not(.linkish):not(.cobr-btn-excluir) {
  background: #b91c1c;
  color: #fff;
  border: 1px solid #b91c1c;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  padding: 0.45rem 0.9rem;
  font: inherit;
  min-height: 2.5rem;
}
.app-dialog__foot .danger:hover,
button.danger:not(.linkish):not(.cobr-btn-excluir):hover {
  background: #991b1b;
  border-color: #991b1b;
  color: #fff;
}
html[data-theme="dark"] .app-dialog__foot .danger,
html[data-theme="dark"] button.danger:not(.linkish):not(.cobr-btn-excluir) {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}
/* Excluir na tabela de mensalidades: não usar button.danger sozinho (conflitava com linkish) */
.cobr-btn-excluir {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.32rem 0.55rem 0.32rem 0.5rem;
  min-height: 0;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #991b1b !important;
  background: #fff !important;
  border: 1px solid #fecaca !important;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cobr-btn-excluir__ico {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  display: block;
  opacity: 0.95;
}
.cobr-btn-excluir:hover {
  background: #fef2f2 !important;
  border-color: #f87171 !important;
  color: #7f1d1d !important;
}
.cobr-btn-excluir:focus-visible {
  outline: 2px solid #f87171;
  outline-offset: 2px;
}
html[data-theme="dark"] .cobr-btn-excluir {
  color: #fecaca !important;
  background: rgba(127, 29, 29, 0.35) !important;
  border-color: rgba(248, 113, 113, 0.5) !important;
}
html[data-theme="dark"] .cobr-btn-excluir:hover {
  background: rgba(127, 29, 29, 0.5) !important;
  border-color: #f87171 !important;
  color: #fff !important;
}
/* Estornar / reabrir: nunca o botão global azul; largura = conteúdo (não esmagar) */
.cobr-btn-estorno {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.32rem;
  margin: 0;
  padding: 0.35rem 0.6rem 0.35rem 0.5rem;
  min-height: 0;
  min-width: max-content;
  width: max-content;
  max-width: 100%;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  color: #9a3412 !important;
  background: #f1f5f9 !important;
  border: 1px solid #94a3b8 !important;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: none;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  box-sizing: border-box;
}
.cobr-btn-estorno__glyph {
  display: inline-block;
  font-size: 1.05em;
  font-weight: 800;
  line-height: 1;
  flex-shrink: 0;
  /* ↺: seta circular, legível a qualquer escala (sem tracinhos 1px) */
  transform: translateY(0.02em);
}
.cobr-btn-estorno:hover {
  background: #fff7ed !important;
  border-color: #ea580c !important;
  color: #7c2d12 !important;
}
.cobr-btn-estorno:focus-visible {
  outline: 2px solid #ea580c;
  outline-offset: 2px;
}
html[data-theme="dark"] .cobr-btn-estorno {
  color: #fb923c !important;
  background: #1e293b !important;
  border-color: #64748b !important;
}
html[data-theme="dark"] .cobr-btn-estorno:hover {
  background: #334155 !important;
  color: #ffedd5 !important;
  border-color: #f97316 !important;
}
.btn-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--primary);
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  flex-shrink: 0;
}
.btn-ico:hover {
  background: var(--primary-hover);
  text-decoration: none;
  color: #fff;
}
.ico-20 {
  width: 1rem;
  height: 1rem;
  display: block;
}
.menu-placeholder {
  display: inline-flex;
  width: 1.75rem;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1;
  user-select: none;
}

/* Badges de status (tabelas) — pílulas com contraste e borda suave */
.badg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.22rem 0.6rem;
  min-height: 1.4rem;
  box-sizing: border-box;
  border-radius: 999px;
  font-size: 0.6875rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.01em;
  text-transform: none;
  border: 1px solid transparent;
  vertical-align: middle;
}
.badg--atraso {
  background: #fef2f2;
  color: #991b1b;
  border-color: #fecaca;
}
.badg--parcial {
  background: #fffbeb;
  color: #a16207;
  border-color: #fde68a;
}
.badg--pend {
  background: #eef2ff;
  color: #312e81;
  border-color: #c7d2fe;
}
.badg--ok {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}
.badg--muted {
  background: #f8fafc;
  color: #64748b;
  border-color: #e2e8f0;
}
.badg--inativo,
.badg--off {
  background: #f1f5f9;
  color: #475569;
  border-color: #e2e8f0;
  font-weight: 600;
}
.badg--avulso {
  background: #fff7ed;
  color: #9a3412;
  border-color: #fed7aa;
  font-weight: 600;
  margin-left: 0.35rem;
}
.badg--terceiro {
  background: #f1f5f9;
  color: #334155;
  border-color: #cbd5e1;
  font-weight: 600;
  margin-left: 0.35rem;
}
.clientes-td-nome__lin {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.4rem;
}
.clientes-td-nome__tit {
  font-weight: 600;
}
html[data-theme="dark"] .badg--atraso {
  background: rgba(248, 113, 113, 0.2);
  border-color: rgba(252, 165, 165, 0.55);
  color: #fecaca;
  box-shadow:
    0 0 0 1px rgba(252, 165, 165, 0.15),
    0 0 10px rgba(248, 113, 113, 0.22);
}
html[data-theme="dark"] .badg--parcial {
  background: rgba(245, 158, 11, 0.2);
  border-color: rgba(252, 211, 77, 0.45);
  color: #fde68a;
}
html[data-theme="dark"] .badg--pend {
  background: rgba(99, 102, 241, 0.25);
  border-color: rgba(99, 102, 241, 0.45);
  color: #c7d2fe;
}
html[data-theme="dark"] .badg--ok {
  background: rgba(52, 211, 153, 0.2);
  border-color: rgba(45, 212, 191, 0.35);
  color: #a7f3d0;
}
html[data-theme="dark"] .badg--muted {
  background: rgba(148, 163, 184, 0.15);
  border-color: rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}
html[data-theme="dark"] .badg--inativo,
html[data-theme="dark"] .badg--off {
  background: rgba(148, 163, 184, 0.2);
  border-color: rgba(148, 163, 184, 0.35);
  color: #cbd5e1;
}
html[data-theme="dark"] .badg--avulso {
  background: rgba(251, 146, 60, 0.16);
  border-color: rgba(234, 88, 12, 0.45);
  color: #fdba74;
}
html[data-theme="dark"] .badg--terceiro {
  background: rgba(148, 163, 184, 0.18);
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}
.card--table-wrap {
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Página Quitar mensalidade: vários bancos / parcial */
.pagar-linhas-root {
  margin: 0.5rem 0 0.25rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg, #fff);
}
.pagar-linhas-head {
  display: grid;
  grid-template-columns: 1fr min(9rem, 32%) 4.2rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.45rem 0.65rem;
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  background: #f1f5f9;
  border-bottom: 1px solid var(--border);
}
html[data-theme="dark"] .pagar-linhas-head {
  background: #0f172a;
  color: #94a3b8;
}
.pagar-linhas {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.pagar-linhas__row {
  display: grid;
  grid-template-columns: 1fr min(9rem, 32%) 4.2rem;
  gap: 0.5rem;
  align-items: center;
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--border);
  min-width: 0;
}
.pagar-linhas__row:last-child {
  border-bottom: none;
}
.pagar-linhas__banco,
.pagar-linhas__valor,
.pagar-linhas__rem-wrap {
  min-width: 0;
}
.pagar-linhas__sel,
.pagar-linhas__in-val {
  width: 100%;
  min-width: 0;
  font-size: 0.88rem;
}
.pagar-linhas__in-val {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pagar-linhas__remover {
  padding: 0.3rem 0.45rem;
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
}
.pagar-linhas-total--erro {
  color: #b91c1c;
  font-weight: 600;
}
html[data-theme="dark"] .pagar-linhas-total--erro {
  color: #f87171;
}
button.pagar-confirm {
  font-weight: 800;
  min-width: 8.5rem;
  box-shadow: 0 2px 0 rgba(0, 90, 140, 0.2);
}
@media (max-width: 560px) {
  .pagar-linhas-head,
  .pagar-linhas__row {
    grid-template-columns: 1fr;
  }
  .pagar-linhas-head__ac,
  .pagar-linhas__rem-wrap {
    display: none;
  }
  .pagar-linhas__remover {
    width: 100%;
  }
  .pagar-linhas__rem-wrap {
    display: block;
  }
}

/* ——— Plano de contas (/tipos-conta) ——— */
.plano-contas-page__head .app-page__title {
  margin-bottom: 0.15rem;
}
.plano-contas-page__lede {
  margin: 0.35rem 0 0;
  max-width: 46rem;
  line-height: 1.5;
  font-size: 0.9rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
}
html[data-theme="dark"] .plano-contas-page__lede {
  color: #cbd5e1;
}
.plano-contas__hint-btn {
  flex-shrink: 0;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
  border-radius: 999px;
  border: 1px solid rgba(0, 134, 201, 0.45);
  background: var(--surface);
  color: var(--primary);
  cursor: help;
  display: inline-grid;
  place-items: center;
}
.plano-contas__hint-btn:hover,
.plano-contas__hint-btn:focus-visible {
  background: var(--info-bg);
  border-color: var(--primary);
  color: var(--primary-hover);
  outline: none;
}
.plano-contas__hint-btn--sm {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.68rem;
  vertical-align: middle;
  margin-left: 0.15rem;
}
.plano-contas__search {
  margin: 0 0 1rem;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.plano-contas__search .plano-contas__search-q {
  min-width: 14rem;
  flex: 1;
  max-width: 28rem;
}
.plano-contas__novo {
  padding: 1rem 1.1rem;
  margin-bottom: 1.25rem;
}
.plano-contas__novo-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}
.plano-contas__novo-title {
  margin: 0;
  font-size: 1.02rem;
}
.plano-contas-novo-form {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.plano-contas-novo-form__field--grow > label {
  display: block;
  margin-bottom: 0.35rem;
}
.plano-contas-novo-form__label-row {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-bottom: 0.35rem;
}
.plano-contas-novo-form__field--full select,
.plano-contas-novo-form__field--grow input {
  width: 100%;
}
.plano-contas-novo-form__row2 {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem 1rem;
}
.plano-contas-novo-form__field--grow {
  flex: 1;
  min-width: min(100%, 14rem);
}
.plano-contas-novo-form__actions {
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
}
.plano-contas-novo-form__actions .btn {
  min-height: 2.35rem;
  min-width: 6.5rem;
}
@media (max-width: 520px) {
  .plano-contas-novo-form__row2 {
    flex-direction: column;
    align-items: stretch;
  }
  .plano-contas-novo-form__actions {
    justify-content: flex-start;
  }
}
.plano-contas__accordion {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.plano-contas-acc {
  padding: 0;
  overflow: hidden;
  min-height: 0;
}
.plano-contas-acc__summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.85rem 1rem;
  font-weight: 800;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.plano-contas-acc__summary:focus {
  outline: none;
}
.plano-contas-acc__summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}
.plano-contas-acc__summary::-webkit-details-marker {
  display: none;
}
.plano-contas-acc__chev {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--primary);
  display: grid;
  place-items: center;
}
.plano-contas-acc__chev svg {
  display: block;
  transition: transform 0.18s ease;
}
.plano-contas-acc[open] .plano-contas-acc__chev svg {
  transform: rotate(90deg);
}
.plano-contas-acc__tit-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.plano-contas-acc__tit {
  font-size: 1rem;
  color: var(--text);
}
.plano-contas-acc__hint {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--text-secondary);
}
html[data-theme="dark"] .plano-contas-acc__hint {
  color: #a8b8cc;
}
.plano-contas-acc__body {
  background: var(--surface);
}
.plano-contas__table-scroller {
  overflow-x: auto;
}
.plano-contas-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.plano-contas-table th,
.plano-contas-table td {
  padding: 0.5rem 0.65rem;
  font-size: 0.88rem;
  vertical-align: middle;
}
.plano-contas-table__th-conta {
  width: auto;
  text-align: left;
}
.plano-contas-table__th-st {
  width: 6.25rem;
  text-align: left;
}
.plano-contas-table__th-ac {
  width: 5.5rem;
  text-align: right;
}
.plano-contas-td-st,
.plano-contas-td-ac {
  white-space: nowrap;
}
.plano-contas-td-ac {
  text-align: right;
}
.plano-contas-td-conta {
  overflow: hidden;
}
.plano-contas__nome {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  padding-left: calc(var(--plano-depth, 0) * 0.75rem);
}
.plano-contas__tree-mark {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.85;
  display: grid;
  place-items: center;
}
html[data-theme="dark"] .plano-contas__tree-mark {
  color: #94a3b8;
}
.plano-contas__tree-svg {
  display: block;
}
.plano-contas__btn-edit {
  font-size: 0.8rem;
  padding: 0.35rem 0.55rem;
}
.plano-contas__ac-dash {
  font-size: 0.78rem;
}
.plano-contas-tr {
  transition: background 0.12s ease;
}
.plano-contas-tr:not(.plano-contas-tr--empty):hover {
  background: rgba(0, 134, 201, 0.08);
}
html[data-theme="dark"] .plano-contas-tr:not(.plano-contas-tr--empty):hover {
  background: rgba(148, 163, 184, 0.1);
}
.plano-contas-tr.row--muted:not(.plano-contas-tr--empty):hover {
  background: rgba(100, 116, 139, 0.12);
}
.plano-contas-td-empty {
  padding: 0.9rem 1rem !important;
}
