/* ========================================================
 * HR-SYSTEM — Design System
 * الثيم: تركوازي/ذهبي — Mobile-first — RTL/LTR
 * ======================================================== */

:root {
  /* الألوان الأساسية */
  --teal-900: #0b3d3a;
  --teal-800: #0e4e49;
  --teal-700: #0f6b61;
  --teal-600: #0e8a7d;
  --teal-500: #14b8a6;
  --teal-400: #2dd4bf;
  --teal-50:  #e6f7f4;

  --gold-600: #b8912c;
  --gold-500: #d4af37;
  --gold-400: #e6c35c;

  /* ألوان الحالة */
  --success: #16a34a;
  --success-bg: #dcfce7;
  --warning: #f59e0b;
  --warning-bg: #fef3c7;
  --danger:  #dc2626;
  --danger-bg: #fee2e2;
  --info:    #2563eb;
  --info-bg: #dbeafe;
  --purple:  #7c3aed;

  /* محايدة */
  --bg:       #f1f5f6;
  --surface:  #ffffff;
  --text:     #1f2937;
  --text-muted: #6b7280;
  --border:   #e5e7eb;

  /* قياسات */
  --radius:   16px;
  --radius-sm: 10px;
  --radius-lg: 24px;
  --shadow:   0 4px 20px rgba(11, 61, 58, .08);
  --shadow-lg: 0 10px 40px rgba(11, 61, 58, .15);
  --header-h: 64px;
  --bottomnav-h: 68px;
  --sidebar-w: 260px;

  --font: "Segoe UI", "Tahoma", "Cairo", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

/* الاتجاهات */
[dir="rtl"] { direction: rtl; }
[dir="ltr"] { direction: ltr; }

/* ---------------- خلفية البرنامج (صورة المكتب تظهر بوضوح) ----------------
 * الصورة تملأ الشاشة كخلفية ثابتة فخمة، مع طبقة تركوازية متدرّجة تمنح
 * عمقاً وتُبقي الكروت الزجاجية والنصوص واضحة. (لا تطال صفحات الدخول) */
body:not(.auth-body) { background: #041a18; }
/* خلفية Aurora خفيفة بالكامل CSS (نفس صفحة الدخول) → فخامة + أسرع على الموبايل */
body:not(.auth-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(62% 52% at 18% 18%, rgba(20,184,166,.40), transparent 60%),
    radial-gradient(54% 46% at 86% 14%, rgba(212,175,55,.30), transparent 60%),
    radial-gradient(64% 58% at 78% 86%, rgba(15,107,97,.55), transparent 62%),
    radial-gradient(52% 52% at 22% 92%, rgba(45,212,191,.26), transparent 60%),
    linear-gradient(140deg, #04201d 0%, #062b27 46%, #04181670 100%), #041a18;
  background-size: 180% 180%, 170% 170%, 190% 190%, 170% 170%, 100% 100%, 100% 100%;
  animation: auroraShift 26s ease-in-out infinite alternate;
}
/* طبقة فاتحة للوضع النهاري فقط (لتبقى الكروت البيضاء واضحة) */
body:not(.auth-body)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(135deg, rgba(224,243,239,.80), rgba(214,236,232,.66) 45%, rgba(190,224,219,.74));
  backdrop-filter: blur(1.5px);
}

/* ---------------- أدوات عامة ---------------- */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.hidden { display: none !important; }
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.flex{display:flex}.items-center{align-items:center}.justify-between{justify-content:space-between}
.gap-1{gap:8px}.gap-2{gap:16px}.flex-1{flex:1}.flex-wrap{flex-wrap:wrap}
.w-full{width:100%}

/* ---------------- الأزرار ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border: 0; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; transition: all .2s; white-space: nowrap;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: linear-gradient(135deg, var(--teal-600), var(--teal-700)); color: #fff;
  box-shadow: 0 8px 20px rgba(14,138,125,.30); }
.btn-primary:hover { background: linear-gradient(135deg, var(--teal-700), var(--teal-800));
  transform: translateY(-1px); box-shadow: 0 12px 26px rgba(14,138,125,.42); }
.btn-gold { background: linear-gradient(135deg, var(--gold-400), var(--gold-500) 55%, var(--gold-600)); color: var(--teal-900);
  box-shadow: 0 8px 20px rgba(212,175,55,.32); }
.btn-gold:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 12px 28px rgba(212,175,55,.46); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-ghost   { background: transparent; color: var(--teal-700); border: 1.5px solid var(--border); }
.btn-ghost:hover { background: var(--teal-50); }
.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 28px; font-size: 16px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------------- البطاقات (زجاجية فخمة) ---------------- */
.card {
  background: rgba(255,255,255,.80);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-radius: var(--radius);
  box-shadow: 0 12px 38px rgba(11,61,58,.16), inset 0 1px 0 rgba(255,255,255,.7);
  padding: 20px;
  border: 1px solid rgba(255,255,255,.65);
}
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid rgba(11,61,58,.1);
}
.card-title { font-size: 17px; font-weight: 800; color: var(--teal-900); }

/* ---------------- الشارات (Badges) ---------------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; }
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: #b45309; }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-muted   { background: #f3f4f6; color: var(--text-muted); }

/* ---------------- النماذج ---------------- */
.form-group { margin-bottom: 16px; }
.form-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 7px; color: #374151; }
.form-control, .form-select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border);
  border-radius: var(--radius-sm); font-size: 15px; font-family: inherit;
  background: #fff; transition: border-color .2s, box-shadow .2s;
}
.form-control:focus, .form-select:focus {
  outline: none; border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
}
.input-icon { position: relative; }
.input-icon .form-control { padding-inline-start: 44px; }
.input-icon .icon { position: absolute; inset-inline-start: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-muted); font-size: 18px; }
.input-icon .toggle-pass { position: absolute; inset-inline-end: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-muted); cursor: pointer; background: none; border: 0; }
.form-error { color: var(--danger); font-size: 13px; margin-top: 5px; }
.form-check { display: flex; align-items: center; gap: 8px; }
.form-check input { width: 18px; height: 18px; accent-color: var(--teal-600); }

