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

:root {
  --blue: #2d4fc4;
  --blue-dark: #1e3a9f;
  --blue-hover: #2545b0;
  --white: #ffffff;
  --bg-right: #f5f6fa;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --radius: 10px;
}

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-right);
}

/* ── LAYOUT ── */
.login-layout {
  display: flex;
  min-height: 100vh;
}

/* ── LEFT PANEL ── */
.login-left {
  flex: 0 0 51%;
  background: linear-gradient(160deg, #2d4fc4 0%, #1a318f 100%);
  display: flex;
  align-items: center;
  padding: 60px 72px;
}

.left-content { max-width: 420px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 56px;
}

.brand-icon {
  width: 42px;
  height: 42px;
  background: rgba(255,255,255,.15);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  color: var(--white);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .5px;
}

.hero-tagline {
  color: rgba(255,255,255,.85);
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: 48px;
}

.features { list-style: none; display: flex; flex-direction: column; gap: 22px; }

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.feature-icon {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,.12);
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.feature-item div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.feature-item strong {
  color: var(--white);
  font-size: 14.5px;
  font-weight: 600;
}

.feature-item span {
  color: rgba(255,255,255,.65);
  font-size: 13px;
  line-height: 1.4;
}

/* ── RIGHT PANEL ── */
.login-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  background: var(--bg-right);
}

.login-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 42px 44px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 28px;
  text-align: center;
}

/* FORM */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 18px;
}

.field-group label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}

.field-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

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

.field-group input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(45,79,196,.12);
}

.field-group input.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.password-wrap { position: relative; }

.password-wrap input { padding-right: 42px; }

.toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  transition: color .15s;
}
.toggle-pwd:hover { color: var(--text); }

/* ALERT */
.alert {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 16px;
}

.alert-error {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid #fecaca;
}

/* BUTTON */
.btn-entrar {
  width: 100%;
  padding: 12px;
  background: var(--blue);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background .15s, transform .1s;
  margin-top: 4px;
}

.btn-entrar:hover:not(:disabled) { background: var(--blue-hover); }
.btn-entrar:active:not(:disabled) { transform: scale(.99); }
.btn-entrar:disabled { opacity: .7; cursor: not-allowed; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .8s linear infinite; }

/* SUBTITLE */
.card-subtitle {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-top: -14px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* SUCCESS */
.success-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  margin-top: 8px;
}

/* BACK BUTTON */
.btn-back {
  width: 100%;
  padding: 11px;
  background: none;
  color: var(--blue);
  border: 1.5px solid var(--blue);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  margin-top: 16px;
  transition: background .15s;
}
.btn-back:hover { background: rgba(45,79,196,.06); }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .login-left { display: none; }
  .login-right { background: var(--white); padding: 24px 20px; }
  .login-card { box-shadow: none; border: none; padding: 20px 8px; }
}
