/* eCondomínio — shell responsivo, mobile-first. Cor primária = tenant (white-label). */
:root {
  --brand: #7c3aed;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --text: #1a1a2e;
  --muted: #6b7280;
  --border: #e5e7eb;
  --nav-h: 64px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + env(safe-area-inset-bottom, 0));
}

/* Topo white-label */
.topbar {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 56px;
  padding: 0 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 10;
}
.topbar__logo {
  font-size: 1.4rem;
}
.topbar__name {
  font-weight: 600;
}

/* Conteúdo */
.content {
  max-width: 560px;
  margin: 0 auto;
  padding: 1rem;
  display: grid;
  gap: 1rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
}
.card__title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}

.field {
  display: grid;
  gap: 0.35rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.field select,
.field input {
  font-size: 1rem;
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
.field input:focus {
  outline: 2px solid var(--brand);
  outline-offset: 1px;
}

/* Botões (login, troca de senha, ações) */
.btn {
  margin-top: 1rem;
  width: 100%;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.7rem;
  border: 1px solid var(--brand);
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}
.btn--ghost {
  background: var(--surface);
  color: var(--brand);
}
.error {
  color: #b91c1c;
}
.ok {
  color: #15803d;
}
[hidden] {
  display: none !important;
}

/* Tabela da Previsão Orçamentária */
.table {
  width: 100%;
  margin-top: 1rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.table th,
.table td {
  padding: 0.5rem 0.4rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.table .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.table tfoot th,
.table tfoot td {
  font-weight: 600;
  border-bottom: none;
}
.table tfoot .total td,
.table tfoot .total th {
  color: var(--brand);
  border-top: 2px solid var(--brand);
}

/* Menu inferior fixo */
.bottomnav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom, 0));
  padding-bottom: env(safe-area-inset-bottom, 0);
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.bottomnav__item {
  flex: 1;
  border: 0;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 0.7rem;
  color: var(--muted);
}
.bottomnav__item[aria-current="page"] {
  color: var(--brand);
  font-weight: 600;
}
.bottomnav__icon {
  font-size: 1.3rem;
  line-height: 1;
}

@media (min-width: 600px) {
  .topbar,
  .bottomnav {
    max-width: 560px;
    margin: 0 auto;
  }
}

/* Lista de módulos no console da plataforma (TM-admin.2). */
.modulos {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.modulos__item {
  padding: 8px 0;
  border-bottom: 1px solid #eee;
}
.modulos__item label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.modulos__item input:disabled + span {
  color: #999;
}

/* Perguntas sobre a convenção (T14.3) */
.perguntas__disclaimer {
  font-size: 0.8rem;
  font-style: italic;
  border-top: 1px solid #eee;
  padding-top: 8px;
  margin-top: 12px;
}
.perguntas__citacoes {
  font-size: 0.85rem;
}
#perguntas-resposta-texto {
  white-space: pre-wrap;
}
