/* ============================================================
   HRMM Modern Theme — Purple/Blue HR Dashboard
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@300;400;500;700;800&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --hrmm-bg: #F8F9FD;
    --hrmm-card: #FFFFFF;
    --hrmm-primary: #6366F1;
    --hrmm-primary-dark: #4F46E5;
    --hrmm-purple: #8B5CF6;
    --hrmm-purple-light: #EDE9FE;
    --hrmm-blue: #3B82F6;
    --hrmm-green: #10B981;
    --hrmm-orange: #F59E0B;
    --hrmm-pink: #EC4899;
    --hrmm-text: #1E293B;
    --hrmm-text-muted: #64748B;
    --hrmm-border: #E2E8F0;
    --hrmm-sidebar-width: 300px;
    --hrmm-sidebar-gap: 16px;
    --hrmm-sidebar-offset: calc(var(--hrmm-sidebar-width) + var(--hrmm-sidebar-gap));
    --hrmm-radius: 16px;
    --hrmm-radius-lg: 20px;
    --hrmm-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.05);
    --hrmm-shadow-lg: 0 8px 30px 0 rgba(99, 102, 241, 0.08);
    --hrmm-gradient: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --hrmm-gradient-soft: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(139, 92, 246, 0.06) 100%);
    --hrmm-font: 'Tajawal', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ── Base ─────────────────────────────────────────────────── */
body.hrmm-modern {
    font-family: var(--hrmm-font) !important;
    background: var(--hrmm-bg) !important;
    color: var(--hrmm-text);
}

body.hrmm-modern * {
    font-family: var(--hrmm-font);
}

body.hrmm-modern .bg-primary {
    background: var(--hrmm-gradient) !important;
}

body.hrmm-modern .text-primary {
    color: var(--hrmm-primary) !important;
}

body.hrmm-modern .btn-primary {
    --bs-btn-bg: var(--hrmm-primary);
    --bs-btn-border-color: var(--hrmm-primary);
    --bs-btn-hover-bg: var(--hrmm-primary-dark);
    --bs-btn-hover-border-color: var(--hrmm-primary-dark);
    border-radius: 12px;
    font-weight: 500;
}

body.hrmm-modern .btn-light-primary {
    background: var(--hrmm-purple-light);
    color: var(--hrmm-primary);
    border: none;
    border-radius: 10px;
    font-weight: 500;
}

body.hrmm-modern .btn-light-primary:hover {
    background: var(--hrmm-primary);
    color: #fff;
}

/* ── Cards ────────────────────────────────────────────────── */
body.hrmm-modern .card {
    background: var(--hrmm-card);
    border: none;
    border-radius: var(--hrmm-radius);
    box-shadow: var(--hrmm-shadow);
    margin-bottom: 1.25rem;
}

body.hrmm-modern .card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--hrmm-border);
    padding: 1.25rem 1.5rem;
}

body.hrmm-modern .card .card-header h5,
body.hrmm-modern .card .card-header .h5 {
    font-weight: 700;
    font-size: 1rem;
    color: var(--hrmm-text);
    margin: 0;
}

body.hrmm-modern .card .card-header h5:after,
body.hrmm-modern .card .card-header .h5:after {
    display: none;
}

body.hrmm-modern .card .card-body {
    padding: 1.5rem;
}

/* ── Sidebar ──────────────────────────────────────────────── */
body.hrmm-modern .dash-sidebar {
    background: var(--hrmm-card) !important;
    width: var(--hrmm-sidebar-width) !important;
    box-shadow: var(--hrmm-shadow) !important;
    border: none !important;
    top: 0 !important;
    bottom: 0 !important;
}

body.hrmm-modern .dash-sidebar.light-sidebar:not(.transprent-bg) {
    top: 16px !important;
    bottom: 16px !important;
    border-radius: var(--hrmm-radius-lg) !important;
    box-shadow: var(--hrmm-shadow-lg) !important;
}

body.hrmm-modern .dash-sidebar .m-header {
    height: auto;
    min-height: 96px;
    padding: 26px 22px 18px;
    border-bottom: 1px solid var(--hrmm-border);
}

