/* Modern HR System UI - Enhanced Design */
/* Compatible with Arabic RTL */

:root {
    /* Modern Color Palette */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --success-color: #10b981;
    --info-color: #3b82f6;

    /* Background Colors */
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-sidebar: #1e293b;
    --bg-card: #ffffff;

    /* Text Colors */
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --text-light: #f1f5f9;

    /* Border Colors */
    --border-color: #e2e8f0;
    --border-light: #f1f5f9;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;

    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 1.75rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* ============================================
   MODERN SIDEBAR - COLLAPSIBLE DESIGN
   ============================================ */

/* Sidebar Variables */
:root {
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 78px;
    --sidebar-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar Base */
#sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1000;
    transition: var(--sidebar-transition);
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ============================================
   SIDEBAR HEADER (LOGO AREA)
   ============================================ */
.sidebar-header {
    padding: 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

#sidebar .sidebar-logo {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    text-decoration: none;
    color: white;
    padding: 0.5rem;
    border-radius: var(--radius-lg);
    transition: var(--sidebar-transition);
}

#sidebar .sidebar-logo:hover {
    background: rgba(255, 255, 255, 0.05);
}

#sidebar .logo-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

#sidebar .logo-icon i {
    font-size: 1.25rem;
    color: white;
}

#sidebar .logo-text {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
    transition: var(--sidebar-transition);
}

/* ============================================
   SIDEBAR NAVIGATION
   ============================================ */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.75rem;
}

/* Navigation Section */
.nav-section {
    margin-bottom: 1.5rem;
}

.nav-section:last-child {
    margin-bottom: 0;
}

.nav-section-title {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-section-title i {
    font-size: 0.75rem;
    min-width: 20px;
    text-align: center;
    opacity: 0.7;
}

.nav-section-title .section-text {
    transition: var(--sidebar-transition);
}

/* Navigation List */
.nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nav-item {
    margin-bottom: 0.25rem;
}

.nav-item:last-child {
    margin-bottom: 0;
}

/* Navigation Link */
#sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: var(--sidebar-transition);
    font-weight: 500;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

#sidebar .nav-link .nav-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    transition: var(--sidebar-transition);
}

#sidebar .nav-link .nav-icon i {
    font-size: 1rem;
    transition: var(--sidebar-transition);
}

#sidebar .nav-link .nav-text {
    transition: var(--sidebar-transition);
    opacity: 1;
}

#sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: white;
}

#sidebar .nav-link:hover .nav-icon {
    background: rgba(99, 102, 241, 0.2);
}

#sidebar .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.35);
}

#sidebar .nav-link.active .nav-icon {
    background: rgba(255, 255, 255, 0.2);
}

#sidebar .nav-link.active .nav-icon i {
    color: white;
}

/* ============================================
   SIDEBAR FOOTER (USER PROFILE)
   ============================================ */
.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(0, 0, 0, 0.15);
    flex-shrink: 0;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius-lg);
    margin-bottom: 0.75rem;
    transition: var(--sidebar-transition);
}

.user-profile:hover {
    background: rgba(255, 255, 255, 0.06);
}

.user-avatar {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--primary-color);
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-info {
    flex: 1;
    min-width: 0;
    transition: var(--sidebar-transition);
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.profile-link {
    width: 32px;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--sidebar-transition);
}

.profile-link:hover {
    background: var(--primary-color);
    color: white;
}

.profile-link i {
    font-size: 0.75rem;
}

/* ============================================
   SIDEBAR TOGGLE BUTTON
   ============================================ */
.sidebar-toggle {
    width: 100%;
    padding: 0.625rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--sidebar-transition);
    font-size: 0.8rem;
    font-weight: 500;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.2);
}

.sidebar-toggle .toggle-icon {
    font-size: 0.875rem;
    transition: var(--sidebar-transition);
}

.sidebar-toggle .toggle-text {
    transition: var(--sidebar-transition);
}

