/* =====================================================================
   assets/css/style.css — Xeon-HR v2 (عربي RTL)
   مدمج مع تخصيصات العميل: خط Cairo/Amiri + التسميات الذهبية + قائمة مدمجة
   كحلي #0f2f5c — أزرق #1d6fd1 — ذهبي #9e7017 / #f59e0b
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;800&family=Amiri:wght@400;700&display=swap');

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --navy: #0f2f5c;
  --navy-2: #143a6f;
  --blue: #1d6fd1;
  --blue-light: #eaf2fb;
  --gold: #f59e0b;
  --gold-dark: #9e7017;
  --green: #16a34a;
  --red: #dc2626;
  --teal: #0891b2;
  --purple: #7c3aed;
  --amber-bg: #fef3c7;
  --ink: #1c2733;
  --muted: #64748b;
  --border: #dbe4ee;
  --bg: #eef3f9;
  --sidebar-w: 250px;
  --shadow-sm: 0 1px 3px rgba(15, 47, 92, 0.08);
  --shadow-md: 0 6px 18px rgba(15, 47, 92, 0.12);
}

html, body { height: 100%; }

body {
  font-family: 'Cairo', 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  background: var(--bg);
  color: #000;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: var(--blue); }

/* ------------------------- التخطيط ------------------------- */
.layout { display: flex; min-height: 100vh; }
.main-area { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 24px 28px; flex: 1; }

/* ------------------------- القائمة الجانبية ------------------------- */
.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy) 0%, #0a2347 100%);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.sidebar .brand {
  padding: 18px 20px;
  font-size: 19px;
  font-weight: 800;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  text-align: center;
}
.sidebar .brand span { color: var(--gold); }
.sidebar > img { filter: drop-shadow(0 4px 10px rgba(0,0,0,0.35)); }

.sidebar .menu { padding: 12px 10px; flex: 1; overflow-y: auto; }
.sidebar .menu::-webkit-scrollbar { width: 5px; }
.sidebar .menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

