/* ============================================
   Mnzil Performance Hub - Main Stylesheet
   Company: Mnzil Holding Co.
   Version: v12.0 (mnzil.com Purple-Indigo Identity)
   Last Updated: 5 April 2026
   ============================================ */

/* ============================================
   Global Currency Display Styles
   ============================================ */
.currency-number {
    font-weight: inherit;
    font-size: inherit;
}

.currency-unit {
    font-size: 0.5em !important;
    font-weight: 400 !important;
    color: #94a3b8 !important;
    opacity: 0.8;
    vertical-align: baseline;
    margin-left: 2px;
}

.kpi-value .currency-unit,
.stat-value .currency-unit {
    vertical-align: middle;
}

td .currency-unit,
th .currency-unit {
    font-size: 0.55em !important;
}

/* ============================================
   CSS Variables & Theme — v12.0 mnzil.com Aligned
   Purple-indigo gradient identity from mnzil.com/ar
   ============================================ */
:root {
    /* Brand Colors - mnzil.com Purple-Indigo Identity */
    --primary-blue: #4F46E5;
    --secondary-blue: #EEF2FF;
    --secondary-orange: #FF7A00;
    --manzil-orange: #FF7A00;
    --manzil-primary: #4F46E5;
    --manzil-black: #1e1b4b;
    --background: #f8f9fc;
    --text-color: #374151;
    --heading-color: #1e1b4b;
    --text-primary: #1e1b4b;
    --text-secondary: #5a6577;
    --text-muted: #8892a4;
    --card-bg: #ffffff;
    --card-bg-elevated: #fafbff;
    --bg-secondary: #f1f3f9;
    --border-color: #e8ebf2;
    --primary-color: #4F46E5;
    --primary-light: rgba(79, 70, 229, 0.08);
    --danger-color: #ef4444;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    
    /* Purple palette from mnzil.com */
    --indigo-50: #EEF2FF;
    --indigo-100: #E0E7FF;
    --indigo-200: #C7D2FE;
    --indigo-300: #A5B4FC;
    --indigo-400: #818CF8;
    --indigo-500: #6366F1;
    --indigo-600: #4F46E5;
    --indigo-700: #4338CA;
    --indigo-800: #3730A3;
    --indigo-900: #312E81;
    --violet-500: #7C3AED;
    --violet-600: #6D28D9;
    
    /* Status Colors — softer tones */
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #6366F1;
    
    /* UI Colors */
    --white: #FFFFFF;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    
    /* Gradients — mnzil.com purple-indigo */
    --gradient-primary: linear-gradient(135deg, #4F46E5, #7C3AED);
    --gradient-page: linear-gradient(135deg, #4F46E5 0%, #7C3AED 30%, #6366F1 60%, #818CF8 100%);
    --gradient-sidebar: linear-gradient(180deg, #4338CA 0%, #4F46E5 40%, #6366F1 100%);
    --gradient-blue-dark: linear-gradient(180deg, #312E81 0%, #1e1b4b 100%);
    --gradient-blue-light: linear-gradient(to bottom, transparent, rgba(238, 242, 255, 0.5));
    
    /* Shadows — layered, realistic depth */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 8px 28px rgba(0, 0, 0, 0.10), 0 4px 10px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 16px 48px rgba(0, 0, 0, 0.12), 0 6px 16px rgba(0, 0, 0, 0.06);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    
    /* Typography — system-native, clean */
    --font-arabic: 'Tajawal', 'IBM Plex Sans Arabic', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-english: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-system: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Spacing — breathable, spacious like mnzil.com */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 0.75rem;
    --spacing-lg: 1rem;
    --spacing-xl: 1.25rem;
    --spacing-2xl: 1.75rem;
    
    /* Border Radius — rounded, modern like mnzil.com */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 14px;
    --radius-2xl: 16px;
    --radius-3xl: 20px;
    --radius-full: 9999px;
    
    /* Transitions — smooth */
    --transition: all 0.2s ease;
    --transition-fast: all 0.15s ease;
    --transition-slow: all 0.3s ease;
    
    /* Layout */
    --sidebar-width: 250px;
    --topbar-height: 56px;
    
    /* Unified Content Layout */
    --content-padding: 20px;
    --content-padding-mobile: 12px;
    --content-max-width: 1440px;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-arabic);
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background);
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
}

/* Decorative circle blobs — subtle, like mnzil.com accents */
body::before {
    content: '';
    position: fixed;
    top: -20%;
    right: -15%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.04);
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
}

body::after {
    content: '';
    position: fixed;
    bottom: -25%;
    left: -15%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.03);
    filter: blur(100px);
    z-index: 0;
    pointer-events: none;
}

/* English Font for English Content */
body[lang="en"] {
    font-family: var(--font-english);
}

h1, h2, h3, h4, h5, h6 {
    color: var(--heading-color);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: var(--spacing-sm);
    letter-spacing: -0.01em;
}

h1 { font-size: 24px; font-weight: 700; }
h2 { font-size: 20px; font-weight: 600; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 14px; font-weight: 600; }
h5 { font-size: 13px; font-weight: 600; }
h6 { font-size: 12px; font-weight: 600; }

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
}

/* ============================================
   Layout Structure — v12.0 mnzil.com Aligned
   ============================================ */
body {
    display: flex;
    min-height: 100vh;
    background-color: var(--background);
}

/* Sidebar — Purple gradient, mnzil.com navbar style */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gradient-sidebar);
    border-left: none;
    display: flex;
    flex-direction: column;
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
    box-shadow: -6px 0 32px rgba(67, 56, 202, 0.2), -2px 0 8px rgba(0, 0, 0, 0.06);
}

body[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: none;
    box-shadow: 4px 0 24px rgba(79, 70, 229, 0.15);
}

.sidebar-header {
    padding: var(--spacing-lg) var(--spacing-xl);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    position: relative;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    color: #ffffff;
    text-align: right;
    width: 100%;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    opacity: 0.95;
}

body[dir="ltr"] .logo {
    align-items: flex-start;
    text-align: right;
}

.logo-img {
    width: auto !important;
    height: 28px !important;
    max-width: 110px !important;
    object-fit: contain;
    flex-shrink: 0;
    margin-bottom: 2px;
    transition: var(--transition);
    /* Logo is already white with transparent background — no filter needed */
    filter: none !important;
    background: transparent !important;
    border-radius: 0 !important;
}

.logo:hover .logo-img {
    transform: scale(1.02);
}

.logo i {
    font-size: 18px;
    color: var(--secondary-orange);
}

.sidebar-toggle {
    background: transparent;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
    padding: var(--spacing-sm);
    border-radius: var(--radius-md);
    display: none;
    position: absolute;
    top: var(--spacing-lg);
    left: var(--spacing-lg);
}

body[dir="ltr"] .sidebar-toggle {
    left: auto;
    right: var(--spacing-lg);
}

.sidebar-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar-nav {
    flex: 1;
    padding: var(--spacing-md) 0;
}

/* ============================================================
   Sidebar Section Titles — Manzil brand (v12.1)
   ------------------------------------------------------------
   Small uppercase labels that group nav items into logical
   sections. Bilingual via [data-ar][data-en] (handled in JS).
   ============================================================ */
.nav-section-title {
    display: block;
    padding: 14px var(--spacing-xl) 6px;
    margin: 4px var(--spacing-sm) 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    user-select: none;
    transition: color 0.2s ease;
}

/* First section title (right after Dashboard) — no top border */
.nav-section-title:first-of-type,
.sidebar-nav > .nav-section-title:nth-child(2) {
    border-top: none;
    padding-top: 18px;
}

/* Subtle Manzil orange accent dot */
.nav-section-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--manzil-orange, #FF7A00);
    margin-inline-end: 8px;
    vertical-align: middle;
    opacity: 0.65;
}

/* RTL adjustments — arabic font tweaks */
html[dir="rtl"] .nav-section-title {
    font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 11px;
    letter-spacing: 0.02em;
}

/* Collapsed sidebar — hide section titles cleanly */
.sidebar.collapsed .nav-section-title {
    font-size: 0;
    padding: 8px 0 4px;
    margin: 4px var(--spacing-sm) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}
.sidebar.collapsed .nav-section-title::before {
    margin: 0 auto;
    display: block;
    width: 6px;
    height: 6px;
}

/* ============================================================
   Collapsible Sections (Accordion) — v1.0
   Built by JS (sidebar-sections in topbar.js)
   ============================================================ */
.nav-section {
    margin: 4px var(--spacing-sm) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar-nav > .nav-section:first-of-type {
    border-top: none;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.95);
    padding: 16px var(--spacing-xl) 10px;
    font-size: 12.5px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
    user-select: none;
    transition: color 0.2s ease;
    text-align: inherit;
}
.nav-section-header:hover { color: #ffffff; }
.nav-section-header:focus { outline: none; }

/* Orange brand dot on every header */
.nav-section-header > span::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--manzil-orange, #FF7A00);
    margin-inline-end: 8px;
    vertical-align: middle;
    opacity: 0.75;
}

/* Caret rotates when section is open */
.nav-section-caret {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.25s ease, color 0.2s ease;
    margin-inline-start: 8px;
}
.nav-section.open .nav-section-caret {
    transform: rotate(180deg);
    color: var(--manzil-orange, #FF7A00);
}
.nav-section-header:hover .nav-section-caret { color: rgba(255, 255, 255, 0.85); }

/* RTL header tweaks (Arabic font) */
html[dir="rtl"] .nav-section-header {
    font-family: 'Tajawal', 'IBM Plex Sans Arabic', sans-serif;
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

/* Items wrapper — animated open/close */
.nav-section-items {
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.28s ease, opacity 0.2s ease, padding 0.2s ease;
    padding-bottom: 0;
}
.nav-section.open .nav-section-items {
    max-height: 600px; /* enough for any expected count */
    opacity: 1;
    padding-bottom: 6px;
}

/* Hide nav items when section is closed (defensive — JS already does it) */
.nav-section.closed .nav-section-items .nav-item {
    pointer-events: none;
}

/* In collapsed (mini) sidebar — always open, hide headers */
.sidebar.collapsed .nav-section-header { display: none; }
.sidebar.collapsed .nav-section-items {
    max-height: none !important;
    opacity: 1 !important;
}
.sidebar.collapsed .nav-section {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 6px;
    padding-top: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 9px var(--spacing-xl);
    color: rgba(255, 255, 255, 0.74);
    font-weight: 500;
    font-size: 12.5px;
    border-right: 2px solid transparent;
    transition: all 0.2s ease;
    border-radius: 10px;
    margin: 2px var(--spacing-sm);
    position: relative;
}

.nav-item::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--manzil-orange);
    transition: var(--transition);
    border-radius: var(--radius-full);
}

body[dir="ltr"] .nav-item {
    border-right: none;
    border-left: 2px solid transparent;
}

body[dir="ltr"] .nav-item::before {
    right: auto;
    left: 0;
}

.nav-item i {
    font-size: 14px;
    width: 18px;
    text-align: center;
    transition: var(--transition);
    opacity: 0.7;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

body[dir="ltr"] .nav-item:hover {
    transform: none;
}

.nav-item:hover i {
    opacity: 1;
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.18);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.nav-item.active::before {
    height: 60%;
}

.nav-item.active i {
    color: var(--manzil-orange);
    opacity: 1;
}

.sidebar-footer {
    padding: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 13px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    color: #ffffff;
    font-size: 12px;
}

.user-role {
    font-size: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.logout-btn {
    width: 100%;
    padding: 8px;
    background-color: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    font-size: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn:hover {
    background-color: rgba(239, 68, 68, 0.8);
    color: var(--white);
    border-color: transparent;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: var(--sidebar-width);
    transition: var(--transition);
    background: transparent;
    position: relative;
    z-index: 1;
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
}

body[dir="ltr"] .main-content {
    margin-right: 0;
    margin-left: var(--sidebar-width);
}

/* Top Bar — Clean with subtle blur */
.top-bar {
    height: var(--topbar-height);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-2xl);
    position: sticky;
    top: 0;
    z-index: 999;
    overflow: visible;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.mobile-menu-toggle {
    background: transparent;
    color: var(--indigo-600);
    font-size: 18px;
    padding: var(--spacing-sm);
    display: none;
}

.top-bar h1 {
    font-size: 15px !important;
    font-weight: 600 !important;
    margin: 0;
    color: var(--heading-color);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Language Toggle */
.lang-toggle {
    padding: 5px var(--spacing-md);
    background-color: rgba(79, 70, 229, 0.06);
    color: var(--indigo-600);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-weight: 500;
    font-size: 12px;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.lang-toggle:hover {
    background-color: rgba(79, 70, 229, 0.1);
}

/* Theme Toggle & Icon Buttons */
.theme-toggle,
.icon-btn {
    width: 32px;
    height: 32px;
    background-color: rgba(79, 70, 229, 0.06);
    color: var(--indigo-600);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    position: relative;
    overflow: visible;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.theme-toggle:hover,
.icon-btn:hover {
    background-color: rgba(79, 70, 229, 0.12);
}

/* Notifications */
.notifications,
.notification-wrapper {
    position: relative;
    overflow: visible;
}

.notification-btn {
    width: 32px;
    height: 32px;
    background-color: rgba(79, 70, 229, 0.06);
    color: var(--indigo-600);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    position: relative;
    border: 1px solid rgba(79, 70, 229, 0.1);
}

.notification-btn:hover {
    background-color: rgba(79, 70, 229, 0.12);
}

.notification-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    background-color: #ef4444;
    color: #ffffff;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 50%;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    pointer-events: none;
    line-height: 1;
    box-shadow: 0 0 0 2px #ffffff;
}

body[dir="ltr"] .notification-badge {
    right: 2px;
    left: auto;
}

.notification-dropdown {
    position: fixed;
    top: 50px;
    width: 320px;
    max-height: 420px;
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.1);
    overflow: hidden;
    display: none;
    z-index: 10001;
}

body[dir="ltr"] .notification-dropdown {
    right: auto;
    left: auto;
}

.notification-dropdown.active,
.notification-dropdown.show {
    display: block;
}

.notification-header {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-200);
}

.notification-header h3 {
    font-size: 13px;
    margin: 0;
}

.notification-list {
    max-height: 340px;
    overflow-y: auto;
}

.notification-item {
    padding: 8px 12px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.notification-item:hover {
    background-color: var(--gray-50);
}

.notification-item.unread {
    background-color: rgba(79, 70, 229, 0.05);
}

.notification-content {
    font-size: 12px;
    color: var(--text-color);
    margin-bottom: 2px;
}

.notification-time {
    font-size: 10px;
    color: var(--gray-500);
}

/* User Menu in Top Bar */
.user-menu {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 6px;
    background-color: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid transparent;
}

.user-menu:hover {
    background-color: var(--gray-50);
}

.user-menu .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-full);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 12px;
}

.user-menu .user-name {
    font-weight: 500;
    color: var(--text-color);
    font-size: 12px;
}

/* ============================================
   Unified Page Content - Mnzil Style v8.23
   توحيد أحجام جميع الصفحات
   ============================================ */

/* الأنماط الموحدة لجميع أنواع المحتوى */
.dashboard-content,
.content-wrapper,
.settings-container {
    padding: var(--content-padding);
    max-width: var(--content-max-width);
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
    /* Arc browser fix - ensure content respects boundaries */
    overflow-x: auto;
}

/* للجداول داخل المحتوى */
.dashboard-content > .table-container,
.content-wrapper > .table-container,
.settings-container > .table-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    /* Arc browser fix - prevent table from exceeding container */
    overflow-x: auto;
}

/* Stats Grid - Modern Design */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-2xl);
}

