/* core/static/css/auth.css */

:root{
  /* Usa tokens já existentes em base.css (se existirem) e define fallback */
  --auth-bg: var(--bg, #eef2f6);
  --auth-card: var(--card, #ffffff);
  --auth-text: var(--text, #0f172a);
  --auth-muted: var(--muted, #64748b);
  --auth-border: var(--border, #e5e7eb);

  --auth-brand: var(--blue, #1f7a8c);
  --auth-brand-hover: #176472;

  --auth-shadow: 0 12px 36px rgba(15, 23, 42, .15);
  --auth-radius: 12px;

  --auth-danger: #ef4444;

  --auth-btn-secondary-bg: #0f172a;
  --auth-btn-secondary-hover: #0b1220;

  --auth-info-bg: #eff6ff;
  --auth-info-border: #bfdbfe;
  --auth-info-text: #1e3a8a;

  --auth-warn-bg: #fffbeb;
  --auth-warn-border: #fcd34d;
  --auth-warn-text: #92400e;
}

.auth-page{
  min-height: 100vh;
  background: var(--auth-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* Card principal */
.auth-shell{
  width: min(1000px, 94vw);
  height: min(92vh, 720px); /* <- controla altura “fixa” do card */
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
  display: flex;
  background: var(--auth-card);
}

/* Coluna da imagem: fica fixa (sem scroll) */
.auth-image{
  flex: 1;
  position: relative;
  background: url("../img/back_segv.jpeg") no-repeat center center;
  background-size: cover;
  min-width: 380px;
}

.auth-company-logo{
  position: absolute;
  bottom: 20px;
  left: 20px;
  width: 130px;
  height: auto;
  opacity: 0.9;
}

/* Coluna do formulário */
.auth-form{
  width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;

  /* Aqui está o requisito: SCROLL APENAS NO FORM */
  overflow-y: auto;
  height: 100%;
  padding: clamp(28px, 4vw, 44px);
}

/* Conteúdo interno com largura controlada */
.auth-form-inner{
  width: 100%;
  max-width: 360px;
}

.auth-header{
  text-align: center;
  margin-bottom: 18px;
}

.auth-logo{
  width: 100px;
  height: auto;
  margin-bottom: 14px;
  opacity: 0.95;
}

.auth-title{
  font-size: 24px;
  margin: 0 0 28px 0;
  letter-spacing: .2px;
  color: var(--auth-brand);
  font-weight: 800;
}

.auth-subtitle{
  color: var(--auth-muted);
  font-size: 15px;
  margin-bottom: 12px;
}

/* Alertas */
.auth-alert{
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.35;
}
.auth-alert-info{
  background: var(--auth-info-bg);
  border-color: var(--auth-info-border);
  color: var(--auth-info-text);
}
.auth-alert-warn{
  background: var(--auth-warn-bg);
  border-color: var(--auth-warn-border);
  color: var(--auth-warn-text);
}
.auth-alert-danger{
  background: #fee2e2;
  border-color: #fca5a5;
  color: #b91c1c;
}

/* Botões “auth” (sem colidir com .btn do Bootstrap) */
.auth-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 12px 20px;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 800;
  letter-spacing: .2px;
  cursor: pointer;
  transition: background .2s ease, transform .1s ease;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .12);
  text-decoration: none;
  user-select: none;
}

.auth-btn i{ margin-left: 8px; opacity: .95; }

.auth-btn-primary{
  background: var(--auth-brand);
  box-shadow: 0 4px 12px rgba(31, 122, 140, .25);
}
.auth-btn-primary:hover{ background: var(--auth-brand-hover); }
.auth-btn-primary:active{ transform: translateY(1px); }

.auth-btn-secondary{
  background: var(--auth-btn-secondary-bg);
}
.auth-btn-secondary:hover{ background: var(--auth-btn-secondary-hover); }
.auth-btn-secondary:active{ transform: translateY(1px); }

.auth-helper{
  margin-top: 14px;
  text-align: center;
  color: var(--auth-muted);
  font-size: 13px;
}
.auth-helper a{
  color: var(--auth-brand);
  text-decoration: none;
  font-weight: 700;
}
.auth-helper a:hover{ text-decoration: underline; }

/* Access guide (login_choice) */
.auth-guide{
  background: #f8fafc;
  border: 1px solid var(--auth-border);
  border-radius: 10px;
  padding: 14px 16px;
}
.auth-guide-label{
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .7px;
  text-transform: uppercase;
  color: var(--auth-muted);
  margin: 0 0 10px;
}
.auth-guide-item{
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-left-width: 3px;
  border-radius: 8px;
  padding: 9px 12px;
}
.auth-guide-icon{ font-size: 14px; flex-shrink: 0; }
.auth-guide-name{
  font-weight: 700;
  font-size: 13px;
  color: var(--auth-text);
  margin-right: 6px;
}
.auth-guide-desc{
  font-size: 12px;
  color: var(--auth-muted);
}

/* Responsivo */
@media (max-width: 900px){
  .auth-shell{
    flex-direction: column;
    width: min(440px, 94vw);
    height: auto;
    max-height: 92vh;
  }
  .auth-image{ display:none; }
  .auth-form{
    width: 100%;
    max-height: 92vh;
  }
}
