/* =============================================================
   Identidade SELEM · Hub Protocolo de Liderança
   Navy domina · bordô apoia · dourado é acento (<=10%)
   Cormorant Garamond (display) + Archivo (corpo)
   Editorial, premium, contido. Sem gradiente clichê, sem cartão branco flutuante.
   ============================================================= */

:root {
  --navy:   #101A26;
  --navy-2: #1a2839;
  --bordo:  #5C1A22;
  --preto:  #14110F;
  --ouro:   #B8973F;
  --ouro-2: #cdae60;
  --bege:   #E6DBC4;
  --areia:  #F1EAD8;
  --areia-2:#f6f0e2;
  --branco: #FFFFFF;
  --tinta:  #574639;
  --linha:  #ddd0b3;
  --sombra: 0 1px 2px rgba(20,17,15,.04), 0 18px 40px -28px rgba(20,17,15,.45);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--areia);
  color: var(--tinta);
  font-family: "Archivo", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.serif { font-family: "Cormorant Garamond", Georgia, "Times New Roman", serif; font-weight: 600; }

h1, h2, h3 {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 .35em;
}
h1 { font-size: clamp(2.2rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
h3 { font-size: 1.3rem; letter-spacing: 0; }
p { margin: 0 0 1em; }
a { color: var(--bordo); text-decoration-thickness: 1px; text-underline-offset: 2px; }

/* Rótulo em versalete dourado (assinatura tipográfica da marca) */
.selo, .kicker {
  font-family: "Archivo", sans-serif;
  font-size: .68rem; font-weight: 700; letter-spacing: .2em;
  text-transform: uppercase; color: var(--ouro); margin-bottom: 8px;
}

/* Grafismo de ripas */
.ripas {
  height: 12px; width: 68px;
  background-image: repeating-linear-gradient(to bottom,
    var(--ouro) 0, var(--ouro) 1.5px, transparent 1.5px, transparent 4px);
  opacity: .85;
}
.divisor { border: 0; border-top: 1px solid var(--linha); margin: 1.8rem 0; }

/* --------- Cabeçalho institucional --------- */
.topo {
  background: var(--navy);
  color: var(--areia);
  padding: 16px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-bottom: 1px solid rgba(184,151,63,.35);
  position: sticky; top: 0; z-index: 20;
}
.topo .marca small {
  display: block; font-family: "Archivo", sans-serif; font-weight: 500;
  font-size: .6rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--ouro); margin-top: 5px;
}
.logo-topo { height: 26px; width: auto; display: block; }
.topo .conta { font-size: .88rem; color: var(--bege); display: flex; align-items: center; gap: 14px; }

/* Logo do evento (clara — só em fundos navy) */
.logo-evento-topo { height: 30px; width: auto; display: block; }
.topo .marca.evento { display: flex; align-items: center; gap: 14px; }
.topo .marca.evento small { margin-top: 0; }
.login-inner .logo-evento-hero { width: 100%; max-width: 290px; height: auto; display: block; margin-bottom: 22px; }
.realizacao { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(184,151,63,.25); text-align: center; }
.realizacao span { display: block; font-size: .56rem; letter-spacing: .24em; text-transform: uppercase; color: var(--ouro); margin-bottom: 9px; }
.realizacao img { height: 24px; width: auto; opacity: .92; }

/* --------- Container --------- */
.wrap { max-width: 920px; margin: 0 auto; padding: 44px 24px 96px; }
.wrap-lg { max-width: 1140px; }

/* --------- Cartões / blocos --------- */
.card {
  background: var(--branco);
  border: 1px solid var(--linha);
  border-radius: 16px;
  padding: 30px 32px;
  margin-bottom: 22px;
  box-shadow: var(--sombra);
}
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }

/* --------- Formulários --------- */
label { display: block; font-size: .72rem; font-weight: 700; color: var(--navy);
  text-transform: uppercase; letter-spacing: .1em; margin: 16px 0 7px; }
input[type=text], input[type=email], input[type=password], input[type=datetime-local],
textarea, select {
  width: 100%; font-family: inherit; font-size: 1rem; color: var(--navy);
  background: var(--areia-2); border: 1px solid transparent; border-bottom: 1.5px solid var(--linha);
  border-radius: 10px; padding: 13px 15px; transition: border-color .15s, background .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none; background: var(--branco); border-color: var(--ouro);
  box-shadow: 0 0 0 3px rgba(184,151,63,.15);
}
textarea { min-height: 104px; resize: vertical; line-height: 1.55; }