@media (max-width: 1400px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.stat-card::before {
    display: none;
}

.stat-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
    border-color: var(--indigo-200);
}

.stat-card:hover::before {
    display: none;
}

.stat-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: white;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.stat-icon::after {
    display: none;
}

.stat-icon.blue {
    background: linear-gradient(135deg, #4F46E5, #6366F1);
}

.stat-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.stat-icon.green {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

.stat-icon.purple {
    background: #8b5cf6;
}

.stat-content {
    flex: 1;
    min-width: 0;
}

.stat-value {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: -0.4px;
    white-space: nowrap !important;
}

.stat-value .amount-number,
.stat-value .currency-number {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit;
}

.stat-value .currency-label,
.stat-value .currency-unit,
.stat-value .currency {
    font-size: 10px !important; /* تصغير من 11px */
    font-weight: 400 !important;
    color: #9ca3af !important;
    vertical-align: baseline !important;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-600);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Card — Clean, elevated, premium feel */
.card {
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    overflow: hidden;
    margin-bottom: var(--spacing-lg);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
}

.card::before {
    display: none;
}

.card:hover {
    border-color: var(--indigo-200);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
}

.card:hover::before {
    display: none;
}

.card-header {
    padding: 14px 18px;
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.card-header h3 {
    font-size: 14px;
    font-weight: 700;
    margin: 0;
    color: var(--heading-color);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3::before {
    content: '';
    width: 3px;
    height: 16px;
    background: linear-gradient(180deg, var(--primary-blue), var(--indigo-400));
    border-radius: var(--radius-full);
    display: inline-block;
}

/* Search Box — Clean */
.search-box {
    position: relative;
    flex: 1;
    min-width: 180px;
    max-width: 260px;
}

.search-box i {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 12px;
}

body[dir="ltr"] .search-box i {
    right: auto;
    left: 10px;
}

.search-box input {
    width: 100%;
    padding: 7px 30px 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    transition: var(--transition);
    background: var(--white);
}

body[dir="ltr"] .search-box input {
    padding: 7px 10px 7px 30px;
}

.search-box input:focus {
    outline: none;
    border-color: var(--indigo-400);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Filter Group — Clean */
.filter-group {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.filter-select {
    padding: 7px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-color);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
    min-width: 110px;
}

.filter-select:hover {
    border-color: var(--gray-400);
}

.filter-select:focus {
    outline: none;
    border-color: var(--indigo-400);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

/* Button — Rounded, mnzil.com style */
.btn-primary {
    padding: 10px 26px;
    background: linear-gradient(135deg, #FF7A00 0%, #FF9A40 100%);
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(255, 122, 0, 0.25), 0 1px 3px rgba(255, 122, 0, 0.15);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.btn-primary::before {
    display: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #e66e00 0%, #FF8A30 100%);
    box-shadow: 0 6px 20px rgba(255, 122, 0, 0.35), 0 2px 6px rgba(255, 122, 0, 0.2);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    display: none;
}

.btn-primary i {
    font-size: 12px;
    transition: var(--transition-fast);
}

.btn-primary:hover i {
    transform: none;
}

body[dir="ltr"] .btn-primary:hover i {
    transform: none;
}

/* KPI Cards Grid — fixed columns to avoid orphan cards */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);   /* 3×2 default — balanced */
    gap: 14px;
    margin-bottom: 18px;
}

/* Wide screens: 6 in a row */
@media (min-width: 1500px) {
    .kpi-grid { grid-template-columns: repeat(6, 1fr); }
}

/* Tablet */
@media (max-width: 900px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

/* Mobile */
@media (max-width: 520px) {
    .kpi-grid { grid-template-columns: 1fr; }
}

.kpi-card {
    background: var(--white);
    border-radius: 16px;
    padding: 18px 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    display: none;
}

.kpi-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 6px rgba(0, 0, 0, 0.04);
    transform: translateY(-3px);
    border-color: var(--indigo-200);
}

.kpi-card:hover::after {
    display: none;
}

.kpi-icon {
    width: 46px !important;
    height: 46px !important;
    border-radius: 14px;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 18px !important;
    color: var(--white);
    flex-shrink: 0 !important;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

.kpi-icon.blue {
    background: linear-gradient(135deg, #4F46E5, #6366F1);
}

.kpi-icon.orange {
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
}

.kpi-icon.green {
    background: linear-gradient(135deg, #22c55e, #4ade80);
}

.kpi-icon.purple {
    background: linear-gradient(135deg, #7C3AED, #a78bfa);
}

.kpi-content {
    flex: 1;
}

.kpi-value {
    font-size: 18px !important;
    font-weight: 800 !important;
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 2px;
    letter-spacing: -0.4px;
    white-space: nowrap !important;
}

.kpi-value .amount-number,
.kpi-value .currency-number {
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit;
}

.kpi-value .currency-label,
.kpi-value .currency-unit,
.kpi-value .currency {
    font-size: 10px !important;
    font-weight: 400 !important;
    color: #9ca3af !important;
    vertical-align: middle !important; /* baseline → middle */
    opacity: 0.85;
    margin-left: 3px;
}

.kpi-label {
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 500;
    letter-spacing: 0.01em;
}

/* Quick Actions */
.quick-actions {
    margin-bottom: var(--spacing-lg);
}

.quick-actions h2 {
    font-size: 13px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 8px;
}

.action-btn {
    background-color: var(--white);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 12px;
    padding: 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color);
    font-weight: 500;
    font-size: 12px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.action-btn i {
    font-size: 13px;
    color: var(--indigo-500);
    opacity: 0.8;
}

.action-btn:hover {
    border-color: var(--indigo-300);
    background-color: var(--indigo-50);
    box-shadow: var(--shadow-md);
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 12px;
}

.dashboard-card {
    background-color: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06), 0 2px 4px rgba(0, 0, 0, 0.03);
    border-color: var(--indigo-200, #C7D2FE);
}

.dashboard-card.chart-card {
    grid-column: span 2;
}

.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border-color);
}

.card-header h3 {
    font-size: 14px;
    margin: 0;
    color: var(--heading-color);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card-body {
    padding: 14px;
    background: transparent;
}

/* Top Performers List */
.top-performers-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.performer-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 10px;
    background-color: transparent;
    border-radius: 6px;
    transition: var(--transition);
}

.performer-item:hover {
    background-color: var(--gray-50);
}

.performer-rank {
    width: 24px;
    height: 24px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 10px;
    flex-shrink: 0;
}

.performer-info {
    flex: 1;
    min-width: 0;
}

.performer-name {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 12px;
}

.performer-department {
    font-size: 10px;
    color: var(--gray-400);
}

.performer-rating {
    display: flex;
    align-items: center;
    gap: 3px;
    font-weight: 700;
    font-size: 13px;
    color: var(--secondary-orange);
}

.performer-rating i {
    font-size: 11px;
}

/* Recent Evaluations List */
.recent-evaluations-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.evaluation-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 10px;
    background-color: transparent;
    border-radius: 6px;
}

.evaluation-info {
    flex: 1;
}

.evaluation-name {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 12px;
}

.evaluation-details {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 1px;
}

.evaluation-score {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--spacing-xs);
}

.rating-badge {
    padding: 3px 8px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    display: inline-block;
}

.rating-badge.rating-5 {
    background-color: #28A745;
    color: #ffffff !important;
}

.rating-badge.rating-4 {
    background-color: #17A2B8;
    color: #ffffff !important;
}

.rating-badge.rating-3 {
    background-color: #FFC107;
    color: #000000 !important;
}

.rating-badge.rating-2 {
    background-color: #FF9800;
    color: #ffffff !important;
}

.rating-badge.rating-1 {
    background-color: #DC3545;
    color: #ffffff !important;
}

/* Rating badges in tables - smaller size */
table .rating-badge {
    padding: 2px 6px;
    font-size: 10px;
    font-weight: 600;
    min-width: 32px;
    text-align: center;
}

/* Ensure rating badges are visible in all contexts */
table .rating-badge,
.modal-content .rating-badge,
.card .rating-badge {
    color: inherit !important;
}

table .rating-badge.rating-5,
.modal-content .rating-badge.rating-5,
.card .rating-badge.rating-5 {
    color: #ffffff !important;
}

table .rating-badge.rating-4,
.modal-content .rating-badge.rating-4,
.card .rating-badge.rating-4 {
    color: #ffffff !important;
}

table .rating-badge.rating-3,
.modal-content .rating-badge.rating-3,
.card .rating-badge.rating-3 {
    color: #000000 !important;
}

table .rating-badge.rating-2,
.modal-content .rating-badge.rating-2,
.card .rating-badge.rating-2 {
    color: #ffffff !important;
}

table .rating-badge.rating-1,
.modal-content .rating-badge.rating-1,
.card .rating-badge.rating-1 {
    color: #ffffff !important;
}

.bonus-amount {
    font-size: 12px;
    color: var(--success);
    font-weight: 600;
}

/* Smart Notifications */
.smart-notifications {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.smart-notification {
    padding: 8px 10px;
    border-radius: 6px;
    border-right: 3px solid;
    background-color: var(--gray-50);
    font-size: 11px;
}

body[dir="ltr"] .smart-notification {
    border-right: none;
    border-left: 4px solid;
}

.smart-notification.info {
    border-color: var(--info);
}

.smart-notification.warning {
    border-color: var(--warning);
}

.smart-notification.success {
    border-color: var(--success);
}

/* ============================================
   Tables — Clean, rounded containers
   ============================================ */
.table-container {
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    overflow-x: auto;
    overflow-y: visible;
    border: 1px solid var(--border-color);
    max-width: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
}

.table-container::-webkit-scrollbar {
    height: 10px;
}

.table-container::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

.table-container::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.table-container table {
    font-size: 13px;
    min-width: 100%; /* تغيير من 1000px لإزالة الـ scroll */
    width: 100%;
    margin: 0;
    table-layout: fixed; /* ضمان توزيع متساوي للأعمدة */
}

/* تحديد عرض الأعمدة بدقة - استراتيجية جديدة */
#employeesTable {
    table-layout: auto; /* auto بدلاً من fixed */
}

#employeesTable th:nth-child(1), /* Name */
#employeesTable td:nth-child(1) {
    width: 16%;
    min-width: 130px;
    white-space: nowrap;
}

#employeesTable th:nth-child(2), /* Job Title */
#employeesTable td:nth-child(2) {
    width: 17%;
    min-width: 140px;
    font-size: 12px !important; /* زيادة من 11px */
    line-height: 1.4;
}

#employeesTable th:nth-child(3), /* Department */
#employeesTable td:nth-child(3) {
    width: 13%;
    min-width: 100px;
}

#employeesTable th:nth-child(4), /* Manager */
#employeesTable td:nth-child(4) {
    width: 14%;
    min-width: 110px;
    font-size: 12px !important; /* زيادة من 11px */
}

#employeesTable th:nth-child(5), /* Salary */
#employeesTable td:nth-child(5) {
    width: 12%;
    min-width: 95px;
    text-align: center !important;
}

#employeesTable th:nth-child(6), /* Rating */
#employeesTable td:nth-child(6) {
    width: 10%;
    min-width: 80px;
    text-align: center !important;
}

#employeesTable th:nth-child(7), /* Status */
#employeesTable td:nth-child(7) {
    width: 10%;
    min-width: 80px;
    text-align: center !important;
}

#employeesTable th:nth-child(8), /* Actions */
#employeesTable td:nth-child(8) {
    width: 8%;
    min-width: 70px;
    text-align: center !important;
}

.table-header {
    padding: 10px 14px 8px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
    background: transparent;
}

.table-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--heading-color);
}

.table-actions {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.search-box {
    position: relative;
}

.search-box input {
    padding: var(--spacing-sm) var(--spacing-md);
    padding-right: 36px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 12px;
    width: 200px;
}

body[dir="ltr"] .search-box input {
    padding-right: var(--spacing-md);
    padding-left: 40px;
}

.search-box i {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

body[dir="ltr"] .search-box i {
    right: auto;
    left: 12px;
}

.btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: 50px;
    font-weight: 600;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--manzil-orange);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(255, 122, 0, 0.25);
}

.btn-primary:hover {
    background-color: #e66e00;
    box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
}

.btn-secondary {
    background-color: var(--indigo-600);
    color: var(--white);
}

.btn-secondary:hover {
    background-color: var(--indigo-700);
}

.btn-success {
    background-color: var(--success);
    color: var(--white);
}

.btn-warning {
    background-color: #f59e0b;
    color: var(--white);
}

.btn-warning:hover {
    background-color: #d97706;
}

.btn-danger {
    background-color: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background-color: #dc2626;
}

/* Icon Buttons */
/* Icon Buttons for Tables */
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: var(--radius-md);
    border: none;
    background-color: var(--primary-blue);
    color: white;
    cursor: pointer;
    transition: var(--transition);
    font-size: 11px;
    margin: 0;
    width: 100%;
}

.btn-icon:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-icon i {
    margin: 0;
    color: white;
    font-size: 13px;
}

.btn-icon.btn-warning {
    background-color: #FF9F40;
    color: white;
}

.btn-icon.btn-warning i {
    color: white;
}

.btn-icon.btn-warning:hover {
    background-color: #ff8c1a;
}

.btn-icon.btn-danger {
    background-color: #ef4444;
    color: white;
}

.btn-icon.btn-danger i {
    color: white;
}

.btn-icon.btn-danger:hover {
    background-color: #dc2626;
}

/* Primary blue button (for view) */
.btn-icon:not(.btn-warning):not(.btn-danger) {
    background-color: #4F46E5;
}

.btn-icon:not(.btn-warning):not(.btn-danger):hover {
    background-color: #4338CA;
}

/* Action buttons in tables */
td .action-buttons,
table .action-buttons {
    display: flex;
    flex-direction: column;
    gap: 6px;
    justify-content: center;
    align-items: stretch;
}

body[dir="ltr"] td .action-buttons,
body[dir="ltr"] table .action-buttons {
    align-items: stretch;
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed; /* تثبيت عرض الأعمدة */
}

thead {
    background: var(--indigo-50, #EEF2FF);
}

th {
    padding: 10px 8px;
    text-align: right;
    font-weight: 600;
    color: var(--indigo-700, #4338CA);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--indigo-100, #E0E7FF);
    white-space: nowrap;
    vertical-align: middle;
    background: var(--indigo-50, #EEF2FF);
}

body[dir="ltr"] th {
    text-align: left;
}

tbody tr {
    transition: background-color 0.15s ease;
    border-bottom: 1px solid var(--gray-100);
}

tbody tr:hover {
    background: var(--indigo-50, #EEF2FF);
}

body[dir="ltr"] tbody tr:hover {
    transform: none;
}

td {
    padding: 8px 6px;
    text-align: right;
    color: var(--text-color);
    font-size: 12px;
    vertical-align: middle;
    border-bottom: 1px solid var(--gray-100);
    word-wrap: break-word;
    overflow-wrap: break-word;
}

body[dir="ltr"] td {
    text-align: left;
}

/* Employees Table - Better spacing and alignment */
#employeesTable thead th:first-child,
#employeesTable tbody td:first-child {
    padding-right: 12px !important;
    padding-left: 8px !important;
}

body[dir="ltr"] #employeesTable thead th:first-child,
body[dir="ltr"] #employeesTable tbody td:first-child {
    padding-left: 12px !important;
    padding-right: 8px !important;
}

/* تصغير حجم الأيقونات وتحسين Actions Column */
#employeesTable .btn-icon {
    width: auto;
    min-width: 34px; /* زيادة من 32px */
    height: 34px; /* زيادة من 32px */
    padding: 7px 11px; /* زيادة من 6px 10px */
    font-size: 12px; /* زيادة من 11px */
    display: inline-flex;
    gap: 4px;
}

#employeesTable .btn-icon i {
    font-size: 12px; /* زيادة من 11px */
}

