/* Simulador de Jornada: bege claro, azul institucional como acento, mobile first.
   As cores reais vêm de src/config/identidade.js (aplicadas como variáveis em tempo de execução).
   Os valores abaixo são apenas reserva caso o JavaScript não carregue. */
:root {
  --azul: #1f4e79;
  --azul-escuro: #173c5e;
  --suave: #e6edf4;
  --fundo: #ffffff;
  --superficie: #fbfaf7;
  --texto: #2a2823;
  --muted: #7b7466;
  --borda: #e3dbc9;
  --ok: #4d7a5c;
  --alerta: #9a6d22;
  --erro: #9b4d3f;
  --raio: 16px;
  --raio-pequeno: 10px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Helvetica Neue", "Segoe UI", Arial, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  color: var(--texto);
  background: var(--fundo);
  -webkit-font-smoothing: antialiased;
}
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Abertura institucional */
.abertura {
  max-width: 560px;
  margin: 0 auto;
  padding: 56px 24px 40px;
  text-align: left;
}
.marca { display: flex; align-items: center; gap: 10px; margin-bottom: 40px; }
.marca img { display: block; height: 40px; width: auto; }
#marca-texto { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--azul); }
.eyebrow {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--azul);
}
.abertura h1 {
  margin: 0 0 18px;
  font-size: clamp(30px, 7vw, 44px);
  font-weight: 300;
  letter-spacing: -.01em;
  line-height: 1.1;
  color: var(--texto);
  text-transform: uppercase;
}
.chamada { margin: 0 0 14px; font-size: 19px; font-weight: 500; color: var(--azul); }
.texto-abertura { margin: 0; font-size: 15px; color: var(--muted); max-width: 46ch; }

/* Layout */
.app {
  max-width: 560px;
  margin: 0 auto;
  padding: 8px 24px 40px;
  display: grid;
  gap: 40px;
}
.bloco h2 {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Dias: lista vertical, nome à esquerda, caixa à direita */
.dias { border: 0; margin: 0; padding: 0; }
#lista-dias { border-top: 1px solid var(--borda); }
.dia {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 8px 2px;
  font-size: 15px;
  color: var(--texto);
  border-bottom: 1px solid var(--borda);
  cursor: pointer;
}
.dia span { flex: 1; }
.dia input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin: 0;
  flex: none;
  border: 1.5px solid #b9b09c;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  position: relative;
}
.dia input:checked { background: var(--azul); border-color: var(--azul); }
.dia input:checked::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 4px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Campos principais */
.campos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 22px;
}
label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
input[type="time"], input[type="text"], input[type="date"], select {
  font: inherit;
  font-size: 15px;
  color: var(--texto);
  padding: 10px 12px;
  border: 1px solid var(--borda);
  border-radius: var(--raio-pequeno);
  background: var(--superficie);
  min-width: 0;
  width: 100%;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--suave); outline-offset: 1px; border-color: var(--azul); }
input:disabled { opacity: .45; }

/* Total: destaque tipográfico, sem bloco sólido */
.total {
  margin-top: 28px;
  padding: 0 2px;
  display: grid;
  gap: 4px;
}
.total-rotulo { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.total strong { font-size: 44px; font-weight: 300; line-height: 1.1; color: var(--azul); letter-spacing: -.01em; }
.total-detalhe { font-size: 13px; color: var(--muted); }
.aviso { color: var(--erro); font-size: 13px; margin: 10px 2px 0; }
.aviso:empty { display: none; }

/* Expansíveis: discretos, sem caixas */
.expansivel { margin-top: 18px; }
.expansivel summary {
  cursor: pointer;
  padding: 8px 0;
  color: var(--azul);
  font-size: 14px;
  list-style: none;
}
.expansivel summary::-webkit-details-marker { display: none; }
.expansivel summary::after { content: "+"; float: right; color: var(--muted); }
.expansivel[open] summary::after { content: "–"; }
.expansivel .linha { margin-top: 12px; }
.check { flex-direction: row; align-items: center; gap: 10px; color: var(--texto); font-size: 14px; }
.linha-dia {
  display: grid;
  grid-template-columns: 76px 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.linha-dia.inativo { opacity: .35; }
.nome-dia { font-size: 13px; color: var(--muted); }
.texto-legal { font-size: 13px; color: var(--muted); padding: 4px 0 8px; }
.texto-legal ul { padding-left: 18px; margin: 8px 0; }

/* Abas: texto com sublinhado, sem pílulas pesadas */
.abas {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--borda);
  margin-bottom: 18px;
}
.abas button {
  font: inherit;
  padding: 8px 0 10px;
  margin-bottom: -1px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  color: var(--muted);
  font-size: 15px;
  cursor: pointer;
}
.abas button[aria-selected="true"] { color: var(--azul); border-bottom-color: var(--azul); font-weight: 600; }

#painel { display: grid; gap: 16px; }
.situacao { margin: 0; font-size: 15px; color: var(--texto); }
.vazio { color: var(--muted); font-size: 14px; margin: 4px 0; }

/* Cards das opções: superfície suave, sem sombra */
.cards { display: grid; gap: 12px; }
.card-alt {
  padding: 18px 18px 16px;
  border-radius: var(--raio);
  background: var(--superficie);
  border: 1px solid var(--borda);
}
.card-alt header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}
.card-alt h3 { font-size: 15px; font-weight: 600; margin: 0; color: var(--texto); }
.card-alt dl { display: grid; grid-template-columns: 118px 1fr; gap: 6px 12px; margin: 0; font-size: 14px; }
.card-alt dt { color: var(--muted); }
.card-alt dd { margin: 0; }
.card-alt dd div { min-height: 1.2em; }
.card-alt.nao-aplicavel { opacity: .85; }
.motivo-card { margin: 0; font-size: 14px; color: var(--muted); }

