/* ═══════════════════════════════════════════════════════
   Al-Hadath Organizers — منصة HR (/organizer-hr/)
   ملء الشاشة. كل الأصناف ahr- لتجنّب التعارض مع admin.css (محرر الشهادة).
   ═══════════════════════════════════════════════════════ */
.ahr {
  --navy: #0A2A4A; --navy-2: #0E3A5C; --navy-3: #071D33;
  --teal: #06B6D4; --teal-2: #009BA6; --teal-soft: #67E8F9;
  --bg: #F3F5F9; --surface: #fff; --border: #E7EAF0; --border-2: #EEF1F5;
  --text: #16233A; --muted: #6B7686; --faint: #9AA5B4;
  --ok: #0FA968; --ok-bg: #E5F7EE; --err: #E1493F; --err-bg: #FCEAE8;
  --warn: #D98A0B; --warn-bg: #FFF4DE; --info: #3B7EE0; --info-bg: #E9F0FC;
  --r-md: 14px; --r-lg: 20px; --r-xl: 26px;
  --sh-sm: 0 1px 3px rgba(16,35,58,.06); --sh-md: 0 8px 24px rgba(16,35,58,.08); --sh-lg: 0 24px 56px rgba(10,42,74,.22);
  --ease: cubic-bezier(.4,0,.2,1);
  font-family: 'Tajawal', sans-serif; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased;
}
.ahr.ahr-ltr { font-family: 'Inter', 'Tajawal', sans-serif; }
.ahr *, .ahr *::before, .ahr *::after { box-sizing: border-box; }
.ahr button, .ahr input, .ahr select, .ahr textarea { font-family: inherit; }
.ahr a { text-decoration: none; }
.ahr h1, .ahr h2, .ahr h3, .ahr h4, .ahr h5 { margin: 0; color: var(--navy); font-weight: 800; line-height: 1.4; font-family: inherit; }
:where(.ahr) p { margin: 0; }
.ahr code { font-family: ui-monospace, Menlo, monospace; font-size: .82em; background: var(--bg); color: var(--navy); padding: .1rem .45rem; border-radius: 6px; letter-spacing: .02em; }
body:has(.ahr) #futuristicTopbar, body:has(.ahr) #alhadathSplashScreen { display: none !important; }
body.ahr-lock { overflow: hidden; }

/* ── أزرار وحقول ── */
.ahr-btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .62rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 700; font-size: .86rem; cursor: pointer; line-height: 1.2; white-space: nowrap;
  transition: transform .15s var(--ease), background .15s, border-color .15s, box-shadow .15s; }
