/* ===================================================
   GestãoPadrões — Auth CSS
   Baseado em Bootstrap 5 + customizações
=================================================== */

:root {
  --primary:        #1e40af;
  --primary-hover:  #1d3a9e;
  --primary-light:  #dbeafe;
  --secondary:      #0f766e;
  --accent:         #06b6d4;
  --success:        #059669;
  --danger:         #dc2626;
  --warning:        #d97706;
  --bg-brand:       linear-gradient(145deg, #0f172a 0%, #1e3a5f 50%, #0f766e 100%);
  --bg-form:        #f8fafc;
  --white:          #ffffff;
  --gray-50:        #f8fafc;
  --gray-100:       #f1f5f9;
  --gray-200:       #e2e8f0;
  --gray-400:       #94a3b8;
  --gray-600:       #475569;
  --gray-800:       #1e293b;
  --radius:         12px;
  --radius-sm:      8px;
  --shadow-sm:      0 1px 3px rgba(0,0,0,.08);
  --shadow-md:      0 4px 16px rgba(0,0,0,.10);
  --shadow-lg:      0 8px 32px rgba(0,0,0,.14);
  --transition:     all .2s ease;
}

* { box-sizing: border-box; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg-form);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  color: var(--gray-800);
}

/* ── Layout ────────────────────────────────── */

.auth-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Painel esquerdo (brand) */
.auth-brand {
  width: 45%;
  background: var(--bg-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.auth-brand::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(6,182,212,.15) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-brand::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(30,64,175,.2) 0%, transparent 70%);
  border-radius: 50%;
}

.brand-content {
  position: relative;
  z-index: 1;
  max-width: 420px;
}

/* Painel direito (formulário) */
.auth-form-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow-y: auto;
  background: var(--white);
}

.auth-form-container {
  width: 100%;
  max-width: 440px;
  padding: 1rem 0;
}

/* ── Brand elements ────────────────────────── */

.brand-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.brand-logo i {
  font-size: 2rem;
  color: var(--accent);
}

.brand-logo span {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: -.3px;
}

.brand-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: .75rem;
}

.brand-subtitle {
  color: rgba(255,255,255,.65);
  font-size: .95rem;
  line-height: 1.6;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: rgba(255,255,255,.85);
  font-size: .9rem;
  margin-bottom: .5rem;
}

.feature-item i {
  color: #34d399;
  font-size: 1rem;
  flex-shrink: 0;
}

.badge-iso {
  display: inline-block;
  background: rgba(255,255,255,.12);
  color: rgba(255,255,255,.9);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 20px;
  padding: .3rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  margin-right: .5rem;
  margin-top: .25rem;
}

/* ── Mobile logo ───────────────────────────── */

.mobile-logo {
  align-items: center;
  gap: .6rem;
}

.mobile-logo i {
  font-size: 1.6rem;
  color: var(--primary);
}

.mobile-logo span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gray-800);
}

/* ── Form Header ───────────────────────────── */

.form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: .25rem;
}

.form-subtitle {
  font-size: .9rem;
}

.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }

/* ── Input Groups ──────────────────────────── */

.input-group-custom .input-group-text {
  background: var(--gray-50);
  border-color: var(--gray-200);
  color: var(--gray-400);
  border-right: none;
}

.input-group-custom .form-control,
.input-group-custom .form-select {
  border-color: var(--gray-200);
  background: var(--gray-50);
  font-size: .9rem;
  padding: .6rem .9rem;
  transition: var(--transition);
}

.input-group-custom .form-control:focus,
.input-group-custom .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,.1);
  background: var(--white);
  z-index: 1;
}

.form-control-custom {
  border-color: var(--gray-200);
  background: var(--gray-50);
  font-size: .9rem;
  padding: .6rem .9rem;
  border-radius: var(--radius-sm) !important;
  transition: var(--transition);
}

.form-control-custom:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(30,64,175,.1);
  background: var(--white);
}

.toggle-password {
  border-color: var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-400);
  border-left: none;
  transition: var(--transition);
}