body.hrmm-modern .dash-sidebar .main-logo {
    min-height: auto;
    max-height: none;
    min-width: auto;
    justify-content: flex-start;
}

body.hrmm-modern .dash-sidebar .main-logo a img {
    max-height: 44px;
}

body.hrmm-modern .hrmm-logo-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

body.hrmm-modern .hrmm-logo-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--hrmm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

body.hrmm-modern .hrmm-logo-text {
    display: flex;
    flex-direction: column;
}

body.hrmm-modern .hrmm-logo-text span:first-child {
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--hrmm-text);
    line-height: 1.2;
    background: var(--hrmm-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.hrmm-modern .hrmm-logo-text span:last-child {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--hrmm-text-muted);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

body.hrmm-modern .dash-sidebar .navbar-content {
    display: flex;
    flex-direction: column;
    padding: 12px 0;
}

body.hrmm-modern .dash-sidebar .dash-navbar {
    flex: 1;
    padding: 0 14px;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-caption.hrmm-menu-caption {
    margin: 1.1rem 0 0.35rem;
    padding: 0 0.65rem;
    pointer-events: none;
    background: transparent !important;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-caption.hrmm-menu-caption:first-child {
    margin-top: 0.25rem;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-caption.hrmm-menu-caption label {
    display: block;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--hrmm-primary) !important;
    margin: 0;
    line-height: 1.4;
    opacity: 0.9;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-caption.hrmm-menu-caption label {
    letter-spacing: 0;
    text-transform: none;
    font-size: 0.72rem;
    color: var(--hrmm-text-muted) !important;
    font-weight: 600;
}

body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item.dash-caption.hrmm-menu-caption label {
    color: var(--hrmm-primary) !important;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item.dash-caption.hrmm-menu-caption label {
    color: #64748B !important;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link {
    display: flex;
    align-items: center;
    padding: 13px 18px;
    margin: 4px 0;
    border-radius: 12px;
    color: var(--hrmm-text-muted) !important;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
    background: transparent !important;
    box-shadow: none !important;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-micon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    margin: 0 !important;
    background: transparent;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-micon i {
    font-size: 1.3rem;
    color: var(--hrmm-text-muted);
    transition: color 0.2s ease;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-mtext {
    margin: 0 12px;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-arrow {
    float: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    opacity: 0.7;
    transition: transform 0.25s ease, opacity 0.2s ease;
    margin-left: auto;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-arrow {
    float: none !important;
    margin-left: 0;
    margin-right: auto;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-arrow svg,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link .dash-arrow i {
    width: 18px !important;
    height: 18px !important;
    font-size: 18px;
    stroke-width: 2px;
    color: var(--hrmm-text-muted);
}

body.hrmm-modern .dash-sidebar .dash-hasmenu.dash-trigger > .dash-link > .dash-arrow {
    transform: rotate(90deg);
    opacity: 1;
}

/* RTL: السهم يشير لليسار (مغلق) وللأسفل (مفتوح) */
[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-arrow {
    transform: rotate(180deg) !important;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-hasmenu.dash-trigger > .dash-link > .dash-arrow {
    transform: rotate(90deg) !important;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link:hover .dash-arrow svg,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link:hover .dash-arrow i,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link .dash-arrow svg,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link .dash-arrow i {
    color: var(--hrmm-primary);
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link:hover {
    background: var(--hrmm-gradient-soft) !important;
    color: var(--hrmm-primary) !important;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item > .dash-link:hover .dash-micon i {
    color: var(--hrmm-primary);
}

/* Active menu item */
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link {
    background: var(--hrmm-gradient-soft) !important;
    color: var(--hrmm-primary) !important;
    font-weight: 600;
    box-shadow: none !important;
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link .dash-micon,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link .dash-micon {
    background: var(--hrmm-gradient);
    box-shadow: 0 3px 10px rgba(99, 102, 241, 0.3);
}

body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link .dash-micon i,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link .dash-micon i {
    color: #fff !important;
}

/* Active indicator bar */
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link::before,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 32px;
    background: var(--hrmm-gradient);
    border-radius: 4px;
}

[dir="ltr"] body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link::before,
[dir="ltr"] body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link::before {
    left: 0;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link::before,
[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link::before {
    right: 0;
}

/* Submenu */
body.hrmm-modern .dash-sidebar .dash-submenu {
    padding: 6px 0 6px 8px;
    margin-top: 2px;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu {
    padding: 6px 8px 6px 0;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-item {
    display: flex;
    align-items: center;
    position: relative;
}

/* نقطة بداية عناصر القائمة الفرعية */
body.hrmm-modern .dash-sidebar .dash-submenu .dash-item::before {
    content: '' !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
    width: 6px !important;
    height: 6px !important;
    min-width: 6px;
    border: none !important;
    border-radius: 50% !important;
    background: #CBD5E1 !important;
    flex-shrink: 0;
    margin-left: 18px;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 1;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu .dash-item::before {
    margin-left: 0;
    margin-right: 18px;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu > .dash-item::before {
    margin-left: 32px;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu > .dash-item::before {
    margin-left: 0;
    margin-right: 32px;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu .dash-submenu > .dash-item::before {
    margin-left: 46px;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu .dash-submenu > .dash-item::before {
    margin-left: 0;
    margin-right: 46px;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-item.active::before,
body.hrmm-modern .dash-sidebar .dash-submenu .dash-item:hover::before {
    background: var(--hrmm-primary) !important;
    transform: none !important;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-link {
    display: flex;
    align-items: center;
    flex: 1;
    padding: 10px 14px 10px 10px !important;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--hrmm-text-muted) !important;
    line-height: 1.4;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu .dash-link {
    padding: 10px 10px 10px 14px !important;
}

/* سهم القوائم الفرعية المتداخلة */
body.hrmm-modern .dash-sidebar .dash-submenu .dash-hasmenu > .dash-link {
    display: flex;
    align-items: center;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-hasmenu > .dash-link .dash-arrow {
    float: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    opacity: 0.6;
    transition: transform 0.25s ease;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu .dash-hasmenu > .dash-link .dash-arrow {
    float: none !important;
    margin-left: 0;
    margin-right: auto;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-hasmenu.dash-trigger > .dash-link > .dash-arrow {
    transform: rotate(90deg);
    opacity: 1;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-item.active > .dash-link,
body.hrmm-modern .dash-sidebar .dash-submenu .dash-item:hover > .dash-link {
    color: var(--hrmm-primary) !important;
    background: var(--hrmm-gradient-soft) !important;
    font-weight: 600;
}

/* Sidebar tip widget */
body.hrmm-modern .hrmm-sidebar-tip {
    margin: 14px 18px 18px;
    padding: 18px;
    border-radius: var(--hrmm-radius);
    background: var(--hrmm-gradient-soft);
    border: 1px solid rgba(99, 102, 241, 0.12);
}

body.hrmm-modern .hrmm-sidebar-tip-icon {
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--hrmm-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 12px;
}

body.hrmm-modern .hrmm-sidebar-tip h6 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--hrmm-primary);
    margin-bottom: 6px;
}

body.hrmm-modern .hrmm-sidebar-tip p {
    font-size: 0.8rem;
    color: var(--hrmm-text-muted);
    margin: 0;
    line-height: 1.55;
}

/* ── Header ───────────────────────────────────────────────── */
body.hrmm-modern .dash-header {
    background: transparent !important;
    box-shadow: none !important;
    min-height: auto;
    padding: 16px 24px 8px;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    z-index: 1024;
}

body.hrmm-modern .dash-header:not(.transprent-bg) {
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

body.hrmm-modern .dash-header .header-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 0 !important;
    background: transparent;
    flex-wrap: wrap;
}

body.hrmm-modern .hrmm-header-greeting h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--hrmm-text);
    margin: 0;
    line-height: 1.3;
}

body.hrmm-modern .hrmm-header-greeting p {
    font-size: 0.875rem;
    color: var(--hrmm-text-muted);
    margin: 4px 0 0;
}

body.hrmm-modern .hrmm-header-search {
    flex: 1;
    max-width: 420px;
    position: relative;
}

body.hrmm-modern .hrmm-header-search input {
    width: 100%;
    padding: 12px 20px 12px 48px;
    border: none;
    border-radius: 50px;
    background: var(--hrmm-card);
    box-shadow: var(--hrmm-shadow);
    font-size: 0.875rem;
    color: var(--hrmm-text);
    outline: none;
    transition: box-shadow 0.2s;
}

[dir="rtl"] body.hrmm-modern .hrmm-header-search input {
    padding: 12px 48px 12px 20px;
}

body.hrmm-modern .hrmm-header-search input:focus {
    box-shadow: var(--hrmm-shadow-lg);
}

body.hrmm-modern .hrmm-header-search input::placeholder {
    color: #94A3B8;
}

body.hrmm-modern .hrmm-header-search i {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: var(--hrmm-text-muted);
    font-size: 1.1rem;
}

[dir="ltr"] body.hrmm-modern .hrmm-header-search i {
    left: 18px;
}

[dir="rtl"] body.hrmm-modern .hrmm-header-search i {
    right: 18px;
}

body.hrmm-modern .hrmm-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

body.hrmm-modern .hrmm-header-actions .dash-head-link {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--hrmm-card);
    box-shadow: var(--hrmm-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hrmm-text-muted) !important;
    position: relative;
    transition: all 0.2s;
    padding: 0 !important;
    margin: 0 !important;
}

body.hrmm-modern .hrmm-header-actions .dash-head-link:hover {
    background: var(--hrmm-purple-light);
    color: var(--hrmm-primary) !important;
}

body.hrmm-modern .hrmm-header-actions .dash-head-link i {
    font-size: 1.2rem;
}

body.hrmm-modern .hrmm-header-actions .dash-h-badge {
    position: absolute;
    top: 2px;
    width: 18px !important;
    height: 18px;
    font-size: 0.65rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--hrmm-card);
}

[dir="ltr"] body.hrmm-modern .hrmm-header-actions .dash-h-badge {
    right: 0 !important;
}

[dir="rtl"] body.hrmm-modern .hrmm-header-actions .dash-h-badge {
    left: 0 !important;
    right: auto !important;
}

body.hrmm-modern .hrmm-header-actions .dash-h-badge.bg-danger {
    background: var(--hrmm-purple) !important;
}

body.hrmm-modern .hrmm-header-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 16px 6px 6px;
    background: var(--hrmm-card);
    border-radius: 50px;
    box-shadow: var(--hrmm-shadow);
    cursor: pointer;
    transition: box-shadow 0.2s;
    text-decoration: none;
    color: inherit;
}

[dir="rtl"] body.hrmm-modern .hrmm-header-profile {
    padding: 6px 6px 6px 16px;
}

body.hrmm-modern .hrmm-header-profile:hover {
    box-shadow: var(--hrmm-shadow-lg);
}

body.hrmm-modern .hrmm-header-profile .header-avtar {
    width: 40px !important;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--hrmm-purple-light);
}

body.hrmm-modern .hrmm-header-profile-info h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hrmm-text);
    margin: 0;
    line-height: 1.2;
}

body.hrmm-modern .hrmm-header-profile-info span {
    font-size: 0.75rem;
    color: var(--hrmm-text-muted);
}

body.hrmm-modern .dash-header .mob-hamburger {
    display: none;
}

body.hrmm-modern .dash-header .drp-language .dash-head-link {
    border-radius: 50px;
    background: var(--hrmm-card);
    box-shadow: var(--hrmm-shadow);
}

/* ── Main Content Area ────────────────────────────────────── */
body.hrmm-modern .dash-container {
    margin-left: 0 !important;
    margin-right: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 8px;
    box-sizing: border-box;
}

body.hrmm-modern .dash-content {
    padding: 0 8px 24px;
}

body.hrmm-modern.hrmm-dashboard .page-header {
    display: none;
}

body.hrmm-modern .page-header {
    margin-bottom: 1.5rem;
}

body.hrmm-modern .page-header .page-header-title h4 {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--hrmm-text);
    margin: 0;
}

body.hrmm-modern .page-header .breadcrumb .breadcrumb-item a {
    color: var(--hrmm-text-muted);
}

/* ── Dashboard Stat Cards ─────────────────────────────────── */
body.hrmm-modern .hrmm-stat-card {
    background: var(--hrmm-card);
    border-radius: var(--hrmm-radius);
    box-shadow: var(--hrmm-shadow);
    padding: 1.5rem;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
}

body.hrmm-modern .hrmm-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hrmm-shadow-lg);
}

body.hrmm-modern .hrmm-stat-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1rem;
}

body.hrmm-modern .hrmm-stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

body.hrmm-modern .hrmm-stat-icon.blue { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
body.hrmm-modern .hrmm-stat-icon.green { background: linear-gradient(135deg, #10B981, #34D399); }
body.hrmm-modern .hrmm-stat-icon.orange { background: linear-gradient(135deg, #F59E0B, #FBBF24); }
body.hrmm-modern .hrmm-stat-icon.purple { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
body.hrmm-modern .hrmm-stat-icon.pink { background: linear-gradient(135deg, #EC4899, #F472B6); }
body.hrmm-modern .hrmm-stat-icon.indigo { background: linear-gradient(135deg, #6366F1, #818CF8); }

body.hrmm-modern .hrmm-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

body.hrmm-modern .hrmm-stat-trend.up {
    background: rgba(16, 185, 129, 0.1);
    color: var(--hrmm-green);
}

body.hrmm-modern .hrmm-stat-trend.down {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

body.hrmm-modern .hrmm-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--hrmm-text);
    line-height: 1;
    margin-bottom: 6px;
}

body.hrmm-modern .hrmm-stat-label {
    font-size: 0.875rem;
    color: var(--hrmm-text-muted);
    font-weight: 500;
}

/* ── Dashboard Section Cards ──────────────────────────────── */
body.hrmm-modern .hrmm-section-card {
    background: var(--hrmm-card);
    border-radius: var(--hrmm-radius);
    box-shadow: var(--hrmm-shadow);
    overflow: hidden;
    height: 100%;
}

body.hrmm-modern .hrmm-section-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--hrmm-border);
}

body.hrmm-modern .hrmm-section-card-header h5 {
    font-weight: 700;
    font-size: 1rem;
    color: var(--hrmm-text);
    margin: 0;
}

body.hrmm-modern .hrmm-section-card-header .btn-view-all {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hrmm-primary);
    background: var(--hrmm-purple-light);
    border: none;
    padding: 6px 16px;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.2s;
}

body.hrmm-modern .hrmm-section-card-header .btn-view-all:hover {
    background: var(--hrmm-primary);
    color: #fff;
}

body.hrmm-modern .hrmm-section-card-body {
    padding: 1.25rem 1.5rem;
}

/* List items */
body.hrmm-modern .hrmm-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--hrmm-border);
}

body.hrmm-modern .hrmm-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

body.hrmm-modern .hrmm-list-item:first-child {
    padding-top: 0;
}

body.hrmm-modern .hrmm-list-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

body.hrmm-modern .hrmm-list-avatar-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--hrmm-gradient-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--hrmm-primary);
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

body.hrmm-modern .hrmm-list-info {
    flex: 1;
    min-width: 0;
}

body.hrmm-modern .hrmm-list-info h6 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--hrmm-text);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

body.hrmm-modern .hrmm-list-info span {
    font-size: 0.75rem;
    color: var(--hrmm-text-muted);
}

body.hrmm-modern .hrmm-list-date {
    font-size: 0.75rem;
    color: var(--hrmm-text-muted);
    white-space: nowrap;
}

body.hrmm-modern .hrmm-date-badge {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--hrmm-gradient-soft);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

body.hrmm-modern .hrmm-date-badge .day {
    font-size: 1rem;
    font-weight: 800;
    color: var(--hrmm-primary);
    line-height: 1;
}

body.hrmm-modern .hrmm-date-badge .month {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--hrmm-text-muted);
    text-transform: uppercase;
}

/* Status badges */
body.hrmm-modern .hrmm-badge {
    font-size: 0.7rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

body.hrmm-modern .hrmm-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--hrmm-green);
}

body.hrmm-modern .hrmm-badge.warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--hrmm-orange);
}

body.hrmm-modern .hrmm-badge.danger {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
}

/* ── Tables ───────────────────────────────────────────────── */
body.hrmm-modern .table {
    margin: 0;
}

body.hrmm-modern .table thead th {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--hrmm-text-muted);
    border-bottom: 1px solid var(--hrmm-border);
    padding: 12px 16px;
    background: transparent;
    text-transform: none;
}

body.hrmm-modern .table tbody td {
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--hrmm-text);
    border-bottom: 1px solid var(--hrmm-border);
    vertical-align: middle;
}

body.hrmm-modern .table tbody tr:last-child td {
    border-bottom: none;
}

body.hrmm-modern .table tbody tr:hover {
    background: var(--hrmm-gradient-soft);
}

/* ── Footer ───────────────────────────────────────────────── */
body.hrmm-modern .dash-footer {
    background: transparent;
    border: none;
    color: var(--hrmm-text-muted);
    font-size: 0.8rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
}

/* ── Theme avatars (legacy compat) ────────────────────────── */
body.hrmm-modern .theme-avtar {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

body.hrmm-modern .theme-avtar.bg-primary { background: linear-gradient(135deg, #6366F1, #818CF8) !important; }
body.hrmm-modern .theme-avtar.bg-info { background: linear-gradient(135deg, #3B82F6, #60A5FA) !important; }
body.hrmm-modern .theme-avtar.bg-warning { background: linear-gradient(135deg, #F59E0B, #FBBF24) !important; }
body.hrmm-modern .theme-avtar.bg-success { background: linear-gradient(135deg, #10B981, #34D399) !important; }
body.hrmm-modern .theme-avtar.bg-danger { background: linear-gradient(135deg, #EF4444, #F87171) !important; }

/* ── Forms ────────────────────────────────────────────────── */
body.hrmm-modern .form-control,
body.hrmm-modern .form-select {
    border-radius: 10px;
    border: 1px solid var(--hrmm-border);
    padding: 10px 14px;
    font-size: 0.875rem;
}

body.hrmm-modern .form-control:focus,
body.hrmm-modern .form-select:focus {
    border-color: var(--hrmm-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

/* ── Absent badge ─────────────────────────────────────────── */
body.hrmm-modern .absent-btn {
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ── Calendar ─────────────────────────────────────────────── */
body.hrmm-modern .fc {
    font-family: var(--hrmm-font);
}

body.hrmm-modern .fc .fc-button-primary {
    background: var(--hrmm-primary) !important;
    border-color: var(--hrmm-primary) !important;
    border-radius: 8px !important;
}

body.hrmm-modern .fc .fc-button-primary:hover {
    background: var(--hrmm-primary-dark) !important;
}

body.hrmm-modern .fc .fc-toolbar-title {
    font-weight: 700;
    font-size: 1.1rem !important;
}

/* ── Attendance gauge ─────────────────────────────────────── */
body.hrmm-modern .hrmm-gauge-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    padding: 1rem 0;
}

body.hrmm-modern .hrmm-gauge-chart {
    position: relative;
    width: 180px;
    height: 90px;
}

body.hrmm-modern .hrmm-gauge-value {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--hrmm-text);
}

body.hrmm-modern .hrmm-gauge-legend {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

body.hrmm-modern .hrmm-gauge-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
}

body.hrmm-modern .hrmm-gauge-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* ── Dropdown menus ───────────────────────────────────────── */
body.hrmm-modern .dash-h-dropdown {
    border: none;
    border-radius: var(--hrmm-radius);
    box-shadow: var(--hrmm-shadow-lg);
    padding: 8px;
}

body.hrmm-modern .dash-h-dropdown .dropdown-item {
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.875rem;
}

body.hrmm-modern .dash-h-dropdown .dropdown-item:hover {
    background: var(--hrmm-gradient-soft);
    color: var(--hrmm-primary);
}

/* ── App shell layout (sidebar + content side by side) ───── */
@media (min-width: 1025px) {
    [dir="ltr"] body.hrmm-modern {
        padding-left: var(--hrmm-sidebar-offset) !important;
        padding-right: 0 !important;
    }

    [dir="rtl"] body.hrmm-modern {
        padding-right: var(--hrmm-sidebar-offset) !important;
        padding-left: 0 !important;
    }

    body.hrmm-modern .dash-sidebar {
        position: fixed !important;
        z-index: 1026;
    }

    [dir="ltr"] body.hrmm-modern .dash-sidebar {
        left: 0 !important;
        right: auto !important;
    }

    [dir="rtl"] body.hrmm-modern .dash-sidebar {
        right: 0 !important;
        left: auto !important;
    }

    [dir="ltr"] body.hrmm-modern .dash-sidebar.light-sidebar:not(.transprent-bg) {
        border-radius: 0 var(--hrmm-radius-lg) var(--hrmm-radius-lg) 0 !important;
    }

    [dir="rtl"] body.hrmm-modern .dash-sidebar.light-sidebar:not(.transprent-bg) {
        border-radius: var(--hrmm-radius-lg) 0 0 var(--hrmm-radius-lg) !important;
    }
}

/* ── Mobile responsive ────────────────────────────────────── */
@media (max-width: 1024px) {
    body.hrmm-modern {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    body.hrmm-modern .dash-header .mob-hamburger {
        display: block;
    }

    body.hrmm-modern .dash-header {
        left: 0 !important;
        right: 0 !important;
        padding: 12px 16px;
    }

    body.hrmm-modern .dash-container {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.hrmm-modern .dash-footer {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.hrmm-modern .hrmm-header-search {
        display: none;
    }

    body.hrmm-modern .hrmm-header-greeting h2 {
        font-size: 1.1rem;
    }

    body.hrmm-modern .hrmm-header-profile-info {
        display: none;
    }

    body.hrmm-modern .dash-sidebar.light-sidebar:not(.transprent-bg) {
        top: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 576px) {
    body.hrmm-modern .hrmm-stat-value {
        font-size: 1.5rem;
    }

    body.hrmm-modern .hrmm-header-greeting p {
        display: none;
    }
}

/* ── Override legacy theme-N sidebar colors ───────────────── */
body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item.active > .dash-link,
body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link,
body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item:active > .dash-link,
body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item:focus > .dash-link,
body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item:hover > .dash-link,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item:active > .dash-link,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item:focus > .dash-link,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item:hover > .dash-link {
    background: var(--hrmm-gradient-soft) !important;
    color: var(--hrmm-primary) !important;
    box-shadow: none !important;
}

body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item.active > .dash-link i,
body.hrmm-modern .dash-sidebar.light-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link i,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.active > .dash-link i,
body.hrmm-modern .dash-sidebar .dash-navbar > .dash-item.dash-trigger > .dash-link i {
    color: #fff !important;
}

body.hrmm-modern .dash-header .drp-language .drp-text,
body.hrmm-modern .dash-header .dash-head-link > i:not(.nocolor) {
    color: var(--hrmm-text-muted) !important;
}

body.hrmm-modern .dash-header:not(.transprent-bg) {
    background: transparent !important;
    box-shadow: none !important;
}

body.hrmm-modern .dash-sidebar {
    background: var(--hrmm-card) !important;
}

body.hrmm-modern .dash-sidebar.light-sidebar:not(.transprent-bg) {
    box-shadow: var(--hrmm-shadow-lg) !important;
}

/* ── Dashboard Layout ─────────────────────────────────────── */
body.hrmm-modern .hrmm-dashboard-wrap {
    display: flex;
    flex-direction: column;
    gap: 0;
}

body.hrmm-modern .hrmm-dash-row {
    margin-bottom: 1.25rem;
}

body.hrmm-modern .hrmm-dash-row:last-child {
    margin-bottom: 0;
}

body.hrmm-modern .hrmm-section-subtitle {
    font-size: 0.8rem;
    color: var(--hrmm-text-muted);
    margin: 4px 0 0;
    font-weight: 400;
}

body.hrmm-modern .hrmm-dash-analytics {
    align-items: stretch;
}

body.hrmm-modern .hrmm-dash-chart-main,
body.hrmm-modern .hrmm-dash-chart-side {
    height: 100%;
}

body.hrmm-modern .hrmm-dash-chart-main .hrmm-section-card-body,
body.hrmm-modern .hrmm-dash-chart-side .hrmm-section-card-body {
    display: flex;
    align-items: center;
    min-height: 360px;
}

body.hrmm-modern #hrmm-employee-chart {
    width: 100%;
    min-height: 340px;
}

body.hrmm-modern #hrmm-donut-chart {
    width: 100%;
    min-height: 280px;
}

body.hrmm-modern .hrmm-dash-list-card {
    height: 100%;
}

body.hrmm-modern .hrmm-dash-scroll {
    max-height: 300px;
    overflow-y: auto;
    padding-top: 0.25rem;
}

body.hrmm-modern .hrmm-dash-scroll::-webkit-scrollbar {
    width: 4px;
}

body.hrmm-modern .hrmm-dash-scroll::-webkit-scrollbar-thumb {
    background: var(--hrmm-border);
    border-radius: 4px;
}

body.hrmm-modern .hrmm-dash-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--hrmm-text-muted);
}

body.hrmm-modern .hrmm-dash-empty i {
    font-size: 2rem;
    opacity: 0.4;
    margin-bottom: 0.75rem;
    display: block;
}

body.hrmm-modern .hrmm-dash-empty p {
    margin: 0;
    font-size: 0.875rem;
}

body.hrmm-modern .hrmm-quick-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding-top: 0.25rem;
}

body.hrmm-modern .hrmm-quick-stat-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--hrmm-border);
}

body.hrmm-modern .hrmm-quick-stat-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

body.hrmm-modern .hrmm-quick-stat-item:first-child {
    padding-top: 0;
}

body.hrmm-modern .hrmm-quick-icon {
    width: 42px !important;
    height: 42px !important;
    font-size: 1.1rem !important;
    border-radius: 12px !important;
    flex-shrink: 0;
}

body.hrmm-modern .hrmm-gauge-compact {
    flex-direction: column;
    gap: 1rem;
    padding: 0.5rem 0;
}

body.hrmm-modern .hrmm-gauge-compact .hrmm-gauge-legend {
    width: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

body.hrmm-modern .hrmm-dash-attendance-card .hrmm-section-card-body {
    padding: 1rem 1.25rem 1.25rem;
}

body.hrmm-modern .hrmm-dash-calendar-card .hrmm-section-card-body {
    padding: 1rem 1.5rem 1.5rem;
}

body.hrmm-modern .hrmm-dash-calendar {
    min-height: 480px;
}

body.hrmm-modern .hrmm-dash-calendar-card .card-635,
body.hrmm-modern .hrmm-dash-calendar-card .hrmm-dash-calendar {
    height: auto !important;
    min-height: 480px !important;
}

body.hrmm-modern .hrmm-dash-select {
    width: 170px;
    border-radius: 10px;
    font-size: 0.85rem;
}

body.hrmm-modern .hrmm-badge.warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--hrmm-orange);
}

@media (max-width: 1199px) {
    body.hrmm-modern .hrmm-dash-chart-main .hrmm-section-card-body,
    body.hrmm-modern .hrmm-dash-chart-side .hrmm-section-card-body {
        min-height: 300px;
    }
}

@media (max-width: 768px) {
    body.hrmm-modern .hrmm-gauge-compact .hrmm-gauge-legend {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* إلغاء padding القديم للـ submenu من style.css */
body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu .dash-link {
    padding: 10px 14px 10px 10px !important;
}

[dir="rtl"] body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu .dash-link {
    padding: 10px 10px 10px 14px !important;
}

body.hrmm-modern .dash-sidebar .dash-submenu .dash-submenu .dash-submenu .dash-link {
    padding: 10px 14px 10px 10px !important;
}

body.hrmm-modern .dash-sidebar .dash-link .dash-mtext::after {
    display: none;
}
