/* ==========================================================================
   ISSOLUTEC — Telas de login (Área do Cliente e Painel Administrativo)
   CSS compartilhado. Variação por tela via classe no <body>:
     .login--cliente  → acento azul da marca
     .login--admin    → acento escuro (navy)
   ========================================================================== */

@font-face { font-family: "Geist"; src: url("../fonts/Geist-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-Medium.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist"; src: url("../fonts/Geist-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("../fonts/GeistMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }

:root {
  /* Base */
  --ink: #0B101B;            /* texto principal */
  --ink-2: #3A404C;          /* texto secundário forte */
  --muted: #4A5160;          /* parágrafos de apoio */
  --subtle: #5B6270;         /* rótulos pequenos, rodapé */
  --line: #C9CCD2;           /* borda dos campos */
  --surface: #FFFFFF;        /* fundo do formulário */

  /* Marca */
  --brand: #1D5EA8;          /* azul ISSOLUTEC (botão/links cliente) */
  --brand-hover: #174C88;
  --brand-mark: #2E7BC6;     /* quadradinho do rótulo, anel de foco */
  --focus-ring: rgba(46, 123, 198, .2);

  /* Painel visual */
  --panel-bg: #0A0D12;
  --panel-text: #FFFFFF;
  --panel-muted: #D5DCE6;

  /* Acento por tela (sobrescrito abaixo) */
  --accent: var(--brand);
  --accent-hover: var(--brand-hover);
  --accent-mark: var(--brand-mark);

  --radius: 10px;
  --font-sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "Geist Mono", ui-monospace, "SFMono-Regular", monospace;
}

.login--admin {
  --accent: #0B101B;
  --accent-hover: #1C2433;
  --accent-mark: #0B101B;
  --panel-bg: #07090C;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--ink); text-decoration: underline; }

/* ---------- Layout ---------- */
.login {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;               /* no celular o painel desce para baixo do formulário */
}

.login__form-col {
  flex: 1 1 540px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 40px clamp(24px, 5vw, 72px);
}

.login__eyebrow {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--subtle);
}
.login__eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  background: var(--accent-mark);
}

.login__body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 56px 0;
}

.login__form {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
}

.login__title {
  margin: 0;
  font-size: 40px;
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.login__lead {
  margin: 12px 0 40px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
}

/* ---------- Campos ---------- */
.field-label {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 8px;
}
.field-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 22px 0 8px;
}
.field-row .field-label { margin: 0; }
.field-row a { font-size: 13px; }

.field {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.field[aria-invalid="true"] { border-color: #B42318; }

.password { position: relative; }
.password .field { padding-right: 52px; }
.password__toggle {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--subtle);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.password__toggle .icon-hide { display: none; }
.password__toggle[aria-pressed="true"] .icon-show { display: none; }
.password__toggle[aria-pressed="true"] .icon-hide { display: block; }

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 28px;
  min-height: 24px;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.checkbox input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

/* ---------- Botão ---------- */
.btn-primary {
  height: 52px;
  border: 0;
  border-radius: var(--radius);
  background: var(--accent);
  color: #FFFFFF;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}
.btn-primary:hover { background: var(--accent-hover); }
.btn-primary:disabled { opacity: .6; cursor: progress; }

.password__toggle:focus-visible,
.btn-primary:focus-visible {
  outline: 2px solid var(--brand-mark);
  outline-offset: 2px;
}

/* ---------- Mensagens ---------- */
.login__alert {
  margin: 0 0 24px;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: #FEF3F2;
  border: 1px solid #FECDCA;
  color: #912018;
  font-size: 14px;
  line-height: 1.45;
}
.login__alert[hidden] { display: none; }

.login__note {
  margin: 28px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
}

.login__footer {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  font-size: 13px;
  color: var(--subtle);
}

/* ---------- Painel visual ---------- */
.login__panel {
  flex: 999 1 560px;
  min-width: 0;
  min-height: 520px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 40px clamp(24px, 5vw, 72px);
  background: var(--panel-bg);
  color: var(--panel-text);
}
.login__panel > picture { position: absolute; inset: 0; }
.login__panel-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 40% 50%;
  display: block;
}
.login__logo {
  position: relative;
  width: 176px;
  height: auto;
  display: block;
}
.login__message {
  position: relative;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.login__headline {
  margin: 0;
  font-size: clamp(34px, 3.6vw, 54px);
  line-height: 1.04;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.login__sub {
  margin: 0;
  max-width: 420px;
  font-size: 17px;
  line-height: 1.5;
  color: var(--panel-muted);
}

/* Celular: painel menor embaixo do formulário */
@media (max-width: 640px) {
  .login__panel { min-height: 380px; }
  .login__body { padding: 40px 0; }
  .login__title { font-size: 34px; }
}

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

/* ---------- Integração com o Painel (acréscimos ao modelo aprovado) ---------- */
/* Mensagem de sucesso (ex.: "sessão encerrada"), mesma caixa do alerta em verde. */
.login__alert--ok { background: #ECFDF3; border-color: #ABEFC6; color: #085D3A; }
/* Área do Cliente sem "Manter conectado": mantém o respiro entre a senha e o botão. */
.login__spacer { height: 28px; }
/* Primeiro acesso: segunda linha de apoio logo abaixo da primeira, dica sob o campo e botão como link. */
.login__note--sub { margin-top: 10px; }
.field-hint { margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--subtle); }
.field + .field-label, .password + .field-label, .field-hint + .field-label { margin-top: 22px; }
a.btn-primary { text-decoration: none; }
.login__account { margin: -16px 0 28px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.login__account strong { color: var(--ink); font-weight: 500; }
