/* Parceiros Ignição — visual limpo ao estilo Apple, com as cores da Ignição Criativa e modo escuro. */

:root {
  --fundo: #f5f5f7;
  --lateral: #ededf0;
  --painel: #ffffff;
  --painel-2: #f9f9fb;
  --texto: #1d1d1f;
  --texto-2: #6e6e73;
  --texto-3: #8e8e93;
  --linha: #e3e3e8;
  --linha-forte: #d2d2d7;
  --hover: rgba(0, 0, 0, 0.045);
  --ativo: rgba(0, 0, 0, 0.075);
  --acento: #1d1d1f;
  --acento-texto: #ffffff;
  --foco: rgba(0, 113, 227, 0.35);
  --verde: #1f8a3b;
  --verde-fundo: rgba(52, 199, 89, 0.13);
  --laranja: #b35c00;
  --laranja-fundo: rgba(255, 149, 0, 0.14);
  --vermelho: #d70015;
  --vermelho-fundo: rgba(255, 59, 48, 0.11);
  --azul: #0066cc;
  --azul-fundo: rgba(0, 113, 227, 0.1);
  --sombra: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 1px rgba(0, 0, 0, 0.02);
  --sombra-alta: 0 20px 60px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.06);
  --raio: 14px;
  --raio-p: 10px;
  --logo-filtro: brightness(0);
  --largura-lateral: 264px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) {
    --fundo: #000000;
    --lateral: #121214;
    --painel: #1c1c1e;
    --painel-2: #232326;
    --texto: #f5f5f7;
    --texto-2: #a1a1a6;
    --texto-3: #7c7c80;
    --linha: #2c2c2e;
    --linha-forte: #3a3a3c;
    --hover: rgba(255, 255, 255, 0.06);
    --ativo: rgba(255, 255, 255, 0.1);
    --acento: #f5f5f7;
    --acento-texto: #000000;
    --verde: #32d74b;
    --verde-fundo: rgba(50, 215, 75, 0.15);
    --laranja: #ffa53a;
    --laranja-fundo: rgba(255, 159, 10, 0.16);
    --vermelho: #ff6961;
    --vermelho-fundo: rgba(255, 69, 58, 0.16);
    --azul: #4da3ff;
    --azul-fundo: rgba(10, 132, 255, 0.18);
    --sombra: 0 0 0 1px rgba(255, 255, 255, 0.04);
    --sombra-alta: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
    --logo-filtro: none;
    color-scheme: dark;
  }
}
:root[data-tema="escuro"] {
  --fundo: #000000;
  --lateral: #121214;
  --painel: #1c1c1e;
  --painel-2: #232326;
  --texto: #f5f5f7;
  --texto-2: #a1a1a6;
  --texto-3: #7c7c80;
  --linha: #2c2c2e;
  --linha-forte: #3a3a3c;
  --hover: rgba(255, 255, 255, 0.06);
  --ativo: rgba(255, 255, 255, 0.1);
  --acento: #f5f5f7;
  --acento-texto: #000000;
  --verde: #32d74b;
  --verde-fundo: rgba(50, 215, 75, 0.15);
  --laranja: #ffa53a;
  --laranja-fundo: rgba(255, 159, 10, 0.16);
  --vermelho: #ff6961;
  --vermelho-fundo: rgba(255, 69, 58, 0.16);
  --azul: #4da3ff;
  --azul-fundo: rgba(10, 132, 255, 0.18);
  --sombra: 0 0 0 1px rgba(255, 255, 255, 0.04);
  --sombra-alta: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --logo-filtro: none;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fundo);
  color: var(--texto);
  font: 15px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
