/* Auth Pages Specific Styles */

:root {
  --primary: #0ea5e9;
  --primary-hover: #0284c7;
  --bg-gradient: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  --surface-color: rgba(255, 255, 255, 0.9);
  --border-color: #e2e8f0;
  --text-main: #1e293b;
  --text-muted: #64748b;
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.05);
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: #f8fafc;
  background-image: linear-gradient(rgba(226, 232, 240, 0.6) 1px, transparent 1px), linear-gradient(90deg, rgba(226, 232, 240, 0.6) 1px, transparent 1px);
  background-size: 40px 40px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-main);
}

.auth-container {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  margin: 1rem;
}

.auth-card {
  background: var(--surface-color);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.5);
  animation: slideUp 0.5s ease-out;
  position: relative; /* For absolute positioning of children */
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin: 0 0 0.5rem 0;
}

.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-main);
}

.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  transition: all 0.2s;
  background: white;
  box-sizing: border-box; /* Important for width: 100% */
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.btn-primary {
  width: 100%;
  padding: 0.75rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--primary-hover);
}

.divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  padding: 0 1rem;
}

.google-btn {
  width: 100%;
  display: flex;
  justify-content: center; /* Center the iframe/button div */
}


.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}

.auth-link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

/* OTP Input Styles */
.otp-container {
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.otp-digit {
    width: 3rem;
    height: 3.5rem;
    font-size: 1.5rem;
    text-align: center;
    border: 1px solid var(--border-color);
    border-radius: 8px;
}

.otp-digit:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.hidden {
    display: none !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

/* Password Toggle Styles */
.password-wrapper {
    position: relative;
    width: 100%;
}

.password-wrapper .form-input {
    padding-right: 40px; /* Space for the icon */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
    z-index: 2; /* Ensure it's clickable */
}

.toggle-password:hover {
    color: var(--primary);
}

.toggle-password svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */
@media (max-width: 480px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-card {
        padding: 1.5rem;
    }

    .auth-title {
        font-size: 1.25rem;
    }

    .google-btn div {
        width: 100% !important; /* Force full width on small screens */
        max-width: 100%;
    }
}

/* ============================================
   BACK TO HOME BUTTON
   ============================================ */
.btn-back-home {
    position: absolute;
    top: 24px;
    left: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    box-shadow: none;
    transition: all 0.2s ease;
    z-index: 10;
}

.btn-back-home:hover {
    color: var(--primary);
    background: var(--slate-100);
    transform: none;
    box-shadow: none;
}

.btn-back-home svg {
    width: 16px;
    height: 16px;
    transition: transform 0.2s;
}

.btn-back-home:hover svg {
    transform: translateX(-3px);
}

@media (max-width: 480px) {
    .btn-back-home {
        top: 16px;
        left: 16px;
        padding: 8px 12px;
        font-size: 0.8125rem;
    }
}