/* --------- Botões --------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; cursor: pointer; font-family: inherit; font-size: .95rem; font-weight: 600;
  letter-spacing: .01em; padding: 13px 24px; border-radius: 10px;
  background: var(--navy); color: var(--branco);
  transition: transform .12s ease, box-shadow .18s ease, background .15s;
  box-shadow: 0 1px 2px rgba(20,17,15,.12);
}
.btn:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: 0 10px 24px -12px rgba(20,17,15,.6); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: default; transform: none; box-shadow: none; }
.btn-ouro { background: var(--ouro); color: var(--preto); }
.btn-ouro:hover { background: var(--ouro-2); }
.btn-linha { background: transparent; color: var(--navy); border: 1.5px solid var(--linha); box-shadow: none; }
.btn-linha:hover { background: var(--areia-2); border-color: var(--ouro); }
.btn-sm { padding: 9px 16px; font-size: .84rem; }
.link-btn { background: none; border: none; color: var(--bordo); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 2px; padding: 0; }
/* Link "Voltar aos materiais" nas barras: navy, tamanho uniforme, discreto. */
.barra .link-btn { color: var(--navy); text-decoration: none; font-weight: 600; font-size: .9rem; opacity: .82; transition: opacity .15s; }
.barra .link-btn:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }

/* --------- Abas de fase (timeline navegável) --------- */
.timeline { display: flex; gap: 12px; margin: 10px 0 30px; }
.fase-chip {
  flex: 1; text-align: center; padding: 16px 12px; border-radius: 13px;
  border: 1.5px solid var(--linha); background: var(--branco);
  font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.22rem; color: var(--navy);
  cursor: pointer; transition: transform .14s ease, box-shadow .18s ease, border-color .15s, background .2s;
  box-shadow: var(--sombra);
}
.fase-chip:hover { transform: translateY(-2px); border-color: var(--ouro); }
.fase-chip .rot { display: block; font-family: "Archivo", sans-serif; font-size: .6rem; font-weight: 700;
  letter-spacing: .2em; text-transform: uppercase; color: var(--ouro); margin-bottom: 5px; }
.fase-chip.ativa { background: var(--navy); color: var(--areia); border-color: var(--navy); }
.fase-chip.ativa .rot { color: var(--ouro-2); }
.fase-chip.bloqueada { opacity: .55; }

/* --------- Home concierge (abertura personalizada) --------- */
.concierge { background: var(--navy); color: var(--areia); border-radius: 16px; padding: 24px 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 28px; margin: 16px 0 6px;
  box-shadow: var(--sombra); }
.cg-ola { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.6rem; color: var(--branco); }
.cg-passo { color: var(--bege); font-size: 1.02rem; margin-top: 3px; max-width: 52ch; }
.cg-txt .btn { margin-top: 14px; }
.cg-count { text-align: center; flex-shrink: 0; border-left: 1px solid rgba(184,151,63,.35); padding-left: 28px; }
.cg-num { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 3.6rem; color: var(--ouro-2); line-height: .95; }
.cg-lbl { font-size: .66rem; letter-spacing: .1em; text-transform: uppercase; color: var(--bege); margin-top: 6px; max-width: 15ch; margin-left: auto; margin-right: auto; line-height: 1.35; }
@media (max-width: 640px) {
  .concierge { flex-direction: column-reverse; align-items: flex-start; gap: 18px; }
  .cg-count { border-left: 0; padding-left: 0; text-align: left; border-top: 1px solid rgba(184,151,63,.35); padding-top: 16px; display: flex; align-items: baseline; gap: 10px; }
  .cg-num { font-size: 2.6rem; } .cg-lbl { margin: 0; }
}

/* --------- Trilha da jornada (3 fases) --------- */
.trilha { display: flex; align-items: flex-start; margin: 14px 0 32px; }
.trilha-step { flex: 1; text-align: center; position: relative; cursor: pointer; padding-top: 2px; }
.trilha-step::before { content: ""; position: absolute; top: 22px; left: -50%; width: 100%; height: 2px;
  background: var(--linha); z-index: 1; }
.trilha-step:first-child::before { display: none; }
.trilha-step.concluida::before, .trilha-step.atual::before, .trilha-step.sel::before { background: var(--ouro); }
.trilha-step .dot { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--linha);
  background: var(--branco); display: flex; align-items: center; justify-content: center; margin: 0 auto 12px;
  font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.2rem; color: var(--tinta);
  position: relative; z-index: 2; transition: transform .16s ease, background .2s, border-color .2s, color .2s; }