/* التسميات الذهبية (تخصيص العميل، مصقولة) */
.sidebar .menu-label {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
background: linear-gradient(90deg, #131314, #f62020);  border-radius: 2px;
  padding: 5px 11px;
  margin: 12px 0 6px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

/* بنود مدمجة (تفضيل العميل) مع لمسة تفاعلية */
.sidebar .menu a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cfe0f5;
  padding: 0px 9px;
  border-radius: 5px;
  margin-bottom: 0px;
  font-size: 14px;
  transition: background 0.15s, transform 0.12s;
}
.sidebar .menu a:hover { background: rgba(255,255,255,0.09); color: #fff; transform: translateX(-2px); }
.sidebar .menu a.active {
  background-color: #3967a9;
  color: #fff;
  font-weight: 700;
  border-radius: 3px;
}
.sidebar .menu a .ico { width: 21px; text-align: center; font-size: 16px; }
.sidebar .menu a .badge {
  margin-right: auto;
  background: var(--gold);
  color: #fff;
  font-size: 11px;
  border-radius: 5px;
  padding: 1px 8px;
}

/* ------------------------- الشريط العلوي ------------------------- */
.topbar {
  background: #1a498d;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  padding: 0 26px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar .page-title { font-size: 18px; font-weight: 800; color:#fff }
.topbar .top-actions { display: flex; align-items: center; gap: 18px; }

.notif-bell { position: relative; font-size: 21px; color: var(--muted); transition: transform 0.15s; }
.notif-bell:hover { transform: scale(1.12); }
.notif-bell .count {
  position: absolute;
  top: -7px;
  left: -9px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  border-radius: 5px;
  padding: 1px 6px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(220,38,38,0.4);
}

.user-chip { display: flex; align-items: center; gap: 10px; color : #fff; }
.user-chip .avatar {
  width: 38px; height: 38px;
  border-radius: 10%;
  background: linear-gradient(135deg, var(--blue), var(--navy));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-sm);
}
.user-chip .uname { font-size: 13px; font-weight: 700; }
.user-chip .urole { font-size: 11px; color: #fff; }
.logout-link {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  background-color: #ee4037;
  padding: 5px 20px;
}
/* ------------------------- بطاقات المؤشرات ------------------------- */
.cards-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

.stat-card {
  flex: 1;
  min-width: 205px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 15px 17px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
  animation: fadeUp 0.4s ease both;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100%; height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--teal));
}
.stat-card.c-green::before  { background: linear-gradient(90deg, var(--green), #4ade80); }
.stat-card.c-red::before    { background: linear-gradient(90deg, var(--red), #f87171); }
.stat-card.c-gold::before   { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }
.stat-card.c-teal::before   { background: linear-gradient(90deg, var(--teal), #22d3ee); }
.stat-card.c-purple::before { background: linear-gradient(90deg, var(--purple), #a78bfa); }

.stat-card .card-top { display: flex; align-items: center; gap: 11px; margin-bottom: 7px; }
.stat-card .icon-circle {
  width: 42px; height: 42px;
  border-radius: 5px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--blue-light);
  flex-shrink: 0;
}
.stat-card.c-green .icon-circle  { background: #dcfce7; }
.stat-card.c-red .icon-circle    { background: #fee2e2; }
.stat-card.c-gold .icon-circle   { background: var(--amber-bg); }
.stat-card.c-teal .icon-circle   { background: #cffafe; }
.stat-card.c-purple .icon-circle { background: #ede9fe; }

.stat-card .label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.stat-card .value { font-size: 26px; font-weight: 800; color: var(--navy); line-height: 1.2; }
.stat-card .value.ok { color: var(--green); }
.stat-card .value.warn { color: #b45309; }
.stat-card .value.danger { color: var(--red); }
.stat-card .sub { font-size: 12px; color: var(--muted); margin-top: 3px; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 18px 22px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
  animation: fadeUp 0.4s ease both;
}
.panel h3 {
  font-size: 15px;
  color: var(--navy);
  margin-bottom: 14px;
  padding-right: 12px;
  border-right: 4px solid var(--gold);
  font-weight: 800;
}

/* ------------------------- الجداول ------------------------- */
table.data { width: 100%; border-collapse: collapse; font-size: 14px; border-radius: 5px; overflow: hidden; }
table.data th {
  background: linear-gradient(180deg, var(--navy), var(--navy-2));
  color: #fff;
  text-align: right;
  padding: 11px 12px;
  font-size: 13px;
  font-weight: 700;
}
table.data td { padding: 9px 12px; border-bottom: 1px solid #edf2f8; }
table.data tr:nth-child(even) td { background: #f8fbfe; }
table.data tr:hover td { background: var(--blue-light); }

.pill { border-radius: 20px; padding: 3px 12px; font-size: 12px; font-weight: 700; display: inline-block; }
.pill.green  { background: #dcfce7; color: #166534; }
.pill.amber  { background: var(--amber-bg); color: #92400e; }
.pill.red    { background: #fee2e2; color: #991b1b; }
.pill.blue   { background: var(--blue-light); color: var(--navy); }
.pill.purple { background: #ede9fe; color: #5b21b6; }

/* شريط تقدم */
.bar-track { background: #eaf2fb; border-radius: 5px; height: 13px; overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.bar-fill.g-green { background: linear-gradient(90deg, #16a34a, #4ade80); }
.bar-fill.g-red   { background: linear-gradient(90deg, #dc2626, #f87171); }
.bar-fill.g-gold  { background: linear-gradient(90deg, var(--gold-dark), var(--gold)); }

/* ------------------------- النماذج والأزرار ------------------------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 6px; color: var(--navy); }

input[type=text], input[type=email], input[type=password], input[type=date],
input[type=number], input[type=time], input[type=month], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 2px;
  font-family: inherit;
  font-size: 14px;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,111,209,0.13);
}

.btn {
  display: inline-block;
  border: none;
  border-radius: 2px;
  padding: 10px 22px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(135deg, var(--blue), #2f83e6); color: #fff; box-shadow: 0 4px 12px rgba(29,111,209,0.3); }
.btn-success { background: linear-gradient(135deg, var(--green), #22c55e); color: #fff; box-shadow: 0 4px 12px rgba(22,163,74,0.3); }
.btn-danger  { background: linear-gradient(135deg, var(--red), #ef4444); color: #fff; box-shadow: 0 4px 12px rgba(220,38,38,0.25); }
.btn-outline { background: #fff; color: var(--blue); border: 1.5px solid var(--blue); }

.alert { border-radius: 5px; padding: 13px 16px; font-size: 14px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.alert-error   { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.alert-info    { background: var(--blue-light); color: var(--navy); border: 1px solid #c7dcf5; }

/* ------------------------- صفحة الدخول ------------------------- */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--blue) 70%, var(--teal) 100%);
  padding: 20px;
}
.login-box {
  background: #fff;
  border-radius: 5px;
  padding: 36px 34px;
  width: 100%;
  max-width: 430px;
  box-shadow: 0 24px 60px rgba(6, 18, 38, 0.45);
}
.login-box .logo { text-align: center; margin-bottom: 6px; font-size: 27px; font-weight: 800; color: var(--navy); }
.login-box .logo span { color: var(--gold); }
.login-box .sub { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* ------------------------- متفرقات ------------------------- */
.text-muted { color: var(--muted); font-size: 13px; }
.mt { margin-top: 16px; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #c3d2e4; border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--blue); }
