/* File: /home2/acoliar2/581tutors/public/assets/css/auth.css */

/* ==========================================
   Modern Authentication Styles - Final Version
   ========================================== */

:root {
    --primary: #667eea;
    --primary-dark: #5568d3;
    --secondary: #764ba2;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
}

/* ==========================================
   Auth Container
   ========================================== */
.auth-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ==========================================
   Auth Header
   ========================================== */
.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0 0 0.5rem;
}

.auth-header p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin: 0;
}

/* ==========================================
   Form Elements
   ========================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.form-control {
    width: 100%;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    color: var(--gray-900);
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: 0.75rem;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: var(--gray-400);
}

.form-control.is-invalid {
    border-color: var(--danger);
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.form-control.is-valid {
    border-color: var(--success);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

/* ==========================================
   Input with Icon
   ========================================== */
.input-with-icon {
    position: relative;
}

.input-with-icon .fas,
.input-with-icon .fa {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
    z-index: 1;
}

.input-with-icon .form-control {
    padding-left: 2.75rem;
    padding-right: 2.75rem;
}

.toggle-password {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 0.5rem;
    z-index: 10;
    transition: color 0.2s ease;
    pointer-events: auto;
}

.toggle-password:hover {
    color: var(--gray-600);
}

.toggle-password:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
    border-radius: 0.25rem;
    color: var(--primary);
}

/* ==========================================
   Form Errors
   ========================================== */
.error-message {
    display: block;
    font-size: 0.8125rem;
    color: var(--danger);
    margin-top: 0.375rem;
    font-weight: 500;
}

/* ==========================================
   Form Rows
   ========================================== */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* ==========================================
   Email Availability
   ========================================== */
.email-availability {
    margin-top: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.email-availability .checking {
    color: var(--gray-500);
}

.email-availability .available {
    color: var(--success);
}

.email-availability .unavailable {
    color: var(--danger);
}

.email-availability i {
    font-size: 1rem;
}

/* ==========================================
   Password Strength
   ========================================== */
.password-strength {
    margin-top: 0.75rem;
}

.password-strength span {
    font-size: 0.875rem;
    font-weight: 600;
}

.password-strength .strength-weak {
    color: var(--danger);
}

.password-strength .strength-fair {
    color: var(--warning);
}

.password-strength .strength-good {
    color: #22c55e;
}

.password-strength .strength-strong {
    color: var(--success);
}

.password-strength .strength-very-strong {
    color: var(--success);
}

/* ==========================================
   Checkbox Labels
   ========================================== */
.checkbox-label {
    cursor: pointer;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--gray-700);
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 0.25rem;
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
}

.checkbox-label span {
    flex: 1;
}

.checkbox-label a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.checkbox-label a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   Alert Messages
   ========================================== */
.alert {
    border-radius: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.alert-success {
    background: #f0fdf4;
    border: 2px solid #bbf7d0;
    color: #166534;
}

.alert-success i {
    color: var(--success);
}

.alert-danger {
    background: #fef2f2;
    border: 2px solid #fecaca;
    color: #991b1b;
}

.alert-danger i {
    color: var(--danger);
}

.error-list {
    margin: 0;
    padding-left: 1.25rem;
    list-style: none;
}

.error-list li {
    margin-bottom: 0.25rem;
}

.error-list li:last-child {
    margin-bottom: 0;
}

.error-list li::before {
    content: '•';
    margin-right: 0.5rem;
}

/* ==========================================
   Buttons
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.btn-block {
    width: 100%;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

/* ==========================================
   Form Options (Remember me / Forgot password)
   ========================================== */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.forgot-link {
    color: var(--primary);
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   Divider
   ========================================== */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.5rem 0;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--gray-300);
}

.divider span {
    padding: 0 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
}

/* ==========================================
   Social Login
   ========================================== */
.social-login {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem;
    border: 2px solid var(--gray-300);
    border-radius: 0.75rem;
    background: white;
    color: var(--gray-700);
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
    flex: 1;
    position: relative;
    z-index: 1;
    pointer-events: auto;
}

