/* ── Auth layout ── */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: center;
  min-height: calc(100vh - 3rem);
  padding: 1rem 0;
}

.auth-brand-mobile {
  display: none;
  margin-bottom: 1.25rem;
}

@media (max-width: 860px) {
  .auth-layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-panel {
    display: none;
  }

  .auth-brand-mobile {
    display: flex;
    justify-content: center;
  }
}

.auth-panel {
  display: grid;
  gap: 1.5rem;
  padding: 2rem;
  position: relative;
}

.auth-panel h2 {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
  line-height: 1.15;
}

.auth-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  max-width: 36ch;
}

.auth-illustration {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.auth-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.badge--accent {
  color: var(--accent-2);
  border-color: rgba(34, 211, 238, 0.25);
  background: rgba(34, 211, 238, 0.08);
}

.badge--warn {
  color: #f59e0b;
  border-color: rgba(245, 158, 11, 0.25);
  background: rgba(245, 158, 11, 0.1);
  font-size: 0.72rem;
  padding: 0.2rem 0.5rem;
  vertical-align: middle;
}

/* ── Cards & forms ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 2rem;
  width: 100%;
  backdrop-filter: blur(20px);
}

.card-glow {
  position: relative;
}

.card-glow::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent), var(--accent-3), var(--accent-2));
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.35;
  pointer-events: none;
}

.card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.card p.subtitle {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: grid;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.input-wrap {
  position: relative;
}

.input-wrap svg {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--muted);
  pointer-events: none;
}

input,
select,
textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 18, 0.85);
  color: var(--text);
  font: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

input:not(.input-wrap input) {
  padding-left: 0.95rem;
}

.input-wrap input {
  padding-left: 2.6rem;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.message {
  min-height: 1.25rem;
  font-size: 0.88rem;
}

.message.error {
  color: var(--danger);
}

.message.success {
  color: var(--success);
}

.footer-note {
  margin-top: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.88rem;
  text-align: center;
}

/* ── Auth divider & Google button ── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0;
  color: var(--muted);
  font-size: 0.82rem;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-google:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--glow);
}

.forgot-link {
  margin-bottom: 0.5rem;
}

.password-section {
  margin-top: 1.5rem;
  max-width: 100%;
}

.password-section form {
  margin-top: 0.75rem;
  display: grid;
  gap: 0.85rem;
}

.password-section .btn {
  justify-self: start;
}

[data-theme="light"] .auth-panel {
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08);
}