/* Actions column تحسينات */
#employeesTable td:nth-child(8) .action-buttons {
    gap: 4px;
}

#employeesTable td:nth-child(8) {
    padding: 8px 6px;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 1400px) {
    .table-container table {
        min-width: 950px;
    }
    
    #employeesTable th,
    #employeesTable td {
        font-size: 12px; /* تقليل قليل */
        padding: 10px 7px;
    }
}

@media (max-width: 1200px) {
    .table-container table {
        min-width: 900px;
    }
    
    #employeesTable th,
    #employeesTable td {
        font-size: 11px;
        padding: 9px 6px;
    }
    
    #employeesTable .btn-icon {
        padding: 5px 9px;
        font-size: 11px;
        min-width: 30px;
        height: 30px;
    }
}

@media (max-width: 768px) {
    .table-container {
        border-radius: 0;
        margin: 0 -16px;
    }
    
    .table-container table {
        min-width: 800px;
    }
    
    #employeesTable th,
    #employeesTable td {
        font-size: 11px;
    }
}

/* Status Badges */
.status-badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 500;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.status-badge.active {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success);
}

.status-badge.inactive {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--danger);
}

.status-badge.pending {
    background-color: rgba(255, 193, 7, 0.1);
    color: var(--warning);
}

/* Rating Badges */
.badge {
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.badge-success {
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
}

.badge-primary {
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

.badge-warning {
    background: #fffbeb;
    color: #b45309;
    border: 1px solid #fde68a;
}

.badge-danger {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}

.badge-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

/* Employee Cell */
.employee-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ✅ v10.11: Fix text alignment based on language direction */
.employee-cell .employee-info {
    text-align: left; /* Default for LTR (English) */
}

body.rtl .employee-cell .employee-info,
[dir="rtl"] .employee-cell .employee-info {
    text-align: right; /* RTL for Arabic */
}

.employee-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--primary-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    flex-shrink: 0;
}

.employee-name {
    font-weight: 600;
    color: var(--heading-color);
    font-size: 11px;
}

.employee-title {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
}

/* ============================================
   Forms & Modals
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    display: none;
}

.modal-overlay.active {
    display: flex;
}

/* Modal Overlay */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--white);
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-large .modal-content {
    max-width: 680px;
}

.modal-header {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 14px;
    margin: 0;
}

.modal-close {
    background: transparent;
    color: var(--gray-500);
    font-size: 16px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
}

.modal-close:hover {
    background-color: var(--gray-100);
}

.modal-body {
    padding: 14px 16px;
}

.modal-footer {
    padding: 10px 16px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: var(--spacing-md);
}

/* Results Count Animation */
#resultsCount {
    transition: transform 0.2s ease-in-out;
}

#filtersSummary {
    transition: opacity 0.3s ease;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 3px;
    font-weight: 500;
    color: var(--text-secondary);
    font-size: 11px;
}

.form-control {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-color);
    background-color: var(--white);
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    background-color: #fff;
}

.form-control:hover {
    border-color: var(--indigo-300, #A5B4FC);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Rating Selector */
.rating-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: var(--spacing-md);
}

.rating-option {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    text-align: center;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.rating-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.rating-option:hover {
    border-color: var(--primary-blue);
    background-color: rgba(79, 70, 229, 0.05);
}

.rating-option input[type="radio"]:checked ~ .rating-label,
.rating-option input[type="radio"]:checked ~ .rating-score,
.rating-option.selected .rating-label,
.rating-option.selected .rating-score {
    color: var(--primary-blue);
}

.rating-option input[type="radio"]:checked,
.rating-option.selected {
    border-color: var(--primary-blue);
    background-color: rgba(79, 70, 229, 0.1);
}

.rating-option .rating-label {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-color);
    display: block;
}

.rating-option .rating-score {
    font-size: 15px;
    font-weight: 700;
    color: var(--gray-500);
    display: block;
}

.rating-option:hover .rating-label,
.rating-option:hover .rating-score {
    color: var(--primary-blue);
}

.rating-option.selected .rating-label,
.rating-option.selected .rating-score,
.rating-option input[type="radio"]:checked ~ .rating-label,
.rating-option input[type="radio"]:checked ~ .rating-score {
    color: var(--primary-blue);
}

.rating-stars {
    font-size: 14px;
    margin-bottom: 2px;
}

.rating-title {
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 2px;
    color: var(--heading-color);
}

.rating-bonus {
    font-size: 12px;
    color: var(--primary-blue);
    font-weight: 600;
}

/* Bonus Preview */
.bonus-preview {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-lg);
    background-color: rgba(16, 185, 129, 0.1);
    border: 2px solid #10b981;
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    color: #10b981;
    font-weight: 600;
}

.bonus-preview i {
    font-size: 18px;
}

/* Department Questions */
.department-questions {
    background-color: var(--gray-50);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
}

.questions-header h4 {
    margin: 0 0 var(--spacing-md) 0;
    color: var(--heading-color);
    font-size: 14px;
}

.question-item {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: var(--spacing-sm) 0;
    color: var(--text-color);
}

.question-item i {
    color: var(--primary-blue);
    margin-top: 2px;
}

/* Department Questions Section - New System */
.department-questions-section {
    background: var(--gray-50);
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--border-color);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-xl);
}

.section-header h4 {
    color: var(--heading-color);
    font-size: 16px;
    margin-bottom: var(--spacing-xs);
    font-weight: 600;
}

.section-description {
    color: var(--gray-600);
    font-size: 14px;
}

.questions-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Question Card */
.question-card {
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
    box-shadow: none;
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.question-card:hover {
    border-color: var(--gray-300);
}

.question-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 6px;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    flex-wrap: wrap;
}

.old-rating-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    background: #f59e0b;
    color: white;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 600;
    margin-right: auto;
    margin-top: 2px;
    box-shadow: none;
}

.old-rating-badge i {
    font-size: 9px;
}

body[dir="ltr"] .old-rating-badge {
    margin-right: 0;
    margin-left: auto;
}

.question-number {
    background: var(--primary-blue);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    flex-shrink: 0;
}

/* Rating Options Grid */
.rating-options-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
}

.rating-option-btn {
    position: relative;
}

.rating-option-btn input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.rating-option-btn label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 4px;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    min-height: 60px;
}

.rating-option-btn:hover label {
    border-color: var(--primary-blue);
    background: rgba(61, 83, 219, 0.05);
    transform: none;
}

.rating-option-btn input[type="radio"]:checked + label {
    border-color: var(--primary-blue);
    background: rgba(61, 83, 219, 0.1);
    box-shadow: none;
}

.rating-emoji {
    font-size: 18px;
    margin-bottom: 1px;
}

.rating-text {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-color);
}

.rating-score {
    font-size: 14px;
    color: var(--primary-blue);
    font-weight: 700;
    margin-top: 2px;
}

/* Final Rating Section */
.final-rating-section {
    margin-bottom: var(--spacing-xl);
    animation: slideIn 0.5s ease-out;
}

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

.rating-summary-card {
    background: var(--primary-blue);
    color: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    display: flex;
    align-items: center;
    gap: var(--spacing-xl);
    box-shadow: var(--shadow-md);
}

.rating-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.rating-details {
    flex: 1;
}

.rating-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 4px;
    font-weight: 500;
}

.rating-value-display {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 6px;
    line-height: 1;
}

.rating-out-of {
    font-size: 15px;
    opacity: 0.8;
    font-weight: 400;
}

.rating-stars-display {
    font-size: 18px;
    margin-bottom: 8px;
}

.rating-level {
    font-size: 14px;
    font-weight: 600;
    padding: 5px 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-full);
    display: inline-block;
}

/* Responsive Design for Questions */
@media (max-width: 1024px) {
    .rating-options-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }
    
    .rating-option-btn label {
        padding: 8px 4px;
        min-height: 80px;
    }
    
    .rating-emoji {
        font-size: 20px;
    }
    
    .rating-text {
        font-size: 11px;
    }
}

@media (max-width: 640px) {
    .rating-options-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 4px;
    }
    
    .rating-option-btn label {
        padding: 6px 2px;
        min-height: 70px;
    }
    
    .rating-emoji {
        font-size: 18px;
    }
    
    .rating-text {
        font-size: 9px;
    }
    
    .rating-score {
        font-size: 12px;
    }
    
    .rating-summary-card {
        flex-direction: column;
        text-align: center;
    }
    
    .rating-value-display {
        font-size: 28px;
    }
}

/* Alert Styles */
.alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.alert-info {
    background-color: rgba(79, 70, 229, 0.1);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

.alert-warning {
    background-color: rgba(245, 156, 60, 0.1);
    border: 1px solid var(--secondary-orange);
    color: var(--secondary-orange);
}

.alert-success {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid #10b981;
    color: #10b981;
}

/* Evaluation Details */
.evaluation-details,
.meeting-details,
.all-hands-details {
    font-size: 12px;
}

.detail-section {
    margin-bottom: var(--spacing-lg);
}

.detail-section h4 {
    margin: 0 0 8px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--heading-color);
    font-size: 13px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.detail-item {
    padding: 4px 0;
}

.detail-item strong {
    display: block;
    color: var(--gray-600);
    font-size: 10px;
    margin-bottom: 2px;
}

.comment-text {
    background-color: var(--gray-50);
    padding: 10px;
    border-radius: 6px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-size: 12px;
}

.highlight-amount {
    color: var(--primary-blue);
    font-size: 15px;
    font-weight: 700;
}

/* ============================================
   Meetings & Timeline
   ============================================ */

/* Meetings Grid */
.meetings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

.meeting-card {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 12px;
    transition: var(--transition);
}

.meeting-card:hover {
    border-color: var(--primary-blue);
}

.meeting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.meeting-employee {
    display: flex;
    gap: 6px;
    align-items: center;
}

.meeting-body {
    margin-bottom: 8px;
}

.meeting-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    font-size: 12px;
    color: var(--text-color);
}

.meeting-info i {
    color: var(--gray-500);
    width: 14px;
    font-size: 11px;
}

.meeting-link {
    color: var(--primary-blue);
    text-decoration: none;
}

.meeting-link:hover {
    text-decoration: underline;
}

.meeting-footer {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

/* Timeline */
.timeline {
    position: relative;
    padding: var(--spacing-lg) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--gray-300);
}

body[dir="ltr"] .timeline::before {
    left: 20px;
    right: auto;
}

.timeline-item {
    position: relative;
    padding-right: 60px;
    padding-bottom: var(--spacing-xl);
}

body[dir="ltr"] .timeline-item {
    padding-left: 60px;
    padding-right: 0;
}

.timeline-marker {
    position: absolute;
    right: 8px;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: var(--primary-blue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    z-index: 1;
}

body[dir="ltr"] .timeline-marker {
    left: 0;
    right: auto;
}

.timeline-content {
    background-color: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.timeline-header h4 {
    margin: 0;
    color: var(--heading-color);
}

.timeline-date {
    color: var(--gray-600);
    font-size: 14px;
}

.timeline-body {
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.timeline-footer {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.rockstar-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: #f59e0b;
    color: var(--white);
    border-radius: 6px;
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 8px;
}

.rockstar-badge i {
    font-size: 12px;
}

/* Next Meeting */
.next-meeting {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
}

.next-meeting-icon {
    font-size: 24px;
    color: var(--primary-blue);
}

.next-meeting-info {
    flex: 1;
}

.next-meeting-info h3 {
    margin: 0 0 var(--spacing-sm) 0;
}

.next-meeting-date {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-color);
    margin-bottom: var(--spacing-xs);
}

.next-meeting-countdown {
    color: var(--secondary-orange);
    font-size: 14px;
}

/* Page Description */
.page-description {
    display: flex;
    gap: var(--spacing-md);
    padding: var(--spacing-md) var(--spacing-lg);
    background-color: rgba(79, 70, 229, 0.04);
    border-right: 3px solid var(--primary-blue);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    font-size: 13px;
}

body[dir="ltr"] .page-description {
    border-right: none;
    border-left: 3px solid var(--primary-blue);
}

.page-description i {
    color: var(--primary-blue);
    font-size: 18px;
}

.page-description h4 {
    margin: 0 0 var(--spacing-xs) 0;
    color: var(--heading-color);
    font-size: 13px;
}

.page-description p {
    margin: 0;
    line-height: 1.5;
    font-size: 12px;
}

/* Highlight Card */
.highlight-card {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.1) 0%, rgba(245, 156, 60, 0.1) 100%);
    border: 2px solid var(--primary-blue);
}

/* Period Selector */
.period-selector {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

/* CEO Welcome */
.ceo-welcome {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--primary-blue);
    color: var(--white);
    border-radius: 10px;
    margin-bottom: 12px;
}

.welcome-content h2 {
    margin: 0 0 2px 0;
    font-size: 15px;
}

.welcome-content p {
    margin: 0;
    opacity: 0.85;
    font-size: 11px;
}

/* Insights Grid */
.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}

.insight-card {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 11px;
    cursor: pointer;
    transition: var(--transition);
}

.insight-card:hover {
    transform: none;
    opacity: 0.85;
}

.insight-card.success {
    background-color: rgba(16, 185, 129, 0.08);
    border: 1px solid #10b981;
    color: #10b981;
}

.insight-card.warning {
    background-color: rgba(245, 156, 60, 0.08);
    border: 1px solid var(--secondary-orange);
    color: var(--secondary-orange);
}

.insight-card.info {
    background-color: rgba(79, 70, 229, 0.08);
    border: 1px solid var(--primary-blue);
    color: var(--primary-blue);
}

.insight-card i {
    font-size: 14px;
}

/* Insight Detail Modal - Additional Styles */
.insight-detail-header {
    display: flex;
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background-color: rgba(79, 70, 229, 0.05);
    border-radius: var(--radius-md);
}

.insight-detail-header p {
    margin: 0;
    font-size: 13px;
    color: var(--text-color);
}

.insight-detail-header strong {
    color: var(--primary-blue);
    font-size: 14px;
}

.insight-detail-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: var(--spacing-md);
}

.insight-detail-table thead {
    background-color: rgba(79, 70, 229, 0.05);
}

.insight-detail-table th {
    padding: var(--spacing-md);
    text-align: right;
    font-weight: 600;
    color: var(--text-color);
    border-bottom: 2px solid var(--border-color);
}

[dir="ltr"] .insight-detail-table th {
    text-align: left;
}

.insight-detail-table td {
    padding: var(--spacing-md);
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

[dir="ltr"] .insight-detail-table td {
    text-align: left;
}

.insight-detail-table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.03);
}

