/* =====================================================
   auth.css — Standalone auth stylesheet
   Covers: login page & register/signup page
   ===================================================== */

/* ── Reset ───────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Page body ───────────────────────────────────── */
body {
  font-family: var(--font-family-base);
  background: var(--white);
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  color: var(--color-gray-900);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Background orbs ─────────────────────────────── */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

body::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(
    circle,
    rgba(124, 99, 227, 0.08) 0%,
    transparent 70%
  );
  top: -80px;
  right: -100px;
}

body::after {
  width: 300px;
  height: 300px;
  background: radial-gradient(
    circle,
    rgba(124, 99, 227, 0.06) 0%,
    transparent 70%
  );
  bottom: -60px;
  left: -80px;
}

/* ── Slide-up entrance animation ─────────────────── */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Card ────────────────────────────────────────── */
.card {
  position: relative;
  display: flex;
  z-index: 1;
  width: 100%;
  padding: 40px 36px 36px;
  animation: slideUp 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.card .illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  background: none;
  padding-right: 28px;
}

.card .illustration img {
  width: 100%;
  height: auto;
  display: block;
}

.card .main-form {
  min-width: 320px;
  display: flex;
  flex: 1;
  justify-content: center;
  flex-direction: column;
}

.card .main-form .form-holder {
  max-width: 420px;
  width: 100%;
}

/* ── Brand mark ──────────────────────────────────── */
.brand {
  margin-bottom: 20px;
}

.brand-icon {
  display: block;
  position: relative;
  width: 60px;
  height: 60px;
}

.brand-icon img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 0 6px rgba(124, 99, 227, 0.45));
}

/* ── Service pills ───────────────────────────────── */
.service-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.pill {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  background: var(--color-primary-fade);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--color-primary);
  letter-spacing: -0.1px;
}

.pill svg {
  opacity: 0.7;
}

/* ── Header ──────────────────────────────────────── */
.header {
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.header h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.8px;
  line-height: 1.2;
  color: var(--color-gray-900);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header h1 .emoji {
  font-style: normal;
  font-size: 1em;
}

.header p {
  font-size: 14px;
  color: var(--color-gray-400);
  font-weight: 400;
  line-height: 1.5;
}

/* ── Progress steps ──────────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 28px;
}

.step-dot {
  height: 4px;
  border-radius: var(--radius-xs);
  transition: all var(--transition);
}

.step-dot.active {
  background: var(--color-primary);
  flex: 2;
}

.step-dot.done {
  background: var(--color-primary);
  flex: 1;
  opacity: 0.35;
}

.step-dot.next {
  background: var(--color-gray-200);
  flex: 1;
}

/* ── Form ────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ── Field ───────────────────────────────────────── */
.field {
  position: relative;
}

.field-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-gray-400);
  pointer-events: none;
  transition: color var(--transition);
}

.field:focus-within .field-icon {
  color: var(--color-primary);
}

.field input {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 44px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--color-gray-900);
  background: var(--white);
  outline: none;
  transition:
    border-color var(--transition),
    box-shadow var(--transition),
    background var(--transition);
}

.field input::placeholder {
  color: var(--color-gray-400);
  font-weight: 400;
}

.field input:hover {
  border-color: var(--color-gray-400);
}

.field input:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(124, 99, 227, 0.08);
  background: #fdfcff;
}

.field input.valid {
  border-color: #22c55e;
}

/* ── Field right controls (toggle / check) ───────── */
.field-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 6px;
}

.toggle-pw {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gray-400);
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color var(--transition);
}

.toggle-pw:hover {
  color: var(--color-primary);
}

/* ── Valid check icon ────────────────────────────── */
.valid-check {
  color: #22c55e;
  display: none;
  animation: popIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Row of two ──────────────────────────────────── */
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Password strength ───────────────────────────── */
.strength-wrap {
  margin-top: -6px;
}

.strength-bar {
  height: 3px;
  border-radius: var(--radius-xs);
  background: var(--color-gray-200);
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-fill {
  height: 100%;
  border-radius: var(--radius-xs);
  width: 0%;
  transition:
    width 0.3s ease,
    background 0.3s ease;
}

.strength-label {
  font-size: 11.5px;
  color: var(--color-gray-400);
  font-weight: 500;
}

/* ── Terms checkbox ──────────────────────────────── */
.terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 2px 0;
}

.terms input[type="checkbox"] {
  display: none;
}

.check-box {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 1.5px solid var(--color-gray-200);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  background: var(--white);
  margin-top: 1px;
}

.check-box svg {
  opacity: 0;
  transition: opacity var(--transition);
  color: #fff;
}

input[type="checkbox"]:checked + .check-box {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

input[type="checkbox"]:checked + .check-box svg {
  opacity: 1;
}

.terms-label {
  font-size: 13.5px;
  color: var(--color-gray-700);
  line-height: 1.5;
  cursor: pointer;
}

.terms-label a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.terms-label a:hover {
  text-decoration: underline;
}*/

/* ── Forgot link ─────────────────────────────────── */
.forgot {
  text-align: right;
  margin-top: -4px;
}

.forgot a {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.forgot a:hover {
  text-decoration: underline;
}

/* ── Primary button ──────────────────────────────── */
.btn-primary {
  width: 100%;
  height: 52px;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-xs);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition:
    background var(--transition),
    transform var(--transition),
    box-shadow var(--transition);
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  background: var( --color-primary-dark);
  box-shadow: 0 6px 20px rgba(124, 99, 227, 0.4);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.98);
  box-shadow: 0 2px 8px rgba(124, 99, 227, 0.3);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ── Move link (login / signup switcher) ─────────── */
.move-link {
  text-align: center;
  font-size: 14px;
  color: var(--color-gray-400);
  margin-top: 4px;
}

.move-link a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.move-link a:hover {
  text-decoration: underline;
}

/* ── Divider ─────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-gray-400);
  font-size: 13px;
  margin: 4px 0;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-gray-200);
}

/* ── Optional badge ──────────────────────────────── */
.opt-badge {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 600;
  color: var(--color-gray-400);
  background: var(--color-gray-100);
  border-radius: 4px;
  padding: 2px 6px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.field.has-opt input {
  padding-right: 68px;
}

/* ── Responsive — Mobile first ───────────────────── */
@media (max-width: 767px) {
  .card {
    flex-direction: column;
    padding: 28px 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: none;
  }

  .card .main-form {
    width: 100%;
    min-width: unset;
  }

  .card .main-form .form-holder {
    max-width: 100%;
  }

  .illustration {
    display: none !important;
  }

  .header h1 {
    font-size: 22px;
  }

  .row {
    grid-template-columns: 1fr;
  }

  body::before {
    top: -120px;
    right: -140px;
  }

  body::after {
    bottom: -100px;
    left: -120px;
  }
}

/* ── Responsive — Desktop ────────────────────────── */
@media (min-width: 768px) {
  body {
    padding: 40px 24px;
  }

  .brand {
    display: none;
  }
}