a { color: var(--azul); text-decoration: none; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.login-cartao {
  width: 100%;
  max-width: 380px;
  background: var(--painel);
  border-radius: 22px;
  padding: 36px 32px 28px;
  box-shadow: var(--sombra-alta);
  text-align: center;
}
.login-cartao h1 { font-size: 26px; letter-spacing: -0.03em; margin: 18px 0 2px; font-weight: 700; }
.login-cartao p.sub { color: var(--texto-2); margin: 0 0 26px; }
.login-cartao form { display: grid; gap: 10px; text-align: left; }
.login-cartao .rodape { color: var(--texto-3); font-size: 13px; margin: 18px 0 0; }
.erro-form { color: var(--vermelho); font-size: 14px; min-height: 20px; margin: 2px 0 0; }

/* ---------- Estrutura ---------- */
.app { display: flex; min-height: 100%; }
.lateral {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--largura-lateral);
  background: var(--lateral);
  border-right: 1px solid var(--linha);
  display: flex;
  flex-direction: column;
  z-index: 30;
  padding: 18px 12px 12px;
}
.lateral .marca { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; }
.lateral .marca img { height: 34px; }
.lateral nav { flex: 1; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.nav-secao { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); padding: 18px 10px 6px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border: 0;
  background: none;
  border-radius: 8px;
  color: var(--texto);
  font-size: 14.5px;
  cursor: pointer;
  text-align: left;
}
.nav-item:hover { background: var(--hover); }
.nav-item.ativo { background: var(--ativo); font-weight: 600; }
.nav-item svg.i { color: var(--texto-2); }
.nav-item.ativo svg.i { color: var(--texto); }
.nav-item .contador { margin-left: auto; background: var(--vermelho); color: #fff; font-size: 11.5px; font-weight: 600; border-radius: 10px; padding: 1px 7px; }
.nav-sub { padding-left: 28px; }
.nav-sub .nav-item { font-size: 14px; padding: 5px 10px; color: var(--texto-2); }
.nav-sub .nav-item.ativo { color: var(--texto); background: var(--hover); }
.lateral .rodape { border-top: 1px solid var(--linha); padding-top: 10px; margin-top: 8px; }
.eu { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.eu .nome { font-weight: 600; font-size: 14px; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eu .papel { color: var(--texto-2); font-size: 12.5px; }
.eu .txt { min-width: 0; flex: 1; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--linha-forte); color: var(--texto); font-weight: 600; font-size: 12.5px;
}
.avatar.p { width: 26px; height: 26px; font-size: 11px; }
.rodape-botoes { display: flex; gap: 4px; padding: 4px 4px 0; }
.rodape-botoes .nav-item { justify-content: center; font-size: 13px; color: var(--texto-2); }

.principal { flex: 1; margin-left: var(--largura-lateral); min-width: 0; }
.topo-movel { display: none; }
.pagina { max-width: 1240px; margin: 0 auto; padding: 34px 40px 80px; }
.vel { display: none; }

@media (max-width: 900px) {
  .lateral { transform: translateX(-100%); transition: transform 0.25s ease; box-shadow: var(--sombra-alta); }
  .app.menu-aberto .lateral { transform: none; }
  .app.menu-aberto .vel { display: block; position: fixed; inset: 0; background: rgba(0, 0, 0, 0.3); z-index: 25; }
  .principal { margin-left: 0; }
  .topo-movel {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 20;
    padding: calc(10px + env(safe-area-inset-top)) 16px 10px;
    background: color-mix(in srgb, var(--fundo) 85%, transparent);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--linha);
  }
  .topo-movel img { height: 26px; }
  .topo-movel .contador { background: var(--vermelho); color: #fff; font-size: 11px; font-weight: 600; border-radius: 10px; padding: 1px 6px; margin-left: auto; }
  .pagina { padding: 20px 16px 80px; }
}

/* ---------- Cabeçalho de página ---------- */
.cabecalho { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.cabecalho h1 { font-size: 32px; line-height: 1.1; letter-spacing: -0.035em; margin: 0; font-weight: 700; }
.cabecalho .sub { color: var(--texto-2); margin: 6px 0 0; font-size: 15px; }
.cabecalho .acoes { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 600px) { .cabecalho h1 { font-size: 27px; } }

.segmentos {
  display: inline-flex; background: var(--ativo); border-radius: 9px; padding: 2px; gap: 2px; margin-bottom: 22px;
}
.segmentos button {
  border: 0; background: none; padding: 6px 16px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--texto); font-weight: 500;
}
.segmentos button.ativo { background: var(--painel); box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12); font-weight: 600; }

/* ---------- Botões e campos ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 980px; padding: 8px 16px;
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  background: var(--ativo); color: var(--texto);
  transition: transform 0.08s ease, background 0.15s ease, opacity 0.15s;
}
.btn:hover { background: color-mix(in srgb, var(--ativo) 100%, var(--texto) 6%); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn.primario { background: var(--acento); color: var(--acento-texto); }
.btn.primario:hover { opacity: 0.88; background: var(--acento); }
.btn.perigo { background: var(--vermelho-fundo); color: var(--vermelho); }
.btn.verde { background: var(--verde-fundo); color: var(--verde); }
.btn.fantasma { background: none; color: var(--texto-2); }
.btn.fantasma:hover { background: var(--hover); color: var(--texto); }
.btn.grande { padding: 11px 18px; font-size: 15px; border-radius: 12px; width: 100%; }
.btn.p { padding: 5px 12px; font-size: 13px; }
.btn.icone { padding: 7px; border-radius: 50%; }
.btn.icone.p { padding: 5px; }

.campo { display: grid; gap: 6px; align-content: start; }
.campo > span { font-size: 13px; font-weight: 500; color: var(--texto-2); }
.entrada, select.entrada, textarea.entrada {
  width: 100%; padding: 10px 12px; border-radius: var(--raio-p);
  border: 1px solid var(--linha-forte); background: var(--painel); color: var(--texto); outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 42px;
}
.entrada:focus { border-color: var(--azul); box-shadow: 0 0 0 4px var(--foco); }
select.entrada { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238e8e93' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.entrada.p { padding: 6px 10px; min-height: 34px; font-size: 14px; }
.grelha-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grelha-2 { grid-template-columns: 1fr; } }
.form { display: grid; gap: 14px; }

.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.interruptor input { appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--linha-forte); position: relative; cursor: pointer; transition: background 0.2s; flex: none; margin: 0; }
.interruptor input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); transition: transform 0.2s; }
.interruptor input:checked { background: #34c759; }
.interruptor input:checked::after { transform: translateX(18px); }

/* ---------- Cartões e listas ---------- */
.cartao { background: var(--painel); border-radius: var(--raio); box-shadow: var(--sombra); }
.cartao.pad { padding: 20px; }
.cartao h2, .secao-titulo { font-size: 19px; letter-spacing: -0.02em; margin: 0 0 4px; font-weight: 650; }
.secao-titulo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 30px 0 12px; }
.secao-titulo:first-child { margin-top: 0; }
.secao-titulo small { font-size: 14px; font-weight: 400; color: var(--texto-2); }
.muted { color: var(--texto-2); }
.pequeno { font-size: 13px; }