.modal-body .alert {
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.modal-body .alert i {
    font-size: 16px;
}

.modal-body .alert.alert-warning {
    background-color: rgba(245, 156, 60, 0.1);
    border: 1px solid var(--secondary-orange);
    color: var(--secondary-orange);
}

.modal-body .badge {
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 13px;
    display: inline-block;
}

.modal-body .badge-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.modal-body .badge-secondary {
    background-color: rgba(107, 114, 128, 0.1);
    color: #6b7280;
}

/* Performance Table */
.performance-table .rank-badge {
    font-size: 16px;
    display: inline-block;
    min-width: 32px;
}

.performance-table .rank-badge.gold {
    color: #ffd700;
}

.performance-table .rank-badge.silver {
    color: #c0c0c0;
}

.performance-table .rank-badge.bronze {
    color: #cd7f32;
}

.rating-badge {
    padding: 3px 8px;
    background-color: rgba(79, 70, 229, 0.08);
    color: var(--primary-blue);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 12px;
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 24px;
    background-color: var(--gray-200);
    border-radius: var(--radius-full);
    overflow: hidden;
}

.progress-bar-container.large {
    height: 32px;
}

.progress-bar-fill {
    height: 100%;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
    position: relative;
}

.progress-bar-fill.success {
    background-color: #10b981;
}

.progress-bar-fill.warning {
    background-color: var(--secondary-orange);
}

.progress-bar-fill.danger {
    background-color: #ef4444;
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-weight: 600;
    font-size: 12px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

/* Charts Row */
.charts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

/* Performers Row */
.performers-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.performers-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.performer-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md);
    background-color: var(--gray-50);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.performer-item:hover {
    background-color: var(--gray-100);
}

.performer-item.warning {
    background-color: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.performer-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.performer-rating {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.rating-stars {
    margin-bottom: 2px;
}

.rating-number {
    font-size: 12px;
    color: var(--gray-600);
}

/* Progress Item */
.progress-item {
    margin-bottom: var(--spacing-lg);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-sm);
}

.progress-label {
    font-weight: 600;
    color: var(--heading-color);
}

.progress-value {
    font-size: 14px;
    color: var(--gray-600);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 1200px) {
    .dashboard-card.chart-card {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 280px;
    }
    
    /* إخفاء الشريط الجانبي بالكامل على الجوال */
    .sidebar {
        width: 85%;
        max-width: 320px;
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for mobile browsers */
        transform: translateX(100%);
        z-index: 9999;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
    }
    
    body[dir="ltr"] .sidebar {
        right: auto;
        left: 0;
        transform: translateX(-100%);
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.15);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    body[dir="ltr"] .sidebar.active {
        transform: translateX(0);
    }
    
    /* Overlay عند فتح القائمة */
    .sidebar-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9998;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    
    /* زر إغلاق القائمة على الموبايل */
    .mobile-close-btn {
        display: flex !important;
        position: absolute;
        top: 15px;
        left: 15px;
        width: 40px;
        height: 40px;
        background: var(--gray-100);
        border: none;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        z-index: 10;
        font-size: 18px;
        color: var(--gray-600);
        transition: all 0.2s ease;
    }
    
    body[dir="ltr"] .mobile-close-btn {
        left: auto;
        right: 15px;
    }
    
    .mobile-close-btn:hover,
    .mobile-close-btn:active {
        background: var(--danger);
        color: white;
    }
    
    /* Main content يأخذ كامل العرض */
    .main-content {
        margin-right: 0 !important;
        margin-left: 0 !important;
        width: 100%;
        max-width: 100vw;
    }
    
    /* زر فتح القائمة */
    .mobile-menu-toggle {
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        min-width: 44px;
        background: var(--gray-100);
        border-radius: var(--radius-md);
        font-size: 20px;
        color: var(--gray-700);
        cursor: pointer;
        border: none;
        -webkit-tap-highlight-color: transparent;
    }
    
    .mobile-menu-toggle:active {
        background: var(--gray-200);
        transform: scale(0.95);
    }
    
    .sidebar-toggle {
        display: none !important;
    }
    
    /* Top Bar تحسينات */
    .top-bar {
        padding: 0 12px !important;
        height: 56px;
        gap: 8px;
    }
    
    .top-bar-left {
        flex: 1;
        min-width: 0;
        gap: 8px;
    }
    
    .top-bar h1,
    .page-title {
        font-size: 16px !important;
        font-weight: 600 !important;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .page-title {
        display: flex;
        align-items: center;
        gap: 6px;
        min-width: 0;
    }
    
    .page-title i {
        font-size: 16px !important;
        flex-shrink: 0;
    }
    
    .page-title span {
        font-size: 14px !important;
        font-weight: 600 !important;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    .top-bar-right {
        gap: 4px;
        flex-shrink: 0;
    }
    
    .top-bar-right .icon-btn,
    .top-bar-right .theme-toggle,
    .top-bar-right .notification-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 16px;
        padding: 0;
    }
    
    /* إخفاء بعض العناصر على الجوال */
    .user-menu {
        display: none !important;
    }
    
    .user-menu .user-name,
    .user-menu .user-details {
        display: none !important;
    }
    
    /* Grids - Mobile Optimized */
    .kpi-grid,
    .stats-grid {
        display: none !important; /* إخفاء البطاقات الإحصائية على الموبايل لتوفير المساحة */
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr 1fr;
    }
    
    /* Quick Actions on Dashboard - horizontal scroll */
    .quick-actions .action-buttons {
        display: flex !important;
        grid-template-columns: none !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        padding-bottom: 4px;
        scrollbar-width: none;
    }
    
    .quick-actions .action-buttons::-webkit-scrollbar {
        display: none;
    }

    .quick-actions .action-btn {
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 6px;
        padding: 10px 14px;
        border-radius: 12px;
        font-size: 11px;
        white-space: nowrap;
        min-width: 70px;
        border: 1.5px solid var(--gray-200);
    }

    .quick-actions .action-btn i {
        font-size: 18px;
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(79, 70, 229, 0.08);
        border-radius: 8px;
    }

    .quick-actions .action-btn span {
        font-size: 10px;
        line-height: 1.2;
        font-weight: 600;
    }
    
    .table-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    /* ============================================
       Filter Groups Mobile - تحسين الفلاتر
       ============================================ */
    .card-header {
        flex-direction: column !important;
        gap: 12px !important;
        padding: 12px !important;
    }
    
    .filter-group {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }
    
    .filter-group select,
    .filter-select {
        width: 100%;
        padding: 12px 10px;
        font-size: 14px;
        border-radius: 10px;
        background: var(--card-bg, #fff);
        border: 1px solid var(--gray-200);
        color: var(--text-color);
    }
    
    .search-box {
        width: 100% !important;
        order: -1;
        margin-bottom: 8px;
    }
    
    .search-box input {
        width: 100%;
        padding: 14px 44px 14px 14px;
        font-size: 15px;
        border-radius: 12px;
        border: 1px solid var(--gray-200);
    }
    
    body[dir="ltr"] .search-box input {
        padding: 14px 14px 14px 44px;
    }
    
    .search-box i {
        font-size: 18px;
    }
    
    .header-actions-group {
        flex-direction: column !important;
        width: 100%;
        gap: 10px !important;
        margin-top: 10px;
    }
    
    .header-actions-group .btn {
        width: 100%;
        justify-content: center;
        padding: 14px 20px;
        font-size: 15px;
        border-radius: 12px;
    }
    
    /* زر تقييم جديد مميز */
    .header-actions-group .btn-primary {
        background: linear-gradient(135deg, var(--primary-blue), #4F46E5) !important;
        box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    }
    
    /* تحسين أزرار الإجراءات على الموبايل */
    .table-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    
    .table-actions .search-box {
        order: 1;
        width: 100%;
    }
    
    .table-actions .btn {
        order: 2;
        width: 100%;
        justify-content: center;
    }
    
    /* تحسين عنوان الجدول */
    .table-title {
        font-size: 16px !important;
        text-align: center;
        width: 100%;
    }
    
    /* تحسين عدد الموظفين/التقييمات */
    .employees-count,
    .meetings-count,
    .count-badge,
    #resultsCountSection {
        text-align: center;
        font-size: 12px !important;
        padding: 10px 12px !important;
        border-radius: 8px;
        margin-bottom: 12px;
        flex-direction: column !important;
        gap: 6px !important;
    }
    
    #resultsCountSection span {
        font-size: 11px !important;
    }
    
    #resultsCountSection strong {
        font-size: 18px !important;
    }
    
    .search-box {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
        padding: 12px 40px 12px 12px;
        border-radius: 8px;
    }
    
    body[dir="ltr"] .search-box input {
        padding: 12px 12px 12px 40px;
    }
    
    /* Notifications dropdown - mobile override */
    .notification-dropdown {
        width: calc(100vw - 20px) !important;
        max-width: 360px !important;
        left: 50% !important;
        right: auto !important;
        transform: translateX(-50%);
        top: 60px !important;
    }
    
    body[dir="ltr"] .notification-dropdown {
        left: 50% !important;
        right: auto !important;
    }
    
    /* Cards Mobile */
    .card {
        border-radius: 12px;
        margin-bottom: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    
    .card-header {
        padding: 14px;
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .card-header h3 {
        font-size: 15px;
    }
    
    .card-body {
        padding: 14px;
    }
    
    /* Stat Cards Mobile - تحسين v1.1 */
    .stat-card {
        padding: 14px;
        border-radius: 12px;
        display: flex;
        align-items: center;
        gap: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 44px;
        font-size: 20px;
    }
    
    .stat-value {
        font-size: 18px !important;
    }
    
    .stat-label {
        font-size: 11px;
    }
    
    /* Dashboard Content - Mobile توحيد */
    .dashboard-content,
    .content-wrapper,
    .settings-container {
        padding: var(--content-padding-mobile, 16px);
        max-width: 100%;
    }
    
    /* Tables Mobile - تحسين v1.1 */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -8px;
        padding: 0 8px;
        border-radius: 8px;
        background: var(--card-bg, #fff);
    }
    
    table {
        min-width: auto;
        width: 100%;
        font-size: 13px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    /* تحسين خلايا الاسم (exclude card-mode tables) */
    table:not(#employeesTable):not(#evaluationsTable):not(#departmentsTable):not(#myEvaluationsTable) td:first-child,
    table:not(#employeesTable):not(#evaluationsTable):not(#departmentsTable):not(#myEvaluationsTable) th:first-child {
        min-width: 100px;
        max-width: 140px;
    }
    
    /* ============================================
       Responsive Table to Cards - Mobile v2.0
       تحويل الجداول إلى بطاقات مدمجة على الموبايل
       ============================================ */
    
    /* إخفاء header الجدول على الموبايل */
    #evaluationsTable thead,
    #employeesTable thead {
        display: none;
    }
    
    /* تحويل tbody إلى flex container */
    #evaluationsTable tbody,
    #employeesTable tbody {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    /* تحويل كل صف إلى بطاقة مدمجة */
    #evaluationsTable tbody tr,
    #employeesTable tbody tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        padding: 10px;
        background: var(--card-bg, #fff);
        border-radius: 12px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
        border: 1px solid var(--gray-200, #e5e7eb);
    }
    
    /* كل الخلايا - مدمجة + override desktop min-width */
    #evaluationsTable tbody td,
    #employeesTable tbody td {
        padding: 5px 8px !important;
        border: none !important;
        display: flex !important;
        flex-direction: column !important;
        font-size: 12px !important;
        background: var(--gray-50, #f9fafb) !important;
        border-radius: 6px !important;
        min-height: 0 !important;
        min-width: 0 !important;
        width: auto !important;
        max-width: 100% !important;
        text-align: start !important;
        overflow: hidden;
        word-break: break-word;
    }
    
    /* الخلية الأولى (الاسم) - عرض كامل */
    #evaluationsTable tbody td:first-child,
    #employeesTable tbody td:first-child {
        grid-column: 1 / -1;
        flex-direction: row !important;
        align-items: center;
        background: transparent !important;
        padding: 2px 0 6px 0 !important;
        border-bottom: 1px solid var(--gray-100, #f3f4f6) !important;
        margin-bottom: 2px;
        font-size: 13px !important;
    }
    
    /* خلية الإجراءات - عرض كامل */
    #evaluationsTable tbody td:last-child,
    #employeesTable tbody td:last-child {
        grid-column: 1 / -1;
        flex-direction: row !important;
        justify-content: flex-end;
        align-items: center;
        gap: 8px;
        padding: 4px 0 0 0 !important;
        margin-top: 2px;
        border-top: 1px solid var(--gray-100, #f3f4f6) !important;
        background: transparent !important;
    }
    
    /* الأزرار داخل الخلية الأخيرة */
    #evaluationsTable tbody td:last-child .action-buttons,
    #employeesTable tbody td:last-child .action-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px;
    }
    
    #evaluationsTable tbody td:last-child .btn-icon,
    #employeesTable tbody td:last-child .btn-icon,
    #evaluationsTable tbody td:last-child button,
    #employeesTable tbody td:last-child button {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 8px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 14px;
        padding: 0 !important;
    }
    
    /* ===== إخفاء الخلايا المخفية (الراتب) ===== */
    /* When salary is hidden by role permission */
    #employeesTable tbody td.salary-hidden-by-role,
    #employeesTable tbody td.salary-column[style*="display: none"],
    #employeesTable tbody td.salary-column[style*="display:none"] {
        display: none !important;
        padding: 0 !important;
        margin: 0 !important;
        height: 0 !important;
        overflow: hidden !important;
        width: 0 !important;
        min-width: 0 !important;
        border: none !important;
    }
    
    /* Hide any truly empty td */
    #evaluationsTable tbody td:empty,
    #employeesTable tbody td:empty {
        display: none !important;
    }
    
    /* إضافة labels للخلايا */
    #evaluationsTable tbody td:nth-child(2)::before {
        content: 'القسم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    body[dir="ltr"] #evaluationsTable tbody td:nth-child(2)::before {
        content: 'Department';
    }
    
    #evaluationsTable tbody td:nth-child(3)::before {
        content: 'المقيّم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    body[dir="ltr"] #evaluationsTable tbody td:nth-child(3)::before {
        content: 'Evaluator';
    }
    
    #evaluationsTable tbody td:nth-child(4)::before {
        content: 'التقييم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    body[dir="ltr"] #evaluationsTable tbody td:nth-child(4)::before {
        content: 'Rating';
    }
    
    #evaluationsTable tbody td:nth-child(5)::before {
        content: 'المكافأة';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    body[dir="ltr"] #evaluationsTable tbody td:nth-child(5)::before {
        content: 'Bonus';
    }
    
    #evaluationsTable tbody td:nth-child(6)::before {
        content: 'الفترة';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    body[dir="ltr"] #evaluationsTable tbody td:nth-child(6)::before {
        content: 'Period';
    }
    
    #evaluationsTable tbody td:nth-child(7)::before {
        content: 'التاريخ';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    
    body[dir="ltr"] #evaluationsTable tbody td:nth-child(7)::before {
        content: 'Date';
    }
    
    /* تحسين employee-cell */
    .employee-cell {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
    }
    
    .employee-avatar {
        width: 32px;
        height: 32px;
        min-width: 32px;
        border-radius: 50%;
        background: var(--primary-blue);
        color: white;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
    }
    
    .employee-info {
        flex: 1;
        min-width: 0;
    }
    
    .employee-name {
        font-weight: 600;
        font-size: 13px;
        color: var(--heading-color);
    }
    
    .employee-title {
        font-size: 11px;
        color: var(--gray-500);
    }
    
    /* ============================================
       📱 Mobile Card Layout - My Personal Evaluations Table
       تحويل جدول تقييماتي الشخصية إلى بطاقات على الموبايل
       ============================================ */
    
    /* إخفاء header الجدول على الموبايل */
    #myEvaluationsTable thead {
        display: none;
    }
    
    /* تحويل tbody إلى flex container */
    #myEvaluationsTable tbody {
        display: flex;
        flex-direction: column;
        gap: 16px;
    }
    
    /* تحويل كل صف إلى بطاقة */
    #myEvaluationsTable tbody tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
        padding: 16px;
        background: var(--card-bg, #fff);
        border-radius: 16px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        border: 1px solid var(--gray-200, #e5e7eb);
    }
    
    /* كل الخلايا */
    #myEvaluationsTable tbody td {
        padding: 10px;
        border: none;
        display: flex;
        flex-direction: column;
        font-size: 13px;
        background: var(--gray-50, #f9fafb);
        border-radius: 8px;
    }
    
    /* الخلية الأولى (المُقيّم) - عرض كامل */
    #myEvaluationsTable tbody td:first-child {
        grid-column: 1 / -1;
        flex-direction: row;
        align-items: center;
        background: transparent;
        padding: 0 0 12px 0;
        border-bottom: 1px solid var(--gray-200, #e5e7eb);
        margin-bottom: 4px;
    }
    
    /* خلية الإجراءات - عرض كامل */
    #myEvaluationsTable tbody td:last-child {
        grid-column: 1 / -1;
        flex-direction: row !important;
        justify-content: center;
        align-items: center;
        gap: 12px;
        padding: 12px 0 0 0;
        margin-top: 4px;
        border-top: 1px solid var(--gray-200, #e5e7eb);
        background: transparent;
    }
    
    /* إضافة labels للخلايا */
    #myEvaluationsTable tbody td:nth-child(1)::before {
        content: 'المُقيّم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 4px;
        margin-left: 8px;
        margin-right: 8px;
    }
    
    body[dir="ltr"] #myEvaluationsTable tbody td:nth-child(1)::before {
        content: 'Evaluator';
    }
    
    #myEvaluationsTable tbody td:nth-child(2)::before {
        content: 'التقييم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    body[dir="ltr"] #myEvaluationsTable tbody td:nth-child(2)::before {
        content: 'Rating';
    }
    
    #myEvaluationsTable tbody td:nth-child(3)::before {
        content: 'المكافأة';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    body[dir="ltr"] #myEvaluationsTable tbody td:nth-child(3)::before {
        content: 'Bonus';
    }
    
    #myEvaluationsTable tbody td:nth-child(4)::before {
        content: 'الربع';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    body[dir="ltr"] #myEvaluationsTable tbody td:nth-child(4)::before {
        content: 'Quarter';
    }
    
    #myEvaluationsTable tbody td:nth-child(5)::before {
        content: 'التاريخ';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 4px;
    }
    
    body[dir="ltr"] #myEvaluationsTable tbody td:nth-child(5)::before {
        content: 'Date';
    }
    
    /* الأزرار داخل الخلية الأخيرة */
    #myEvaluationsTable tbody td:last-child .btn-icon,
    #myEvaluationsTable tbody td:last-child button {
        width: 44px !important;
        height: 44px !important;
        min-width: 44px !important;
        border-radius: 10px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        font-size: 16px;
    }
    
    /* Dark Mode for My Personal Evaluations Cards */
    body.dark-mode #myEvaluationsTable tbody tr {
        background: var(--card-bg, #1e293b);
        border-color: var(--gray-700, #374151);
    }
    
    body.dark-mode #myEvaluationsTable tbody td {
        background: rgba(255,255,255,0.05);
    }
    
    body.dark-mode #myEvaluationsTable tbody td:first-child,
    body.dark-mode #myEvaluationsTable tbody td:last-child {
        background: transparent;
    }

    /* ============================================
       📱 Mobile Card Layout - Employee Personal View
       عرض جدول التقييمات الشخصية للموظف (5 أعمدة)
       عندما يكون الجدول بوضع employee-personal-view
       ============================================ */
    
    /* Override labels for employee personal view (5 columns: Quarter, Evaluator, Rating, Bonus, Details) */
    #evaluationsTable.employee-personal-view tbody td:nth-child(1)::before {
        content: 'الربع' !important;
    }
    body[dir="ltr"] #evaluationsTable.employee-personal-view tbody td:nth-child(1)::before {
        content: 'Quarter' !important;
    }
    
    #evaluationsTable.employee-personal-view tbody td:nth-child(2)::before {
        content: 'المُقيّم' !important;
    }
    body[dir="ltr"] #evaluationsTable.employee-personal-view tbody td:nth-child(2)::before {
        content: 'Evaluator' !important;
    }
    
    #evaluationsTable.employee-personal-view tbody td:nth-child(3)::before {
        content: 'التقييم' !important;
    }
    body[dir="ltr"] #evaluationsTable.employee-personal-view tbody td:nth-child(3)::before {
        content: 'Rating' !important;
    }
    
    #evaluationsTable.employee-personal-view tbody td:nth-child(4)::before {
        content: 'المكافأة' !important;
    }
    body[dir="ltr"] #evaluationsTable.employee-personal-view tbody td:nth-child(4)::before {
        content: 'Bonus' !important;
    }

    /* تحسين أزرار الإجراءات - ظاهرة دائماً */
    .action-buttons {
        display: flex !important;
        flex-direction: row !important;
        gap: 6px;
        justify-content: center;
    }
    
    .action-buttons .btn-icon,
    .btn-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 14px !important;
        border: none !important;
        cursor: pointer;
        padding: 0 !important;
    }

    /* Table action buttons - compact */
    #employeesTable td button[onclick],
    #evaluationsTable td button[onclick] {
        width: 34px !important;
        height: 34px !important;
        min-width: 34px !important;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 13px !important;
        border: none !important;
        cursor: pointer;
        padding: 0 !important;
        margin: 0 2px !important;
    }
    
    .btn-icon:active,
    td button[onclick]:active {
        transform: scale(0.95);
    }
    
    /* زر العرض - أزرق */
    .btn-icon[onclick*="view"],
    button[onclick*="view"] {
        background: var(--primary-blue, #4F46E5) !important;
    }
    
    /* زر التعديل - برتقالي */
    .btn-icon.btn-warning,
    .btn-icon[onclick*="edit"],
    button[onclick*="edit"] {
        background: #F59E0B !important;
        box-shadow: 0 2px 6px rgba(245,158,11,0.3);
    }
    
    /* زر الحذف - أحمر */
    .btn-icon.btn-danger,
    .btn-icon[onclick*="delete"],
    button[onclick*="delete"] {
        background: #EF4444 !important;
        box-shadow: 0 2px 6px rgba(239,68,68,0.3);
    }
    
    /* Forms Mobile */
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-input,
    .form-select,
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="number"],
    input[type="date"],
    textarea,
    select {
        padding: 12px;
        font-size: 16px !important; /* Prevents zoom on iOS */
        border-radius: 8px;
    }
    
    /* Buttons Mobile */
    .btn {
        padding: 12px 16px;
        font-size: 14px;
        width: 100%;
        justify-content: center;
        border-radius: 8px;
    }
    
    .btn-primary {
        background: var(--primary-blue);
        color: white;
    }
    
    /* زر إضافة موظف/تقييم */
    .btn-add,
    .add-btn,
    [onclick*="showAddModal"],
    [onclick*="openAddModal"] {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 12px 16px;
    }
    
    .btn-group {
        flex-direction: column;
        gap: 8px;
    }
    
    /* Modal Mobile */
    .modal-content {
        width: 95%;
        max-width: 100%;
        margin: 10px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }

    /* ============================================
       📱 Quick Actions - see line ~3447 for implementation
       ============================================ */

    /* ============================================
       📱 Departments Performance Table → Cards
       تحويل جدول أداء الأقسام إلى بطاقات
       ============================================ */
    #departmentsTable thead {
        display: none;
    }

    #departmentsTable tbody {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    #departmentsTable tbody tr {
        display: grid !important;
        grid-template-columns: 1fr 1fr;
        gap: 6px;
        padding: 12px;
        background: var(--card-bg, #fff);
        border-radius: 14px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border: 1px solid var(--gray-200, #e5e7eb);
    }

    #departmentsTable tbody td {
        padding: 6px 8px;
        border: none;
        display: flex;
        flex-direction: column;
        font-size: 13px;
        background: var(--gray-50, #f9fafb);
        border-radius: 6px;
    }

    /* الخلية الأولى (الترتيب) */
    #departmentsTable tbody td:first-child {
        grid-column: auto;
        grid-row: 1;
        background: transparent;
        padding: 0;
        justify-content: center;
        align-items: center;
        max-width: 50px;
    }

    /* الخلية الثانية (اسم القسم) */
    #departmentsTable tbody td:nth-child(2) {
        grid-column: auto;
        grid-row: 1;
        background: transparent;
        padding: 4px 0;
        font-weight: 700;
        font-size: 14px;
        display: flex;
        align-items: center;
    }

    /* Labels */
    #departmentsTable tbody td:nth-child(3)::before {
        content: 'الموظفين';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #departmentsTable tbody td:nth-child(3)::before {
        content: 'Employees';
    }

    #departmentsTable tbody td:nth-child(4)::before {
        content: 'التقييمات';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #departmentsTable tbody td:nth-child(4)::before {
        content: 'Evaluations';
    }

    #departmentsTable tbody td:nth-child(5)::before {
        content: 'متوسط التقييم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #departmentsTable tbody td:nth-child(5)::before {
        content: 'Avg Rating';
    }

    #departmentsTable tbody td:nth-child(6)::before {
        content: 'نسبة الإكمال';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #departmentsTable tbody td:nth-child(6)::before {
        content: 'Completion';
    }

    #departmentsTable tbody td:nth-child(7)::before {
        content: 'المكافآت';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #departmentsTable tbody td:nth-child(7)::before {
        content: 'Bonuses';
    }

    /* خلية الحالة - عرض كامل */
    #departmentsTable tbody td:last-child {
        grid-column: 1 / -1;
        flex-direction: row;
        justify-content: center;
        background: transparent;
        padding: 8px 0 0;
    }

    #departmentsTable tbody td:last-child::before {
        display: none;
    }

    /* Dark mode for departments table cards */
    body.dark-mode #departmentsTable tbody tr {
        background: var(--card-bg, #1e293b);
        border-color: var(--gray-700, #374151);
    }

    body.dark-mode #departmentsTable tbody td {
        background: rgba(255,255,255,0.05);
    }

    body.dark-mode #departmentsTable tbody td:first-child,
    body.dark-mode #departmentsTable tbody td:nth-child(2),
    body.dark-mode #departmentsTable tbody td:last-child {
        background: transparent;
    }

    /* ============================================
       📱 Employees Table Cards - Labels
       إضافة عناوين للخلايا في بطاقات الموظفين
       Columns: 1-Name, 2-JobTitle, 3-Department, 4-Manager, 5-Salary, 6-Rating, 7-Status, 8-Role, 9-Actions
       ============================================ */

    #employeesTable tbody td:nth-child(2)::before {
        content: 'المسمى الوظيفي';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(2)::before {
        content: 'Job Title';
    }

    #employeesTable tbody td:nth-child(3)::before {
        content: 'القسم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(3)::before {
        content: 'Department';
    }

    #employeesTable tbody td:nth-child(4)::before {
        content: 'المدير';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(4)::before {
        content: 'Manager';
    }

    #employeesTable tbody td:nth-child(5)::before {
        content: 'الراتب';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(5)::before {
        content: 'Salary';
    }

    #employeesTable tbody td:nth-child(6)::before {
        content: 'آخر تقييم';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(6)::before {
        content: 'Last Rating';
    }

    #employeesTable tbody td:nth-child(7)::before {
        content: 'الحالة';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(7)::before {
        content: 'Status';
    }

    #employeesTable tbody td:nth-child(8)::before {
        content: 'الدور';
        font-size: 10px;
        color: var(--gray-500);
        font-weight: 600;
        margin-bottom: 2px;
    }
    body[dir="ltr"] #employeesTable tbody td:nth-child(8)::before {
        content: 'Role';
    }

    /* ============================================
       📱 Charts Row & Performers - Mobile Stack
       ============================================ */
    .charts-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    .performers-row {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }

    /* ============================================
       📱 Name & Avatar Compact
       ============================================ */

    .employee-name {
        font-size: 13px !important;
    }

    .employee-title {
        font-size: 11px !important;
    }

    .employee-avatar {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 18px; }
    h2 { font-size: 16px; }
    h3 { font-size: 14px; }
    
    .dashboard-content,
    .content-wrapper,
    .settings-container {
        padding: 8px;
    }
    
    .top-bar {
        padding: 0 8px !important;
        height: 52px;
    }
    
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        min-width: 40px;
        font-size: 18px;
    }
    
    .page-title {
        font-size: 14px !important;
    }
    
    .page-title i {
        font-size: 14px !important;
        display: none; /* إخفاء الأيقونة على الشاشات الصغيرة جداً */
    }
    
    .page-title span {
        font-size: 14px !important;
    }
    
    .top-bar-right .icon-btn,
    .top-bar-right .theme-toggle,
    .top-bar-right .notification-btn {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 14px;
    }
    
    /* إخفاء بعض الأزرار على الشاشات الصغيرة جداً */
    .top-bar-right .theme-toggle,
    #themeToggle {
        display: none !important;
    }
    
    .kpi-card,
    .stat-card {
        padding: 12px;
    }
    
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
    
    .stat-value {
        font-size: 16px !important;
    }
    
    .kpi-value {
        font-size: 16px;
    }
    
    /* Notification badge */
    .notification-badge {
        min-width: 16px;
        height: 16px;
        font-size: 9px;
        border-width: 1.5px;
    }
    
    /* Sidebar full width on very small screens */
    .sidebar {
        width: 100%;
        max-width: 100%;
    }
    
    .sidebar-header {
        padding: 12px 16px;
    }
    
    .sidebar-header .logo-img {
        width: auto !important;
        height: 26px !important;
        max-width: 100px !important;
    }
    
    .nav-item {
        padding: 12px 16px;
        font-size: 14px;
    }
    
    .nav-item i {
        font-size: 16px;
        width: 20px;
    }
    
    /* Cards */
    .card {
        border-radius: 10px;
    }
    
    .card-header {
        padding: 12px;
    }
    
    .card-header h3 {
        font-size: 14px;
    }
    
    .card-body {
        padding: 12px;
    }
    
    /* Tables - exclude card-mode tables */
    table:not(#employeesTable):not(#evaluationsTable):not(#departmentsTable):not(#myEvaluationsTable) {
        min-width: 400px;
        font-size: 12px;
    }
    
    table:not(#employeesTable):not(#evaluationsTable):not(#departmentsTable):not(#myEvaluationsTable) th,
    table:not(#employeesTable):not(#evaluationsTable):not(#departmentsTable):not(#myEvaluationsTable) td {
        padding: 8px 6px;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }
.mt-4 { margin-top: var(--spacing-xl); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }
.mb-4 { margin-bottom: var(--spacing-xl); }

.hidden { display: none !important; }
.visible { display: block !important; }

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--spacing-2xl);
    color: var(--gray-500);
}

