@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --auth-bg: #0b1224;
  --auth-primary: #2563eb;
  --auth-primary-hover: #1d4ed8;
  --auth-accent: #6366f1;
  --auth-text: #0f172a;
  --auth-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-card: #ffffff;
  --auth-radius: 16px;
  --auth-radius-sm: 12px;
  --auth-shadow: 0 4px 24px rgba(15, 23, 42, 0.08);
  --auth-focus: 0 0 0 3px color-mix(in srgb, var(--auth-primary) 22%, transparent);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body.auth-body {
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--auth-text);
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

.auth-shell {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 1fr;
}

@media (min-width: 960px) {
  .auth-shell {
    grid-template-columns: minmax(380px, 1.05fr) minmax(420px, 1fr);
  }
}

/* —— Painel esquerdo (brand) —— */
.auth-brand {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--auth-primary-hover) 88%, #020617) 0%,
    color-mix(in srgb, var(--auth-primary) 75%, #0f172a) 45%,
    color-mix(in srgb, var(--auth-accent) 40%, #0b1224) 100%
  );
  color: #fff;
  padding: 2rem 2.5rem;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

@media (min-width: 960px) {
  .auth-brand {
    min-height: 100vh;
    padding: 2.5rem 3rem;
  }
}

.auth-brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, black 40%, transparent 100%);
}

.auth-brand-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  opacity: 0.5;
}

.auth-brand-glow--1 {
  width: 320px;
  height: 320px;
  top: -80px;
  right: -60px;
  background: color-mix(in srgb, var(--auth-accent) 55%, transparent);
}

.auth-brand-glow--2 {
  width: 260px;
  height: 260px;
  bottom: 10%;
  left: -80px;
  background: color-mix(in srgb, var(--auth-primary) 45%, transparent);
}

.auth-brand-top,
.auth-hero,
.auth-brand-footer {
  position: relative;
  z-index: 1;
}

.auth-brand-top {
  margin-bottom: 2rem;
}

.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.auth-logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-logo-img {
  max-height: 40px;
  max-width: 150px;
  object-fit: contain;
}

.auth-logo-img--sm {
  max-height: 32px;
  max-width: 120px;
}

.auth-logo-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--auth-primary), var(--auth-accent));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
  font-size: 1rem;
  flex-shrink: 0;
}

.auth-logo-icon--sm {
  width: 2.15rem;
  height: 2.15rem;
  font-size: 0.9rem;
}

.auth-hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  max-width: 26rem;
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  color: #e2e8f0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

.auth-hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-hero > p {
  margin: 0;
  color: rgba(226, 232, 240, 0.88);
  line-height: 1.6;
  font-size: 0.9375rem;
}

.auth-feature-grid {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.75rem;
}

@media (min-width: 960px) {
  .auth-feature-grid {
    margin-top: auto;
    padding-top: 2rem;
  }
}

.auth-feature-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  border-radius: var(--auth-radius-sm);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(6px);
}

.auth-feature-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
}

.auth-feature-icon i {
  display: block;
  line-height: 1;
}

.auth-feature-card strong {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.15rem;
}

.auth-feature-card > div span {
  display: block;
  font-size: 0.78rem;
  color: rgba(203, 213, 225, 0.85);
  line-height: 1.4;
}

.auth-brand-footer {
  margin: 1.5rem 0 0;
  font-size: 0.75rem;
  color: rgba(148, 163, 184, 0.75);
}

@media (max-width: 959px) {
  .auth-brand-footer,
  .auth-feature-grid {
    display: none;
  }

  .auth-hero h1 {
    font-size: 1.35rem;
  }

  .auth-hero > p {
    font-size: 0.875rem;
  }
}

/* —— Painel direito (formulário) —— */
.auth-main {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.75rem 1.25rem 2rem;
  overflow: hidden;
}

.auth-main-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 100% 0%, color-mix(in srgb, var(--auth-primary) 8%, transparent), transparent 55%),
    radial-gradient(ellipse 60% 40% at 0% 100%, color-mix(in srgb, var(--auth-accent) 6%, transparent), transparent 50%),
    #f1f5f9;
  pointer-events: none;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  padding: 1.75rem 1.65rem;
  box-shadow: var(--auth-shadow);
}

@media (min-width: 480px) {
  .auth-card {
    padding: 2rem 1.85rem;
  }
}

.auth-mobile-header {
  margin-bottom: 1.25rem;
}

@media (min-width: 960px) {
  .auth-mobile-header {
    display: none;
  }
}

.auth-mobile-logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-mobile-logo strong {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-card-header {
  margin-bottom: 1.5rem;
}

.auth-card-header h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.auth-card-header p {
  margin: 0;
  color: var(--auth-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-card-footer {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--auth-border);
  text-align: center;
}

/* —— Alertas —— */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--auth-radius-sm);
  font-size: 0.875rem;
  line-height: 1.45;
  margin-bottom: 1.15rem;
}

.auth-alert i {
  margin-top: 0.1rem;
  flex-shrink: 0;
}

.auth-alert--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.auth-alert--success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}

.auth-alert--info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

/* —— Campos —— */
.auth-field {
  margin-bottom: 1.15rem;
}

.auth-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
}

.auth-input-wrap {
  position: relative;
  width: 100%;
}

.auth-input-wrap > i {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 0.875rem;
  pointer-events: none;
  z-index: 1;
}

.auth-input-wrap:has(.auth-toggle-password) .auth-input {
  padding-right: 3rem;
}

.auth-input {
  width: 100%;
  padding: 0.8rem 1rem 0.8rem 2.6rem;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  font: inherit;
  font-size: 0.9375rem;
  color: var(--auth-text);
  background: #fff;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-input::placeholder {
  color: #94a3b8;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: var(--auth-focus);
}

.auth-toggle-password {
  position: absolute;
  right: 0.45rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.auth-toggle-password i {
  position: static;
  transform: none;
  pointer-events: none;
  font-size: 0.875rem;
}

.auth-toggle-password:hover {
  color: var(--auth-primary);
  background: color-mix(in srgb, var(--auth-primary) 8%, transparent);
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 0.15rem 0 1.35rem;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #475569;
  cursor: pointer;
  user-select: none;
}

.auth-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--auth-primary);
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  border: 0;
  border-radius: var(--auth-radius-sm);
  padding: 0.9rem 1rem;
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--auth-primary), color-mix(in srgb, var(--auth-primary-hover) 85%, var(--auth-accent)));
  box-shadow: 0 8px 24px color-mix(in srgb, var(--auth-primary) 35%, transparent);
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-submit:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 12px 28px color-mix(in srgb, var(--auth-primary) 40%, transparent);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  color: var(--auth-muted);
  text-decoration: none;
  font-size: 0.8125rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.auth-back:hover {
  color: var(--auth-primary);
}
