/* ========== صفحة تسجيل الدخول ========== */
.login-page {
    font-family: 'Cairo', sans-serif;
    background: linear-gradient(135deg, #e0f7fa 0%, #b2ebf2 50%, #80deea 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: #ffffff;
    border-radius: 20px;
    padding: 35px 30px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 188, 212, 0.15);
    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, #00bcd4, #4dd0e1, #00bcd4);
}

@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, #00bcd4, #4dd0e1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    box-shadow: 0 8px 25px rgba(0, 188, 212, 0.25);
    animation: pulseLogo 2s infinite;
}

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

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

.login-title {
    color: #006064;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 5px;
}

.login-subtitle {
    color: #78909c;
    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: #006064;
    font-size: 0.85rem;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.login-form-container .form-label i {
    color: #00bcd4;
    font-size: 0.8rem;
}

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

.login-form-container .form-control:focus {
    border-color: #00bcd4;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(0, 188, 212, 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: #b0bec5;
    cursor: pointer;
    font-size: 1rem;
    transition: color 0.3s;
    padding: 5px;
}

.toggle-password:hover {
    color: #00bcd4;
}

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

.remember-check .form-check-input {
    width: 18px;
    height: 18px;
    accent-color: #00bcd4;
    cursor: pointer;
}

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

/* ========== الأزرار ========== */
.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00bcd4, #4dd0e1);
    color: #ffffff;
    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(0, 188, 212, 0.35);
}

.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: #b0bec5;
    font-size: 0.8rem;
}

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

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

.btn-guest {
    width: 100%;
    padding: 12px;
    background: transparent;
    color: #006064;
    border: 2px solid #e0f7fa;
    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: #00bcd4;
    color: #00bcd4;
    background: rgba(0, 188, 212, 0.05);
}

/* ========== معلومات النظام ========== */
.login-info {
    background: #f5fdfe;
    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: #78909c;
}

.info-row i {
    color: #00bcd4;
    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(0, 96, 100, 0.5);
    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, #0d1f24 0%, #1a2f35 50%, #0d1f24 100%);
}

body.dark-mode .login-card {
    background: #263238;
    color: #e0f7fa;
}

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

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

body.dark-mode .login-form-container .form-control {
    background: #37474f;
    border-color: #546e7a;
    color: #e0f7fa;
}

body.dark-mode .login-form-container .form-control:focus {
    background: #37474f;
    border-color: #00bcd4;
}

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

body.dark-mode .login-info {
    background: #37474f;
}

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

body.dark-mode .btn-guest {
    border-color: #546e7a;
    color: #b2ebf2;
}

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