@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  --bg-primary: #f5f7fb;
  --bg-secondary: #eef2f8;
  --card-bg: rgba(255, 255, 255, 0.92);
  --card-border: rgba(15, 23, 42, 0.08);
  --white: #0f172a;
  --text-soft: #64748b;
  --input-bg: rgba(255, 255, 255, 0.95);
  --input-border: rgba(15, 23, 42, 0.1);
  --accent: #3b82f6;
  --accent-2: #8b5cf6;
  --success: #22c55e;
  --shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
}

body.dark-mode {
  --bg-primary: #06121f;
  --bg-secondary: #0b1b2d;
  --card-bg: rgba(255, 255, 255, 0.08);
  --card-border: rgba(255, 255, 255, 0.14);
  --white: #ffffff;
  --text-soft: #b9c6d3;
  --input-bg: rgba(255, 255, 255, 0.08);
  --input-border: rgba(255, 255, 255, 0.14);
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

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

body {
  font-family: 'Inter', sans-serif;
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.1), transparent 35%),
    radial-gradient(circle at bottom right, rgba(139, 92, 246, 0.1), transparent 30%),
    linear-gradient(135deg, var(--bg-primary), var(--bg-secondary));
  color: var(--white);
  overflow-x: hidden;
  transition: background 0.3s ease, color 0.3s ease;
}

.background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
  opacity: 0.45;
  animation: floatBlob 12s ease-in-out infinite;
}

.blob-1 {
  width: 280px;
  height: 280px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  top: 8%;
  left: 7%;
}

.blob-2 {
  width: 240px;
  height: 240px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  bottom: 10%;
  right: 8%;
  animation-delay: 2s;
}

.blob-3 {
  width: 180px;
  height: 180px;
  background: linear-gradient(135deg, #8b5cf6, #ec4899);
  top: 48%;
  left: 48%;
  animation-delay: 4s;
}

@keyframes floatBlob {
  0%, 100% {
    transform: translateY(0) translateX(0) scale(1);
  }

  50% {
    transform: translateY(-18px) translateX(10px) scale(1.05);
  }
}

.page-tools {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 30;
}

.theme-toggle-btn {
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--white);
  width: 48px;
  height: 48px;
  border-radius: 14px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: var(--shadow);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 1120px;
  min-height: 680px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 32px;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}

.auth-info {
  padding: 70px 56px;
  background:
    linear-gradient(160deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02)),
    linear-gradient(135deg, rgba(59,130,246,0.14), rgba(139,92,246,0.08));
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid var(--card-border);
  margin-bottom: 28px;
}

.brand-logo-wrap {
  padding: 12px 16px;
  line-height: 0;
}

.brand-logo-image {
  display: block;
  width: auto;
  height: 42px;
  object-fit: contain;
}

.brand-logo-image-light {
  display: none;
}

.brand-logo-image-dark {
  display: block;
}

body.dark-mode .brand-logo-image-dark {
  display: none;
}

body.dark-mode .brand-logo-image-light {
  display: block;
}

.loader-logo-image-wrap {
  width: 92px;
  height: 92px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  margin: 0 auto 14px;
  overflow: hidden;
}

.loader-logo-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-info h1 {
  font-size: 52px;
  line-height: 1.05;
  margin-bottom: 18px;
  max-width: 430px;
}

.auth-info p {
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.8;
  max-width: 470px;
  margin-bottom: 32px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.feature-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.16);
  border: 1px solid rgba(34, 197, 94, 0.22);
  color: #15803d;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
}

.auth-form-side {
  padding: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.form-header {
  margin-bottom: 28px;
}

.form-header h2 {
  font-size: 34px;
  color: var(--white);
  margin-bottom: 8px;
}

.form-header p {
  color: var(--text-soft);
  font-size: 15px;
}

.auth-form {
  width: 100%;
}

.input-group {
  margin-bottom: 18px;
}

.input-group label {
  display: block;
  margin-bottom: 9px;
  font-size: 14px;
  font-weight: 600;
}

.input-group input {
  width: 100%;
  height: 56px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--white);
  border-radius: 16px;
  padding: 0 16px;
  font-size: 15px;
  outline: none;
  transition: 0.3s ease;
}