.btn-social:hover {
    background: var(--gray-50);
    border-color: var(--gray-400);
    transform: translateY(-1px);
}

.btn-social:active {
    transform: translateY(0);
}

.btn-google {
    border-color: #ea4335;
    color: #ea4335;
}

.btn-google:hover {
    background: #fef2f2;
    border-color: #dc2626;
}

.btn-facebook {
    border-color: #1877f2;
    color: #1877f2;
}

.btn-facebook:hover {
    background: #eff6ff;
    border-color: #1d4ed8;
}

/* ==========================================
   Auth Footer
   ========================================== */
.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.auth-footer p {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin: 0;
}

.auth-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================
   Back to Home
   ========================================== */
.back-to-home {
    text-align: center;
    margin-top: 1rem;
}

.back-to-home a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-600);
    font-size: 0.9375rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.back-to-home a:hover {
    color: var(--primary);
}

.back-to-home i {
    font-size: 1rem;
}

/* ==========================================
   Auth Branding Section (Left Side)
   ========================================== */
.auth-branding {
    display: none;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.95) 0%, rgba(118, 75, 162, 0.95) 100%);
    padding: 3rem;
    border-radius: 1.5rem 0 0 1.5rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.auth-branding::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.branding-content {
    position: relative;
    z-index: 1;
}

.auth-branding .logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 3rem;
    color: white;
    text-decoration: none;
}

.auth-branding .logo img {
    height: 40px;
}

.auth-branding .logo span {
    font-size: 1.5rem;
    font-weight: 700;
}

.auth-branding h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 1rem;
    line-height: 1.2;
}

.auth-branding > p,
.branding-content > p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 3rem;
}

/* Branding Benefits */
.branding-benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}

.benefit-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.benefit-icon i {
    font-size: 1.5rem;
}

.benefit-text h4 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
}

.benefit-text p {
    font-size: 0.9375rem;
    opacity: 0.9;
    margin: 0;
}

/* Branding Features */
.branding-features {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    opacity: 0.95;
}

.feature-item i {
    font-size: 1.25rem;
    color: #10b981;
}

/* Branding Stats */
.branding-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.stat {
    text-align: center;
}

.stat strong {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat span {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ==========================================
   Auth Form Container (Right Side)
   ========================================== */
.auth-form-container {
    flex: 1;
    padding: 3rem 2.5rem;
    background: white;
    border-radius: 1.5rem;
    max-width: 480px;
    margin: 0 auto;
    width: 100%;
}

.auth-form-wrapper {
    max-width: 400px;
    margin: 0 auto;
}

/* ==========================================
   Two Column Layout (Desktop)
   ========================================== */
@media (min-width: 1024px) {
    .auth-container {
        padding: 2rem;
        display: grid;
        grid-template-columns: 5fr 7fr;
        max-width: 1200px;
        margin: 0 auto;
        background: white;
        border-radius: 1.5rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
        overflow: hidden;
        min-height: auto;
    }

    .auth-branding {
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .auth-form-container {
        display: flex;
        align-items: center;
        max-width: none;
        border-radius: 0 1.5rem 1.5rem 0;
    }
}

/* ==========================================
   Responsive Design
   ========================================== */
@media (max-width: 1023px) {
    .auth-container {
        display: flex;
    }

    .auth-branding {
        display: none !important;
    }

    .auth-form-container {
        border-radius: 1.5rem;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    }
}

@media (max-width: 768px) {
    .auth-container {
        padding: 1rem;
    }
    
    .auth-form-container {
        padding: 2rem 1.5rem;
        border-radius: 1.25rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .social-login {
        flex-direction: column;
    }

    .branding-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

@media (max-width: 480px) {
    .auth-form-container {
        padding: 1.5rem 1rem;
    }
    
    .auth-header h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
    }

    .auth-branding h1 {
        font-size: 2rem;
    }

    .auth-branding .branding-content > p {
        font-size: 1rem;
    }
}