/* ============================
   البودي
============================ */
body {
  font-family: 'Cairo', sans-serif;
  background: #f8f9fa;
  color: #212529;
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0;
  padding: 0;
  padding-top: 60px;    /* للهيدر */
  padding-bottom: 90px; /* للفوتر */
}

/* ============================
   الهيدر الثابت
============================ */
.navbar {
  background-color: #6c757d !important;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
}
.navbar-brand, .nav-link, .btn {
  color: #fff !important;
  font-size: 1rem;
}
.nav-link:hover {
  color: #f8f9fa !important;
}

/* ============================
   الفوتر الثابت
============================ */
footer {
  background: #868e96 !important;
  color: #fff !important;
  font-size: 0.9rem !important;
  padding: 12px 0 !important;
  text-align: center !important;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;

  border-top: 3px solid #6c757d !important;
  box-shadow: 0 -4px 8px rgba(0,0,0,0.25) !important;
}

/* ============================
   الكروت (Cards)
============================ */
.cards-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  justify-content: flex-start;
}
.cards-wrapper .card {
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  padding: 12px;
  background: #fff;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin-bottom: 15px;
}
.cards-wrapper .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.12);
}
.cards-wrapper .card h6, 
.cards-wrapper .card p {
  white-space: normal;
  overflow-wrap: break-word;
}

/* 💻 كمبيوتر: كرت ثابت */
@media (min-width: 1200px) {
  .cards-wrapper .card {
    width: 120px;
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin: 8px;
    text-align: center;
    overflow: hidden;
  }
  .cards-wrapper .card h6 a {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.8rem;
    white-space: normal;
    max-width: 100%;
  }
  .cards-wrapper .card p {
    font-size: 0.7rem;
    line-height: 1.2;
    margin: 2px 0 0;
  }
}

/* ============================
   الجداول
============================ */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.9rem;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
table thead {
  background-color: #dee2e6;
  color: #212529;
  text-align: center;
  font-weight: 700;
  letter-spacing: 0.5px;
}
table th, table td {
  padding: 10px 12px;
  border: 1px solid #ced4da;
  vertical-align: middle;
}
table thead th {
  border-bottom: 2px solid #adb5bd;
}
table tbody tr:nth-child(even) { background-color: #f8f9fa; }
table tbody tr:hover { background-color: #e9ecef; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* محاذاة مخصصة */
.text-left   { text-align: left !important; }
.text-right  { text-align: right !important; }
.text-center { text-align: center !important; }

/* ============================
   الأزرار
============================ */
a.btn-common,
button.btn-common {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #6c757d;
  border-radius: 30px;
  padding: 10px 20px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease-in-out;
}
a.btn-common:hover,
button.btn-common:hover {
  background: #5a6268;
  color: #fff;
}

/* ============================
   الملاحظات (Alerts)
============================ */
.alert-custom {
  background-color: #f1f3f5;
  border: 1px solid #dee2e6;
  color: #212529;
  font-size: 0.9rem;
  border-radius: 8px;
}
.bi-info-circle-fill {
  color: #6c757d;
  margin-left: 5px;
}
form .mb-3 { margin-bottom: 0.10rem !important; }

/* ============================
   تبويبات المفضلات
============================ */
.fav-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
.fav-tab {
  background: #e9ecef;
  color: #212529;
  padding: 8px 14px;
  border-radius: 8px 8px 0 0;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s ease;
}
.fav-tab:hover {
  background: #dee2e6;
  color: #000;
}
.fav-tab.active {
  background: #6c757d;
  color: #fff;
}

/* ============================
   كابتشا
============================ */
.captcha-box {
  user-select: none;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
  margin-right: 0;
}

/* أيقونات الأزرار العادية (مع استثناء btn-icon) */
button:not(.btn-icon) .bi,
a.btn:not(.btn-icon) .bi {
  color: #fff !important;
}

/* زر إعادة التوليد */
#regenCaptcha {
  padding: 6px 8px;
  margin-left: 5px;
}

/* زر أيقونة فقط (بدون خلفية) */
.btn-icon {
  background: none !important;
  border: none !important;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-icon .bi {
  font-size: 1.2rem;
  color: #212529 !important;
}
.btn-icon:hover .bi {
  color: #000;
}

/* ============================
   فورم عام
============================ */
.form-wrapper {
  max-width: 600px;
  margin: 0 auto;
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.profile-form .form-control {
  margin-bottom: 1.5rem; /* يضيف تباعد 24px بين كل حقل */
  padding: 0.8rem 1rem;  /* يخلي الحقل نفسه أكبر وأريح */
}

.btn-common, .btn-cancel {
  min-width: 130px;         /* يخليهم نفس العرض */
  text-align: center;
  border-radius: 8px;       /* نفس الزوايا */
  padding: 0.5rem 1rem;
}

.btn-common, .btn-cancel {
  min-width: 150px;
  text-align: center;
  border-radius: 30px;   /* زوايا مستديرة */
  padding: 0.6rem 1.2rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

/* زر الحفظ (الأساسي) */
.btn-common {
  background-color: #6c757d;
  color: #fff;
  border: none;
}
.btn-common:hover {
  background-color: #5a6268;
}

/* زر الإلغاء (الثانوي) */
.btn-cancel {
  background-color: #fff;
  color: #6c757d;
  border: 2px solid #6c757d;
}
.btn-cancel:hover {
  background-color: #f8f9fa;
  color: #343a40;
  border-color: #343a40;
}
/* 🌞 ثيم فاتح */
body.admin-light {
  background: #f8f9fa;
  color: #212529;
}
body.admin-light .sidebar {
  background: #ffffff;
  color: #212529;
}
body.admin-light .sidebar a {
  color: #212529;
}
body.admin-light .sidebar a.active {
  background: #0d6efd;
  color: #fff;
}

/* 🌙 ثيم داكن */
body.admin-dark {
  background: #1e1e1e;
  color: #eaeaea;
}
body.admin-dark .sidebar {
  background: #212529;
  color: #fff;
}
body.admin-dark .sidebar a {
  color: #adb5bd;
}
body.admin-dark .sidebar a.active {
  background: #0d6efd;
  color: #fff;
}

