:root {
  --primary:  #164274;
  --accent:   #0093d2;
  --light:    #ffffff;
  --ring:     0 0 0 3px rgba(0, 147, 210, 0.22);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body { height: 100%; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--primary);
  color: #111827;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
}

/* ══════════════════════════════════════════
   LADO ESQUERDO — Marca
══════════════════════════════════════════ */
.brand-side {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
  overflow: hidden;

  background-image:
    linear-gradient(
      160deg,
      rgba(8, 20, 42, 0.94) 0%,
      rgba(18, 50, 100, 0.85) 55%,
      rgba(0, 100, 180, 0.80) 100%
    ),
    url("/assets/BG-Login.png");
  background-size: cover;
  background-position: 40% 50%;
}

/* Glow sutil no canto superior direito */
.brand-side::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 147, 210, 0.18) 0%, transparent 70%);
  pointer-events: none;
}

/* Glow sutil no canto inferior esquerdo */
.brand-side::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(0, 147, 210, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.brand-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.brand-logo-wrap { display: flex; }

.logo-img {
  max-width: 150px;
  height: auto;
  display: block;
}

.brand-copy h1 {
  font-size: clamp(1.7rem, 2.8vw, 2.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -.02em;
}

.brand-copy p {
  margin-top: 12px;
  color: rgba(255, 255, 255, .65);
  font-size: .95rem;
  line-height: 1.6;
}

/* Feature list */
.features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
  padding: 14px 16px;
  backdrop-filter: blur(4px);
  transition: background .2s;
}

.feature-item:hover {
  background: rgba(255, 255, 255, .10);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: rgba(0, 147, 210, .25);
  color: #5bcfff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.feature-item strong {
  display: block;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  margin-bottom: 2px;
}

.feature-item span {
  color: rgba(255, 255, 255, .55);
  font-size: .78rem;
  line-height: 1.4;
}

/* Stats bar */
.brand-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 12px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.stat strong {
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -.01em;
}

.stat span {
  color: rgba(255, 255, 255, .5);
  font-size: .7rem;
  margin-top: 2px;
}

.stat-divider {
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, .15);
}

/* ══════════════════════════════════════════
   LADO DIREITO — Formulário
══════════════════════════════════════════ */
.form-side {
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 48px);
}

.form-inner {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Header do formulário */
.form-header {
  margin-bottom: 32px;
}

.form-header h2 {
  font-size: 1.75rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -.025em;
}

.form-header p {
  color: #6b7280;
  font-size: .9rem;
  margin-top: 6px;
}

/* Fields */
.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  font-weight: 600;
  font-size: .82rem;
  color: #374151;
  margin-bottom: 7px;
  letter-spacing: .01em;
}

/* Input com ícone */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #9ca3af;
  font-size: .85rem;
  pointer-events: none;
  z-index: 1;
}

.input-wrap input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  font-family: inherit;
  font-size: .9rem;
  color: #111827;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.input-wrap input::placeholder { color: #9ca3af; }

.input-wrap input:focus {
  border-color: var(--accent);
  box-shadow: var(--ring);
}

/* Password toggle */
.password-wrap .peek {
  position: absolute;
  right: 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #9ca3af;
  font-size: .95rem;
  padding: 4px;
  transition: color .15s;
}

.password-wrap .peek:hover { color: var(--primary); }

/* Error messages */
.error {
  display: block;
  font-size: .75rem;
  color: #ef4444;
  margin-top: 5px;
  min-height: 16px;
}

/* Row: remember + forgot */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  font-size: .82rem;
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.checkbox input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}

.link-muted {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: .82rem;
  transition: opacity .15s;
}

.link-muted:hover { opacity: .75; }

/* Submit button */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
  color: #fff;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .01em;
  box-shadow: 0 4px 16px rgba(22, 66, 116, .30);
  transition: opacity .15s, transform .1s, box-shadow .15s;
}

.btn-submit:hover:not(:disabled) {
  opacity: .93;
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(22, 66, 116, .38);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-submit i {
  font-size: .85rem;
  transition: transform .2s;
}

.btn-submit:hover:not(:disabled) i {
  transform: translateX(3px);
}

/* Feedback */
.feedback {
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 500;
  text-align: center;
  min-height: 20px;
}

.feedback.ok  { color: #16a34a; }
.feedback.err { color: #ef4444; }

/* Footer */
.form-footer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.form-footer small {
  color: #9ca3af;
  font-size: .75rem;
  line-height: 1.5;
}

/* ══════════════════════════════════════════
   RESPONSIVO
══════════════════════════════════════════ */
@media (max-width: 980px) {
  .wrap {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }

  .form-side {
    order: 1;
    min-height: 100vh;
    padding: 40px 24px;
  }

  .brand-side {
    order: 2;
    min-height: 300px;
    padding: 40px 24px;
  }

  .brand-inner { gap: 24px; }

  .features { gap: 10px; }
}

@media (max-width: 480px) {
  .form-inner { max-width: 100%; }
  .brand-stats { gap: 12px; padding: 12px 14px; }
}
