/* =========================================================================
   Continente · Mockups V2 · base.css
   Tokens de brand/DESIGN.md, reset, tipografia e componentes.
   Pode acrescentar componentes comuns; não renomeie nem remova o que existe.
   ========================================================================= */

/* ---------- Fontes (locais; nada de CDN) ---------- */
@font-face {
  font-family: "Outfit";
  src: url("../../marca/fontes/outfit-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
/* Inter vem do pacote já instalado no app; se faltar, cai no system-ui. */
@font-face {
  font-family: "Inter";
  src: url("../../marca/fontes/inter-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  /* Marca */
  --navy: #0A2957;
  --deep: #031A42;
  --fachada: #24507F;
  --tide: #3D6F9E;
  --sky: #C9DDF0;
  --mist: #EDF3F9;
  --green: #1B8557;       /* SÓ no botão de WhatsApp */
  --green-dark: #126E45;
  --green-press: #0F5B39;
  --degrade: linear-gradient(165deg, #24507F 0%, #0A2957 45%, #031A42 100%);

  /* Superfícies */
  --bg: #FFFFFF;
  --surface: #F4F7FA;
  --raised: #FFFFFF;
  --inverse: #0A2957;

  /* Texto */
  --text: #0A1A2F;
  --text-2: #4B5A69;
  --text-3: #5B6B7A;
  --placeholder: #8A99A8;
  --text-inv: #FFFFFF;
  --text-inv-2: #C9DDF0;

  /* Bordas */
  --border: #E3EAF2;
  --border-2: #D3DEEA;
  --border-strong: #3D6F9E;

  /* Status (sem verde) */
  --info: #0A2957;   --info-bg: #EDF3F9;   --info-bd: #C9DDF0;
  --warn: #8A5A12;   --warn-bg: #FBF3E2;   --warn-bd: #E8D5AC;
  --err: #B3261E;    --err-bg: #FDECEA;    --err-bd: #F2C6C2;   --err-dark: #8E1C16;

  /* Tipografia */
  --font-display: "Outfit", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;

  /* Espaço (base 4) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px;
  --s8: 32px; --s10: 40px; --s12: 48px; --s16: 64px;

  /* Raios */
  --r-sm: 2px; --r-md: 4px; --r-lg: 6px; --r-xl: 8px; --r-full: 9999px;

  /* Sombras (só sobreposição) */
  --sombra-overlay: 0 40px 80px -40px rgba(3, 26, 66, .50);
  --sombra-pop: 0 18px 40px -24px rgba(3, 26, 66, .40);

  /* Foco */
  --foco-ring: 0 0 0 3px rgba(61, 111, 158, .18);

  --transicao: 160ms ease;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure, dl, dd { margin: 0; }
ul[role="list"], ol[role="list"], .sem-lista { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--navy); text-underline-offset: 3px; }
[hidden] { display: none !important; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--tide);
  outline-offset: 3px;
  box-shadow: var(--foco-ring);
}

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Tipografia ---------- */
.titulo-pagina {
  font-family: var(--font-display); font-weight: 600; font-size: 26px;
  line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance;
}
@media (min-width: 768px) { .titulo-pagina { font-size: 28px; } }
.titulo-secao {
  font-family: var(--font-display); font-weight: 600; font-size: 17px;
  line-height: 1.3; letter-spacing: -0.005em;
}
.overline {
  font-family: var(--font-display); font-weight: 500; font-size: 11px;
  line-height: 1.2; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3);
}
.metrica { font-family: var(--font-display); font-weight: 600; font-size: 32px; font-variant-numeric: tabular-nums; }
.texto-body { font-size: 15px; }
.texto-data { font-size: 14px; }
.texto-apoio { font-size: 13px; color: var(--text-2); }
.texto-meta { font-size: 12px; color: var(--text-3); }
.num { font-variant-numeric: tabular-nums; }
p { text-wrap: pretty; }

/* ---------- Layout utilitário ---------- */
.linha { display: flex; align-items: center; gap: var(--s3); }
.linha--entre { justify-content: space-between; }
.linha--quebra { flex-wrap: wrap; }
.pilha { display: flex; flex-direction: column; gap: var(--s4); }
.pilha--p { gap: var(--s2); }
.pilha--g { gap: var(--s8); }
.empurra { margin-left: auto; }

/* ---------- Ícones ---------- */
.ico { width: 20px; height: 20px; flex: none; }
.ico--p { width: 16px; height: 16px; }
.ico--g { width: 24px; height: 24px; }

/* =========================================================================
   Botões
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s2);
  min-height: 44px; padding: 10px 18px;
  border: 1px solid transparent; border-radius: var(--r-md);
  font-family: var(--font-display); font-size: 14px; font-weight: 500; letter-spacing: .01em;
  line-height: 1; white-space: nowrap; text-decoration: none;
  background: transparent; color: var(--navy);
  transition: background var(--transicao), border-color var(--transicao), color var(--transicao);
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }

.btn--primario { background: var(--navy); color: #fff; }
.btn--primario:hover:not(:disabled) { background: var(--deep); }

.btn--secundario { background: #fff; color: var(--navy); border-color: var(--border-2); }
.btn--secundario:hover:not(:disabled) { border-color: var(--tide); color: var(--tide); background: var(--surface); }
.btn--secundario:active:not(:disabled) { background: var(--border); }

.btn--fantasma { color: var(--tide); padding-inline: var(--s2); }
.btn--fantasma:hover:not(:disabled) { color: var(--navy); background: var(--surface); }

/* O único verde do sistema. No máximo um por tela. */
.btn--whatsapp { background: var(--green); color: #fff; }
.btn--whatsapp:hover:not([aria-disabled="true"]) { background: var(--green-dark); }
.btn--whatsapp:active:not([aria-disabled="true"]) { background: var(--green-press); }

.btn--perigo { background: var(--err); color: #fff; }
.btn--perigo:hover:not(:disabled) { background: var(--err-dark); }

.btn--pequeno { min-height: 36px; padding: 8px 12px; font-size: 13px; }
.btn--bloco { width: 100%; }
.btn--icone {
  min-height: 40px; width: 40px; padding: 0; color: var(--text-2); border-radius: var(--r-md);
  flex-shrink: 0; /* revisão 7: o "x" do cabeçalho não encolhe quando o título é longo */
}
.btn--icone:hover { background: var(--surface); color: var(--navy); }

/* =========================================================================
   Selos (status) e chips (filtro)
   ========================================================================= */
.selo {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface); color: var(--text-2);
  font-size: 11px; font-weight: 500; line-height: 1; white-space: nowrap;
}
.selo--info  { background: var(--info-bg); color: var(--info); border-color: var(--info-bd); }
.selo--aviso { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-bd); }
.selo--erro  { background: var(--err-bg);  color: var(--err);  border-color: var(--err-bd); }
.selo--escuro { background: var(--navy); color: #fff; border-color: var(--navy); }
.selo__ponto { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 32px; padding: 6px 12px;
  border: 1px solid var(--border-2); border-radius: var(--r-full);
  background: #fff; color: var(--text-2);
  font-size: 13px; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: border-color var(--transicao), background var(--transicao), color var(--transicao);
}
.chip:hover { border-color: var(--tide); }
.chip[aria-pressed="true"], .chip[aria-checked="true"], .chip.is-ativo {
  background: var(--navy); border-color: var(--navy); color: #fff;
}
.chip__conta {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: var(--r-full); background: var(--err-bg); color: var(--err);
  font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums;
}
.chip[aria-pressed="true"] .chip__conta { background: #fff; color: var(--err); }

/* Controle segmentado (troca de visão) */
.segmentado {
  display: inline-flex; padding: 3px; gap: 2px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
}
.segmentado button {
  min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-lg);
  background: transparent; color: var(--text-2);
  font-family: var(--font-display); font-size: 13px; font-weight: 500;
}
.segmentado button[aria-pressed="true"] {
  background: #fff; color: var(--navy); box-shadow: 0 0 0 1px var(--border);
}

/* =========================================================================
   Cartões
   ========================================================================= */
.cartao {
  background: var(--raised); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--s6);
}
.cartao--compacto { padding: var(--s4); }
.cartao--tint { background: var(--info-bg); border-color: var(--info-bd); }
.cartao--clicavel { cursor: pointer; transition: background var(--transicao), border-color var(--transicao); }
.cartao--clicavel:hover { background: var(--surface); border-color: var(--sky); }
.cartao__cabeca { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }

/* =========================================================================
   Formulários
   ========================================================================= */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo__rotulo { font-size: 13px; font-weight: 600; color: var(--text); }
.campo__rotulo .opcional { font-weight: 400; color: var(--placeholder); }
.campo__ajuda { font-size: 12px; color: var(--text-3); }
.campo__erro { font-size: 12px; color: var(--err); }
.campos-2 { display: grid; gap: var(--s4); grid-template-columns: 1fr; }
@media (min-width: 480px) { .campos-2 { grid-template-columns: 1fr 1fr; } }

.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 14px;
  background: #fff; color: var(--text);
  border: 1px solid var(--border-2); border-radius: var(--r-md);
  font-family: var(--font-body); font-size: 15px;
  transition: border-color var(--transicao), box-shadow var(--transicao);
}
.input::placeholder, .textarea::placeholder { color: var(--placeholder); }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--tide); box-shadow: var(--foco-ring);
}
.input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px rgba(179, 38, 30, .14); }
.input:disabled, .select:disabled { background: var(--surface); color: var(--placeholder); }
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234B5A69' stroke-width='1.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; background-size: 18px;
}
.textarea { min-height: 96px; resize: vertical; }

