/**
 * Login Page Styles
 * أنماط صفحة تسجيل الدخول
 */

.login-page {
    min-height: 100vh;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Background Pattern */
.login-page::before {
    display: none;
}

.login-container {
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 1;
}

.login-wrapper {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Language Switcher */
.login-lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    z-index: 2;
}

[dir="ltr"] .login-lang-switcher {
    right: 16px;
    left: auto;
}

.login-lang-switcher .lang-link {
    color: #6c757d;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.login-lang-switcher .lang-link:hover {
    color: #17a2b8;
    background: rgba(23, 162, 184, 0.08);
}

.login-lang-switcher .lang-link.active {
    color: #17a2b8;
    font-weight: 600;
}

.login-lang-switcher .lang-sep {
    color: #dee2e6;
    user-select: none;
}

/* Login Card */
.login-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 40px;
    animation: slideUp 0.5s ease;
    position: relative;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Logo Section */
.login-logo {
    text-align: center;
    margin-bottom: 30px;
}

.logo-image {
    max-height: 80px;
    width: auto;
    margin-bottom: 15px;
}

.logo-text {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 0 0 5px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-subtitle {
    font-size: 14px;
    color: #6c757d;
    margin: 0;
}

/* Login Form */
.login-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 8px;
}

.form-label i {
    color: #17a2b8;
    font-size: 16px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 15px;
    color: #495057;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #17a2b8;
    background: white;
    box-shadow: 0 0 0 4px rgba(23, 162, 184, 0.1);
}

.form-control::placeholder {
    color: #adb5bd;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.password-toggle:hover {
    color: #17a2b8;
}

.password-input-wrapper .form-control {
    padding-left: 45px;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 14px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #17a2b8;
}

.remember-me label {
    cursor: pointer;
    color: #495057;
    user-select: none;
}

.forgot-password {
    color: #17a2b8;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #138496;
    text-decoration: underline;
}

/* Login Button */
.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.4);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Download App Button */
.download-app-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    margin-top: 16px;
    padding: 12px 16px;
    background: transparent;
    color: #17a2b8;
    border: 2px solid #17a2b8;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.download-app-btn:hover {
    background: rgba(23, 162, 184, 0.08);
    color: #138496;
    border-color: #138496;
}

.download-app-btn i {
    font-size: 18px;
}

.btn-loader i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Login Footer */
.login-footer {
    text-align: center;
    color: #6c757d;
    font-size: 14px;
}

.login-footer p {
    margin: 0;
}

/* Toast Container */
.toast-container {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex !important;
    align-items: center;
    gap: 12px;
    pointer-events: auto;
    max-width: 400px;
    margin: 0 auto;
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: relative;
    z-index: 10000;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid #28a745;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.info {
    border-left: 4px solid #17a2b8;
}

.toast i {
    font-size: 20px;
}

.toast.success i {
    color: #28a745;
}

.toast.error i {
    color: #dc3545;
}

.toast.info i {
    color: #17a2b8;
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: #333;
}

/* Responsive */
@media (max-width: 576px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .logo-text {
        font-size: 28px;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

