/* ============================
   التحكم في الاتجاه (RTL / LTR)
   ============================ */
html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

/* ============================
   التصميم العام
   ============================ */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f9f9f9;
}

h2, h3 {
    color: #444;
}

.btn-warning {
    color: white;
}

.card-body button {
    font-weight: bold;
}

.container {
    padding-right: 15px;
    padding-left: 15px;
}

/* ============================
   الحاوي العام (Wrapper)
   ============================ */
#wrapper {
    display: flex;
    transition: all 0.3s ease;
}

#page-content-wrapper {
    flex-grow: 1;
    transition: all 0.3s ease;
}

/* الوضع الطبيعي */
html[dir="rtl"] #page-content-wrapper {
    padding: 20px 30px 20px 15px;
}

html[dir="ltr"] #page-content-wrapper {
    padding: 20px 15px 20px 30px;
}

/* الوضع عند تصغير السايدبار */
html[dir="rtl"] #sidebar.collapsed + #page-content-wrapper,
html[dir="ltr"] #sidebar.collapsed + #page-content-wrapper {
    padding: 20px 15px;
}

/* ============================
   Sidebar الأساسي
   ============================ */
#sidebar {
    width: 250px;
    min-height: 100vh;
    background-color: #222;
    color: white;
    transition: all 0.3s ease;
}

html[dir="rtl"] #sidebar {
    border-left: 1px solid #444;
}

html[dir="ltr"] #sidebar {
    border-right: 1px solid #444;
}

#sidebar .sidebar-text {
    display: inline;
    transition: all 0.3s ease;
}

/* محاذاة النصوص داخل السايدبار حسب اللغة */
html[dir="rtl"] #sidebar .nav-link {
    text-align: right;
    justify-content: flex-end;
}

html[dir="ltr"] #sidebar .nav-link {
    text-align: left;
    justify-content: flex-start;
}

html[dir="rtl"] #sidebar .sidebar-text {
    margin-left: 0;
    margin-right: 10px;
}

html[dir="ltr"] #sidebar .sidebar-text {
    margin-right: 0;
    margin-left: 10px;
}

/* زر التصغير */
#sidebar .btn {
    background: none;
    border: none;
}

/* ============================
   Sidebar عند التصغير
   ============================ */
#sidebar.collapsed {
    width: 70px;
}

#sidebar.collapsed .sidebar-text {
    display: none;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
}

#sidebar.collapsed .nav-link i {
    margin: 0 !important;
}

/* ============================
   الروابط النشطة (active)
   ============================ */
#sidebar .nav-link.active {
    background-color: #007bff;
    color: white !important;
    font-weight: bold;
}

#sidebar.collapsed .nav-link.active {
    background-color: #007bff;
}

#sidebar.collapsed .nav-link.active i {
    color: white !important;
}

/* ============================
   Responsive (شاشات صغيرة)
   ============================ */
@media (max-width: 768px) {
    #sidebar {
        width: 70px;
    }

    #sidebar .sidebar-text {
        display: none;
    }

    html[dir="rtl"] #page-content-wrapper,
    html[dir="ltr"] #page-content-wrapper {
        padding: 20px 15px;
    }
}

/* ============================
   الـ Navbar
   ============================ */
.navbar .nav-link {
    padding-left: 10px;
    padding-right: 10px;
}


.hidden-wrapper {
    display: none !important;
}

.toast {
    background-color: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toast.show {
    opacity: 1;
}

.mr-auto
{
    margin-right: 2% !important;
    margin-left: 2% !important;
     padding-bottom: 60px; /* نفس ارتفاع الفوتر تقريبا */
}

nav a{
    color: white !important;
}
nav button{
    color: white !important;
}
nav ul li{
    color: white !important;
}
nav span{
    color: white !important;
}
nav i{
    color: white !important;
}

nav .nav-link.active {
    background-color: #20c997; /* تركواز غامق هادي */
    color: white !important;
    font-weight: bold;
    border-radius: 6px; /* لمسة ناعمة */
}

nav.collapsed .nav-link.active {
    background-color: #20c997;
}

nav.collapsed .nav-link.active i {
    color: white !important;
}


/*************************************/
.greeting-link {
    display: inline-flex;
    align-items: center;
    font-weight: bold;
    color: #fff; /* النص أبيض للوضوح */
    background: linear-gradient(135deg, #20c997, #17a2b8); /* تركواز × أزرق فاتح */
    padding: 10px 10px; /* شوية مساحة داخلية */
    border-radius: 8px; /* زوايا ناعمة */
}


.greeting-link::before {
    content: "👋";
    margin-right: 6px;
    display: inline-block;
    animation: waveHand 2s infinite;
}

@keyframes waveHand {
    0% { transform: rotate(0deg); }
    10% { transform: rotate(20deg); }
    20% { transform: rotate(-15deg); }
    30% { transform: rotate(10deg); }
    40% { transform: rotate(-5deg); }
    50%, 100% { transform: rotate(0deg); }
}


/******************** footer *********/

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #111;
    color: #bbb;
    text-align: center;
    padding: 10px 5px;
    font-size: 14px;
    border-top: 1px solid #333;
    z-index: 1000;
}

.site-footer p {
    margin: 0;
    letter-spacing: 0.5px;
}

.site-footer p:hover {
    color: #20c997;
    transition: color 0.3s ease-in-out;
}

/* مساحة فارغة أسفل المحتوى حتى لا يغطيه الفوتر */

/* الخلفية العامة */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3c72, #2a5298); /* gradient أزرق عصري */
}

/* الكرت الأبيض */
.login-card {
    background: #fff;
    padding: 27px 17px;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    max-width: 470px;
    width: 100%;
    text-align: center;
}

/* اللوغو */
.logos {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.logos img {
    height: 140px;
}

/* عنوان الصفحة */
.login-title {
    color: #333;
    font-weight: bold;
    margin-bottom: 20px;
}

/* حقول الفورم */
.login-card .form-control {
    border-radius: 8px;
    padding: 10px;
}

/* زر الدخول */
.login-card .btn-primary {
    border-radius: 8px;
    padding: 10px;
    background: linear-gradient(90deg,#20c997,#17a2b8);
    border: none;
    font-weight: bold;
    transition: 0.3s;
}

.login-card .btn-primary:hover {
    opacity: 0.9;
}

/* رابط نسيت كلمة المرور */
.forgot-password {
    margin-top: 15px;
}

.forgot-password a {
    color: #20c997;
    text-decoration: none;
    transition: color 0.3s;
}

.forgot-password a:hover {
    color: #17a2b8;
}


.login-navbar {
    width: 100%;
    padding: 15px 30px;
    background: rgba(0, 0, 0, 0.6); /* شفاف أسود */
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(8px); /* يعطي تأثير مودرن */
}

.login-navbar .navbar-brand {
    display: flex;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-weight: bold;
}

.login-navbar .brand-logo {
    height: 40px;
    margin-right: 10px;
}

.login-navbar .navbar-links {
    list-style: none;
    display: flex;
    gap: 25px;
    margin: 0;
    padding: 0;
}

.login-navbar .navbar-links li a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.login-navbar .navbar-links li a:hover {
    color: #20c997; /* تركواز عصري */
}
