/* ==========================================================================
   منصة إنجاز | نظام التصميم
   ========================================================================== */

:root {
  --font: 'IBM Plex Sans Arabic', 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  --brand: #0f766e;
  --brand-2: #0c5f58;
  --brand-3: #084c47;
  --brand-dark: #052c28;
  --brand-soft: #e9f5f1;
  --brand-soft-2: #d5ece6;
  --gold: #c9a227;
  --gold-soft: #fbf4dd;
  --ink: #102630;
  --ink-2: #233b45;
  --muted: #697c83;
  --muted-2: #8ea0a6;
  --line: #e2ecea;
  --line-2: #d5e3df;
  --bg: #f3f8f6;
  --card: #ffffff;
  --ok: #0f766e;
  --warn: #b45309;
  --danger: #b91c1c;
  --info: #1d4ed8;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-xs: 9px;
  --shadow: 0 14px 34px rgba(7, 48, 43, .07);
  --shadow-sm: 0 4px 14px rgba(7, 48, 43, .05);
  --shadow-lg: 0 28px 60px rgba(7, 48, 43, .14);
  --sidebar-w: 276px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(900px 600px at 100% 0%, rgba(15, 118, 110, .06), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgba(201, 162, 39, .05), transparent 55%);
  z-index: 0;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); }

h1, h2, h3, h4, h5, p { margin: 0; }
img { max-width: 100%; }

::selection { background: rgba(15, 118, 110, .18); }

/* شريط التمرير */
* { scrollbar-width: thin; scrollbar-color: #c7d8d3 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb { background: #c7d8d3; border-radius: 20px; }
*::-webkit-scrollbar-track { background: transparent; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; vertical-align: middle; }
.icon-sm { width: 16px; height: 16px; }

/* ==========================================================================
   الهيكل العام
   ========================================================================== */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

.content {
  flex: 1;
  padding: 26px 32px 48px;
  width: 100%;
  max-width: 1520px;
  margin: 0 auto;
}

.app-footer {
  padding: 18px 32px 26px;
  color: var(--muted-2);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   الشريط الجانبي
   ========================================================================== */

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background:
    radial-gradient(500px 300px at 100% 0%, rgba(201, 162, 39, .13), transparent 60%),
    linear-gradient(168deg, #052f2b 0%, #073d38 48%, #0a4c45 100%);
  color: #e7f2ef;
  padding: 22px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  z-index: 40;
}

.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  padding: 4px 6px 2px;
}
.brand:hover { color: #fff; }

.brand-mark {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f8f7f1;
  border: 1px solid rgba(201, 162, 39, .32);
  box-shadow: 0 8px 20px rgba(4, 32, 28, .28);
  flex: 0 0 auto;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 25px; font-weight: 700; letter-spacing: -.4px; }
.brand-text small { font-size: 10.5px; color: rgba(231, 242, 239, .62); letter-spacing: .1px; }

.year-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .09);
  color: rgba(236, 246, 243, .86);
  font-size: 12.5px;
}
.year-chip .icon { width: 16px; height: 16px; color: var(--gold); }
.year-chip b { font-weight: 600; }

.side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }

.nav-group { margin-bottom: 8px; }
.nav-group-label {
  font-size: 10.5px;
  letter-spacing: .4px;
  color: rgba(231, 242, 239, .42);
  padding: 6px 12px 7px;
  font-weight: 500;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9.5px 12px;
  border-radius: 11px;
  color: rgba(231, 242, 239, .78);
  font-size: 13.5px;
  font-weight: 400;
  transition: background .16s ease, color .16s ease, transform .16s ease;
}
.nav-link .icon { color: rgba(231, 242, 239, .5); transition: color .16s; }
.nav-link:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-link:hover .icon { color: #fff; }

.nav-link.active {
  background: linear-gradient(270deg, rgba(201, 162, 39, .18), rgba(255, 255, 255, .07));
  color: #fff;
  font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(201, 162, 39, .18);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  inset-inline-start: -18px;
  top: 8px;
  bottom: 8px;
  width: 3.5px;
  border-radius: 4px;
  background: var(--gold);
}
.nav-link.active .icon { color: var(--gold); }

.nav-badge {
  margin-inline-start: auto;
  background: var(--gold);
  color: #2b2205;
  font-size: 10.5px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  padding: 0 6px;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .08);
}
.avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  background: linear-gradient(150deg, #128579, #0a5f57);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.16);
  flex: 0 0 auto;
}
.avatar-lg { width: 74px; height: 74px; border-radius: 20px; font-size: 24px; }
.avatar-sm { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; }

.sidebar-user-info { min-width: 0; line-height: 1.4; }
.sidebar-user-info strong { display: block; font-size: 12.5px; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-info span { display: block; font-size: 10.5px; color: rgba(231, 242, 239, .55); }

.sidebar-user .btn-logout {
  margin-inline-start: auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  border: 0;
  background: rgba(255, 255, 255, .07);
  color: rgba(255, 255, 255, .7);
  cursor: pointer;
  transition: background .16s;
}
.sidebar-user .btn-logout:hover { background: rgba(220, 38, 38, .28); color: #fff; }

.sidebar-foot { font-size: 10.5px; color: rgba(231, 242, 239, .35); padding: 0 8px; display: flex; justify-content: space-between; }

/* ==========================================================================
   الشريط العلوي
   ========================================================================== */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 32px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  min-height: 74px;
}

.topbar-title { min-width: 0; }
.topbar-title h1 { font-size: 19px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-title p { font-size: 11.5px; color: var(--muted); }

.topbar-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 9px; }

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-2);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: border-color .16s, background .16s, color .16s;
}
.icon-btn:hover { border-color: var(--brand-soft-2); background: var(--brand-soft); color: var(--brand); }
.icon-btn .dot {
  position: absolute;
  top: 7px;
  inset-inline-end: 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

.menu-toggle { display: none; }

.topbar-user {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 5px 10px 5px 6px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}
.topbar-user span { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.topbar-user small { display: block; font-size: 10px; color: var(--muted); font-weight: 400; }

/* القوائم المنسدلة */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + 10px);
  width: 340px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity .16s, transform .16s, visibility .16s;
  z-index: 60;
}
.dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.dropdown-head strong { font-size: 13px; }
.dropdown-head a { font-size: 11.5px; }
.dropdown-item { display: flex; gap: 10px; padding: 10px; border-radius: 10px; color: var(--ink-2); }
.dropdown-item:hover { background: var(--brand-soft); }
.dropdown-item .di-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.dropdown-item .di-body { min-width: 0; }
.dropdown-item strong { display: block; font-size: 12px; font-weight: 600; }
.dropdown-item span { display: block; font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown-empty { padding: 22px; text-align: center; color: var(--muted); font-size: 12px; }

/* ==========================================================================
   العناصر العامة
   ========================================================================== */

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-head h1 { font-size: 25px; font-weight: 600; letter-spacing: -.4px; }
.page-head p { color: var(--muted); font-size: 13px; margin-top: 3px; }
.page-head-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted-2); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb span { color: var(--muted-2); }