/* ============================================
   COLLAPSED SIDEBAR STATE
   ============================================ */
#sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

/* Collapsed Header */
#sidebar.collapsed .sidebar-header {
    padding: 1rem 0.75rem;
}

#sidebar.collapsed .sidebar-logo {
    justify-content: center;
    padding: 0.25rem;
}

#sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Collapsed Navigation */
#sidebar.collapsed .sidebar-nav {
    padding: 0.75rem 0.5rem;
}

#sidebar.collapsed .nav-section-title {
    justify-content: center;
    padding: 0.5rem 0.25rem;
}

#sidebar.collapsed .nav-section-title .section-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

#sidebar.collapsed .nav-link {
    justify-content: center;
    padding: 0.5rem;
}

#sidebar.collapsed .nav-link .nav-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

#sidebar.collapsed .nav-link .nav-icon {
    width: 42px;
    height: 42px;
}

/* Collapsed Footer */
#sidebar.collapsed .sidebar-footer {
    padding: 0.75rem;
}

#sidebar.collapsed .user-profile {
    justify-content: center;
    padding: 0.5rem;
}

#sidebar.collapsed .user-info {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

#sidebar.collapsed .profile-link {
    display: none;
}

#sidebar.collapsed .sidebar-toggle {
    padding: 0.5rem;
}

#sidebar.collapsed .sidebar-toggle .toggle-icon {
    transform: rotate(180deg);
}

#sidebar.collapsed .sidebar-toggle .toggle-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* ============================================
   TOOLTIP FOR COLLAPSED SIDEBAR
   ============================================ */
#sidebar.collapsed .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    right: calc(100% + 10px);
    top: 50%;
    transform: translateY(-50%);
    background: #1e293b;
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: var(--radius-md);
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 100;
}

#sidebar.collapsed .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   MAIN CONTENT ADJUSTMENT
   ============================================ */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 1.5rem;
    min-height: 100vh;
    transition: var(--sidebar-transition);
}

.main-content.expanded {
    margin-right: var(--sidebar-collapsed-width);
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    #sidebar {
        margin-right: calc(-1 * var(--sidebar-width));
        width: var(--sidebar-width);
    }

    #sidebar.active {
        margin-right: 0;
    }

    #sidebar.collapsed {
        width: var(--sidebar-width);
        margin-right: calc(-1 * var(--sidebar-width));
    }

    .main-content {
        margin-right: 0;
    }

    .main-content.expanded {
        margin-right: 0;
    }
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    margin-right: var(--sidebar-width);
    padding: 1.5rem;
    min-height: 100vh;
    transition: all 0.3s ease;
}

.main-content.expanded {
    margin-right: 0;
}

/* Header/Navbar */
.navbar {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.navbar .navbar-brand {
    color: var(--text-primary);
    font-weight: 700;
    font-size: 1.25rem;
}

/* Cards */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    font-size: 1.125rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--bg-card) 0%, #f8fafc 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color) 0%, transparent 70%);
    opacity: 0.05;
    border-radius: 0 0 0 100%;
}

.stat-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-left: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-icon.success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.stat-icon.warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.stat-icon.danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.stat-icon.info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.stat-content {
    flex: 1;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    line-height: 1.2;
}

.stat-trend {
    font-size: 0.875rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.stat-trend.positive {
    color: var(--success-color);
}

.stat-trend.negative {
    color: var(--danger-color);
}

/* Tables */
.table-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
    font-weight: 700;
    font-size: 0.875rem;
    padding: 1rem 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f8fafc;
}

.table tbody td {
    padding: 1rem 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--border-light);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Buttons */
.btn {
    padding: 0.625rem 1.25rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1.125rem;
}

/* Forms */
.form-control {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--bg-card);
    color: var(--text-primary);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.input-group-text {
    background: #f8fafc;
    border: 2px solid var(--border-color);
    border-right: none;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    color: var(--text-secondary);
    font-weight: 600;
}

