/* RaisinPark — tokens da seção 2 do documento de design. Nenhuma cor nova. */
:root {
  --bg-page: #F4F4F1;
  --surface: #FFFFFF;
  --surface-alt: #FBFBF9;
  --border: #E4E3DE;
  --border-soft: #F0EFEB;
  --ink: #1C1B20;
  --ink-muted: #6F6D78;
  --ink-faint: #A3A1AA;
  /* A família da marca é o marrom da logo (Logo/raisinpark-*.svg). O --brand é
     literalmente a uva mais escura do desenho: tinta da logo e tinta da
     interface são a mesma. Os tons claros saíram dos antigos roxos girando só
     o matiz em oklch (mesmos L e C), como manda o documento de design. */
  --brand: #452F1D;
  --brand-tint: #EBDDD2;
  --brand-bg: #F6F0EB;
  --pos: #2F7D55;
  --neg: #B3402C;
  --warn: #B5852A;
  --warn-bg: #FAF1DC;
  --warn-border: #EDDFBA;
  --warn-text: #8A6A1F;

  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --sans: Archivo, Helvetica, Arial, sans-serif;
  --hachura: repeating-linear-gradient(135deg, #EBEAE5 0 8px, #F4F4F1 8px 16px);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: var(--brand-tint); }
button { font-family: var(--sans); }

/* ------------------------------------------------------------------ layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 22px 16px;
  display: flex; flex-direction: column; gap: 26px;
  position: sticky; top: 0; height: 100vh;
}
.marca { display: flex; align-items: center; gap: 10px; padding: 0 8px; }
.marca__mark { width: 24px; height: auto; flex: none; display: block; }
.marca__nome { font-size: 15px; font-weight: 700; letter-spacing: -0.02em; line-height: 1; }
.marca__sub {
  font-family: var(--mono); font-size: 10px; color: var(--ink-faint);
  letter-spacing: 0.08em; margin-top: 3px;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav__item {
  display: flex; align-items: center; gap: 10px;
  border-radius: 8px; padding: 9px 10px;
  font-size: 14px; font-weight: 500; color: var(--ink);
}
.nav__item:hover { background: #F2EFED; text-decoration: none; }
.nav__item--ativo { background: var(--brand-bg); color: var(--brand); font-weight: 600; }
.nav__n { font-family: var(--mono); font-size: 10px; width: 16px; color: var(--ink-faint); }
.nav__item--ativo .nav__n { color: var(--brand); }
.nav__rotulo { flex: 1; }
.nav__ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--warn); }

.sidebar__rodape { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.carga {
  border: 1px solid var(--border); border-radius: 10px; padding: 12px;
  background: var(--surface-alt);
}
.carga__valor { font-size: 13px; font-weight: 600; margin-top: 6px; }
.carga__detalhe { font-size: 12px; color: var(--ink-muted); margin-top: 2px; }

.usuario { display: flex; align-items: center; gap: 9px; padding: 4px 6px; }
.usuario__avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand-tint); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex: none;
}
.usuario__nome { font-size: 13px; font-weight: 600; line-height: 1.2; }
.usuario__perfil { font-size: 11px; color: var(--ink-muted); }
.usuario__sair {
  border: none; background: none; cursor: pointer;
  font-family: var(--mono); font-size: 10px; color: var(--ink-muted);
}

.main { padding: 26px 32px 60px; max-width: 1240px; }

/* ----------------------------------------------------------------- cabeçalho */
.cabecalho {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--border);
}
.crumb {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-muted);
}
h1 { margin: 6px 0 0; font-size: 27px; font-weight: 700; letter-spacing: -0.03em; }
.cabecalho__controles { display: flex; align-items: center; gap: 10px; }

.seletor-mes {
  display: flex; align-items: center; border: 1px solid var(--border);
  background: var(--surface); border-radius: 8px; height: 38px; padding: 0 4px; gap: 2px;
}
.seletor-mes a {
  padding: 0 8px; font-family: var(--mono); font-size: 13px; color: var(--ink-muted);
  line-height: 36px;
}
.seletor-mes a:hover { text-decoration: none; color: var(--ink); }
.seletor-mes__valor { font-size: 14px; font-weight: 600; padding: 0 4px; white-space: nowrap; }

.abas-regime { display: flex; background: #ECEAE6; border-radius: 8px; padding: 3px; }
.abas-regime a {
  border-radius: 6px; padding: 7px 14px; font-size: 13px; font-weight: 600;
  color: var(--ink-muted);
}
.abas-regime a:hover { text-decoration: none; color: var(--ink); }
.abas-regime a.ativa {
  background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08);
}

