/* ══════════════════════════════════════════════════════
   TELA DE ACESSO — identidade padrão CAMIM (2026-10-27)
   Universidade CAMIM: em arquivo próprio por causa da CSP
   (script-src/style-src "self"); ícones do sprite _icones.html.
   Tema CLARO, painel verde à esquerda com motivo de
   indicadores. De propósito NÃO usa o mosaico de fotos,
   a grade, a linha de scan nem o card escuro translúcido:
   esse visual é o do idCamim e confundia o usuário.
   É o MESMO bloco das telas de acesso do KPI (relatorio_h_t:
   login.html) e de todos os outros projetos da CAMIM — mudou
   lá, muda aqui.
══════════════════════════════════════════════════════ */
:root {
  --verde: #009944;
  --verde-escuro: #006633;
  --verde-claro: #e6f4ec;
  --tinta: #10261a;
  --tinta-2: #4a5e52;
  --tinta-3: #8a9a90;
  --fundo: #f3f6f4;
  --borda: #d9e2dc;
  --branco: #ffffff;
  --erro: #c62828;
  --ok: #1b7f3b;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; font-family: "Segoe UI", system-ui, -apple-system, sans-serif; background: var(--fundo); color: var(--tinta); }

.tela { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 44%) 1fr; }

/* ── painel verde (marca) ───────────────────────────── */
.painel {
  position: relative; overflow: hidden;
  background: linear-gradient(165deg, var(--verde) 0%, var(--verde-escuro) 100%);
  color: #fff; padding: 48px 48px 40px;
  display: flex; flex-direction: column; justify-content: flex-start;
}
.painel .marca { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.painel .marca .logo { width: 56px; height: 56px; border-radius: 14px; background: #fff; display: flex; align-items: center; justify-content: center; padding: 8px; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
.painel .marca .logo img { width: 100%; height: 100%; object-fit: contain; }
.painel .marca .nome { font-size: 1.35rem; font-weight: 800; letter-spacing: .04em; line-height: 1.1; }
.painel .marca .nome small { display: block; font-size: .74rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; opacity: .78; margin-top: 3px; }

.painel .chamada { position: relative; z-index: 2; margin: 44px 0 0; max-width: 420px; }
.painel .chamada h1 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); font-weight: 800; line-height: 1.18; margin-bottom: 12px; }
.painel .chamada p { font-size: .98rem; line-height: 1.55; opacity: .86; }