.toggle-password:hover {
  background: var(--gray-100);
  color: var(--primary);
}

/* ── Botão principal ───────────────────────── */

.btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-auth {
  padding: .7rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: .95rem;
}

/* ── Links ─────────────────────────────────── */

.forgot-link {
  font-size: .82rem;
  color: var(--primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
}

.forgot-link:hover { color: var(--primary-hover); text-decoration: underline; }

.register-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.register-link:hover { color: var(--primary-hover); text-decoration: underline; }

.back-link {
  color: var(--gray-600);
  text-decoration: none;
  font-size: .88rem;
  transition: var(--transition);
}

.back-link:hover { color: var(--primary); }

/* ── Divider ───────────────────────────────── */

.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--gray-400);
  font-size: .82rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-200);
}

/* ── Password Strength ─────────────────────── */

.strength-bar {
  height: 4px;
  background: var(--gray-200);
  border-radius: 10px;
  overflow: hidden;
}

.strength-fill {
  height: 100%;
  border-radius: 10px;
  width: 0;
  transition: width .4s ease, background .4s ease;
}

.strength-label {
  font-size: .78rem;
  color: var(--gray-600);
}

/* ── Password Requirements ─────────────────── */

.password-requirements {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .25rem;
}

.req-item {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .78rem;
  color: var(--gray-400);
  transition: color .2s;
}

.req-item.valid {
  color: var(--success);
}

.req-item i {
  font-size: .75rem;
}

/* ── Icon Header ───────────────────────────── */

.icon-header {
  width: 56px;
  height: 56px;
  background: var(--primary-light);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icon-header i {
  font-size: 1.6rem;
  color: var(--primary);
}

/* ── Success Animation ─────────────────────── */

.success-animation {
  display: flex;
  justify-content: center;
}

.success-circle {
  width: 80px;
  height: 80px;
  background: #d1fae5;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: popIn .4s cubic-bezier(.175,.885,.32,1.275);
}

.success-circle i {
  font-size: 2.2rem;
  color: var(--success);
}

@keyframes popIn {
  from { transform: scale(0); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.error-circle {
  width: 80px;
  height: 80px;
  background: #fee2e2;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}

.error-circle i {
  font-size: 2.2rem;
  color: var(--danger);
}

/* ── Security Info (forgot page) ───────────── */

.security-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  background: rgba(255,255,255,.07);
  border-radius: var(--radius-sm);
  padding: .75rem 1rem;
  margin-bottom: .6rem;
  border: 1px solid rgba(255,255,255,.1);
}

.security-card i {
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  margin-top: .1rem;
}

.security-card strong {
  display: block;
  color: var(--white);
  font-size: .88rem;
}

.security-card p {
  color: rgba(255,255,255,.55);
  font-size: .78rem;
  margin: 0;
}

/* ── Password Tips ─────────────────────────── */

.tip-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  margin-bottom: .4rem;
}

.tip-item i.bi-check2 { color: #34d399; }
.tip-item i.bi-x      { color: #f87171; }
.tip-item span         { color: rgba(255,255,255,.75); }

/* ── Form Section Divider ──────────────────── */

.form-section-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .6px;
  border-bottom: 1px solid var(--primary-light);
  padding-bottom: .5rem;
}

.form-section-title i {
  font-size: 1rem;
}

/* ── Footer ────────────────────────────────── */

.auth-footer {
  border-top: 1px solid var(--gray-100);
  padding-top: 1rem;
}

/* ── Responsive ────────────────────────────── */

@media (max-width: 991.98px) {
  .auth-wrapper {
    flex-direction: column;
  }
  .auth-form-panel {
    padding: 2rem 1.25rem;
    min-height: 100vh;
  }
}

@media (max-width: 575.98px) {
  .auth-form-container {
    padding: .5rem 0;
  }
  .form-title {
    font-size: 1.3rem;
  }
  .password-requirements {
    grid-template-columns: 1fr;
  }
}