/* =========================
   Admin Dashboard - style_admin.css
   (Use only inside admin pages)
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700;800&display=swap');

:root{
  --primary-green:#007a3d;
  --strong-red:#ce1127;
  --accent-gold:#D8C9A3;
  --dark-text:#4A4A4A;
  --bg-color:#F5F5F5;
  --white:#FFFFFF;
  --footer-bg:#3D5D50;
}

*{ box-sizing:border-box; margin:0; padding:0; font-family:'Cairo', sans-serif; }
html{ scroll-behavior:smooth; }

body.dashboard-body{
  background:#f0f2f5;
  color:var(--dark-text);
  direction:rtl;
  text-align:right;
  height:100vh;
  overflow:hidden; /* lock page scroll */
}

a{ color:inherit; text-decoration:none; transition:.2s; }
img{ max-width:100%; height:auto; display:block; }

/* Layout */
.admin-layout{ min-height:100vh; }

.admin-sidebar{
  width:260px;
  background:var(--footer-bg);
  color:var(--white);
  display:flex;
  flex-direction:column;
  padding:20px;
  position:fixed;
  height:100vh;
  right:0;
  top:0;
  box-shadow:-2px 0 10px rgba(0,0,0,.10);
  overflow-y:auto;
  z-index: 1000;
}

/* Brand */
.sidebar-brand{
  text-align:center;
  margin-bottom:18px;
  padding-bottom:14px;
  border-bottom:1px solid rgba(255,255,255,.10);
}
.brand-text{
  color:var(--accent-gold);
  font-size:1.35rem;
  font-weight:900;
}

/* Nav */
.admin-nav-link{
  display:flex;
  align-items:center;
  padding:12px 15px;
  color:rgba(255,255,255,.85);
  margin-bottom:8px;
  border-radius:10px;
  font-weight:400; /* الخط عادي كما طلبت */
  font-size: 0.95rem;
}
.admin-nav-link i{ margin-left:10px; width:20px; text-align:center; }

.admin-nav-link:hover,
.admin-nav-link.active{
  background:var(--primary-green);
  color:var(--white);
  transform:none;
  font-weight: 600; /* تمييز بسيط عند التحديد */
}

/* Footer area */
.sidebar-footer {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column; /* ترتيب العناصر فوق بعضها */
  align-items: stretch;   /* تمديد العناصر لتأخذ العرض الكامل */
  gap: 5px;               /* مسافة صغيرة بين الروابط */
}

/* تنسيق الروابط داخل الفوتر لضمان محاذاتها لليمين */
.sidebar-footer .admin-nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start !important; /* إجبار المحاذاة لليمين (بداية السطر) */
  padding: 12px 15px;
  margin: 0;
  text-align: right;
}

/* إذا كان هناك صورة (لوجو) داخل الفوتر، نجعلها في المنتصف */
.sidebar-footer img {
  margin: 0 auto 15px auto; /* توسيط الصورة */
  align-self: center;       /* ضمان عدم تمدد الصورة */
}

/* Content */
.admin-content{
  margin-right:260px;
  width:calc(100% - 260px);
  height:100vh;
  overflow-y:auto;
  overflow-x:hidden;
  padding:30px;
  background:var(--bg-color);
}

/* Headers / Cards / Tables */
.admin-section-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin:0 0 20px;
  padding-bottom:10px;
  border-bottom:2px solid #e0e0e0;
}
.admin-section-header h3{ font-size:1.3rem; display:flex; align-items:center; gap:10px; }

.btn-add-brand{
  background:var(--primary-green);
  color:#fff !important;
  padding:10px 20px;
  border-radius:10px;
  font-weight:700;
  display:inline-flex;
  align-items:center;
  gap:8px;
  border:1px solid var(--primary-green);
  font-size: 0.9rem;
}
.btn-add-brand:hover{ background:#fff; color:var(--primary-green) !important; }

.btn-add-brand.gold{
  background:var(--accent-gold);
  color:#333 !important;
  border-color:var(--accent-gold);
}
.btn-add-brand.gold:hover{ background:#fff; color:#333 !important; }

.modern-table-card{
  background:#fff;
  border-radius:16px;
  box-shadow:0 5px 30px rgba(0,0,0,.04);
  overflow:hidden;
  border:1px solid rgba(0,0,0,.04);
  margin-bottom:30px;
}
.card-header{
  padding:20px 25px;
  border-bottom:1px solid #f0f0f0;
  display:flex;
  justify-content:space-between;
  align-items:center;
  background:#fff;
}
.card-header h3{ font-size:1.1rem; font-weight:800; display:flex; align-items:center; gap:10px; }

.modern-table{ width:100%; border-collapse:collapse; }
.modern-table th{
  background:#fcfcfc;
  color:#888;
  font-size:.8rem;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.5px;
  padding:15px 25px;
  text-align:right;
  border-bottom:1px solid #eee;
  white-space:nowrap;
}
.modern-table td{
  padding:15px 25px;
  border-bottom:1px solid #f9f9f9;
  vertical-align:middle;
  font-size:.92rem;
  color:#555;
}
.modern-table tr:last-child td{ border-bottom:none; }
.modern-table tr:hover{ background:#fcfcfc; }

.status-pill{
  padding:6px 12px;
  border-radius:20px;
  font-size:.75rem;
  font-weight:700;
  display:inline-block;
}
.status-pill.success{ background:#e6f7ed; color:#007a3d; }
.status-pill.warning{ background:#fff8e1; color:#f57f17; }
.status-pill.danger{ background:#fce4ec; color:#c2185b; }
.status-pill.neutral{ background:#f5f5f5; color:#757575; }

.action-btn-group{ display:flex; gap:8px; }
.icon-btn{
  width:32px; height:32px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  background:#f5f5f5; color:#666; font-size:.9rem;
}
.icon-btn:hover{ transform:scale(1.05); color: var(--primary-green); }

/* Responsive */
@media (max-width: 768px){
  .admin-sidebar{ width:0; overflow:hidden; padding:0; }
  .admin-content{ margin-right:0; width:100%; padding:20px; }
}