.lista { background: var(--painel); border-radius: var(--raio); box-shadow: var(--sombra); overflow: hidden; }
.lista > * + * { border-top: 1px solid var(--linha); }
.linha { display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 52px; }
.linha .cresce { flex: 1; min-width: 0; }
.linha .titulo { font-weight: 550; }
.linha .meta { color: var(--texto-2); font-size: 13.5px; }
button.linha { width: 100%; border: 0; background: none; text-align: left; cursor: pointer; color: inherit; }
button.linha:hover { background: var(--hover); }

.vazio { text-align: center; padding: 48px 20px; color: var(--texto-2); }
.vazio svg.i { width: 36px; height: 36px; stroke-width: 1.4; color: var(--texto-3); margin-bottom: 10px; }
.vazio h3 { color: var(--texto); margin: 0 0 6px; font-size: 17px; }
.vazio p { margin: 0 0 16px; }

.etiqueta {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 9px; border-radius: 980px; font-size: 12.5px; font-weight: 500;
  background: var(--ativo); color: var(--texto-2); white-space: nowrap;
}
.etiqueta.verde { background: var(--verde-fundo); color: var(--verde); }
.etiqueta.laranja { background: var(--laranja-fundo); color: var(--laranja); }
.etiqueta.vermelho { background: var(--vermelho-fundo); color: var(--vermelho); }
.etiqueta.azul { background: var(--azul-fundo); color: var(--azul); }
.etiqueta.forte { background: var(--acento); color: var(--acento-texto); }
.etiquetas { display: flex; flex-wrap: wrap; gap: 5px; }