.empty-state i {
    font-size: 36px;
    margin-bottom: var(--spacing-md);
}

.empty-state p {
    font-size: 14px;
}

/* ============================================
   Questions Review (View Details)
   ============================================ */
.questions-review {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    max-height: 400px;
    overflow-y: auto;
    padding-right: var(--spacing-sm);
}

.question-review-item {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.question-review-item:hover {
    border-color: var(--primary-blue);
    background: rgba(61, 83, 219, 0.03);
}

.question-review-item .question-text {
    display: flex;
    gap: var(--spacing-sm);
    flex: 1;
    font-size: 14px;
    color: var(--text-color);
    margin: 0;
}

.question-review-item .question-number {
    background: var(--primary-blue);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.answer-display {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    flex-shrink: 0;
}

.answer-emoji {
    font-size: 22px;
    line-height: 1;
}

.answer-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-blue);
    min-width: 40px;
    text-align: center;
}

.answer-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-600);
    padding: 4px 12px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1px solid var(--gray-300);
}

/* ============================================
   RTL/LTR Support - Comprehensive
   ============================================ */

/* Base RTL/LTR Text Alignment */
html[dir="rtl"] body {
    text-align: right;
}

html[dir="ltr"] body {
    text-align: left;
}

/* Logo Alignment */
html[dir="rtl"] .logo {
    text-align: right;
    align-items: flex-start;
}

