/* ═══════════════════════════════════════════════════════════════════════════
   تطبيق رواتب المديرين (PWA) — CSS مستقل
   ─────────────────────────────────────────────────────────────────────────────
   جميع الـ class names تبدأ بـ pr- عشان لا تتعارض مع CSS التطبيق الآخر.
   ─────────────────────────────────────────────────────────────────────────────
   يتبع:
     • نفس هوية الـ ERP: برتقالى var(--fs-primary) كلون أساسى
     • RTL + Mobile-first
     • Touch targets ≥ 44px للموبايل
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ Reset & Base ═══ */
.pr-root, .pr-root * { box-sizing: border-box; }
.pr-root {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
    direction: rtl;
    background:
        radial-gradient(ellipse 60% 40% at 20% 0%, rgba(var(--fs-primary-rgb),.12), transparent 60%),
        radial-gradient(ellipse 50% 30% at 80% 100%, rgba(99,102,241,.08), transparent 60%),
        radial-gradient(ellipse 40% 25% at 0% 50%, rgba(16,185,129,.05), transparent 50%),
        linear-gradient(135deg, #f8fafc 0%, #eef2f7 50%, #e2e8f0 100%);
    color: #1e293b;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
    /* ملاحظة: شلت min-height: 100vh — body overflow-y: auto بيتولّى الـ scroll */
}
.pr-root::before {
    content: '';
    position: fixed;
    top: 0; right: 0; bottom: 0; left: 0;
    background-image:
        linear-gradient(rgba(100,116,139,.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(100,116,139,.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 10%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 50%, #000 10%, transparent 70%);
}
/* Safety: على mobile نضمن إن الـ body يسمح بـ scroll */
html, body {
    overflow-y: auto;
    height: auto;
    min-height: 100%;
}
.pr-root > * { position: relative; z-index: 1; }

/* ═══ Animations ═══ */
@keyframes pr-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes pr-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes pr-scale-in {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes pr-slide-right {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ═══ Header — Soft Sand / Beige (very muted) ═══ */
.pr-hdr {
    background:
        linear-gradient(180deg, rgba(255,255,255,.1) 0%, transparent 60%),
        linear-gradient(135deg, #e8c5a0 0%, #dfb48a 55%, #d4a378 100%);
    color: #5a3a1f;
    padding: 18px 24px;
    box-shadow:
        0 2px 10px -4px rgba(184,104,72,.15),
        0 1px 2px rgba(184,104,72,.05);
    position: sticky;
    top: 0;
    z-index: 100;
    overflow: hidden;
}
/* Decorative diagonal lines */
.pr-hdr::before {
    content: '';
    position: absolute; inset: 0;
    background-image:
        linear-gradient(135deg,
            transparent 40%,
            rgba(255,255,255,.04) 40%,
            rgba(255,255,255,.04) 50%,
            transparent 50%),
        radial-gradient(circle at 10% 50%, rgba(255,255,255,.1), transparent 40%),
        radial-gradient(circle at 90% 50%, rgba(0,0,0,.06), transparent 40%);
    pointer-events: none;
}
/* Soft dots overlay */
.pr-hdr::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 100%;
    background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: .5;
    mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, #000 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 50%, #000 20%, transparent 70%);
    pointer-events: none;
}
.pr-hdr-row {
    display: flex; align-items: center; gap: 14px;
    position: relative; z-index: 2;
}
.pr-hdr-back,
.pr-hdr-logout,
.pr-hdr-menu {
    width: 42px; height: 42px;
    background: rgba(255,255,255,.45);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; cursor: pointer; border: none; color: #5a3a1f;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    text-decoration: none;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.pr-hdr-back:hover, .pr-hdr-logout:hover, .pr-hdr-menu:hover {
    background: rgba(255,255,255,.75);
    color: #3d2612;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(90,58,31,.12);
}
.pr-hdr-back:active, .pr-hdr-logout:active, .pr-hdr-menu:active {
    transform: translateY(0) scale(.95);
}
.pr-hdr-ttl {
    flex: 1;
    font-size: 18px; font-weight: 900;
    letter-spacing: -.2px;
    overflow: hidden;
    color: #5a3a1f;
    line-height: 1.2;
}
.pr-hdr-ttl small {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12px; font-weight: 600;
    color: #7c4d26;
    opacity: .85;
    margin-top: 5px;
    letter-spacing: .2px;
}

/* ═══ Breadcrumb (في الهيدر) ═══ */
.pr-hdr-crumbs {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 24px 12px;
    background:
        linear-gradient(180deg, rgba(90,58,31,.08) 0%, rgba(90,58,31,.14) 100%);
    font-size: 13px;
    color: #5a3a1f;
    position: relative; z-index: 2;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(90,58,31,.1);
}
.pr-hdr-crumb {
    color: rgba(90,58,31,.85);
    text-decoration: none;
    transition: all .2s;
    display: inline-flex; align-items: center; gap: 5px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
}
.pr-hdr-crumb:hover {
    color: #3d2612;
    background: rgba(255,255,255,.5);
    text-decoration: none;
}
.pr-hdr-crumb.current {
    color: #3d2612;
    font-weight: 800;
    background: rgba(255,255,255,.55);
}
.pr-hdr-crumb-sep {
    color: rgba(90,58,31,.4);
    font-size: 11px;
    font-weight: 700;
}

/* ═══ Container ═══ */
.pr-cnt {
    padding: 20px 16px 220px;   /* مساحة للـ FAB (3 أزرار) + safe-area */
    padding-bottom: calc(220px + env(safe-area-inset-bottom, 0px));
    max-width: 1400px;
    margin: 0 auto;
}
@media (min-width: 1024px) {
    .pr-cnt {
        padding: 24px 32px 140px;
        padding-bottom: calc(140px + env(safe-area-inset-bottom, 0px));
    }
}
.pr-cnt-hint {
    margin-bottom: 14px;
    font-size: 14px; color: #64748b; font-weight: 600;
}
.pr-cnt-hint strong { color: var(--fs-primary); font-weight: 800; }

/* ═══════════════════════════════════════════════════════════════════════════
   HOME HERO BANNER (شاشة المجموعات) — Light Elegant
   ═══════════════════════════════════════════════════════════════════════════ */
.pr-home-hero {
    background:
        radial-gradient(ellipse 80% 60% at 90% -10%, rgba(var(--fs-primary-rgb),.12) 0%, transparent 55%),
        radial-gradient(ellipse 60% 80% at 10% 110%, rgba(99,102,241,.06) 0%, transparent 60%),
        linear-gradient(135deg, #ffffff 0%, #fefbf6 50%, var(--fs-tint-2) 100%);
    color: #0f172a;
    border-radius: 24px;
    padding: 24px 26px 28px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow:
        0 20px 50px -16px rgba(var(--fs-primary-rgb),.25),
        0 4px 12px rgba(15,23,42,.05),
        0 0 0 1px rgba(var(--fs-primary-rgb),.1);
    animation: pr-fade-up .5s cubic-bezier(.4,0,.2,1);
}
/* Decorative wave pattern (top) */
.pr-home-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--fs-primary) 0%, var(--fs-primary-deep) 50%, var(--fs-primary-deeper) 100%);
    box-shadow: 0 4px 12px rgba(var(--fs-primary-rgb),.3);
}
/* Floating orange orb (top right) */
.pr-home-hero::after {
    content: '';
    position: absolute;
    top: -70px; right: -70px;
    width: 240px; height: 240px;
    background: radial-gradient(circle,
        rgba(var(--fs-primary-rgb),.25) 0%,
        rgba(var(--fs-primary-rgb),.08) 35%,
        transparent 65%);
    border-radius: 50%;
    pointer-events: none;
    animation: pr-glow-pulse 5s ease-in-out infinite;
}
@keyframes pr-glow-pulse {
    0%, 100% { transform: scale(1); opacity: .85; }
    50%      { transform: scale(1.15); opacity: 1; }
}
.pr-home-hero-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    position: relative; z-index: 1;
}
.pr-home-hero-avatar {
    width: 58px; height: 58px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-deep) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 900;
    box-shadow:
        0 10px 28px rgba(var(--fs-primary-rgb),.5),
        inset 0 1px 0 rgba(255,255,255,.3),
        0 0 0 4px rgba(var(--fs-primary-rgb),.15);
    border: 2px solid rgba(var(--fs-primary-rgb),.6);
    flex-shrink: 0;
    animation: pr-scale-in .5s cubic-bezier(.34,1.56,.64,1) .1s backwards;
    text-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.pr-home-hero-greeting {
    font-size: 12.5px;
    color: var(--fs-primary-deeper);
    font-weight: 700;
    margin-bottom: 3px;
    display: flex; align-items: center; gap: 5px;
    letter-spacing: .2px;
}
.pr-home-hero-name {
    font-size: 24px;
    font-weight: 900;
    margin: 0;
    color: #0f172a;
    letter-spacing: -.4px;
    line-height: 1.1;
}
.pr-home-hero-sub {
    font-size: 13px;
    color: #475569;
    margin-top: 6px;
    display: flex; align-items: center; gap: 8px;
    flex-wrap: wrap;
    font-weight: 600;
}
.pr-home-hero-sub-dot {
    color: var(--fs-primary);
    font-size: 6px;
}

/* ═══ PWA Install Banner (أعلى الصفحة) ═══ */
.pr-install-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-ink-4) 100%);
    color: #fff;
    border-radius: 16px;
    box-shadow:
        0 4px 14px rgba(var(--fs-primary-rgb), 0.3),
        0 2px 4px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    animation: pr-install-slide .5s cubic-bezier(.4, 0, .2, 1);
}
@keyframes pr-install-slide {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
.pr-install-banner::before {
    content: '';
    position: absolute;
    inset: -40%;
    background: radial-gradient(ellipse at top right, rgba(255,255,255,0.2), transparent 60%);
    pointer-events: none;
}
.pr-install-banner-ico {
    font-size: 28px;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.pr-install-banner-body {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
}
.pr-install-banner-ttl {
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 2px;
}
.pr-install-banner-sub {
    font-size: 11.5px;
    opacity: 0.9;
    line-height: 1.4;
}
.pr-install-banner-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.pr-install-banner-btn {
    border: none;
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s;
}
.pr-install-banner-btn.install {
    background: #fff;
    color: var(--fs-primary-ink-4);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}
.pr-install-banner-btn.install:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}
.pr-install-banner-btn.dismiss {
    background: rgba(255,255,255,0.2);
    color: #fff;
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}
.pr-install-banner-btn.dismiss:hover {
    background: rgba(255,255,255,0.3);
}

@media (max-width: 480px) {
    .pr-install-banner { padding: 12px; gap: 10px; }
    .pr-install-banner-ico { width: 40px; height: 40px; font-size: 22px; }
    .pr-install-banner-ttl { font-size: 13px; }
    .pr-install-banner-sub { font-size: 10.5px; }
    .pr-install-banner-btn.install { padding: 7px 10px; font-size: 11.5px; }
}

/* Hero stats grid */
.pr-home-hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    position: relative; z-index: 1;
    animation: pr-fade-up .5s cubic-bezier(.4,0,.2,1) .15s backwards;
}
@media (min-width: 640px) { .pr-home-hero-stats { gap: 14px; } }

