/* Authentication Pages Styles - FIXED VERSION */
html, body {
  width: 100%;
  overflow-x: hidden;
}

/* Optional: if a fixed header or top margin pushes content up, ensure first element is visible */
.auth-container {
  scroll-margin-top: 16px;
}

.auth-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    /* ADD THESE LINES TO FIX THE SCROLLING ISSUE */
    overflow-y: auto;
    box-sizing: border-box;
}



.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
    text-decoration: none;
}

.logo-image {
    height: 40px; /* Adjust height as needed */
    width: auto; /* Maintains aspect ratio */
    transition: var(--transition);
}

.logo-image:hover {
    transform: scale(1.05);
}

/* For smaller screens */
@media (max-width: 768px) {
    .logo-image {
        height: 32px;
    }
}







.auth-container {
    display: flex;
    gap: 3rem;
    max-width: 1200px;
    width: 100%;
    /* ADD THIS TO ENSURE PROPER ALIGNMENT */
    align-items: flex-start;
    min-height: fit-content;
}

.auth-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2rem;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.5s ease;
    /* COMPACT DESIGN FOR REGISTRATION PAGE */
    box-sizing: border-box;
    overflow: visible;
    max-height: 90vh;
    overflow-y: auto;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header .logo-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.auth-header .logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #5f6be0, #8a98f3);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.auth-header h1 {
    font-size: 1.5rem;
    color: #333;
    margin: 0;
}

.auth-header p {
    color: #666;
    margin: 0.5rem 0 0 0;
}

.auth-form {
    margin-top: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
    font-size: 0.9rem;
}

.form-input {
    width: 100%;
    padding: 0.6rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #fafafa;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #5f6be0;
    background: white;
    box-shadow: 0 0 0 3px rgba(95, 107, 224, 0.1);
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-size: 0.9rem;
    cursor: pointer;
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.optional {
    color: #999;
    font-size: 0.875rem;
    font-weight: normal;
}

.password-requirements {
    background: #f8f9fa;
    padding: 0.75rem;
    border-radius: 6px;
    margin-top: 0.5rem;
}

.password-requirements small {
    display: block;
    margin-bottom: 0.5rem;
    color: #666;
}

.password-requirements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.password-requirements li {
    padding: 0.15rem 0;
    font-size: 0.8rem;
    color: #666;
}

.password-requirements li i {
    margin-right: 0.5rem;
    width: 16px;
}

.full-width {
    width: 100%;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    border: none;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.primary-btn {
    background: linear-gradient(135deg, #5f6be0, #8a98f3);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(95, 107, 224, 0.3);
}

.secondary-btn {
    background: #f5f5f5;
    color: #333;
    border: 1px solid #e0e0e0;
}

.secondary-btn:hover {
    background: #e0e0e0;
}

.forgot-link {
    color: #5f6be0;
    text-decoration: none;
    font-size: 0.9rem;
}

.forgot-link:hover {
    text-decoration: underline;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider span {
    background: white;
    padding: 0 1rem;
    color: #999;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e0e0e0;
}

.demo-access {
    text-align: center;
    margin: 1rem 0;
}

.demo-access p {
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.auth-footer p {
    color: #666;
    font-size: 0.9rem;
}

.auth-footer a {
    color: #5f6be0;
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

.auth-features {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    padding: 2rem;
}

.auth-features h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.auth-features p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 0.75rem 0;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-list i {
    color: #4ade80;
    font-size: 1.25rem;
}

.testimonial {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.testimonial blockquote {
    margin: 0 0 1rem 0;
    font-style: italic;
    font-size: 1.1rem;
}

.testimonial cite {
    font-style: normal;
    font-size: 0.9rem;
    opacity: 0.8;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.stat h3 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.stat p {
    font-size: 0.9rem;
    margin: 0;
    opacity: 0.9;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.alert-warning {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    color: #856404;
}

.alert-error,
.alert-danger {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

.alert-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}
.auth-page {
  min-height: 100svh;        /* small viewport height (safe on mobile) */
  min-height: 100dvh;        /* dynamic viewport height (newer) */
  padding-top: max(1rem, env(safe-area-inset-top));  /* respect notches */
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  overflow-y: auto;          /* page owns the scroll */
}
@media (max-width: 968px) {
  .auth-card {
    max-height: none;        /* let content define height */
    overflow: visible;       /* no internal scroll on mobile */
  }
}
@media (max-width: 480px) {
  .auth-container {
    width: 100%;
    max-width: 100%;
  }
  .auth-card {
    margin: 0;               /* remove any accidental offset */
    border-radius: 10px;
  }
  .auth-features {
    padding: 1rem 0.5rem;
  }
}

/* Responsive Design - IMPROVED */
@media (max-width: 968px) {
    .auth-page {
        /* CHANGE: Remove center alignment for mobile */
        align-items: flex-start;
        padding: 1rem;
    }
    
    .auth-container {
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }
    
    .auth-features {
        max-width: 450px;
        text-align: center;
        order: 2; /* Show features below form on mobile */
    }
    
    .auth-card {
        order: 1; /* Show form first on mobile */
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 0.5rem;
        /* ENSURE MINIMUM PADDING BUT ALLOW SCROLLING */
        min-height: 100vh;
    }
    
    .auth-card {
        padding: 1.5rem 1rem;
        max-width: 100%;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    /* ADDITIONAL: Ensure form elements don't overflow */
    .form-input, .btn {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* COMPACT PASSWORD REQUIREMENTS ON MOBILE */
    .password-requirements {
        padding: 0.5rem;
    }
    
    .password-requirements li {
        padding: 0.1rem 0;
        font-size: 0.75rem;
    }
}