html[dir="ltr"] .logo {
    text-align: left;
    align-items: flex-start;
}

/* Sidebar Navigation Items */
html[dir="rtl"] .nav-item {
    text-align: right;
}

html[dir="ltr"] .nav-item {
    text-align: left;
}

/* Table Headers and Cells - Dynamic Alignment */
html[dir="rtl"] th,
html[dir="rtl"] td {
    text-align: right;
}

html[dir="ltr"] th,
html[dir="ltr"] td {
    text-align: left;
}

/* Keep centered elements centered regardless of direction */
html[dir="rtl"] .text-center,
html[dir="ltr"] .text-center {
    text-align: center !important;
}

/* Input Fields */
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
    text-align: right;
}

html[dir="ltr"] input,
html[dir="ltr"] textarea,
html[dir="ltr"] select {
    text-align: left;
}

/* Form Labels */
html[dir="rtl"] label {
    text-align: right;
}

html[dir="ltr"] label {
    text-align: left;
}

/* Modal Content */
html[dir="rtl"] .modal-content {
    text-align: right;
}

html[dir="ltr"] .modal-content {
    text-align: left;
}

/* Cards and Containers */
html[dir="rtl"] .card,
html[dir="rtl"] .container,
html[dir="rtl"] .content-section {
    text-align: right;
}

html[dir="ltr"] .card,
html[dir="ltr"] .container,
html[dir="ltr"] .content-section {
    text-align: left;
}

/* Questions Review Padding */
html[dir="rtl"] .questions-review {
    padding-right: var(--spacing-sm);
    padding-left: 0;
}

html[dir="ltr"] .questions-review {
    padding-left: var(--spacing-sm);
    padding-right: 0;
}

/* Search Inputs with Icons */
html[dir="rtl"] .search-input {
    padding-right: 40px;
    padding-left: var(--spacing-md);
}

html[dir="ltr"] .search-input {
    padding-left: 40px;
    padding-right: var(--spacing-md);
}

/* Page Header Actions */
html[dir="rtl"] .page-header-actions {
    margin-right: auto;
}

html[dir="ltr"] .page-header-actions {
    margin-left: auto;
}

/* Notification Dropdown - positioned by JS */

/* Dropdown Menus */
html[dir="rtl"] .dropdown-menu {
    right: 0;
    left: auto;
}

html[dir="ltr"] .dropdown-menu {
    left: 0;
    right: auto;
}

/* Button Groups */
html[dir="rtl"] .btn-group {
    flex-direction: row-reverse;
}

html[dir="ltr"] .btn-group {
    flex-direction: row;
}

/* Stats Grid Alignment */
html[dir="rtl"] .stat-label,
html[dir="rtl"] .stat-value {
    text-align: center;
}

html[dir="ltr"] .stat-label,
html[dir="ltr"] .stat-value {
    text-align: center;
}

/* Badge Positioning */
html[dir="rtl"] .badge {
    margin-left: var(--spacing-xs);
    margin-right: 0;
}

html[dir="ltr"] .badge {
    margin-right: var(--spacing-xs);
    margin-left: 0;
}

/* Icon Spacing in Buttons */
html[dir="rtl"] button i,
html[dir="rtl"] .btn i {
    margin-left: var(--spacing-xs);
    margin-right: 0;
}

html[dir="ltr"] button i,
html[dir="ltr"] .btn i {
    margin-right: var(--spacing-xs);
    margin-left: 0;
}

/* List Items */
html[dir="rtl"] li {
    text-align: right;
}

html[dir="ltr"] li {
    text-align: left;
}

/* Paragraphs and Headings */
html[dir="rtl"] p,
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5,
html[dir="rtl"] h6 {
    text-align: right;
}

html[dir="ltr"] p,
html[dir="ltr"] h1,
html[dir="ltr"] h2,
html[dir="ltr"] h3,
html[dir="ltr"] h4,
html[dir="ltr"] h5,
html[dir="ltr"] h6 {
    text-align: left;
}

/* Override for centered elements */
html[dir="rtl"] .page-title,
html[dir="rtl"] .section-title,
html[dir="ltr"] .page-title,
html[dir="ltr"] .section-title {
    text-align: inherit;
}

/* Empty State */
html[dir="rtl"] .empty-state,
html[dir="ltr"] .empty-state {
    text-align: center !important;
}

/* Filter Buttons Container */
html[dir="rtl"] .filter-buttons {
    justify-content: flex-start;
}

html[dir="ltr"] .filter-buttons {
    justify-content: flex-start;
}

/* Form Groups */
html[dir="rtl"] .form-group {
    text-align: right;
}

html[dir="ltr"] .form-group {
    text-align: left;
}

/* Tabs */
html[dir="rtl"] .tabs {
    justify-content: flex-start;
}

html[dir="ltr"] .tabs {
    justify-content: flex-start;
}

/* Alert Messages */
html[dir="rtl"] .alert {
    text-align: right;
}

html[dir="ltr"] .alert {
    text-align: left;
}

/* ============================================
   Performance Summary Enhancements v2.0
   ============================================ */

/* Export Buttons Group */
.export-buttons-group {
    display: flex;
    gap: 0.4rem;
    flex-wrap: nowrap;
}

.export-buttons-group .btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.export-buttons-group .btn i {
    font-size: 0.85rem;
}

.export-buttons-group .btn span {
    font-size: 0.8rem;
}

.btn-success {
    background: var(--success);
    color: white;
    border-radius: 50px;
}

.btn-success:hover {
    background: #059669;
}

.btn-secondary {
    background: var(--indigo-500);
    color: white;
    border-radius: 50px;
}

/* Compact Top Bar Styling */
.page-title {
    font-weight: 700 !important;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    color: var(--heading-color);
}

.page-title i {
    font-size: 15px !important;
    flex-shrink: 0;
    color: var(--primary-blue);
    opacity: 0.7;
}

.page-title span {
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.icon-btn {
    width: 32px !important;
    height: 32px !important;
    padding: 0.3rem !important;
    font-size: 14px !important;
    border-radius: 50% !important;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
}

.user-avatar {
    width: 28px !important;
    height: 28px !important;
}

.user-name {
    font-size: 0.75rem;
}

.btn-secondary:hover {
    background: var(--indigo-700);
}

/* Advanced Controls Bar */
.advanced-controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    box-shadow: var(--shadow-card);
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.controls-left, .controls-right {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

.btn-outline {
    background: white;
    border: 1px solid var(--indigo-300);
    color: var(--indigo-600);
    border-radius: 50px;
}

.btn-outline:hover {
    background: var(--indigo-50);
    border-color: var(--indigo-400);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Custom Date Range */
.custom-date-range {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: 8px;
}

.custom-date-range label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.date-input {
    padding: 0.4rem 0.6rem;
    border: 1px solid var(--gray-300);
    border-radius: 6px;
    font-size: 0.9rem;
}

/* Charts Section */
.charts-section {
    margin-bottom: 1.5rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.chart-container {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.chart-container h4 {
    margin-bottom: 1rem;
    color: var(--gray-700);
    font-size: 1rem;
    font-weight: 600;
}

.chart-container canvas {
    max-height: 300px;
}

/* Comparison Panel */
.comparison-panel {
    margin-bottom: 1.5rem;
}

.comparison-selectors-container {
    margin-bottom: 1.5rem;
}

.comparison-selectors {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 0;
}

.selector-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.selector-group label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.comparison-results {
    margin-top: 1.5rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: center;
    border: 1px solid var(--gray-200);
}

.comparison-table th {
    background: var(--primary-blue);
    color: white;
    font-weight: 600;
}

.comparison-table tbody tr:hover {
    background: var(--gray-50);
}

.comparison-metric {
    padding: 1rem;
    background: var(--gray-50);
    border-radius: 8px;
    margin-bottom: 0.75rem;
}

.comparison-metric-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
}

.comparison-values {
    display: flex;
    gap: 1rem;
    justify-content: space-around;
}

.comparison-value {
    text-align: center;
}

.comparison-value-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.comparison-value-label {
    font-size: 0.85rem;
    color: var(--gray-600);
    margin-top: 0.25rem;
}

/* Winner Badge */
.winner-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

/* Chart Toggle Animation */
.charts-section,
.comparison-panel {
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Responsive Design for New Features */
@media (max-width: 768px) {
    .advanced-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .controls-left, .controls-right {
        width: 100%;
        justify-content: center;
    }
    
    .export-buttons-group {
        flex-direction: column;
    }
    
    .export-buttons-group .btn {
        width: 100%;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .comparison-selectors {
        grid-template-columns: 1fr;
    }
    
    .custom-date-range {
        flex-direction: column;
        align-items: stretch;
    }
}

/* RTL Support for New Features */
html[dir="rtl"] .comparison-values {
    direction: rtl;
}

html[dir="rtl"] .winner-badge {
    margin-right: 0.5rem;
    margin-left: 0;
}

html[dir="ltr"] .comparison-values {
    direction: ltr;
}

/* ============================================
   Employee Management Enhancements v2.0
   ============================================ */

/* Employee Tabs */
.employee-tabs {
    display: flex;
    border-bottom: 1px solid var(--gray-200);
    background: var(--gray-50);
}

.employee-tab {
    flex: 1;
    padding: 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-weight: 500;
    color: var(--gray-600);
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.employee-tab:hover {
    background: var(--gray-100);
    color: var(--primary-blue);
}

.employee-tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background: var(--white);
    font-weight: 600;
}

.employee-tab i {
    font-size: 14px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Photo Upload Styling */
#employeePhotoPreview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 2px solid var(--primary-blue);
    margin: 0 auto;
    position: relative;
    transition: all 0.2s ease;
}

#employeePhotoPreview:hover {
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.15);
}

#employeePhotoPreview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#employeePhotoPreview i {
    font-size: 36px;
    color: var(--gray-400);
}

/* Document Cards */
.document-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s ease;
    margin-bottom: 12px;
}

.document-card:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.document-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.document-icon.pdf {
    background: #FEE2E2;
    color: #DC2626;
}

.document-icon.word {
    background: #DBEAFE;
    color: #4F46E5;
}

.document-icon.image {
    background: #FEF3C7;
    color: #F59E0B;
}

.document-icon.other {
    background: var(--gray-100);
    color: var(--gray-500);
}

.document-info {
    flex: 1;
    min-width: 0;
}

.document-name {
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.document-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--gray-500);
}

.document-actions {
    display: flex;
    gap: 8px;
}

.document-actions .btn {
    padding: 8px 12px;
    font-size: 13px;
}

/* History Timeline */
.history-timeline {
    position: relative;
    padding-right: 40px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.history-item {
    position: relative;
    margin-bottom: 24px;
    padding-right: 0;
}

.history-item::before {
    content: '';
    position: absolute;
    right: 13px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: 3px solid var(--white);
    box-shadow: 0 0 0 2px var(--gray-200);
    z-index: 2;
}

.history-item.create::before {
    background: var(--success);
}

.history-item.update::before {
    background: var(--info);
}

.history-item.delete::before {
    background: var(--danger);
}

.history-content {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: 16px;
    box-shadow: var(--shadow-sm);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.history-action {
    font-weight: 600;
    color: var(--text-color);
    font-size: 14px;
}

.history-time {
    font-size: 12px;
    color: var(--gray-500);
}

.history-details {
    font-size: 13px;
    color: var(--gray-600);
    line-height: 1.6;
}

.history-user {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--gray-100);
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 36px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 13px;
    color: var(--gray-500);
}

/* Document Upload Form */
#documentUploadForm {
    background: var(--gray-50);
    padding: 16px;
    border-radius: var(--radius-md);
    border: 1px dashed var(--gray-300);
    margin-bottom: 16px;
    animation: slideDown 0.2s ease;
}

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

/* Progress Bars */
.progress-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar > div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-orange));
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Document Type Badges */
.doc-type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-type-badge.cv {
    background: #DBEAFE;
    color: #1E40AF;
}

.doc-type-badge.certificate {
    background: #FEF3C7;
    color: #92400E;
}

.doc-type-badge.id_copy {
    background: #FCE7F3;
    color: #9F1239;
}

.doc-type-badge.contract {
    background: #DCFCE7;
    color: #166534;
}

.doc-type-badge.other {
    background: var(--gray-100);
    color: var(--gray-700);
}

/* Mobile Responsive for Employee Enhancements */
@media (max-width: 768px) {
    .employee-tabs {
        flex-direction: column;
    }
    
    .employee-tab {
        border-bottom: 1px solid var(--gray-200);
        padding: 12px;
    }
    
    .employee-tab.active {
        border-bottom-color: var(--primary-blue);
        border-right: 3px solid var(--primary-blue);
    }
    
    .document-card {
        flex-direction: column;
        text-align: center;
    }
    
    .document-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .document-actions .btn {
        width: 100%;
    }
    
    .history-timeline {
        padding-right: 30px;
    }
    
    .history-timeline::before {
        right: 15px;
    }
    
    .history-item::before {
        right: 8px;
    }
}

/* ============================================
   Calendar View for 1:1 Meetings
   ============================================ */
.calendar-view {
    width: 100%;
    margin-bottom: 24px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 8px;
}

.calendar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
    margin: 0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.calendar-day-header {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--gray-50);
    border-radius: 4px;
    font-size: 0.875rem;
}

.calendar-day {
    min-height: 100px;
    padding: 8px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.calendar-day:hover {
    border-color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.calendar-day.other-month {
    opacity: 0.4;
    background: var(--gray-50);
}

.calendar-day.today {
    border: 2px solid var(--primary-blue);
    background: var(--secondary-blue);
}

.calendar-day-number {
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 4px;
    font-size: 0.875rem;
}

.calendar-day-meetings {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-meeting-item {
    padding: 4px 6px;
    background: var(--primary-blue);
    color: white;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-meeting-item:hover {
    background: var(--secondary-orange);
    transform: scale(1.05);
}

.calendar-meeting-item.completed {
    background: var(--success);
}

.calendar-meeting-item.cancelled {
    background: var(--danger);
    text-decoration: line-through;
}

/* Enhanced Meeting Cards with Action Buttons */
.meeting-card {
    background: var(--white);
    border-radius: 8px;
    padding: 12px;
    box-shadow: none;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-200);
}

.meeting-card:hover {
    border-color: var(--primary-blue);
}

.meeting-footer {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--gray-200);
}

.meeting-footer .btn {
    flex: 1;
    min-width: 100px;
}

/* Delete button styling - dashed border for caution */
.meeting-footer .btn[onclick*="deleteMeeting"] {
    border-style: dashed !important;
    border-width: 2px !important;
    opacity: 0.85;
    position: relative;
}

.meeting-footer .btn[onclick*="deleteMeeting"]:hover {
    opacity: 1;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.2);
}

.meeting-footer .btn[onclick*="deleteMeeting"]::before {
    content: '⚠️';
    margin-left: 4px;
    font-size: 0.85em;
}

/* Cancel button - solid border, ban icon */
.meeting-footer .btn[onclick*="cancelMeeting"] {
    border-style: solid !important;
}

/* Auto Schedule Actions */
.auto-schedule-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--secondary-blue) 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.auto-schedule-actions .btn {
    flex: 1;
    min-width: 200px;
}