/* Grupo de opções em chips (radio) */
.opcoes { display: flex; flex-wrap: wrap; gap: var(--s2); }
.opcoes input { position: absolute; opacity: 0; pointer-events: none; }
.opcoes label { cursor: pointer; }
.opcoes input:checked + .chip { background: var(--navy); border-color: var(--navy); color: #fff; }
.opcoes input:focus-visible + .chip { outline: 2px solid var(--tide); outline-offset: 3px; }

/* Interruptor */
.interruptor { display: inline-flex; align-items: center; gap: var(--s2); cursor: pointer; font-size: 14px; }
.interruptor input { position: absolute; opacity: 0; }
.interruptor__trilho {
  position: relative; width: 40px; height: 22px; border-radius: var(--r-full);
  background: var(--border); transition: background 180ms ease; flex: none;
}
.interruptor__trilho::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform 180ms ease;
  box-shadow: 0 1px 2px rgba(3, 26, 66, .2);
}
.interruptor input:checked + .interruptor__trilho { background: var(--navy); }
.interruptor input:checked + .interruptor__trilho::after { transform: translateX(18px); }
.interruptor input:focus-visible + .interruptor__trilho { outline: 2px solid var(--tide); outline-offset: 3px; }

/* =========================================================================
   Abas
   ========================================================================= */
