/* ============================================
   AigcMart Auth Pages - login.html / register.html
   ============================================ */

/* ---- Auth Page Wrapper ---- */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 24px;
}

/* ---- Animated Background ---- */
.auth-bg {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, #09090B 0%, #0C0C12 50%, #13131C 100%);
  z-index: 0;
}

.auth-bg::before,
.auth-bg::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.35;
  animation: floatGlow 8s ease-in-out infinite;
}

.auth-bg::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.5) 0%, transparent 70%);
  top: -10%;
  left: -10%;
  animation-delay: 0s;
}

.auth-bg::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.35) 0%, transparent 70%);
  bottom: -10%;
  right: -10%;
  animation-delay: -4s;
}

@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

/* ---- Auth Card ---- */
.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: rgba(19, 19, 28, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(124, 58, 237, 0.15);
  border-radius: 20px;
  padding: 40px 32px 32px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(124, 58, 237, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: cardIn 0.5s ease;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---- Logo ---- */
.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 0 16px rgba(124, 58, 237, 0.35);
}

.auth-logo .logo-icon svg {
  width: 22px;
  height: 22px;
}

.auth-logo .logo-text {
  font-size: 1.5rem;
  font-weight: 800;
  color: #FAFAFA;
  letter-spacing: -0.5px;
}

.auth-logo .logo-text span {
  color: #7C3AED;
}

/* ---- Typography ---- */
.auth-title {
  font-size: 1.375rem;
  font-weight: 700;
  color: #FAFAFA;
  text-align: center;
  margin-bottom: 6px;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: #71717A;
  text-align: center;
  margin-bottom: 28px;
}

/* ---- Form ---- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ---- Input Group ---- */
.input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.input-group .input-icon {
  position: absolute;
  left: 14px;
  color: #71717A;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

.input-group .input-icon svg {
  width: 18px;
  height: 18px;
}

.input-group input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 44px;
  background: #161622;
  border: 1px solid #27272A;
  border-radius: 12px;
  font-size: 0.9375rem;
  color: #FAFAFA;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input::placeholder {
  color: #52525B;
}

.input-group input:focus {
  border-color: #7C3AED;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.input-group input:focus + .input-icon,
.input-group:focus-within .input-icon {
  color: #7C3AED;
}

/* Password eye toggle */
.input-group .input-eye {
  position: absolute;
  right: 14px;
  color: #71717A;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.2s ease;
  z-index: 2;
  background: none;
  border: none;
  padding: 4px;
}

.input-group .input-eye:hover {
  color: #A1A1AA;
}

.input-group .input-eye svg {
  width: 18px;
  height: 18px;
}

.input-group input.has-eye {
  padding-right: 44px;
}

/* ---- Auth Options ---- */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}

.auth-options .remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #A1A1AA;
  user-select: none;
}

.auth-options .remember-me input {
  display: none;
}

.auth-options .remember-me .check-box {
  width: 16px;
  height: 16px;
  border: 2px solid #3F3F46;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.auth-options .remember-me .check-box svg {
  width: 10px;
  height: 10px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.auth-options .remember-me input:checked + .check-box {
  background: #7C3AED;
  border-color: #7C3AED;
}

.auth-options .remember-me input:checked + .check-box svg {
  opacity: 1;
}

.auth-options .forgot-link {
  font-size: 0.8125rem;
  color: #7C3AED;
  transition: color 0.2s ease;
}

.auth-options .forgot-link:hover {
  color: #A78BFA;
}

/* ---- Submit Button ---- */
.auth-submit {
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #7C3AED, #6D28D9);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
  margin-top: 4px;
}

.auth-submit:hover {
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.35);
  transform: translateY(-1px);
}

.auth-submit:active {
  transform: translateY(0);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* ---- Divider ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 8px 0;
  color: #52525B;
  font-size: 0.8125rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, #27272A, transparent);
}

/* ---- Social Login ---- */
.social-login {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.social-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #161622;
  border: 1px solid #27272A;
  color: #A1A1AA;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.social-btn:hover {
  border-color: #7C3AED;
  color: #FAFAFA;
  background: #1A1A26;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.15);
}

.social-btn svg {
  width: 20px;
  height: 20px;
}

/* ---- Auth Footer ---- */
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 0.875rem;
  color: #71717A;
}

.auth-footer a {
  color: #7C3AED;
  font-weight: 500;
  transition: color 0.2s ease;
}

.auth-footer a:hover {
  color: #A78BFA;
}

/* ---- Verify Code Button ---- */
.verify-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  height: 36px;
  padding: 0 14px;
  background: transparent;
  border: 1px solid #27272A;
  border-radius: 8px;
  color: #7C3AED;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.verify-btn:hover:not(:disabled) {
  border-color: #7C3AED;
  background: rgba(124, 58, 237, 0.08);
}

.verify-btn:disabled {
  color: #52525B;
  cursor: not-allowed;
  border-color: #27272A;
}

/* ---- Checkbox (agreement) ---- */
.agreement {
  display: inline-flex;
  align-items: flex-start;
  gap: 8px;
  cursor: pointer;
  font-size: 0.8125rem;
  color: #A1A1AA;
  user-select: none;
}

.agreement input {
  display: none;
}

.agreement .check-box {
  width: 16px;
  height: 16px;
  border: 2px solid #3F3F46;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.agreement .check-box svg {
  width: 10px;
  height: 10px;
  color: #fff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.agreement input:checked + .check-box {
  background: #7C3AED;
  border-color: #7C3AED;
}

.agreement input:checked + .check-box svg {
  opacity: 1;
}

.agreement a {
  color: #7C3AED;
  transition: color 0.2s ease;
}

.agreement a:hover {
  color: #A78BFA;
}

/* ---- Error State ---- */
.input-group input.error {
  border-color: #F43F5E;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.input-group input.error:focus {
  border-color: #F43F5E;
  box-shadow: 0 0 0 3px rgba(244, 63, 94, 0.12);
}

.error-msg {
  font-size: 0.75rem;
  color: #F43F5E;
  margin-top: 4px;
  padding-left: 4px;
  display: none;
}

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

/* ---- Password Strength ---- */
.pwd-strength {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  padding-left: 4px;
}

.pwd-strength .bar {
  flex: 1;
  height: 3px;
  background: #27272A;
  border-radius: 2px;
  transition: background 0.3s ease;
}

.pwd-strength .bar.weak { background: #F43F5E; }
.pwd-strength .bar.medium { background: #F59E0B; }
.pwd-strength .bar.strong { background: #10B981; }

.pwd-strength-label {
  font-size: 0.75rem;
  color: #71717A;
  margin-top: 4px;
  padding-left: 4px;
}

/* ---- Responsive ---- */
@media (max-width: 480px) {
  .auth-page {
    padding: 16px;
    align-items: flex-start;
    padding-top: 40px;
  }

  .auth-card {
    padding: 32px 20px 24px;
    border-radius: 16px;
  }

  .auth-title {
    font-size: 1.25rem;
  }

  .auth-subtitle {
    font-size: 0.8125rem;
  }

  .input-group input {
    height: 44px;
    font-size: 0.875rem;
  }

  .auth-submit {
    height: 44px;
    font-size: 0.9375rem;
  }

  .social-btn {
    width: 40px;
    height: 40px;
  }
}
