/* ============================================
   AUTHENTICATION PAGE STYLES
   Work4OneDollar Design System v2.0
   MNC Standard Light Theme
   ============================================ */

/* ============================================
   AUTH CONTAINER - MNC Light Theme
   ============================================ */

.w4-auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
  background: var(--bg-page);
  position: relative;
  overflow: hidden;
}

/* Decorative Background - Subtle for Light Theme */
.w4-auth-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.w4-auth-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
}

.w4-auth-blob-1 {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -20%;
  right: -10%;
  animation: auth-blob-1 25s ease-in-out infinite;
}

.w4-auth-blob-2 {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -15%;
  left: -10%;
  animation: auth-blob-2 20s ease-in-out infinite;
}

@keyframes auth-blob-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-50px, 50px) scale(1.1); }
  66% { transform: translate(30px, -30px) scale(0.9); }
}

@keyframes auth-blob-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -40px) scale(1.15); }
}

/* ============================================
   AUTH CARD - MNC Light Theme
   ============================================ */

.w4-auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: var(--space-10);
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-2xl);
  box-shadow: var(--shadow-xl);
}

/* Brand Header */
.w4-auth-brand {
  text-align: center;
  margin-bottom: var(--space-8);
}

.w4-auth-logo {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  text-decoration: none;
  transition: all var(--transition-base);
}

.w4-auth-logo:hover {
  color: var(--primary);
}

.w4-auth-logo i {
  color: var(--primary);
}

/* ============================================
   AUTH STEPS
   ============================================ */

.w4-auth-step {
  display: none;
}

.w4-auth-step.active {
  display: block;
  animation: auth-step-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes auth-step-in {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Auth Header */
.w4-auth-header {
  text-align: center;
  margin-bottom: var(--space-6);
}

.w4-auth-title {
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.w4-auth-subtitle {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* ============================================
   AUTH FORM - MNC Light Theme
   ============================================ */

.w4-auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}

/* Form Group */
.w4-form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.w4-form-label {
  font-size: var(--text-sm);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  letter-spacing: var(--tracking-wide);
}

.w4-form-hint {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.w4-form-hint code {
  background: var(--primary-light);
  color: var(--primary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: monospace;
}

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

.w4-input-prefix {
  position: absolute;
  left: var(--space-4);
  color: var(--text-muted);
  font-size: var(--text-base);
  pointer-events: none;
  z-index: 1;
}

.w4-input-group .w4-input {
  padding-left: var(--space-12);
}

/* Input - MNC Light Theme */
.w4-auth-form .w4-input,
.w4-auth-form .w4-select {
  width: 100%;
  padding: var(--space-4);
  background: var(--white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: var(--text-base);
  transition: all var(--transition-base);
}

.w4-auth-form .w4-input::placeholder {
  color: var(--text-muted);
}

.w4-auth-form .w4-input:focus,
.w4-auth-form .w4-select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: var(--shadow-focus);
  background: var(--white);
}

/* Select */
.w4-auth-form .w4-select {
  appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 6 8 10 12 6'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right var(--space-4) center;
  background-size: 16px;
  padding-right: var(--space-12);
}

.w4-auth-form .w4-select option {
  background: var(--white);
  color: var(--text-primary);
}

/* OTP/PIN Input */
.w4-input-otp,
.w4-input-pin {
  text-align: center;
  letter-spacing: 1em;
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--primary) !important;
  padding: var(--space-5) !important;
}

.w4-input-otp::placeholder,
.w4-input-pin::placeholder {
  letter-spacing: 0.5em;
  color: var(--text-muted) !important;
}

/* ============================================
   AUTH BUTTONS - MNC Light Theme
   ============================================ */

.w4-auth-form .w4-btn-primary {
  background: var(--primary);
  border: none;
  color: var(--white);
  box-shadow: var(--shadow-md);
}

.w4-auth-form .w4-btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.w4-auth-actions {
  display: flex;
  justify-content: center;
  margin-top: var(--space-2);
}

.w4-btn-ghost {
  background: transparent;
  color: var(--primary);
  border: none;
}

.w4-btn-ghost:hover {
  background: var(--primary-light);
}

/* Back Button */
.w4-auth-back {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-6);
  padding: var(--space-2) var(--space-4);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-base);
  border-radius: var(--radius-lg);
}

.w4-auth-back:hover {
  color: var(--primary);
  background: var(--primary-light);
}

/* ============================================
   AUTH FOOTER - MNC Light Theme
   ============================================ */

.w4-auth-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border-default);
}

.w4-auth-footer p {
  color: var(--text-muted);
}

.w4-auth-footer a {
  color: var(--primary);
  text-decoration: none;
  transition: all var(--transition-base);
}

.w4-auth-footer a:hover {
  text-decoration: underline;
}

/* ============================================
   ALERTS - MNC Light Theme
   ============================================ */

.w4-auth-form ~ .w4-alert,
.w4-auth-step .w4-alert {
  display: none;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  font-size: var(--text-sm);
  margin-bottom: var(--space-4);
  border: 1px solid transparent;
}

.w4-auth-step .w4-alert-error {
  background: var(--error-light);
  color: var(--error);
  border-color: var(--error);
}

.w4-auth-step .w4-alert-success {
  background: var(--success-light);
  color: var(--success);
  border-color: var(--success);
}

.w4-auth-step .w4-alert-info {
  background: var(--info-light);
  color: var(--info);
  border-color: var(--info);
}

/* ============================================
   LOADING STATE - MNC Light Theme
   ============================================ */

.w4-auth-loading {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-2xl);
  z-index: 10;
}

.w4-auth-loading.active {
  display: flex;
}

.w4-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--neutral-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  margin-bottom: var(--space-4);
}

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

.w4-auth-loading p {
  color: var(--text-secondary);
  font-weight: var(--font-medium);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 575px) {
  .w4-auth-container {
    padding: var(--space-4);
    align-items: flex-start;
    padding-top: var(--space-8);
  }
  
  .w4-auth-card {
    padding: var(--space-6);
    border-radius: var(--radius-xl);
  }
  
  .w4-auth-title {
    font-size: var(--text-xl);
  }
  
  .w4-input-otp,
  .w4-input-pin {
    letter-spacing: 0.75em;
    font-size: var(--text-xl);
  }
}
