:root {
  --auth-bg: #f8f5f4;
  --auth-card: #ffffff;
  --auth-text: #112243;
  --auth-muted: #6d7890;
  --auth-primary: #f00028;
  --auth-primary-dark: #d80025;
  --auth-border: rgba(17, 34, 67, 0.12);
  --auth-shadow: 0 34px 88px rgba(18, 24, 38, 0.16);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: "Poppins", sans-serif;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 14% 12%, rgba(255, 181, 181, 0.78), transparent 28%),
    radial-gradient(circle at 86% 88%, rgba(187, 193, 218, 0.34), transparent 24%),
    linear-gradient(135deg, #fff8f7 0%, var(--auth-bg) 100%);
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-shell {
  width: min(1220px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 650px;
  background: var(--auth-card);
  border-radius: 30px;
  overflow: hidden;
  box-shadow: var(--auth-shadow);
  border: 1px solid rgba(255, 255, 255, 0.72);
}

.auth-cover {
  position: relative;
  margin: 0;
  border-radius: 0;
  padding: 28px 26px;
  display: flex;
  align-items: flex-end;
  background:
    linear-gradient(180deg, rgba(8, 11, 20, 0.06) 0%, rgba(8, 11, 20, 0.72) 100%),
    url("./assets/cover.jpg") center/cover no-repeat;
}

.auth-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(160deg, rgba(0, 0, 0, 0.02) 18%, rgba(0, 0, 0, 0.5) 100%),
    linear-gradient(0deg, rgba(2, 6, 23, 0.34), rgba(2, 6, 23, 0.34));
}

.auth-cover-copy {
  position: relative;
  z-index: 1;
  color: #fff;
  max-width: 330px;
}

.auth-cover-title {
  margin: 0;
  font-size: clamp(2.55rem, 4vw, 3.35rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  text-transform: lowercase;
  text-shadow: 0 4px 18px rgba(0, 0, 0, 0.22);
}

.auth-cover-tagline {
  margin: 10px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.96rem;
  line-height: 1.45;
  text-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.auth-panel {
  padding: 80px 64px 62px 58px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.auth-card {
  width: min(470px, 100%);
}

.auth-heading {
  margin-bottom: 30px;
}

.auth-kicker {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--auth-muted);
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  font-size: 0.92rem;
}

.auth-heading h2 {
  margin: 0;
  font-size: clamp(2.8rem, 4vw, 3.1rem);
  line-height: 0.95;
  font-family: "Poppins", sans-serif;
  font-weight: 800;
  letter-spacing: -0.05em;
  text-transform: lowercase;
}

.auth-heading p {
  margin: 10px 0 0;
  color: var(--auth-muted);
  font-size: 0.96rem;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 54px;
  border-radius: 20px;
  border: 1px solid rgba(17, 34, 67, 0.12);
  background: #fff;
  padding: 15px 18px;
  color: var(--auth-text);
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: rgba(17, 34, 67, 0.88);
  box-shadow: 0 0 0 4px rgba(240, 0, 40, 0.07);
  transform: translateY(-1px);
}

.auth-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-button {
  border: none;
  min-height: 56px;
  border-radius: 18px;
  padding: 16px 18px;
  background: var(--auth-primary);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 18px 34px rgba(240, 0, 40, 0.2);
}

.auth-button:hover {
  transform: translateY(-1px);
  background: var(--auth-primary-dark);
}

.auth-button.secondary {
  background: #fff;
  color: var(--auth-text);
  border: 1px solid var(--auth-border);
  box-shadow: none;
}

.auth-links {
  margin-top: 48px;
  display: grid;
  gap: 14px;
}

.auth-links a {
  color: #55647c;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

.form-note {
  color: var(--auth-muted);
  font-size: 0.92rem;
  margin: -2px 0 0;
}

.toast-container {
  position: fixed;
  right: 18px;
  bottom: 18px;
  display: grid;
  gap: 10px;
  z-index: 50;
}

.toast {
  padding: 12px 16px;
  border-radius: 14px;
  background: #111827;
  color: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.16);
}

.loader {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(6, 8, 14, 0.46);
  color: #fff;
  z-index: 80;
}

.spinner {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, 0.28);
  border-top-color: #fff;
  animation: auth-spin 0.8s linear infinite;
}

.hidden {
  display: none !important;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .auth-cover {
    min-height: 340px;
  }

  .auth-panel {
    padding: 34px 24px 40px;
  }
}

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

  .auth-page {
    padding: 12px;
  }

  .auth-shell {
    border-radius: 24px;
  }

  .auth-cover {
    min-height: 280px;
    padding: 20px;
  }
}


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

  .auth-shell {
    border-radius: 20px;
  }

  .auth-cover {
    min-height: 220px;
    padding: 18px 16px;
    border-radius: 20px 20px 0 0;
  }

  .auth-cover-copy {
    gap: 10px;
  }

  .auth-cover-title {
    font-size: clamp(1.9rem, 10vw, 2.5rem);
  }

  .auth-cover-text {
    font-size: 0.92rem;
    line-height: 1.55;
  }

  .auth-panel {
    padding: 24px 16px 30px;
  }

  .auth-panel h2 {
    font-size: 2rem;
  }

  .auth-panel > p {
    font-size: 0.96rem;
  }

  .auth-grid,
  .auth-actions {
    grid-template-columns: 1fr;
  }

  .auth-form {
    gap: 14px;
  }

  .input-group input,
  .input-group select,
  .auth-button {
    min-height: 52px;
  }

  .otp-inline,
  .otp-status-row {
    grid-template-columns: 1fr;
  }

  .auth-links {
    margin-top: 28px;
    gap: 10px;
  }

  .toast-container {
    right: 10px;
    left: 10px;
    bottom: 10px;
  }

  .toast {
    width: 100%;
  }
}