.input-group input::placeholder {
  color: #94a3b8;
}

.input-group input:hover {
  transform: translateY(-1px);
}

.input-group input:focus {
  border-color: rgba(59, 130, 246, 0.8);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.14);
}

.password-box {
  position: relative;
  display: flex;
  align-items: center;
}

.password-box input {
  padding-right: 72px;
}

.toggle-password {
  position: absolute;
  right: 14px;
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.form-options,
.single-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin: 8px 0 22px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 14px;
}

.checkbox-wrap input {
  accent-color: var(--accent);
}

.text-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.text-link:hover {
  text-decoration: underline;
}

.btn-primary {
  width: 100%;
  height: 58px;
  border: none;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.3s ease;
  box-shadow: 0 14px 30px rgba(59, 130, 246, 0.18);
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.divider {
  position: relative;
  text-align: center;
  margin: 28px 0 20px;
}

.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--card-border);
}

.divider span {
  position: relative;
  padding: 0 14px;
  color: #94a3b8;
  font-size: 13px;
  background: var(--card-bg);
}

/* ── Social Buttons ── */

.social-buttons {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.social-btn-new {
  width: 100%;
  height: 52px;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s ease;
}

body.dark-mode .social-btn-new {
  background: rgba(255, 255, 255, 0.07);
  color: var(--white);
}

.social-btn-new:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.2);
}

body.dark-mode .social-btn-new:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.25);
}

.social-btn-new:active {
  transform: translateY(0);
}

.social-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.social-btn-text {
  flex: 1;
  text-align: center;
  padding-right: 20px;
}

/* ── Bottom Text ── */

.bottom-text {
  margin-top: 24px;
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
}

.bottom-text a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

.bottom-text a:hover {
  text-decoration: underline;
}

.error-text {
  display: block;
  min-height: 18px;
  margin-top: 7px;
  font-size: 12px;
  color: #ef4444;
}

.form-message {
  margin-top: 16px;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  min-height: 20px;
}

.form-message.success {
  color: #15803d;
}

.form-message.error {
  color: #b91c1c;
}

.input-hint {
  display: block;
  margin-top: 7px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.auth-card-single {
  max-width: 34rem;
  width: 100%;
  grid-template-columns: 1fr;
}

.auth-form-full {
  width: 100%;
}

.auth-helper-box {
  margin-bottom: 1rem;
  padding: 0.95rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.auth-helper-box strong {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}

.auth-helper-box p {
  font-size: 0.9rem;
  line-height: 1.55;
  opacity: 0.9;
}

/* ── Responsive ── */

@media (max-width: 980px) {
  .auth-card {
    grid-template-columns: 1fr;
    max-width: 620px;
  }

  .auth-info {
    padding: 48px 28px 32px;
  }

  .auth-info h1 {
    font-size: 38px;
    max-width: 100%;
  }

  .auth-form-side {
    padding: 34px 28px 40px;
  }

  .brand-logo-image {
    height: 38px;
  }
}

@media (max-width: 600px) {
  .auth-page {
    padding: 18px;
  }

  .auth-card {
    border-radius: 22px;
  }

  .auth-info,
  .auth-form-side {
    padding-left: 20px;
    padding-right: 20px;
  }

  .auth-info h1 {
    font-size: 32px;
  }

  .form-header h2 {
    font-size: 28px;
  }

  .form-options {
    flex-direction: column;
    align-items: flex-start;
  }

  .page-tools {
    top: 14px;
    right: 14px;
  }

  .brand-logo-image {
    height: 34px;
  }

  .loader-logo-image-wrap {
    width: 82px;
    height: 82px;
    border-radius: 22px;
  }
}