/* ---------- Modal ---------- */
.modal-fundo {
  position: fixed; inset: 0; z-index: 100; background: rgba(0, 0, 0, 0.32);
  display: grid; place-items: center; padding: 24px;
  animation: aparecer 0.18s ease;
}
.modal {
  background: var(--painel); border-radius: 20px; box-shadow: var(--sombra-alta);
  width: 100%; max-width: 520px; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  animation: subir 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.modal.largo { max-width: 820px; }
.modal > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 6px; }
.modal > header h2 { margin: 0; font-size: 21px; letter-spacing: -0.025em; }
.modal > header .sub { color: var(--texto-2); margin-top: 3px; font-size: 14.5px; }
.modal > .corpo { padding: 12px 22px 18px; overflow-y: auto; }
.modal > footer { display: flex; gap: 8px; justify-content: flex-end; align-items: center; padding: 14px 22px 18px; border-top: 1px solid var(--linha); flex-wrap: wrap; }
.modal > footer .esquerda { margin-right: auto; }
@keyframes aparecer { from { opacity: 0; } }
@keyframes subir { from { transform: translateY(14px) scale(0.98); opacity: 0; } }
@media (max-width: 640px) {
  .modal-fundo { padding: 0; place-items: end stretch; }
  .modal { border-radius: 18px 18px 0 0; max-height: 92vh; max-width: none; padding-bottom: env(safe-area-inset-bottom); }
}
.bloco { margin-top: 18px; }
.bloco:first-child { margin-top: 4px; }
.bloco > .rotulo-bloco { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); font-weight: 600; margin-bottom: 8px; }
.lista.interna { box-shadow: none; border: 1px solid var(--linha); border-radius: 12px; background: var(--painel-2); }
.lista.interna .linha { min-height: 46px; padding: 8px 12px; }
.lista.interna select.entrada { max-width: 230px; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast {
  background: var(--acento); color: var(--acento-texto); padding: 10px 18px; border-radius: 980px; font-size: 14px; font-weight: 500;
  box-shadow: var(--sombra-alta); animation: subir 0.2s ease; text-align: center;
}
.toast.erro { background: var(--vermelho); color: #fff; }

/* ---------- Avisos ---------- */
.aviso { display: flex; gap: 12px; padding: 14px 16px; }
.aviso .ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--azul); flex: none; margin-top: 7px; }
.aviso.lido .ponto { background: transparent; }
.aviso .quando { color: var(--texto-3); font-size: 12.5px; margin-top: 2px; }

/* ---------- Tabelas simples ---------- */
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th { text-align: left; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); padding: 8px 8px; border-bottom: 1px solid var(--linha); }
.tabela td { padding: 7px 8px; border-bottom: 1px solid var(--linha); vertical-align: middle; }
.tabela tr:last-child td { border-bottom: 0; }
.rolar-x { overflow-x: auto; }

/* ---------- Diversos ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--linha-forte); background: var(--painel); border-radius: 980px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.chip:hover { background: var(--hover); }
.nota { background: var(--painel-2); border: 1px solid var(--linha); border-radius: 12px; padding: 12px 14px; color: var(--texto-2); font-size: 13.5px; }
.nota.aviso-nota { background: var(--laranja-fundo); border-color: transparent; color: var(--laranja); }
.pesquisa { position: relative; }
.pesquisa svg.i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--texto-3); width: 16px; height: 16px; }
.pesquisa .entrada { padding-left: 34px; min-height: 36px; border-radius: 10px; background: var(--painel); }
.senha-ver { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.grelha-cartoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pilha { display: grid; gap: 16px; max-width: 640px; }
.carregar { padding: 60px 0; text-align: center; color: var(--texto-3); }
.carregar::before { content: ""; display: inline-block; width: 22px; height: 22px; border: 2.5px solid var(--linha-forte); border-top-color: var(--texto-2); border-radius: 50%; animation: girar 0.8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.ola { font-size: 34px; }
@media (max-width: 600px) { .ola { font-size: 28px; } .so-desktop { display: none !important; } }

/* ---------- Ignição ---------- */
:root {
  --marca: linear-gradient(100deg, #ffb01f 0%, #f4704b 28%, #e0189a 60%, #7a1fc6 100%);
  --marca-suave: linear-gradient(100deg, rgba(255, 176, 31, 0.13), rgba(224, 24, 154, 0.1) 55%, rgba(122, 31, 198, 0.13));
  --roxo: #7a1fc6;
}
.logo-escuro { display: none; }
:root[data-tema="escuro"] .logo-claro { display: none; }
:root[data-tema="escuro"] .logo-escuro { display: inline; }
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) .logo-claro { display: none; }
  :root:not([data-tema="claro"]) .logo-escuro { display: inline; }
}
.login-cartao { position: relative; overflow: hidden; }
.login-cartao::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--marca); }
.login-cartao .logo-login { height: 58px; }
.login-cartao h1 { font-size: 24px; }
.nav-item .contador.roxo, .topo-movel .contador { background: var(--roxo); }
.nav-item .contador { background: var(--roxo); }
.lateral .marca { padding-bottom: 14px; }
.lateral .area { font-size: 11.5px; font-weight: 600; color: var(--texto-3); text-transform: uppercase; letter-spacing: 0.05em; padding: 0 10px 8px; }
.texto-marca { background: var(--marca); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* Indicadores */
.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin-bottom: 8px; }
@media (max-width: 420px) { .indicadores { grid-template-columns: 1fr 1fr; } .indicador .valor { font-size: 20px; } }
.indicador { background: var(--painel); border-radius: var(--raio); box-shadow: var(--sombra); padding: 16px 18px; display: grid; gap: 4px; color: inherit; min-width: 0; }
a.indicador:hover { background: color-mix(in srgb, var(--painel) 100%, var(--texto) 3%); }
.indicador .rotulo { color: var(--texto-2); font-size: 13px; display: flex; align-items: center; gap: 6px; }
.indicador .rotulo svg.i { width: 15px; height: 15px; }
.indicador .valor { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.15; overflow-wrap: break-word; }
.indicador .valor small { font-size: 14px; font-weight: 500; color: var(--texto-2); letter-spacing: 0; }
.indicador .extra { color: var(--texto-3); font-size: 12.5px; }

