:root {
  --bg-panel: #0a0a0f;
  --bg-field: #14141c;
  --border-field: #2a2a38;
  --text-primary: #f4f4f8;
  --text-muted: #9b9bb0;
  --accent: #7c3aed;
  --accent-hover: #6d28d9;
  --accent-glow: rgba(124, 58, 237, 0.35);
  --error: #f43f5e;
  --success: #22c55e;
  --info: #60a5fa;
  --hero-bg: #070b14;
}

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

html,
body {
  min-height: 100%;
}

body.login-page {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  background: var(--bg-panel);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

/* ── Painel do formulário ── */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 2rem;
  background: var(--bg-panel);
}

.login-panel-inner {
  width: 100%;
  max-width: 420px;
}

.login-brand {
  margin-bottom: 2.5rem;
}

.login-brand-logo {
  max-height: 44px;
  max-width: 200px;
  width: auto;
  object-fit: contain;
}

.auth-title {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
  line-height: 1.2;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

.field-group {
  margin-bottom: 1.25rem;
}

.field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.45rem;
}

.field-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.field-icon {
  position: absolute;
  left: 14px;
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0.7;
  pointer-events: none;
  z-index: 1;
}

.field-input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 42px;
  background: var(--bg-field);
  border: 1px solid var(--border-field);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.field-wrap:not(:has(.field-icon)) .field-input {
  padding-left: 14px;
}

.field-input::placeholder {
  color: #5c5c72;
}

.field-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.field-input:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.field-toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  line-height: 1;
  border-radius: 6px;
}

.field-toggle-pwd:hover {
  color: var(--text-primary);
}

.options-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.25rem 0 1.5rem;
  flex-wrap: wrap;
}

.remember {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.remember input {
  accent-color: var(--accent);
  width: 16px;
  height: 16px;
}

.btn-forgot {
  font-size: 0.85rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
}

.btn-forgot:hover {
  text-decoration: underline;
}

.btn-submit {
  width: 100%;
  height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-submit:hover:not(:disabled) {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s;
}

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

.message-container {
  display: block;
  margin-top: 1rem;
  margin-bottom: 1rem;
}

.alert-msg {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  line-height: 1.4;
}

.alert-msg.error {
  background: rgba(244, 63, 94, 0.12);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.25);
}

.alert-msg.success {
  background: rgba(34, 197, 94, 0.12);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.alert-msg.info {
  background: rgba(96, 165, 250, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(96, 165, 250, 0.25);
}

.auth-footer-link {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.auth-footer-link .btn-register {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  margin-left: 0.25rem;
}

.auth-footer-link .btn-register:hover {
  text-decoration: underline;
}

.links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.links.justify-content-center {
  justify-content: center;
}

.links a {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.links a:hover {
  color: var(--accent);
}

/* 2FA */
.code-container {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.code-input {
  width: 46px;
  height: 54px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
  background: var(--bg-field);
  border: 1px solid var(--border-field);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
}

.code-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.block-timer-text {
  color: var(--error) !important;
  text-align: center;
  margin-bottom: 1rem;
}

.register-success {
  text-align: center;
}

.success-icon-wrap {
  font-size: 3rem;
  color: var(--success);
  margin-bottom: 1rem;
}

/* ── Hero lateral ── */
.login-hero {
  position: relative;
  overflow: hidden;
  background: var(--hero-bg);
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 3rem;
}

.hero-visual {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.hero-mesh {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(124, 58, 237, 0.25), transparent 60%),
    radial-gradient(ellipse 50% 40% at 30% 70%, rgba(59, 130, 246, 0.2), transparent 55%),
    linear-gradient(160deg, #0c1222 0%, #070b14 50%, #0a0618 100%);
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.7;
}

.hero-orb-1 {
  width: 320px;
  height: 320px;
  background: #4c1d95;
  top: 10%;
  right: 15%;
  animation: float 8s ease-in-out infinite;
}

.hero-orb-2 {
  width: 240px;
  height: 240px;
  background: #1d4ed8;
  bottom: 25%;
  left: 10%;
  animation: float 10s ease-in-out infinite reverse;
}

.hero-orb-3 {
  width: 180px;
  height: 180px;
  background: #7c3aed;
  top: 50%;
  left: 40%;
  animation: float 12s ease-in-out infinite 1s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -18px) scale(1.05); }
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 480px;
  text-align: right;
}

.hero-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.03em;
  margin-bottom: 1rem;
}

.hero-gradient {
  display: block;
  background: linear-gradient(135deg, #a78bfa 0%, #c084fc 40%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-text {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.6;
}

/* ── Responsivo ── */
@media (max-width: 960px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-hero {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 2rem 1.25rem;
  }
}

@media (max-width: 400px) {
  .auth-title {
    font-size: 1.45rem;
  }

  .code-input {
    width: 40px;
    height: 48px;
    font-size: 1.1rem;
  }

  .code-container {
    gap: 0.35rem;
  }
}
