/* Login, painel e administração. Mesmas cores do Conversor de Extratos. */
:root {
  --bg: #f3f5f8; --card: #fff; --ink: #1d2433; --muted: #667085; --line: #e3e7ee;
  --brand: #1f5eff; --brand-soft: #eaf0ff; --ok: #15803d; --ok-soft: #e7f6ec;
  --bad: #c62828; --bad-soft: #fdeaea; --warn: #b45309; --warn-soft: #fff4e5; --radius: 12px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 22px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 10px; }
h3 { font-size: 14px; margin: 18px 0 8px; }
code { background: var(--brand-soft); padding: 1px 5px; border-radius: 4px; }
.mudo { color: var(--muted); }

.barra { display: flex; align-items: center; gap: 16px; padding: 12px 24px; background: var(--card); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.barra .marca { font-weight: 800; font-size: 17px; color: var(--ink); }
.barra nav { margin-left: auto; display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.barra .quem { color: var(--muted); }
.conteudo { width: 100%; max-width: 1100px; margin: 0 auto; padding: 28px 16px 48px; flex: 1; }
.rodape { text-align: center; color: var(--muted); font-size: 12px; padding: 18px; border-top: 1px solid var(--line); }

.cartao { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.cartao.estreito { max-width: 420px; margin-left: auto; margin-right: auto; }
.login { min-height: 70vh; display: flex; align-items: center; }
.login .cartao { width: 100%; }
.login-marca { font-weight: 800; color: var(--brand); font-size: 15px; margin-bottom: 6px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px 18px; align-items: end; }
.form .largo { grid-column: 1 / -1; }
/* cadastro do escritório: CNPJ · Contato · Licença até · Dias de bônus · Nº de usuários numa linha só */
.form.form-escritorio { grid-template-columns: minmax(140px, 1fr) minmax(180px, 1.4fr) 180px 120px 120px; }
@media (max-width: 900px) { .form.form-escritorio { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); } }
.form label, .form .rot { display: flex; flex-direction: column; gap: 5px; font-weight: 600; font-size: 13px; }
.form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.form .largo .check { display: inline-flex; margin-right: 18px; }
input, textarea { font: inherit; padding: 9px 11px; border: 1px solid #cfd6e1; border-radius: 8px; background: #fff; color: inherit; width: 100%; }
input[type=checkbox] { width: auto; }
/* números e datas centralizados no campo (pedido do usuário) */
input[type=number], input[type=date] { text-align: center; }
input[type=date]::-webkit-datetime-edit { flex: 0 1 auto; margin: 0 auto; }
input[type=date]::-webkit-date-and-time-value { text-align: center; }
input:focus, textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }

button, .botao { font: inherit; font-weight: 600; background: var(--brand); color: #fff; border: 1px solid var(--brand); border-radius: 8px;
  padding: 9px 16px; cursor: pointer; display: inline-block; }
button:hover, .botao:hover { filter: brightness(1.08); text-decoration: none; }
button.secundario, .botao.secundario { background: #fff; color: var(--brand); border-color: #c9d7ff; }
button.perigo { background: #fff; color: var(--bad); border-color: #f2a7a7; }
button.pequeno, .botao.pequeno { padding: 5px 10px; font-size: 12px; }
.linha-botoes, td.acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.titulo-linha { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.titulo-linha h1 { margin: 0; }

.aviso { border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; border: 1px solid; }
.aviso.erro { background: var(--bad-soft); border-color: #f2a7a7; color: var(--bad); }
.aviso.ok { background: var(--ok-soft); border-color: #b7e2c4; color: var(--ok); }
.aviso.alerta { background: var(--warn-soft); border-color: #f5cf9a; color: var(--warn); }
.aviso.senha { background: #fffbe6; border-color: #f5b301; color: #3a2a00; font-weight: 600; font-size: 15px; }

.tabela { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tabela th, .tabela td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tabela th { background: #f8fafc; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); }
.tabela tr:last-child td { border-bottom: 0; }
.tabela td.neg { color: var(--bad); font-weight: 600; }
.cartao .tabela { border-radius: 8px; }
.tag { display: inline-block; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; border: 1px solid; }
.tag-ok { background: var(--ok-soft); color: var(--ok); border-color: #b7e2c4; }
.tag-erro { background: var(--bad-soft); color: var(--bad); border-color: #f2a7a7; }
.tag-alerta { background: var(--warn-soft); color: var(--warn); border-color: #f5cf9a; }
b.neg { color: var(--bad); }

.ferramentas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 18px; }
.ferramenta { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.ferramenta:hover { text-decoration: none; border-color: var(--brand); box-shadow: 0 6px 18px rgba(31, 94, 255, .12); transform: translateY(-2px); }
.ferramenta .ic { font-size: 34px; line-height: 1; }
.ferramenta b { font-size: 16px; }
.ferramenta span:last-child { color: var(--muted); }

@media (max-width: 600px) {
  .barra { padding: 10px 16px; }
  .barra nav { margin-left: 0; gap: 12px; }
  .tabela { display: block; overflow-x: auto; }
}

/* ===================== Telas de acesso: entrar, esqueci a senha, nova senha (body.pg-login) =====================
   Marca SIA Contábil. Painel escuro da marca à esquerda, formulário à direita. Os tamanhos encolhem com a ALTURA da
   janela (clamp com vh) para não aparecer rolagem; telas baixas escondem a prévia, celular mostra só o formulário. */
body.pg-login { background: #f4f6fa; }
body.pg-login .conteudo { max-width: none; padding: 0; display: flex; }
body.pg-login .rodape { display: none; }   /* o rodapé fica dentro das telas */
.lg { flex: 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); min-height: 100vh; }

/* ---------- painel da marca ---------- */
.lg-marca { position: relative; overflow: hidden; color: #fff; display: flex; padding: clamp(28px, 5.5vh, 64px) clamp(36px, 5vw, 80px);
  background: radial-gradient(ellipse at 0% 0%, rgba(61, 123, 255, .45) 0%, transparent 50%),
              radial-gradient(ellipse at 100% 100%, rgba(18, 168, 112, .22) 0%, transparent 45%),
              linear-gradient(160deg, #0d1f4d 0%, #0a1838 55%, #071129 100%); }
/* quadriculado bem leve (papel de planilha), sumindo para baixo */
.lg-marca::before { content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 44px 44px; -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%); mask-image: linear-gradient(180deg, #000 0%, transparent 85%); }
.lg-marca-in { position: relative; width: 100%; max-width: 560px; margin: 0 auto; display: flex; flex-direction: column; gap: clamp(18px, 3vh, 32px); }
.lg-meio { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: clamp(14px, 2.6vh, 26px); }

/* logo */
.lg-logo { display: flex; align-items: center; gap: 13px; }
.lg-selo { flex: none; width: clamp(42px, 3vw, 48px); height: clamp(42px, 3vw, 48px); border-radius: 13px; display: inline-flex;
  box-shadow: 0 8px 22px rgba(15, 47, 158, .45), inset 0 0 0 1px rgba(255, 255, 255, .12); }
.lg-selo svg { width: 100%; height: 100%; display: block; }
.lg-nome { display: flex; flex-direction: column; line-height: 1.1; }
.lg-nome-1 { font-size: clamp(21px, 1.5vw, 24px); font-weight: 600; letter-spacing: -.3px; }
.lg-nome-1 b { font-weight: 800; letter-spacing: .5px; }
.lg-nome small { margin-top: 4px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .55); }

/* texto */
.lg-etiqueta { align-self: flex-start; font-size: 12px; font-weight: 600; letter-spacing: .02em; color: #bcd2ff; padding: 5px 12px; border-radius: 99px;
  background: rgba(61, 123, 255, .16); border: 1px solid rgba(120, 160, 255, .3); }
.lg-frase { margin: 0; font-size: clamp(26px, min(2.3vw, 4.2vh), 38px); line-height: 1.18; font-weight: 700; letter-spacing: -.8px; }
.lg-frase em { font-style: normal; background: linear-gradient(90deg, #7fb0ff, #5ee0a1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lg-texto { margin: 0; max-width: 500px; font-size: clamp(14px, min(1.05vw, 1.9vh), 16px); line-height: 1.6; color: rgba(255, 255, 255, .72); }

/* prévia (exemplo do resultado) em vidro */
.lg-previa { max-width: 440px; padding: 16px 18px; border-radius: 14px; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lg-previa-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; font-size: 13px; }
.lg-previa-tit { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: rgba(255, 255, 255, .9); }
.lg-previa-tit svg { width: 16px; height: 16px; fill: none; stroke: #7fb0ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-previa-ok { font-size: 12px; font-weight: 700; color: #5ee0a1; background: rgba(94, 224, 161, .12); border: 1px solid rgba(94, 224, 161, .3); border-radius: 99px; padding: 2px 10px; }
.lg-previa-num { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lg-previa-num div { padding: 9px 11px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.lg-previa-num small { display: block; font-size: 11px; color: rgba(255, 255, 255, .55); margin-bottom: 2px; }
.lg-previa-num b { font-size: 17px; font-weight: 700; letter-spacing: -.3px; }
.lg-previa-num div:last-child b { color: #5ee0a1; }
.lg-previa-barra { margin-top: 12px; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.lg-previa-barra span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, #3d7bff, #5ee0a1); }

/* vantagens */
.lg-vantagens { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: clamp(10px, 2vh, 18px); }
.lg-vantagens li { display: flex; gap: 14px; align-items: center; }
.lg-vantagens b { display: block; font-size: clamp(14.5px, min(1.05vw, 1.9vh), 16px); font-weight: 600; margin-bottom: 1px; }
.lg-vantagens span:not(.lg-ic) { color: rgba(255, 255, 255, .62); font-size: clamp(13px, min(.95vw, 1.7vh), 14.5px); }
.lg-ic { flex: none; width: 38px; height: 38px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(61, 123, 255, .16); border: 1px solid rgba(120, 160, 255, .28); }
.lg-ic svg { width: 19px; height: 19px; fill: none; stroke: #bcd2ff; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-rodape { margin: 0; font-size: 12.5px; color: rgba(255, 255, 255, .45); }

/* ---------- formulário ---------- */
.lg-form { display: flex; align-items: center; justify-content: center; padding: clamp(24px, 5vh, 48px) 24px; }
.lg-coluna { width: 100%; max-width: clamp(410px, 28vw, 450px); }
.lg-cartao { background: #fff; border: 1px solid #e6eaf1; border-radius: 18px; padding: clamp(26px, 4.5vh, 40px) clamp(24px, 2.4vw, 38px);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 18px 42px -12px rgba(16, 24, 40, .14); }
.lg-logo-mob { display: none; margin-bottom: 26px; color: var(--ink); }
.lg-logo-mob .lg-nome small { color: var(--muted); }
.lg-cartao h1 { font-size: clamp(24px, min(1.9vw, 3.4vh), 29px); font-weight: 700; letter-spacing: -.6px; margin: 0 0 6px; }
.lg-sub { color: var(--muted); margin: 0 0 clamp(18px, 3vh, 26px); font-size: 15px; line-height: 1.5; }
.lg-sub b { color: var(--ink); }
.lg-campos { display: flex; flex-direction: column; }
.lg-campos > label { font-weight: 600; font-size: 13.5px; margin: 0 0 7px; color: #344054; }
.lg-input { position: relative; margin-bottom: clamp(14px, 2.2vh, 18px); }
.lg-input > svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); width: 19px; height: 19px;
  fill: none; stroke: #98a2b3; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; pointer-events: none; transition: stroke .15s; }
.lg-input input { height: clamp(46px, min(3.3vw, 6vh), 50px); padding: 0 46px 0 46px; font-size: 15.5px; border: 1px solid #d0d5dd; border-radius: 10px;
  background: #fff; transition: border-color .15s, box-shadow .15s; }
.lg-input input::placeholder { color: #a0a8b6; }
.lg-input input:hover { border-color: #b4bccb; }
.lg-input input:focus { outline: none; border-color: #1f5eff; box-shadow: 0 0 0 4px rgba(31, 94, 255, .12); }
.lg-input:focus-within > svg { stroke: #1f5eff; }
.lg-olho { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px;
  background: transparent; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.lg-olho:hover { background: #f1f4f9; filter: none; }
.lg-olho svg { width: 19px; height: 19px; fill: none; stroke: #667085; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-olho.on svg { stroke: #1f5eff; }
.lg-esqueci { align-self: flex-end; margin: -6px 0 16px; font-size: 13.5px; font-weight: 600; }
.lg-entrar { height: clamp(46px, min(3.3vw, 6vh), 50px); margin-top: 4px; font-size: 16px; border-radius: 10px; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(180deg, #2c68ff, #1a52e8); border-color: #1a4fdc;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 8px 20px -6px rgba(31, 94, 255, .45); transition: transform .1s, box-shadow .15s, filter .15s; }
.lg-entrar svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.lg-entrar:hover { box-shadow: 0 1px 2px rgba(16, 24, 40, .08), 0 12px 26px -6px rgba(31, 94, 255, .55); }
.lg-entrar:hover svg { transform: translateX(3px); }
.lg-entrar:active { transform: translateY(1px); }
.lg-entrar.carregando { opacity: .8; cursor: progress; }
/* link com cara de botão ("Voltar para o login", "Pedir um novo link"): mesmo azul do Entrar */
a.lg-botao { color: #fff; font-weight: 600; text-decoration: none; }
a.lg-botao:hover { text-decoration: none; filter: brightness(1.06); }
.lg-voltar { display: inline-block; margin-top: 18px; font-size: 14.5px; font-weight: 600; }
.lg-enviado { width: 56px; height: 56px; border-radius: 14px; background: var(--brand-soft); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.lg-enviado svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-cartao .aviso { margin-bottom: 20px; }
/* rodapé do cartão: conexão segura · suporte */
.lg-ajuda { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: clamp(18px, 3vh, 26px);
  padding-top: clamp(14px, 2.4vh, 20px); border-top: 1px solid #eef1f6; font-size: 13.5px; }
.lg-ajuda a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.lg-ajuda svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-seguro { display: inline-flex; align-items: center; gap: 6px; color: var(--ok); font-weight: 600; }
.lg-pe { margin: 16px 0 0; text-align: center; font-size: 12px; color: #98a2b3; }

/* confirmação "Verifique seu e-mail" (esqueci.php): centralizada e enxuta */
.lg-ok { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 4px 2px; }
.lg-ok-ic { position: relative; width: 64px; height: 64px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--brand-soft); box-shadow: 0 0 0 8px rgba(31, 94, 255, .05); margin-bottom: 22px; }
.lg-ok-ic svg { width: 28px; height: 28px; fill: none; stroke: var(--brand); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg-ok-ic::after { content: "✓"; position: absolute; right: -2px; bottom: -2px; width: 22px; height: 22px; border-radius: 50%; background: #16a34a;
  color: #fff; font-size: 12px; font-weight: 800; line-height: 22px; border: 2px solid #fff; }
.lg-ok h1 { margin: 0 0 8px; }
.lg-ok-txt { margin: 0 0 16px; color: var(--muted); font-size: 15px; line-height: 1.55; max-width: 330px; }
.lg-ok-email { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 14px; border-radius: 99px;
  background: #f4f6fa; border: 1px solid #e6eaf1; font-weight: 600; font-size: 14px; color: var(--ink); margin-bottom: 18px; }
.lg-ok-nota { margin: 0 0 24px; font-size: 13px; color: #98a2b3; line-height: 1.5; max-width: 320px; }
.lg-ok-voltar { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14.5px; padding: 8px 14px; border-radius: 9px; }
.lg-ok-voltar:hover { background: var(--brand-soft); text-decoration: none; }
.lg-ok-voltar svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* telas baixas: sem a prévia (não rola) */
@media (max-height: 760px) { .lg-previa { display: none; } }
@media (max-width: 1100px) { .lg-previa { display: none; } }
/* celular / janela estreita: só o formulário, com o logo em cima */
@media (max-width: 900px) {
  .lg { grid-template-columns: 1fr; }
  .lg-marca { display: none; }
  .lg-logo-mob { display: flex; }
  .lg-form { align-items: flex-start; padding: 32px 16px; min-height: 100vh; }
}
@media (prefers-reduced-motion: reduce) { .lg-entrar, .lg-entrar svg, .lg-input input, .lg-input > svg { transition: none; } }