.trilha-step:hover .dot { transform: translateY(-2px); border-color: var(--ouro); }
.trilha-step.concluida .dot { background: var(--ouro); border-color: var(--ouro); color: var(--preto); }
.trilha-step.sel .dot { background: var(--navy); border-color: var(--navy); color: var(--areia); transform: scale(1.06); }
.trilha-step .lbl { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.2rem; color: var(--navy); line-height: 1.1; }
.trilha-step.sel .lbl { color: var(--navy); }
.trilha-step .st { font-size: .64rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ouro); margin-top: 4px; font-weight: 600; }
.trilha-step.futura .lbl, .trilha-step.futura .st { opacity: .6; }

/* --------- Os 7 movimentos do dia --------- */
.movimentos { margin-top: 6px; }
.mov { display: flex; gap: 18px; padding: 14px 0; position: relative; }
.mov::before { content: ""; position: absolute; left: 17px; top: 40px; bottom: -14px; width: 1px; background: var(--linha); }
.mov:last-child::before { display: none; }
.mov .n { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.5rem; color: var(--ouro);
  width: 36px; height: 36px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--linha); border-radius: 50%; background: var(--branco); position: relative; z-index: 2; }
.mov .p { font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.3rem; color: var(--navy); line-height: 1.15; }
.mov .t { font-size: .92rem; color: var(--tinta); margin-top: 1px; }
.mov .acao { display: inline-block; font-size: .78rem; font-weight: 600; color: var(--ouro); margin-top: 6px; text-decoration: none; }
a.acao:hover { text-decoration: underline; }
.mov .acao.trava { color: #8a7c6c; font-weight: 500; }
.mov.link { cursor: pointer; border-radius: 10px; margin: 0 -12px; padding: 14px 12px; transition: background .15s; }
.mov.link:hover { background: var(--areia-2); }
.mov.link:hover .p { color: var(--bordo); }
.mov.link:hover::before { display: none; }
.mov.bloqueada .n { color: var(--linha); }
.mov.bloqueada .p { color: #6f6255; }

@media (max-width: 560px) {
  .trilha { flex-direction: column; align-items: stretch; gap: 2px; }
  .trilha-step { flex-direction: row; align-items: center; gap: 14px; text-align: left; padding: 7px 0; }
  .trilha-step .dot { margin: 0; width: 40px; height: 40px; }
  .trilha-step::before { display: none; }
  .trilha-step:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 50%; width: 2px; height: 100%; background: var(--linha); z-index: 1; }
  .trilha-txt { text-align: left; }
  .trilha-step .lbl { font-size: 1.15rem; }
}

/* --------- Listas de documentos / itens --------- */
.item {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px 0; border-bottom: 1px solid var(--linha);
}
.item:last-child { border-bottom: 0; }
.item:first-of-type { padding-top: 4px; }
.item .meta { min-width: 0; }
.item .meta .t { font-weight: 600; color: var(--navy); font-size: 1.05rem; }
.item .meta .d { font-size: .9rem; color: var(--tinta); margin-top: 2px; }

/* --------- Galeria de materiais (capas) --------- */
.mat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; margin: 4px 0 24px; }
.mat-card { border: 1px solid var(--linha); border-radius: 14px; overflow: hidden; background: var(--branco);
  box-shadow: var(--sombra); display: flex; flex-direction: column;
  transition: transform .14s ease, box-shadow .18s ease; }
.mat-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px -18px rgba(20,17,15,.5); }
.mat-capa { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: center;
  background: var(--navy); display: block; border-bottom: 1px solid var(--linha); }
