/* ========== صفحة تسجيل الدخول ========== */
.login-page {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 50%, #1a5276 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
}

.login-container {
    width: 100%;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 35px 30px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.6s ease;
    position: relative;
    overflow: hidden;
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #3498db, #2c3e50, #3498db);
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ========== الشعار ========== */
.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
    animation: pulseLogo 2s infinite;
}

.login-logo i {
    font-size: 2.5rem;
    color: white;
}

@keyframes pulseLogo {
    0%, 100% { transform: scale(1); box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 12px 35px rgba(52, 152, 219, 0.6); }
}

.login-title {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.login-subtitle {
    color: #888;
    font-size: 0.85rem;
    font-weight: 400;
}

/* ========== النموذج ========== */
.login-form-container {
    margin-bottom: 25px;
}

.login-form-container .form-group {
    margin-bottom: 18px;
}

.login-form-container .form-label {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-form-container .form-label i {
    color: var(--secondary-color);
    font-size: 0.8rem;
}

.login-form-container .form-control {
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 12px 15px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.login-form-container .form-control:focus {
    border-color: var(--secondary-color);
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
    outline: none;
}

.password-wrapper {
    position: relative;
}

.password-wrapper .form-control {
    padding-left: 45px;
}

.toggle-password {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #aaa;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 5px;
}

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

.remember-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
}

.remember-check .form-check-input {
    width: 18px;
    height: 18px;
    accent-color: var(--secondary-color);
    cursor: pointer;
}

.remember-check label {
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
}

/* ========== الأزرار ========== */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

.btn-login:active {
    transform: translateY(0);
}

.btn-login.loading {
    pointer-events: none;
    opacity: 0.8;
}

.btn-login.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-divider {
    display: flex;
    align-items: center;
    margin: 20px 0;
    color: #aaa;
    font-size: 0.8rem;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.login-divider span {
    padding: 0 15px;
}

.btn-guest {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: var(--primary-color);
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-weight: 500;
    font-size: 0.9rem;
    font-family: 'Cairo', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-guest:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.05);
}

/* ========== معلومات النظام ========== */
.login-info {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 0;
    font-size: 0.8rem;
    color: #666;
}

.info-row i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

/* ========== إشعار الخطأ ========== */
.login-alert {
    background: #fdedec;
    border: 1px solid #f5b7b1;
    border-radius: 10px;
    padding: 12px 15px;
    display: none;
    align-items: center;
    gap: 10px;
    color: #c0392b;
    font-size: 0.85rem;
    font-weight: 500;
    animation: shake 0.5s ease;
}

.login-alert.show {
    display: flex;
}

.login-alert i {
    font-size: 1.1rem;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

/* ========== التذييل ========== */
.login-footer {
    text-align: center;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
}

.login-footer .version {
    margin-top: 5px;
    opacity: 0.6;
}

/* ========== Responsive ========== */
@media (max-width: 480px) {
    .login-card {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .login-title {
        font-size: 1.1rem;
    }

    .login-logo {
        width: 65px;
        height: 65px;
    }

    .login-logo i {
        font-size: 2rem;
    }

    .btn-login, .btn-guest {
        padding: 12px;
        font-size: 0.9rem;
    }
}

@media (max-width: 320px) {
    .login-card {
        padding: 20px 15px;
    }

    .login-title {
        font-size: 1rem;
    }
}

/* ========== Dark Mode ========== */
body.dark-mode .login-page {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

body.dark-mode .login-card {
    background: #2d2d44;
    color: #e0e0e0;
}

body.dark-mode .login-title {
    color: #e0e0e0;
}

body.dark-mode .login-subtitle {
    color: #aaa;
}

body.dark-mode .login-form-container .form-control {
    background: #3d3d5c;
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .login-form-container .form-control:focus {
    background: #3d3d5c;
    border-color: var(--secondary-color);
}

body.dark-mode .login-form-container .form-label {
    color: #e0e0e0;
}

body.dark-mode .login-info {
    background: #3d3d5c;
}

body.dark-mode .info-row {
    color: #ccc;
}

body.dark-mode .btn-guest {
    border-color: #555;
    color: #e0e0e0;
}

body.dark-mode .login-divider::before,
body.dark-mode .login-divider::after {
    background: #555;
}
