/* ============================================
   VIBE — Auth Pages (Login / Register / Setup)
   ============================================
   Layout: Vertical stacking for all form elements
============================================ */

/* ---------- Container ---------- */
.auth-container {
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  padding: 20px 20px 32px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  background: linear-gradient(180deg, #FFFFFF 0%, #F8F9FC 100%);
}

/* Background blur blobs */
.auth-container::before {
  content: '';
  position: fixed;
  top: -120px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

.auth-container::after {
  content: '';
  position: fixed;
  bottom: -120px;
  left: -100px;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(251,191,36,0.12) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(50px);
  pointer-events: none;
  z-index: 0;
}

/* ---------- Header ---------- */
.auth-header {
  position: relative;
  z-index: 2;
  padding-top: 4px;
  margin-bottom: 28px;
  width: 100%;
  max-width: 440px;
  margin-left: auto;
  margin-right: auto;
}

.auth-back {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  margin-bottom: 20px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.auth-back:active {
  background: var(--bg-tertiary);
  transform: scale(0.94);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 20px;
  color: var(--text-primary);
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.auth-logo img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(15,26,61,0.15);
  flex-shrink: 0;
}

.auth-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.auth-subtitle {
  font-size: 14.5px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---------- Body ---------- */
.auth-body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  flex: 1;
}

/* ---------- Form (VERTICAL STACK) ---------- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ---------- Input Group ---------- */
.input-group {
  position: relative;
  width: 100%;
  display: block;
}

.input-group .form-input {
  display: block;
  width: 100%;
  padding: 15px 46px 15px 46px;
  min-height: 54px;
  background: var(--bg-secondary);
  border: 1.5px solid transparent;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s;
  box-sizing: border-box;
}

.input-group .form-input::placeholder {
  color: var(--text-tertiary);
  font-weight: 400;
}

.input-group .form-input:focus {
  background: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

/* ---------- Input Icon (left) ---------- */
.input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  z-index: 1;
}

/* ---------- Input Toggle (right, eye icon) ---------- */
.input-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  transition: all 0.2s;
  z-index: 1;
  background: transparent;
  border: none;
  cursor: pointer;
}

.input-toggle:active {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}

/* ---------- Error Box ---------- */
.auth-error {
  display: none;
  padding: 12px 14px;
  background: #FEE2E2;
  color: #B91C1C;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 12px;
  border-left: 3px solid #EF4444;
}

.auth-error.show {
  display: block;
}

/* ---------- Password Hint ---------- */
.password-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text-tertiary);
  margin-top: 6px;
  padding-left: 4px;
  line-height: 1.4;
  transition: color 0.2s;
}

.password-hint.valid {
  color: var(--success);
}

.password-hint.invalid {
  color: var(--danger);
}

/* ---------- Submit Button ---------- */
.auth-submit {
  margin-top: 6px;
  width: 100%;
}

/* ---------- Terms ---------- */
.auth-terms {
  font-size: 12.5px;
  color: var(--text-tertiary);
  text-align: center;
  line-height: 1.55;
  margin-top: 4px;
  padding: 0 8px;
}

.auth-terms a {
  color: var(--text-secondary);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(107,114,128,0.3);
}

/* ---------- Footer ---------- */
.auth-footer {
  text-align: center;
  padding: 24px 0 16px;
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  z-index: 2;
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  margin-left: 4px;
}

.auth-footer a:active {
  color: var(--primary-dark);
}

/* ---------- Success Screen ---------- */
.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 60vh;
  gap: 18px;
  padding: 20px;
  animation: fadeUp 0.5s ease both;
}

.success-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 12px 32px rgba(16,185,129,0.2);
}

.success-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.success-text {
  font-size: 14.5px;
  color: var(--text-secondary);
  max-width: 320px;
  line-height: 1.55;
}

/* ---------- Mobile tweaks ---------- */
@media (max-width: 380px) {
  .auth-title { font-size: 25px; }
  .auth-subtitle { font-size: 14px; }
  .input-group .form-input {
    font-size: 14.5px;
    padding-left: 44px;
    padding-right: 44px;
  }
}

/* ---------- Keyframes ---------- */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}