/* motivo de indicadores: barras + linha, em branco translúcido */
.painel .grafico { position: absolute; left: 0; right: 0; bottom: 0; height: 46%; z-index: 1; pointer-events: none; }
.painel .grafico svg { width: 100%; height: 100%; display: block; }
.painel .grafico .barra { fill: rgba(255,255,255,.14); animation: cresce 1.4s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.painel .grafico .barra:nth-child(2) { animation-delay: .08s; }
.painel .grafico .barra:nth-child(3) { animation-delay: .16s; }
.painel .grafico .barra:nth-child(4) { animation-delay: .24s; }
.painel .grafico .barra:nth-child(5) { animation-delay: .32s; }
.painel .grafico .barra:nth-child(6) { animation-delay: .40s; }
.painel .grafico .barra:nth-child(7) { animation-delay: .48s; }
.painel .grafico .barra:nth-child(8) { animation-delay: .56s; }
.painel .grafico .linha { fill: none; stroke: rgba(255,255,255,.75); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: traca 1.8s ease-out .5s forwards; }
.painel .grafico .ponto { fill: #fff; opacity: 0; animation: aparece .4s ease 2.1s forwards; }
@keyframes cresce { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes traca { to { stroke-dashoffset: 0; } }
@keyframes aparece { to { opacity: 1; } }

.painel .stats { position: relative; z-index: 2; display: flex; gap: 28px; flex-wrap: wrap; margin-top: auto; padding-top: 40px; }
.painel .stat .num { font-size: 1.9rem; font-weight: 900; line-height: 1; }
.painel .stat .lbl { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; opacity: .78; margin-top: 5px; }

/* ── lado do formulário ─────────────────────────────── */
.conteudo { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.card {
  width: min(420px, 100%); background: var(--branco);
  border: 1px solid var(--borda); border-radius: 18px; padding: 36px 38px;
  box-shadow: 0 10px 40px rgba(16,38,26,.08);
  animation: sobe .6s ease both;
}
@keyframes sobe { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.card-title { font-size: 1.35rem; font-weight: 800; color: var(--tinta); margin-bottom: 4px; }
.card-sub { font-size: .88rem; color: var(--tinta-2); margin-bottom: 26px; }

.field { margin-bottom: 16px; }
.field label, .card > form > label, label.rotulo {
  display: block; font-size: .74rem; font-weight: 700; color: var(--tinta-2);
  text-transform: uppercase; letter-spacing: .08em; margin-bottom: 7px;
}
.input-row {
  display: flex; align-items: center; background: #fbfcfb;
  border: 1px solid var(--borda); border-radius: 10px; overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.input-row:focus-within { border-color: var(--verde); box-shadow: 0 0 0 3px rgba(0,153,68,.16); background: #fff; }
.input-row .icon { width: 42px; display: flex; align-items: center; justify-content: center; color: var(--verde); font-size: .9rem; flex-shrink: 0; }
.input-row input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; color: var(--tinta); font-size: .97rem; padding: 12px 10px 12px 0; }
.input-row input::placeholder { color: #b3bfb8; }
.toggle-pwd { background: none; border: none; cursor: pointer; padding: 0 13px; color: var(--tinta-3); font-size: .9rem; transition: color .2s; }
.toggle-pwd:hover { color: var(--verde); }

.btn, .btn-login {
  width: 100%; padding: 13px; border: none; border-radius: 10px;
  background: var(--verde); color: #fff; font-size: .98rem; font-weight: 700;
  letter-spacing: .03em; cursor: pointer; margin-top: 6px;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(0,153,68,.28);
}
.btn:hover, .btn-login:hover { background: var(--verde-escuro); transform: translateY(-1px); }
.btn:active, .btn-login:active { transform: scale(.985); }

.erro, #msg { min-height: 18px; font-size: .85rem; text-align: center; margin-top: 12px; color: var(--erro); }
#msg.ok { color: var(--ok); }
.back { display: block; text-align: center; margin-top: 20px; color: var(--tinta-2); font-size: .86rem; text-decoration: none; font-weight: 600; }
.back:hover { color: var(--verde); }

/* ── responsivo ─────────────────────────────────────── */
@media (max-width: 860px) {
  .tela { grid-template-columns: 1fr; }
  .painel { padding: 24px 22px; min-height: 0; }
  .painel .chamada { margin: 18px 0 6px; }
  .painel .chamada h1 { font-size: 1.35rem; }
  .painel .chamada p, .painel .grafico, .painel .stats { display: none; }
  .conteudo { padding: 24px 16px 40px; }
  .card { padding: 28px 22px; }
}

.painel .pilares { position: relative; z-index: 2; list-style: none; margin: 26px 0 0; display: grid; gap: 10px; max-width: 420px; }
.painel .pilares li { display: flex; gap: 12px; align-items: flex-start; font-size: .93rem; line-height: 1.4; opacity: .92; }
.painel .pilares li .ico { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,.16); display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; margin-top: 1px; }
.divider { display: flex; align-items: center; gap: 10px; margin: 20px 0 16px; color: var(--tinta-3); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--borda); }
/* botão do idCamim: continua azul, para o usuário saber que vai SAIR daqui */
.btn-idcamim {
  width: 100%; padding: 12px; border: 1px solid #1e6fb8; border-radius: 10px;
  background: #fff; color: #1e6fb8; font-size: .94rem; font-weight: 700; letter-spacing: .02em;
  cursor: pointer; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 9px;
  transition: background .2s, box-shadow .2s, transform .15s;
}
.btn-idcamim:hover { background: #eef5fc; box-shadow: 0 4px 16px rgba(30,111,184,.2); transform: translateY(-1px); color: #1e6fb8; }
.btn-idcamim:active { transform: scale(.985); }
/* quando só existe o idCamim, o botão dele é o principal: verde */
.btn-idcamim.principal { background: var(--verde); border-color: var(--verde); color: #fff; padding: 13px; font-size: .98rem; box-shadow: 0 4px 16px rgba(0,153,68,.28); }
.btn-idcamim.principal:hover { background: var(--verde-escuro); border-color: var(--verde-escuro); color: #fff; }
.msg-erro { display: flex; gap: 8px; align-items: flex-start; background: #fdecea; border: 1px solid #f5c6c2; color: #8e1c1c; border-radius: 10px; padding: 11px 14px; font-size: .88rem; margin-bottom: 18px; }
.msg-ok { display: flex; gap: 8px; align-items: flex-start; background: #e8f5ec; border: 1px solid #bfe3cb; color: #1b5e2b; border-radius: 10px; padding: 11px 14px; font-size: .88rem; margin-bottom: 18px; }
.btn-login:disabled, .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.rodape { text-align: center; margin-top: 22px; font-size: .78rem; color: var(--tinta-3); }
.nota { font-size: .84rem; color: var(--tinta-2); text-align: center; margin-top: 14px; line-height: 1.45; }
@media (max-width: 860px) { .painel .pilares { display: none; } }

/* ícones do sprite (mesma régua do app.css) no lugar do FontAwesome */
.i { width: 1.15em; height: 1.15em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; }
.msg-erro .i, .msg-ok .i { margin-top: 2px; }
.nota a { color: var(--verde); font-weight: 600; }