/* Aniversário */
.aniversario {
  position: relative; overflow: hidden; border-radius: 18px; padding: 22px 24px; margin-bottom: 22px; color: #fff;
  background: var(--marca); box-shadow: 0 10px 30px rgba(224, 24, 154, 0.25);
}
.aniversario h2 { margin: 0 0 4px; font-size: 24px; letter-spacing: -0.03em; }
.aniversario p { margin: 0; opacity: 0.92; }
.aniversario .btn { background: rgba(255, 255, 255, 0.22); color: #fff; margin-top: 12px; }
#confetes { position: fixed; inset: 0; pointer-events: none; z-index: 60; }

/* RH */
.rh-intro { background: var(--marca-suave); border-radius: var(--raio); padding: 20px 22px; display: flex; gap: 14px; align-items: flex-start; }
.rh-intro .selo { width: 42px; height: 42px; border-radius: 12px; background: var(--marca); color: #fff; display: grid; place-items: center; flex: none; }
.rh-intro .selo svg.i { width: 22px; height: 22px; }
.rh-intro h2 { margin: 0 0 4px; font-size: 18px; letter-spacing: -0.02em; }
.rh-intro p { margin: 0; color: var(--texto-2); }
.conversa { display: grid; gap: 10px; }
.bolha-linha { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.bolha-linha.minha { align-items: flex-end; }
.bolha { max-width: min(560px, 88%); padding: 10px 14px; border-radius: 18px; background: var(--painel); box-shadow: var(--sombra); white-space: pre-wrap; overflow-wrap: anywhere; }
.bolha-linha.minha .bolha { background: var(--acento); color: var(--acento-texto); }
.bolha-linha.pendente .bolha { opacity: 0.75; border: 1.5px dashed var(--linha-forte); box-shadow: none; }
.bolha-linha.recusada .bolha { opacity: 0.6; text-decoration: line-through; }
.bolha-meta { font-size: 12px; color: var(--texto-3); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 0 6px; }
.compor { display: flex; gap: 8px; align-items: flex-end; margin-top: 16px; }
.compor textarea { min-height: 46px; resize: vertical; }
.opcoes-envio { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 520px) { .opcoes-envio { grid-template-columns: 1fr; } }
.opcao-envio { border: 1.5px solid var(--linha-forte); border-radius: 14px; padding: 12px 14px; cursor: pointer; display: grid; gap: 4px; background: var(--painel); text-align: left; }
.opcao-envio .t { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.opcao-envio .d { font-size: 13px; color: var(--texto-2); }
.opcao-envio.ativo { border-color: var(--roxo); box-shadow: 0 0 0 3px rgba(122, 31, 198, 0.15); }
.etiqueta.roxo { background: rgba(122, 31, 198, 0.12); color: var(--roxo); }
:root[data-tema="escuro"] .etiqueta.roxo { color: #c58bff; }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .etiqueta.roxo { color: #c58bff; } }

/* Botões de alternar (Fixo / Freela) */
.alternar { display: flex; gap: 8px; flex-wrap: wrap; }
.alternar button { border: 1.5px solid var(--linha-forte); background: var(--painel); border-radius: 980px; padding: 8px 16px; cursor: pointer; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; }
.alternar button.ativo { background: var(--acento); color: var(--acento-texto); border-color: var(--acento); }

/* Projetos */
.projeto-linha .cliente { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); font-weight: 600; }
.prazo { white-space: nowrap; }
.texto-livre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 0; }
.comentario { display: flex; gap: 10px; padding: 10px 0; }
.comentario + .comentario { border-top: 1px solid var(--linha); }
.comentario .quem { font-weight: 600; font-size: 14px; }
.comentario .quando { color: var(--texto-3); font-size: 12px; margin-left: 6px; font-weight: 400; }

/* Funções */
.funcao-cartao { background: var(--painel); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px 20px; display: grid; gap: 10px; align-content: start; }
.funcao-cartao.minha { box-shadow: inset 0 0 0 1.5px var(--roxo), var(--sombra); }
.funcao-cartao h3 { margin: 0; font-size: 17px; letter-spacing: -0.02em; display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.funcao-cartao ul { margin: 0; padding-left: 18px; color: var(--texto-2); font-size: 14px; display: grid; gap: 3px; }

/* Contrato */
.folha-contrato { background: #fff; color: #1d1d1f; border-radius: 14px; border: 1px solid #e3e3e8; padding: 34px 38px; white-space: pre-wrap; font: 14px/1.6 Georgia, "Times New Roman", serif; overflow-wrap: anywhere; }
.folha-contrato .cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-family: -apple-system, BlinkMacSystemFont, sans-serif; white-space: normal; }
.folha-contrato .cab img { height: 34px; }
@media (max-width: 600px) { .folha-contrato { padding: 22px 18px; } }
textarea.entrada { resize: vertical; line-height: 1.5; }
textarea.contrato { min-height: 46vh; font: 13.5px/1.55 ui-monospace, "SF Mono", Menlo, monospace; }
@media print {
  body.a-imprimir > *:not(#impressao) { display: none !important; }
  body.a-imprimir #impressao { display: block !important; }
  body.a-imprimir { background: #fff; }
  #impressao .folha-contrato { border: 0; padding: 0; }
  @page { margin: 18mm; }
}
#impressao { display: none; }

/* Diversos */
.dados-lista { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; font-size: 14.5px; margin: 0; }
.dados-lista dt { color: var(--texto-2); }
.dados-lista dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { .dados-lista { grid-template-columns: 1fr; } .dados-lista dd { margin-bottom: 6px; } }
.marcador { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--texto-3); }
.valor-num { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.cabecalho-voltar { display: inline-flex; align-items: center; gap: 4px; color: var(--azul); font-size: 15px; margin-bottom: 10px; }
.grelha-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .grelha-3 { grid-template-columns: 1fr; } }
.linha .acoes-linha { display: flex; gap: 6px; align-items: center; flex: none; }
.mes-grupo { font-size: 13px; font-weight: 600; color: var(--texto-3); text-transform: uppercase; letter-spacing: 0.04em; padding: 18px 4px 8px; }

/* Disposição em duas colunas (conteúdo + lateral direita) */
.mes-nav { display: flex; align-items: center; gap: 4px; }
.mes-nav .mes { font-size: 17px; font-weight: 600; min-width: 150px; text-align: center; text-transform: capitalize; }
.barra-ferramentas { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.duas-colunas { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
@media (max-width: 1180px) { .duas-colunas { grid-template-columns: 1fr; } .duas-colunas > aside { order: 2; } }
.lado-direito { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; position: sticky; top: 24px; min-width: 0; }
.lado-direito .btn { white-space: normal; justify-content: flex-start; text-align: left; }
.lado-direito .cartao h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); margin: 0 0 12px; font-weight: 600; }
.resposta { display: flex; gap: 6px; margin-top: 10px; }

/* ---------- Gestão: clientes, faturas e livro caixa ---------- */
.tabela-g { font-size: 13.5px; }
.tabela-g th, .tabela-g td { padding: 7px 10px; white-space: nowrap; }
.tabela-g td.nome { white-space: normal; min-width: 190px; }
.tabela-g td.nome a, .tabela-g td.nome .ligacao { color: var(--texto); font-weight: 550; }
.tabela-g .meta { color: var(--texto-3); font-size: 12px; font-weight: 400; }
.tabela-g .num { text-align: right; font-variant-numeric: tabular-nums; }
.tabela-g .centro { text-align: center; }
.tabela-g th.atual { color: var(--texto); background: var(--marca-suave); border-radius: 6px 6px 0 0; }
.tabela-g tr.sub td { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); background: var(--painel-2); padding-top: 10px; }
.tabela-g tr.secao td { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; padding-top: 18px; border-bottom: 1px solid var(--linha-forte); }
.tabela-g tr.total td, .tabela-g tfoot td { font-weight: 650; border-top: 1px solid var(--linha-forte); }
.tabela-g tr.total.forte td { font-size: 15px; background: var(--painel-2); }
.tabela-g tr.meta-linha td { color: var(--texto-2); font-weight: 500; }
.tabela-g .negativo { color: var(--vermelho); }
.tabela-g .moeda { margin-left: 6px; font-size: 11px; font-weight: 600; color: var(--texto-3); border: 1px solid var(--linha-forte); border-radius: 5px; padding: 0 4px; }
.tabela-g .etiqueta.p { font-size: 11px; padding: 0 6px; margin-left: 6px; }
.ligacao { border: 0; background: none; padding: 0; cursor: pointer; text-align: left; font: inherit; }
.ligacao:hover { text-decoration: underline; }
.cel { border: 0; background: none; font: inherit; color: inherit; cursor: pointer; padding: 3px 6px; margin: -3px -6px; border-radius: 6px; display: inline-flex; flex-direction: column; align-items: flex-end; text-align: right; }
.cel:hover { background: var(--hover); }
.cel > span { display: inline-flex; align-items: center; gap: 3px; }
.cel svg.i, .cel + svg.i { width: 13px; height: 13px; }
.cel.pago { color: var(--verde); flex-direction: row; gap: 3px; align-items: center; }
.cel.vencida { color: var(--vermelho); font-weight: 600; }
.cel.permuta, .cel.permuta s { color: var(--roxo); }
.cel.estimativa { color: var(--texto-2); font-style: italic; }
.cel.ajustado > span { text-decoration: underline dotted; text-underline-offset: 3px; }
.cel.vazio { color: var(--texto-3); min-width: 40px; }
.linha.clicavel { cursor: pointer; }
.linha.clicavel:hover { background: var(--hover); }
.linha.sub-lista { min-height: 0; padding: 10px 16px 6px; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: var(--texto-3); background: var(--painel-2); }

/* Câmbio e conversor */
.cambio { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; min-width: 0; }
.cambio > span { min-width: 0; }
.conversor { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; flex-wrap: wrap; }
@media (max-width: 600px) { .cambio { justify-content: flex-start; } }
.conversor svg.i { width: 14px; height: 14px; color: var(--texto-3); }

/* Margarida */
.margarida { background: var(--painel); border-radius: var(--raio); box-shadow: var(--sombra); padding: 18px 20px; position: relative; overflow: hidden; }
.margarida::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--marca); }
.margarida-topo { display: flex; gap: 12px; align-items: center; }
.margarida-topo .selo { width: 40px; height: 40px; border-radius: 50%; background: var(--marca); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 17px; flex: none; }
.margarida-topo h2 { margin: 0; font-size: 17px; letter-spacing: -0.02em; }
.margarida-topo p { margin: 0; color: var(--texto-2); font-size: 14px; }
.tarefas { display: grid; gap: 2px; margin-top: 12px; }
.tarefa { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px 8px; border-radius: 8px; cursor: pointer; font-size: 14px; color: var(--texto); }
.tarefa:hover { background: var(--hover); }
.tarefa > span { flex: 1; }
.tarefa > svg.i:first-child { color: var(--texto-2); }
.tarefa > svg.i:last-child { color: var(--texto-3); width: 15px; height: 15px; }
.tarefa.cobrar > svg.i:first-child { color: var(--vermelho); }
.tarefa.fatura > svg.i:first-child, .tarefa.pdf > svg.i:first-child { color: var(--azul); }
.tarefa.producao > svg.i:first-child, .tarefa.perguntar > svg.i:first-child { color: var(--roxo); }

/* Copiar dados para o Portal das Finanças */
.copiar-lista { border: 1px solid var(--linha); border-radius: 12px; background: var(--painel-2); padding: 4px 12px; }
.copiar-linha { display: grid; grid-template-columns: 130px minmax(0, 1fr) 30px; align-items: center; gap: 10px; padding: 6px 0; }
.copiar-linha + .copiar-linha { border-top: 1px solid var(--linha); }
.copiar-linha .rotulo { color: var(--texto-2); font-size: 13px; }
.copiar-linha .valor { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.copiar-linha.forte .valor { font-weight: 700; }
@media (max-width: 520px) { .copiar-linha { grid-template-columns: 1fr 30px; } .copiar-linha .rotulo { grid-column: 1 / -1; } }

/* PDF simples (recibo / nota de cobrança) */
.folha-recibo { background: #fff; color: #1d1d1f; font: 14px/1.5 -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif; padding: 0; }
.folha-recibo .cab { display: flex; justify-content: space-between; align-items: flex-start; }
.folha-recibo .cab img { height: 46px; }
.folha-recibo .doc { text-align: right; font-size: 13px; color: #6e6e73; }
.folha-recibo .doc .tipo { font-size: 24px; font-weight: 700; color: #1d1d1f; letter-spacing: -0.02em; }
.folha-recibo .faixa { height: 4px; border-radius: 2px; background: linear-gradient(100deg, #ffb01f 0%, #f4704b 28%, #e0189a 60%, #7a1fc6 100%); margin: 18px 0 22px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.folha-recibo .partes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 26px; }
.folha-recibo .rot { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8e8e93; font-weight: 600; margin-bottom: 4px; }
.folha-recibo table { width: 100%; border-collapse: collapse; margin-bottom: 18px; }
.folha-recibo th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: #8e8e93; border-bottom: 1px solid #d2d2d7; padding: 8px 0; }
.folha-recibo td { padding: 10px 0; border-bottom: 1px solid #e3e3e8; }
.folha-recibo .num { text-align: right; white-space: nowrap; }
.folha-recibo tfoot td { font-weight: 700; font-size: 16px; border-bottom: 0; }
.folha-recibo .pagamento { background: #f5f5f7; border-radius: 10px; padding: 12px 14px; white-space: pre-wrap; margin: 14px 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.folha-recibo .aviso { color: #8e8e93; font-size: 12px; margin-top: 30px; }

/* Fatura simples (A4 a 96 ppp: 794 × 1123), igual ao modelo do Canva. Só é desenhada fora do ecrã para gerar o PDF. */
.fatura-simples { width: 794px; height: 1123px; box-sizing: border-box; padding: 78px 80px 64px; background: #e6e6e6; color: #4a4a4a; font: 14px/1.45 "Fira Sans", Arial, sans-serif; display: flex; flex-direction: column; letter-spacing: 0; }
.fatura-simples .fs-topo { display: flex; justify-content: space-between; align-items: flex-start; }
.fatura-simples .fs-logo { width: 214px; height: auto; margin-top: 2px; }
.fatura-simples .fs-titulo { text-align: right; }
.fatura-simples .fs-fatura { font: 40px/1 "Young Serif", Georgia, serif; letter-spacing: 0.05em; margin-right: -2px; }
.fatura-simples .fs-simples { font-size: 13px; letter-spacing: 0.06em; margin-top: 4px; }
.fatura-simples .fs-num { font-weight: 600; font-size: 14px; margin-top: 2px; }
.fatura-simples .fs-num:nth-child(3) { margin-top: 26px; }
.fatura-simples .fs-cliente { margin-top: 52px; }
.fatura-simples .fs-nome { font: 19px/1.2 "Young Serif", Georgia, serif; text-transform: uppercase; margin-bottom: 8px; }
.fatura-simples .fs-dados { display: grid; grid-template-columns: 1fr 240px; font-weight: 600; font-size: 13px; line-height: 1.5; }
.fatura-simples .fs-dados .largo { grid-column: 1 / -1; white-space: pre; }
.fatura-simples .fs-tabela { margin-top: 18px; width: 100%; height: 408px; border-collapse: collapse; border: 2px solid #5a5a5a; }
.fatura-simples .fs-tabela th { height: 48px; font: 13.5px "Young Serif", Georgia, serif; font-weight: 400; border-bottom: 2px solid #5a5a5a; text-align: left; padding: 0 0 0 76px; }
.fatura-simples .fs-tabela th + th { text-align: center; padding: 0; }
.fatura-simples .fs-item td { height: 66px; border-bottom: 2px solid #5a5a5a; font-size: 13.5px; padding: 0 0 0 46px; vertical-align: middle; }
.fatura-simples .fs-item td + td { text-align: center; padding: 0; font-size: 14px; }
.fatura-simples .fs-resto td { height: auto; }
.fatura-simples .fs-sec { font: 23px/1.2 "Young Serif", Georgia, serif; margin-top: 20px; }
.fatura-simples .fs-pag { display: flex; justify-content: space-between; align-items: flex-start; margin-top: 52px; }
.fatura-simples .fs-pagdados { white-space: pre-line; font-size: 14.5px; line-height: 1.5; }
.fatura-simples .fs-aviso { width: 290px; text-align: right; font-size: 8.5px; line-height: 1.5; }
.fatura-simples .fs-fim { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; }
.fatura-simples .fs-fim .fs-sec { margin: 0 0 6px; }
.fatura-simples .fs-contacto { white-space: pre-line; font-size: 14px; line-height: 1.5; }
.fatura-simples .fs-total { font: 38px/1 "Young Serif", Georgia, serif; letter-spacing: 0.04em; margin-bottom: 4px; }