.ahr-btn:hover { transform: translateY(-1px); border-color: #d3d9e2; }
.ahr-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.ahr-btn:focus-visible, .ahr-tab:focus-visible, .ahr-kpi:focus-visible { outline: 3px solid rgba(6,182,212,.35); outline-offset: 2px; }
.ahr-btn-sm { padding: .45rem .85rem; font-size: .8rem; }
.ahr-btn-lg { height: 52px; font-size: 1rem; }
.ahr-btn-block { width: 100%; }
.ahr-btn-primary { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 8px 18px rgba(6,182,212,.26); }
.ahr-btn-primary:hover { background: #0891B2; border-color: #0891B2; color: #fff; }
.ahr-btn-success { background: var(--ok); border-color: var(--ok); color: #fff; }
.ahr-btn-success:hover { background: #0c9159; color: #fff; }
.ahr-btn-danger { background: var(--err); border-color: var(--err); color: #fff; }
.ahr-btn-danger:hover { background: #c93a31; color: #fff; }
.ahr-btn-ghost-danger { background: transparent; border-color: #f3c6c2; color: #b3261e; }
.ahr-btn-ghost-danger:hover { background: var(--err-bg); }
.ahr-btn-wa { background: #25D366; border-color: #25D366; color: #fff; }
.ahr-btn-wa:hover { background: #1ebe5b; color: #fff; }
.ahr-btn-light { background: #fff; border-color: #fff; color: var(--navy); }
.ahr-btn-ghost-light { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.25); color: #fff; }
.ahr-btn-ghost-light:hover { background: rgba(255,255,255,.18); }
.ahr-btn-text { border-color: transparent; background: transparent; color: var(--muted); }
.ahr-link { color: var(--teal-2); font-weight: 700; font-size: .84rem; }
.ahr-link:hover { color: var(--navy); }
.ahr-muted { color: var(--muted); }
.ahr-small { font-size: .8rem; }
.ahr-ltr { direction: ltr; unicode-bidi: isolate; }
.ahr-wa-link { color: #128C7E; font-weight: 700; }
.ahr-wa-link:hover { color: #075E54; }
.ahr input[type=text], .ahr input[type=search], .ahr input[type=password], .ahr input[type=number], .ahr input[type=date], .ahr select, .ahr textarea {
  width: 100%; min-height: 44px; padding: .55rem .85rem; border: 1.5px solid var(--border); border-radius: 12px; background: #FAFBFD; color: var(--text); font-size: .9rem;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.ahr textarea { resize: vertical; line-height: 1.7; }
.ahr input:focus, .ahr select:focus, .ahr textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(6,182,212,.14); background: #fff; }
.ahr input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--teal); cursor: pointer; margin: 0; vertical-align: middle; }
.ahr-field { display: flex; flex-direction: column; gap: .35rem; font-size: .82rem; font-weight: 700; color: var(--navy); }
.ahr-field.is-wide { grid-column: 1 / -1; }
.ahr-check { display: inline-flex; align-items: center; gap: .45rem; font-size: .84rem; color: var(--text); cursor: pointer; }
.ahr-spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(6,182,212,.2); border-top-color: var(--teal); animation: ahr-spin .8s linear infinite; display: inline-block; }
.ahr-spinner-sm { width: 16px; height: 16px; border-width: 2px; border-color: rgba(255,255,255,.35); border-top-color: #fff; vertical-align: middle; }
@keyframes ahr-spin { to { transform: rotate(360deg); } }
.ahr-alert { display: flex; align-items: flex-start; gap: .55rem; padding: .85rem 1rem; border-radius: var(--r-md); font-size: .88rem; margin-bottom: 1.1rem; }
.ahr-alert-err { background: var(--err-bg); color: #a3271e; }
.ahr-blob { position: absolute; border-radius: 50%; filter: blur(70px); pointer-events: none; }
.ahr-blob-1 { width: 440px; height: 440px; background: var(--teal); opacity: .3; top: -150px; inset-inline-start: -140px; }
.ahr-blob-2 { width: 340px; height: 340px; background: var(--teal-2); opacity: .2; bottom: -150px; inset-inline-end: -100px; }

/* ═════════════ الدخول ═════════════ */
.ahr-auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(380px, 44%) 1fr; }
.ahr-auth-brand { position: relative; overflow: hidden; background: linear-gradient(160deg, var(--navy), var(--navy-2) 55%, var(--navy-3)); color: #fff; padding: 48px clamp(28px, 4vw, 64px); display: flex; align-items: center; }
.ahr-auth-brand-inner { position: relative; z-index: 1; max-width: 500px; }
.ahr-auth-logo { width: 58px; height: 58px; border-radius: 16px; background: #fff; padding: 5px; box-shadow: 0 10px 24px rgba(0,0,0,.25); margin-bottom: 2rem; }
.ahr-auth-brand h1 { color: #fff; font-size: clamp(2rem, 3vw, 2.7rem); margin-bottom: .8rem; }
.ahr-auth-brand p { color: rgba(255,255,255,.75); line-height: 1.85; margin-bottom: 1.8rem; }
.ahr-auth-brand ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ahr-auth-brand li { display: flex; align-items: center; gap: .8rem; padding: .85rem 1rem; border-radius: 16px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); font-weight: 600; font-size: .92rem; }
.ahr-auth-brand li i { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--teal), var(--teal-2)); flex-shrink: 0; }
.ahr-auth-main { display: flex; align-items: center; justify-content: center; padding: 40px clamp(20px, 5vw, 80px); }
.ahr-auth-card { width: 100%; max-width: 420px; }
.ahr-auth-card h2 { font-size: 1.75rem; margin-bottom: .4rem; }
.ahr-auth-sub { color: var(--muted); margin-bottom: 1.8rem; font-size: .92rem; }
.ahr-label { display: block; font-size: .84rem; font-weight: 700; color: var(--navy); margin-bottom: .45rem; }
.ahr-input-ic { position: relative; margin-bottom: 1.1rem; }
.ahr-input-ic > i { position: absolute; top: 50%; inset-inline-start: 16px; transform: translateY(-50%); color: var(--faint); }
.ahr-auth .ahr-input-ic input { height: 50px; padding-inline-start: 44px; font-size: 16px; }
.ahr-pass-toggle { position: absolute; top: 50%; inset-inline-end: 6px; transform: translateY(-50%); width: 40px; height: 40px; border: none; border-radius: 10px; background: transparent; color: var(--faint); cursor: pointer; }
.ahr-pass-toggle:hover { color: var(--navy); background: var(--bg); }
.ahr-auth-foot { margin-top: 1.4rem; font-size: .8rem; color: var(--muted); display: flex; gap: .45rem; line-height: 1.6; }

/* ═════════════ الهيكل ═════════════ */
.ahr-app { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 256px 1fr; }
.ahr-side { position: sticky; top: 0; height: 100vh; height: 100dvh; background: linear-gradient(180deg, var(--navy), var(--navy-3)); color: #fff; display: flex; flex-direction: column; padding: 22px 14px; }
.ahr-side-brand { display: flex; align-items: center; gap: .7rem; padding: 0 .6rem 1.3rem; margin-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.ahr-side-brand img { width: 40px; height: 40px; border-radius: 12px; background: #fff; padding: 3px; }
.ahr-side-brand span { font-weight: 800; }
.ahr-side-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.ahr-side-nav a { display: flex; align-items: center; gap: .75rem; padding: .8rem 1rem; border-radius: 14px; color: rgba(255,255,255,.72); font-weight: 600; font-size: .93rem; transition: background .15s, color .15s; }
.ahr-side-nav a i { width: 20px; text-align: center; }
.ahr-side-nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.ahr-side-nav a.is-active { background: var(--teal); color: #fff; box-shadow: 0 10px 24px rgba(6,182,212,.3); }
.ahr-nav-badge { margin-inline-start: auto; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: #FF5A4E; color: #fff; font-size: .72rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; }
.ahr-nav-badge[hidden] { display: none; }
.ahr-side-user { display: flex; align-items: center; gap: .7rem; padding: 1rem .6rem; border-top: 1px solid rgba(255,255,255,.1); }
.ahr-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--teal), var(--navy-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
.ahr-avatar-sm { width: 36px; height: 36px; font-size: .85rem; }
.ahr-side-user-name b { display: block; font-size: .88rem; }
.ahr-side-user-name small { color: rgba(255,255,255,.55); font-size: .75rem; }
.ahr-side-foot { display: flex; flex-direction: column; gap: 2px; }
.ahr-side-foot a, .ahr-side-foot button { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .6rem 1rem; border-radius: 12px; border: none; background: transparent; color: rgba(255,255,255,.66); font-size: .85rem; font-weight: 600; cursor: pointer; text-align: start; }
.ahr-side-foot a:hover, .ahr-side-foot button:hover { background: rgba(255,255,255,.07); color: #fff; }
.ahr-side-foot form, .ahr-topbar-logout { margin: 0; }

.ahr-main { min-width: 0; display: flex; flex-direction: column; }
.ahr-topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 1rem; padding: 14px clamp(18px, 3vw, 36px); background: rgba(243,245,249,.88); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid rgba(231,234,240,.8); }
.ahr-topbar-logo { display: none; width: 36px; height: 36px; border-radius: 10px; background: #fff; padding: 3px; }
.ahr-topbar h1 { font-size: 1.3rem; flex: 1; }
.ahr-topbar-actions { display: flex; align-items: center; gap: .6rem; }
.ahr-global-search { position: relative; width: 300px; }
.ahr-global-search i { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--faint); font-size: .85rem; }
.ahr-global-search input { padding-inline-start: 38px !important; background: #fff !important; border-radius: 999px !important; min-height: 40px !important; }
.ahr-icon-btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; height: 38px; min-width: 38px; padding: 0 .7rem; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--navy); font-weight: 800; font-size: .82rem; }
.ahr-icon-btn:hover { background: var(--bg); color: var(--navy); }
.ahr-lang-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border-radius: 999px; border: 1px solid rgba(255,255,255,.2); color: rgba(255,255,255,.85); font-size: .82rem; font-weight: 700; }
.ahr-lang-pill:hover { background: rgba(255,255,255,.1); color: #fff; }
.ahr-auth-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.ahr-auth-top .ahr-auth-logo { margin-bottom: 0; }
.ahr-topbar-logout { display: none; }
.ahr-topbar-logout button { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--navy); cursor: pointer; }
.ahr-content { flex: 1; width: 100%; max-width: 1360px; padding: 22px clamp(16px, 3vw, 36px) 48px; }
.ahr-view { display: flex; flex-direction: column; gap: 18px; animation: ahr-in .22s var(--ease); }
@keyframes ahr-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.ahr-state { min-height: 40vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; color: var(--muted); text-align: center; }
.ahr-bottom-nav { display: none; }
.ahr-cert-wrap { flex: 1; min-width: 0; }

/* ── بطاقات عامة ── */
.ahr-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-sm); min-width: 0; }
.ahr-card-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 14px; flex-wrap: wrap; }
.ahr-card-head h3 { font-size: 1rem; display: flex; align-items: center; gap: .5rem; }
.ahr-card-head h3 i { color: var(--teal); }
.ahr-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
.ahr-empty { text-align: center; padding: 26px 14px; }
.ahr-empty-ic { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 18px; background: var(--bg); color: var(--faint); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.ahr-empty h4 { font-size: .96rem; color: var(--text); font-weight: 700; }
.ahr-empty p { color: var(--muted); font-size: .85rem; margin-top: .3rem; }
.ahr-info { display: flex; gap: .55rem; align-items: flex-start; padding: .85rem 1rem; border-radius: var(--r-md); background: var(--info-bg); color: #28579d; font-size: .86rem; line-height: 1.65; }
.ahr-info-warn { background: var(--warn-bg); color: #8a5a07; }

/* ── الأفاتار ── */
.ahr-ava { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; display: inline-flex; }
.ahr-ava-ph { align-items: center; justify-content: center; background: linear-gradient(135deg, #dff6fa, #e9eef6); color: var(--navy); font-weight: 800; }
.ahr-ava-xl { width: 88px; height: 88px; border-radius: 24px; border: 3px solid #fff; box-shadow: var(--sh-md); font-size: 1.8rem; }

/* ── نظرة عامة ── */
.ahr-hello { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 24px 26px; border-radius: var(--r-xl); color: #fff; background: linear-gradient(120deg, var(--navy), var(--navy-2) 55%, #0b5a78); box-shadow: var(--sh-lg); }
.ahr-hello::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: var(--teal); filter: blur(70px); opacity: .35; top: -140px; inset-inline-start: -60px; pointer-events: none; }
.ahr-hello > * { position: relative; z-index: 1; }
.ahr-hello h2 { color: #fff; font-size: 1.5rem; margin-bottom: .3rem; }
.ahr-hello p { color: rgba(255,255,255,.8); }
.ahr-hello-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.ahr-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.ahr-kpi { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-sm); cursor: pointer; text-align: start; transition: transform .15s var(--ease), box-shadow .15s; }
.ahr-kpi:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.ahr-kpi-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: .35rem; }
.ahr-kpi b { font-size: 1.9rem; font-weight: 800; color: var(--navy); line-height: 1; }
.ahr-kpi > span:last-child { color: var(--muted); font-size: .82rem; font-weight: 600; }
.ahr-kpi-pending .ahr-kpi-ic { background: var(--warn-bg); color: var(--warn); }
.ahr-kpi-approved .ahr-kpi-ic { background: var(--ok-bg); color: var(--ok); }
.ahr-kpi-rejected .ahr-kpi-ic { background: var(--err-bg); color: var(--err); }
.ahr-kpi-total .ahr-kpi-ic { background: #E6F8FB; color: var(--teal-2); }
.ahr-mini-list { display: flex; flex-direction: column; }
.ahr-mini { display: flex; align-items: center; gap: .8rem; padding: .7rem .5rem; border: none; border-bottom: 1px solid var(--border-2); background: transparent; cursor: pointer; text-align: start; border-radius: 12px; width: 100%; }
.ahr-mini:hover { background: #F7FAFC; }
.ahr-mini:last-child { border-bottom: none; }
.ahr-mini-body { flex: 1; min-width: 0; }
.ahr-mini-body b { display: block; color: var(--navy); font-size: .92rem; }
.ahr-mini-body small { color: var(--muted); font-size: .8rem; }
.ahr-mini-side { color: var(--faint); font-size: .78rem; display: flex; align-items: center; gap: .5rem; white-space: nowrap; }
.ahr-conf-mini { display: flex; flex-direction: column; gap: 10px; }
.ahr-conf-row { display: block; width: 100%; text-align: start; border: 1px solid var(--border); background: #FAFBFD; border-radius: var(--r-md); padding: 12px 14px; cursor: pointer; }
.ahr-conf-row:hover { border-color: #cfe9ef; background: #F5FBFD; }
.ahr-conf-row-top { display: flex; justify-content: space-between; gap: .6rem; align-items: center; }
.ahr-conf-row b { color: var(--navy); font-size: .92rem; }
.ahr-conf-row small { color: var(--muted); font-size: .78rem; display: block; margin: .2rem 0 .55rem; }
.ahr-when { flex-shrink: 0; font-size: .74rem; font-weight: 800; padding: .2rem .6rem; border-radius: 999px; background: var(--info-bg); color: var(--info); }
.ahr-when.is-now { background: var(--ok-bg); color: var(--ok); }
.ahr-when.is-past { background: #F0F2F6; color: var(--faint); }
.ahr-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--border-2); gap: 2px; }
.ahr-bar i { display: block; }
.b-part { background: #07758a; } .b-conf { background: var(--ok); } .b-call { background: #F2A516; } .b-decl { background: #c3cad5; } .b-noshow { background: var(--err); }
.ahr-legend { display: flex; flex-wrap: wrap; gap: .3rem .9rem; margin-top: .5rem; font-size: .76rem; color: var(--muted); }
.ahr-legend span { display: inline-flex; align-items: center; gap: .3rem; }
.ahr-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.ahr-legend b { color: var(--text); }
.ahr-hbars { display: flex; flex-direction: column; gap: 10px; }
.ahr-hbar { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: .7rem; font-size: .85rem; }
.ahr-hbar i { height: 10px; border-radius: 999px; background: var(--border-2); overflow: hidden; display: block; }
.ahr-hbar em { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--teal), var(--teal-2)); }
.ahr-hbar b { color: var(--navy); text-align: end; }
.ahr-gender-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; gap: 3px; margin: 8px 0 14px; }
.g-m { background: var(--info); } .g-f { background: #E26BA5; }
.ahr-gender-legend { display: flex; gap: 1.4rem; flex-wrap: wrap; font-size: .88rem; color: var(--muted); }
.ahr-gender-legend span { display: inline-flex; align-items: center; gap: .4rem; }
.ahr-gender-legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.ahr-gender-legend b { color: var(--navy); }

/* ── الفلاتر والقائمة ── */
.ahr-filters { display: flex; flex-direction: column; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; box-shadow: var(--sh-sm); }
.ahr-search { position: relative; }
.ahr-search i { position: absolute; top: 50%; inset-inline-start: 14px; transform: translateY(-50%); color: var(--faint); }
.ahr-search input { padding-inline-start: 40px !important; }
.ahr-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.ahr-tabs-scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.ahr-tabs-scroll::-webkit-scrollbar { display: none; }
.ahr-tab { flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem; padding: .5rem .95rem; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font-weight: 700; font-size: .84rem; cursor: pointer; }
.ahr-tab span { min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--bg); color: var(--muted); font-size: .72rem; display: inline-flex; align-items: center; justify-content: center; }
.ahr-tab.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.ahr-tab.is-active span { background: rgba(255,255,255,.18); color: #fff; }
.ahr-selects { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ahr-selects select { width: auto; min-width: 150px; flex: 1 1 150px; min-height: 40px; font-size: .84rem; }
.ahr-list-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.ahr-count { color: var(--muted); font-size: .9rem; }
.ahr-count b { color: var(--navy); font-size: 1.05rem; }
.ahr-bulk { display: none; align-items: center; gap: .5rem; flex-wrap: wrap; position: sticky; top: 72px; z-index: 20; padding: 10px 14px; border-radius: var(--r-md); background: var(--navy); color: #fff; box-shadow: var(--sh-lg); }
.ahr-bulk.is-show { display: flex; animation: ahr-in .18s var(--ease); }
.ahr-bulk > b { margin-inline-end: .4rem; }
.ahr-bulk .ahr-muted { color: rgba(255,255,255,.65); font-size: .82rem; }
.ahr-bulk .ahr-btn:not(.ahr-btn-primary):not(.ahr-btn-success) { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.ahr-bulk .ahr-btn-ghost-danger { color: #ffb4ad !important; }
.ahr-table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); overflow: auto; }
.ahr-table { width: 100%; border-collapse: collapse; font-size: .87rem; }
.ahr-table th { text-align: start; padding: .85rem 1rem; background: #FAFBFD; color: var(--muted); font-weight: 700; font-size: .76rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
.ahr-table td { padding: .75rem 1rem; border-bottom: 1px solid var(--border-2); vertical-align: middle; }
.ahr-table tbody tr:last-child td { border-bottom: none; }
.ahr-table tbody tr:hover { background: #FAFCFE; }
.ahr-table tbody tr.is-sel { background: #EEFAFD; }
.ahr-th-check, .ahr-td-check { width: 44px; }
.ahr-person { display: flex; align-items: center; gap: .7rem; border: none; background: none; padding: 0; cursor: pointer; text-align: start; }
.ahr-person b { display: block; color: var(--navy); font-size: .92rem; }
.ahr-person:hover b { color: var(--teal-2); }
.ahr-person code { font-size: .72rem; }
.ahr-td-act { text-align: end; }
.ahr-badge { display: inline-flex; align-items: center; padding: .26rem .75rem; border-radius: 999px; font-size: .74rem; font-weight: 800; white-space: nowrap; }
.ahr-st-pending { background: var(--warn-bg); color: #9a5d00; }
.ahr-st-approved { background: var(--ok-bg); color: #0b7a4a; }
.ahr-st-rejected { background: var(--err-bg); color: #a3271e; }
.ahr-cs-called { background: var(--warn-bg); color: #9a5d00; }
.ahr-cs-confirmed { background: var(--ok-bg); color: #0b7a4a; }
.ahr-cs-declined, .ahr-cs-cancelled, .ahr-cs-not_called { background: #F0F2F6; color: var(--muted); }
.ahr-cs-participated { background: #DDF6FA; color: #07758a; }
.ahr-cs-no_show { background: var(--err-bg); color: #a3271e; }
.ahr .ahr-status-select { width: auto; min-width: 128px; min-height: 36px; padding: .3rem .7rem; border-radius: 999px; font-weight: 800; font-size: .8rem; border-color: transparent; cursor: pointer; }
.ahr-pager { display: flex; align-items: center; justify-content: center; gap: 1rem; color: var(--muted); font-size: .88rem; }
.ahr-pager b { color: var(--navy); }
.ahr-stars { display: inline-flex; gap: 1px; direction: ltr; }
.ahr-stars button { border: none; background: none; padding: 2px; cursor: pointer; color: #d7dce4; font-size: .95rem; transition: transform .1s; }
.ahr-stars button.is-on { color: #F2A516; }
.ahr-stars button:hover { transform: scale(1.15); }

/* ── الفعاليات ── */
.ahr-conf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.ahr-conf-card { display: flex; flex-direction: column; gap: 10px; text-align: start; padding: 18px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--sh-sm); cursor: pointer; transition: transform .15s var(--ease), box-shadow .15s; }
.ahr-conf-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.ahr-conf-card-top { display: flex; justify-content: space-between; gap: .7rem; align-items: flex-start; }
.ahr-conf-card h4 { font-size: 1.05rem; }
.ahr-conf-meta { display: flex; flex-wrap: wrap; gap: .3rem 1rem; color: var(--muted); font-size: .83rem; align-items: center; }
.ahr-conf-meta i { color: var(--faint); margin-inline-end: .2rem; }
.ahr-conf-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ahr-conf-nums span { background: var(--bg); border-radius: 12px; padding: .5rem; text-align: center; font-size: .72rem; color: var(--muted); }
.ahr-conf-nums b { display: block; font-size: 1.2rem; color: var(--navy); }
.ahr-conf-open { color: var(--teal-2); font-weight: 800; font-size: .84rem; margin-top: .2rem; }
.ahr-back { align-self: flex-start; border: none; background: none; color: var(--muted); font-weight: 700; cursor: pointer; padding: 0; display: inline-flex; gap: .45rem; align-items: center; }
.ahr-back:hover { color: var(--navy); }
.ahr-roster-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--sh-sm); }
.ahr-roster-head h2 { font-size: 1.4rem; margin-bottom: .4rem; }
.ahr-roster-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

/* ── ملف المنظم (لوحة جانبية) ── */
.ahr-drawer { position: fixed; inset: 0; z-index: 100000; background: rgba(7,29,51,0); transition: background .2s; }
.ahr-drawer.is-open { background: rgba(7,29,51,.45); }
.ahr-drawer[hidden] { display: none; }
.ahr-drawer-panel { position: absolute; top: 0; bottom: 0; inset-inline-end: 0; width: min(720px, 100%); background: var(--bg); box-shadow: var(--sh-lg); overflow-y: auto; transform: translateX(-100%); transition: transform .22s var(--ease); display: flex; flex-direction: column; }
.ahr-ltr .ahr-drawer-panel { transform: translateX(100%); }
.ahr-drawer.is-open .ahr-drawer-panel { transform: none; }
.ahr-drawer-top { position: sticky; top: 0; z-index: 2; display: flex; justify-content: flex-end; padding: 12px 14px 0; }
.ahr-x { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--border); background: #fff; color: var(--navy); cursor: pointer; font-size: 1rem; }
.ahr-x:hover { background: var(--bg); }
.ahr-p-head { display: flex; gap: 1.1rem; align-items: center; padding: 0 22px 16px; }
.ahr-p-id { min-width: 0; }
.ahr-p-id h2 { font-size: 1.35rem; margin-bottom: .35rem; }
.ahr-p-badges { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-bottom: .5rem; }
.ahr-p-contact { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; }
.ahr-p-contact a { color: var(--muted); font-weight: 600; overflow-wrap: anywhere; }
.ahr-p-contact a:hover { color: var(--navy); }
.ahr-p-contact .ahr-wa-link { color: #128C7E; }
.ahr-p-decide { margin: 0 22px 14px; display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: 12px 14px; border-radius: var(--r-md); background: var(--warn-bg); border: 1.5px solid #F4D38F; color: #7a4d05; font-weight: 700; font-size: .9rem; }
.ahr-p-decide div { display: flex; gap: .5rem; }
.ahr-p-tabs { display: flex; gap: 4px; padding: 0 22px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.ahr-p-tabs::-webkit-scrollbar { display: none; }
.ahr-p-tabs button { flex-shrink: 0; border: none; background: none; padding: .8rem .9rem; font-weight: 700; font-size: .88rem; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; display: inline-flex; gap: .4rem; align-items: center; }
.ahr-p-tabs button span { background: var(--border); color: var(--muted); border-radius: 999px; font-size: .7rem; padding: 0 .45rem; min-width: 18px; }
.ahr-p-tabs button.is-active { color: var(--navy); border-bottom-color: var(--teal); }
.ahr-p-body { padding: 18px 22px 30px; display: flex; flex-direction: column; gap: 14px; }
.ahr-p-sec { font-size: .82rem; color: var(--teal-2); text-transform: none; letter-spacing: .02em; margin-top: 4px; }
.ahr-dl { margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 4px 16px; }
.ahr-dl > div { padding: 10px 0; border-bottom: 1px dashed var(--border); min-width: 0; }
.ahr-dl > div.is-wide { grid-column: 1 / -1; }
.ahr-dl > div:last-child { border-bottom: none; }
.ahr-dl dt { color: var(--muted); font-size: .76rem; margin-bottom: .2rem; }
.ahr-dl dd { margin: 0; font-weight: 700; font-size: .9rem; overflow-wrap: anywhere; line-height: 1.7; }
.ahr-chip { display: inline-block; background: #E6F8FB; color: #07758a; padding: .15rem .6rem; border-radius: 999px; font-size: .76rem; margin: 0 0 .25rem; margin-inline-end: .2rem; font-weight: 700; }
.ahr-yes { color: var(--ok); }
.ahr-qa { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; }
.ahr-qa h5 { font-size: .8rem; color: var(--muted); font-weight: 700; margin-bottom: .35rem; }
.ahr-qa p { white-space: pre-line; line-height: 1.85; font-size: .92rem; overflow-wrap: anywhere; }
.ahr-note { background: var(--warn-bg); border: 1px solid #F4D38F; border-radius: var(--r-md); padding: 12px 16px; }
.ahr-note h5 { font-size: .8rem; color: #8a5a07; margin-bottom: .3rem; }
.ahr-note p { white-space: pre-line; font-size: .9rem; }
.ahr-p-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.ahr-p-box h5 { font-size: .92rem; display: flex; align-items: center; gap: .45rem; }
.ahr-p-box h5 i { color: var(--teal); }
.ahr-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ahr-row > select, .ahr-row > input { flex: 1 1 180px; width: auto; }
.ahr-row-end { justify-content: space-between; }
.ahr-danger { border-color: #f3c6c2; background: #FFF8F7; }
.ahr-danger h5, .ahr-danger h5 i { color: #b3261e; }
.ahr-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.ahr-form > .ahr-btn { align-self: flex-start; }
.ahr-p-confs { display: flex; flex-direction: column; gap: 10px; }
.ahr-p-conf { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; }
.ahr-p-conf-top { display: flex; justify-content: space-between; gap: .7rem; align-items: flex-start; }
.ahr-p-conf-top b { color: var(--navy); display: block; }
.ahr-p-conf-top small { color: var(--muted); font-size: .8rem; }
.ahr-p-conf-act { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.ahr-p-msgs { display: flex; flex-direction: column; gap: 8px; }
.ahr-p-msg { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px; border-inline-start: 3px solid var(--teal); }
.ahr-p-msg p { white-space: pre-line; font-size: .9rem; line-height: 1.8; overflow-wrap: anywhere; }
.ahr-p-msg small { color: var(--faint); font-size: .76rem; }
.ahr-read { color: var(--ok); }

/* ── النوافذ ── */
.ahr-modal { position: fixed; inset: 0; z-index: 100002; background: rgba(7,29,51,.55); backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 16px; }
.ahr-modal[hidden] { display: none; }
.ahr-modal-card { width: 100%; max-width: 460px; max-height: 90vh; display: flex; flex-direction: column; background: #fff; border-radius: 22px; box-shadow: var(--sh-lg); animation: ahr-pop .18s var(--ease); }
.ahr-modal-card.is-wide { max-width: 620px; }
@keyframes ahr-pop { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: none; } }
.ahr-modal-head { display: flex; align-items: center; gap: .7rem; padding: 18px 20px 10px; }
.ahr-modal-head h3 { flex: 1; font-size: 1.06rem; }
.ahr-modal-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ahr-modal-ic.is-ok { background: var(--ok-bg); color: var(--ok); }
.ahr-modal-ic.is-danger { background: var(--err-bg); color: var(--err); }
.ahr-modal-ic.is-info { background: #E6F8FB; color: var(--teal-2); }
.ahr-modal-body { padding: 6px 20px 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; font-size: .92rem; line-height: 1.75; }
.ahr-modal-actions { display: flex; gap: .5rem; justify-content: flex-start; padding: 12px 20px 18px; border-top: 1px solid var(--border-2); flex-direction: row-reverse; }
.ahr-modal-actions .ahr-btn { min-width: 110px; }
.ahr-big-code { font-size: 1.2rem !important; padding: .2rem .7rem !important; }
.ahr-result { display: flex; gap: 10px; }
.ahr-result div { flex: 1; background: var(--ok-bg); border-radius: 14px; padding: 12px; text-align: center; color: #0b6b41; }
.ahr-result div.is-skip { background: #F0F2F6; color: var(--muted); }
.ahr-result b { display: block; font-size: 1.5rem; }
.ahr-links { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.ahr-link-row { display: flex; justify-content: space-between; align-items: center; padding: .65rem .9rem; border-radius: 12px; background: #F0FBF4; color: #0b6b41; font-weight: 700; border: 1px solid #cdeedc; }
.ahr-link-row:hover { background: #e2f7ea; color: #0b6b41; }
.ahr-link-row.is-sent { opacity: .55; }
.ahr-link-row.is-sent::after { content: attr(data-opened); font-size: .75rem; margin-inline-start: auto; margin-inline-end: .6rem; }
.ahr-cand-head { display: flex; justify-content: space-between; align-items: center; font-size: .85rem; color: var(--muted); }
.ahr-cand-head label { display: inline-flex; gap: .45rem; align-items: center; cursor: pointer; color: var(--text); font-weight: 700; }
.ahr-cand-list { max-height: 330px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.ahr-cand { display: flex; align-items: center; gap: .7rem; padding: .6rem .8rem; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.ahr-cand:last-child { border-bottom: none; }
.ahr-cand:hover { background: #F7FAFC; }
.ahr-cand b { display: block; font-size: .9rem; color: var(--navy); line-height: 1.4; }
.ahr-cand small { color: var(--muted); font-size: .76rem; }
.ahr-cand .ahr-ava { width: 34px; height: 34px; }

.ahr-toast { position: fixed; z-index: 100003; bottom: 26px; left: 50%; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: .85rem 1.3rem; border-radius: 14px; background: var(--navy); color: #fff; font-weight: 700; font-size: .9rem; box-shadow: var(--sh-lg); transition: opacity .2s, transform .2s var(--ease); max-width: calc(100vw - 32px); }
.ahr-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.ahr-toast.is-ok { background: var(--ok); }
.ahr-toast.is-err { background: var(--err); }

/* ═════════════ الشاشات المتوسطة والهاتف ═════════════ */
@media (max-width: 1200px) {
  .ahr-kpis { grid-template-columns: repeat(2, 1fr); }
  .ahr-grid-2 { grid-template-columns: 1fr; }
  .ahr-global-search { width: 220px; }
}
@media (max-width: 900px) {
  .ahr-auth { grid-template-columns: 1fr; }
  .ahr-auth-brand { padding: 26px 18px; }
  .ahr-auth-logo { width: 48px; height: 48px; margin-bottom: 1rem; }
  .ahr-auth-brand h1 { font-size: 1.7rem; }
  .ahr-auth-brand p { margin-bottom: 0; font-size: .9rem; }
  .ahr-auth-brand ul { display: none; }
  .ahr-auth-main { align-items: flex-start; padding: 26px 18px 40px; }

  .ahr-app { grid-template-columns: 1fr; padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
  .ahr-side { display: none; }
  .ahr-topbar { padding: 10px 14px; gap: .6rem; flex-wrap: wrap; }
  .ahr-topbar-logo { display: block; }
  .ahr-topbar h1 { font-size: 1.1rem; }
  .ahr-topbar-logout { display: block; }
  .ahr-global-search { order: 10; flex: 0 0 100%; width: 100%; }
  .ahr-topbar-actions { display: contents; }
  .ahr-avatar-sm { display: none; }
  .ahr-content { padding: 14px 12px 28px; }
  .ahr-view { gap: 12px; }
  .ahr-bottom-nav { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); position: fixed; bottom: 0; inset-inline-end: 0; inset-inline-start: 0; z-index: 50; background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -6px 20px rgba(16,35,58,.06); }
  .ahr-bottom-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px; color: var(--faint); font-size: .68rem; font-weight: 700; text-align: center; }
  .ahr-bottom-nav a i { font-size: 1.1rem; }
  .ahr-bottom-nav a.is-active { color: var(--teal-2); }
  .ahr-bottom-nav .ahr-nav-badge { position: absolute; top: 0; inset-inline-start: calc(50% - 24px); min-width: 18px; height: 18px; font-size: .64rem; margin: 0; border: 2px solid #fff; }
  .ahr-toast { bottom: calc(84px + env(safe-area-inset-bottom)); }

  .ahr-hello { padding: 18px; border-radius: 22px; }
  .ahr-hello h2 { font-size: 1.25rem; }
  .ahr-kpis { gap: 10px; }
  .ahr-kpi { padding: 14px; }
  .ahr-kpi b { font-size: 1.5rem; }
  .ahr-selects select { flex: 1 1 45%; min-width: 0; }
  .ahr-bulk { top: 108px; }
  .ahr-conf-grid { grid-template-columns: 1fr; }
  .ahr-roster-actions { width: 100%; }
  .ahr-roster-actions .ahr-btn { flex: 1 1 auto; }
  .ahr-hbar { grid-template-columns: 90px 1fr 30px; }

  /* الجداول ← بطاقات */
  .ahr-cards-mobile, .ahr-cards-mobile tbody { display: block; }
  .ahr-cards-mobile thead { display: none; }
  .ahr-table-wrap:has(.ahr-cards-mobile) { background: none; border: none; box-shadow: none; overflow: visible; }
  .ahr-cards-mobile tr { position: relative; display: block; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-sm); padding: 12px 14px; margin-bottom: 10px; }
  .ahr-cards-mobile tbody tr:hover { background: var(--surface); }
  .ahr-cards-mobile tr.is-sel { background: #EEFAFD; border-color: #a9e3ee; }
  .ahr-cards-mobile td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed var(--border-2); text-align: end; }
  .ahr-cards-mobile td::before { content: attr(data-label); color: var(--muted); font-size: .76rem; font-weight: 700; text-align: start; flex-shrink: 0; }
  .ahr-cards-mobile td:not([data-label])::before { display: none; }
  .ahr-cards-mobile td > div { text-align: end; min-width: 0; overflow-wrap: anywhere; }
  .ahr-cards-mobile td.ahr-td-check { position: absolute; top: 14px; inset-inline-end: 14px; border: none; padding: 0; width: auto; }
  .ahr-cards-mobile td.ahr-td-main { padding: 0 0 .6rem; justify-content: flex-start; }
  .ahr-cards-mobile td.ahr-td-act { border: none; padding-top: .6rem; }
  .ahr-cards-mobile td.ahr-td-act .ahr-btn { width: 100%; }
  .ahr-cards-mobile tr > td:nth-last-child(1):not(.ahr-td-act) { border-bottom: none; }

  .ahr-drawer-panel { width: 100%; }
  .ahr-p-head { padding: 0 16px 14px; }
  .ahr-ava-xl { width: 72px; height: 72px; border-radius: 20px; }
  .ahr-p-decide, .ahr-p-tabs { margin-inline-end: 16px; margin-inline-start: 16px; padding-inline-end: 0; padding-inline-start: 0; }
  .ahr-p-body { padding: 14px 16px 30px; }
  .ahr-dl, .ahr-form-grid { grid-template-columns: 1fr; }
  .ahr-modal { align-items: flex-end; padding: 0; }
  .ahr-modal-card, .ahr-modal-card.is-wide { max-width: none; border-radius: 22px 22px 0 0; max-height: 92vh; }
  .ahr-modal-actions { padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
  .ahr .ahr-input-ic input, .ahr input, .ahr select, .ahr textarea { font-size: 16px; }
}

/* محرر الشهادة (admin.css) مكتوب للعربية — تصحيح جهة الحد في الإنجليزية */
.ahr-ltr .aho-editor-sidebar { border-left: none; border-right: 1px solid var(--border); }

/* ── الموظفون (1.9.0) ── */
.ahr-type-employee { background: #EEF0FF; color: #4338CA; gap: .3rem; }
.ahr-type-employee i { font-size: .72rem; }
.ahr-emp-line { display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; margin-top: .25rem; color: var(--muted); font-size: .76rem; font-weight: 600; }
.ahr-emp-line .ahr-badge { padding: .12rem .55rem; font-size: .68rem; }
.ahr-p-job { color: var(--muted); font-size: .86rem; font-weight: 700; margin-bottom: .45rem; }
.ahr-p-promote { border-color: #C7D2FE; background: linear-gradient(180deg, #F7F8FF, #fff); }
.ahr-p-promote h5 i { color: #4338CA; }
.ahr-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ahr-log li { border-inline-start: 3px solid var(--teal); padding-inline-start: 12px; display: flex; flex-direction: column; gap: 3px; }
.ahr-log li b { color: var(--navy); font-size: .88rem; }
.ahr-log li small { color: var(--muted); font-size: .76rem; }
.ahr-deps { display: flex; flex-direction: column; }
.ahr-dep { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .75rem .25rem; border-bottom: 1px solid var(--border-2); }
.ahr-dep:last-child { border-bottom: none; }
.ahr-dep-main { min-width: 0; }
.ahr-dep-main b { color: var(--navy); font-size: .95rem; }
.ahr-dep-main > small:last-child { display: block; color: var(--muted); font-size: .8rem; margin-top: 2px; }
.ahr-dep-act { display: flex; gap: .4rem; flex-shrink: 0; }
.ahr-emp-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.ahr-mini-side code { font-size: .72rem; }
@media (max-width: 760px) {
  .ahr-emp-groups { grid-template-columns: 1fr; }
  .ahr-dep { flex-wrap: wrap; }
}

/* ── تغيير صورة الشخص (1.9.2) ── */
.ahr-p-photo { position: relative; flex-shrink: 0; }
.ahr-photo-btn { position: absolute; bottom: -6px; inset-inline-end: -6px; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: var(--teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--sh-md); font-size: .8rem; transition: transform .15s var(--ease), background .15s; }
.ahr-photo-btn:hover { background: #0891B2; transform: scale(1.06); }
.ahr-photo-btn:focus-visible { outline: 3px solid rgba(6,182,212,.35); outline-offset: 2px; }
.ahr-photo-preview { display: flex; justify-content: center; background: var(--bg); border-radius: var(--r-md); padding: 12px; }
.ahr-photo-preview img { max-width: 100%; max-height: 320px; border-radius: 12px; object-fit: contain; }
.ahr-p-resend { margin-top: .6rem; }

/* ═════════════ العُهد (1.14.0) ═════════════ */
.ahr-block { display: block; }
.ahr-cu-tabs { margin-bottom: 2px; }
.ahr-cu-tabs .ahr-tab i { margin-inline-end: .3rem; }
.ahr-cu-actions { flex-wrap: wrap; gap: 10px; }
.ahr-cu-actions .ahr-row { flex-wrap: wrap; gap: 8px; }
.ahr-kpi-cu-available .ahr-kpi-ic { background: #E6F8FB; color: var(--teal-2); }
.ahr-kpi-cu-assigned .ahr-kpi-ic { background: var(--ok-bg); color: var(--ok); }
.ahr-kpi-cu-pending .ahr-kpi-ic { background: var(--warn-bg); color: var(--warn); }
.ahr-kpi-cu-debts .ahr-kpi-ic { background: var(--err-bg); color: var(--err); }
.ahr-cu-available { background: #E6F8FB; color: #00707A; }
.ahr-cu-pending { background: var(--warn-bg); color: #9a5d00; }
.ahr-cu-assigned { background: var(--ok-bg); color: #0b7a4a; }
.ahr-cu-lost { background: var(--err-bg); color: #a3271e; }
.ahr-cu-retired { background: #EEF1F5; color: var(--muted); }
.ahr-cur-pending { background: var(--warn-bg); color: #9a5d00; }
.ahr-cur-acknowledged, .ahr-cur-completed { background: var(--ok-bg); color: #0b7a4a; }
.ahr-cur-cancelled { background: #EEF1F5; color: var(--muted); text-decoration: line-through; }
.ahr-cu-pend { color: #9a5d00; margin-top: 3px; }
button.ahr-link { background: none; border: 0; padding: 0; font-family: inherit; font-size: inherit; font-weight: 700; color: var(--teal-2); cursor: pointer; text-align: start; }
.ahr-cu-pick { max-height: 300px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--r-md); margin: 8px 0 12px; }
.ahr-cu-pick label { display: flex; gap: .6rem; align-items: center; padding: .55rem .8rem; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.ahr-cu-pick label[hidden] { display: none; }
.ahr-cu-pick label:last-child { border-bottom: 0; }
.ahr-cu-pick input { width: 18px; height: 18px; accent-color: var(--teal); flex-shrink: 0; }
.ahr-cu-pick-q { margin-top: 6px; }
.ahr-cu-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ahr-cu-ret { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.ahr-cu-ret-row { border: 1px solid var(--border); border-radius: var(--r-md); padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ahr-cu-ret-row .ahr-row { flex-wrap: wrap; gap: 8px; }
.ahr-cu-ret-row .ahr-field { flex: 1 1 140px; margin: 0; }
.ahr-cu-recs { display: flex; flex-direction: column; }
.ahr-cu-rec { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border-2); }
.ahr-cu-rec:last-child { border-bottom: 0; }
.ahr-cu-rec-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ahr-cu-rec .ahr-row { flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.ahr-cu-held { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: var(--r-md); margin-bottom: 10px; }
.ahr-cu-held-row { display: flex; gap: .65rem; align-items: flex-start; padding: .6rem .8rem; border-bottom: 1px solid var(--border-2); cursor: pointer; }
.ahr-cu-held-row:last-child { border-bottom: 0; }
.ahr-cu-held-row input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--teal); flex-shrink: 0; }
.ahr-cu-held-row.is-locked { opacity: .7; cursor: default; }
.ahr-p-box .ahr-row { flex-wrap: wrap; gap: 8px; }
.ahr-cu-gap { margin-top: 10px; }
.ahr-cu-pledge-ta { font-family: 'Tajawal', sans-serif; line-height: 1.9; text-align: right; }
#ahr-cu-rep .ahr-card { margin-top: 4px; }
@media (max-width: 760px) {
  .ahr-cu-rec { flex-direction: column; align-items: stretch; }
  .ahr-cu-rec .ahr-row { justify-content: flex-start; }
}

/* ═════════════ أيام الحضور (1.15.0) ═════════════ */
.ahr-days-bar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ahr-days-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.ahr-day-chip { flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: .55rem .9rem; border-radius: 14px; border: 1.5px solid var(--border); background: #fff; cursor: pointer; font-family: inherit; text-align: start; }
.ahr-day-chip b { color: var(--navy); font-size: .88rem; }
.ahr-day-chip small { color: var(--muted); font-size: .74rem; }
.ahr-day-chip.is-active { border-color: var(--teal); background: #E6F8FB; box-shadow: 0 0 0 3px rgba(6,182,212,.15); }
.ahr-dchips { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 3px; }
.ahr-dchip { font-size: .7rem; font-weight: 800; padding: .15rem .45rem; border-radius: 6px; direction: ltr; }
.ahr-dchip.is-on { background: #E6F8FB; color: #00707A; }
.ahr-dchip.is-off { background: #EEF1F5; color: var(--faint); text-decoration: line-through; }
.ahr-dchip.is-present { background: var(--ok-bg); color: #0b7a4a; }
.ahr-dchip.is-absent { background: var(--err-bg); color: #a3271e; }
.ahr-att { display: flex; gap: 6px; flex-wrap: wrap; }

/* ═════════════ خطوط الهاتف والفحص الأسبوعي (1.16.0) ═════════════ */
.ahr-tab .ahr-ph-count { background: var(--warn); color: #fff; }
.ahr-tab .ahr-ph-count.is-late { background: var(--err); }
.ahr-ph-week { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 10px 14px; box-shadow: var(--sh-sm); }
.ahr-ph-week > div { display: flex; flex-direction: column; align-items: center; text-align: center; }
.ahr-ph-week b { color: var(--navy); }
.ahr-ph-week small { font-size: .78rem; }
.ahr-kpi-ph-lines .ahr-kpi-ic { background: #E6F8FB; color: var(--teal-2); }
.ahr-kpi-ph-checked .ahr-kpi-ic { background: var(--ok-bg); color: var(--ok); }
.ahr-kpi-ph-issues .ahr-kpi-ic { background: var(--err-bg); color: var(--err); }
.ahr-kpi-ph-unchecked .ahr-kpi-ic { background: var(--warn-bg); color: var(--warn); }
div.ahr-kpi { cursor: default; }
div.ahr-kpi:hover { transform: none; box-shadow: var(--sh-sm); }
.ahr-ph-ok { background: var(--ok-bg); color: #0b7a4a; }
.ahr-ph-issue { background: var(--err-bg); color: #a3271e; }
.ahr-ph-due { background: var(--warn-bg); color: #9a5d00; }
.ahr-ph-overdue { background: var(--err); color: #fff; }
.ahr-ph-missed { background: #EEF1F5; color: var(--muted); }
.ahr-ph-row.is-overdue td { background: #FFF5F4; }
.ahr-ph-row.is-overdue td:first-child { box-shadow: inset -4px 0 0 var(--err); }
.ahr-ph-row.is-due td:first-child { box-shadow: inset -4px 0 0 var(--warn); }
.ahr-ph-row.is-issue td:first-child { box-shadow: inset -4px 0 0 #E8877F; }
.ahr-ltr .ahr-ph-row td:first-child { box-shadow: none; }
.ahr-ph-yes, .ahr-ph-no { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; }
.ahr-ph-yes { background: var(--ok-bg); color: var(--ok); }
.ahr-ph-no { background: var(--err-bg); color: var(--err); }
.ahr-ph-note { color: #8a5a07; margin-top: 2px; }
.ahr-ph-acts { flex-wrap: nowrap; gap: 6px; }
.ahr-ph-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 0; border-bottom: 1px solid var(--border-2); font-weight: 700; color: var(--navy); }
.ahr-ph-q.is-off { opacity: .45; }
.ahr-ph-yn { display: flex; gap: 8px; }
.ahr-ph-yn label { cursor: pointer; }
.ahr-ph-yn input { position: absolute; opacity: 0; pointer-events: none; }
.ahr-ph-yn b { display: inline-flex; align-items: center; gap: .4rem; padding: .5rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--border); background: #fff; font-size: .86rem; color: var(--text); min-width: 84px; justify-content: center; }
.ahr-ph-yn input:checked + b.is-yes { background: var(--ok); border-color: var(--ok); color: #fff; }
.ahr-ph-yn input:checked + b.is-no { background: var(--err); border-color: var(--err); color: #fff; }
.ahr-ph-yn input:focus-visible + b { outline: 3px solid rgba(6,182,212,.35); outline-offset: 2px; }
.ahr-ph-q + .ahr-field { margin-top: 12px; }
@media (max-width: 900px) {
  .ahr-ph-acts { flex-wrap: wrap; }
  .ahr-cards-mobile td.ahr-td-act .ahr-ph-acts .ahr-btn { width: auto; flex: 1 1 auto; }
  .ahr-cards-mobile td.ahr-td-act .ahr-ph-acts .ahr-btn-text { flex: 0 0 auto; }
  .ahr-ph-row.is-overdue { border-color: #F3B6B0 !important; background: #FFF5F4 !important; }
  .ahr-ph-row.is-overdue td { background: transparent; }
  .ahr-ph-row td:first-child { box-shadow: none !important; }
}