/* Schedule Preview Table */
.schedule-preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 16px;
    font-size: 0.875rem;
}

.schedule-preview-table th,
.schedule-preview-table td {
    padding: 12px;
    text-align: right;
    border-bottom: 1px solid var(--gray-200);
}

.schedule-preview-table th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--heading-color);
}

.schedule-preview-table tr:hover {
    background: var(--gray-50);
}

.schedule-preview-table .badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.schedule-preview-table .badge-info {
    background: var(--secondary-blue);
    color: var(--primary-blue);
}

/* Remove meeting button in preview */
.btn-remove-meeting {
    background: transparent;
    border: none;
    color: #dc3545;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-remove-meeting:hover {
    background: #fee2e2;
    color: #b91c1c;
}

.btn-remove-meeting i {
    font-size: 0.9rem;
}

/* Google Calendar Button */
.btn-google-calendar {
    background: linear-gradient(135deg, #4285F4, #34A853) !important;
    color: white !important;
    border: none !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-google-calendar:hover:not(:disabled) {
    background: linear-gradient(135deg, #3367D6, #2E9549) !important;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.25);
}

.btn-google-calendar:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-google-calendar i {
    font-size: 1.1rem;
}

/* Progress bar for Google Calendar */
#gcalProgressContainer .progress {
    height: 20px;
    border-radius: 10px;
    background: #e9ecef;
    overflow: hidden;
}

#gcalProgressContainer .progress-bar {
    background: linear-gradient(90deg, #4F46E5, #FF7A00);
    transition: width 0.3s ease;
    border-radius: 10px;
}

.schedule-preview-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: var(--secondary-blue);
    border-radius: 8px;
}

.schedule-stat-item {
    text-align: center;
}

.schedule-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: nowrap;
    justify-content: center;
}

.schedule-stat-value .currency {
    white-space: nowrap;
}

.schedule-stat-label {
    font-size: 0.75rem;
    color: var(--gray-600);
    margin-top: 4px;
}

/* Loading Spinner for Employee Dropdown */
.employee-select-wrapper {
    position: relative;
}

.employee-select-loading {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.employee-select-loading i {
    color: var(--primary-blue);
}

/* Responsive Calendar */
@media (max-width: 768px) {
    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 4px;
    }
    
    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }
    
    .calendar-day-number {
        font-size: 0.75rem;
    }
    
    .calendar-meeting-item {
        font-size: 0.625rem;
        padding: 2px 4px;
    }
    
    .auto-schedule-actions {
        flex-direction: column;
    }
    
    .auto-schedule-actions .btn {
        width: 100%;
        min-width: auto;
    }
    
    .meeting-footer {
        flex-direction: column;
    }
    
    .meeting-footer .btn {
        width: 100%;
    }
}

/* ============================================
   🎨 Mnzil Brand Identity Enhancements
   Added: October 31, 2025
   ============================================ */

/* Icon Transitions */
.nav-item i,
.icon-btn i,
.btn i,
.card-icon i,
button i {
    transition: all 0.2s ease;
}

/* Smooth Icon Rotate on Hover */
.notification-btn:hover i,
.theme-toggle:hover i {
    transform: rotate(10deg);
}

/* Button Transitions */
.btn,
.logout-btn,
.icon-btn,
.theme-toggle,
.lang-toggle {
    position: relative;
    overflow: hidden;
    transition: all 0.2s ease;
}

.btn:active {
    transform: translateY(0);
}

/* Card Hover Enhancements */
.card,
.stat-card,
.dashboard-card {
    transition: all 0.25s ease;
}

.card:hover,
.stat-card:hover,
.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Smooth Mode Transitions */
body {
    transition: background-color 0.3s ease,
                color 0.3s ease;
}

/* Status Colors Enhancement */
.badge,
.status-badge {
    transition: all 0.2s ease;
    font-weight: 500;
}

/* Success State */
.badge-success,
.status-success,
.btn-success {
    background-color: #10B981;
    color: white;
}

/* Warning State */
.badge-warning,
.status-warning,
.btn-warning {
    background-color: #F59E0B;
    color: white;
}

/* Danger State */
.badge-danger,
.status-danger,
.btn-danger {
    background-color: #EF4444;
    color: white;
}

/* Info State */
.badge-info,
.status-info,
.btn-info {
    background-color: #4F46E5;
    color: white;
}

/* Enhanced Loading States */
.loading-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Pulse Animation for Notifications */
.notification-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.75;
    }
}

/* 💬 Employee Response Indicator Animation - v7.44 */
@keyframes pulse-response {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(99, 102, 241, 0);
    }
}

.response-indicator {
    transition: all 0.2s ease;
}

.response-indicator:hover {
    background: rgba(199, 210, 254, 0.7) !important;
}

/* Smooth Page Transitions */
.fade-in {
    animation: fadeIn 0.4s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Focus States */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
    transition: all 0.3s ease;
}

/* Better Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 6px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* Improved Dropdown Animations */
.dropdown-menu,
.notification-dropdown.show,
.notification-dropdown.active {
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: top;
}

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

/* Enhanced Table Rows */
table tbody tr {
    transition: all 0.2s ease;
}

table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.03);
}

/* Salary Toggle Button */
.btn-icon-sm {
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.btn-icon-sm:hover {
    background-color: rgba(79, 70, 229, 0.1) !important;
}

.btn-icon-sm:active {
    transform: scale(0.95);
}

.salary-hidden {
    transition: all 0.3s ease;
}

/* ============================================
   All Hands Meeting History Dropdown Styles
   ============================================ */

/* Dropdown Container */
.meeting-history-dropdown {
    position: relative;
    margin-bottom: 20px;
}

/* Trigger Button */
.meeting-history-dropdown .dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 13px;
    font-weight: 600;
    color: var(--heading-color);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 360px;
    box-shadow: var(--shadow-sm);
}

.meeting-history-dropdown .dropdown-trigger:hover {
    border-color: var(--primary-blue);
    background: rgba(79, 70, 229, 0.03);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.meeting-history-dropdown .dropdown-trigger i:first-child {
    color: var(--primary-blue);
    font-size: 18px;
}

.meeting-history-dropdown .dropdown-trigger .meeting-count {
    background: var(--primary-blue);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    min-width: 24px;
    text-align: center;
}

.meeting-history-dropdown .dropdown-trigger .dropdown-arrow {
    margin-left: auto;
    color: var(--gray-400);
    font-size: 14px;
    transition: transform 0.3s ease;
}

.meeting-history-dropdown .dropdown-trigger.active .dropdown-arrow {
    transform: rotate(180deg);
}

/* Dropdown Content */
.meeting-history-dropdown .dropdown-content {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: 100%;
    max-width: 600px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1000;
    overflow: hidden;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.meeting-history-dropdown .dropdown-content.show {
    display: block;
}

/* Search Box */
.meeting-history-dropdown .dropdown-search {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}

.meeting-history-dropdown .dropdown-search i {
    color: var(--gray-400);
    font-size: 14px;
}

.meeting-history-dropdown .dropdown-search input {
    flex: 1;
    border: none;
    background: transparent;
    outline: none;
    font-size: 14px;
    color: var(--text-color);
    font-family: inherit;
}

.meeting-history-dropdown .dropdown-search input::placeholder {
    color: var(--gray-400);
}

/* Meeting List */
.meeting-history-dropdown .meeting-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

/* Empty State */
.meeting-history-dropdown .meeting-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    color: var(--gray-400);
}

.meeting-history-dropdown .meeting-list-empty i {
    font-size: 36px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.meeting-history-dropdown .meeting-list-empty p {
    margin: 0;
    font-size: 14px;
}

/* Meeting Item */
.meeting-history-dropdown .meeting-item {
    padding: 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.meeting-history-dropdown .meeting-item:hover {
    background: rgba(79, 70, 229, 0.05);
    border-color: var(--primary-blue);
    transform: translateX(4px);
}

.meeting-history-dropdown .meeting-item:last-child {
    margin-bottom: 0;
}

/* Meeting Date */
.meeting-history-dropdown .meeting-date {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.meeting-history-dropdown .meeting-date i {
    color: var(--primary-blue);
    font-size: 13px;
}

/* Meeting Title */
.meeting-history-dropdown .meeting-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 6px;
    line-height: 1.4;
}

/* Meeting Meta */
.meeting-history-dropdown .meeting-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.meeting-history-dropdown .meeting-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--gray-500);
}

.meeting-history-dropdown .meeting-meta .attendees {
    color: var(--success);
}

.meeting-history-dropdown .meeting-meta .status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.meeting-history-dropdown .meeting-meta .status.completed {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.meeting-history-dropdown .meeting-meta .status.scheduled {
    background: rgba(59, 130, 246, 0.1);
    color: #6366F1;
}

.meeting-history-dropdown .meeting-meta .status.cancelled {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* Dropdown Footer */
.meeting-history-dropdown .dropdown-footer {
    padding: 12px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.meeting-history-dropdown .view-all-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    color: var(--primary-blue);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meeting-history-dropdown .view-all-btn:hover {
    background: var(--primary-blue);
    color: var(--white);
    border-color: var(--primary-blue);
}

/* Responsive */
@media (max-width: 768px) {
    .meeting-history-dropdown .dropdown-trigger {
        max-width: 100%;
        font-size: 14px;
        padding: 12px 16px;
    }
    
    .meeting-history-dropdown .dropdown-content {
        max-width: 100%;
    }
    
    .meeting-history-dropdown .meeting-list {
        max-height: 300px;
    }
    
    .meeting-history-dropdown .meeting-item {
        padding: 10px;
    }
}

/* Meeting Details Panel Styles */
.meeting-details-panel {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: var(--white);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    overflow-y: auto;
    animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.meeting-details-panel.show {
    display: block;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

/* Panel Header */
.meeting-details-panel .panel-header {
    position: sticky;
    top: 0;
    padding: 20px 24px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10;
}

.meeting-details-panel .panel-header h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--heading-color);
    flex: 1;
}

.meeting-details-panel .close-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    color: var(--gray-600);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.meeting-details-panel .close-btn:hover {
    background: var(--gray-200);
    color: var(--heading-color);
    transform: rotate(90deg);
}

/* Panel Body */
.meeting-details-panel .panel-body {
    padding: 24px;
}

/* Info Grid */
.meeting-details-panel .info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.meeting-details-panel .info-card {
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    border-left: 3px solid var(--primary-blue);
    font-size: 14px;
    color: var(--text-color);
}

/* Tabs */
.meeting-details-panel .tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--gray-200);
}

.meeting-details-panel .tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--gray-500);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.meeting-details-panel .tab:hover {
    color: var(--primary-blue);
}

.meeting-details-panel .tab.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
}

/* Tab Content */
.meeting-details-panel .tab-content {
    padding: 20px 0;
}

@media (max-width: 768px) {
    .meeting-details-panel {
        max-width: 100%;
    }
    
    .meeting-details-panel .info-grid {
        grid-template-columns: 1fr;
    }
    
    .meeting-details-panel .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .meeting-details-panel .tab {
        padding: 10px 16px;
        font-size: 13px;
        white-space: nowrap;
    }
}

/* ============================================
   Dynamic Evaluation Questions Styling
   Version: 1.0
   Date: November 10, 2025
   Feature: Custom questions per role & department
   ============================================ */

/* Type Indicator */
.evaluation-type-indicator {
    margin: 16px 24px 0;
    padding: 16px 24px;
    background: linear-gradient(135deg, #E0E7FF 0%, #C7D2FE 100%);
    border-radius: var(--radius-lg);
    color: var(--primary-blue);
    font-weight: 600;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.evaluation-type-indicator:empty {
    display: none;
}

[dir="rtl"] .evaluation-type-indicator {
    text-align: right;
}

[dir="ltr"] .evaluation-type-indicator {
    text-align: left;
}

/* Dynamic Questions Wrapper */
.dynamic-questions-wrapper {
    min-height: 200px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state i {
    display: block;
    margin-bottom: 16px;
}

/* ⚠️ Existing Evaluation Alert */
.existing-evaluation-alert {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 20px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 2px solid #F59E0B;
    border-radius: 12px;
    animation: alertPulse 2s ease-in-out infinite;
}

@keyframes alertPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4); }
    50% { box-shadow: 0 0 15px 5px rgba(245, 158, 11, 0.2); }
}

.existing-evaluation-alert .alert-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F59E0B;
    border-radius: 50%;
    color: white;
    font-size: 16px;
}

.existing-evaluation-alert .alert-content {
    flex: 1;
}

.existing-evaluation-alert .alert-title {
    font-weight: 700;
    font-size: 16px;
    color: #92400E;
    margin-bottom: 8px;
}

.existing-evaluation-alert .alert-details {
    font-size: 14px;
    color: #78350F;
    line-height: 1.6;
    margin-bottom: 12px;
}

.existing-evaluation-alert .edit-existing-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.existing-evaluation-alert .edit-existing-btn:hover {
    background: linear-gradient(135deg, #D97706 0%, #B45309 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
}

/* Dark mode for alert */
body.dark-mode .existing-evaluation-alert {
    background: linear-gradient(135deg, #78350F 0%, #92400E 100%);
    border-color: #F59E0B;
}

body.dark-mode .existing-evaluation-alert .alert-title {
    color: #FDE68A;
}

body.dark-mode .existing-evaluation-alert .alert-details {
    color: #FEF3C7;
}

/* Category Styling */
.evaluation-category {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s ease;
    border: 1px solid var(--gray-200);
}

.evaluation-category:hover {
    box-shadow: var(--shadow-md);
}

.category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary-blue);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
    font-size: 1.1em;
    font-weight: 600;
}

.category-weight {
    font-size: 0.85em;
    color: var(--gray-600);
    font-weight: normal;
    background: var(--secondary-blue);
    padding: 4px 12px;
    border-radius: var(--radius-md);
}

/* Questions Grid */
.questions-grid {
    display: grid;
    gap: 16px;
}

.question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.question-item:hover {
    background: var(--white);
    border-color: var(--secondary-blue);
}

.question-label {
    flex: 1;
    font-weight: 500;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: default;
}

.question-number {
    display: inline-block;
    min-width: 28px;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 0.95em;
}

/* ✨ v8.15: Category Notes Section - Evaluator Justification */
.category-notes-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px dashed var(--gray-300);
}

.notes-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: var(--gray-600);
    margin-bottom: 10px;
    font-size: 0.9em;
}

.notes-label i {
    color: var(--primary-blue);
}

.required-badge {
    color: #dc3545;
    font-weight: bold;
    margin-right: 4px;
    margin-left: 4px;
}

.notes-hint {
    font-size: 0.85em;
    color: var(--gray-500);
    margin: 0 0 10px 0;
    font-style: italic;
}

.optional-badge {
    font-size: 0.8em;
    color: var(--gray-400);
    font-weight: normal;
}

