/* ============================================================
   SMFy — Auth Page (Centered Card Layout)
   ============================================================ */

/* ---- Full page ---- */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(160deg, #f5f3ff 0%, #ede9fe 50%, #faf5ff 100%);
  position: relative;
  overflow-x: hidden;
}

/* Decorative blobs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, #c4b5fd 0%, transparent 70%);
  top: -150px;
  right: -150px;
}
body::after {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, #a78bfa 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

/* ---- Card ---- */
.auth-card {
  background: #fff;
  border-radius: 24px;
  box-shadow:
    0 0 0 1px rgba(139, 92, 246, 0.08),
    0 4px 16px rgba(0, 0, 0, 0.06),
    0 24px 64px rgba(109, 40, 217, 0.10);
  padding: 40px 40px 36px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* ---- Logo ---- */
.auth-logo-wrap {
  text-align: center;
  margin-bottom: 28px;
}
.auth-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.auth-logo img {
  height: 34px;
}
.auth-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900);
  letter-spacing: -0.5px;
}

/* ---- Tab switcher ---- */
.auth-tabs {
  display: flex;
  background: var(--gray-100);
  border-radius: var(--radius);
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  flex: 1;
  padding: 9px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500);
  border-radius: calc(var(--radius) - 2px);
  text-align: center;
  cursor: pointer;
  transition: var(--ease);
}
.auth-tab.active {
  background: #fff;
  color: var(--gray-900);
  box-shadow: var(--shadow-xs);
  font-weight: 600;
}

/* ---- Trial badge ---- */
.trial-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
  border-radius: 40px;
  padding: 6px 14px;
  margin-bottom: 20px;
  font-size: 12px;
  font-weight: 600;
  color: #065f46;
  letter-spacing: 0.1px;
}
.trial-badge svg {
  flex-shrink: 0;
}

/* ---- Form fields ---- */
.form-group { margin-bottom: 14px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 5px;
}
.form-control {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--gray-900);
  transition: var(--ease);
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
}
.form-control:focus {
  border-color: var(--primary-400);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12);
}
.form-control::placeholder { color: var(--gray-400); }
.form-control.error { border-color: var(--danger); }

/* ---- Password toggle ---- */
.form-control-password {
  position: relative;
}
.form-control-password .form-control { padding-right: 44px; }
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
  transition: color .15s;
}
.toggle-password:hover { color: var(--gray-600); }

/* ---- Phone row (DDI + number) ---- */
.phone-row {
  display: flex;
  gap: 8px;
}
.phone-ddi {
  width: 100px;
  flex-shrink: 0;
  padding: 11px 10px;
}
.phone-number {
  flex: 1;
}

/* ---- Forgot password link ---- */
.form-forgot {
  text-align: right;
  margin-top: -6px;
  margin-bottom: 16px;
}
.form-forgot a {
  font-size: 13px;
  color: var(--primary-600);
  font-weight: 500;
}
.form-forgot a:hover { text-decoration: underline; }

/* ---- Primary (Login) button ---- */
.btn-auth {
  width: 100%;
  padding: 13px;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(109, 40, 217, 0.25);
  margin-top: 4px;
  font-family: inherit;
}
.btn-auth:hover {
  background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(109, 40, 217, 0.35);
}
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Trial (Signup) button — green CTA ---- */
.btn-trial {
  width: 100%;
  padding: 14px;
  font-size: 15px;
  font-weight: 700;
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #fff;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 3px rgba(5, 150, 105, 0.25);
  margin-top: 4px;
  font-family: inherit;
  letter-spacing: 0.2px;
}
.btn-trial:hover {
  background: linear-gradient(135deg, #047857 0%, #065f46 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(5, 150, 105, 0.35);
}
.btn-trial:active { transform: translateY(0); }
.btn-trial:disabled { opacity: .6; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---- Terms ---- */
.auth-terms {
  margin-top: 16px;
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  line-height: 1.6;
}
.auth-terms a { color: var(--primary-600); }
.auth-terms a:hover { text-decoration: underline; }

/* ---- Forgot panel header ---- */
.auth-form-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 6px;
  letter-spacing: -0.3px;
}
.auth-form-subtitle {
  font-size: 13px;
  color: var(--gray-500);
  margin-bottom: 24px;
}

/* ---- Back link ---- */
.auth-back {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-600);
  cursor: pointer;
  margin-bottom: 24px;
}
.auth-back:hover { color: var(--gray-900); }

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 16px;
  }
  body::before, body::after { display: none; }
}