/* Stats cards — 3 ألوان مختلفة بـ pastel */
.pr-home-hero-stat {
    background: #fff;
    border: 1px solid rgba(226,232,240,.9);
    border-radius: 16px;
    padding: 14px 16px;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(15,23,42,.04);
}
.pr-home-hero-stat::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    border-radius: 16px 16px 0 0;
}
/* Variant: Orange (مجموعاتى) */
.pr-home-hero-stat.a::before { background: linear-gradient(90deg, var(--fs-primary), var(--fs-primary-deep)); }
.pr-home-hero-stat.a .pr-home-hero-stat-ico { background: linear-gradient(135deg, var(--fs-tint-3), var(--fs-tint-5)); color: var(--fs-primary-ink-4); }
/* Variant: Blue (موظفين) */
.pr-home-hero-stat.b::before { background: linear-gradient(90deg, #60a5fa, #3b82f6); }
.pr-home-hero-stat.b .pr-home-hero-stat-ico { background: linear-gradient(135deg, #dbeafe, #bfdbfe); color: #1e40af; }
/* Variant: Amber (مسوّدات) */
.pr-home-hero-stat.c::before { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.pr-home-hero-stat.c .pr-home-hero-stat-ico { background: linear-gradient(135deg, #fef3c7, #fde68a); color: var(--fs-primary-ink-2); }

.pr-home-hero-stat:hover {
    transform: translateY(-4px);
    box-shadow:
        0 12px 30px -8px rgba(15,23,42,.12),
        0 4px 8px rgba(15,23,42,.04);
    border-color: rgba(var(--fs-primary-rgb),.3);
}

.pr-home-hero-stat-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pr-home-hero-stat-ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.pr-home-hero-stat-ico svg { width: 18px; height: 18px; }
.pr-home-hero-stat-body { flex: 1; min-width: 0; }
.pr-home-hero-stat-lbl {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: .2px;
}
.pr-home-hero-stat-val {
    font-size: 22px;
    font-weight: 900;
    font-feature-settings: 'tnum';
    line-height: 1;
    color: #0f172a;
}

/* ═══ Mobile Hero stats — compact vertical layout (أنيق على الجوال) ═══ */
@media (max-width: 640px) {
    .pr-home-hero-stats {
        gap: 7px;
    }
    .pr-home-hero-stat {
        padding: 10px 6px;
        border-radius: 14px;
    }
    .pr-home-hero-stat-row {
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-align: center;
    }
    .pr-home-hero-stat-ico {
        width: 32px;
        height: 32px;
        border-radius: 9px;
    }
    .pr-home-hero-stat-ico svg {
        width: 15px;
        height: 15px;
    }
    .pr-home-hero-stat-body {
        display: flex;
        flex-direction: column-reverse;   /* value أعلى من label */
        align-items: center;
        gap: 2px;
        text-align: center;
        width: 100%;
    }
    .pr-home-hero-stat-lbl {
        font-size: 10px;
        margin-bottom: 0;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
    }
    .pr-home-hero-stat-val {
        font-size: 20px;
    }
}
.pr-home-hero-stat-val small {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 600;
    margin-right: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════
   Dashboard (PayrollHome) — KPIs + Monthly trend chart
   ═══════════════════════════════════════════════════════════════════════ */
.pr-dash {
    margin: 24px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    animation: pr-fade-up .4s cubic-bezier(.4, 0, .2, 1);
}

/* ─── KPI cards ─── */
.pr-dash-kpis {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 640px) {
    .pr-dash-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
    .pr-dash-kpis { grid-template-columns: repeat(3, 1fr); }
}

.pr-dash-kpi {
    position: relative;
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
    transition: all .2s;
    overflow: hidden;
}
.pr-dash-kpi::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    border-radius: 4px;
}
.pr-dash-kpi:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.pr-dash-kpi.green::before  { background: linear-gradient(180deg, #10b981, #059669); }
.pr-dash-kpi.blue::before   { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.pr-dash-kpi.purple::before { background: linear-gradient(180deg, #a855f7, #7c3aed); }
.pr-dash-kpi.orange::before { background: linear-gradient(180deg, var(--fs-primary), var(--fs-primary-ink-4)); }

.pr-dash-kpi-ico {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.pr-dash-kpi.green .pr-dash-kpi-ico  { background: linear-gradient(135deg, #d1fae5, #a7f3d0); }
.pr-dash-kpi.blue .pr-dash-kpi-ico   { background: linear-gradient(135deg, #dbeafe, #bfdbfe); }
.pr-dash-kpi.purple .pr-dash-kpi-ico { background: linear-gradient(135deg, #f3e8ff, #e9d5ff); }
.pr-dash-kpi.orange .pr-dash-kpi-ico { background: linear-gradient(135deg, var(--fs-tint-3), var(--fs-tint-5)); }

.pr-dash-kpi-body { flex: 1; min-width: 0; }
.pr-dash-kpi-lbl {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: 0.2px;
}
.pr-dash-kpi-val {
    font-size: 24px;
    font-weight: 900;
    color: #0f172a;
    line-height: 1.1;
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-variant-numeric: tabular-nums;
}
.pr-dash-kpi-val small {
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}
.pr-dash-kpi-val-sm {
    font-size: 17px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-dash-kpi-delta {
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}
.pr-dash-kpi-delta.up      { color: #16a34a; }
.pr-dash-kpi-delta.down    { color: #dc2626; }
.pr-dash-kpi-delta.neutral { color: #64748b; }

/* ─── Chart ─── */
.pr-dash-chart-wrap {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}
.pr-dash-chart-head {
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
.pr-dash-chart-head h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}
.pr-dash-chart-head small {
    color: #64748b;
    font-size: 11.5px;
}

.pr-dash-chart {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-rows: 1fr auto;  /* bar area + label area */
    gap: 4px 10px;
    height: 220px;
    padding: 10px 4px 0;
}
.pr-dash-bar-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    height: 100%;
    justify-content: flex-end;
    position: relative;
    min-height: 160px;   /* يضمن الـ col ياخد ارتفاع كافى حتى لو bar 0% */
}
.pr-dash-bar-col > .pr-dash-bar {
    flex: 0 0 auto;
}
.pr-dash-bar-val {
    font-size: 10px;
    font-weight: 800;
    color: #475569;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.pr-dash-bar {
    width: 100%;
    max-width: 50px;
    background: linear-gradient(180deg, var(--fs-primary) 0%, var(--fs-primary-ink-4) 100%);
    border-radius: 8px 8px 0 0;
    min-height: 8px;   /* يضمن ظهور bar صغير حتى لو TotalNet = 0 */
    position: relative;
    transition: all .25s;
    box-shadow: 0 -2px 6px rgba(var(--fs-primary-rgb), 0.3);
}
/* الـ bars للـ شهور الفاضية (أقل من 1%) — نعرضها خافتة */
.pr-dash-bar-col:not(.current) .pr-dash-bar[style*="height: 0.0%"],
.pr-dash-bar-col:not(.current) .pr-dash-bar[style*="height: 0%"] {
    opacity: 0.25;
    background: linear-gradient(180deg, #cbd5e1 0%, #94a3b8 100%);
    box-shadow: none;
}
.pr-dash-bar:hover {
    transform: scaleY(1.03);
    filter: brightness(1.1);
}
.pr-dash-bar-col.current .pr-dash-bar {
    background: linear-gradient(180deg, #10b981 0%, #047857 100%);
    box-shadow: 0 -2px 10px rgba(16, 185, 129, 0.4);
}
.pr-dash-bar-col.current .pr-dash-bar-val {
    color: #047857;
    font-weight: 900;
}
.pr-dash-bar-lbl {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #475569;
    text-align: center;
    line-height: 1.2;
    margin-top: 4px;
}
.pr-dash-bar-lbl strong { font-weight: 800; color: #0f172a; font-size: 11.5px; }
.pr-dash-bar-lbl small  { font-size: 10px; color: #94a3b8; font-weight: 700; }
.pr-dash-bar-col.current .pr-dash-bar-lbl strong { color: #047857; }

@media (max-width: 640px) {
    .pr-dash-chart { height: 190px; gap: 2px 5px; }
    .pr-dash-bar-col { min-height: 130px; }
    .pr-dash-bar-val { font-size: 8.5px; }
    .pr-dash-bar-lbl { font-size: 10px; }
    .pr-dash-bar-lbl strong { font-size: 10.5px; }
    .pr-dash-bar-lbl small { font-size: 9px; }
    .pr-dash-chart-wrap { padding: 14px 12px; }
}

/* Section title (modern) */
.pr-section-ttl {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    margin: 20px 0 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(226,232,240,.8);
    animation: pr-fade-up .4s cubic-bezier(.4,0,.2,1);
}
.pr-section-ttl-main {
    display: flex; align-items: center; gap: 12px;
}
.pr-section-ttl-ico {
    width: 40px; height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--fs-primary-ink-2);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 10px rgba(234,88,12,.1);
}
.pr-section-ttl-main h2 {
    font-size: 18px; font-weight: 900;
    color: #0f172a; margin: 0;
    letter-spacing: -.3px;
}
.pr-section-ttl-sub {
    font-size: 12px; color: #94a3b8; font-weight: 600;
}

/* Collapsible section — للـ Dashboard على PayrollHome */
.pr-section-ttl.pr-section-ttl-collapsible {
    cursor: pointer;
    user-select: none;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    margin-top: 24px;
    transition: all .18s;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.pr-section-ttl.pr-section-ttl-collapsible:hover {
    background: linear-gradient(135deg, var(--fs-tint-2) 0%, var(--fs-tint-3) 100%);
    border-color: var(--fs-primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(var(--fs-primary-rgb), 0.12);
}
.pr-section-ttl.pr-section-ttl-collapsible .pr-section-ttl-sub {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #64748b;
    font-weight: 700;
}
.pr-section-ttl.pr-section-ttl-collapsible .pr-section-ttl-arr {
    display: inline-block;
    margin-right: 6px;
    font-size: 11px;
    color: var(--fs-primary);
    transition: transform .25s;
}

/* ═══ Groups List ═══ */
.pr-grp-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 640px) {
    .pr-grp-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
}
@media (min-width: 1024px) {
    .pr-grp-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; }
}
@media (min-width: 1440px) {
    .pr-grp-grid { grid-template-columns: repeat(4, 1fr); gap: 18px; }
}

.pr-grp-card {
    background:
        linear-gradient(135deg, #ffffff 0%, #fdfdff 60%, #fafbff 100%);
    border-radius: 20px;
    padding: 20px 20px 22px;
    cursor: pointer;
    border: 1px solid rgba(226,232,240,.6);
    transition: all .3s cubic-bezier(.4,0,.2,1);
    box-shadow:
        0 1px 2px rgba(15,23,42,.04),
        0 4px 8px -2px rgba(15,23,42,.04),
        0 8px 16px -4px rgba(15,23,42,.03);
    position: relative; overflow: hidden;
    text-decoration: none;
    color: inherit;
    display: block;
    animation: pr-fade-up .4s cubic-bezier(.4,0,.2,1) backwards;
    isolation: isolate;
}
/* Top accent bar */
.pr-grp-card > ::marker { display: none; }
.pr-grp-card .pr-grp-accent {
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fs-primary) 0%, var(--fs-primary-deep) 50%, var(--fs-primary-deeper) 100%);
    transform: scaleX(.4);
    transform-origin: right;
    transition: transform .35s cubic-bezier(.4,0,.2,1);
}
.pr-grp-card:hover .pr-grp-accent { transform: scaleX(1); }

/* Decorative stripes pattern (very subtle) */
.pr-grp-card .pr-grp-pattern {
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 35%;
    background-image:
        repeating-linear-gradient(
            -45deg,
            transparent 0,
            transparent 10px,
            rgba(var(--fs-primary-rgb),.025) 10px,
            rgba(var(--fs-primary-rgb),.025) 12px
        );
    pointer-events: none;
    opacity: .6;
    transition: opacity .3s;
}
.pr-grp-card:hover .pr-grp-pattern { opacity: 1; }
/* Staggered entry animation */
.pr-grp-grid > :nth-child(1) { animation-delay: .05s; }
.pr-grp-grid > :nth-child(2) { animation-delay: .1s; }
.pr-grp-grid > :nth-child(3) { animation-delay: .15s; }
.pr-grp-grid > :nth-child(4) { animation-delay: .2s; }
.pr-grp-grid > :nth-child(5) { animation-delay: .25s; }
.pr-grp-grid > :nth-child(6) { animation-delay: .3s; }
.pr-grp-grid > :nth-child(n+7) { animation-delay: .35s; }

/* ═══ Color variants للـ Group cards ═══
   دورة من 5 ألوان — كل كارت ياخد لون مختلف للـ icon والـ accent bar */

/* 🟠 Orange (default) — الكروت 1, 6, 11, ... */
.pr-grp-grid > :nth-child(5n+1) .pr-grp-icon {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    box-shadow: 0 8px 20px rgba(var(--fs-primary-rgb),.3), inset 0 1px 0 rgba(255,255,255,.3);
    border-color: rgba(var(--fs-primary-rgb),.3);
}
.pr-grp-grid > :nth-child(5n+1) .pr-grp-accent {
    background: linear-gradient(90deg, var(--fs-primary), var(--fs-primary-deep), var(--fs-primary-deeper));
}

/* 🔵 Blue — الكروت 2, 7, 12, ... */
.pr-grp-grid > :nth-child(5n+2) .pr-grp-icon {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    box-shadow: 0 8px 20px rgba(59,130,246,.3), inset 0 1px 0 rgba(255,255,255,.3);
    border-color: rgba(59,130,246,.3);
}
.pr-grp-grid > :nth-child(5n+2) .pr-grp-accent {
    background: linear-gradient(90deg, #60a5fa, #3b82f6, #2563eb);
}

/* 🟢 Green — الكروت 3, 8, 13, ... */
.pr-grp-grid > :nth-child(5n+3) .pr-grp-icon {
    background: linear-gradient(135deg, #4ade80, #22c55e);
    box-shadow: 0 8px 20px rgba(34,197,94,.3), inset 0 1px 0 rgba(255,255,255,.3);
    border-color: rgba(34,197,94,.3);
}
.pr-grp-grid > :nth-child(5n+3) .pr-grp-accent {
    background: linear-gradient(90deg, #4ade80, #22c55e, #16a34a);
}

/* 🟣 Purple — الكروت 4, 9, 14, ... */
.pr-grp-grid > :nth-child(5n+4) .pr-grp-icon {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
    box-shadow: 0 8px 20px rgba(139,92,246,.3), inset 0 1px 0 rgba(255,255,255,.3);
    border-color: rgba(139,92,246,.3);
}
.pr-grp-grid > :nth-child(5n+4) .pr-grp-accent {
    background: linear-gradient(90deg, #a78bfa, #8b5cf6, #7c3aed);
}

/* 🩷 Pink — الكروت 5, 10, 15, ... */
.pr-grp-grid > :nth-child(5n+5) .pr-grp-icon {
    background: linear-gradient(135deg, #f472b6, #ec4899);
    box-shadow: 0 8px 20px rgba(236,72,153,.3), inset 0 1px 0 rgba(255,255,255,.3);
    border-color: rgba(236,72,153,.3);
}
.pr-grp-grid > :nth-child(5n+5) .pr-grp-accent {
    background: linear-gradient(90deg, #f472b6, #ec4899, #db2777);
}

/* ─── Arrow (bottom-left) تحديث لنفس اللون ─── */
.pr-grp-grid > :nth-child(5n+2) .pr-grp-card::after {
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
}
.pr-grp-grid > :nth-child(5n+3) .pr-grp-card::after {
    background: linear-gradient(135deg, #4ade80, #22c55e);
}
.pr-grp-grid > :nth-child(5n+4) .pr-grp-card::after {
    background: linear-gradient(135deg, #a78bfa, #8b5cf6);
}
.pr-grp-grid > :nth-child(5n+5) .pr-grp-card::after {
    background: linear-gradient(135deg, #f472b6, #ec4899);
}

.pr-grp-card::after {
    content: '→';
    position: absolute;
    bottom: 18px; left: 18px;
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700;
    opacity: 0;
    transform: translateX(10px) scale(.9);
    transition: all .3s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 8px 16px rgba(var(--fs-primary-rgb),.4),
                inset 0 1px 0 rgba(255,255,255,.3);
    z-index: 2;
}
.pr-grp-card:hover {
    border-color: rgba(var(--fs-primary-rgb),.4);
    box-shadow:
        0 20px 40px -12px rgba(var(--fs-primary-rgb),.3),
        0 4px 12px rgba(var(--fs-primary-rgb),.1),
        0 2px 4px rgba(15,23,42,.04);
    transform: translateY(-6px);
    color: inherit; text-decoration: none;
}
.pr-grp-card:hover::after {
    opacity: 1;
    transform: translateX(0) scale(1);
}
.pr-grp-card:hover .pr-grp-icon {
    transform: scale(1.08) rotate(-6deg);
    box-shadow: 0 10px 24px rgba(var(--fs-primary-rgb),.4);
}
.pr-grp-card:active { transform: translateY(-3px); }

.pr-grp-icon {
    width: 56px; height: 56px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-deep) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; margin-bottom: 16px;
    position: relative; z-index: 1;
    transition: all .35s cubic-bezier(.34,1.56,.64,1);
    box-shadow:
        0 8px 20px rgba(var(--fs-primary-rgb),.35),
        inset 0 1px 0 rgba(255,255,255,.3);
    border: 1px solid rgba(var(--fs-primary-rgb),.3);
}
.pr-grp-ttl {
    font-size: 18px; font-weight: 800; color: #0f172a;
    margin-bottom: 12px;
    position: relative; z-index: 1;
    letter-spacing: -.2px;
    line-height: 1.3;
}
.pr-grp-stats {
    display: flex; gap: 6px; flex-wrap: wrap;
    position: relative; z-index: 1;
    padding-left: 44px;   /* مساحة للسهم */
}
.pr-grp-stat {
    display: inline-flex; align-items: center; gap: 5px;
    font-size: 11.5px; color: #475569; font-weight: 700;
    background: #ffffff;
    padding: 5px 10px; border-radius: 8px;
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    transition: all .2s;
}
.pr-grp-stat:hover { border-color: #cbd5e1; }
.pr-grp-stat.draft {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--fs-primary-ink-2);
    border-color: #fcd34d;
    box-shadow: 0 2px 6px rgba(234,88,12,.1);
    animation: pr-pulse-badge 2.5s ease-in-out infinite;
}
@keyframes pr-pulse-badge {
    0%, 100% { box-shadow: 0 2px 6px rgba(234,88,12,.1); }
    50%      { box-shadow: 0 2px 10px rgba(234,88,12,.3); }
}
.pr-grp-last {
    margin-top: 12px; padding-top: 12px;
    border-top: 1px dashed rgba(226,232,240,.9);
    font-size: 11.5px; color: #64748b;
    font-weight: 600;
    display: flex; align-items: center; gap: 6px;
    position: relative; z-index: 1;
    padding-left: 44px;   /* مساحة للسهم */
}
.pr-grp-last-ico {
    display: inline-flex;
    width: 20px; height: 20px;
    border-radius: 50%;
    background: #f1f5f9;
    align-items: center; justify-content: center;
    font-size: 10px;
    color: #94a3b8;
}

/* ═══ Empty state ═══ */
.pr-empty {
    text-align: center; padding: 60px 20px;
    color: #64748b;
}
.pr-empty-ico { font-size: 48px; margin-bottom: 12px; opacity: .3; }
.pr-empty-ttl { font-size: 16px; font-weight: 700; color: #475569; margin-bottom: 6px; }
.pr-empty-sub { font-size: 13px; }

/* ═══ Loading ═══ */
.pr-loading {
    display: flex; justify-content: center; align-items: center;
    padding: 60px 20px;
}
.pr-spinner {
    width: 40px; height: 40px;
    border: 3px solid var(--fs-tint-5);
    border-top-color: var(--fs-primary);
    border-radius: 50%;
    animation: pr-spin .8s linear infinite;
}
@keyframes pr-spin { to { transform: rotate(360deg); } }

/* ═══ Error ═══ */
.pr-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 10px;
    display: flex; align-items: center; gap: 10px;
    font-size: 14px;
    margin-bottom: 14px;
}
.pr-error-ico {
    width: 32px; height: 32px; border-radius: 50%;
    background: #dc2626; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SHEETS LIST (Page 2)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ Mini stats bar (قمة شاشة الكشوف) ═══ */
.pr-sh-stats {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    animation: pr-fade-up .3s cubic-bezier(.4,0,.2,1);
    flex-wrap: wrap;
}
.pr-sh-stats > * {
    flex: 1 1 180px;
    min-width: 0;
}
.pr-sh-stat {
    background: #fff;
    border: 1px solid rgba(226,232,240,.8);
    border-radius: 14px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
    transition: all .2s;
}
.pr-sh-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px -4px rgba(15,23,42,.08);
}
.pr-sh-stat-ico {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.pr-sh-stat-body { flex: 1; min-width: 0; }
.pr-sh-stat-lbl {
    font-size: 11px;
    color: #64748b;
    font-weight: 700;
    margin-bottom: 2px;
}
.pr-sh-stat-val {
    font-size: 20px;
    font-weight: 900;
    color: #0f172a;
    font-feature-settings: 'tnum';
    line-height: 1;
}

/* ═══ Filter bar (redesigned) ═══ */
.pr-sh-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    margin-bottom: 18px;
    background:
        linear-gradient(135deg, #ffffff 0%, #fefbf6 100%);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,.8);
    box-shadow:
        0 1px 3px rgba(15,23,42,.04),
        0 4px 12px -4px rgba(15,23,42,.04);
    animation: pr-fade-up .35s cubic-bezier(.4,0,.2,1);
}
.pr-sh-filter-grp {
    display: flex;
    flex-direction: column;
    gap: 5px;
    min-width: 140px;
}
.pr-sh-filter-grp.grow { flex: 1 1 220px; }
@media (max-width: 640px) {
    .pr-sh-filter-grp { flex: 1 1 calc(50% - 6px); min-width: 0; }
    .pr-sh-filter-grp.grow { flex: 1 1 100%; }
}

.pr-sh-filter-lbl {
    font-size: 12px;
    color: #64748b;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: .2px;
}
.pr-sh-filter-lbl-ico {
    width: 28px; height: 28px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--fs-tint-3), var(--fs-tint-5));
    color: var(--fs-primary-ink-4);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
}
.pr-sh-filter-sel {
    padding: 10px 14px;
    border-radius: 11px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    font-family: inherit;
    background: #fff;
    cursor: pointer;
    transition: all .2s;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-left: 32px;
}
.pr-sh-filter-sel:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}
.pr-sh-filter-sel:hover { border-color: #cbd5e1; }

/* ═══ Search input + Reset button للفلتر ═══ */
.pr-sh-filter-inp {
    padding: 10px 14px;
    border-radius: 11px;
    border: 1.5px solid #e2e8f0;
    font-size: 14px;
    font-weight: 500;
    color: #0f172a;
    font-family: inherit;
    background: #fff;
    transition: all .2s;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    width: 100%;
}
.pr-sh-filter-inp::placeholder { color: #94a3b8; font-weight: 400; }
.pr-sh-filter-inp:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}
.pr-sh-filter-inp:hover { border-color: #cbd5e1; }

.pr-sh-filter-reset {
    align-self: flex-end;
    padding: 10px 14px;
    border-radius: 11px;
    border: 1.5px solid #fecaca;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    font-size: 13px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.pr-sh-filter-reset:hover {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #f87171;
    transform: translateY(-1px);
}
.pr-sh-filter-reset:active { transform: translateY(0); }

/* ═══ FAB (new sheet) ═══ */
/* Group container للـ Smart FAB (2 أزرار جنب بعض) */
.pr-sh-fab-group {
    position: fixed;
    bottom: 20px;
    left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 50;
    align-items: flex-start;
}

.pr-sh-fab {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff; border: none; padding: 14px 20px;
    border-radius: 999px; font-size: 14px; font-weight: 700;
    box-shadow: 0 8px 24px rgba(var(--fs-primary-rgb),.4);
    cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
    font-family: inherit;
    text-decoration: none;
    transition: all .22s;
}
.pr-sh-fab:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(var(--fs-primary-rgb),.5);
    color: #fff; text-decoration: none;
}
.pr-sh-fab:disabled {
    opacity: 0.6;
    cursor: wait;
}
/* Secondary FAB (شهر قادم) — أصغر وبنفسجى */
.pr-sh-fab.secondary {
    background: linear-gradient(135deg, #a855f7, #7c3aed);
    box-shadow: 0 6px 18px rgba(168, 85, 247, 0.35);
    font-size: 12.5px;
    padding: 10px 16px;
}
.pr-sh-fab.secondary:hover:not(:disabled) {
    box-shadow: 0 10px 26px rgba(168, 85, 247, 0.45);
}

/* Warn FAB (تعويض شهر سابق) — أصغر وأحمر خفيف */
.pr-sh-fab.warn {
    background: linear-gradient(135deg, #f87171, #dc2626);
    box-shadow: 0 6px 18px rgba(220, 38, 38, 0.35);
    font-size: 12.5px;
    padding: 10px 16px;
}
.pr-sh-fab.warn:hover:not(:disabled) {
    box-shadow: 0 10px 26px rgba(220, 38, 38, 0.45);
}

/* Mobile tweak */
@media (max-width: 640px) {
    .pr-sh-fab-group { bottom: 14px; left: 14px; right: 14px; }
    .pr-sh-fab { width: 100%; justify-content: center; }
}

/* ═══ Sheet list ═══ */
.pr-sh-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: 90px; }

.pr-sh-item {
    background:
        linear-gradient(135deg, #ffffff 0%, #fcfdff 100%);
    border-radius: 18px;
    padding: 18px 20px;
    cursor: pointer;
    border: 1px solid rgba(226,232,240,.7);
    display: flex; align-items: center; gap: 16px;
    transition: all .3s cubic-bezier(.4,0,.2,1);
    text-decoration: none; color: inherit;
    position: relative; overflow: hidden;
    animation: pr-fade-up .3s cubic-bezier(.4,0,.2,1) backwards;
    box-shadow:
        0 1px 2px rgba(15,23,42,.03),
        0 4px 10px -4px rgba(15,23,42,.05);
}
.pr-sh-list > :nth-child(1) { animation-delay: .04s; }
.pr-sh-list > :nth-child(2) { animation-delay: .08s; }
.pr-sh-list > :nth-child(3) { animation-delay: .12s; }
.pr-sh-list > :nth-child(4) { animation-delay: .16s; }
.pr-sh-list > :nth-child(5) { animation-delay: .2s;  }
.pr-sh-list > :nth-child(n+6){ animation-delay: .24s; }

.pr-sh-item::after {
    content: '';
    position: absolute;
    right: 0; top: 20%; bottom: 20%;
    width: 4px;
    background: linear-gradient(180deg, var(--fs-primary), var(--fs-primary-deep));
    border-radius: 2px 0 0 2px;
    opacity: 0;
    transition: all .25s;
    box-shadow: 0 0 12px rgba(var(--fs-primary-rgb),.5);
}
.pr-sh-item:hover {
    border-color: rgba(var(--fs-primary-rgb),.4);
    box-shadow:
        0 12px 32px -10px rgba(var(--fs-primary-rgb),.25),
        0 4px 10px rgba(15,23,42,.04);
    color: inherit; text-decoration: none;
    transform: translateY(-3px);
}
.pr-sh-item:hover::after { opacity: 1; }
.pr-sh-item:hover .pr-sh-no {
    transform: scale(1.08) rotate(-3deg);
    box-shadow: 0 8px 20px rgba(var(--fs-primary-rgb),.35);
}
.pr-sh-no { transition: all .3s cubic-bezier(.34,1.56,.64,1); }

.pr-sh-no {
    width: 56px; height: 56px; border-radius: 14px;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-deep) 100%);
    color: #fff;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    font-weight: 800; flex-shrink: 0;
    box-shadow:
        0 6px 16px rgba(var(--fs-primary-rgb),.3),
        inset 0 1px 0 rgba(255,255,255,.3);
    border: 1px solid rgba(var(--fs-primary-rgb),.3);
}
.pr-sh-no small { font-size: 9.5px; font-weight: 700; opacity: .9; letter-spacing: .5px; }
.pr-sh-no span { font-size: 16px; line-height: 1; font-feature-settings: 'tnum'; }

.pr-sh-body { flex: 1; min-width: 0; }
.pr-sh-period {
    font-size: 17px; font-weight: 800; color: #0f172a;
    margin-bottom: 5px;
    letter-spacing: -.2px;
}
.pr-sh-meta {
    font-size: 12.5px; color: #64748b;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-weight: 500;
}
.pr-sh-meta-dot { color: #cbd5e1; font-size: 6px; }
.pr-sh-meta-ico {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pr-sh-tail { text-align: left; flex-shrink: 0; }
.pr-sh-amount {
    font-size: 18px; font-weight: 900; color: #0f172a;
    font-feature-settings: 'tnum';
    margin-bottom: 6px;
    line-height: 1;
}
.pr-sh-currency { font-size: 11px; color: #94a3b8; font-weight: 600; margin-right: 3px; }

.pr-sh-badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 10px; border-radius: 999px;
    font-size: 11px; font-weight: 800;
    border: 1px solid transparent;
}
.pr-sh-badge.draft {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: var(--fs-primary-ink-2);
    border-color: #fcd34d;
    box-shadow: 0 2px 6px rgba(234,88,12,.1);
}
.pr-sh-badge.approved {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    color: #166534;
    border-color: #86efac;
    box-shadow: 0 2px 6px rgba(22,163,74,.1);
}
.pr-sh-badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ═══════════════════════════════════════════════════════════════════════════
   SHEET DETAIL (Page 3)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══ Head card ═══ */
.pr-shd-head {
    background:
        linear-gradient(135deg, #ffffff 0%, #fefbf6 100%);
    border-radius: 20px;
    padding: 22px;
    margin-bottom: 18px;
    border: 1px solid rgba(226,232,240,.8);
    box-shadow:
        0 1px 3px rgba(15,23,42,.04),
        0 10px 30px -14px rgba(15,23,42,.12);
    animation: pr-fade-up .35s cubic-bezier(.4,0,.2,1) backwards;
    position: relative;
    overflow: hidden;
}
.pr-shd-head::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--fs-primary), var(--fs-primary-deep));
    border-radius: 20px 20px 0 0;
}

/* Hero stats bar — Flex بتوزيع متساوى (الـ cards بنفس العرض) */
.pr-hero {
    display: flex;
    gap: 14px;
    margin-bottom: 18px;
    animation: pr-fade-up .3s cubic-bezier(.4,0,.2,1) backwards;
    flex-wrap: wrap;
}
.pr-hero > * {
    flex: 1 1 180px;
    min-width: 0;
}
.pr-hero-stat {
    background: #fff;
    border-radius: 14px;
    padding: 12px 14px;
    border: 1px solid rgba(226,232,240,.8);
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
    position: relative;
    overflow: hidden;
    transition: transform .2s;
}
.pr-hero-stat:hover { transform: translateY(-2px); }
.pr-hero-stat::before {
    content: '';
    position: absolute; top: 0; right: 0;
    width: 50px; height: 50px;
    opacity: .15;
    border-radius: 0 14px 0 50px;
}
.pr-hero-stat.a::before { background: linear-gradient(135deg, var(--fs-primary), transparent); }
.pr-hero-stat.b::before { background: linear-gradient(135deg, #10b981, transparent); }
.pr-hero-stat.c::before { background: linear-gradient(135deg, #3b82f6, transparent); }
.pr-hero-stat.d::before { background: linear-gradient(135deg, #8b5cf6, transparent); }

.pr-hero-lbl {
    font-size: 11px; color: #64748b; font-weight: 600;
    margin-bottom: 4px; position: relative; z-index: 1;
    display: inline-flex; align-items: center; gap: 4px;
}
.pr-hero-val {
    font-size: 18px; font-weight: 900; color: #0f172a;
    font-feature-settings: 'tnum';
    position: relative; z-index: 1;
    line-height: 1.1;
}
.pr-hero-val small {
    font-size: 11px; color: #94a3b8; font-weight: 500; margin-right: 3px;
}
.pr-hero-stat.b .pr-hero-val { color: #16a34a; }
.pr-shd-head-top {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px dashed rgba(226,232,240,.9);
}
.pr-shd-head-no {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    padding: 6px 12px;
    border-radius: 8px;
    font-weight: 900;
    font-size: 13px;
    box-shadow:
        0 4px 12px rgba(var(--fs-primary-rgb),.35),
        inset 0 1px 0 rgba(255,255,255,.2);
    letter-spacing: .3px;
}
.pr-shd-head-title {
    flex: 1;
    font-size: 16px;
    font-weight: 900;
    color: #0f172a;
    letter-spacing: -.2px;
}

.pr-shd-head-fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}
@media (min-width: 640px) { .pr-shd-head-fields { grid-template-columns: repeat(4, 1fr); } }

.pr-shd-fld { display: flex; flex-direction: column; gap: 5px; }
.pr-shd-fld-lbl {
    font-size: 11.5px;
    color: #64748b;
    font-weight: 700;
    letter-spacing: .2px;
}
.pr-shd-fld-sel {
    padding: 10px 14px;
    border-radius: 11px;
    border: 1.5px solid #e2e8f0;
    font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
    background: #fff;
    transition: all .2s;
    box-shadow: 0 1px 2px rgba(15,23,42,.03);
    text-align: center;
}
.pr-shd-fld-sel:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}
.pr-shd-fld-sel:hover { border-color: #cbd5e1; }
.pr-shd-fld-sel:disabled {
    background: #fef7ec;
    color: #78350f;
    cursor: not-allowed;
    border-color: #fde68a;
}

/* ═══ Approved badge ═══ */
.pr-shd-approved {
    margin-top: 12px; padding: 10px 12px;
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border: 1px solid #86efac; border-radius: 10px;
    display: flex; align-items: center; gap: 10px;
    font-size: 13px; color: #166534;
}
.pr-shd-approved-ico {
    width: 32px; height: 32px; border-radius: 50%;
    background: #16a34a; color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.pr-shd-approved-body strong { display: block; font-weight: 800; }
.pr-shd-approved-body small { font-size: 11px; opacity: .8; }

/* ═══ Lock Banner (كشف معتمد — prominent) ═══ */
.pr-lock-banner {
    display: flex; align-items: center; gap: 14px;
    margin: 0 0 16px 0;
    padding: 14px 18px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 14px;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.15);
    position: relative;
    overflow: hidden;
}
.pr-lock-banner::before {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, #16a34a, #10b981);
}
.pr-lock-banner-ico {
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #059669);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px; flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}
.pr-lock-banner-body { flex: 1; min-width: 0; }
.pr-lock-banner-title {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: 15px; font-weight: 800; color: #065f46;
    line-height: 1.4; margin-bottom: 4px;
}
.pr-lock-banner-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px;
    background: #16a34a; color: #fff;
    border-radius: 10px;
    font-size: 11px; font-weight: 700;
    letter-spacing: 0.3px;
}
.pr-lock-banner-meta {
    font-size: 12.5px; color: #166534;
    line-height: 1.5;
}
.pr-lock-banner-meta strong { font-weight: 700; color: #065f46; }

/* Dark badge variant للكروت المعتمدة فى الـ list */
.pr-sh-item.approved {
    border-right-width: 4px;
    border-right-style: solid;
    border-right-color: #10b981;
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.03) 0%, transparent 30%);
}
.pr-sh-item.approved:hover {
    background: linear-gradient(90deg, rgba(16, 185, 129, 0.08) 0%, transparent 40%);
}

/* ═══ Bulk Actions Toolbar ═══ */
.pr-bulk { margin: 0 0 14px 0; }

.pr-bulk-toggle {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1.5px solid #fcd34d;
    color: var(--fs-primary-ink-2);
    font-weight: 800;
    font-size: 14px;
    font-family: inherit;
    border-radius: 12px;
    cursor: pointer;
    transition: all .22s;
    box-shadow: 0 2px 6px rgba(252, 211, 77, 0.2);
}
.pr-bulk-toggle:hover {
    background: linear-gradient(135deg, #fde68a 0%, #fcd34d 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(252, 211, 77, 0.3);
}
.pr-bulk-toggle.open {
    border-radius: 12px 12px 0 0;
    box-shadow: none;
}
.pr-bulk-toggle-ico {
    font-size: 16px;
    display: inline-block;
    animation: pr-bulk-pulse 1.5s ease-in-out infinite;
}
@keyframes pr-bulk-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
.pr-bulk-toggle-arrow { font-size: 11px; opacity: 0.7; }

.pr-bulk-panel {
    padding: 16px;
    background: linear-gradient(180deg, #fffbeb 0%, #fef3c7 100%);
    border: 1.5px dashed #fcd34d;
    border-top: none;
    border-radius: 0 0 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: pr-fade-up .25s cubic-bezier(.4,0,.2,1);
}

.pr-bulk-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.pr-bulk-lbl {
    min-width: 100px;
    font-weight: 700;
    color: #78350f;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pr-bulk-sel, .pr-bulk-inp {
    flex: 1;
    padding: 10px 14px;
    border: 1.5px solid #fcd34d;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    background: #fff;
    color: #0f172a;
    transition: all .18s;
}
.pr-bulk-sel:focus, .pr-bulk-inp:focus {
    outline: none;
    border-color: #d97706;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
}

.pr-bulk-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}
.pr-bulk-btn {
    flex: 1 1 180px;
    padding: 11px 16px;
    border-radius: 11px;
    font-weight: 800;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s;
    border: 1.5px solid transparent;
}
.pr-bulk-btn.apply {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}
.pr-bulk-btn.apply:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.4);
}
.pr-bulk-btn.clear {
    background: #fff;
    color: #78350f;
    border-color: #fcd34d;
}
.pr-bulk-btn.clear:hover {
    background: #fef3c7;
    border-color: #d97706;
}
.pr-bulk-btn:active { transform: translateY(0); }

.pr-bulk-hint {
    font-size: 11.5px;
    color: var(--fs-primary-ink-2);
    opacity: 0.8;
    padding: 2px 2px 0;
    line-height: 1.5;
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .pr-bulk-row { flex-direction: column; align-items: stretch; gap: 6px; }
    .pr-bulk-lbl { min-width: 0; }
    .pr-bulk-btn { flex: 1 1 100%; }
}

/* ═══ Export toolbar (Excel + Print) ═══ */
.pr-export-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 12px 0 0 0;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-radius: 12px;
}
.pr-export-btn {
    flex: 1 1 180px;
    padding: 10px 18px;
    border-radius: 10px;
    font-weight: 800;
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all .18s;
    border: 1.5px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.pr-export-btn.excel {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 163, 74, 0.3);
}
.pr-export-btn.excel:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.4);
}
.pr-export-btn.excel:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}
.pr-export-btn.print {
    background: #fff;
    color: #475569;
    border-color: #cbd5e1;
}
.pr-export-btn.print:hover {
    background: #f1f5f9;
    border-color: #94a3b8;
    transform: translateY(-1px);
}
.pr-export-btn.shortcuts {
    flex: 0 0 auto;
    min-width: 48px;
    background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%);
    color: #6d28d9;
    border-color: #c4b5fd;
    font-size: 18px;
    padding: 10px 14px;
}
.pr-export-btn.shortcuts:hover {
    background: linear-gradient(135deg, #ddd6fe 0%, #c4b5fd 100%);
    transform: translateY(-1px);
}

/* ═══ Keyboard Shortcuts Help Modal ═══ */
.pr-sc-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: pr-sc-fade .15s ease-out;
}
@keyframes pr-sc-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.pr-sc-modal {
    background: #fff;
    border-radius: 16px;
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
    animation: pr-sc-scale .2s cubic-bezier(.4, 0, .2, 1);
}
@keyframes pr-sc-scale {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.pr-sc-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: linear-gradient(135deg, #6d28d9 0%, #5b21b6 100%);
    color: #fff;
}
.pr-sc-modal-head h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.pr-sc-close {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #fff;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background .15s;
}
.pr-sc-close:hover { background: rgba(255, 255, 255, 0.3); }

.pr-sc-modal-body {
    padding: 18px;
    overflow-y: auto;
}

.pr-sc-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px;
}
.pr-sc-table td {
    padding: 8px 12px;
    font-size: 13.5px;
    color: #334155;
    vertical-align: middle;
}
.pr-sc-table tr:hover td { background: #f8fafc; }
.pr-sc-table td.pr-sc-keys {
    text-align: left;
    direction: ltr;
    white-space: nowrap;
    width: 1%;
    padding-left: 16px;
}

kbd {
    display: inline-block;
    padding: 3px 8px;
    font-family: 'Segoe UI', monospace;
    font-size: 11.5px;
    font-weight: 700;
    color: #0f172a;
    background: linear-gradient(180deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    border-bottom-width: 2px;
    border-radius: 6px;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    min-width: 22px;
    text-align: center;
    margin: 0 2px;
}

.pr-sc-hint {
    margin-top: 14px;
    padding: 10px 12px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    font-size: 12px;
    color: #78350f;
    line-height: 1.6;
}

/* ═══ Print styles ═══
   مهم: الـ print.css العالمى بيخفى body * بـ visibility:hidden
   ولازم نعيد تعيين visibility للعناصر اللى عايزين نطبعها
   ───────────────────────────────────────────── */
@media print {
    /* ✦ أعِد تعيين visibility للـ content ✦ */
    .pr-cnt,
    .pr-cnt *,
    .pr-shd-head,
    .pr-shd-head *,
    .pr-shd-lines-wrap,
    .pr-shd-lines-wrap *,
    .pr-shd-ln-table,
    .pr-shd-ln-table *,
    .pr-lock-banner,
    .pr-lock-banner * {
        visibility: visible !important;
    }

    /* Hide everything that doesn't belong on paper */
    .pr-hdr, .pr-hero, .pr-bulk, .pr-save-bar,
    .pr-drawer, .pr-drawer-overlay,
    .pr-shd-add, .pr-shd-fab, .pr-sh-fab,
    .pr-overlay,
    .pr-export-bar,
    .pr-export-bar * {
        display: none !important;
    }
    body, html {
        background: #fff !important;
        color: #000 !important;
        visibility: visible !important;
    }
    .pr-cnt {
        padding: 0 !important;
        margin: 0 !important;
        position: static !important;
    }
    .pr-shd-head {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        margin-bottom: 8px !important;
    }
    .pr-shd-ln-cards { display: none !important; }
    .pr-shd-ln-table-wrap { display: block !important; overflow: visible !important; }
    .pr-shd-ln-table {
        width: 100% !important;
        font-size: 10pt !important;
        border-collapse: collapse !important;
    }
    .pr-shd-ln-table th, .pr-shd-ln-table td {
        border: 1px solid #999 !important;
        padding: 4px 6px !important;
    }
    .pr-shd-ln-table .pr-tbl-del,
    .pr-shd-ln-table th:last-child,
    .pr-shd-ln-table td:last-child { display: none !important; }
    .pr-shd-ln-table input,
    .pr-shd-ln-table .pr-tbl-inp {
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
    }
    .pr-shd-ln-table .pr-tbl-emp-av { display: none !important; }
    .pr-shd-ln-table .pr-tbl-emp-sub { font-size: 9pt !important; }
    /* Keep lock banner on print */
    .pr-lock-banner {
        border: 2px solid #16a34a !important;
        background: #ecfdf5 !important;
        break-inside: avoid;
        margin-bottom: 10px !important;
    }
    @page { size: A4 landscape; margin: 10mm; }
}

/* ═══ Lines wrapper ═══ */
.pr-shd-lines-wrap { padding-bottom: 90px; }   /* مساحة للـ save bar */

/* ═══ Lines: Mobile = cards (default) ═══ */
.pr-shd-ln-cards { display: flex; flex-direction: column; gap: 10px; }
@media (min-width: 768px) { .pr-shd-ln-cards { display: none; } }

.pr-shd-ln-card {
    background: #fff; border-radius: 16px;
    border: 1px solid rgba(226,232,240,.8);
    padding: 14px;
    box-shadow: 0 1px 3px rgba(15,23,42,.04);
    animation: pr-fade-up .3s cubic-bezier(.4,0,.2,1) backwards;
    transition: all .2s;
}
.pr-shd-ln-card:hover { box-shadow: 0 4px 12px rgba(15,23,42,.08); transform: translateY(-1px); }
.pr-shd-ln-cards > :nth-child(1)  { animation-delay: .05s; }
.pr-shd-ln-cards > :nth-child(2)  { animation-delay: .08s; }
.pr-shd-ln-cards > :nth-child(3)  { animation-delay: .11s; }
.pr-shd-ln-cards > :nth-child(4)  { animation-delay: .14s; }
.pr-shd-ln-cards > :nth-child(5)  { animation-delay: .17s; }
.pr-shd-ln-cards > :nth-child(6)  { animation-delay: .2s;  }
.pr-shd-ln-cards > :nth-child(n+7){ animation-delay: .22s; }
.pr-shd-ln-card-head {
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 10px; border-bottom: 1px dashed #e2e8f0; margin-bottom: 10px;
}
.pr-shd-ln-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: linear-gradient(135deg, var(--fs-tint-5), var(--fs-tint-12));
    color: var(--fs-primary-ink-4);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: 14px; flex-shrink: 0;
}
.pr-shd-ln-emp { flex: 1; min-width: 0; }
.pr-shd-ln-name { font-size: 14px; font-weight: 800; color: #0f172a; }
.pr-shd-ln-branch { font-size: 11px; color: #64748b; margin-top: 1px; }
.pr-shd-ln-national {
    font-size: 11px; color: #475569; margin-top: 2px;
    display: inline-flex; align-items: center; gap: 4px;
}
.pr-shd-ln-national::before { content: '🆔'; font-size: 10px; }

/* Default salary strip */
.pr-shd-ln-default {
    margin-top: 8px; padding: 7px 10px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border: 1px solid #bae6fd;
    border-radius: 8px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11.5px; color: #0369a1;
}
.pr-shd-ln-default-lbl {
    display: inline-flex; align-items: center; gap: 4px;
    font-weight: 600;
}
.pr-shd-ln-default-val {
    font-weight: 800; font-feature-settings: 'tnum';
    font-size: 13px;
}
.pr-shd-ln-default.modified {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fcd34d; color: var(--fs-primary-ink-2);
}
.pr-shd-ln-default-badge {
    background: var(--fs-primary-ink-2); color: #fff;
    padding: 2px 7px; border-radius: 999px;
    font-size: 9.5px; font-weight: 700;
    margin-right: 6px;
}

.pr-shd-ln-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.pr-shd-ln-fld { display: flex; flex-direction: column; gap: 3px; }
.pr-shd-ln-fld-lbl {
    font-size: 10.5px; color: #64748b; font-weight: 600;
}
.pr-shd-ln-fld-inp {
    padding: 8px 10px; border-radius: 9px;
    border: 1.5px solid #e2e8f0; font-size: 13.5px;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
    text-align: center;              /* ← center */
    direction: ltr;
    font-feature-settings: 'tnum';
    width: 100%;
    transition: all .15s;
    background: #fff;
}
.pr-shd-ln-fld-inp:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}
.pr-shd-ln-fld-inp.negative { color: #dc2626; }
.pr-shd-ln-fld-inp:disabled { background: #f1f5f9; color: #64748b; }
.pr-shd-ln-fld-inp.modified {
    border-color: #d97706; background: #fef3c7;
    color: var(--fs-primary-ink-2); font-weight: 700;
}
.mod-badge {
    background: #d97706; color: #fff;
    padding: 1px 5px; border-radius: 4px;
    font-size: 8.5px; margin-right: 4px;
}

/* ─── عرض القيمة المحسوبة أسفل input الأيام (Mobile + Desktop) ─── */
.pr-shd-ln-fld-calc {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    margin-top: 5px;
    font-size: 10.5px;
    color: #047857;
    font-weight: 800;
    font-feature-settings: 'tnum';
    padding: 3px 8px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    letter-spacing: .2px;
    box-shadow: 0 1px 2px rgba(5,150,105,.08);
}
.pr-shd-ln-fld-calc.negative {
    color: #b91c1c;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
    box-shadow: 0 1px 2px rgba(220,38,38,.08);
}

/* Wrapper للخلية بالأيام (input + calc badge) — يحافظ على التناسق */
.pr-tbl-days-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 85px;
    margin: 0 auto;
}
.pr-tbl-days-wrap .pr-tbl-inp { max-width: 85px; }
.pr-tbl-days-total {
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    font-feature-settings: 'tnum';
}
.pr-tbl-days-total small {
    font-size: 10px;
    font-weight: 600;
    color: #94a3b8;
    margin-right: 3px;
}

/* نفس العرض فى الجدول (Desktop) — أصغر وأرقى */
.pr-tbl-calc {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    margin-top: 4px;
    font-size: 10px;
    color: #047857;
    font-weight: 800;
    font-feature-settings: 'tnum';
    padding: 2px 7px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    line-height: 1.3;
    letter-spacing: .2px;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(5,150,105,.08);
}
.pr-tbl-calc.negative {
    color: #b91c1c;
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border-color: #fca5a5;
}

.pr-shd-ln-net {
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e2e8f0;
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--fs-tint-2), #ffffff);
    margin: 10px -14px -14px; padding: 10px 14px 12px;
    border-radius: 0 0 14px 14px;
}
.pr-shd-ln-net-lbl { font-size: 12px; font-weight: 700; color: #64748b; }
.pr-shd-ln-net-val {
    font-size: 17px; font-weight: 900; color: #16a34a;
    font-feature-settings: 'tnum';
}
.pr-shd-ln-net-val small { font-size: 11px; color: #64748b; margin-right: 3px; font-weight: 500; }

.pr-shd-ln-actions {
    display: flex; gap: 6px; margin-top: 10px;
}
.pr-shd-ln-btn {
    flex: 1; padding: 7px; border-radius: 7px;
    background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0;
    font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit;
}
.pr-shd-ln-btn:hover { background: #e2e8f0; }
.pr-shd-ln-btn.danger { color: #dc2626; }
.pr-shd-ln-btn.danger:hover { background: #fee2e2; border-color: #fca5a5; }

/* ═══ Lines: Desktop = table ═══ */
.pr-shd-ln-table-wrap {
    display: none;
    background: #fff;
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,.8);
    overflow-x: auto;
    overflow-y: hidden;
    box-shadow:
        0 1px 3px rgba(15,23,42,.04),
        0 12px 32px -14px rgba(15,23,42,.12);
}
@media (min-width: 768px) { .pr-shd-ln-table-wrap { display: block; } }

.pr-shd-ln-table { width: 100%; border-collapse: collapse; min-width: 900px; }
.pr-shd-ln-table thead {
    background:
        linear-gradient(180deg, #ffffff 0%, #fef7ec 100%);
    border-bottom: 2px solid var(--fs-tint-12);
}
.pr-shd-ln-table th {
    text-align: center; padding: 14px 8px;
    font-size: 11.5px; font-weight: 900; color: #78350f;
    white-space: nowrap;
    letter-spacing: .3px;
    text-transform: none;
    position: relative;
}
.pr-shd-ln-table th:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20%; bottom: 20%; left: 0;
    width: 1px;
    background: linear-gradient(180deg, transparent, rgba(var(--fs-primary-rgb),.3), transparent);
}
.pr-shd-ln-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #f8fafc;
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
    height: 72px;
    transition: background .15s;
}

/* Zebra striping — صفوف بتناوب الألوان */
.pr-shd-ln-table tbody tr:nth-child(even) {
    background: linear-gradient(135deg, #fafbff, #ffffff);
}

/* Hover: effect ناعم مع orange tint */
.pr-shd-ln-table tbody tr:hover {
    background: linear-gradient(135deg, var(--fs-tint-2), var(--fs-tint-3)) !important;
}
.pr-shd-ln-table tbody tr:hover td {
    border-bottom-color: var(--fs-tint-5);
}

.pr-shd-ln-table tfoot {
    background:
        linear-gradient(180deg, #fef3c7 0%, #fde68a 100%);
    border-top: 3px solid var(--fs-tint-12);
}
.pr-shd-ln-table tfoot td {
    padding: 14px 8px;
    font-weight: 900;
    color: #78350f;
    font-size: 13.5px;
    border-top: none;
    border-bottom: none;
    height: auto;
}

/* === Highlighted Net Column === */
.pr-shd-ln-table .pr-tbl-net {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5) !important;
    color: #065f46 !important;
    font-weight: 900 !important;
    font-size: 14px !important;
    font-feature-settings: 'tnum';
    border-right: 2px solid #10b981 !important;
    border-left: 2px solid #10b981 !important;
}
.pr-shd-ln-table tbody tr:hover .pr-tbl-net {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0) !important;
}
.pr-shd-ln-table tfoot .pr-tbl-net {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    color: #fff !important;
    font-size: 15px !important;
    border-color: #047857 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,.1);
}
.pr-shd-ln-table .pr-tbl-inp {
    width: 100%;
    padding: 7px 8px;
    border-radius: 8px;
    border: 1.5px solid #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    color: #0f172a;
    font-family: inherit;
    text-align: center;            /* ← center */
    direction: ltr;
    font-feature-settings: 'tnum';
    background: #fff;
    transition: all .15s;
}
.pr-shd-ln-table .pr-tbl-inp:hover:not(:disabled) {
    border-color: #cbd5e1;
}
.pr-shd-ln-table .pr-tbl-inp:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}
.pr-shd-ln-table .pr-tbl-inp.negative { color: #dc2626; }
.pr-shd-ln-table .pr-tbl-inp:disabled { background: #f1f5f9; color: #64748b; }
.pr-shd-ln-table .pr-tbl-inp.modified {
    border-color: #d97706; background: #fef3c7;
    color: var(--fs-primary-ink-2); font-weight: 700;
}
.pr-shd-ln-table .pr-tbl-net {
    font-weight: 800; color: #16a34a; font-feature-settings: 'tnum';
}
.pr-shd-ln-table .pr-tbl-emp {
    text-align: start;
    font-weight: 800;
    color: #0f172a;
    font-size: 13.5px;
}
.pr-shd-ln-table .pr-tbl-emp-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 4px;
}
.pr-shd-ln-table .pr-tbl-emp-av {
    width: 38px; height: 38px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 900; font-size: 13px;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(0,0,0,.1),
                inset 0 1px 0 rgba(255,255,255,.25);
    border: 2px solid rgba(255,255,255,.9);
    letter-spacing: -.3px;
}
/* Avatars بألوان متغيّرة بناءً على الـ EmpId */
.pr-shd-ln-table .pr-tbl-emp-av.c0 { background: linear-gradient(135deg, var(--fs-primary-soft-6), var(--fs-primary-deeper)); }
.pr-shd-ln-table .pr-tbl-emp-av.c1 { background: linear-gradient(135deg, #60a5fa, #2563eb); }
.pr-shd-ln-table .pr-tbl-emp-av.c2 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.pr-shd-ln-table .pr-tbl-emp-av.c3 { background: linear-gradient(135deg, #34d399, #059669); }
.pr-shd-ln-table .pr-tbl-emp-av.c4 { background: linear-gradient(135deg, #f472b6, #db2777); }
.pr-shd-ln-table .pr-tbl-emp-av.c5 { background: linear-gradient(135deg, #22d3ee, #0891b2); }
.pr-shd-ln-table .pr-tbl-emp-av.c6 { background: linear-gradient(135deg, #facc15, #d97706); }

.pr-shd-ln-table .pr-tbl-emp-body { flex: 1; min-width: 0; line-height: 1.3; }
.pr-shd-ln-table .pr-tbl-emp-sub {
    font-size: 10.5px; color: #64748b; font-weight: 600;
    margin-top: 2px;
    display: inline-flex; align-items: center; gap: 3px;
}

/* Badge "حساب صرف الراتب" — بنفسجى مميّز */
.pr-tbl-emp-account {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 10.5px;
    font-weight: 700;
    color: #6d28d9;
    background: linear-gradient(135deg, #f5f3ff, #ede9fe);
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-shd-ln-table .pr-tbl-del {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1.5px solid #fecaca;
    color: #dc2626;
    cursor: pointer;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(220,38,38,.1);
}
.pr-shd-ln-table .pr-tbl-del:hover {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #fca5a5;
    transform: translateY(-1px) scale(1.08);
    box-shadow: 0 4px 12px rgba(220,38,38,.25);
    color: #b91c1c;
}
.pr-shd-ln-table .pr-tbl-del:active {
    transform: translateY(0) scale(1);
}
.pr-shd-ln-table .pr-tbl-default {
    color: #0369a1; font-weight: 700;
    font-feature-settings: 'tnum';
    background: #f0f9ff;
}
.pr-shd-ln-table .pr-tbl-default.modified {
    color: #94a3b8; text-decoration: line-through;
    background: #f8fafc;
}

/* ═══ Add employee button ═══ */
.pr-shd-add {
    margin-top: 12px; padding: 12px;
    background: #fff; border: 2px dashed #cbd5e1;
    border-radius: 12px; color: #64748b;
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer;
    font-family: inherit; width: 100%;
    transition: all .15s;
}
.pr-shd-add:hover { border-color: var(--fs-primary); color: var(--fs-primary); background: var(--fs-tint-2); }

/* ═══ Save bar (sticky) ═══ */
.pr-save-bar {
    position: fixed; bottom: 0; left: 0; right: 0;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 20px;
    box-shadow: 0 -8px 30px rgba(15,23,42,.08), 0 -1px 3px rgba(15,23,42,.04);
    border-top: 1px solid rgba(226,232,240,.6);
    display: flex; align-items: center; gap: 12px;
    z-index: 60;
    animation: pr-fade-up .3s cubic-bezier(.4,0,.2,1) backwards;
}
.pr-save-bar-total { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pr-save-bar-total-lbl { font-size: 11px; color: #64748b; font-weight: 600; }
.pr-save-bar-total-val {
    font-size: 18px; font-weight: 900; color: #16a34a;
    font-feature-settings: 'tnum';
}
.pr-save-bar-total-val small { font-size: 11px; color: #64748b; margin-right: 3px; font-weight: 500; }

.pr-save-bar-btn {
    padding: 11px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 700;
    border: none; cursor: pointer; font-family: inherit;
    display: inline-flex; align-items: center; gap: 6px;
}
.pr-save-bar-btn.save {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    box-shadow: 0 4px 16px rgba(var(--fs-primary-rgb),.4),
                inset 0 1px 0 rgba(255,255,255,.25);
    transition: all .2s;
}
.pr-save-bar-btn.save:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(var(--fs-primary-rgb),.5),
                inset 0 1px 0 rgba(255,255,255,.3);
}
.pr-save-bar-btn.save:active { transform: translateY(0); }
.pr-save-bar-btn.save:disabled {
    background: #cbd5e1; color: #94a3b8;
    cursor: not-allowed; box-shadow: none; transform: none;
}
.pr-save-bar-btn.delete {
    background: #fee2e2; color: #dc2626;
}
.pr-save-bar-btn.delete:hover { background: #fecaca; }

/* ═══════════════════════════════════════════════════════════════════════════
   DRAWER MENU (منيو جانبى)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overlay */
.pr-drawer-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0);
    backdrop-filter: blur(0);
    -webkit-backdrop-filter: blur(0);
    z-index: 999;
    pointer-events: none;
    transition: background .3s ease, backdrop-filter .3s ease;
}
.pr-drawer-overlay.open {
    background: rgba(15, 23, 42, .5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    pointer-events: auto;
}

/* Drawer panel — Light Elegant */
.pr-drawer {
    position: fixed;
    top: 0; bottom: 0; right: 0;
    width: min(320px, 85vw);
    background: #ffffff;
    color: #334155;
    box-shadow:
        -25px 0 70px rgba(15,23,42,.18),
        -1px 0 0 rgba(226,232,240,1);
    transform: translateX(100%);
    transition: transform .4s cubic-bezier(.4,0,.2,1);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.pr-drawer.open { transform: translateX(0); }

/* User panel */
.pr-drawer-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 18px;
    background:
        radial-gradient(ellipse 70% 100% at 100% 0%, rgba(var(--fs-primary-rgb),.1), transparent 60%),
        linear-gradient(180deg, var(--fs-tint-2) 0%, #ffffff 100%);
    color: #0f172a;
    position: relative;
    overflow: hidden;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(var(--fs-primary-rgb),.12);
}
.pr-drawer-user::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--fs-primary) 0%, var(--fs-primary-deep) 100%);
}
.pr-drawer-user-avatar {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fs-primary) 0%, var(--fs-primary-deep) 100%);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 900;
    box-shadow:
        0 6px 16px rgba(var(--fs-primary-rgb),.35),
        inset 0 1px 0 rgba(255,255,255,.25),
        0 0 0 3px rgba(var(--fs-primary-rgb),.1);
    flex-shrink: 0;
    position: relative; z-index: 1;
}
.pr-drawer-user-info {
    flex: 1; min-width: 0;
    position: relative; z-index: 1;
}
.pr-drawer-user-name {
    font-size: 15px; font-weight: 800;
    color: #0f172a;
    margin-bottom: 2px;
    letter-spacing: -.2px;
}
.pr-drawer-user-branch {
    font-size: 11.5px;
    color: #64748b;
    display: inline-flex; align-items: center; gap: 4px;
    font-weight: 600;
}
.pr-drawer-user-branch-ico { font-size: 10px; }
.pr-drawer-close {
    width: 32px; height: 32px;
    background: #fff;
    border: 1px solid #fde68a;
    border-radius: 10px;
    color: var(--fs-primary-deeper); cursor: pointer;
    font-size: 14px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    transition: all .2s;
    position: relative; z-index: 1;
    box-shadow: 0 2px 6px rgba(var(--fs-primary-rgb),.1);
}
.pr-drawer-close:hover {
    background: var(--fs-tint-2);
    transform: rotate(90deg);
    border-color: var(--fs-primary);
    box-shadow: 0 4px 10px rgba(var(--fs-primary-rgb),.2);
}

/* Nav — hidden scrollbar */
.pr-drawer-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 0;
    scrollbar-width: none;              /* Firefox */
    -ms-overflow-style: none;           /* IE/Edge */
}
.pr-drawer-nav::-webkit-scrollbar {
    display: none;                      /* Chrome/Safari */
}

.pr-drawer-sec {
    padding: 6px 0;
    position: relative;
}
.pr-drawer-sec:not(:last-child)::after {
    content: '';
    position: absolute;
    bottom: 0; left: 20px; right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e2e8f0, transparent);
}

.pr-drawer-sec-ttl {
    padding: 10px 18px 4px;
    font-size: 10px; font-weight: 800;
    color: #94a3b8;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    display: flex; align-items: center; justify-content: space-between;
}
.pr-drawer-sec-badge {
    background: linear-gradient(135deg, #e0e7ff, #c7d2fe);
    color: #4338ca;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .3px;
    border: 1px solid #c7d2fe;
    text-transform: none;
}

.pr-drawer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    margin: 2px 10px;
    border-radius: 11px;
    text-decoration: none;
    color: #475569;
    font-size: 13.5px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    width: calc(100% - 20px);
    text-align: start;
    font-family: inherit;
    transition: all .2s cubic-bezier(.4,0,.2,1);
    position: relative;
}
.pr-drawer-item:hover:not(.disabled) {
    background: linear-gradient(90deg, var(--fs-tint-2), var(--fs-tint-3));
    color: var(--fs-primary-deeper);
    transform: translateX(-3px);
}
.pr-drawer-item.active {
    background: linear-gradient(90deg, var(--fs-tint-3) 0%, var(--fs-tint-2) 100%);
    color: var(--fs-primary-deeper);
    font-weight: 800;
    box-shadow:
        0 4px 12px rgba(var(--fs-primary-rgb),.15),
        inset 0 1px 0 rgba(255,255,255,.6);
}
.pr-drawer-item.active::before {
    content: '';
    position: absolute;
    top: 50%; right: -10px;
    transform: translateY(-50%);
    width: 4px; height: 22px;
    background: linear-gradient(180deg, var(--fs-primary), var(--fs-primary-deep));
    border-radius: 2px 0 0 2px;
    box-shadow: 0 0 12px rgba(var(--fs-primary-rgb),.5);
}
.pr-drawer-item.disabled {
    color: #cbd5e1;
    cursor: not-allowed;
}
.pr-drawer-item.disabled:hover {
    background: transparent;
    color: #cbd5e1;
    transform: none;
}
.pr-drawer-item.logout { color: #dc2626; }
.pr-drawer-item.logout:hover {
    background: linear-gradient(90deg, #fef2f2, #fee2e2);
    color: #b91c1c;
}

.pr-drawer-item-ico {
    width: 34px; height: 34px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    transition: all .2s;
    color: #64748b;
}
.pr-drawer-item-ico svg { width: 16px; height: 16px; }
.pr-drawer-item:hover:not(.disabled) .pr-drawer-item-ico {
    background: #fff;
    border-color: var(--fs-tint-5);
    color: var(--fs-primary-deeper);
    box-shadow: 0 2px 8px rgba(var(--fs-primary-rgb),.2);
}
.pr-drawer-item.active .pr-drawer-item-ico {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    border-color: var(--fs-tint-12);
    box-shadow: 0 4px 12px rgba(var(--fs-primary-rgb),.4);
}
.pr-drawer-item.disabled .pr-drawer-item-ico {
    background: #f8fafc;
    border-color: #f1f5f9;
    color: #cbd5e1;
}
.pr-drawer-item.logout .pr-drawer-item-ico {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}
.pr-drawer-item.logout:hover .pr-drawer-item-ico {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
}

.pr-drawer-item-txt { flex: 1; }
.pr-drawer-item-arr {
    font-size: 11px;
    opacity: .4;
    transition: transform .2s;
}
.pr-drawer-item:hover:not(.disabled) .pr-drawer-item-arr {
    opacity: 1;
    transform: translateX(-2px);
}
.pr-drawer-item-badge {
    background: #f1f5f9;
    color: #94a3b8;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .3px;
    border: 1px solid #e2e8f0;
}

/* ═══════════════════════════════════════════════════════════════════════
   ✦ Push Enable Banner — تذكير علوى بتفعيل الإشعارات ✦
   ═══════════════════════════════════════════════════════════════════════ */
.push-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--fs-tint-2) 0%, var(--fs-tint-3) 100%);
    border: 1px solid var(--fs-tint-5);
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(234, 88, 12, .08);
    margin: 12px 14px 0;
    animation: push-banner-in .35s cubic-bezier(.4,.14,.3,1);
    direction: rtl;
    position: relative;
    z-index: 50;
}
.push-banner.leaving {
    animation: push-banner-out .25s cubic-bezier(.4,.14,.3,1) forwards;
}
.push-banner-ico {
    font-size: 28px;
    line-height: 1;
    flex-shrink: 0;
    animation: push-bell-shake 2.5s cubic-bezier(.5,0,.5,1) 1s infinite;
    transform-origin: 50% 10%;
}
.push-banner-body { flex: 1; min-width: 0; }
.push-banner-ttl {
    font-weight: 800;
    font-size: 14.5px;
    color: #9a3412;
    margin-bottom: 2px;
}
.push-banner-sub {
    font-size: 12.5px;
    color: var(--fs-primary-ink-4);
    line-height: 1.5;
}
.push-banner-acts {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}
.push-banner-btn {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s ease;
    font-family: inherit;
    white-space: nowrap;
}
.push-banner-btn.primary {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--fs-primary-deep-rgb), .25);
}
.push-banner-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(var(--fs-primary-deep-rgb), .35);
}
.push-banner-btn.ghost {
    background: transparent;
    color: #9a3412;
    border: 1px solid var(--fs-tint-5);
}
.push-banner-btn.ghost:hover:not(:disabled) {
    background: #fff;
    border-color: var(--fs-primary);
}
.push-banner-btn:disabled { opacity: .55; cursor: not-allowed; }

@keyframes push-banner-in {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes push-banner-out {
    to   { opacity: 0; transform: translateY(-12px); }
}
@keyframes push-bell-shake {
    0%, 60%, 100% { transform: rotate(0); }
    65%, 85%      { transform: rotate(10deg); }
    75%, 95%      { transform: rotate(-10deg); }
}

/* موبايل: الأزرار تحت النص */
@media (max-width: 560px) {
    .push-banner {
        flex-wrap: wrap;
        padding: 12px 14px;
    }
    .push-banner-body { flex: 1 1 calc(100% - 50px); }
    .push-banner-acts {
        width: 100%;
        margin-top: 4px;
    }
    .push-banner-btn { flex: 1; }
    .push-banner-sub { font-size: 12px; }
}

/* ═══════════════════════════════════════════════════════════════════════
   ✦ مقارنة الكشوف — PayrollCompareReport ✦
   ═══════════════════════════════════════════════════════════════════════ */
.pr-cmp-summary {
    background: #fff;
    border-radius: 14px;
    padding: 18px;
    margin: 14px;
    box-shadow: 0 2px 12px rgba(15,23,42,.06);
}
.pr-cmp-period {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px dashed #e2e8f0;
}
.pr-cmp-period-item {
    text-align: center;
    opacity: .6;
}
.pr-cmp-period-item.curr { opacity: 1; }
.pr-cmp-period-item small {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-bottom: 4px;
}
.pr-cmp-period-item strong {
    display: block;
    font-size: 15px;
    color: #0f172a;
    font-weight: 700;
}
.pr-cmp-period-arrow {
    font-size: 24px;
    color: var(--fs-primary);
    font-weight: 700;
}
.pr-cmp-empty {
    text-align: center;
    padding: 32px;
    color: #64748b;
    font-size: 14px;
    background: #f8fafc;
    border-radius: 10px;
}
.pr-cmp-kpis {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
}
.pr-cmp-kpi {
    background: #f8fafc;
    border-radius: 12px;
    padding: 14px 12px;
    border-top: 3px solid #cbd5e1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
    transition: transform .15s ease;
}
.pr-cmp-kpi:hover { transform: translateY(-2px); }
.pr-cmp-kpi.badge-new    { border-top-color: #10b981; background: linear-gradient(180deg, #f0fdf4, #ffffff); }
.pr-cmp-kpi.badge-left   { border-top-color: #ef4444; background: linear-gradient(180deg, #fef2f2, #ffffff); }
.pr-cmp-kpi.badge-up     { border-top-color: #0ea5e9; background: linear-gradient(180deg, #f0f9ff, #ffffff); }
.pr-cmp-kpi.badge-down   { border-top-color: #f59e0b; background: linear-gradient(180deg, #fffbeb, #ffffff); }
.pr-cmp-kpi > small {
    display: block;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 8px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
}
.pr-cmp-kpi-val {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.4px;
    line-height: 1.1;
    direction: ltr;
}
.pr-cmp-kpi-val.mono {
    font-size: 13px;
    font-family: ui-monospace, 'Consolas', monospace;
    letter-spacing: 0;
}
.pr-cmp-kpi-val .arr { color: var(--fs-primary); margin: 0 6px; font-weight: 400; }
.pr-cmp-kpi small.up   { color: #059669; font-weight: 700; margin-top: 6px; font-size: 11px; }
.pr-cmp-kpi small.down { color: #dc2626; font-weight: 700; margin-top: 6px; font-size: 11px; }

/* الأقسام (جدد / خارجون / تغييرات) */
.pr-cmp-section {
    background: #fff;
    border-radius: 14px;
    margin: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(15,23,42,.06);
}
.pr-cmp-section h2 {
    margin: 0;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    background: #64748b;
}
.pr-cmp-section.new h2     { background: linear-gradient(135deg, #10b981, #059669); }
.pr-cmp-section.left h2    { background: linear-gradient(135deg, #ef4444, #dc2626); }
.pr-cmp-section.changes h2 { background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep)); }

.pr-cmp-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    table-layout: auto;
}
.pr-cmp-tbl thead th {
    background: #f8fafc;
    color: #475569;
    font-weight: 700;
    padding: 10px 12px;
    text-align: center;                     /* الـ default = center لكل الأعمدة */
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    white-space: nowrap;
}
.pr-cmp-tbl thead th.name { text-align: start; }
.pr-cmp-tbl thead th.num  { text-align: center; }

.pr-cmp-tbl tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    text-align: center;                     /* الـ default = center */
}
.pr-cmp-tbl tbody td.name   { text-align: start; font-weight: 600; }
.pr-cmp-tbl tbody td.num    { text-align: center; direction: ltr; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pr-cmp-tbl tbody td.net    { font-weight: 800; color: #0f172a; }
.pr-cmp-tbl tbody td.mono   { font-family: ui-monospace, 'Consolas', monospace; font-size: 12px; direction: ltr; }
.pr-cmp-tbl tbody tr:hover  { background: #f8fafc; }
.pr-cmp-tbl tbody td.detail-dash,
.pr-cmp-tbl tbody td.empty  { color: #cbd5e1; font-weight: 400; }
.pr-cmp-tbl tbody tr.increase td.diff { color: #059669; font-weight: 700; }
.pr-cmp-tbl tbody tr.decrease td.diff { color: #dc2626; font-weight: 700; }

/* ✦ tfoot: صف الإجماليات ✦ */
.pr-cmp-tbl tfoot td {
    background: linear-gradient(180deg, #f1f5f9, #e2e8f0);
    padding: 12px;
    font-weight: 800;
    border-top: 2px solid #cbd5e1;
    color: #0f172a;
    text-align: center;
    font-size: 13px;
}
.pr-cmp-tbl tfoot td.num    { text-align: center; direction: ltr; font-variant-numeric: tabular-nums; }
.pr-cmp-tbl tfoot td.net    { color: #15803d; }
.pr-cmp-tbl tfoot td.diff.up   { color: #059669; }
.pr-cmp-tbl tfoot td.diff.down { color: #dc2626; }
.pr-cmp-tbl tfoot td.total-lbl { text-align: start; color: #475569; font-size: 12px; }
.pr-cmp-detail small {
    color: #64748b;
    font-size: 11px;
    letter-spacing: .2px;
}

@media (max-width: 1100px) {
    .pr-cmp-kpis       { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .pr-cmp-kpis       { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .pr-cmp-kpi        { padding: 10px 8px; }
    .pr-cmp-kpi-val    { font-size: 18px; }
    .pr-cmp-kpi-val.mono { font-size: 11px; }
    .pr-cmp-period     { flex-direction: column; gap: 8px; }
    .pr-cmp-period-arrow { transform: rotate(90deg); }
    .pr-cmp-tbl        { font-size: 11.5px; }
    .pr-cmp-tbl thead th, .pr-cmp-tbl tbody td { padding: 7px 8px; }
    .pr-cmp-detail small { font-size: 10px; }
}

/* زرار Filter wrapper */
.pr-rpt-btn-wrap {
    align-items: flex-end;
    justify-content: flex-end;
}
.pr-rpt-btn.primary {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
    font-family: inherit;
}
.pr-rpt-btn.primary:disabled { opacity: .5; cursor: not-allowed; }

/* ✦ Push notifications toggle switch ✦ */
.pr-drawer-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 22px;
    background: #cbd5e1;
    border-radius: 999px;
    transition: background .2s ease;
    flex-shrink: 0;
}
.pr-drawer-switch-dot {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
    transition: left .2s ease;
}
[dir="rtl"] .pr-drawer-switch-dot { left: auto; right: 2px; transition: right .2s ease; }
.pr-drawer-switch.on { background: #10b981; }
.pr-drawer-switch.on .pr-drawer-switch-dot { left: 18px; }
[dir="rtl"] .pr-drawer-switch.on .pr-drawer-switch-dot { left: auto; right: 18px; }

/* Footer */
.pr-drawer-footer {
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    flex-shrink: 0;
}
.pr-drawer-footer-brand {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 11.5px; color: #64748b;
}
.pr-drawer-footer-brand strong {
    font-weight: 800;
    background: linear-gradient(90deg, var(--fs-primary-deeper), var(--fs-primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LOADING OVERLAY (full-screen loading)
   ═══════════════════════════════════════════════════════════════════════════ */

.pr-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, .55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    animation: pr-fade-in .2s ease-out;
}
.pr-overlay-card {
    background: #fff;
    border-radius: 20px;
    padding: 32px 36px;
    text-align: center;
    box-shadow: 0 25px 60px rgba(0,0,0,.3);
    min-width: 240px;
    max-width: 360px;
    animation: pr-scale-in .25s cubic-bezier(.34,1.56,.64,1);
}

/* Spinner (3 rings orbiting) */
.pr-overlay-spinner {
    width: 72px; height: 72px;
    margin: 0 auto 20px;
    position: relative;
}
.pr-overlay-spinner-ring {
    position: absolute;
    inset: 0;
    border: 4px solid transparent;
    border-radius: 50%;
    animation: pr-spin 1.4s cubic-bezier(.5,0,.5,1) infinite;
}
.pr-overlay-spinner-ring:nth-child(1) {
    border-top-color: var(--fs-primary);
    animation-duration: 1.2s;
}
.pr-overlay-spinner-ring:nth-child(2) {
    inset: 10px;
    border-right-color: var(--fs-primary-deep);
    animation-duration: 1.6s;
    animation-direction: reverse;
}
.pr-overlay-spinner-ring:nth-child(3) {
    inset: 20px;
    border-bottom-color: var(--fs-primary-deeper);
    animation-duration: 2s;
}

/* Progress bar variant */
.pr-overlay-progress {
    width: 220px;
    height: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    margin: 0 auto 20px;
    position: relative;
}
.pr-overlay-progress-bar {
    position: absolute;
    inset: 0;
    width: 40%;
    background: linear-gradient(90deg, var(--fs-primary), var(--fs-primary-deep));
    border-radius: 999px;
    animation: pr-progress-slide 1.5s cubic-bezier(.4,0,.2,1) infinite;
}
@keyframes pr-progress-slide {
    0%   { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* Pulse variant (3 dots) */
.pr-overlay-pulse {
    display: flex; justify-content: center; gap: 10px;
    margin: 0 auto 20px;
    height: 32px;
    align-items: center;
}
.pr-overlay-pulse-dot {
    width: 14px; height: 14px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    animation: pr-pulse-bounce 1.2s ease-in-out infinite;
}
.pr-overlay-pulse-dot:nth-child(2) { animation-delay: .15s; }
.pr-overlay-pulse-dot:nth-child(3) { animation-delay: .3s;  }
@keyframes pr-pulse-bounce {
    0%, 60%, 100% { transform: scale(.5); opacity: .5; }
    30% { transform: scale(1); opacity: 1; }
}

.pr-overlay-msg {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.pr-overlay-submsg {
    font-size: 12.5px;
    color: #64748b;
    font-weight: 500;
}

/* Spinner reuse (keyframe for other variants) */
@keyframes pr-spin { to { transform: rotate(360deg); } }

/* ═══════════════════════════════════════════════════════════════════════════
   Header menu button (hamburger)
   ═══════════════════════════════════════════════════════════════════════════ */
.pr-hdr-menu {
    display: flex;
}
.pr-hdr-menu-ico {
    display: flex; flex-direction: column; gap: 3px;
    width: 18px;
}
.pr-hdr-menu-ico span {
    display: block; height: 2px;
    background: #5a3a1f;
    border-radius: 2px;
    transition: all .25s;
}
.pr-hdr-menu-ico span:nth-child(1) { width: 100%; }
.pr-hdr-menu-ico span:nth-child(2) { width: 70%; margin-right: 0; }
.pr-hdr-menu-ico span:nth-child(3) { width: 85%; }
.pr-hdr-menu:hover .pr-hdr-menu-ico span:nth-child(2) { width: 100%; }
.pr-hdr-menu:hover .pr-hdr-menu-ico span:nth-child(3) { width: 100%; }
/* ═══════════════════════════════════════════════════════════════════════════

/* â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•
   ØªÙ‚Ø±ÙŠØ± ÙƒØ´ÙˆÙ Ø§Ù„Ø±ÙˆØ§ØªØ¨ (PayrollSheetsReport)
   prefix: pr-rpt-*
   â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â•â• */

.pr-rpt-filter {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(15,23,42,.05);
    padding: 16px;
    margin-bottom: 16px;
}

.pr-rpt-filter-ttl {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; font-weight: 800;
    color: #0f172a;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #e5e7eb;
}
.pr-rpt-filter-ttl span { font-size: 16px; }

.pr-rpt-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}
.pr-rpt-filter-grp.full { grid-column: 1 / -1; }

.pr-rpt-filter-grp { display: flex; flex-direction: column; gap: 5px; }
.pr-rpt-filter-lbl {
    font-size: 12px; font-weight: 700;
    color: #475569;
    display: flex; align-items: center; gap: 6px;
}
.pr-rpt-multi-hint {
    font-size: 11px; font-weight: 600;
    color: var(--fs-primary);
    margin-inline-start: auto;
}
.pr-rpt-filter-sel {
    appearance: none;
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    font-size: 13px; font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: left 10px center;
    padding-inline-start: 32px;
}
.pr-rpt-filter-sel:focus {
    outline: none;
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}

/* â”€â”€â”€ Chipbox Ù„Ù„ÙØ±ÙˆØ¹ (multi-select) â”€â”€â”€ */
.pr-rpt-chipbox {
    display: flex; flex-wrap: wrap; gap: 8px;
    padding: 10px;
    background: #f8fafc;
    border: 1.5px dashed #e5e7eb;
    border-radius: 10px;
    min-height: 50px;
}
.pr-rpt-chip {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 999px;
    background: #fff;
    font-size: 12.5px; font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
}
.pr-rpt-chip:hover {
    border-color: var(--fs-primary);
    background: var(--fs-tint-2);
    color: var(--fs-primary-ink);
}
.pr-rpt-chip.on {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 2px 8px rgba(var(--fs-primary-rgb),.3);
}
.pr-rpt-chip-check {
    font-size: 11px; font-weight: 800;
    width: 16px; height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,.25);
    display: inline-flex; align-items: center; justify-content: center;
}
.pr-rpt-chip.clear {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}
.pr-rpt-chip.clear:hover { background: #fee2e2; }

/* â”€â”€â”€ Actions row â”€â”€â”€ */
.pr-rpt-filter-actions {
    display: flex; gap: 10px; flex-wrap: wrap;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e5e7eb;
}
.pr-rpt-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 18px;
    border: none;
    border-radius: 10px;
    font-size: 13.5px; font-weight: 700;
    cursor: pointer;
    transition: transform .12s, box-shadow .15s, opacity .15s;
}
.pr-rpt-btn:disabled { opacity: .55; cursor: not-allowed; transform: none !important; }
.pr-rpt-btn.primary {
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
    box-shadow: 0 3px 10px rgba(var(--fs-primary-rgb),.3);
}
.pr-rpt-btn.primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(var(--fs-primary-rgb),.4);
}
.pr-rpt-btn.success {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #fff;
    box-shadow: 0 3px 10px rgba(34,197,94,.3);
}
.pr-rpt-btn.success:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(34,197,94,.4);
}
.pr-rpt-btn.txt {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: #fff;
    box-shadow: 0 3px 10px rgba(59,130,246,.3);
}
.pr-rpt-btn.txt:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 5px 16px rgba(59,130,246,.4);
}
.pr-rpt-btn-spin {
    width: 14px; height: 14px;
    border: 2px solid rgba(255,255,255,.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: pr-spin .7s linear infinite;
}

/* â”€â”€â”€ Summary bar â”€â”€â”€ */
.pr-rpt-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.pr-rpt-summary-stat {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 9px 11px;
    display: flex; flex-direction: column; gap: 2px;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
    min-width: 0;
}
.pr-rpt-summary-stat small {
    font-size: 10.5px; font-weight: 600;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-rpt-summary-stat strong {
    font-size: 13.5px; font-weight: 800;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pr-rpt-summary-stat.highlight {
    background: linear-gradient(135deg, #dcfce7, #bbf7d0);
    border-color: #86efac;
}
.pr-rpt-summary-stat.highlight small { color: #166534; }
.pr-rpt-summary-stat.highlight strong { color: #14532d; }

/* â”€â”€â”€ Table â”€â”€â”€ */
.pr-rpt-tbl-wrap {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: auto;
    box-shadow: 0 2px 10px rgba(15,23,42,.05);
    max-height: 68vh;
}
.pr-rpt-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    min-width: 1100px;
}
.pr-rpt-tbl thead {
    position: sticky; top: 0; z-index: 2;
    background: linear-gradient(135deg, var(--fs-primary), var(--fs-primary-deep));
    color: #fff;
}
.pr-rpt-tbl th {
    padding: 11px 10px;
    font-size: 12px; font-weight: 700;
    text-align: center;
    white-space: nowrap;
    border-inline-end: 1px solid rgba(255,255,255,.15);
}
.pr-rpt-tbl th.num { text-align: left; }
.pr-rpt-tbl tbody tr {
    border-bottom: 1px solid #f1f5f9;
    transition: background .12s;
}
.pr-rpt-tbl tbody tr:hover { background: var(--fs-tint-1); }
.pr-rpt-tbl td {
    padding: 9px 10px;
    color: #0f172a;
    text-align: center;
    vertical-align: middle;
    white-space: nowrap;
}
.pr-rpt-tbl td.name { font-weight: 600; }
.pr-rpt-tbl td.iban { font-family: ui-monospace, 'SF Mono', 'Consolas', monospace; direction: ltr; }

/* ✦ IBAN + Copy button ✦ */
.iban-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    direction: ltr;
}
.iban-txt {
    font-family: ui-monospace, 'SF Mono', 'Consolas', monospace;
    letter-spacing: .3px;
}
.iban-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    line-height: 1;
    opacity: .35;
    transition: all .15s ease;
    flex-shrink: 0;
}
.pr-rpt-tbl tr:hover .iban-copy,
.iban-copy:focus-visible,
.pr-rpt-card:hover .iban-copy { opacity: 1; }
.iban-copy:hover {
    opacity: 1 !important;
    background: #e0f2fe;
    border-color: #38bdf8;
    transform: scale(1.1);
}
.iban-copy:active { transform: scale(.95); }
/* موبايل: الزرار ظاهر دائماً */
@media (max-width: 820px) {
    .iban-copy { opacity: .7; width: 26px; height: 26px; font-size: 13px; }
}
.pr-rpt-tbl td.num  { direction: ltr; font-variant-numeric: tabular-nums; }
.pr-rpt-tbl td.num.net {
    font-weight: 800;
    color: #15803d;
}
.pr-rpt-tbl th.num { text-align: center; }

/* ─── Sortable headers ─── */
.pr-rpt-tbl th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background .15s;
    position: relative;
}
.pr-rpt-tbl th.sortable:hover {
    background: linear-gradient(135deg, var(--fs-primary-deep), var(--fs-primary-deeper));
}
.pr-rpt-tbl th.sortable.sort-on {
    background: linear-gradient(135deg, var(--fs-primary-deeper), var(--fs-primary-ink-4));
}
.pr-rpt-sort-ico {
    display: inline-block;
    margin-inline-start: 5px;
    font-size: 10px;
    opacity: .6;
    transition: opacity .15s, transform .15s;
}
.pr-rpt-tbl th.sortable:hover .pr-rpt-sort-ico { opacity: 1; }
.pr-rpt-tbl th.sortable.sort-on .pr-rpt-sort-ico {
    opacity: 1;
    font-size: 12px;
    transform: scale(1.15);
}

/* ─── Totals footer ─── */
.pr-rpt-tbl tfoot tr {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-top: 2px solid #f59e0b;
    position: sticky; bottom: 0;
}
.pr-rpt-tbl tfoot td {
    padding: 12px 10px;
    font-weight: 800;
    font-size: 13px;
    color: #78350f;
    border-top: 2px solid #f59e0b;
}
.pr-rpt-tbl tfoot td.lbl {
    text-align: center;
    color: var(--fs-primary-ink-2);
    letter-spacing: .3px;
}
.pr-rpt-tbl tfoot td.num {
    direction: ltr;
    font-variant-numeric: tabular-nums;
}
.pr-rpt-tbl tfoot td.num.net {
    color: #14532d;
    background: linear-gradient(135deg, #bbf7d0, #86efac);
    font-size: 14px;
}

.pr-rpt-bank {
    display: inline-block;
    padding: 3px 9px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    font-size: 11px; font-weight: 800;
    color: #1e40af;
    letter-spacing: .5px;
    direction: ltr;
}

/* ─── Search toolbar ─── */
.pr-rpt-toolbar {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
    flex-wrap: wrap;
}
.pr-rpt-search {
    position: relative;
    flex: 1;
    min-width: 260px;
    max-width: 560px;
}
.pr-rpt-search-ico {
    position: absolute;
    inset-inline-start: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    pointer-events: none;
    opacity: .55;
}
.pr-rpt-search-inp {
    width: 100%;
    padding: 10px 40px 10px 38px;
    background: #fff;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 500;
    color: #0f172a;
    outline: none;
    transition: border-color .15s, box-shadow .15s;
    box-shadow: 0 2px 8px rgba(15,23,42,.04);
}
.pr-rpt-search-inp::placeholder { color: #94a3b8; font-weight: 400; }
.pr-rpt-search-inp:focus {
    border-color: var(--fs-primary);
    box-shadow: 0 0 0 3px rgba(var(--fs-primary-rgb),.15);
}
/* Hide default search clear button in webkit */
.pr-rpt-search-inp::-webkit-search-cancel-button { display: none; }

.pr-rpt-search-clear {
    position: absolute;
    inset-inline-end: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px; height: 24px;
    border: none;
    background: #e2e8f0;
    color: #475569;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px; font-weight: 800;
    display: inline-flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.pr-rpt-search-clear:hover {
    background: #ef4444;
    color: #fff;
    transform: translateY(-50%) scale(1.08);
}

.pr-rpt-toolbar-info {
    font-size: 12.5px;
    font-weight: 600;
    color: #64748b;
    padding: 7px 14px;
    background: var(--fs-tint-2);
    border: 1px solid var(--fs-tint-5);
    border-radius: 999px;
    white-space: nowrap;
}
.pr-rpt-toolbar-info strong {
    color: var(--fs-primary-ink);
    font-weight: 800;
}

@media (max-width: 480px) {
    .pr-rpt-search { min-width: 100%; }
    .pr-rpt-toolbar-info { align-self: start; }
}

/* ─── Problem rows / cells ─── */
.pr-rpt-tbl tbody tr.problem {
    background: linear-gradient(90deg, #fef2f2, transparent 85%);
    border-inline-start: 3px solid #ef4444;
}
.pr-rpt-tbl tbody tr.problem:hover {
    background: linear-gradient(90deg, #fee2e2, var(--fs-tint-1));
}
.pr-rpt-tbl td.cell-missing {
    color: #dc2626;
    font-weight: 800;
    background: #fee2e2;
}
.pr-rpt-tbl th:last-child,
.pr-rpt-tbl td.warn-col {
    text-align: center;
    padding: 6px 4px;
}
.pr-rpt-warn-ico {
    display: inline-flex; align-items: center; justify-content: center;
    width: 24px; height: 24px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    font-size: 13px; font-weight: 800;
    box-shadow: 0 2px 6px rgba(239,68,68,.35);
    cursor: help;
}

/* ─── Problem summary card (clickable toggle) ─── */
.pr-rpt-summary-stat.problem {
    background: linear-gradient(135deg, #fee2e2, #fecaca);
    border-color: #fca5a5;
    cursor: pointer;
    text-align: start;
    font-family: inherit;
    position: relative;
    transition: all .15s;
    appearance: none;
    -webkit-appearance: none;
}
.pr-rpt-summary-stat.problem small { color: #991b1b; }
.pr-rpt-summary-stat.problem strong { color: #7f1d1d; }
.pr-rpt-summary-stat.problem:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(239,68,68,.25);
}
.pr-rpt-summary-stat.problem.active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border-color: #b91c1c;
    box-shadow: 0 4px 14px rgba(239,68,68,.45);
}
.pr-rpt-summary-stat.problem.active small,
.pr-rpt-summary-stat.problem.active strong,
.pr-rpt-summary-stat.problem.active .pr-rpt-summary-stat-hint { color: #fff; }
.pr-rpt-summary-stat-hint {
    position: absolute;
    inset-inline-end: 6px;
    top: 6px;
    font-size: 9px;
    font-weight: 700;
    color: #991b1b;
    background: rgba(255,255,255,.75);
    border-radius: 3px;
    padding: 1px 5px;
    white-space: nowrap;
}

/* ─── Mobile card: problem variant + warning banner ─── */
.pr-rpt-card.problem {
    border-color: #fca5a5;
    background: linear-gradient(135deg, #fff, #fef2f2);
    box-shadow: 0 2px 8px rgba(239,68,68,.15);
}
.pr-rpt-card-warn {
    margin-top: 10px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #fff;
    border-radius: 10px;
    font-size: 12px;
    display: flex; align-items: center; gap: 7px;
}
.pr-rpt-card-warn span { font-size: 16px; }
.pr-rpt-card-warn strong { font-weight: 700; }

.pr-rpt-card-grid span.cell-missing {
    color: #dc2626;
    font-weight: 800;
}

/* â”€â”€â”€ Mobile cards (hidden on desktop) â”€â”€â”€ */
.pr-rpt-cards { display: none; }

@media (max-width: 991.98px) {
    .pr-rpt-filter-grid { grid-template-columns: repeat(2, 1fr); }
    .pr-rpt-summary { grid-template-columns: repeat(3, 1fr); }
    .pr-rpt-tbl-wrap { display: none; }
    .pr-rpt-cards { display: flex; flex-direction: column; gap: 10px; }

    .pr-rpt-card {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 14px;
        padding: 12px;
        box-shadow: 0 2px 8px rgba(15,23,42,.04);
    }
    .pr-rpt-card-hdr {
        display: flex; justify-content: space-between; align-items: start;
        gap: 10px;
        padding-bottom: 10px;
        margin-bottom: 10px;
        border-bottom: 1px dashed #e5e7eb;
    }
    .pr-rpt-card-name {
        font-size: 14px; font-weight: 800;
        color: #0f172a;
    }
    .pr-rpt-card-net {
        font-size: 15px; font-weight: 800;
        color: #15803d;
        direction: ltr;
    }
    .pr-rpt-card-net small { font-size: 10px; color: #64748b; margin-inline-start: 3px; }

    .pr-rpt-card-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px 12px;
    }
    .pr-rpt-card-grid > div { display: flex; flex-direction: column; gap: 2px; }
    .pr-rpt-card-grid > div.full { grid-column: 1 / -1; }
    .pr-rpt-card-grid small {
        font-size: 10.5px; font-weight: 700;
        color: #64748b;
    }
    .pr-rpt-card-grid span {
        font-size: 12.5px; font-weight: 600;
        color: #0f172a;
    }
    .pr-rpt-card-grid span.iban {
        font-family: ui-monospace, 'SF Mono', 'Consolas', monospace;
        direction: ltr;
        word-break: break-all;
        font-size: 11.5px;
    }
}

@media (max-width: 480px) {
    .pr-rpt-filter-grid { grid-template-columns: 1fr; }
    .pr-rpt-filter { padding: 12px; }
    .pr-rpt-btn { padding: 10px 14px; font-size: 12.5px; }
    .pr-rpt-summary { grid-template-columns: repeat(2, 1fr); }
    .pr-rpt-card-grid { grid-template-columns: 1fr; }
}