.grid { display: grid; gap: 18px; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.gap-sm { gap: 11px; }
.stack { display: flex; flex-direction: column; gap: 18px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.spacer { flex: 1; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  position: relative;
}
.card-pad { padding: 20px 22px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 22px 0;
  flex-wrap: wrap;
}
.card-head h2, .card-head h3 { font-size: 15.5px; font-weight: 600; }
.card-head p { font-size: 11.5px; color: var(--muted); }
.card-head .card-actions { margin-inline-start: auto; display: flex; gap: 8px; }
.card-body { padding: 18px 22px 22px; }
.card-foot { padding: 0 22px 20px; }
.card-tight { padding: 16px 18px; }

.section-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.section-sub { font-size: 12px; color: var(--muted); }

.muted { color: var(--muted); }
.small { font-size: 11.5px; }
.tiny { font-size: 10.5px; }
.strong { font-weight: 600; }
.nowrap { white-space: nowrap; }
.text-center { text-align: center; }
.text-end { text-align: end; }
.mt-0 { margin-top: 0; } .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; }
.w-100 { width: 100%; }
.hidden { display: none !important; }
.opacity-60 { opacity: .6; }
.divider { height: 1px; background: var(--line); margin: 16px 0; }

/* الأزرار */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 17px;
  border-radius: 11px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s, box-shadow .16s, background .16s, border-color .16s, color .16s;
  white-space: nowrap;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }
.btn .icon { width: 18px; height: 18px; }