.corpo { display: flex; flex-direction: column; gap: 22px; padding-top: 22px; }

/* ----------------------------------------------------------------- primitivas */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
.card__topo {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.card__titulo { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.card__sub { font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.card__corpo { padding: 16px 18px; }

.label {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-muted);
}
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-weight: 600; font-size: 13px; white-space: nowrap; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.muted { color: var(--ink-muted); }
.faint { color: var(--ink-faint); }
.dir { text-align: right; }

.selo {
  font-family: var(--mono); font-size: 9px; letter-spacing: 0.06em;
  border-radius: 4px; padding: 2px 5px; text-transform: uppercase;
  display: inline-block; white-space: nowrap;
}
.selo--estimado { color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-border); }
.selo--api { color: var(--brand); background: var(--brand-tint); border: 1px solid #E3D1C1; }
.selo--manual { color: var(--ink-muted); background: var(--surface-alt); border: 1px solid var(--border); }
.selo--neutro { color: var(--ink-muted); background: var(--surface-alt); border: 1px solid var(--border); }
.selo--pos { color: var(--pos); background: #EAF3EE; border: 1px solid #CFE4D8; }
.selo--neg { color: var(--neg); background: #F7EAE7; border: 1px solid #EBCFC9; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 16px 14px;
}
.kpi__topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi__valor {
  font-family: var(--mono); font-size: 25px; font-weight: 600;
  letter-spacing: -0.03em; margin-top: 12px; white-space: nowrap;
}
.kpi__rodape { display: flex; align-items: center; gap: 6px; margin-top: 8px; }
.kpi__delta { font-family: var(--mono); font-size: 12px; font-weight: 600; }
.kpi__delta-label { font-size: 12px; color: var(--ink-muted); }

.alertas { display: flex; flex-wrap: wrap; gap: 8px; }
.alerta {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; color: var(--ink);
}
.alerta:hover { text-decoration: none; border-color: var(--ink-faint); }
.alerta--warn { background: var(--warn-bg); border-color: var(--warn-border); }
.alerta__ponto { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-faint); flex: none; }
.alerta--warn .alerta__ponto { background: var(--warn); }
.alerta__titulo { font-size: 13px; font-weight: 600; }
.alerta__desc { font-size: 13px; color: var(--ink-muted); }

/* -------------------------------------------------------------------- tabela */
.tabela { width: 100%; border-collapse: collapse; }
.tabela thead th {
  background: var(--surface-alt); border-bottom: 1px solid var(--border);
  padding: 10px 18px; text-align: left;
  font-family: var(--mono); font-size: 10px; font-weight: 400;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-muted);
}
.tabela tbody td { padding: 12px 18px; border-bottom: 1px solid var(--border-soft); }
.tabela tbody tr:last-child td { border-bottom: none; }
.tabela tbody tr.clicavel:hover { background: #FBFAF8; cursor: pointer; }
.tabela th.dir, .tabela td.dir { text-align: right; }

.barra { height: 3px; border-radius: 3px; background: var(--border-soft); overflow: hidden; }
.barra__fill { height: 100%; border-radius: 3px; background: var(--brand-tint); }
.barra__fill--pos { background: var(--pos); opacity: .75; }
.barra__fill--neg { background: var(--neg); opacity: .75; }

.vaga { font-family: var(--mono); font-size: 11px; color: var(--ink-faint); }

/* ----------------------------------------------------------------------- DRE */
.dre { width: 100%; border-collapse: collapse; }
.dre td { padding: 11px 18px; border-bottom: 1px solid var(--border-soft); }
.dre tr.detalhe td { padding-top: 7px; padding-bottom: 7px; color: var(--ink-muted); }
.dre tr.detalhe .dre__rotulo { padding-left: 46px; font-size: 13px; }
.dre__rotulo { padding-left: 18px; }
.dre__sinal { width: 18px; color: var(--ink-faint); font-family: var(--mono); font-size: 12px; }
.dre__pct { text-align: right; font-family: var(--mono); font-size: 11px; color: var(--ink-faint); width: 60px; }
.dre__valor { text-align: right; font-family: var(--mono); font-size: 13px; font-weight: 600; white-space: nowrap; }
.dre tr.destaque td { background: var(--surface-alt); padding-top: 15px; padding-bottom: 15px; }
.dre tr.destaque .dre__rotulo { font-weight: 700; font-size: 13px; letter-spacing: 0.02em; }
.dre tr.destaque .dre__valor { font-size: 17px; }
.dre__nota { padding: 16px 18px; font-size: 12px; color: var(--ink-muted); line-height: 1.5; }

/* ------------------------------------------------------------------ formulário */
.form { display: flex; flex-direction: column; gap: 14px; }
.form__linha { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo__label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink-muted);
}
.campo__hint { font-family: var(--mono); font-size: 10px; color: var(--ink-faint); text-transform: none; letter-spacing: 0.04em; }
.campo input, .campo select, .campo textarea {
  height: 42px; border: 1px solid var(--border); border-radius: 8px;
  padding: 0 12px; font-family: var(--sans); font-size: 14px;
  color: var(--ink); background: var(--surface-alt); width: 100%;
}
.campo textarea { height: auto; padding: 10px 12px; }

/* O olho é injetado por js/senha.js, não pelo template: os campos de senha
   nascem em três caminhos diferentes (login à mão, _campos.html e formulários
   que chegam por fetch no modal). Sem JS, o campo segue igual ao de antes. */
.campo__senha { position: relative; display: block; }
.campo__senha input { padding-right: 42px; }
.campo__olho {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; padding: 6px;
  color: var(--ink-faint); line-height: 0; border-radius: 6px;
}
.campo__olho:hover { color: var(--ink-muted); }
.campo__olho[aria-pressed="true"] { color: var(--brand); }
.campo__olho:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.campo input:focus, .campo select:focus, .campo textarea:focus {
  outline: none; border-color: var(--brand); background: var(--surface);
}
.campo input[type="checkbox"] { height: auto; width: auto; }
.campo__erro { font-size: 12px; color: var(--neg); }

.botao {
  height: 42px; border-radius: 8px; border: 1px solid var(--brand);
  background: var(--brand); color: #fff; font-size: 14px; font-weight: 600;
  padding: 0 18px; cursor: pointer; display: inline-flex; align-items: center;
  justify-content: center; gap: 8px;
}
.botao:hover { text-decoration: none; color: #fff; }
.botao--fantasma { background: var(--surface); color: var(--ink); border-color: var(--border); }
.botao--fantasma:hover { color: var(--ink); border-color: var(--ink-faint); }
.botao--pequeno { height: 34px; font-size: 13px; padding: 0 12px; }
.botao[disabled] { opacity: .45; cursor: not-allowed; }
.acoes { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* -------------------------------------------------------------------- grades */
.grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 22px; align-items: start; }
.grid-2-larga { display: grid; grid-template-columns: 1.3fr 1fr; gap: 22px; align-items: start; }
.grid-2-igual { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }

/* -------------------------------------------------------------------- abas */
.abas { display: flex; gap: 18px; border-bottom: 1px solid var(--border); }
.abas a {
  padding: 10px 2px; font-size: 14px; font-weight: 500; color: var(--ink-muted);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.abas a:hover { text-decoration: none; color: var(--ink); }
.abas a.ativa { color: var(--ink); font-weight: 600; border-bottom-color: var(--brand); }

/* ---------------------------------------------------------------- pipeline */
.pipeline { display: flex; align-items: center; gap: 14px; }
.pipeline__etapa { display: flex; align-items: center; gap: 5px; }
.pipeline__ponto {
  width: 8px; height: 8px; border-radius: 50%;
  border: 1px solid var(--border); background: transparent;
}
.pipeline__ponto--feito, .pipeline__ponto--atual { border-color: transparent; background: var(--warn); }
.pipeline__etapa--pago .pipeline__ponto--atual { background: var(--pos); }
.pipeline__rotulo { font-family: var(--mono); font-size: 9px; letter-spacing: .06em; color: var(--ink-muted); }
.pipeline__etapa--ativa .pipeline__rotulo { color: var(--ink); font-weight: 600; }

/* ----------------------------------------------------------------- série */
.serie { display: flex; align-items: flex-end; gap: 6px; height: 110px; }
.serie__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.serie__marca { width: 4px; height: 4px; border-radius: 50%; background: var(--warn); }
.serie__barra { width: 100%; background: var(--brand-tint); border-radius: 3px 3px 0 0; min-height: 2px; }
.serie__barra--atual { background: var(--brand); }
.serie__rotulo { font-family: var(--mono); font-size: 9px; color: var(--ink-faint); }
.serie__legenda { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: var(--ink-muted); }

/* --------------------------------------------------------------- projeção */
.projecao { display: flex; align-items: flex-end; gap: 8px; height: 150px; }
.projecao__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.projecao__valor { font-family: var(--mono); font-size: 11px; font-weight: 600; }
.projecao__barra { width: 100%; border-radius: 3px 3px 0 0; min-height: 3px; }
.projecao__barra--pos { background: #BFD9CB; }
.projecao__barra--neg { background: #E2C0B8; }
.projecao__rotulo { font-family: var(--mono); font-size: 9px; color: var(--ink-faint); }

/* ---------------------------------------------------------------- escala */
.escala { width: 100%; border-collapse: collapse; table-layout: fixed; }
.escala th {
  background: var(--surface-alt); border-bottom: 1px solid var(--border);
  padding: 8px 10px; font-family: var(--mono); font-size: 10px; font-weight: 400;
  letter-spacing: .08em; text-transform: uppercase; color: var(--ink-muted); text-align: center;
}
.escala th.escala__quem { text-align: left; width: 180px; }
.escala { min-width: 900px; }
.escala td { border-bottom: 1px solid var(--border-soft); padding: 6px 5px; vertical-align: top; }
.escala td.escala__quem { padding-left: 14px; }
.escala__nome { font-size: 13px; font-weight: 600; }
.escala__meta { font-size: 11px; color: var(--ink-muted); }
/* Célula da grade: cor identifica o PONTO, borda identifica a ORIGEM do dado.
   Duas informações em canais separados — quem não distingue cor ainda lê a
   origem pela borda. */
.celula {
  height: 30px; border-radius: 5px; display: flex; align-items: center;
  justify-content: flex-start; gap: 6px; padding: 0 7px;
  font-family: var(--mono); font-size: 11px; font-weight: 500;
  letter-spacing: .02em; margin-bottom: 4px; overflow: hidden;
  color: var(--ink); background: var(--surface);
}
.celula__cor { width: 4px; height: 16px; border-radius: 2px; flex: none; }
.celula__rotulo { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.celula--api { border: 1px solid var(--ink-faint); }
.celula--manual, .celula--estimada { border: 1px dashed var(--warn); }
.celula--vazia {
  background: var(--hachura); border: 1px solid var(--border-soft);
  color: var(--ink-faint); justify-content: center;
}
.celula[data-editavel] { cursor: pointer; }
.celula[data-editavel]:hover { border-color: var(--brand); background: var(--brand-bg); }

/* O select de edição não herda a célula: fundo sólido e texto escuro, senão
   fica ilegível (era o "branco quase invisível"). */
select.celula-edicao {
  height: 30px; width: 100%; margin-bottom: 4px; padding: 0 6px;
  border: 1px solid var(--brand); border-radius: 5px;
  background: var(--surface); color: var(--ink);
  font-family: var(--mono); font-size: 11px; cursor: pointer;
}
select.celula-edicao:focus { outline: 2px solid var(--brand-tint); outline-offset: 1px; }
.escala__legenda { display: flex; gap: 18px; align-items: center; font-size: 11px; color: var(--ink-muted); }
.escala__amostra {
  width: 14px; height: 10px; border-radius: 3px; display: inline-block;
  vertical-align: -1px; margin-right: 5px; border: 1px solid var(--border);
}
.escala__legenda { flex-wrap: wrap; row-gap: 6px; }

/* --------------------------------------------------------------- checklist */
.checklist { display: flex; flex-direction: column; }
.check {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border-soft);
}
.check:last-child { border-bottom: none; }
.check__marca {
  width: 18px; height: 18px; border-radius: 5px; flex: none;
  border: 1px solid var(--border); display: flex; align-items: center;
  justify-content: center; font-size: 11px; color: #fff;
}
.check__marca--ok { background: var(--pos); border-color: var(--pos); }
.check__titulo { font-size: 14px; font-weight: 600; }
.check__desc { font-size: 12px; color: var(--ink-muted); margin-top: 1px; }

.regua { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.regua__mes {
  font-family: var(--mono); font-size: 10px; padding: 4px 7px; border-radius: 4px;
  background: var(--surface-alt); border: 1px solid var(--border); color: var(--ink-faint);
}
.regua__mes--fechado { background: var(--pos); border-color: var(--pos); color: #fff; }

/* ------------------------------------------------------------------ vazio */
.vazio {
  background: var(--hachura); border: 1px solid var(--border);
  border-radius: 10px; padding: 26px; text-align: center;
}
.vazio__legenda { font-family: var(--mono); font-size: 11px; color: var(--ink-muted); }

.mensagens { display: flex; flex-direction: column; gap: 8px; }
.mensagem {
  padding: 10px 14px; border-radius: 8px; font-size: 13px;
  background: var(--surface); border: 1px solid var(--border);
}
.mensagem--success { background: #EAF3EE; border-color: #CFE4D8; color: var(--pos); }
.mensagem--error { background: #F7EAE7; border-color: #EBCFC9; color: var(--neg); }
.mensagem--warning { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn-text); }

/* ------------------------------------------------------------------- login */
.login {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 32px 16px; background: var(--bg-page);
}
.login__cartao {
  display: flex; flex-direction: column; gap: 22px;
  width: min(380px, 100%); padding: 36px 34px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 1px 3px rgba(28, 27, 32, .06);
}
/* O convite mostra permissões e pontos antes do formulário: precisa de mais
   largura que o login, que só tem dois campos. */
.login__cartao--convite { width: min(440px, 100%); }
.login__marca { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.login__lockup { width: 168px; height: auto; display: block; }
.login__sub {
  font-family: var(--mono); font-size: 10px; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--ink-faint);
}
.login__rodape { text-align: center; font-size: 13px; }
.login__titulo { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.2; }

/* ------------------------------------------------------------------ mobile */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; bottom: 0; top: auto; left: 0; right: 0;
    height: auto; flex-direction: row; align-items: center; gap: 0;
    padding: 8px 10px; border-right: none; border-top: 1px solid var(--border);
    z-index: 20;
  }
  .marca, .sidebar__rodape { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-around; gap: 0; }
  .nav__item { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 4px; }
  .nav__n { display: none; }
  .main { padding: 18px 16px 90px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-2-larga, .grid-2-igual { grid-template-columns: 1fr; }
  .form__linha { grid-template-columns: 1fr; }
  .cabecalho { flex-direction: column; align-items: stretch; gap: 12px; }
  .tabela-rolagem { overflow-x: auto; }
  .escala { min-width: 720px; }
}

/* ------------------------------------------------------------------- modal */
dialog.modal {
  border: 1px solid var(--border); border-radius: 12px; padding: 0;
  background: var(--surface); color: var(--ink);
  width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 64px);
}
dialog.modal::backdrop { background: rgba(28, 27, 32, .38); }
.modal__topo {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 18px; border-bottom: 1px solid var(--border);
}
.modal__titulo { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.modal__fechar {
  border: none; background: none; cursor: pointer; font-size: 18px;
  color: var(--ink-muted); line-height: 1; padding: 4px 6px;
}
.modal__corpo { padding: 18px; overflow-y: auto; max-height: calc(100vh - 150px); }
.modal__carregando { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }

/* ------------------------------------------------------------- permissões */
.permissoes {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; background: var(--surface-alt);
}
.permissoes + .permissoes { margin-top: -4px; }
.permissao {
  display: flex; align-items: center; gap: 9px; padding: 6px 0;
  font-size: 13px; cursor: pointer;
}
.permissao input { width: 16px; height: 16px; accent-color: var(--brand); flex: none; }
.permissao input:disabled + span { color: var(--ink-faint); }

/* editar ao clicar no nome, na lista */
.editavel { color: var(--ink); font-weight: 600; }
.editavel:hover { color: var(--brand); text-decoration: underline; }

/* bloco de campos agrupados (formulário longo, como o de colaborador) */
.bloco-campos {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; background: var(--surface-alt);
  display: flex; flex-direction: column; gap: 10px;
}
.bloco-campos .campo input, .bloco-campos .campo select { background: var(--surface); }

.custo-resumo {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 14px; background: var(--surface-alt);
}
@media (max-width: 900px) { .custo-resumo { grid-template-columns: 1fr; } }

/* valor acima da barra, na série de dia da semana */
.serie__valor {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  color: var(--ink-muted); white-space: nowrap;
}

/* ------------------------------------------------------------------- ajuda */
.ajuda { position: relative; }
.ajuda summary {
  list-style: none; cursor: pointer; width: 22px; height: 22px;
  border: 1px solid var(--border); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--mono); font-size: 11px; color: var(--ink-muted);
  background: var(--surface);
}
.ajuda summary::-webkit-details-marker { display: none; }
.ajuda summary:hover { color: var(--ink); border-color: var(--ink-faint); }
.ajuda__balao {
  position: absolute; right: 0; top: 28px; z-index: 10; width: 320px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px; box-shadow: 0 4px 16px rgba(0,0,0,.08);
  font-size: 13px; line-height: 1.5;
}
.ajuda__balao p { margin: 0 0 8px; }
.ajuda__balao p:last-child { margin-bottom: 0; }
@media (max-width: 900px) { .ajuda__balao { right: auto; left: 0; width: min(320px, 90vw); } }

a.carga { display: block; color: var(--ink); }
a.carga:hover { text-decoration: none; border-color: var(--ink-faint); }
