/* ===================================================
   CSS موحّد ونظيف (النسخة النهائية والمُرتَّبة)
   =================================================== */

/* الأنماط العامة والموقع */
body {
    font-family: 'Tahoma', 'Arial', sans-serif; 
    background: #f8f9fa; /* خلفية نظيفة جداً */
    color: #333; 
    margin: 0;
    padding: 0;
    direction: rtl; /* دعم اللغة العربية */
}
.container {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 15px;
}
h2, h3 {
    color: #0d6efd; 
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    margin-top: 30px;
}

/* الأنماط العامة للعناصر */
input, textarea, select {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ced4da;
    border-radius: 6px;
    box-sizing: border-box; 
}
button {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    background: #0d6efd; 
    color: #fff;
    cursor: pointer;
    transition: background-color 0.3s;
    font-weight: bold;
}
button:hover {
    background: #0b5ed7;
}

/* أنماط البطاقات */
.card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); 
    margin-bottom: 25px;
}
.error {
    background: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 15px;
    border: 1px solid #f5c6cb;
}

/* شريط التنقل */
.topnav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: #343a40; 
    color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.topnav .brand {
    font-size: 1.5em;
    font-weight: bold;
    color: #0d6efd;
}
.topnav .links a {
    margin-right: 15px; 
    color: #ccc;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 4px;
    transition: color 0.3s, background-color 0.3s;
}
.topnav .links a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

/* ====================================
   أنماط لوحة التحكم (Dashboard)
   ==================================== */

/* بطاقات ملخص الأداء (KPI Cards) */
.kpi-container {
    display: flex;
    justify-content: space-between;
    gap: 20px; 
}
.kpi-card {
    background: white; 
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: right; 
    width: 33.33%; 
    border-left: 5px solid; 
    transition: transform 0.3s;
}
.kpi-card:hover {
    transform: translateY(-5px); 
}

/* الألوان الخاصة بالبطاقات */
.kpi-total { border-color: #0d6efd; }
.kpi-open { border-color: #dc3545; }
.kpi-checked-in { border-color: #198754; }

.kpi-card h3 {
    font-size: 1em;
    color: #6c757d; 
    margin-bottom: 5px;
    padding-bottom: 0;
    border-bottom: none;
}
.kpi-card p {
    font-size: 2.5em;
    font-weight: bold;
    margin: 5px 0 0 0;
    line-height: 1.1;
}

/* أنماط الجداول المحسّنة */
table{width:100%;border-collapse:collapse;background:white;margin-top:10px; border-radius: 8px; overflow: hidden; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);}
table th{padding:12px 8px; background: #0d6efd; color: white; text-align: right;} 
table td{padding:10px 8px;border:1px solid #eee;text-align:right} 
table tr:nth-child(even) {background-color: #f7f9fc;}

/* أنماط واجهة تسجيل الدخول */
.login-body {
    background-image: url('background.jpg');
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0;
}
.login-body .card {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    max-width: 450px;
    width: 90%;
    margin-bottom: 0;
}