.selo {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--superficie);
  border: 1px solid;
  white-space: nowrap;
}
.selo-ok { color: var(--ok); border-color: var(--ok); }
.selo-alerta { color: var(--alerta); border-color: var(--alerta); }
.selo-erro { color: var(--erro); border-color: var(--erro); }
.selo-neutro { color: var(--muted); border-color: var(--borda); }

.alertas { margin: 0; padding-left: 18px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }

/* Botão principal: a única área de cor sólida */
.principal {
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 14px;
  border: 0;
  border-radius: 999px;
  background: var(--azul);
  color: #fff;
  cursor: pointer;
  width: 100%;
  margin-top: 6px;
}
.principal:hover { background: var(--azul-escuro); }
.msg-pequena { font-size: 13px; color: var(--muted); margin: 0; min-height: 1em; text-align: center; }

.rodape {
  max-width: 560px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  font-size: 12px;
  color: var(--muted);
  border-top: 1px solid var(--borda);
}
.rodape p { margin: 4px 0; }
.rodape a { color: var(--azul); }

@media (min-width: 720px) {
  .abertura, .app, .rodape { max-width: 620px; }
}

/* Seção legal */
.subtitulo-legal { margin: 14px 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--azul); }
.situacao-legal { display: inline-block; min-width: 84px; font-size: 12px; font-weight: 600; color: var(--texto); }
.texto-legal li { margin-bottom: 6px; }
.texto-legal p { margin: 6px 0; }

/* Opções: blocos individuais, um abaixo do outro */
.explicacao { margin: 0 0 12px; font-size: 14px; color: var(--texto); }
.card-alt + .card-alt { margin-top: 0; }

/* Revisão final: abertura, total, título e seletor de metas */
.abertura { padding: 44px 24px 32px; }
.marca { justify-content: center; margin-bottom: 24px; }
.marca img { height: 46px; width: auto; }
.eyebrow { color: #2f7fd1; font-size: 13px; letter-spacing: .16em; }
.abertura h1 { text-transform: none; font-size: clamp(28px, 6.5vw, 38px); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; color: var(--azul-escuro); margin-bottom: 14px; }
.texto-abertura { font-size: 16px; color: var(--texto); }
.total { background: var(--azul); color: #fff; border-radius: 16px; padding: 18px 20px; margin-top: 24px; }
.total-rotulo { color: rgba(255,255,255,.85); }
.total strong { color: #fff; font-weight: 600; font-size: 40px; }
.total-detalhe { color: rgba(255,255,255,.9); }
#t-sim { font-size: 22px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--texto); margin-bottom: 14px; }
.abas { display: flex; gap: 12px; border-bottom: 0; margin-bottom: 18px; }
.abas button { flex: 1; padding: 14px 12px; border: 1.5px solid var(--azul); border-radius: 999px; background: #fff; color: var(--azul); font-size: 16px; font-weight: 600; margin: 0; }
.abas button[aria-selected="true"] { background: var(--azul); color: #fff; border-bottom-color: var(--azul); }

/* Simplificação das opções: uma coluna no celular, grade 2×2 no computador */
.cards { grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) {
  .cards { grid-template-columns: 1fr 1fr; align-items: stretch; }
  .app, .abertura, .rodape { max-width: 880px; }
}
.card-alt { display: flex; flex-direction: column; }
.card-alt dl { grid-template-columns: 96px 1fr; }
.numero { display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 8px; border-radius: 50%; background: var(--azul); color: #fff; font-size: 13px; font-weight: 600; vertical-align: middle; }
.card-alt h3 { display: flex; align-items: center; }
.legenda { margin: 4px 0 0; font-size: 13px; line-height: 1.6; color: var(--muted); }
.legenda em { font-style: normal; font-weight: 600; color: var(--texto); }

/* Horários alterados em azul; crédito discreto no rodapé */
.alterado { color: var(--azul); font-weight: 600; }
.credito { margin-top: 10px; font-size: 11px; letter-spacing: .04em; color: var(--muted); opacity: .8; }

/* Oculta o conteúdo até o simulador montar a interface (evita mostrar layout parcial) */
.carregando .abertura, .carregando .app, .carregando .rodape { visibility: hidden; }

/* Celular: três campos (entrada, intervalo, saída) com a mesma largura, sem cortar o intervalo */
.campos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.campos input[type="time"], .campos input[type="text"] { font-size: 14px; padding: 10px 8px; }

/* Horários: mesma largura, altura e alinhamento central (inclusive Safari/iPhone) */
.campos label, .linha-dia > * { min-width: 0; }
.campos input[type="time"], .campos input[type="text"],
.linha-dia input[type="time"], .linha-dia input[type="text"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 44px;
  min-width: 0;
  margin: 0;
  padding: 0 8px;
  text-align: center;
  font-size: 15px;
  line-height: 44px;
}
.campos input[type="time"]::-webkit-datetime-edit, .linha-dia input[type="time"]::-webkit-datetime-edit { padding: 0; text-align: center; }
.campos input[type="time"]::-webkit-date-and-time-value, .linha-dia input[type="time"]::-webkit-date-and-time-value { text-align: center; }
.campos input[type="time"]::-webkit-calendar-picker-indicator, .linha-dia input[type="time"]::-webkit-calendar-picker-indicator { margin-left: 2px; }
.campos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; align-items: end; }
.linha-dia { grid-template-columns: 76px repeat(3, minmax(0, 1fr)); gap: 8px; }