/* ---------------- التنبيهات (Flash) ---------------- */
.alert { padding: 13px 16px; border-radius: var(--radius-sm); margin-bottom: 16px;
  font-weight: 600; font-size: 14.5px; display: flex; align-items: center; gap: 10px; }
.alert-success { background: var(--success-bg); color: #166534; }
.alert-danger  { background: var(--danger-bg);  color: #991b1b; }
.alert-warning { background: var(--warning-bg); color: #92400e; }
.alert-info    { background: var(--info-bg);    color: #1e40af; }

/* ---------------- الجداول ---------------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.table { width: 100%; border-collapse: collapse; background: transparent; }
.table th, .table td { padding: 13px 14px; text-align: start; font-size: 14px; }
.table th { background: rgba(14,78,73,.92); color: #eafaf7; font-weight: 800; white-space: nowrap; }
.table th:first-child { border-start-start-radius: var(--radius-sm); }
.table th:last-child { border-start-end-radius: var(--radius-sm); }
.table tbody tr { border-top: 1px solid rgba(11,61,58,.08); }
.table tbody tr:hover { background: rgba(230,247,244,.6); }

/* ---------------- بطاقات الإحصائيات ---------------- */
.stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
/* ثلاث بطاقات في صف واحد (حاضر/غائب/متأخر) */
.stats-grid.stats-3 { grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stats-3 .stat-card { padding: 12px 8px; align-items: center; text-align: center; }
.stats-3 .stat-value { font-size: 23px; }
.stats-3 .stat-label { font-size: 12px; }
.stat-card {
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-radius: var(--radius); padding: 16px;
  box-shadow: 0 10px 30px rgba(11,61,58,.14), inset 0 1px 0 rgba(255,255,255,.7);
  display: flex; flex-direction: column; gap: 4px;
  border-inline-start: 4px solid var(--teal-500);
}
.stat-card .stat-value { font-size: 28px; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { font-size: 13px; color: var(--text-muted); font-weight: 600; }
.stat-card.is-present { border-color: var(--success); } .is-present .stat-value { color: var(--success); }
.stat-card.is-late    { border-color: var(--warning); } .is-late .stat-value { color: #b45309; }
.stat-card.is-absent  { border-color: var(--danger); }  .is-absent .stat-value { color: var(--danger); }
.stat-card.is-total   { border-color: var(--teal-600); }.is-total .stat-value { color: var(--teal-700); }

/* ---------------- أزرار الإجراءات الكبيرة (موظف) ---------------- */
.action-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.action-btn {
  position: relative; overflow: hidden; cursor: pointer;
  border: 0; border-radius: 20px; padding: 20px 14px; color: #fff;
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 800; letter-spacing: .2px;
  box-shadow: 0 10px 24px rgba(11,61,58,.16);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.action-btn::before { content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% -20%, rgba(255,255,255,.35), transparent 60%); pointer-events: none; }
.action-btn:hover { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(11,61,58,.24); }
.action-btn:active { transform: translateY(-1px) scale(.98); }
.action-btn:disabled { opacity: .5; filter: grayscale(.4); cursor: not-allowed;
  transform: none; box-shadow: var(--shadow); }
.action-btn .ab-icon { font-size: 26px; width: 54px; height: 54px; border-radius: 16px;
  display: grid; place-items: center; background: rgba(255,255,255,.2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.action-btn.ab-in   { background: linear-gradient(135deg, #16a34a, #15803d); }
.action-btn.ab-out  { background: linear-gradient(135deg, #f59e0b, #ea580c); }
.action-btn.ab-req  { background: linear-gradient(135deg, var(--teal-600), var(--teal-700)); }
.action-btn.ab-rep  { background: linear-gradient(135deg, var(--purple), #6d28d9); }

/* ---------------- شبكة أدوات المدير/الموارد (اتنين في كل صف دائماً) ---------------- */
.tool-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 14px; }
.tool-card {
  position: relative; cursor: pointer; text-decoration: none;
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 18px; padding: 18px 12px;
  box-shadow: 0 10px 28px rgba(11,61,58,.14);
  display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(11,61,58,.22); }
.tool-card:active { transform: scale(.98); }
.tool-card .tc-icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; font-size: 26px; }
.tool-card .tc-title { font-weight: 800; font-size: 15px; color: var(--teal-900); line-height: 1.25; }
.tool-card .tc-badge { position: absolute; top: 10px; inset-inline-end: 10px; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 800;
  display: grid; place-items: center; }
[data-theme="dark"] .tool-card { background: rgba(17,43,40,.8); border-color: rgba(212,175,55,.16); }
[data-theme="dark"] .tool-card .tc-title { color: #e8f3f0; }

.stat-card.is-rate { border-color: #c79a2b; } .is-rate .stat-value { color: #b8860b; }

/* ---------------- Header علوي (موبايل) ---------------- */
.app-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h);
  background: linear-gradient(120deg, #0c4641, #0a3330 55%, #06201d);
  border-bottom: 1px solid rgba(212,175,55,.35);
  color: #fff; display: flex; align-items: center;
  justify-content: space-between; padding: 0 16px; box-shadow: 0 6px 26px rgba(0,0,0,.3);
}
/* شريط ذهبي رفيع أسفل الهيدر */
.app-header::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-400), var(--gold-600), var(--gold-400), transparent); opacity: .85; }
.app-header .brand { display: flex; align-items: center; gap: 11px; font-weight: 900; font-size: 18px; letter-spacing: .3px; }
.app-header .brand .logo-badge { width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); display: grid; place-items: center;
  box-shadow: 0 6px 16px rgba(212,175,55,.4); }
.app-header .brand .logo-badge svg { display: block; }
.app-header .brand .brand-name b { color: var(--gold-400); font-weight: 900; }
/* شعار شركة مرفوع: يملأ الشارة بدل التدرّج الذهبي */
/* شعار الشركة = دائرة بيضاء متوهّجة في كل صفحة (الهيدر + السايدبار) */
.app-header .brand .logo-badge,
.sidebar .brand .logo-badge { border-radius: 50%; }
.app-header .brand .logo-badge.has-img,
.sidebar .brand .logo-badge.has-img {
  background: #fff; overflow: hidden;
  width: 46px; height: 46px; padding: 5px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 0 0 2px rgba(212,175,55,.55), 0 0 15px 2px rgba(212,175,55,.4);
  animation: brandGlow 3.2s ease-in-out infinite;
}
.logo-badge.has-img img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; }
[data-theme="dark"] .app-header .brand .logo-badge.has-img,
[data-theme="dark"] .sidebar .brand .logo-badge.has-img { background: #fff; }
@keyframes brandGlow {
  0%,100% { box-shadow: 0 0 0 2px rgba(212,175,55,.45), 0 0 10px 1px rgba(212,175,55,.28); }
  50%     { box-shadow: 0 0 0 2px rgba(212,175,55,.65), 0 0 22px 5px rgba(212,175,55,.5); }
}
@media (prefers-reduced-motion: reduce) { .logo-badge.has-img { animation: none !important; } }
.app-header .brand .brand-name,
.sidebar .brand .brand-name {
  font-weight: 900; letter-spacing: 1.5px;
  background: linear-gradient(90deg, var(--gold-400), #f6e7b4, var(--gold-600));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--gold-400);
}
@media (max-width: 560px) { .app-header .brand .brand-name { display: none; } }
.app-header .icon-btn { transition: background .15s ease, transform .15s ease; }
.app-header .icon-btn:hover { background: rgba(255,255,255,.2); transform: translateY(-1px); }
.header-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: rgba(255,255,255,.12); border: 0; color: #fff; width: 38px; height: 38px;
  border-radius: 10px; display: grid; place-items: center; font-size: 18px; position: relative; }
.icon-btn .dot { position: absolute; top: 6px; inset-inline-end: 6px; width: 16px; height: 16px;
  background: var(--danger); color: #fff; border-radius: 50%; font-size: 10px; display: grid; place-items: center; }

/* زر المحادثة المميّز (بجانب الإشعارات) */
.icon-btn.chat-btn {
  background: linear-gradient(135deg, var(--gold-500, #d4af37), var(--gold-400, #e7c766)) !important;
  color: #1a1205 !important;
  box-shadow: 0 4px 14px rgba(212,175,55,.45);
}
.icon-btn.chat-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.icon-btn.chat-btn .dot { background: var(--teal-800, #0b3d3a); color: #fff; box-shadow: 0 0 0 2px rgba(212,175,55,.5); }

/* زر تسجيل الخروج (باب مفتوح + سهم) — في الشريط العلوي لسطح المكتب */
.btn-logout {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 14px; border-radius: 11px;
  font-weight: 800; font-size: 12.5px; line-height: 1; white-space: nowrap;
  color: var(--danger); background: rgba(239,68,68,.10);
  border: 1px solid rgba(239,68,68,.22);
  transition: background .18s, color .18s, box-shadow .18s, transform .18s;
}
.btn-logout svg { width: 17px; height: 17px; flex: 0 0 auto; }
[dir="rtl"] .btn-logout svg { transform: scaleX(-1); }
.btn-logout:hover {
  color: #fff; border-color: transparent;
  background: linear-gradient(135deg, #ef4444, #dc2626);
  box-shadow: 0 8px 18px rgba(220,38,38,.34); transform: translateY(-1px);
}
[data-theme="dark"] .btn-logout { background: rgba(239,68,68,.16); color: #fca5a5; border-color: rgba(239,68,68,.32); }

/* أيقونة الخروج في هيدر الموبايل */
.logout-ic { color: #fff; }
.logout-ic svg { width: 19px; height: 19px; }
[dir="rtl"] .logout-ic svg { transform: scaleX(-1); }
.app-header .logout-ic:hover { background: rgba(239,68,68,.38); }

/* ---------------- شريط التنقل السفلي ---------------- */
.bottom-nav {
  position: fixed; bottom: 0; inset-inline: 0; height: var(--bottomnav-h); z-index: 50;
  background: rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-top: 1px solid rgba(212,175,55,.3); display: flex;
  box-shadow: 0 -6px 24px rgba(11,61,58,.1);
}
.bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--text-muted); font-size: 11.5px; font-weight: 600; position: relative; }
.bottom-nav a .bn-icon { font-size: 21px; }
.bottom-nav a.active { color: var(--teal-600); }
.bottom-nav a .bn-badge { position: absolute; top: 8px; inset-inline-end: 50%; transform: translateX(50%);
  margin-inline-start: 18px; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px;
  border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }

/* ---------------- تخطيط المحتوى ---------------- */
.app-main { padding: 16px; padding-bottom: calc(var(--bottomnav-h) + 20px); max-width: 640px; margin: 0 auto; }
.page-title { font-size: 21px; font-weight: 900; color: var(--teal-900); margin-bottom: 4px;
  text-shadow: 0 1px 2px rgba(255,255,255,.5); letter-spacing: .2px; }
.page-sub { color: var(--teal-800); font-size: 14px; margin-bottom: 16px; font-weight: 600; }

/* بطاقة الترحيب */
.welcome-card { position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--teal-700), var(--teal-900));
  color: #fff; border-radius: var(--radius-lg); padding: 13px 16px;
  box-shadow: 0 16px 44px rgba(6,32,29,.4); margin-bottom: 12px;
  border: 1px solid rgba(212,175,55,.3); }
.welcome-card::after { content: ""; position: absolute; top: -40%; inset-inline-end: -10%;
  width: 180px; height: 180px; border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,.3), transparent 70%); pointer-events: none; }
.welcome-card .wc-name { font-size: 17px; font-weight: 800; }
.welcome-card .wc-role { opacity: .85; font-size: 12.5px; }
.welcome-card .wc-date { opacity: .9; font-size: 12.5px; margin-top: 5px; display: flex; align-items: center; gap: 6px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.4);
  background: #fff; }
.avatar-sm { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }

/* ---------------- تخطيط سطح المكتب (سايدبار HR) ---------------- */
.layout-admin { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); color: #fff; flex-shrink: 0;
  background: linear-gradient(180deg, #0c4641 0%, #0a3330 60%, #06201d 100%);
  border-inline-end: 1px solid rgba(212,175,55,.22);
  box-shadow: 0 0 50px rgba(0,0,0,.35);
  position: fixed; top: 0; bottom: 0; inset-inline-start: 0; z-index: 60; overflow-y: auto;
  transition: transform .25s;
}
.sidebar .brand { padding: 20px; display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px;
  border-bottom: 1px solid rgba(212,175,55,.2); }
.sidebar .brand .logo-badge { width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600)); display: grid; place-items: center; color: var(--teal-900); font-weight: 900; }
.sidebar-nav { padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.sidebar-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px;
  color: rgba(255,255,255,.82); font-weight: 600; font-size: 14.5px; transition: all .15s; }
.sidebar-nav a .sn-icon { font-size: 19px; width: 22px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav a.active {
  background: linear-gradient(135deg, var(--teal-600), var(--teal-700));
  color: #fff; box-shadow: 0 6px 16px rgba(14,138,125,.4);
}
.sidebar-nav a.active .sn-icon { filter: drop-shadow(0 0 6px rgba(45,212,191,.5)); }
.sidebar-nav a .sn-badge { margin-inline-start: auto; background: var(--gold-500); color: var(--teal-900);
  font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 999px; }

.admin-content { flex: 1; margin-inline-start: var(--sidebar-w); min-width: 0; }
.admin-topbar { height: var(--header-h);
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid rgba(212,175,55,.25);
  box-shadow: 0 2px 20px rgba(11,61,58,.08);
  display: flex; align-items: center; justify-content: space-between; padding: 0 20px; position: sticky; top: 0; z-index: 40; }
.admin-main { padding: 22px; }
.sidebar-backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 55; }

/* زر "المزيد" في الشريط السفلي (يفتح القائمة الجانبية كدرج) */
.bottom-nav .bn-more {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; background: none; border: 0; cursor: pointer;
  color: var(--text-muted); font-size: 11.5px; font-weight: 600; font-family: inherit;
}
.bottom-nav .bn-more .bn-icon { font-size: 21px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* قائمة روابط (بطاقات المدير) */
.link-card { display: flex; align-items: center; gap: 14px;
  background: rgba(255,255,255,.82);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: var(--radius);
  padding: 16px; box-shadow: 0 10px 30px rgba(11,61,58,.14); margin-bottom: 12px;
  transition: transform .15s, box-shadow .15s; }
.link-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(11,61,58,.2); }
.link-card:active { transform: scale(.99); }
.link-card .lc-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  font-size: 22px; flex-shrink: 0; }
.link-card .lc-body { flex: 1; min-width: 0; }
.link-card .lc-title { font-weight: 800; color: var(--teal-900); }
.link-card .lc-sub { font-size: 13px; color: var(--text-muted); }
.link-card .lc-arrow { color: var(--text-muted); font-size: 20px; }

/* نسبة الحضور دائرية (ملخص) */
.donut-wrap { display: flex; align-items: center; justify-content: center; gap: 18px; flex-wrap: wrap; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 6px; }
.legend-dot { width: 12px; height: 12px; border-radius: 3px; }

/* GPS */
.gps-box { text-align: center; padding: 10px; }
.gps-map-placeholder { width: 100%; height: 160px; border-radius: var(--radius);
  background: linear-gradient(135deg, var(--teal-50), #d1fae5); display: grid; place-items: center;
  font-size: 54px; margin-bottom: 16px; position: relative; overflow: hidden; }
.gps-status { padding: 12px; border-radius: var(--radius-sm); font-weight: 700; margin: 12px 0; }
.gps-status.ok { background: var(--success-bg); color: #166534; }
.gps-status.err { background: var(--danger-bg); color: #991b1b; }
.logo-field { display: flex; align-items: center; gap: 14px; }
.logo-preview { width: 76px; height: 76px; flex: 0 0 auto; border-radius: 16px;
  border: 1.5px dashed var(--border); background: var(--bg, #f6faf9);
  display: grid; place-items: center; overflow: hidden; }
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview .logo-ph { font-size: 32px; opacity: .6; }
[data-theme="dark"] .logo-preview { background: #0e2522; }

.gps-ext { margin-top: 12px; padding: 14px; border-radius: 14px;
  background: rgba(212,175,55,.1); border: 1px dashed rgba(212,175,55,.5); }
.gps-ext-hint { font-size: 13.5px; font-weight: 700; color: var(--teal-900); }
[data-theme="dark"] .gps-ext { background: rgba(212,175,55,.08); }
[data-theme="dark"] .gps-ext-hint { color: var(--gold-400, #e7c766); }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(11,61,58,.55); z-index: 100;
  display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 440px;
  max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { padding: 18px 20px; border-bottom: 1px solid var(--border); display: flex;
  align-items: center; justify-content: space-between; }
.modal-title { font-weight: 800; font-size: 17px; color: var(--teal-900); }
.modal-body { padding: 20px; }
.modal-close { background: none; border: 0; font-size: 24px; color: var(--text-muted); line-height: 1; }

/* Spinner */
.spinner { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.4);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------- استجابة الشاشات الكبيرة ---------------- */
@media (min-width: 992px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 991px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== الشِل المتجاوب: سطح المكتب = سايدبار، الموبايل = هيدر + شريط سفلي ===== */
.shell-main { max-width: 1280px; margin-inline: auto; }

/* سطح المكتب: أخفِ هيدر الموبايل والشريط السفلي */
@media (min-width: 861px) {
  .app-header { display: none; }
  .bottom-nav { display: none; }
}

/* الموبايل: سايدبار كدرج + هيدر علوي + شريط سفلي */
@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); }
  [dir="rtl"] .sidebar { transform: translateX(100%); }
  .sidebar.open { transform: translateX(0); }
  .admin-content { margin-inline-start: 0; }
  .admin-topbar { display: none; }
  .admin-main { padding: 16px; padding-bottom: calc(var(--bottomnav-h) + 20px); }
  .sidebar-backdrop.open { display: block; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* إخفاء عناصر حسب الجهاز */
.desktop-only { display: none; }
@media (min-width: 861px) { .desktop-only { display: initial; } .mobile-only { display: none; } }

/* ---------------- تبويبات مجزّأة (Segmented tabs) ---------------- */
.seg-tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 16px;
  background: rgba(255,255,255,.7); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: var(--shadow); border: 1px solid rgba(255,255,255,.6); }
.seg-tab { display: inline-flex; align-items: center; gap: 9px; border: 0; cursor: pointer;
  background: transparent; color: var(--text-muted); font-weight: 800; font-size: 15px;
  padding: 10px 18px; border-radius: 12px; transition: all .18s ease; }
.seg-tab .seg-ic { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; }
.seg-tab:hover { color: var(--text); }
.seg-tab.is-active { background: linear-gradient(135deg, var(--teal-700), var(--teal-600));
  color: #fff; box-shadow: 0 6px 18px rgba(14,78,73,.3); }
[data-theme="dark"] .seg-tabs { background: rgba(17,43,40,.72); border-color: rgba(212,175,55,.16); }

/* ---------------- أيام الأسبوع (pills) + معاينة المرتب ---------------- */
.day-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 6px; }
.day-pill { position: relative; cursor: pointer; user-select: none;
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px;
  border: 1.5px solid var(--border); background: var(--surface); color: var(--text-muted);
  transition: all .15s ease; }
.day-pill input { position: absolute; opacity: 0; pointer-events: none; }
.day-pill.is-on, .day-pill:has(input:checked) {
  background: linear-gradient(135deg, var(--info), #1d4ed8); color: #fff; border-color: transparent;
  box-shadow: 0 4px 12px rgba(37,99,235,.3); }
[data-theme="dark"] .day-pill { background: #0e2522; }

.pp-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 6px 0; }
.pp-cell { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px;
  border-radius: 12px; background: rgba(212,175,55,.1); border: 1px solid rgba(212,175,55,.22); }
.pp-label { font-size: 12.5px; color: var(--text-muted); font-weight: 700; }
.pp-val { font-size: 18px; font-weight: 900; color: var(--teal-900); }
[data-theme="dark"] .pp-val { color: var(--gold-400); }

/* ========================================================
 * الوضع الداكن (Dark Mode) — يُفعَّل عبر <html data-theme="dark">
 * ======================================================== */
[data-theme="dark"] {
  --bg:        #0a1f1d;
  --surface:   #112b28;
  --text:      #e8f3f1;
  --text-muted:#9fb4b0;
  --border:    #22433f;
  --teal-50:   #10302c;
  --shadow:    0 4px 20px rgba(0,0,0,.4);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.55);
}

/* الوضع الداكن: الـ Aurora تظهر بالكامل + vignette خفيف فقط لإبراز الكروت */
[data-theme="dark"] body:not(.auth-body)::before { filter: none; }
[data-theme="dark"] body:not(.auth-body)::after {
  background: radial-gradient(130% 95% at 50% 36%, transparent 36%, rgba(2,14,13,.58) 100%);
  backdrop-filter: none;
}

/* البطاقات الزجاجية → زجاج داكن */
[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .link-card,
[data-theme="dark"] .welcome-card {
  background: rgba(17,43,40,.78);
  border-color: rgba(212,175,55,.16);
  box-shadow: 0 14px 40px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.05);
}
[data-theme="dark"] .card-header { border-bottom-color: rgba(255,255,255,.08); }
[data-theme="dark"] .card-title,
[data-theme="dark"] .page-title { color: #eafaf7; }

/* القوائم العلوية/السفلية */
[data-theme="dark"] .admin-topbar,
[data-theme="dark"] .bottom-nav { background: rgba(10,31,29,.88); border-color: rgba(212,175,55,.14); }
[data-theme="dark"] .admin-topbar strong { color: #eafaf7 !important; }

/* النماذج */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background: #0e2522; color: var(--text); border-color: var(--border);
}
[data-theme="dark"] .form-label { color: #c7d6d3; }
[data-theme="dark"] .form-control::placeholder { color: #6e8581; }

/* النوافذ المنبثقة والجداول */
[data-theme="dark"] .modal { background: #112b28; color: var(--text); }
[data-theme="dark"] .table td { border-color: rgba(255,255,255,.06); }

/* الشارات المحايدة */
[data-theme="dark"] .badge-muted { background: #1c3a36; color: #a9bdb9; }

/* عناصر الصلاحيات (كانت نص داكن على خلفية داكنة في الوضع الليلي) */
[data-theme="dark"] .perm-item { background: #0e2522; color: #e8f3f1; border-color: var(--border); }
[data-theme="dark"] .perm-item:has(input:checked) { background: rgba(20,184,166,.18); border-color: var(--teal-500); color: #eafaf7; }
[data-theme="dark"] .perm-item .text-muted { color: #9fb4b0; }

/* العناوين الداكنة المكتوبة مضمّنة (inline) تُقلب للفاتح لتظل مقروءة */
[data-theme="dark"] [style*="color:var(--teal-900)"],
[data-theme="dark"] [style*="color: var(--teal-900)"],
[data-theme="dark"] [style*="color:var(--teal-800)"] { color: #eafaf7 !important; }

/* تنعيم انتقال تبديل المظهر */
.card, .stat-card, .link-card, .welcome-card, .admin-topbar, .bottom-nav,
.form-control, .form-select, body { transition: background-color .25s ease, color .25s ease, border-color .25s ease; }

.theme-toggle { font-size: 16px; line-height: 1; }

/* الطباعة */
@media print {
  .app-header, .bottom-nav, .sidebar, .admin-topbar, .no-print, .btn { display: none !important; }
  .admin-content { margin: 0 !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ddd; }
}

/* ===== صلاحيات HR (واجهة المدير) ===== */
.perm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line, #e3ebe9);
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: var(--teal-900, #0b3d3a);
  transition: border-color .15s, background .15s;
}
.perm-item:hover { border-color: var(--teal-400, #14b8a6); }
.perm-item input { width: 18px; height: 18px; accent-color: var(--teal-600, #0e8a7d); flex: 0 0 auto; cursor: pointer; }
.perm-item:has(input:checked) {
  border-color: var(--teal-500, #14b8a6);
  background: var(--teal-50, #e9f6f3);
}
.perm-emp-list {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-inline-end: 4px;
}

/* ========================================================
 * المحادثات (Chat)
 * ======================================================== */
.seg-badge {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px;
  padding: 0 6px; border-radius: 999px; font-size: 11px; font-weight: 900;
  background: var(--gold-500, #d4af37); color: #1a1205; margin-inline-start: 4px;
}
.chat-tabs { margin-bottom: 14px; }

/* لوحة محادثة الموظف */
.chat-panel { display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.chat-stream {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px; overflow-y: auto; min-height: 320px; max-height: 58vh;
}
.chat-msg { display: flex; flex-direction: column; max-width: 78%; }
.chat-msg.mine { align-self: flex-end; align-items: flex-end; }
.chat-msg.theirs { align-self: flex-start; align-items: flex-start; }
.cm-bubble {
  padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.55;
  word-break: break-word; box-shadow: 0 2px 6px rgba(11,61,58,.08);
}
.chat-msg.mine .cm-bubble {
  background: linear-gradient(135deg, var(--teal-700, #0e8a7d), var(--teal-600, #14b8a6));
  color: #fff; border-bottom-right-radius: 5px;
}
.chat-msg.theirs .cm-bubble {
  background: var(--surface, #fff); color: var(--text, #13302c);
  border: 1px solid var(--border, #e3ebe9); border-bottom-left-radius: 5px;
}
.cm-meta { font-size: 11px; color: var(--text-muted); margin-top: 3px; padding: 0 4px; }
.chat-empty { text-align: center; color: var(--text-muted); padding: 40px 16px; font-weight: 600; }

/* حقل الكتابة */
.chat-composer {
  display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px;
  border-top: 1px solid var(--border, #e3ebe9); background: var(--surface, #fff);
}
.chat-composer textarea {
  flex: 1; resize: none; border: 1.5px solid var(--border, #e3ebe9); border-radius: 14px;
  padding: 10px 14px; font: inherit; font-size: 14.5px; line-height: 1.5; background: var(--bg, #f6faf9);
  color: var(--text); max-height: 120px; overflow-y: auto;
}
.chat-composer textarea:focus { outline: none; border-color: var(--teal-500, #14b8a6); }
.chat-composer .btn { flex: 0 0 auto; width: 46px; height: 46px; padding: 0; border-radius: 50%;
  font-size: 18px; display: grid; place-items: center; }

/* صندوق المدير/HR: قائمة + محادثة */
.chat-wrap { display: grid; grid-template-columns: 320px 1fr; gap: 14px; height: 72vh; }
.chat-list { padding: 0; overflow-y: auto; display: flex; flex-direction: column; }
.chat-list-head { padding: 14px 16px; font-weight: 900; font-size: 15px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.chat-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; text-decoration: none;
  color: var(--text); border-bottom: 1px solid var(--border); transition: background .15s;
}
.chat-item:hover { background: rgba(20,184,166,.07); }
.chat-item.active { background: rgba(20,184,166,.14); }
.ci-body { flex: 1; min-width: 0; }
.ci-top { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; }
.ci-name { font-weight: 800; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ci-time { font-size: 11px; color: var(--text-muted); flex: 0 0 auto; }
.ci-last { font-size: 12.5px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.ci-you { color: var(--teal-600, #14b8a6); font-weight: 700; }
.ci-badge { flex: 0 0 auto; display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px; font-size: 11px; font-weight: 900; background: var(--gold-500, #d4af37); color: #1a1205; }
.chat-main { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat-placeholder { margin: auto; text-align: center; color: var(--text-muted); }
.chat-placeholder .cp-icon { font-size: 44px; margin-bottom: 8px; }
.chat-main-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.cmh-name { font-weight: 900; font-size: 15px; }
.cmh-sub { font-size: 12px; color: var(--text-muted); }
.chat-back { display: none; font-size: 26px; line-height: 1; text-decoration: none; color: var(--teal-700); font-weight: 900; }
[dir="ltr"] .chat-back { transform: scaleX(-1); }

/* الوضع الداكن */
[data-theme="dark"] .chat-msg.theirs .cm-bubble { background: #0e2522; border-color: rgba(255,255,255,.07); color: #e8f3f1; }
[data-theme="dark"] .chat-composer { background: #112b28; border-top-color: rgba(255,255,255,.07); }
[data-theme="dark"] .chat-composer textarea { background: #0e2522; border-color: var(--border); }
[data-theme="dark"] .chat-item:hover { background: rgba(20,184,166,.12); }
[data-theme="dark"] .chat-item.active { background: rgba(20,184,166,.2); }

/* الموبايل: عرض القائمة أو المحادثة */
@media (max-width: 860px) {
  .chat-wrap { grid-template-columns: 1fr; height: auto; }
  .chat-list { max-height: 72vh; }
  .chat-main { min-height: 68vh; }
  .chat-wrap.has-peer .chat-list { display: none; }
  .chat-wrap:not(.has-peer) .chat-main { display: none; }
  .chat-back { display: inline-block; }
  .chat-stream { max-height: none; flex: 1; }
}

/* ===== التقرير الشهري ===== */
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.report-hours { padding: 16px; }
.rh-top { display: flex; align-items: center; justify-content: space-between; }
.rh-label { font-weight: 800; font-size: 14px; color: var(--text-muted); }
.rh-pct { font-weight: 900; font-size: 20px; color: var(--gold-500); }
.rh-main { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; margin: 6px 0 10px; }
.rh-worked { font-size: 24px; font-weight: 900; color: var(--text); }
.rh-of { font-size: 13px; color: var(--text-muted); }
.rh-req { font-size: 17px; font-weight: 700; color: var(--text-muted); }
.rh-bar { height: 10px; border-radius: 999px; background: var(--border); overflow: hidden; }
.rh-bar > span { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--gold-400,#e3c05a), var(--gold-500)); }
.rh-sub { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }

.report-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.rep-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 12px 8px; text-align: center; display: flex; flex-direction: column; gap: 3px;
  border-top-width: 3px; }
.rep-tile .rep-val { font-size: 19px; font-weight: 900; color: var(--text); }
.rep-tile .rep-lbl { font-size: 12px; color: var(--text-muted); font-weight: 600; }
.rep-tile.is-late   { border-top-color: var(--warning); }
.rep-tile.is-absent { border-top-color: var(--danger); }
.rep-tile.is-leave  { border-top-color: var(--info); }
.rep-tile.is-early  { border-top-color: #8b5cf6; }
.rep-tile.is-loan   { border-top-color: var(--gold-500); }
.rep-tile.is-ot     { border-top-color: var(--success); }

.report-note { background: var(--warning-bg); color: #92610a; border-radius: 10px;
  padding: 10px 14px; font-size: 13.5px; margin-bottom: 10px; }

.chip-list { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px 2px; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: #f3f4f6; color: var(--text-muted); border: 1px solid var(--border); }
.chip-warn { background: var(--warning-bg); color: #b45309; border-color: transparent; }
.chip-info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.chip-gold { background: rgba(212,175,55,.16); color: #a67c00; border-color: transparent; }

.rep-row { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 0; border-bottom: 1px solid var(--border); }
.rep-row:last-child { border-bottom: 0; }
.rep-row-main { font-weight: 700; font-size: 14px; }
.rep-row-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }

.report-card { display: block; text-decoration: none; color: var(--text); padding: 14px 16px; }
.report-card:hover { background: rgba(20,184,166,.06); }
.rc-head { display: flex; align-items: center; justify-content: space-between; }
.rc-name { font-weight: 800; font-size: 15px; }
.rc-pct { font-weight: 900; font-size: 16px; color: var(--gold-500); }
.rc-hours { font-size: 14px; font-weight: 700; margin: 4px 0 8px; }
.rc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }

[data-theme="dark"] .rep-tile { background: #112b28; }
[data-theme="dark"] .chip { background: #0e2522; }
[data-theme="dark"] .report-note { background: rgba(245,158,11,.14); color: #f0c674; }
[data-theme="dark"] .report-card:hover { background: rgba(20,184,166,.12); }

/* ========================================================
 * الحركة الفخمة: خلفية Aurora + كشف سينمائي للكروت + عدّ الأرقام
 * ======================================================== */
@keyframes auroraShift {
  0%   { background-position: 0% 0%,   100% 0%,   100% 100%, 0% 100%, 0 0, 0 0; }
  50%  { background-position: 45% 35%, 55% 20%,   62% 68%,   32% 58%, 0 0, 0 0; }
  100% { background-position: 12% 62%, 92% 42%,   82% 92%,   10% 82%, 0 0, 0 0; }
}
@keyframes revealUp {
  from { opacity: 0; transform: translateY(22px); filter: blur(6px); }
  to   { opacity: 1; transform: none;            filter: none; }
}
.reveal-up { animation: revealUp .65s cubic-bezier(.2,.8,.2,1) both; will-change: transform, opacity; }

@media (prefers-reduced-motion: reduce) {
  body:not(.auth-body)::before { animation: none !important; }
  .reveal-up { animation: none !important; }
}
