/* ============================================
   Authentication Page Styles
   ============================================ */

.auth-page {
    margin: 0;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0d1117 0%, #1c2128 100%);
    position: relative;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(88, 166, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0, 210, 106, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 71, 87, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.auth-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: 1400px;
    width: 95%;
    background: var(--bg-secondary);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: visible;
    position: relative;
    z-index: 1;
    min-height: auto;
    max-height: calc(100vh - 40px);
}

/* Left Side - Branding */
.auth-left {
    background: linear-gradient(135deg, #1c2128 0%, #21262d 100%);
    padding: 40px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.auth-branding {
    text-align: center;
    margin-bottom: 40px;
}

.auth-branding i {
    font-size: 3.5rem;
    color: var(--accent-blue);
    margin-bottom: 15px;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.auth-branding h1 {
    font-size: 2.2rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-branding p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.auth-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: rgba(88, 166, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(88, 166, 255, 0.1);
    transition: var(--transition);
}

.feature:hover {
    transform: translateX(-5px);
    border-color: var(--accent-blue);
}

.feature i {
    font-size: 1.8rem;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.feature h3 {
    color: var(--text-primary);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.feature p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Right Side - Forms */
.auth-right {
    padding: 30px 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
    max-height: calc(100vh - 40px);
}

.auth-form {
    width: 100%;
    max-width: 450px;
    padding: 20px 0;
}

.auth-header {
    text-align: center;
    margin-bottom: 25px;
}

.auth-header h2 {
    font-size: 1.75rem;
    color: var(--text-primary);
    margin-bottom: 8px;
    font-weight: 700;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Form Elements */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.input-with-icon {
    position: relative;
    display: flex;
    align-items: center;
}

.input-with-icon i {
    position: absolute;
    right: 16px;
    color: var(--text-muted);
    font-size: 1rem;
}

.input-with-icon input {
    width: 100%;
    padding: 12px 46px 12px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    transition: var(--transition);
}

.input-with-icon input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.1);
}

.toggle-password {
    position: absolute;
    left: 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 5px;
    transition: var(--transition);
}

.toggle-password:hover {
    color: var(--accent-blue);
}

.password-hint {
    display: block;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--accent-blue);
}

.checkbox-label span a {
    color: var(--accent-blue);
    text-decoration: none;
    transition: var(--transition);
}

.checkbox-label span a:hover {
    text-decoration: underline;
}

.forgot-password {
    color: var(--accent-blue);
    text-decoration: none;
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Auth Buttons */
.auth-btn {
    width: 100%;
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.auth-btn.primary {
    background: var(--gradient-green);
    color: white;
    margin-bottom: 15px;
}

.auth-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 210, 106, 0.4);
}

.auth-btn.google {
    background: white;
    color: #333;
    border: 1px solid #ddd;
}

.auth-btn.google:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.auth-btn.google i {
    font-size: 1.2rem;
}

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

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

.divider span {
    padding: 0 15px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 20px;
}

.auth-footer p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.auth-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

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

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-secondary);
    border: 1px solid var(--accent-green);
    padding: 16px 24px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-lg);
    transition: transform 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
}

.toast i {
    color: var(--accent-green);
    font-size: 1.2rem;
}

.toast.error {
    border-color: var(--accent-red);
}

.toast.error i {
    color: var(--accent-red);
}

/* Responsive Design */
@media (max-width: 1200px) {
    .auth-container {
        max-width: 1100px;
    }

    .auth-left {
        padding: 30px;
    }

    .auth-branding {
        margin-bottom: 40px;
    }

    .auth-branding i {
        font-size: 3rem;
    }

    .auth-branding h1 {
        font-size: 2rem;
    }

    .feature {
        padding: 15px;
        gap: 15px;
    }

    .feature i {
        font-size: 1.5rem;
    }
}

@media (max-width: 1024px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-height: none;
    }

    .auth-left {
        display: none;
    }

    .auth-right {
        padding: 30px;
        max-height: none;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .auth-page {
        padding: 15px;
    }

    .auth-container {
        width: 100%;
        border-radius: 16px;
    }

    .auth-right {
        padding: 25px 20px;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .auth-header {
        margin-bottom: 20px;
    }

    .form-group {
        margin-bottom: 15px;
    }

    .input-with-icon input {
        padding: 12px 44px 12px 14px;
        font-size: 0.95rem;
    }

    .auth-btn {
        padding: 12px 20px;
    }

    .divider {
        margin: 15px 0;
    }

    .auth-footer {
        margin-top: 15px;
    }
}

@media (max-width: 480px) {
    .auth-page {
        padding: 0;
    }

    .auth-container {
        width: 100%;
        border-radius: 0;
        min-height: 100vh;
    }

    .auth-right {
        padding: 20px 15px;
    }

    .auth-header h2 {
        font-size: 1.4rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    .input-with-icon input {
        padding: 11px 40px 11px 12px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .password-hint {
        font-size: 0.75rem;
    }

    .auth-btn {
        padding: 11px 18px;
        font-size: 0.95rem;
        border-radius: 10px;
    }

    .auth-btn.primary {
        margin-bottom: 15px;
    }

    .divider {
        margin: 12px 0;
        font-size: 0.8rem;
    }

    .auth-footer {
        margin-top: 12px;
    }

    .auth-footer p {
        font-size: 0.9rem;
    }

    .checkbox-label {
        font-size: 0.85rem;
    }
}

@media (max-height: 700px) {
    .auth-right {
        align-items: flex-start;
    }

    .auth-form {
        padding: 10px 0;
    }

    .auth-header {
        margin-bottom: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .divider {
        margin: 12px 0;
    }

    .auth-footer {
        margin-top: 12px;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 17, 23, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    text-align: center;
    color: var(--text-primary);
}

.loading-spinner i {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 15px;
}

.loading-spinner p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}