.abas {
  display: flex; gap: var(--s6); border-bottom: 1px solid var(--border);
  overflow-x: auto; scrollbar-width: none;
}
.aba {
  position: relative; padding: 12px 0; border: 0; background: none;
  color: var(--text-2); font-family: var(--font-display); font-size: 14px; font-weight: 500;
  white-space: nowrap;
}
.aba:hover { color: var(--navy); }
.aba[aria-selected="true"] { color: var(--navy); }
.aba[aria-selected="true"]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--navy);
}

/* =========================================================================
   Avatar
   ========================================================================= */
.avatar {
  --tam: 32px;
  display: inline-grid; place-items: center; flex: none;
  width: var(--tam); height: var(--tam); border-radius: 50%; overflow: hidden;
  background: var(--mist); color: var(--navy);
  font-family: var(--font-display); font-weight: 600; font-size: calc(var(--tam) * .36);
  letter-spacing: .02em; line-height: 1;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--xp { --tam: 22px; font-size: 9px; }
.avatar--p { --tam: 28px; }
.avatar--g { --tam: 44px; }
.avatar--xg { --tam: 64px; }
/* Tons por iniciais (variação suave, sempre azul) */
.avatar[data-tom="1"] { background: #E3ECF6; color: #24507F; }
.avatar[data-tom="2"] { background: #DCE7F3; color: #0A2957; }
.avatar[data-tom="3"] { background: #EEF2F7; color: #3D6F9E; }
.avatar[data-tom="4"] { background: #D7E4F1; color: #031A42; }

/* =========================================================================
   Tabela e lista
   ========================================================================= */
.tabela-rolagem { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th {
  text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-family: var(--font-display); font-size: 11px; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); white-space: nowrap;
}
.tabela td { padding: 14px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tabela tbody tr:hover { background: var(--surface); }
.tabela tbody tr:last-child td { border-bottom: 0; }

.lista { list-style: none; padding: 0; margin: 0; }
.lista__item {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 56px; padding: 12px 0; border-bottom: 1px solid var(--border);
}
.lista__item:last-child { border-bottom: 0; }
.lista__corpo { flex: 1; min-width: 0; }
.lista__titulo { font-size: 15px; color: var(--text); }
.lista__apoio { font-size: 13px; color: var(--text-2); }
/* Linha com avatar + texto + ações (revisão 7, celular a partir de 360 px).
   O texto tem uma largura mínima (--linha-texto-min). Quando avatar + texto + o que vem depois (selo, rótulo, botões)
   não cabem, o que vem depois desce para uma linha própria: os botões (.linha-acoes__acoes) ocupam a largura toda,
   sem quebrar o texto; selos e rótulos ficam à direita. Quando cabe (desktop), nada muda.
   Uso: .linha-acoes > avatar + .linha-acoes__texto + (.linha-acoes__acoes | selo | rótulo). */
.linha-acoes { flex-wrap: wrap; row-gap: 10px; }
.linha-acoes > .linha-acoes__texto { flex: 999 1 var(--linha-texto-min, 150px); min-width: 0; }
.linha-acoes > .linha-acoes__texto + * { margin-left: auto; }
.linha-acoes > .linha-acoes__acoes { flex: 1 1 auto; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.linha-acoes > .linha-acoes__acoes > .btn { flex: 1 1 auto; white-space: nowrap; }
.lista--clicavel .lista__item { padding-inline: var(--s3); border-radius: var(--r-md); cursor: pointer; }
.lista--clicavel .lista__item:hover { background: var(--surface); }

/* =========================================================================
   Estado vazio
   ========================================================================= */
.vazio {
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s3);
  padding: var(--s12) var(--s6); color: var(--text-2);
}
.vazio__icone {
  display: grid; place-items: center; width: 48px; height: 48px;
  border-radius: var(--r-lg); background: var(--mist); color: var(--tide);
}
.vazio__titulo { font-family: var(--font-display); font-size: 17px; font-weight: 600; color: var(--text); }
.vazio p { max-width: 36ch; font-size: 14px; }

/* =========================================================================
   Modal
   ========================================================================= */
.modal-fundo {
  position: fixed; inset: 0; z-index: 60;
  display: grid; place-items: center; padding: var(--s4);
  background: rgba(3, 26, 66, .42);
  opacity: 0; transition: opacity 180ms ease;
}
.modal-fundo.is-aberto { opacity: 1; }
.modal {
  width: min(520px, 100%); max-height: calc(100dvh - 32px);
  display: flex; flex-direction: column;
  background: #fff; border-radius: var(--r-xl); box-shadow: var(--sombra-overlay);
  transform: translateY(8px); transition: transform 180ms ease;
}
.modal-fundo.is-aberto .modal { transform: none; }
.modal__cabeca {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
  padding: var(--s6) var(--s6) var(--s4);
}
.modal__corpo { padding: 0 var(--s6) var(--s6); overflow-y: auto; display: flex; flex-direction: column; gap: var(--s5); }
.modal__rodape {
  display: flex; justify-content: flex-end; gap: var(--s2); flex-wrap: wrap;
  padding: var(--s4) var(--s6); border-top: 1px solid var(--border);
}
@media (max-width: 479px) {
  .modal-fundo { align-items: end; padding: 0; }
  .modal { width: 100%; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92dvh; }
  .modal__rodape .btn { flex: 1; }
}

/* =========================================================================
   Painel lateral (drawer)
   ========================================================================= */
.painel-fundo {
  position: fixed; inset: 0; z-index: 55; background: rgba(3, 26, 66, .28);
  opacity: 0; transition: opacity 200ms ease;
}
.painel-fundo.is-aberto { opacity: 1; }
.painel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 56;
  width: min(420px, 100%); display: flex; flex-direction: column;
  background: #fff; border-left: 1px solid var(--border); box-shadow: var(--sombra-overlay);
  transform: translateX(100%); transition: transform 220ms ease;
}
.painel.is-aberto { transform: none; }
.painel__cabeca {
  display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3);
  padding: var(--s6); border-bottom: 1px solid var(--border);
}
.painel__corpo { flex: 1; overflow-y: auto; padding: var(--s6); display: flex; flex-direction: column; gap: var(--s6); }
.painel__rodape { padding: var(--s4) var(--s6); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: var(--s2); }

/* =========================================================================
   Toast
   ========================================================================= */
.toasts {
  position: fixed; z-index: 80; left: 50%; bottom: var(--s6); transform: translateX(-50%);
  display: flex; flex-direction: column; gap: var(--s2); align-items: center;
  width: max-content; max-width: calc(100vw - 32px); pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s4);
  padding: 12px 12px 12px 16px; border-radius: var(--r-lg);
  background: var(--deep); color: #fff; font-size: 14px; box-shadow: var(--sombra-pop);
  pointer-events: auto; animation: toast-entra 200ms ease;
}
.toast__acao {
  border: 0; background: none; padding: 6px 8px; border-radius: var(--r-md);
  color: var(--sky); font-family: var(--font-display); font-weight: 600; font-size: 13px;
}
.toast__acao:hover { background: rgba(201, 221, 240, .12); color: #fff; }
.toast.is-saindo { opacity: 0; transition: opacity 200ms ease; }
@keyframes toast-entra { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Popover simples (menus) */
.popover {
  position: absolute; z-index: 40; min-width: 220px;
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sombra-pop); padding: var(--s2);
}
.menu-item {
  display: flex; align-items: center; gap: var(--s3); width: 100%;
  min-height: 40px; padding: 8px 10px; border: 0; border-radius: var(--r-md);
  background: none; text-align: left; font-size: 14px; color: var(--text); text-decoration: none;
}
.menu-item:hover { background: var(--surface); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* =========================================================================
   Componentes comuns (Lote D): Cliente, Terceirizado e Acesso
   Só acréscimos. As telas da Equipe definem as próprias versões quando
   precisam (escala.css, equipe-comum.css) e continuam valendo.
   ========================================================================= */
:root {
  /* Faixas da escala (as mesmas da Equipe) */
  --faixa-fixo: #A9C3DE;      /* titular: o normal, quieto */
  --faixa-cobrindo: #3D6F9E;  /* substituta / folguista cobrindo */
  --faixa-avulsa: #C79A4B;    /* limpeza extra / avulsa */
  --hoje-bg: #F7FAFD;
  --vazio: #C3CEDA;
  --warn-forte: #D19A3A;      /* borda de mudança, força média da senha */
}

/* ---------- Faixa do mockup (troca de estado só para avaliar) ---------- */
.mock-barra {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 4px 12px;
  padding: 6px 16px; background: var(--mist); border-bottom: 1px solid var(--info-bd);
  font-size: 12px; color: var(--text-2); text-align: center;
}
.mock-barra a, .mock-barra button {
  border: 0; background: none; padding: 2px 4px; color: var(--tide); font-size: 12px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.mock-barra [aria-current="true"] { color: var(--navy); font-weight: 600; text-decoration: none; }

/* ---------- Botões sobre o degradê ---------- */
.btn--claro { background: #fff; color: var(--navy); }
.btn--claro:hover:not(:disabled) { background: var(--mist); }
.btn--contorno-claro { color: #fff; border-color: rgba(201, 221, 240, .4); }
.btn--contorno-claro:hover:not(:disabled) { background: rgba(201, 221, 240, .1); }

/* ---------- Link de texto ---------- */
.link {
  border: 0; background: none; padding: 0; cursor: pointer;
  color: var(--tide); font-size: 14px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px;
}
.link:hover { color: var(--navy); }

/* ---------- Alerta em linha ---------- */
.alerta { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-lg); font-size: 14px; line-height: 1.45; }
.alerta .ico { width: 18px; height: 18px; margin-top: 2px; flex: none; }
.alerta--erro { background: var(--err-bg); border: 1px solid var(--err-bd); color: var(--err-dark); }
.alerta--info { background: var(--info-bg); border: 1px solid var(--info-bd); color: var(--navy); }
.alerta--aviso { background: var(--warn-bg); border: 1px solid var(--warn-bd); color: var(--warn); }

/* ---------- Banner "Conte com a Continente" (rodapé do Início do cliente) ---------- */
.banner {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 20px;
  margin-top: 48px; padding: 28px 24px;
  border-radius: var(--r-xl); background: var(--degrade); color: #fff;
}
@media (min-width: 768px) { .banner { flex-direction: row; align-items: center; justify-content: space-between; gap: 32px; padding: 36px 44px; } }
.banner__marca { position: absolute; z-index: -1; right: -40px; bottom: -60px; width: 260px; height: auto; opacity: .09; pointer-events: none; }
.banner__overline { color: var(--sky); }
.banner__titulo {
  margin-top: 8px; font-family: var(--font-display); font-weight: 600; font-size: 22px; line-height: 1.2;
  letter-spacing: -0.01em; text-wrap: balance;
}
@media (min-width: 768px) { .banner__titulo { font-size: 26px; } }
.banner__texto { margin-top: 6px; max-width: 52ch; color: var(--text-inv-2); font-size: 14px; }
.banner .btn { flex: none; }
@media (max-width: 479px) { .banner .btn { width: 100%; } }

/* ---------- Bolinhas dos dias (D S T Q Q S S) ---------- */
.bolinhas { display: inline-flex; gap: 4px; }
.bolinha {
  display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  border: 1px solid var(--border-2); color: var(--text-3); background: #fff;
  font-family: var(--font-display); font-size: 11px; font-weight: 500;
}
.bolinha.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
.bolinha.is-livre { border-style: dashed; color: var(--text-2); }

/* ---------- Linha do tempo (histórico) ---------- */
.linha-tempo { list-style: none; margin: 0; padding: 0; }
.linha-tempo li { position: relative; padding: 0 0 20px 24px; }
.linha-tempo li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid var(--tide); }
.linha-tempo li::after { content: ""; position: absolute; left: 8px; top: 20px; bottom: 2px; width: 1px; background: var(--border-2); }
.linha-tempo li:last-child { padding-bottom: 0; }
.linha-tempo li:last-child::after { display: none; }
.linha-tempo li.is-atual::before { background: var(--tide); }
.linha-tempo__quando { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.linha-tempo__texto { font-size: 14px; color: var(--text); }
.linha-tempo__valor { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Código do dia (portaria) ---------- */
.codigo-dia { text-align: right; }
.codigo-dia__rot { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 2px; }
.codigo-dia__num {
  font-family: var(--font-display); font-size: 28px; font-weight: 600; line-height: 1; letter-spacing: .16em;
  margin-right: -.16em; color: var(--navy); font-variant-numeric: tabular-nums;
}

/* ---------- Data em bloco (sigla + dia) ---------- */
.data-bloco {
  flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 44px; height: 46px; border-radius: var(--r-md); background: var(--mist);
  font-family: var(--font-display); line-height: 1.1; color: var(--navy);
}
.data-bloco__sigla { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--tide); }
.data-bloco__num { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Hora com ícone ---------- */
.hora-linha { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.hora-linha .ico { width: 16px; height: 16px; color: var(--tide); }

/* ---------- Senha com ver/ocultar e força ---------- */
.senha { position: relative; }
.senha .input { padding-right: 48px; }
.senha__ver {
  position: absolute; top: 2px; right: 2px; width: 40px; height: 40px; display: grid; place-items: center;
  border: 0; border-radius: var(--r-md); background: none; color: var(--text-2);
}
.senha__ver:hover { color: var(--navy); background: var(--surface); }
.forca { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 2px; }
.forca span { height: 4px; border-radius: 2px; background: var(--border); transition: background var(--transicao); }
.forca[data-nivel="1"] span:nth-child(-n+1) { background: var(--err); }
.forca[data-nivel="2"] span:nth-child(-n+2) { background: var(--warn-forte); }
.forca[data-nivel="3"] span { background: var(--navy); }

/* ---------- Estrelas (nota de 1 a 5) ---------- */
/* Revisão 2 (F3): só a estrela, sem caixa nem borda. Apagada em cinza-azulado, acesa em azul da marca. */
.estrelas { display: flex; gap: 2px; }
.estrelas label { flex: none; max-width: none; }
.estrelas input { position: absolute; opacity: 0; pointer-events: none; }
.estrela {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: var(--r-full);
  border: 0; color: var(--placeholder); background: none; cursor: pointer;
  transition: color var(--transicao), transform var(--transicao);
}
.estrela:hover { color: var(--tide); }
.estrela .ico { width: 34px; height: 34px; stroke-width: 1.4; }
.estrela.is-on { color: var(--navy); border-color: transparent; background: none; }
.estrela.is-on .ico path { fill: currentColor; }
/* Prévia ao passar o mouse: acende até a estrela apontada */
@media (hover: hover) {
  .estrelas label:hover .estrela, .estrelas label:has(~ label:hover) .estrela { color: var(--tide); }
  .estrelas label:hover .estrela .ico path, .estrelas label:has(~ label:hover) .estrela .ico path { fill: currentColor; fill-opacity: .25; }
  .estrelas label:hover .estrela.is-on .ico path, .estrelas label:has(~ label:hover) .estrela.is-on .ico path { fill-opacity: 1; }
}
.estrelas input:focus-visible + .estrela { outline: 2px solid var(--tide); outline-offset: 0; box-shadow: none; }
.estrelas-rotulo { font-size: 13px; color: var(--text-2); min-height: 20px; }

/* ---------- Recolhível (details/summary) ---------- */
.recolhivel { background: #fff; border: 1px solid var(--border); border-radius: var(--r-lg); }
.recolhivel > summary {
  display: flex; align-items: center; gap: 12px; padding: 16px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-size: 16px; font-weight: 600;
}
.recolhivel > summary::-webkit-details-marker { display: none; }
.recolhivel__seta { display: inline-flex; margin-left: auto; color: var(--text-2); transition: transform var(--transicao); }
.recolhivel[open] > summary .recolhivel__seta { transform: rotate(180deg); }
.recolhivel__corpo { padding: 0 16px 16px; }

/* ---------- Calendário para escolher a semana (UI.calendarioSemana) ---------- */
.calsem { top: calc(100% + 6px); left: 0; width: 312px; padding: 16px; }
.calsem__cabeca { display: flex; align-items: center; gap: 2px; margin-bottom: 10px; }
.calsem__titulo { flex: 1; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.calsem__cabeca .btn--icone { width: 32px; min-height: 32px; }
.calsem__cabeca [data-calsem="-12"] .ico, .calsem__cabeca [data-calsem="12"] .ico { width: 14px; height: 14px; margin: 0 -4px; }
.calsem__grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); row-gap: 2px; }
.calsem__sigla { text-align: center; font-size: 11px; color: var(--text-3); padding: 4px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.calsem__dia { height: 38px; border: 0; background: none; font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.calsem__dia:hover { background: var(--surface); }
.calsem__dia.is-fora { color: #A3B1BF; }
.calsem__dia.is-semana { background: var(--info-bg); }
.calsem__dia.is-semana.is-dom { border-radius: var(--r-md) 0 0 var(--r-md); }
.calsem__dia.is-semana.is-sab { border-radius: 0 var(--r-md) var(--r-md) 0; }
.calsem__dia.is-hoje span {
  display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--navy); color: #fff; font-weight: 600;
}
.calsem__atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.calsem__atalhos .chip { min-height: 30px; padding: 4px 10px; font-size: 12px; }
@media (max-width: 639px) {
  .calsem {
    position: fixed; top: auto; left: 0; right: 0; bottom: 0; width: 100%; z-index: 70;
    border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
    box-shadow: var(--sombra-overlay); animation: calsem-sobe 200ms ease;
  }
  .calsem__dia { height: 42px; }
  body.calsem-aberto::after { content: ""; position: fixed; inset: 0; z-index: 65; background: rgba(3, 26, 66, .42); }
}
@keyframes calsem-sobe { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

/* =========================================================================
   Lote F3 · Estados de erro e de conexão (UI.enviar, UI.simularErro…)
   ========================================================================= */
:root { --faixa-conexao: 32px; }

/* Sem conexão: faixa fina no topo; o conteúdo desce para não ficar por baixo */
.faixa-conexao {
  position: fixed; top: 0; left: 0; right: 0; z-index: 95; height: var(--faixa-conexao);
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 16px;
  background: var(--deep); color: #fff; font-size: 13px; font-weight: 500; text-align: center;
  white-space: nowrap; overflow: hidden;
}
.faixa-conexao .ico { color: var(--sky); }
.faixa-conexao__giro {
  width: 12px; height: 12px; border-radius: 50%; flex: none;
  border: 2px solid rgba(201, 221, 240, .35); border-top-color: var(--sky);
  animation: giro 900ms linear infinite;
}
body.is-offline { padding-top: var(--faixa-conexao); }
body.is-offline :is(.topo, .cli-topo, .terc-topo) { top: var(--faixa-conexao); }
@keyframes giro { to { transform: rotate(360deg); } }

/* Enviando…: giro dentro do botão (UI.enviar) */
.envio-giro {
  width: 14px; height: 14px; border-radius: 50%; flex: none;
  border: 2px solid currentColor; border-right-color: transparent; opacity: .8;
  animation: giro 800ms linear infinite;
}
.btn[aria-busy="true"] { cursor: progress; opacity: .85; }

/* Falha no envio: mensagem curta junto do botão, com "Tentar de novo" */
.envio-falha {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; flex: 1 1 100%; width: 100%;
  margin-top: var(--s2); padding: 8px 12px; border-radius: var(--r-md);
  background: var(--err-bg); border: 1px solid var(--err-bd); color: var(--err-dark);
  font-size: 13px; line-height: 1.4; text-align: left;
}
.envio-falha > span { flex: 1 1 200px; min-width: 0; }
.envio-falha .ico { color: var(--err); }
.envio-falha__tentar { font-size: 13px; color: var(--err-dark); font-weight: 600; }
.envio-falha__tentar:hover { color: var(--err); }
.modal__rodape > .envio-falha, .painel__rodape > .envio-falha { margin-top: 0; }

/* Toast com detalhe (ex.: código para o suporte no erro 5xx) */
.toast__textos { display: flex; flex-direction: column; gap: 2px; }
.toast__detalhe { font-size: 12px; color: var(--sky); }

/* Modal curto de aviso (sessão expirada, descartar alterações) */
.modal--aviso { width: min(400px, 100%); }
.modal-aviso { padding-top: var(--s6); align-items: center; text-align: center; gap: var(--s3); }
.modal-aviso--esq { align-items: stretch; text-align: left; }
.modal-aviso__icone {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--mist); color: var(--tide);
}
.modal-aviso .btn--bloco { margin-top: var(--s2); }

/* Grupo "Simular erro:" na faixa do mockup (UI.botoesSimulacao) */
.mock-sim { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 6px; }
.mock-sim__rot { color: var(--text-2); }
.mock-barra .mock-sim button[aria-pressed="true"] { color: var(--navy); font-weight: 600; text-decoration: none; }

/* Revisão 4 (Lote H2): modal ou painel saindo não recebe clique (o 2º clique de um clique duplo não confirma de novo) */
.modal-fundo.is-fechando, .painel.is-fechando { pointer-events: none; }
/* Revisão 4 (Lote H2): "Como liberar" as notificações bloqueadas */
.notif-passos { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 0; padding-left: 18px; font-size: 14px; color: var(--text-2); text-align: left; }

/* =========================================================================
   Revisão 4 (Lote H4) · senha nova, contador, calendário
   ========================================================================= */
/* Senha nova (UI.senhaNova): requisitos com marcadores que acendem quando cumpridos */
.senha-req { list-style: none; margin: 2px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); }
.senha-req__item { display: flex; align-items: flex-start; gap: 8px; line-height: 1.4; }
.senha-req__marca {
  flex: none; display: grid; place-items: center; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%;
  border: 1.5px solid var(--vazio); background: #fff; color: transparent; transition: background var(--transicao), border-color var(--transicao);
}
.senha-req__marca .ico { width: 11px; height: 11px; stroke-width: 2.4; }
.senha-req__item.is-ok { color: var(--text); }
.senha-req__item.is-ok .senha-req__marca { background: var(--navy); border-color: var(--navy); color: #fff; }
.senha-req__item--extra { color: var(--text-3); }
.senha-req__forca { font-size: 12px; font-weight: 600; color: var(--text-2); min-height: 0; }
.senha-req__forca:empty { display: none; }
.senha-req__forca[data-nivel="1"] { color: var(--err); }
.senha-req__forca[data-nivel="2"] { color: var(--warn); }
.senha-req__forca[data-nivel="3"] { color: var(--navy); }

/* Contador de caracteres (UI.contador / [data-contar]): aparece a partir de 80% do limite */
.contador { order: 9; align-self: flex-end; margin-top: -2px; font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.contador.is-limite { color: var(--warn); font-weight: 600; }

/* Calendário: « » para pular o ano; o número de hoje sempre por cima do círculo */
.calsem__ano span { font-size: 18px; line-height: 1; font-weight: 500; }
.calsem__dia.is-hoje span { position: relative; z-index: 1; line-height: 1; font-variant-numeric: tabular-nums; }
/* Revisão 4 (Lote H4): o logo da barra leva ao Início (UI.shellEquipe) */
.shell-logo { display: inline-flex; align-items: center; border-radius: var(--r-md); }
@media (min-width: 1024px) { .topo > .shell-logo--movel { display: none; } }

/* =========================================================================
   Revisão 5 (Lote I1)
   ========================================================================= */
/* Item 17 · pilha de modais e painéis (ui.js, arrumarPilha): o de cima fica na frente, o fundo dele cobre a tela e
   desfoca o que está embaixo (inclusive o modal ou painel de baixo, que fica sem clique: inert). */
.modal-fundo.ui-empilhado, .painel-fundo.ui-empilhado { -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.modal-fundo.ui-por-baixo, .painel.ui-por-baixo { pointer-events: none; }
@media (prefers-reduced-transparency: reduce) {
  .modal-fundo.ui-empilhado, .painel-fundo.ui-empilhado { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(3, 26, 66, .6); }
}
/* QA A1 · o botão do toast (ex.: Desfazer) só vale ~600 ms depois de aparecer */
.toast__acao.is-esperando { cursor: default; }
/* Valor oculto ("R$ ▒▒▒▒"): quem não vê valores vê a tarja, sem como revelar. EQ.moedaVisivel(valor) monta o HTML. */
.valor-tarjado { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); white-space: nowrap; font-variant-numeric: tabular-nums; user-select: none; }
.valor-tarjado__tarja { display: inline-block; width: 4.2em; height: .9em; border-radius: 3px; vertical-align: middle;
  background: repeating-linear-gradient(135deg, #C9D3DE 0 4px, #D9E1EA 4px 8px); }

/* Revisão 7: no celular, alvos de toque de pelo menos 44 px (os chips, 40 px); o desktop segue compacto. Fica no fim para valer sobre as regras acima. */
@media (max-width: 559px) {
  .btn--pequeno, .btn--icone, .menu-item, .toast__acao { min-height: 44px; }
  .btn--icone { width: 44px; }
  .chip { min-height: 40px; }
}