.category-notes-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
    min-height: 80px;
    transition: all 0.2s ease;
    background: var(--gray-50);
}

.category-notes-textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.category-notes-textarea::placeholder {
    color: var(--gray-400);
}

/* Dark Mode */
body.dark-mode .category-notes-textarea {
    background: var(--gray-800);
    border-color: var(--gray-600);
    color: var(--white);
}

body.dark-mode .category-notes-textarea:focus {
    background: var(--gray-700);
}

/* Star Rating */
.rating-input {
    display: flex;
    gap: 6px;
    margin-left: 16px;
}

[dir="rtl"] .rating-input {
    margin-left: 0;
    margin-right: 16px;
}

.star {
    font-size: 22px;
    color: #D1D5DB;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.star:hover {
    transform: scale(1.15);
}

.star.hover {
    color: #FCD34D;
    transform: scale(1.1);
}

.star.active {
    color: #FBBF24;
    transform: scale(1.05);
    text-shadow: 0 2px 4px rgba(251, 191, 36, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .question-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .rating-input {
        margin-left: 0;
        margin-right: 0;
        align-self: flex-end;
    }
    
    .star {
        font-size: 20px;
    }
    
    .evaluation-category {
        padding: 16px;
    }
    
    .category-header {
        font-size: 1em;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .evaluation-type-indicator {
        margin: 12px 16px 0;
        padding: 12px 16px;
        font-size: 0.9em;
    }
}

/* Validation States */
.question-item.has-error {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.05);
}

.question-item.has-value {
    border-color: var(--success);
}

/* Loading State */
.dynamic-questions-wrapper.loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.dynamic-questions-wrapper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-300);
    border-top-color: var(--primary-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Animation for question items */
.evaluation-category {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Star animation on selection */
@keyframes starPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.star.active {
    animation: starPulse 0.3s ease-out;
}

/* ═══════════════════════════════════════════
   Choices.js Group Headings (Department Hierarchy)
   v10.3: Style group headers for department sub-departments
   ═══════════════════════════════════════════ */

/* Dropdown height for department list */
.choices__list--dropdown, .choices__list[aria-expanded] {
    max-height: 300px !important;
    overflow-y: auto !important;
}

.choices__list--dropdown .choices__list {
    max-height: 280px !important;
    overflow-y: auto !important;
}

.choices__group .choices__heading {
    font-weight: 700 !important;
    font-size: 13px !important;
    color: var(--primary-blue, #4F46E5) !important;
    padding: 10px 12px 5px 12px !important;
    border-bottom: 2px solid var(--primary-blue, #4F46E5) !important;
    margin-top: 6px;
    text-transform: none !important;
    letter-spacing: 0;
}

.choices__group .choices__heading::before {
    content: '📂 ';
    font-size: 13px;
}

/* Dark mode support */
body.dark-mode .choices__group .choices__heading {
    color: #60a5fa !important;
    border-bottom-color: #60a5fa !important;
}

body.dark-mode .choices__list--dropdown {
    background-color: var(--card-bg, #1e293b) !important;
    border-color: #374151 !important;
}

body.dark-mode .choices__list--dropdown .choices__item--selectable {
    color: #e5e7eb !important;
}

body.dark-mode .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #374151 !important;
}

body.dark-mode .choices__inner {
    background-color: var(--card-bg, #1e293b) !important;
    border-color: #374151 !important;
    color: #e5e7eb !important;
}

body.dark-mode .choices__input {
    background-color: transparent !important;
    color: #e5e7eb !important;
}

/* ============================================
   Evaluation Progress Tracker (v5.21)
   ============================================ */

/* Tracker controls in card header */
.tracker-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.tracker-select {
    min-width: 70px;
    padding: 6px 12px !important;
    font-size: 14px !important;
}

.tracker-copy-btn {
    transition: all 0.2s ease;
}

/* Stats Row */
.tracker-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.tracker-stat {
    background: var(--card-bg-elevated, #f8fafc);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: transform 0.15s ease;
}

.tracker-stat:hover {
    transform: translateY(-1px);
}

.tracker-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.tracker-stat-label {
    color: var(--text-secondary, #4b5563);
    font-size: 13px;
    margin-top: 4px;
}

.tracker-stat.blue .tracker-stat-value { color: var(--primary-blue, #4F46E5); }
.tracker-stat.green .tracker-stat-value { color: #22c55e; }
.tracker-stat.orange .tracker-stat-value { color: #FF7A00; }
.tracker-stat.red .tracker-stat-value { color: #ef4444; }

/* Section title */
.tracker-section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 24px 0 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

/* Manager Grid */
.tracker-manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 14px;
    margin-bottom: 28px;
}

.tracker-manager-card {
    background: var(--card-bg, #ffffff);
    border-radius: 14px;
    padding: 18px;
    border: 1px solid var(--border-color, #e2e8f0);
    transition: all 0.2s ease;
}

.tracker-manager-card:hover {
    border-color: var(--primary-blue, #4F46E5);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.08);
    transform: translateY(-2px);
}

.tracker-card-completed {
    border-color: #22c55e !important;
}

.tracker-card-not-started {
    border-color: #ef4444 !important;
}

/* Manager header */
.tracker-mgr-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.tracker-mgr-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--primary-blue, #4F46E5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 17px;
    flex-shrink: 0;
}

.tracker-mgr-name {
    font-weight: 600;
    font-size: 15px;
    color: var(--text-primary);
}

.tracker-mgr-dept {
    color: var(--text-secondary, #4b5563);
    font-size: 12px;
}

/* Progress bar */
.tracker-progress-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.tracker-progress-bg {
    flex: 1;
    height: 10px;
    background: var(--border-color, #e2e8f0);
    border-radius: 5px;
    overflow: hidden;
}

.tracker-progress-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
}

.tracker-progress-fill.green { background: #22c55e; }
.tracker-progress-fill.orange { background: #FF7A00; }
.tracker-progress-fill.red { background: #ef4444; }

.tracker-progress-text {
    font-weight: 600;
    font-size: 14px;
    min-width: 42px;
    text-align: center;
    color: var(--text-primary);
}

/* Summary badges */
.tracker-summary-badges {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary, #4b5563);
    margin-bottom: 8px;
}

/* Team details */
.tracker-team-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color, #e2e8f0);
}

.tracker-team-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 3px 0;
    font-size: 13px;
}

.tracker-emp-name {
    color: var(--text-secondary, #4b5563);
}

.tracker-badge-done {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tracker-badge-draft {
    background: rgba(255, 122, 0, 0.1);
    color: #FF7A00;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.tracker-badge-pending {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* Department summary table override */
.tracker-dept-table td,
.tracker-dept-table th {
    padding: 10px 14px;
}

/* ── Dark Mode Overrides ── */
body.dark-mode .tracker-stat {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .tracker-stat-value {
    color: #f1f5f9;
}

body.dark-mode .tracker-stat-label {
    color: #94a3b8;
}

body.dark-mode .tracker-manager-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .tracker-manager-card:hover {
    border-color: #4F46E5;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.15);
}

body.dark-mode .tracker-mgr-name {
    color: #f1f5f9;
}

body.dark-mode .tracker-mgr-dept {
    color: #94a3b8;
}

body.dark-mode .tracker-progress-bg {
    background: #334155;
}

body.dark-mode .tracker-progress-text {
    color: #f1f5f9;
}

body.dark-mode .tracker-summary-badges {
    color: #94a3b8;
}

body.dark-mode .tracker-team-details {
    border-top-color: #334155;
}

body.dark-mode .tracker-emp-name {
    color: #cbd5e1;
}

body.dark-mode .tracker-section-title {
    color: #f1f5f9;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .tracker-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }
    .tracker-manager-grid {
        grid-template-columns: 1fr;
    }
    .tracker-controls {
        width: 100%;
        justify-content: center;
    }
    .tracker-stat-value {
        font-size: 22px;
    }
}

/* ============================================
   Dark Mode — v12.0 Purple-Indigo Theme
   Compatible with mnzil.com gradient identity
   ============================================ */
body.dark-mode {
    background: linear-gradient(135deg, #1e1b4b 0%, #312E81 30%, #1e1b4b 60%, #0f172a 100%) !important;
    background-attachment: fixed !important;
    color: #e2e8f0;
}

body.dark-mode::before {
    background: rgba(99, 102, 241, 0.08);
}

body.dark-mode::after {
    background: rgba(124, 58, 237, 0.06);
}

body.dark-mode .sidebar {
    background: linear-gradient(180deg, #1e1b4b 0%, #312E81 50%, #3730A3 100%);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .top-bar {
    background: rgba(30, 27, 75, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

body.dark-mode .top-bar h1,
body.dark-mode .page-title,
body.dark-mode .page-title span {
    color: #e2e8f0 !important;
}

body.dark-mode .lang-toggle,
body.dark-mode .theme-toggle,
body.dark-mode .icon-btn,
body.dark-mode .notification-btn {
    background-color: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.2);
}

body.dark-mode .lang-toggle:hover,
body.dark-mode .theme-toggle:hover,
body.dark-mode .icon-btn:hover,
body.dark-mode .notification-btn:hover {
    background-color: rgba(99, 102, 241, 0.25);
}

body.dark-mode .user-menu .user-name {
    color: #e2e8f0;
}

body.dark-mode .stat-card,
body.dark-mode .kpi-card,
body.dark-mode .dashboard-card,
body.dark-mode .card {
    background: #1e293b;
    border: 1px solid rgba(99, 102, 241, 0.1);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode .stat-card:hover,
body.dark-mode .kpi-card:hover,
body.dark-mode .dashboard-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

body.dark-mode .card-header {
    border-bottom-color: rgba(99, 102, 241, 0.1);
}

body.dark-mode .card-header h3,
body.dark-mode .stat-label,
body.dark-mode .kpi-label {
    color: #94a3b8;
}

body.dark-mode .stat-value,
body.dark-mode .kpi-value {
    color: #f1f5f9;
}

body.dark-mode .table-container {
    background: #1e293b;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode table th {
    background: #0f172a;
    color: #a5b4fc;
    border-color: rgba(99, 102, 241, 0.1);
}

body.dark-mode table td {
    color: #e2e8f0;
    border-color: rgba(99, 102, 241, 0.06);
}

body.dark-mode table tbody tr:hover {
    background: rgba(99, 102, 241, 0.06);
}

body.dark-mode .action-btn {
    background: #1e293b;
    border-color: rgba(99, 102, 241, 0.15);
    color: #e2e8f0;
}

body.dark-mode .action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
}

body.dark-mode .search-box input,
body.dark-mode .filter-select,
body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
    background: #0f172a;
    color: #e2e8f0;
    border-color: rgba(99, 102, 241, 0.15);
}

body.dark-mode .search-box input:focus,
body.dark-mode .filter-select:focus,
body.dark-mode input:focus,
body.dark-mode select:focus,
body.dark-mode textarea:focus {
    border-color: var(--indigo-400);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

body.dark-mode .notification-dropdown {
    background: #1e293b;
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .notification-item {
    border-color: rgba(99, 102, 241, 0.06);
}

body.dark-mode .notification-item:hover {
    background: rgba(99, 102, 241, 0.08);
}

body.dark-mode .notification-content {
    color: #e2e8f0;
}

body.dark-mode .advanced-controls-bar {
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(12px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

body.dark-mode h1, body.dark-mode h2, body.dark-mode h3,
body.dark-mode h4, body.dark-mode h5, body.dark-mode h6 {
    color: #f1f5f9;
}

body.dark-mode .performer-name {
    color: #f1f5f9;
}

body.dark-mode .performer-department {
    color: #64748b;
}

body.dark-mode .sidebar-overlay.active {
    background: rgba(0, 0, 0, 0.6);
}

body.dark-mode .modal-content {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .btn-outline {
    border-color: rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    background: transparent;
}

body.dark-mode .btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* ============================================
   File Input — Polished site-wide
   ============================================ */
input[type="file"] {
    width: 100%;
    padding: 0;
    border: 2px dashed #c7d2fe;
    border-radius: 12px;
    background: linear-gradient(135deg, #fafbff 0%, #f5f3ff 100%);
    color: #4F46E5;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.18s ease;
    overflow: hidden;
}

input[type="file"]:hover {
    border-color: #6366F1;
    background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
    box-shadow: 0 2px 10px -2px rgba(99, 102, 241, 0.18);
}

input[type="file"]:focus {
    outline: none;
    border-color: #4F46E5;
    border-style: solid;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

/* The "Choose File" button itself */
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    margin: 6px 10px 6px 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #4F46E5 0%, #6366F1 100%);
    color: #fff;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 6px -1px rgba(79, 70, 229, 0.35);
    font-family: inherit;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, #4338CA 0%, #4F46E5 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px -2px rgba(79, 70, 229, 0.45);
}

input[type="file"]::file-selector-button:active,
input[type="file"]::-webkit-file-upload-button:active {
    transform: translateY(0);
}

/* Dark mode */
body.dark-mode input[type="file"] {
    background: linear-gradient(135deg, #1e293b 0%, #312e81 30%);
    border-color: rgba(99, 102, 241, 0.4);
    color: #a5b4fc;
}

body.dark-mode input[type="file"]:hover {
    background: linear-gradient(135deg, #312e81 0%, #4338ca 50%);
    border-color: #6366F1;
}

/* RTL support */
[dir="rtl"] input[type="file"]::file-selector-button,
[dir="rtl"] input[type="file"]::-webkit-file-upload-button {
    margin: 6px 6px 6px 10px;
}

/* ============================================
   Native Select — polished (UNIFIED for the whole site)
   Applies a consistent chevron + spacing to every <select>.
   Page-specific classes (.filter-select, .tracker-select, etc.) can still
   override colors/sizes, but the chevron stays consistent.
   ============================================ */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%234F46E5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 14px;
    padding-right: 38px;
    cursor: pointer;
}
html[dir="rtl"] select,
[dir="rtl"] select {
    background-position: left 14px center;
    padding-right: 14px;
    padding-left: 38px;
}
body.dark-mode select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a5b4fc' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}
/* Native option dropdown — modern browsers respect these */
select option {
    padding: 8px 12px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
}
body.dark-mode select option { background: #1e293b; color: #f1f5f9; }

/* Legacy specific overrides — kept for back-compat with !important rules */
select.form-input,
select.form-control,
.form-group select {
    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='%234F46E5' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 36px !important;
}

[dir="rtl"] select.form-input,
[dir="rtl"] select.form-control,
[dir="rtl"] .form-group select {
    background-position: left 12px center;
    padding-right: 12px !important;
    padding-left: 36px !important;
}

body.dark-mode select.form-input,
body.dark-mode select.form-control,
body.dark-mode .form-group select {
    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='%23a5b4fc' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

/* ============================================
   Native date input — polished
   ============================================ */
input[type="date"],
input[type="month"],
input[type="time"],
input[type="datetime-local"] {
    cursor: pointer;
    font-family: inherit;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="month"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.55;
    filter: invert(20%) sepia(95%) saturate(2500%) hue-rotate(238deg);
    transition: opacity 0.15s ease;
}

input[type="date"]:hover::-webkit-calendar-picker-indicator,
input[type="month"]:hover::-webkit-calendar-picker-indicator {
    opacity: 1;
}

body.dark-mode input[type="date"]::-webkit-calendar-picker-indicator,
body.dark-mode input[type="month"]::-webkit-calendar-picker-indicator,
body.dark-mode input[type="time"]::-webkit-calendar-picker-indicator,
body.dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(80%);
}
