/* Authentication Pages Styling */
:root {
  --primary-color: #000000;
  --secondary-color: #c8b896;
  --background: #ffffff;
  --surface: #f8f8f8;
  --text-primary: #000000;
  --text-secondary: #666666;
  --border-color: #e0e0e0;
  --error-color: #d32f2f;
  --success-color: #388e3c;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: var(--background);
  color: var(--text-primary);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header */
.auth-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  background: white;
}

.auth-header .logo-container {
  max-width: 1200px;
  margin: 0 auto;
}

.auth-header .logo {
  height: 40px;
  width: auto;
}

/* Main Container */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
}

.auth-box {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 3rem;
  width: 100%;
  max-width: 450px;
}

.auth-box h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.auth-box .subtitle {
  font-size: 0.95rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Form Elements */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.form-group input {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
  transition: all 0.2s ease;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder {
  color: #999;
}

.form-group input.error {
  border-color: var(--error-color);
}

.form-group .error-message {
  display: none;
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.form-group .error-message.show {
  display: block;
}

.form-group .success-message {
  display: none;
  color: var(--success-color);
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

.form-group .success-message.show {
  display: block;
}

/* Password Toggle */
.password-field {
  position: relative;
}

.password-field input {
  padding-right: 3rem;
}

.password-toggle {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle:hover {
  color: var(--text-primary);
}

.password-toggle svg {
  width: 20px;
  height: 20px;
}

/* Remember Me & Forgot Password */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.remember-me {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.remember-me input[type="checkbox"] {
  width: auto;
  cursor: pointer;
}

.remember-me label {
  cursor: pointer;
  color: var(--text-secondary);
  margin: 0;
}

.forgot-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
}

.forgot-link:hover {
  text-decoration: underline;
}

/* Buttons */
.btn {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: white;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
  margin-top: 1rem;
}

.btn-secondary:hover {
  background: var(--surface);
}

/* Loading Spinner */
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

/* Divider */
.divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 2rem 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border-color);
}

.divider span {
  padding: 0 1rem;
}

/* Social Login */
.social-login {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.social-btn {
  flex: 1;
  padding: 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.social-btn:hover {
  background: var(--surface);
  border-color: var(--text-secondary);
}

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

/* Auth Switch */
.auth-switch {
  text-align: center;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.auth-switch a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 600;
  margin-left: 0.25rem;
}

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

/* Email Verification Section */
.verification-section {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  display: none;
}

.verification-section.show {
  display: block;
}

.verification-section h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  color: #0369a1;
}

.verification-section p {
  font-size: 0.85rem;
  color: #0c4a6e;
  margin-bottom: 1rem;
}

.verification-code {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.verification-code input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
  border: 2px solid var(--border-color);
  border-radius: 6px;
  background: white;
}

.verification-code input:focus {
  border-color: var(--primary-color);
  outline: none;
}

.resend-code {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.resend-code button {
  background: none;
  border: none;
  color: var(--text-primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  font-size: inherit;
}

.resend-code button:disabled {
  color: var(--text-secondary);
  cursor: not-allowed;
  text-decoration: none;
}

/* Alert Messages */
.alert {
  padding: 1rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: #fee;
  border: 1px solid #fcc;
  color: var(--error-color);
}

.alert-success {
  background: #efe;
  border: 1px solid #cfc;
  color: var(--success-color);
}

.alert-info {
  background: #e3f2fd;
  border: 1px solid #bbdefb;
  color: #0277bd;
}

/* Footer */
.auth-footer {
  padding: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-color);
  background: white;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
}

.auth-footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
}

.auth-footer-links a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-header {
    padding: 1rem;
  }
  
  .auth-header .logo {
    height: 32px;
  }
  
  .auth-container {
    padding: 1rem;
  }
  
  .auth-box {
    padding: 2rem 1.5rem;
  }
  
  .auth-box h1 {
    font-size: 1.5rem;
  }
  
  .form-options {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .social-login {
    flex-direction: column;
  }
  
  .auth-footer-links {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .verification-code input {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .auth-box {
    padding: 1.5rem 1rem;
  }
  
  .verification-code input {
    width: 35px;
    height: 35px;
    font-size: 1.1rem;
  }
}