.btn-primary {
  background: linear-gradient(160deg, #128579, #0c6259);
  color: #fff;
  box-shadow: 0 8px 18px rgba(15, 118, 110, .22);
}
.btn-primary:hover { color: #fff; box-shadow: 0 12px 24px rgba(15, 118, 110, .28); }
.btn-gold { background: linear-gradient(160deg, #d9b64a, #b78d17); color: #2b2205; box-shadow: 0 8px 18px rgba(201, 162, 39, .24); }
.btn-gold:hover { color: #2b2205; }
.btn-outline { border-color: var(--line-2); background: #fff; color: var(--ink-2); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn-danger { background: #fef2f2; color: var(--danger); border-color: #fecaca; }
.btn-danger:hover { background: #fee2e2; color: var(--danger); }
.btn-sm { height: 34px; padding: 0 12px; font-size: 11.5px; border-radius: 9px; }
.btn-sm .icon { width: 15px; height: 15px; }
.btn-lg { height: 48px; padding: 0 24px; font-size: 14px; border-radius: 13px; }
.btn-icon { width: 36px; height: 36px; padding: 0; border-radius: 10px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* الشارات */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3.5px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.5;
  white-space: nowrap;
}
.badge .icon { width: 12px; height: 12px; }
.badge-ok { background: #e7f6f2; color: #0b6b62; }
.badge-warn { background: #fdf3e3; color: #9a5b08; }
.badge-danger { background: #fdeeee; color: #a51e1e; }
.badge-info { background: #eaf0fe; color: #1d4ed8; }
.badge-muted { background: #f1f5f4; color: #64777d; }
.badge-gold { background: var(--gold-soft); color: #8a6908; }
.badge-excellent { background: #e7f6f2; color: #0b6b62; }
.badge-verygood { background: #e6f4f8; color: #0e7490; }
.badge-good { background: #eaf0fe; color: #1d4ed8; }
.badge-fair { background: #fdf3e3; color: #9a5b08; }
.badge-weak { background: #fdeeee; color: #a51e1e; }
.table tr.row-active td { background: #f2faf7; }

.dot-badge { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* التنبيهات */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 16px;
  border-radius: 13px;
  border: 1px solid;
  font-size: 12.5px;
  margin-bottom: 16px;
  animation: slideIn .35s ease;
}
.alert .icon { width: 18px; height: 18px; margin-top: 2px; }
.alert-success { background: #eef9f5; border-color: #c6e9df; color: #0b5f57; }
.alert-error { background: #fef3f3; border-color: #f6d4d4; color: #a51e1e; }
.alert-info { background: #eff5ff; border-color: #d8e4fd; color: #1e40af; }
.alert-warning { background: #fff8e9; border-color: #f7e3b8; color: #8a5508; }
.alert-close { margin-inline-start: auto; background: none; border: 0; cursor: pointer; color: inherit; opacity: .6; padding: 0; }
.alert-close:hover { opacity: 1; }

.code-block {
    background: #0b2a26;
    color: #d7f2ec;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 11.5px;
    line-height: 1.7;
    overflow-x: auto;
    margin: 0;
    direction: ltr;
    text-align: left;
    white-space: pre-wrap;
    word-break: break-all;
}

@keyframes slideIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }

/* ==========================================================================
   البطاقات الإحصائية
   ========================================================================== */

.stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 19px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform .16s, box-shadow .16s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat::after {
  content: "";
  position: absolute;
  inset-inline-end: -30px;
  top: -30px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--stat-soft, var(--brand-soft));
  opacity: .55;
}
.stat-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; position: relative; z-index: 1; }
.stat-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--stat-soft, var(--brand-soft));
  color: var(--stat-color, var(--brand));
}
.stat-icon .icon { width: 21px; height: 21px; }
.stat-value { font-size: 28px; font-weight: 700; line-height: 1.2; letter-spacing: -.6px; position: relative; z-index: 1; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.stat-label { font-size: 12px; color: var(--muted); position: relative; z-index: 1; }
.stat-meta { font-size: 10.5px; color: var(--muted-2); margin-top: 2px; position: relative; z-index: 1; display: flex; align-items: center; gap: 5px; }
.stat-trend { font-size: 10.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 3px; }
.stat-trend.up { color: var(--ok); }
.stat-trend.down { color: var(--danger); }

.kpi-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 12px;
  align-items: center;
  transition: transform .16s, border-color .16s;
}
.kpi-card:hover { transform: translateY(-2px); border-color: var(--brand-soft-2); }
.kpi-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.kpi-body { min-width: 0; flex: 1; }
.kpi-label { font-size: 11px; color: var(--muted); }
.kpi-value { font-size: 21px; font-weight: 700; line-height: 1.25; letter-spacing: -.3px; }
.kpi-value small { font-size: 10.5px; color: var(--muted); font-weight: 400; }
.kpi-meta { font-size: 9.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-bar { height: 4px; border-radius: 4px; background: #eef4f2; margin-top: 5px; overflow: hidden; }
.kpi-bar i { display: block; height: 100%; border-radius: 4px; background: var(--brand); }

/* حلقة النسبة */
.ring-wrap { position: relative; width: 158px; height: 158px; flex: 0 0 auto; }
.ring-wrap svg { transform: rotate(-90deg); }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-center strong { font-size: 34px; font-weight: 700; letter-spacing: -1px; line-height: 1; }
.ring-center span { font-size: 10.5px; color: var(--muted); margin-top: 5px; }

/* ==========================================================================
   المخططات
   ========================================================================== */

.chart { width: 100%; min-height: 220px; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; direction: ltr; }
.chart text { font-family: var(--font); fill: var(--muted); }
.chart .chart-value { fill: var(--ink-2); font-weight: 600; }
.chart-empty { display: grid; place-items: center; min-height: 200px; color: var(--muted); font-size: 12px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.chart-legend-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--muted); }
.chart-legend-item i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.chart-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }

/* ==========================================================================
   الجداول
   ========================================================================== */

.table-wrap { overflow-x: auto; border-radius: 0 0 var(--radius) var(--radius); }
.table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.table th {
  text-align: start;
  font-weight: 500;
  font-size: 11px;
  color: var(--muted);
  background: #f8fbfa;
  padding: 11px 14px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table td { padding: 12px 14px; border-bottom: 1px solid #eff5f3; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .14s; }
.table tbody tr:hover { background: #fafdfc; }
.table .num { font-variant-numeric: tabular-nums; }
.table .actions { display: flex; gap: 5px; justify-content: flex-end; }

.table-card .card-head { padding-bottom: 14px; }

.filter-bar { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.filter-bar .field { margin: 0; }
.filter-bar input, .filter-bar select { height: 38px; font-size: 12px; min-width: 150px; }
.filter-bar .btn { height: 38px; }

/* ==========================================================================
   النماذج
   ========================================================================== */

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12px; font-weight: 500; color: var(--ink-2); display: flex; align-items: center; gap: 5px; }
.field .req { color: var(--danger); }
.field .hint { font-size: 10.5px; color: var(--muted-2); }

input[type="text"], input[type="email"], input[type="password"], input[type="number"],
input[type="date"], input[type="tel"], input[type="search"], input[type="url"], select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--ink);
  background: #fbfdfc;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 42px;
  transition: border-color .16s, box-shadow .16s, background .16s;
  outline: none;
}
textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
input:focus, select:focus, textarea:focus {
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 3.5px rgba(15, 118, 110, .1);
}
input::placeholder, textarea::placeholder { color: #a6b5ba; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23697c83' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 12px center; padding-inline-end: 12px; padding-left: 32px; }
input[type="file"] { padding: 8px; background: #fbfdfc; font-size: 11.5px; }
input[type="file"]::file-selector-button {
  font-family: inherit; font-size: 11.5px; border: 1px solid var(--line-2); background: #fff;
  color: var(--ink-2); padding: 7px 12px; border-radius: 8px; margin-inline-end: 10px; cursor: pointer;
}
input[type="file"]::file-selector-button:hover { background: var(--brand-soft); border-color: var(--brand); }

.check-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--ink-2); }
.grade-grid { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 2px; }
.grade-grid label { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 10px; padding: 7px 11px; font-size: 12.5px; color: var(--ink-2); background: var(--card); cursor: pointer; transition: border-color .15s, background .15s; }
.grade-grid label:hover { border-color: var(--brand); }
.grade-grid label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--brand); width: 16px; height: 16px; cursor: pointer; }

.form-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 6px; }
.form-section-title { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 6px 0 2px; display: flex; align-items: center; gap: 7px; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* مقياس التقييم 1-5 */
.rate { display: inline-flex; direction: ltr; gap: 5px; align-items: center; }
.rate label { position: relative; cursor: pointer; }
.rate input { position: absolute; opacity: 0; width: 0; height: 0; }
.rate span {
  display: grid;
  place-items: center;
  width: 37px;
  height: 37px;
  border-radius: 9px;
  border: 1px solid var(--line-2);
  background: #fbfdfc;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  transition: all .14s;
}
.rate label:hover span { border-color: var(--brand-soft-2); background: var(--brand-soft); transform: translateY(-1px); }
.rate input:checked + span { color: #fff; border-color: transparent; box-shadow: 0 4px 10px rgba(0,0,0,.12); transform: translateY(-1px); }
.rate label:nth-child(1) input:checked + span { background: #b91c1c; }
.rate label:nth-child(2) input:checked + span { background: #d97706; }
.rate label:nth-child(3) input:checked + span { background: #2563eb; }
.rate label:nth-child(4) input:checked + span { background: #0e7490; }
.rate label:nth-child(5) input:checked + span { background: #0f766e; }
.rate-legend { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--muted-2); width: 200px; direction: ltr; margin-top: 3px; }

.rate-sm span { width: 30px; height: 30px; font-size: 11px; border-radius: 7px; }

/* ==========================================================================
   التقييم والمعايير
   ========================================================================== */

.domain-card { border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.domain-head { display: flex; align-items: center; gap: 12px; padding: 17px 20px; border-bottom: 1px solid var(--line); }
.domain-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; }
.domain-icon .icon { width: 22px; height: 22px; }
.domain-head h3 { font-size: 14.5px; font-weight: 600; }
.domain-head p { font-size: 11px; color: var(--muted); }
.domain-weight { margin-inline-start: auto; text-align: center; padding-inline-start: 14px; }
.domain-weight strong { display: block; font-size: 18px; font-weight: 700; line-height: 1.1; }
.domain-weight span { font-size: 9.5px; color: var(--muted); }

.indicator-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 20px; border-bottom: 1px solid #f1f6f5; }
.indicator-row:last-child { border-bottom: 0; }
.indicator-row:hover { background: #fafdfc; }
.ind-code { font-size: 10.5px; color: var(--muted-2); font-variant-numeric: tabular-nums; }
.ind-title { font-size: 12.5px; line-height: 1.6; }
.ind-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.ind-tag { font-size: 9.5px; background: #f3f8f6; border: 1px solid #e4efeb; color: #55706b; padding: 1.5px 8px; border-radius: 20px; }
.ind-scores { display: flex; align-items: center; gap: 6px; }
.ind-group { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; background: #fff; }
.ind-group-head { background: #f7fbfa; border-bottom: 1px solid var(--line); padding: 10px 16px; font-size: 12px; font-weight: 700; color: var(--brand-d); }
.score-pill { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: #fbfdfc; color: var(--muted); }
.score-pill.excellent { background: #e7f6f2; border-color: #c6e9df; color: #0b6b62; }
.score-pill.verygood { background: #e6f4f8; border-color: #c9e7ef; color: #0e7490; }
.score-pill.good { background: #eaf0fe; border-color: #d5e1fb; color: #1d4ed8; }
.score-pill.fair { background: #fdf3e3; border-color: #f6e1b8; color: #9a5b08; }
.score-pill.weak { background: #fdeeee; border-color: #f7cfcf; color: #a51e1e; }

.eval-summary { display: grid; grid-template-columns: auto 1fr; gap: 26px; align-items: center; }
.eval-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 11px 20px; border-bottom: 1px solid #f1f6f5; align-items: center; }
.eval-row:last-child { border-bottom: 0; }
.eval-row:hover { background: #fafdfc; }
.eval-row-side { display: flex; align-items: center; gap: 8px; }
.eval-row-note { grid-column: 1 / -1; }
.eval-row-note input { height: 33px; font-size: 11.5px; }
@media (max-width: 720px) {
  .eval-row { grid-template-columns: minmax(0, 1fr); }
}
.eval-meta { display: flex; flex-direction: column; gap: 10px; }
.eval-meta .badge { align-self: flex-start; }

/* التبويبات */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; padding-bottom: 0; margin-bottom: 20px; }
.tab-btn {
  appearance: none; border: 0; background: none; font-family: inherit; font-size: 12.5px; color: var(--muted);
  padding: 11px 15px; cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color .14s, border-color .14s;
}
.tab-btn:hover { color: var(--ink); }
.tab-btn.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* الخط الزمني */
.timeline { position: relative; padding-inline-start: 26px; }
.timeline::before { content: ""; position: absolute; inset-inline-start: 7px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brand-soft-2), transparent); }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-dot { position: absolute; inset-inline-start: -26px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.tl-item.warn .tl-dot { border-color: var(--warn); box-shadow: 0 0 0 3px #fdf3e3; }
.tl-item.danger .tl-dot { border-color: var(--danger); box-shadow: 0 0 0 3px #fdeeee; }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-head strong { font-size: 12.5px; }
.tl-body { font-size: 12px; color: var(--led); margin-top: 3px; color: var(--muted); line-height: 1.8; }
.tl-time { font-size: 10px; color: var(--muted-2); }

/* بطاقات المحتوى */
.achievement-card { display: flex; flex-direction: column; gap: 9px; }
.chip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 10px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px; }
.info-row:last-child { border-bottom: 0; }
.info-row .lbl { color: var(--muted); display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.info-row .lbl .icon { width: 16px; height: 16px; color: var(--muted-2); }
.info-row .val { text-align: end; font-weight: 500; }

.progress { height: 7px; border-radius: 10px; background: #edf4f1; overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 10px; background: linear-gradient(90deg, #128579, #0f766e); transition: width .5s ease; }
.progress.ok i { background: linear-gradient(90deg, #14b8a6, #0f766e); }
.progress.warn i { background: linear-gradient(90deg, #f59e0b, #d97706); }
.progress.danger i { background: linear-gradient(90deg, #ef4444, #b91c1c); }
.progress-lg { height: 10px; }
.progress-row { display: flex; align-items: center; gap: 10px; }
.progress-row .progress { flex: 1; }
.progress-val { font-size: 11px; font-weight: 600; min-width: 36px; text-align: end; color: var(--ink-2); }

.goal-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.goal-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.goal-top strong { font-size: 12.5px; font-weight: 500; }
.goal-meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 10px; color: var(--muted-2); margin-top: 7px; }

.empty {
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
}
.empty .empty-icon { width: 58px; height: 58px; border-radius: 17px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin: 0 auto 13px; }
.empty .empty-icon .icon { width: 27px; height: 27px; }
.empty strong { display: block; color: var(--ink-2); font-size: 13.5px; margin-bottom: 3px; }
.empty p { font-size: 11.5px; max-width: 380px; margin: 0 auto; }

.list-plain { display: flex; flex-direction: column; gap: 0; }
.list-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid #f1f6f5; }
.list-item:last-child { border-bottom: 0; }
.list-item .li-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: 0 0 auto; }
.list-item .li-body { flex: 1; min-width: 0; }
.list-item .li-body strong, .list-item .li-body b { display: block; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .li-body span { font-size: 10.5px; color: var(--muted); }
.list-item .li-end { font-size: 11px; color: var(--muted); white-space: nowrap; }

.pill-tabs { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: #f1f6f4; }
.pill-tabs a, .pill-tabs button { font-family: inherit; border: 0; background: none; font-size: 11px; padding: 6px 12px; border-radius: 8px; color: var(--muted); cursor: pointer; }
.pill-tabs a.active, .pill-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

/* سجل الشواهد */
.file-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--brand); background: var(--brand-soft); border-radius: 8px; padding: 4px 9px; }
.file-chip .icon { width: 14px; height: 14px; }

/* الصفحة الشخصية */
.profile-cover {
  background:
    radial-gradient(400px 200px at 100% 0%, rgba(201, 162, 39, .16), transparent 60%),
    linear-gradient(150deg, #073d38, #0b5e54);
  border-radius: var(--radius);
  padding: 26px;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}
.profile-cover::after { content: ""; position: absolute; inset-inline-end: -40px; bottom: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.05); }
.profile-cover .avatar-lg { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); box-shadow: none; }
.profile-cover h1 { font-size: 23px; font-weight: 600; }
.profile-cover p { font-size: 12px; color: rgba(255,255,255,.66); }
.profile-cover .pc-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 9px; }
.profile-cover .pc-meta span { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: rgba(255,255,255,.75); }
.profile-cover .pc-meta .icon { width: 14px; height: 14px; color: var(--gold); }

.avatar-upload { display: flex; align-items: center; gap: 14px; }

/* ==========================================================================
   صفحة الدخول
   ========================================================================== */

.auth-body { background: #052c28; }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  direction: rtl;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  padding: 54px 58px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(700px 440px at 90% 0%, rgba(201, 162, 39, .22), transparent 60%),
    radial-gradient(500px 400px at 0% 100%, rgba(20, 184, 166, .18), transparent 60%),
    linear-gradient(160deg, #052c28, #073c37 55%, #094a43);
}
.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1.2px);
  background-size: 26px 26px;
  opacity: .25;
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .site-banner { width: min(100%, 380px); margin-bottom: 24px; box-shadow: 0 18px 44px rgba(0, 0, 0, .28); }
.auth-brand .brand-text strong { font-size: 30px; }
.auth-brand .brand-text small { color: rgba(255,255,255,.55); }
.auth-slogan { margin: 40px 0; max-width: 460px; }
.auth-slogan h2 { font-size: 32px; line-height: 1.5; font-weight: 600; letter-spacing: -.5px; }
.auth-slogan h2 em { color: var(--gold); font-style: normal; }
.auth-slogan p { color: rgba(255,255,255,.66); font-size: 13.5px; margin-top: 14px; line-height: 1.9; }
.auth-features { display: flex; flex-direction: column; gap: 13px; }
.auth-feature { display: flex; align-items: center; gap: 11px; font-size: 12.5px; color: rgba(255,255,255,.8); }
.auth-feature .af-icon { width: 34px; height: 34px; border-radius: 10px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); display: grid; place-items: center; color: var(--gold); flex: 0 0 auto; }
.auth-feature .af-icon .icon { width: 17px; height: 17px; }
.auth-brand-foot { font-size: 10.5px; color: rgba(255,255,255,.4); display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 40px 26px; background: var(--bg); position: relative; }
.auth-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(600px 400px at 0% 0%, rgba(15,118,110,.07), transparent 60%); pointer-events: none; }
.auth-card { width: 100%; max-width: 430px; position: relative; z-index: 1; }
.auth-logo { display: block; width: 104px; height: auto; margin: 0 auto 16px; }
.auth-card h1 { font-size: 25px; font-weight: 600; letter-spacing: -.4px; }
.auth-card > p { font-size: 12.5px; color: var(--muted); margin-top: 3px; margin-bottom: 24px; }
.auth-form { display: flex; flex-direction: column; gap: 15px; }
.auth-form .field label { font-size: 12.5px; }
.auth-form .input-wrap { position: relative; }
.auth-form .input-wrap > .icon { position: absolute; inset-inline-start: 13px; top: 50%; transform: translateY(-50%); color: var(--muted-2); width: 18px; height: 18px; pointer-events: none; }
.auth-form .input-wrap input { padding-inline-start: 42px; height: 46px; border-radius: 12px; background: #fff; }
.auth-form .btn { height: 47px; font-size: 13.5px; border-radius: 12px; }
.auth-demo { margin-top: 22px; border-top: 1px dashed var(--line-2); padding-top: 16px; }
.auth-demo-title { font-size: 10.5px; color: var(--muted-2); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.demo-chips { display: grid; grid-template-columns: repeat(2, 1fr); gap: 7px; }
.demo-chip {
  font-family: inherit; font-size: 10.5px; text-align: start; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2); cursor: pointer; transition: all .14s;
  display: flex; align-items: center; gap: 7px;
}
.demo-chip:hover { border-color: var(--brand-soft-2); background: var(--brand-soft); }
.demo-chip .icon { width: 14px; height: 14px; color: var(--brand); }
.auth-back { margin-top: 20px; text-align: center; font-size: 11.5px; color: var(--muted); }
.pass-toggle {
  position: absolute; inset-inline-end: 6px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; color: var(--muted-2); cursor: pointer; padding: 0; z-index: 1;
}
.pass-toggle .icon { position: static; transform: none; width: 18px; height: 18px; pointer-events: none; }
.pass-toggle:hover { color: var(--brand); background: var(--brand-soft); }
.pass-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pass-toggle[aria-pressed="true"] { color: var(--brand); }

/* صفحة خطأ */
.error-page { text-align: center; max-width: 480px; margin: 0 auto; }
.error-code { font-size: 74px; font-weight: 700; color: var(--brand-soft-2); line-height: 1; letter-spacing: -3px; }
.error-page h1 { font-size: 22px; margin: 8px 0 8px; }
.error-page p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* ==========================================================================
   صفحة الهبوط
   ========================================================================== */

.public-body { background: #f7fbf9; }

.pub-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 20px;
  padding: 14px 6vw;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.pub-nav .brand-text strong { color: var(--ink); font-size: 23px; }
.pub-nav .brand-text small { color: var(--muted); }
.pub-nav .brand:hover .brand-text strong { color: var(--brand); }
.pub-links { display: flex; gap: 4px; margin-inline-start: 22px; }
.pub-links a { font-size: 12.5px; color: var(--muted); padding: 7px 12px; border-radius: 8px; }
.pub-links a:hover { background: var(--brand-soft); color: var(--brand); }
.pub-nav-actions { margin-inline-start: auto; display: flex; gap: 9px; align-items: center; }

.hero {
  position: relative;
  overflow: hidden;
  padding: 78px 6vw 88px;
  background:
    radial-gradient(900px 520px at 88% 8%, rgba(201, 162, 39, .18), transparent 62%),
    radial-gradient(760px 520px at 0% 92%, rgba(20, 184, 166, .14), transparent 62%),
    linear-gradient(155deg, #052c28, #073d37 50%, #0a4b44);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1.2px);
  background-size: 30px 30px; opacity: .2;
  mask-image: linear-gradient(180deg, #000, transparent 75%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 40px; align-items: center; max-width: 1280px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 30px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); font-size: 11.5px; color: rgba(255,255,255,.85); margin-bottom: 22px; }
.hero-badge .dot-badge { background: var(--gold); }
.hero h1 { font-size: clamp(38px, 5vw, 62px); line-height: 1.15; font-weight: 700; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, #e7c65c, #c9a227); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: clamp(14px, 1.5vw, 17px); color: rgba(255,255,255,.72); margin-top: 18px; max-width: 560px; line-height: 1.9; }
.hero-actions { display: flex; gap: 11px; flex-wrap: wrap; margin-top: 30px; }
.hero-actions .btn { height: 49px; padding: 0 25px; border-radius: 13px; font-size: 13.5px; }
.hero-stats { display: flex; gap: 26px; margin-top: 38px; flex-wrap: wrap; }
.hero-stat strong { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.4px; }
.hero-stat span { font-size: 10.5px; color: rgba(255,255,255,.55); }

.site-banner {
  display: block;
  width: min(100%, 430px);
  padding: 8px 10px;
  background: #fff;
  border: 1px solid rgba(231, 198, 92, .55);
  border-radius: 16px;
  box-shadow: 0 22px 55px rgba(0, 0, 0, .3);
  margin-bottom: 20px;
}
.site-banner img { display: block; width: 100%; height: auto; border-radius: 10px; }

.hero-visual { position: relative; min-height: 390px; }
.hero-card {
  position: absolute; background: rgba(255,255,255,.97); border-radius: 18px; padding: 17px 18px; color: var(--ink);
  box-shadow: 0 24px 60px rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.6);
}
.hero-card.hc-main { inset-inline-start: 0; top: 18px; width: 280px; transform: rotate(-2deg); }
.hero-card.hc-mini { inset-inline-end: 0; bottom: 44px; width: 230px; transform: rotate(2.5deg); }
.hero-card.hc-mini2 { inset-inline-start: 40px; bottom: 0; width: 200px; transform: rotate(-1deg); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); }
.hc-title { font-size: 11px; color: var(--muted); margin-bottom: 3px; }
.hc-big { font-size: 34px; font-weight: 700; letter-spacing: -1px; }
.hc-big small { font-size: 12px; color: var(--muted); font-weight: 400; }
.hc-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; margin-top: 10px; }
.hc-row .progress { flex: 1; height: 5px; }
.hc-mini .hc-title { color: rgba(255,255,255,.6); }
.hc-mini .hc-big { color: #fff; font-size: 26px; }

.pub-section { padding: 74px 6vw; max-width: 1320px; margin: 0 auto; }
.pub-section-head { text-align: center; max-width: 650px; margin: 0 auto 42px; }
.eyebrow { display: inline-block; font-size: 10.5px; font-weight: 600; letter-spacing: .6px; color: var(--brand); background: var(--brand-soft); padding: 5px 12px; border-radius: 20px; margin-bottom: 13px; }
.pub-section-head h2 { font-size: clamp(25px, 3vw, 34px); font-weight: 600; letter-spacing: -.6px; line-height: 1.4; }
.pub-section-head p { color: var(--muted); font-size: 13.5px; margin-top: 10px; }

.domain-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.domain-tile {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px;
  box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s, border-color .18s;
  position: relative; overflow: hidden;
}
.domain-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--brand-soft-2); }
.domain-tile .dt-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 15px; }
.domain-tile .dt-icon .icon { width: 24px; height: 24px; }
.domain-tile h3 { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.domain-tile p { font-size: 11.5px; color: var(--muted); line-height: 1.8; min-height: 62px; }
.domain-tile .dt-count { display: flex; align-items: center; justify-content: space-between; margin-top: 15px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 10.5px; color: var(--muted-2); }
.domain-tile .dt-count b { color: var(--ink-2); font-weight: 600; }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; }
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px;
  box-shadow: var(--shadow-sm);
}
.feature .feat-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); display: grid; place-items: center; margin-bottom: 14px; }
.feature h3 { font-size: 14px; font-weight: 600; margin-bottom: 5px; }
.feature p { font-size: 11.5px; color: var(--muted); line-height: 1.8; }

.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 16px; counter-reset: step; }
.step { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; position: relative; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 18px; inset-inline-end: 20px; font-size: 30px; font-weight: 700;
  color: var(--brand-soft-2); line-height: 1;
}
.step h3 { font-size: 13.5px; font-weight: 600; margin-bottom: 5px; padding-inline-end: 40px; }
.step p { font-size: 11.5px; color: var(--muted); line-height: 1.8; }

.roles-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.role-card { border-radius: 16px; padding: 24px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.role-card .rc-icon { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); margin-bottom: 14px; }
.role-card h3 { font-size: 15px; margin-bottom: 4px; }
.role-card > p { font-size: 11.5px; color: var(--muted); }
.role-card ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 8px; }
.role-card li { font-size: 11.5px; color: var(--ink-2); display: flex; gap: 8px; align-items: flex-start; }
.role-card li .icon { width: 15px; height: 15px; color: var(--ok); margin-top: 2px; }

.cta-band {
  margin: 0 6vw 60px;
  border-radius: 26px;
  padding: 46px 6vw;
  background:
    radial-gradient(500px 260px at 90% 0%, rgba(201, 162, 39, .22), transparent 60%),
    linear-gradient(150deg, #073d38, #0a5149);
  color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
}
.cta-band h2 { font-size: clamp(23px, 2.6vw, 31px); font-weight: 600; letter-spacing: -.4px; }
.cta-band p { color: rgba(255,255,255,.65); font-size: 12.5px; margin-top: 7px; }

.pub-footer {
  padding: 30px 6vw 40px;
  border-top: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 11px;
  background: #fff;
}
.pub-footer .brand-text strong { color: var(--ink); font-size: 19px; }

/* ==========================================================================
   التقرير والطباعة
   ========================================================================== */

.report-paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 38px 42px;
  max-width: 1000px;
  margin: 0 auto;
}
.report-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding-bottom: 20px; border-bottom: 2px solid var(--brand); flex-wrap: wrap; }
.report-head .rh-brand { display: flex; align-items: center; gap: 13px; }
.report-logo {
  width: 44px; height: 44px; border-radius: 12px; overflow: hidden; flex: 0 0 auto;
  display: block; background: #f8f7f1; border: 1px solid rgba(201, 162, 39, .32);
}
.report-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.report-head h1 { font-size: 21px; }
.report-head p { font-size: 10.5px; color: var(--muted); }
.report-meta { font-size: 10.5px; color: var(--muted); text-align: end; line-height: 1.9; }
.report-section { margin-top: 26px; }
.report-section h2 { font-size: 14px; font-weight: 600; margin-bottom: 10px; padding-bottom: 7px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 7px; }
.report-section h2 .icon { width: 17px; height: 17px; color: var(--brand); }
.report-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.report-grid > div { background: #f7fbfa; border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.report-grid > div span { display: block; font-size: 9.5px; color: var(--muted); margin-bottom: 2px; }
.report-grid > div b { display: block; font-size: 11.5px; font-weight: 600; color: var(--ink); line-height: 1.6; }
.report-kpi { background: #f7fbfa; border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.report-kpi span { font-size: 9.5px; color: var(--muted); display: block; }
.report-kpi strong { font-size: 17px; font-weight: 700; }
.report-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.report-table th, .report-table td { border: 1px solid var(--line); padding: 7px 9px; text-align: start; }
.report-table th { background: #f4f9f7; font-weight: 600; font-size: 10px; }
.report-note { font-size: 11px; color: var(--muted); line-height: 1.9; }
.report-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.report-domain-head { font-size: 11.5px; font-weight: 700; color: var(--ink); margin: 16px 0 7px; padding-inline-start: 9px; border-inline-start: 3px solid var(--brand); }
.report-sign div span { display: block; font-size: 10px; }
.report-sign div b { display: block; color: var(--ink); font-size: 11.5px; font-weight: 600; margin: 3px 0; }
.report-sign div i { display: block; font-style: normal; }

/* المساعد المهني */
.assistant-head { background: linear-gradient(135deg, #f2fbf8, #fbfdfc 55%, #fdf9ec); border: 1px solid #d9ece6; }
.assistant-avatar { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 8px 18px rgba(15,118,110,.22); }
.assistant-avatar .icon { width: 23px; height: 23px; }
.kpi-mini { text-align: center; min-width: 74px; }
.kpi-mini b { display: block; font-size: 16px; font-weight: 700; color: var(--ink); }
.kpi-mini span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.insight-row { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); border-radius: 10px; background: #fbfdfc; }
.insight-row b { font-size: 11.5px; font-weight: 600; display: block; line-height: 1.5; }
.check-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 5px; }
.check-list li { display: flex; gap: 7px; align-items: flex-start; font-size: 11.5px; color: var(--ink-2); line-height: 1.6; }
.check-list li .icon { width: 13px; height: 13px; color: var(--ok); flex: none; margin-top: 3px; }

.report-sign { display: flex; gap: 40px; margin-top: 34px; flex-wrap: wrap; }
.report-sign div { flex: 1; min-width: 190px; border-top: 1px solid var(--ink-2); padding-top: 7px; font-size: 10.5px; color: var(--muted); }
.report-watermark { text-align: center; font-size: 9.5px; color: var(--muted-2); margin-top: 26px; padding-top: 12px; border-top: 1px dashed var(--line); }

/* ==========================================================================
   الاستجابة
   ========================================================================== */

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(5, 28, 25, .5); backdrop-filter: blur(2px);
  opacity: 0; visibility: hidden; transition: .2s; z-index: 39;
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

@media (max-width: 1250px) {
  .cols-5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1080px) {
  .app-shell { display: block; }
  .sidebar {
    position: fixed;
    inset-inline-start: auto;
    inset-inline-end: auto;
    right: 0;
    left: auto;
    top: 0;
    width: 290px;
    transform: translateX(100%);
    transition: transform .25s ease;
    box-shadow: -20px 0 50px rgba(0,0,0,.2);
  }
  .sidebar.open { transform: translateX(0); }
  .menu-toggle { display: grid; }
  .content { padding: 22px 20px 42px; }
  .topbar { padding: 12px 20px; }
  .grid.cols-2-1, .grid.cols-1-2 { grid-template-columns: minmax(0, 1fr); }
  .topbar-user span { display: none; }
  .topbar-user { border: 0; padding: 0; background: none; }
  .app-footer { padding: 16px 20px 24px; }
  .auth-wrap { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-panel { min-height: 100vh; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { display: none; }
}

@media (max-width: 860px) {
  .cols-3, .cols-4, .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .cols-2 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 21px; }
  .pub-links { display: none; }
  .pub-section { padding: 52px 5vw; }
  .hero { padding: 54px 5vw 60px; }
  .topbar-title p { display: none; }
  .report-paper { padding: 24px 20px; }
  .report-grid { grid-template-columns: repeat(2, 1fr); }
  .eval-summary { grid-template-columns: minmax(0, 1fr); }
  .ring-wrap { margin: 0 auto; }
}

@media (max-width: 560px) {
  .cols-3, .cols-4 { grid-template-columns: minmax(0, 1fr); }
  .cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card-pad { padding: 16px; }
  .card-head { padding: 15px 16px 0; }
  .card-body { padding: 14px 16px 18px; }
  .tab-btn { padding: 10px 10px; font-size: 12px; }
  .table-scroll { min-width: 520px; }
  .table th, .table td { padding: 9px 10px; }
  .topbar { gap: 8px; padding: 10px 14px; min-height: 64px; }
  .content { padding: 16px 14px 38px; }
  .topbar-actions { gap: 5px; }
  .topbar-user { display: none; }
  .page-head { margin-bottom: 16px; }
  .page-head-actions { width: 100%; }
  .page-head-actions .btn { flex: 1; }
  .dropdown-menu { width: calc(100vw - 28px); inset-inline-end: 0; }
  .indicator-row { grid-template-columns: 30px minmax(0, 1fr); padding: 10px 14px; }
  .ind-scores { grid-column: 2; margin-top: 4px; }
  .rate span { width: 34px; height: 34px; }
  .auth-panel { padding: 28px 18px; }
  .demo-chips { grid-template-columns: minmax(0, 1fr); }
  .hero-stats { gap: 18px; }
  .cta-band { margin: 0 5vw 40px; padding: 34px 24px; }
  .report-grid { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none !important; }
}

@media print {
  body { background: #fff; }
  body::before, .sidebar, .topbar, .app-footer, .sidebar-overlay, .no-print, .page-head-actions { display: none !important; }
  .app-shell { display: block; }
  .content { padding: 0; max-width: none; }
  .report-paper { border: 0; box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .report-section { break-inside: avoid; }
  .report-table { font-size: 10px; }
  a { color: inherit; }
  .print-only { display: block !important; }
}
.print-only { display: none; }

/* مرفقات الشواهد */
.ev-attachments { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.ev-attachment { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 5px 8px; max-width: 100%; }
.ev-attachment-thumb { width: 46px; height: 46px; border-radius: 8px; overflow: hidden; flex: none; background: var(--brand-soft); display: block; }
.ev-attachment-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ev-attachment-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ev-attachment-name { font-size: 11.5px; color: var(--brand); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-attachment-name .icon { width: 14px; height: 14px; flex: none; }
.ev-attachment-meta { font-size: 10.5px; color: var(--muted); }
.ev-attachment-dl { color: var(--muted); display: inline-flex; padding: 4px; border-radius: 7px; }
.ev-attachment-dl:hover { background: var(--brand-soft); color: var(--brand); }
.ev-attachment-dl .icon { width: 14px; height: 14px; }
.ev-attachments.is-compact .ev-attachment { padding: 3px 6px; gap: 6px; }
.ev-attachments.is-compact .ev-attachment-thumb { width: 32px; height: 32px; }
.ev-attachments.is-compact .ev-attachment-name { font-size: 11px; max-width: 170px; }
.ev-attachments.is-compact .ev-attachment-meta { display: none; }
.ev-project { margin-top: 8px; }
.ev-project summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
.ev-project summary::-webkit-details-marker { display: none; }
.ev-project[open] summary { background: var(--gold-soft); color: #6d5410; }
.ev-project-list { display: grid; gap: 8px; margin-top: 10px; padding: 10px; border: 1px dashed var(--line); border-radius: 10px; background: #fcfdfd; }
.ev-project-item { display: grid; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.ev-project-item:last-child { padding-bottom: 0; border-bottom: 0; }
.eval-evidence { margin-top: 6px; }
.eval-evidence .ev-project-list { max-width: 560px; }

/* بطاقات دخول المعلمين */
.login-card-sheet { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.login-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line-2); border-radius: 16px; padding: 18px 20px; box-shadow: var(--shadow-sm); break-inside: avoid; }
.login-card::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(180deg, var(--brand), var(--gold)); }
.login-card-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px dashed var(--line-2); }
.login-card-head img { width: 42px; height: 42px; object-fit: contain; }
.login-card-head strong { display: block; font-size: 13px; }
.login-card-head span { display: block; font-size: 11px; color: var(--muted); }
.login-card-name { margin: 12px 0 4px; font-size: 18px; }
.login-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11.5px; color: var(--muted); }
.login-card-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.login-card-fields > div { min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: #fbfdfd; }
.login-card-fields b { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; }
.login-card-fields code { display: block; direction: ltr; text-align: right; font-size: 13.5px; font-weight: 700; color: var(--brand-dark); overflow-wrap: anywhere; }
.login-card-pass { grid-column: 1 / -1; background: var(--gold-soft); border-color: #eadfae; }
.login-card-pass code { color: #7a5a0d; letter-spacing: .5px; }
.login-card-foot { margin: 12px 0 0; font-size: 10.5px; color: var(--muted); line-height: 1.7; }
.login-card-foot span { direction: ltr; unicode-bidi: embed; }
@media (max-width: 720px) {
  .login-card-sheet { grid-template-columns: minmax(0, 1fr); }
}
@media print {
  @page { size: A4; margin: 9mm; }
  .login-card-sheet { grid-template-columns: repeat(2, 1fr); gap: 8mm; margin: 0; }
  .login-card { box-shadow: none; border-color: #c9d4d1; padding: 14px 16px; }
  .login-card-pass { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .content { padding: 0 !important; }
}
