/* ═══════════════════════════════════════════════════════════════════
   MASAR 360 — r6 HR redesign (2026-07-11)
   Market-grade HR module: HR command center, employees workspace,
   employee profile with identity hero + KPI band + side section rail.
   Layered on top of the existing token system — no token changes.
   ═══════════════════════════════════════════════════════════════════ */

/* ── HR hub: quick actions ─────────────────────────────────────── */
.r6-quick-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:16px}
.r6-qa{display:flex;align-items:center;gap:11px;background:#fff;border:1px solid var(--line);border-radius:14px;padding:13px 14px;text-align:start;transition:.18s;color:var(--ink)}
.r6-qa:hover{border-color:#bcd9f2;box-shadow:0 10px 22px rgba(11,94,168,.10);transform:translateY(-2px)}
.r6-qa-icon{width:40px;height:40px;border-radius:12px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);flex:none}
.r6-qa-icon svg{width:19px;height:19px;stroke:currentColor;fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.r6-qa b{display:block;font-size:12px}
.r6-qa small{display:block;font-size:9.5px;color:var(--muted);margin-top:3px}
.r6-qa.accent .r6-qa-icon{background:#e5fbf3;color:var(--success)}
.r6-qa.warm .r6-qa-icon{background:#fff6dd;color:#b47a00}
.r6-qa.violet .r6-qa-icon{background:#f1edff;color:#6a51ae}

/* ── Shared stat band (hub + employees list) ───────────────────── */
.r6-stat-band{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.r6-stat{background:#fff;border:1px solid var(--line);border-radius:16px;padding:15px 16px;display:flex;align-items:center;justify-content:space-between;gap:10px}
.r6-stat-copy small{display:block;font-size:10px;color:var(--muted);margin-bottom:6px}
.r6-stat-copy b{font-size:24px;line-height:1}
.r6-stat-copy b i{font-style:normal;font-size:11px;font-weight:700;color:var(--muted);margin-inline-start:4px}
.r6-stat-icon{width:46px;height:46px;border-radius:14px;display:grid;place-items:center;background:var(--primary-soft);color:var(--primary);flex:none;font-size:19px}
.r6-stat.success .r6-stat-icon{background:#e5fbf3;color:var(--success)}
.r6-stat.warning .r6-stat-icon{background:#fff6dd;color:#b47a00}
.r6-stat.danger .r6-stat-icon{background:#ffedf0;color:var(--danger)}
.r6-stat.danger .r6-stat-copy b{color:var(--danger)}
.r6-stat.warning .r6-stat-copy b{color:#ae7200}

/* ── Employees workspace toolbar ───────────────────────────────── */
.r6-emp-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.r6-emp-toolbar .flex-filters{flex:1}
.r6-chip-row{display:flex;gap:6px;flex-wrap:wrap}
.r6-chip{padding:8px 13px;border-radius:20px;background:#f3f8fc;color:#53677c;font-size:11px;font-weight:700;border:1px solid transparent;transition:.15s}
.r6-chip:hover{color:var(--primary)}
.r6-chip.active{background:var(--primary);color:#fff;box-shadow:0 6px 14px rgba(11,94,168,.22)}

/* ── Profile: identity hero ────────────────────────────────────── */
.profile-banner.r6-hero{position:relative;overflow:hidden;padding:22px 24px;border:0;border-radius:20px;background:linear-gradient(120deg,#0a5da6 0%,#0f7cbe 55%,#12a3c0 100%);color:#fff;box-shadow:0 18px 40px rgba(10,73,125,.25)}
.profile-banner.r6-hero:before{content:"";position:absolute;width:280px;height:280px;border:46px solid rgba(255,255,255,.07);border-radius:50%;inset-inline-start:-90px;top:-120px}
.profile-banner.r6-hero:after{content:"";position:absolute;width:170px;height:170px;border:30px solid rgba(255,255,255,.06);border-radius:50%;inset-inline-end:120px;bottom:-95px}
.profile-banner.r6-hero>*{position:relative;z-index:1}
.profile-banner.r6-hero .large-avatar{width:76px!important;height:76px!important;font-size:26px!important;border-radius:20px;background:rgba(255,255,255,.16);color:#fff;border:1px solid rgba(255,255,255,.35);backdrop-filter:blur(4px)}
.profile-banner.r6-hero h3{font-size:21px;letter-spacing:.2px}
.profile-banner.r6-hero p{color:#d7efff;font-size:12px}
.profile-banner.r6-hero .summary-chip{background:rgba(255,255,255,.14);color:#eaf7ff;border:1px solid rgba(255,255,255,.22);font-size:10px}
.profile-banner.r6-hero .status{border:1px solid rgba(255,255,255,.35);background:rgba(255,255,255,.15);color:#fff}

/* ── Profile: KPI band ─────────────────────────────────────────── */
.r6-profile-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin:14px 0 4px}
.r6-profile-kpis .r6-stat{padding:13px 14px;border-radius:14px}
.r6-profile-kpis .r6-stat-copy b{font-size:19px}
.r6-profile-kpis .r6-stat-icon{width:40px;height:40px;border-radius:12px;font-size:17px}
.r6-kpi-sub{display:block;font-size:9px;color:#9db0c2;margin-top:5px}

/* ── Profile: shell = side section rail + body ─────────────────── */
.r6-profile-shell{display:grid;grid-template-columns:252px minmax(0,1fr);gap:16px;align-items:start;margin-top:14px}
.r6-profile-rail{position:sticky;top:98px;background:#fff;border:1px solid var(--line);border-radius:16px;padding:9px;display:flex;flex-direction:column;gap:2px;max-height:calc(100vh - 120px);overflow:auto}
.r6-profile-rail .profile-tabs,.r6-profile-rail .profile-tabs-large{display:contents;margin:0}
.r6-profile-rail button{display:flex;align-items:center;gap:10px;width:100%;text-align:start;padding:11px 12px;border-radius:11px;background:transparent;color:#53677c;font-size:12px;font-weight:600;position:relative;transition:.15s}
.r6-profile-rail button:before{content:"";width:26px;height:26px;border-radius:8px;background:#f1f6fa;flex:none;background-image:radial-gradient(circle at center,currentColor 2.6px,transparent 3px)}
.r6-profile-rail button:hover{background:#f3f8fc;color:var(--primary)}
.r6-profile-rail button.active{background:linear-gradient(135deg,#e7f4ff,#f4faff);color:var(--primary);font-weight:700;box-shadow:inset 3px 0 0 var(--primary)}
html[dir=rtl] .r6-profile-rail button.active{box-shadow:inset -3px 0 0 var(--primary)}
.r6-profile-rail button.active:before{background-color:#d7ecff}
.r6-profile-body{min-width:0;display:grid;gap:14px}
.r6-profile-body>.card,.r6-profile-body .profile-dashboard{animation:r6fade .22s ease}
@keyframes r6fade{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

/* Section rail heading */
.r6-rail-title{font-size:10px;color:#93a3b4;font-weight:700;letter-spacing:.4px;padding:8px 12px 6px}

/* ── Info grids inside profile read like Ektefa field cards ────── */
.r6-profile-body .info-section{border-radius:14px}
.r6-profile-body .info-line{padding:9px 11px;background:#fbfdff;border:1px solid #eef4f9;border-radius:10px}
.r6-profile-body .info-line span{font-size:10px}
.r6-profile-body .info-line b{font-size:11.5px}

/* ── Responsive ────────────────────────────────────────────────── */
@media(max-width:1500px){.r6-quick-actions{grid-template-columns:repeat(4,minmax(0,1fr))}.r6-profile-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1150px){.r6-profile-shell{grid-template-columns:1fr}.r6-profile-rail{position:static;flex-direction:row;flex-wrap:wrap;max-height:none}.r6-profile-rail button{width:auto;flex:0 0 auto}.r6-profile-rail button.active{box-shadow:none}.r6-rail-title{display:none}}
@media(max-width:1050px){.r6-stat-band,.r6-quick-actions{grid-template-columns:repeat(2,minmax(0,1fr))}.r6-profile-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.r6-stat-band,.r6-quick-actions,.r6-profile-kpis{grid-template-columns:1fr}}