.input-group .form-control {
    border-left: none;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.input-group .form-control:focus {
    border-left: none;
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

.alert-success {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    color: #065f46;
    border-right: 4px solid var(--success-color);
}

.alert-danger {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    color: #991b1b;
    border-right: 4px solid var(--danger-color);
}

.alert-warning {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    color: #92400e;
    border-right: 4px solid var(--warning-color);
}

.alert-info {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    color: #1e40af;
    border-right: 4px solid var(--info-color);
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.8rem;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #059669 100%);
    color: white;
}

.badge-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #dc2626 100%);
    color: white;
}

.badge-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #d97706 100%);
    color: white;
}

.badge-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #2563eb 100%);
    color: white;
}

/* Avatar */
.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-color);
}

.avatar-lg {
    width: 60px;
    height: 60px;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

/* Dropdown */
.dropdown-menu {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
}

.dropdown-item {
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-weight: 500;
}

.dropdown-item:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

/* Modal */
.modal-content {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
}

.modal-header {
    border-bottom: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-light);
    padding: 1.25rem 1.5rem;
}

/* Pagination */
.pagination .page-link {
    background-color: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 0.875rem;
    margin: 0 0.125rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover {
    background-color: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: white;
}

.pagination .page-item.disabled .page-link {
    background-color: #f8fafc;
    border-color: var(--border-color);
    color: #94a3b8;
}

/* Pagination Dark Mode Overrides */
[data-bs-theme="dark"] .pagination .page-link {
    background-color: rgba(255, 255, 255, 0.03);
    border-color: rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    /* Force visible text over Bootstrap defaults */
}

[data-bs-theme="dark"] .pagination .page-link:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-color: var(--primary-color);
    color: #ffffff !important;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    background-color: transparent;
    border-color: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Progress Bar */
.progress {
    height: 0.75rem;
    border-radius: var(--radius-md);
    background: #f1f5f9;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    transition: all 0.3s ease;
}

/* Responsive */
@media (max-width: 992px) {
    #sidebar {
        margin-right: calc(-1 * var(--sidebar-width));
    }

    #sidebar.active {
        margin-right: 0;
    }

    .main-content {
        margin-right: 0;
    }

    #sidebarToggle {
        display: flex;
    }
}

@media (max-width: 768px) {
    .stat-value {
        font-size: 1.75rem;
    }

    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }

    .card-header {
        font-size: 1rem;
    }

    .table thead th,
    .table tbody td {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-success {
    color: var(--success-color) !important;
}

.text-danger {
    color: var(--danger-color) !important;
}

.text-warning {
    color: var(--warning-color) !important;
}

.text-info {
    color: var(--info-color) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-primary {
    background: var(--primary-color) !important;
}

.bg-success {
    background: var(--success-color) !important;
}

.bg-danger {
    background: var(--danger-color) !important;
}

.bg-warning {
    background: var(--warning-color) !important;
}

.bg-info {
    background: var(--info-color) !important;
}

.fw-bold {
    font-weight: 700 !important;
}

.fw-semibold {
    font-weight: 600 !important;
}

.fw-medium {
    font-weight: 500 !important;
}

.rounded {
    border-radius: var(--radius-lg) !important;
}

.rounded-lg {
    border-radius: var(--radius-xl) !important;
}

.rounded-xl {
    border-radius: var(--radius-2xl) !important;
}

.shadow {
    box-shadow: var(--shadow-md) !important;
}

.shadow-lg {
    box-shadow: var(--shadow-lg) !important;
}

.shadow-xl {
    box-shadow: var(--shadow-xl) !important;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Print Styles */
@media print {

    #sidebar,
    #sidebarToggle,
    .navbar,
    .btn,
    .pagination {
        display: none !important;
    }

    .main-content {
        margin-right: 0 !important;
    }

    .card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
}