.mat-info { padding: 15px 17px 17px; display: flex; flex-direction: column; gap: 13px; flex: 1; }
.mat-titulo { font-weight: 600; color: var(--navy); font-size: 1.02rem; line-height: 1.22; }
.mat-acoes { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* --------- Conteúdo adicional (links da Lara) --------- */
.links-extra { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
@media (max-width: 760px) { .links-extra { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .links-extra { grid-template-columns: 1fr; } }
.link-extra { display: flex; flex-direction: column; padding: 12px 15px; border: 1px solid var(--linha); border-radius: 10px;
  text-decoration: none; transition: border-color .15s, background .15s, transform .12s; }
.link-extra:hover { border-color: var(--ouro); background: var(--areia-2); transform: translateY(-1px); }
.link-extra .le-n { font-weight: 600; color: var(--navy); }
.link-extra .le-d { font-size: .82rem; color: var(--tinta); margin-top: 1px; }

/* --------- Tabelas --------- */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; background: var(--navy); color: var(--branco); font-weight: 600;
  padding: 11px 14px; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
th:first-child { border-radius: 8px 0 0 0; } th:last-child { border-radius: 0 8px 0 0; }
td { padding: 11px 14px; border-bottom: 1px solid var(--linha); color: var(--tinta); }
tr:last-child td { border-bottom: 0; }
.num { color: var(--ouro); font-weight: 700; }

/* --------- Abas do painel admin --------- */
.abas { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 24px; border-bottom: 1px solid var(--linha); }
.aba { background: none; border: none; cursor: pointer; font: inherit; font-weight: 600; color: var(--tinta);
  padding: 12px 18px; border-bottom: 3px solid transparent; transition: color .15s, border-color .15s; }
.aba:hover { color: var(--navy); }
.aba.on { color: var(--navy); border-bottom-color: var(--ouro); }

/* --------- Avisos / tags --------- */
.aviso { padding: 13px 16px; border-radius: 10px; font-size: .92rem; margin: 12px 0; }
.aviso.ok  { background: #e7efe4; color: #2e5127; border: 1px solid #b9d3ac; }
.aviso.err { background: #f3e2e2; color: var(--bordo); border: 1px solid #dcb9b9; }
.aviso.info{ background: var(--bege); color: var(--tinta); border: 1px solid var(--linha); }
.tag { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 20px; }
.tag.inscrito { background: var(--navy); color: var(--areia); }
.tag.cortesia { background: var(--ouro); color: var(--preto); }
.mudo { color: #8a7c6c; font-size: .9rem; }

/* --------- Rodapé --------- */
.rodape { text-align: center; color: #8a7c6c; font-size: .8rem; padding: 34px 16px;
  border-top: 1px solid var(--linha); margin-top: 46px; }

/* =============================================================
   Primeira página (login + carta)
   ============================================================= */
.split { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.split-carta {
  background: var(--areia); padding: clamp(40px, 6vw, 88px) clamp(28px, 5vw, 76px);
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.split-carta::after {
  content: ""; position: absolute; right: -40px; top: 40px; width: 130px; height: 60%;
  background-image: repeating-linear-gradient(to bottom, var(--ouro) 0, var(--ouro) 1.5px, transparent 1.5px, transparent 12px);
  opacity: .08; pointer-events: none;
}
.carta { max-width: 620px; margin: 0 auto; }
.carta .kicker { color: var(--bordo); }
.carta h1 { font-size: clamp(2.1rem, 3.6vw, 2.9rem); margin: 6px 0 4px; }
.carta .sub { font-family: "Cormorant Garamond", serif; font-style: italic; font-size: 1.35rem; color: var(--ouro); margin-bottom: 22px; }
.carta p { font-size: 1.04rem; color: var(--tinta); }
.carta .destaque {
  font-family: "Cormorant Garamond", serif; font-size: 1.42rem; line-height: 1.4; color: var(--navy);
  border-left: 2px solid var(--ouro); padding: 4px 0 4px 20px; margin: 22px 0;
}
.carta ol { list-style: none; counter-reset: c; padding: 0; margin: 18px 0; }
.carta ol li { counter-increment: c; position: relative; padding: 8px 0 8px 42px; border-bottom: 1px solid var(--linha); color: var(--tinta); }
.carta ol li::before { content: counter(c, decimal-leading-zero); position: absolute; left: 0; top: 8px;
  font-family: "Cormorant Garamond", serif; font-weight: 600; font-size: 1.15rem; color: var(--ouro); }
.assinatura { margin-top: 26px; }
.assinatura .nome { font-family: "Cormorant Garamond", serif; font-style: italic; font-weight: 600; font-size: 2rem; color: var(--navy); line-height: 1; }
.assinatura .cargo { font-size: .8rem; letter-spacing: .06em; color: var(--tinta); margin-top: 6px; }

.split-login {
  background: var(--navy); color: var(--areia);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 48px 34px; position: relative;
}
.login-inner { width: 100%; max-width: 360px; }
.login-inner .logo-l { height: 40px; margin-bottom: 26px; }
.logo-login { height: 40px; width: auto; display: block; }
.login-inner h2 { color: var(--branco); font-size: 1.7rem; }
.split-login label { color: var(--bege); }
.split-login input { background: rgba(255,255,255,.06); border-bottom-color: rgba(184,151,63,.5); color: var(--branco); }
.split-login input:focus { background: rgba(255,255,255,.12); border-color: var(--ouro); }

@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split-login { order: -1; padding: 40px 28px; }
  .split-carta { padding: 44px 26px 60px; }
}
@media (max-width: 560px) {
  .timeline { flex-direction: column; }
  .item { flex-direction: column; align-items: flex-start; }
}
