/* Admin Panel Styles */

html, body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.page {
    position: relative;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.sidebar {
    background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%);
}

.top-row {
    background-color: #f7f7f7;
    border-bottom: 1px solid #d6d5d5;
    justify-content: flex-end;
    height: 3.5rem;
    display: flex;
    align-items: center;
}

.top-row ::deep a, .top-row .btn-link {
    white-space: nowrap;
    margin-left: 1.5rem;
}

.top-row a:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 640.98px) {
    .top-row:not(.auth) {
        display: none;
    }

    .top-row.auth {
        justify-content: space-between;
    }

    .top-row a, .top-row .btn-link {
        margin-left: 0;
    }

    /* FORCE HIDE SIDEBAR ON MOBILE */
    .page {
        flex-direction: column !important;
    }
    
    .sidebar,
    .interactive-sidebar {
        display: none !important;
        position: fixed !important;
        left: -100% !important;
        z-index: 2000 !important;
        width: 80vw !important;
        max-width: 320px !important;
    }
    
    .sidebar.show,
    .interactive-sidebar.show {
        display: block !important;
        left: 0 !important;
    }

    main {
        width: 100% !important;
        margin-left: 0 !important;
    }
}

@media (min-width: 641px) {
    .page {
        flex-direction: row;
    }

    .sidebar {
        height: 100vh;
        position: sticky;
        top: 0;
        flex-shrink: 0;
        transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    main {
        flex: 1;
        overflow-x: hidden;
        transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .top-row {
        position: sticky;
        top: 0;
        z-index: 1;
    }

    .top-row, article {
        padding-left: 2rem !important;
        padding-right: 1.5rem !important;
    }
}

/* Interactive Sidebar */
.interactive-sidebar {
    background: linear-gradient(180deg, #1e1e2e 0%, #16161f 100%);
    height: 100vh;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 260px;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.interactive-sidebar.collapsed {
    width: 70px;
}

/* Toggle Button */
.sidebar-toggle {
    position: absolute;
    right: -12px;
    top: 20px;
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.4);
    }
    50% {
        box-shadow: 0 4px 16px rgba(102, 126, 234, 0.6);
    }
}

.sidebar-toggle:hover {
    transform: scale(1.2) rotate(90deg);
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.8);
    animation: none;
}

.sidebar-toggle:active {
    transform: scale(0.95);
}

.sidebar-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

/* Logo Section */
.sidebar-header {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    min-height: 80px;
}

.logo-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s ease;
    line-height: 1;
}

.logo-icon i {
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.interactive-sidebar:not(.collapsed) .logo-icon:hover {
    transform: rotate(360deg);
}

.logo-text {
    opacity: 1;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.interactive-sidebar.collapsed .logo-text {
    opacity: 0;
    width: 0;
}

.logo-text h5 {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.logo-text small {
    color: #8b92a7;
    font-size: 0.7rem;
}

/* Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1rem 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Hide scrollbar when not needed */
.sidebar-nav:not(:hover)::-webkit-scrollbar {
    width: 0;
}

.sidebar-nav:hover::-webkit-scrollbar {
    width: 6px;
}

/* Nav Items */
.nav-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #b8bfcc;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 10px;
    margin: 0.25rem 0;
    position: relative;
    cursor: pointer;
    font-size: 0.9rem;
    gap: 0.75rem;
}

.nav-item i {
    font-size: 1.1rem;
    min-width: 20px;
    transition: all 0.3s ease;
}

.nav-item span {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.interactive-sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0 3px 3px 0;
    transition: height 0.3s ease;
}

.nav-item:hover {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #ffffff;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.nav-item:hover::before {
    height: 80%;
}

.nav-item:hover i {
    transform: scale(1.2) rotate(5deg);
    color: #667eea;
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: #ffffff;
    font-weight: 500;
}

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

.nav-item.active i {
    color: #667eea;
}

/* Nav Groups */
.nav-group {
    margin: 0.5rem 0;
}

.nav-group-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #8b92a7;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    gap: 0.75rem;
}

.nav-group-header i:first-child {
    font-size: 1rem;
    min-width: 20px;
}

.nav-group-header span {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.interactive-sidebar.collapsed .nav-group-header span {
    opacity: 0;
    width: 0;
}

.nav-group-header:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

.nav-group-items {
    max-height: 500px;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 0.5rem;
}

.nav-group-items.collapsed-items {
    padding-left: 0;
}

.nav-item.sub-item {
    padding-left: 2.5rem;
    font-size: 0.85rem;
}

.interactive-sidebar.collapsed .nav-item.sub-item {
    padding-left: 1rem;
}

/* Badge */
.badge-mini {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 0.6rem;
    padding: 0.15rem 0.4rem;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: auto;
}

/* Footer */
.sidebar-footer {
    padding: 1rem 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.logout-btn {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #ff6b6b;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 10px;
    gap: 0.75rem;
}

.logout-btn i {
    font-size: 1.1rem;
    min-width: 20px;
}

.logout-btn span {
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.interactive-sidebar.collapsed .logout-btn span {
    opacity: 0;
    width: 0;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.15);
    color: #ff5252;
    transform: translateX(3px);
}

/* Tooltips for collapsed state */
.interactive-sidebar.collapsed .nav-item,
.interactive-sidebar.collapsed .nav-group-header,
.interactive-sidebar.collapsed .logout-btn {
    position: relative;
}

.interactive-sidebar.collapsed .nav-item::after,
.interactive-sidebar.collapsed .logout-btn::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: #2d2d3d;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    margin-left: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
}

.interactive-sidebar.collapsed .nav-item:hover::after,
.interactive-sidebar.collapsed .logout-btn:hover::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 640.98px) {
    .interactive-sidebar {
        width: 100%;
        height: auto;
    }
    
    .interactive-sidebar.collapsed {
        width: 100%;
    }
    
    .sidebar-toggle {
        display: none;
    }
}

/* Ultra Modern Header */
.ultra-modern-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    animation: headerSlide 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes headerSlide {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header Left */
.header-left {
    display: flex;
    align-items: center;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
}

.breadcrumb-nav i {
    color: #667eea;
    font-size: 1rem;
}

.breadcrumb-separator {
    color: #d1d5db;
}

.breadcrumb-current {
    color: #1f2937;
    font-weight: 600;
}

/* Header Right */
.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

/* Search Box */
.header-search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.header-search-box i {
    position: absolute;
    left: 1rem;
    color: #9ca3af;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.header-search-box input {
    width: 280px;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 2px solid transparent;
    background: #f3f4f6;
    border-radius: 12px;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #1f2937;
}

.header-search-box input::placeholder {
    color: #9ca3af;
}

.header-search-box input:focus {
    outline: none;
    background: white;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    width: 320px;
}

.header-search-box input:focus + i {
    color: #667eea;
    transform: scale(1.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Icon Buttons */
.header-icon-btn {
    position: relative;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    color: #6b7280;
}

.header-icon-btn:hover {
    background: #f3f4f6;
    color: #667eea;
    transform: translateY(-2px);
}

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

.header-icon-btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.header-icon-btn:hover i {
    transform: scale(1.1);
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: 2px solid white;
    border-radius: 50%;
    animation: notificationPulse 2s infinite;
}

@keyframes notificationPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

/* Header Divider */
.header-divider {
    width: 1px;
    height: 32px;
    background: #e5e7eb;
    margin: 0 0.5rem;
}

/* User Profile Button */
.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-profile-btn:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

/* User Avatar */
.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.user-profile-btn:hover .user-avatar {
    transform: scale(1.05) rotate(-5deg);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* User Details */
.user-details {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}

.user-role {
    font-size: 0.75rem;
    color: #9ca3af;
    line-height: 1.2;
}

/* Dropdown Icon */
.dropdown-icon {
    font-size: 0.8rem;
    color: #9ca3af;
    transition: all 0.3s ease;
}

.user-profile-btn:hover .dropdown-icon {
    color: #667eea;
    transform: translateY(2px);
}

/* Responsive Header */
@media (max-width: 1024px) {
    .header-search-box {
        display: none;
    }
}

@media (max-width: 768px) {
    .ultra-modern-header {
        padding: 0.75rem 1rem;
    }
    
    .header-actions {
        gap: 0.25rem;
    }
    
    .user-details {
        display: none;
    }
    
    .dropdown-icon {
        display: none;
    }
    
    .user-profile-btn {
        padding: 0.5rem;
    }
    
    .header-divider {
        display: none;
    }
}

/* Old Modern Top Bar - Keep for compatibility */
.modern-top-bar {
    background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    border-image-slice: 1;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease;
}

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

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeIn 0.5s ease;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Interactive User Info */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.user-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.user-info:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.user-info:hover::before {
    opacity: 0.05;
}

.user-info i {
    font-size: 1.5rem;
    color: #667eea;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.user-info:hover i {
    transform: scale(1.2) rotate(10deg);
    animation: none;
}

.user-info span {
    position: relative;
    z-index: 1;
}

/* Notification Badge */
.notification-badge {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.notification-badge:hover {
    border-color: #667eea;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.notification-badge i {
    font-size: 1.2rem;
    color: #6b7280;
    transition: all 0.3s ease;
}

.notification-badge:hover i {
    color: #667eea;
    animation: ring 0.5s ease;
}

@keyframes ring {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-15deg); }
    75% { transform: rotate(15deg); }
}

.notification-badge::after {
    content: '';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    background: #ef4444;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

/* Search Bar */
.header-search {
    position: relative;
    width: 300px;
}

.header-search input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 3rem;
    border: 2px solid #e5e7eb;
    border-radius: 50px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    background: white;
}

.header-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
    transform: scale(1.02);
}

.header-search i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.header-search input:focus + i {
    color: #667eea;
}

/* Quick Actions in Header */
.header-quick-actions {
    display: flex;
    gap: 0.5rem;
}

.header-action-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.header-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.header-action-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.header-action-btn:hover::before {
    opacity: 1;
}

.header-action-btn i {
    font-size: 1.1rem;
    color: #6b7280;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.header-action-btn:hover i {
    color: white;
    transform: scale(1.1);
}

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

/* Responsive Header */
@media (max-width: 768px) {
    .modern-top-bar {
        padding: 0.75rem 1rem;
    }
    
    .header-search {
        display: none;
    }
    
    .user-info span {
        display: none;
    }
    
    .user-info {
        padding: 0.5rem;
        width: 40px;
        height: 40px;
        justify-content: center;
    }
}

/* Modern Content Area */
.modern-content {
    padding: 2rem;
    background: #f9fafb;
    min-height: calc(100vh - 70px);
}

.content {
    padding-top: 1.1rem;
}

/* Removed old navbar-toggler - using interactive sidebar now */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Modern Cards */
.card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
    font-weight: 600;
}

.card-header h5, .card-header h4 {
    color: white;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

.btn-group-sm > .btn, .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.table > :not(caption) > * > * {
    padding: 0.75rem;
}

.badge {
    padding: 0.35em 0.65em;
}

code {
    color: #e83e8c;
    background-color: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
}

/* Removed old nav-scrollable - using interactive sidebar now */



/* Modern Buttons */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    border: none;
    border-radius: 8px;
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    color: #6b7280;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    background: #f9fafb;
    border-color: #667eea;
    color: #667eea;
}

/* Modern Tables */
.table {
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.table thead th {
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.5px;
    padding: 1rem;
}

.table tbody tr {
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background: #f9fafb;
    transform: scale(1.01);
}

.table tbody td {
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid #f3f4f6;
}

/* Modern Badges */
.badge {
    padding: 0.4em 0.8em;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.75rem;
}

.badge.bg-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%) !important;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%) !important;
}

.badge.bg-danger {
    background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%) !important;
}

/* Modern Alerts */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.alert-warning {
    background: linear-gradient(135deg, #fff5e6 0%, #ffe6cc 100%);
    color: #856404;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
}

/* Modern Form Controls */
.form-control, .form-select {
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Stats Cards */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #667eea;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-card h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card h6 {
    color: #6b7280;
    font-size: 0.9rem;
    font-weight: 500;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Loading Spinner */
.spinner-border {
    border-color: #667eea;
    border-right-color: transparent;
}

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

.card, .alert, .table {
    animation: fadeIn 0.3s ease;
}


/* Enhanced Interactivity */
.nav-item:active,
.nav-group-header:active,
.logout-btn:active {
    transform: scale(0.98);
}

/* Smooth section transitions */
.nav-group-items {
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s ease,
                padding 0.3s ease;
}

/* Logo hover effect */
.logo-icon {
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.interactive-sidebar:not(.collapsed) .logo-icon:hover {
    transform: rotate(360deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

/* Badge animation */
.badge-mini {
    animation: badgePulse 3s infinite;
}

@keyframes badgePulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* Section header hover */
.nav-group-header:hover i:first-child {
    transform: rotate(15deg) scale(1.1);
    color: #667eea;
}

/* Logout button enhanced */
.logout-btn:hover i {
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
}

/* Smooth page transitions */
.page {
    animation: pageLoad 0.3s ease;
}

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

/* Interactive feedback */
.nav-item::after {
    content: '';
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: #667eea;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.nav-item.active::after {
    opacity: 1;
    animation: blink 2s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Tooltip enhancement for collapsed mode */
.interactive-sidebar.collapsed .nav-item::after {
    display: none;
}

/* Smooth width transition for main content */
main {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.nav-item:focus,
.nav-group-header:focus,
.sidebar-toggle:focus,
.logout-btn:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state animation */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}


/* Interactive Dashboard Styles */
.dashboard-container {
    padding: 2rem;
    animation: fadeInUp 0.5s ease;
}

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

/* Dashboard Header */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #e5e7eb;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.dashboard-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    color: #6b7280;
    margin: 0;
    font-size: 0.9rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Stat Cards */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.stat-card:hover::before {
    transform: scaleX(1);
}

.stat-card:active {
    transform: translateY(-4px);
}

/* Stat Icon */
.stat-icon {
    width: 70px;
    height: 70px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-card-primary .stat-icon {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    color: #667eea;
}

.stat-card-success .stat-icon {
    background: linear-gradient(135deg, rgba(17, 153, 142, 0.1) 0%, rgba(56, 239, 125, 0.1) 100%);
    color: #11998e;
}

.stat-card-warning .stat-icon {
    background: linear-gradient(135deg, rgba(249, 115, 22, 0.1) 0%, rgba(251, 146, 60, 0.1) 100%);
    color: #f97316;
}

.stat-card-info .stat-icon {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 197, 253, 0.1) 100%);
    color: #3b82f6;
}

/* Stat Content */
.stat-content {
    flex: 1;
}

.stat-label {
    color: #6b7280;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 0.5rem 0;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
    line-height: 1;
}

.stat-card-primary .stat-value {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-success .stat-value {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-warning .stat-value {
    background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card-info .stat-value {
    background: linear-gradient(135deg, #3b82f6 0%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-description {
    color: #9ca3af;
    font-size: 0.85rem;
    margin: 0.5rem 0 0 0;
}

/* Stat Arrow */
.stat-arrow {
    font-size: 1.5rem;
    color: #d1d5db;
    transition: all 0.3s ease;
}

.stat-card:hover .stat-arrow {
    color: #667eea;
    transform: translateX(5px);
}

/* Quick Actions Section */
.quick-actions-section {
    margin-top: 2rem;
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-title i {
    color: #667eea;
    animation: pulse 2s infinite;
}

/* Quick Actions Grid */
.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

/* Action Cards */
.action-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.action-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

.action-card:hover::before {
    opacity: 0.05;
}

.action-card:active {
    transform: translateY(-2px);
}

/* Action Icon */
.action-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.action-card:hover .action-icon {
    transform: scale(1.15) rotate(-5deg);
}

.action-card-primary .action-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-card-success .action-icon {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(17, 153, 142, 0.3);
}

.action-card-info .action-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #93c5fd 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Action Content */
.action-content {
    position: relative;
    z-index: 1;
}

.action-content h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.action-content p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: 1fr;
    }
    
    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
}

/* Loading Animation */
.spinner-border {
    width: 3rem;
    height: 3rem;
    border-width: 0.3rem;
}


/* ============================================
   DataGrid Component Styles
   ============================================ */

.data-grid-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Remove all rounded corners from table elements */
.data-grid-container table,
.data-grid-container table *,
.data-grid-container thead,
.data-grid-container thead *,
.data-grid-container tbody,
.data-grid-container tbody *,
.data-grid-container tr,
.data-grid-container tr *,
.data-grid-container th,
.data-grid-container td {
    border-radius: 0 !important;
}

/* Grid Toolbar */
.grid-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: #f8f9fa;
    border-bottom: 2px solid #e9ecef;
    gap: 1rem;
    flex-wrap: wrap;
    border-radius: 12px 12px 0 0;
}

.search-box {
    position: relative;
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.search-box input {
    padding-left: 38px;
    padding-right: 38px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.search-box input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.15);
}

.search-box .btn-clear {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.search-box .btn-clear:hover {
    background: #f8f9fa;
    color: #495057;
}

/* Data Table */
.table-responsive {
    border-radius: 0 !important;
}

.data-grid-table {
    margin-bottom: 0;
    border-radius: 0 !important;
}

.data-grid-table thead th {
    background: white;
    border-bottom: 2px solid #dee2e6;
    border-top: none;
    font-weight: 600;
    color: #495057;
    padding: 1rem;
    white-space: nowrap;
    user-select: none;
    border-radius: 0 !important;
}

.data-grid-table thead th:first-child {
    border-top-left-radius: 0 !important;
}

.data-grid-table thead th:last-child {
    border-top-right-radius: 0 !important;
}

.data-grid-table tbody tr:first-child td:first-child {
    border-top-left-radius: 0 !important;
}

.data-grid-table tbody tr:first-child td:last-child {
    border-top-right-radius: 0 !important;
}

.data-grid-table thead th.sortable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-grid-table thead th.sortable:hover {
    background: #f8f9fa;
    color: #667eea;
}

.data-grid-table thead th i {
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.data-grid-table tbody td {
    padding: 1rem;
    vertical-align: middle;
    border-bottom: 1px solid #f1f3f5;
    border-radius: 0 !important;
}

.data-grid-table tbody tr {
    transition: all 0.2s ease;
}

.data-grid-table tbody tr:hover {
    background: #f8f9fa;
}

.data-grid-table tbody tr:last-child td {
    border-bottom: none;
}

/* Actions Column */
.actions-column {
    width: 120px;
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.action-buttons .btn {
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

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

/* Pagination */
.grid-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-top: 1px solid #e9ecef;
    flex-wrap: wrap;
    gap: 1rem;
}

.pagination-info {
    color: #6c757d;
    font-size: 0.875rem;
}

.pagination {
    margin: 0;
}

.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
    color: #495057;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s ease;
}

.pagination .page-link:hover:not(.disabled) {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: translateY(-2px);
}

.pagination .page-item.active .page-link {
    background: #667eea;
    border-color: #667eea;
    color: white;
    font-weight: 600;
}

.pagination .page-item.disabled .page-link {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-size-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #6c757d;
}

.page-size-selector select {
    width: auto;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    padding: 0.375rem 2rem 0.375rem 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .grid-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .search-box {
        max-width: 100%;
    }

    .grid-pagination {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }

    .action-buttons {
        flex-direction: column;
    }
}

/* Loading State */
.data-grid-table tbody td .spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Empty State */
.data-grid-table tbody td .bi-inbox {
    opacity: 0.3;
}


/* ============================================
   Page Header Styles
   ============================================ */

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0;
}

.page-header .btn-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.875rem;
    padding: 0.25rem 0;
}

.page-header .btn-link:hover {
    color: #5568d3;
    text-decoration: underline;
}

.page-header .d-flex.gap-2 {
    gap: 0.5rem;
}

/* Card Headers */
.card-header h5 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2d3748;
}

/* Definition Lists */
dl.row {
    margin-bottom: 0;
}

dl.row dt {
    font-weight: 600;
    color: #4a5568;
    padding: 0.75rem 0;
}

dl.row dd {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f5;
}

dl.row dd:last-child {
    border-bottom: none;
}

dl.row code {
    background: #f8f9fa;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    color: #667eea;
    font-size: 0.875rem;
    word-break: break-all;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    max-width: 100%;
    display: inline-block;
}


/* ============================================
   Action Buttons Group (Application Details)
   ============================================ */

.action-buttons-group {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border: 2px solid transparent;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.action-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.action-btn:active:not(:disabled) {
    transform: translateY(0);
}

.action-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.action-btn i {
    font-size: 1rem;
}

/* Edit Button */
.action-btn-edit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.action-btn-edit:hover:not(:disabled) {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Regenerate Button */
.action-btn-regenerate {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%);
    color: white;
    border-color: #ed8936;
}

.action-btn-regenerate:hover:not(:disabled) {
    background: linear-gradient(135deg, #ed8936 0%, #dd6b20 100%);
    box-shadow: 0 4px 12px rgba(237, 137, 54, 0.4);
}

.action-btn-regenerate i {
    animation: rotate-icon 0.6s ease-in-out;
}

.action-btn-regenerate:hover i {
    animation: rotate-icon 0.6s ease-in-out infinite;
}

@keyframes rotate-icon {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Delete Button */
.action-btn-delete {
    background: linear-gradient(135deg, #fc8181 0%, #f56565 100%);
    color: white;
    border-color: #f56565;
}

.action-btn-delete:hover:not(:disabled) {
    background: linear-gradient(135deg, #f56565 0%, #e53e3e 100%);
    box-shadow: 0 4px 12px rgba(245, 101, 101, 0.4);
}

/* Save Button */
.action-btn-save {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    color: white;
    border-color: #38a169;
}

.action-btn-save:hover:not(:disabled) {
    background: linear-gradient(135deg, #38a169 0%, #2f855a 100%);
    box-shadow: 0 4px 12px rgba(72, 187, 120, 0.4);
}

/* Cancel Button */
.action-btn-cancel {
    background: white;
    color: #718096;
    border-color: #e2e8f0;
}

.action-btn-cancel:hover:not(:disabled) {
    background: #f7fafc;
    border-color: #cbd5e0;
    color: #4a5568;
}

/* Responsive */
@media (max-width: 768px) {
    .action-buttons-group {
        flex-wrap: wrap;
    }

    .action-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }

    .action-btn span {
        display: none;
    }

    .action-btn i {
        font-size: 1.25rem;
    }
}


/* ============================================
   User Avatar Styles
   ============================================ */

.user-avatar-sm {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.user-avatar-sm i {
    line-height: 1;
}


/* ============================================
   Spinner Styles for Buttons
   ============================================ */

.btn .spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
    vertical-align: middle;
}

.btn-primary .spinner-border {
    border-color: rgba(255, 255, 255, 0.3);
    border-right-color: white;
}

.btn-secondary .spinner-border {
    border-color: rgba(255, 255, 255, 0.3);
    border-right-color: white;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}


/* Badge mini for sidebar */
.badge-mini {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 600;
}

.badge-mini.bg-success {
    background: #198754 !important;
    color: white;
}


/* ============================================
   MOBILE RESPONSIVE STYLES
   ============================================ */

/* Mobile Navigation Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1100;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 8px;
    padding: 10px 15px;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
}

/* Mobile Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1040;
}

.sidebar-overlay.show {
    display: block;
}

/* Tablet and Mobile Breakpoints */
@media (max-width: 992px) {
    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: block;
    }

    /* Hide sidebar by default on mobile */
    .interactive-sidebar {
        position: fixed;
        left: -280px;
        top: 0;
        bottom: 0;
        z-index: 1050;
        transition: left 0.3s ease;
    }

    .interactive-sidebar.mobile-open {
        left: 0;
    }

    /* Adjust main content for mobile */
    .main-content {
        margin-left: 0 !important;
        padding-top: 70px;
    }

    /* Stack stat cards vertically */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }

    .stat-card {
        margin-bottom: 20px !important;
    }

    /* Ensure proper spacing for stat card links */
    a.stat-card {
        margin-bottom: 20px !important;
        display: block;
    }

    /* Add spacing to row columns */
    .row > [class*="col-"] {
        margin-bottom: 20px;
    }

    .row.mb-4 > [class*="col-"] {
        margin-bottom: 20px !important;
    }

    /* Full width cards on mobile */
    .card {
        margin-bottom: 20px;
    }

    /* Responsive tables */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Stack form columns */
    .row.g-3 > [class*="col-"] {
        margin-bottom: 15px;
    }

    /* Smaller page headers */
    .page-header h1 {
        font-size: 24px;
    }

    .dashboard-title {
        font-size: 24px;
    }

    /* Adjust modal for mobile */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }

    /* Smaller buttons on mobile */
    .btn-group {
        flex-wrap: wrap;
    }

    .btn-group .btn {
        margin-bottom: 5px;
    }
}

@media (max-width: 768px) {
    /* Even smaller screens */
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    /* Stack all columns with proper spacing */
    .col-md-6,
    .col-md-4,
    .col-md-3,
    .col-lg-6,
    .col-lg-8,
    .col-lg-4 {
        width: 100%;
        margin-bottom: 20px !important;
        padding-bottom: 0;
    }

    /* Ensure last column doesn't have extra margin */
    .row > [class*="col-"]:last-child {
        margin-bottom: 20px !important;
    }

    /* Add consistent spacing for all cards */
    .card {
        margin-bottom: 20px !important;
    }

    /* Stat cards need consistent spacing */
    .stat-card,
    a.stat-card,
    div.stat-card {
        margin-bottom: 20px !important;
    }

    /* Smaller stat card text */
    .stat-card h3,
    .stat-content h3 {
        font-size: 24px;
    }

    .stat-card p,
    .stat-content p {
        font-size: 12px;
    }

    /* Compact DataGrid */
    .data-grid-header {
        flex-direction: column;
        align-items: stretch;
    }

    .data-grid-search {
        margin-bottom: 10px;
        width: 100%;
    }

    .data-grid-actions {
        width: 100%;
    }

    .data-grid-actions button {
        width: 100%;
    }

    /* Hide less important table columns on mobile */
    .table th:nth-child(n+4),
    .table td:nth-child(n+4) {
        display: none;
    }

    /* Show important columns only */
    .table th:nth-child(1),
    .table th:nth-child(2),
    .table th:nth-child(3),
    .table td:nth-child(1),
    .table td:nth-child(2),
    .table td:nth-child(3) {
        display: table-cell;
    }

    /* Smaller chart heights */
    canvas {
        max-height: 250px !important;
    }

    /* Stack action buttons vertically */
    .modal-footer {
        flex-direction: column;
    }

    .modal-footer .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    /* Compact pagination */
    .data-grid-pagination {
        flex-direction: column;
        text-align: center;
    }

    .pagination {
        margin-top: 10px;
    }
}

@media (max-width: 576px) {
    /* Extra small screens */
    .page-header {
        padding: 15px 0;
    }

    .page-header h1 {
        font-size: 20px;
    }

    .page-header p {
        font-size: 12px;
    }

    /* Smaller cards */
    .card {
        border-radius: 8px;
    }

    .card-header h5 {
        font-size: 16px;
    }

    /* Compact forms */
    .form-label {
        font-size: 14px;
    }

    .form-control,
    .form-select {
        font-size: 14px;
        padding: 8px 12px;
    }

    /* Smaller badges */
    .badge {
        font-size: 10px;
        padding: 4px 8px;
    }

    /* Compact list items */
    .list-group-item {
        padding: 10px;
    }

    .list-group-item h6 {
        font-size: 14px;
    }

    .list-group-item small {
        font-size: 11px;
    }

    /* Hide sidebar toggle button text */
    .sidebar-toggle span {
        display: none;
    }

    /* Smaller stat icons */
    .stat-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    /* Compact alerts */
    .alert {
        padding: 10px;
        font-size: 13px;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 992px) and (orientation: landscape) {
    .interactive-sidebar {
        width: 200px;
    }

    .main-content {
        padding-top: 60px;
    }

    .stat-card {
        padding: 15px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }

    .nav-item {
        min-height: 48px;
    }

    .form-control,
    .form-select {
        min-height: 44px;
    }

    /* Remove hover effects on touch devices */
    .stat-card:hover {
        transform: none;
    }

    .btn:hover {
        transform: none;
    }

    /* Larger clickable areas */
    .btn-close {
        padding: 12px;
    }

    .pagination .page-link {
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* Print styles */
@media print {
    .interactive-sidebar,
    .mobile-menu-toggle,
    .btn,
    .sidebar-toggle,
    .data-grid-actions,
    .modal {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .card {
        break-inside: avoid;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .stat-card {
        border: 2px solid currentColor;
    }

    .btn {
        border: 2px solid currentColor;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}


/* Mobile DataGrid Enhancements */
@media (max-width: 768px) {
    /* Card-based layout for mobile */
    .data-grid-mobile-card {
        display: block;
        border: 1px solid #dee2e6;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 15px;
        background: white;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .data-grid-mobile-card:hover {
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    }

    .data-grid-mobile-header {
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 10px;
        color: #212529;
    }

    .data-grid-mobile-row {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #f0f0f0;
    }

    .data-grid-mobile-row:last-child {
        border-bottom: none;
    }

    .data-grid-mobile-label {
        font-weight: 500;
        color: #6c757d;
        font-size: 13px;
    }

    .data-grid-mobile-value {
        font-size: 14px;
        color: #212529;
        text-align: right;
    }

    .data-grid-mobile-actions {
        margin-top: 15px;
        padding-top: 15px;
        border-top: 2px solid #f0f0f0;
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
    }

    .data-grid-mobile-actions .btn {
        flex: 1;
        min-width: calc(50% - 4px);
    }

    /* Hide desktop table on mobile */
    .data-grid-table-desktop {
        display: none;
    }

    /* Show mobile cards */
    .data-grid-mobile {
        display: block;
    }
}

@media (min-width: 769px) {
    /* Hide mobile cards on desktop */
    .data-grid-mobile {
        display: none;
    }

    /* Show desktop table */
    .data-grid-table-desktop {
        display: table;
    }
}

/* Mobile-friendly modals */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }

    .modal-content {
        height: 100%;
        border-radius: 0;
        border: none;
    }

    .modal-body {
        overflow-y: auto;
        max-height: calc(100vh - 120px);
    }

    .modal-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 1;
        border-bottom: 2px solid #dee2e6;
    }

    .modal-footer {
        position: sticky;
        bottom: 0;
        background: white;
        z-index: 1;
        border-top: 2px solid #dee2e6;
    }
}

/* Swipe gestures hint */
.swipe-hint {
    display: none;
    text-align: center;
    padding: 10px;
    color: #6c757d;
    font-size: 12px;
}

@media (max-width: 768px) {
    .swipe-hint {
        display: block;
    }
}

/* Mobile-optimized charts */
@media (max-width: 768px) {
    .chart-container {
        position: relative;
        height: 250px;
        margin-bottom: 20px;
    }

    canvas {
        max-height: 250px !important;
        width: 100% !important;
    }

    /* Stack chart cards */
    .row > [class*="col-"] {
        margin-bottom: 20px;
    }
}

/* Mobile navigation improvements */
@media (max-width: 992px) {
    .nav-item {
        padding: 12px 20px;
        font-size: 16px;
    }

    .nav-item i {
        font-size: 20px;
        margin-right: 15px;
    }

    .nav-group-header {
        padding: 12px 20px;
        font-size: 16px;
    }

    .sub-item {
        padding: 10px 20px 10px 50px;
    }
}

/* Improved touch feedback */
@media (hover: none) {
    .btn:active,
    .nav-item:active,
    .stat-card:active {
        opacity: 0.7;
        transform: scale(0.98);
    }

    .form-control:focus,
    .form-select:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    }
}

/* Loading states for mobile */
.mobile-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    padding: 40px 20px;
}

.mobile-loading .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 15px;
}

.mobile-loading-text {
    color: #6c757d;
    font-size: 14px;
}

/* Mobile-friendly alerts */
@media (max-width: 576px) {
    .alert {
        border-radius: 0;
        margin-left: -15px;
        margin-right: -15px;
        border-left: none;
        border-right: none;
    }

    .alert-dismissible .btn-close {
        padding: 15px;
    }
}

/* Sticky headers on mobile */
@media (max-width: 768px) {
    .page-header {
        position: sticky;
        top: 0;
        background: white;
        z-index: 100;
        padding: 15px;
        margin: -15px -15px 15px -15px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}

/* Bottom navigation for mobile (optional future enhancement) */
.mobile-bottom-nav {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: white;
        border-top: 1px solid #dee2e6;
        padding: 8px 0;
        z-index: 1000;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .mobile-bottom-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 8px;
        color: #6c757d;
        text-decoration: none;
        font-size: 11px;
    }

    .mobile-bottom-nav-item i {
        font-size: 20px;
        margin-bottom: 4px;
    }

    .mobile-bottom-nav-item.active {
        color: #0d6efd;
    }

    /* Add padding to content for bottom nav */
    .modern-content {
        padding-bottom: 70px;
    }
}


/* ============================================
   GLOBAL SEARCH STYLES
   ============================================ */

.global-search-container {
    position: relative;
    width: 100%;
    max-width: 600px;
}

.global-search-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 10px 15px;
    transition: all 0.3s ease;
}

.global-search-wrapper.focused {
    border-color: #0d6efd;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.1);
}

.search-icon {
    color: #6c757d;
    font-size: 18px;
    margin-right: 10px;
}

.global-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 15px;
    color: #212529;
    background: transparent;
}

.global-search-input::placeholder {
    color: #adb5bd;
}

.search-clear {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.search-clear:hover {
    background: #f8f9fa;
    color: #212529;
}

.search-loading {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}

/* Search Results Dropdown */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    max-height: 500px;
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

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

.search-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
}

.btn-close-results {
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.btn-close-results:hover {
    background: #e9ecef;
    color: #212529;
}

.search-results-list {
    max-height: 400px;
    overflow-y: auto;
}

.search-category {
    border-bottom: 1px solid #f0f0f0;
}

.search-category:last-child {
    border-bottom: none;
}

.search-category-header {
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 700;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #212529;
    transition: all 0.2s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.search-result-item:hover,
.search-result-item.selected {
    background: #f8f9fa;
    border-left-color: #0d6efd;
}

.result-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    margin-right: 12px;
    flex-shrink: 0;
}

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

.result-title {
    font-weight: 600;
    font-size: 14px;
    color: #212529;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-subtitle {
    font-size: 12px;
    color: #6c757d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-type {
    margin-left: 12px;
}

.result-type .badge {
    font-size: 10px;
    padding: 4px 8px;
}

.search-results-footer {
    padding: 10px 16px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    text-align: center;
}

.search-results-footer i {
    margin: 0 2px;
}

.search-no-results {
    padding: 40px 20px;
    text-align: center;
    color: #6c757d;
}

.search-no-results i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.search-no-results p {
    margin-bottom: 8px;
    color: #212529;
}

/* Icon colors by type */
.search-result-item:nth-child(4n+1) .result-icon {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.search-result-item:nth-child(4n+2) .result-icon {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.search-result-item:nth-child(4n+3) .result-icon {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.search-result-item:nth-child(4n+4) .result-icon {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .global-search-container {
        max-width: 100%;
    }

    .global-search-wrapper {
        padding: 8px 12px;
    }

    .global-search-input {
        font-size: 14px;
    }

    .search-results-dropdown {
        max-height: 400px;
    }

    .search-results-list {
        max-height: 300px;
    }

    .search-result-item {
        padding: 10px 12px;
    }

    .result-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }

    .result-title {
        font-size: 13px;
    }

    .result-subtitle {
        font-size: 11px;
    }

    .search-results-footer {
        font-size: 11px;
    }
}

/* Keyboard shortcut hint */
.search-shortcut-hint {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #adb5bd;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #e9ecef;
    pointer-events: none;
}

/* Scrollbar styling */
.search-results-list::-webkit-scrollbar {
    width: 6px;
}

.search-results-list::-webkit-scrollbar-track {
    background: #f8f9fa;
}

.search-results-list::-webkit-scrollbar-thumb {
    background: #dee2e6;
    border-radius: 3px;
}

.search-results-list::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.search-loading .spinner-border {
    animation: spin 0.75s linear infinite;
}


/* Header Layout for Global Search */
.ultra-modern-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: white;
    border-bottom: 1px solid #e9ecef;
    gap: 20px;
}

.header-left {
    flex-shrink: 0;
}

.header-center {
    flex: 1;
    max-width: 600px;
    margin: 0 auto;
}

.header-right {
    flex-shrink: 0;
}

.breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #6c757d !important;
}

.breadcrumb-nav i {
    color: #6c757d !important;
}

.breadcrumb-separator {
    color: #dee2e6 !important;
}

.breadcrumb-current {
    font-weight: 600;
    color: #212529 !important;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: #f8f9fa;
    color: #6c757d !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.header-icon-btn i {
    color: #6c757d !important;
}

.header-icon-btn:hover {
    background: #e9ecef;
    color: #212529 !important;
}

.header-icon-btn:hover i {
    color: #212529 !important;
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #dc3545;
    border-radius: 50%;
    border: 2px solid white;
}

.header-divider {
    width: 1px;
    height: 30px;
    background: #dee2e6;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    border-radius: 12px;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.2s ease;
}

.user-profile-btn:hover {
    background: #e9ecef;
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #212529 !important;
    line-height: 1.2;
}

.user-role {
    font-size: 11px;
    color: #6c757d !important;
    line-height: 1.2;
}

.dropdown-icon {
    font-size: 12px;
    color: #6c757d !important;
}

/* Mobile Header */
@media (max-width: 992px) {
    .ultra-modern-header {
        flex-wrap: wrap;
        padding: 15px;
    }

    .header-left {
        order: 1;
        flex: 1;
    }

    .header-right {
        order: 2;
    }

    .header-center {
        order: 3;
        width: 100%;
        max-width: 100%;
        margin-top: 15px;
    }

    .header-actions {
        gap: 8px;
    }

    .user-details {
        display: none;
    }

    .dropdown-icon {
        display: none;
    }
}

@media (max-width: 576px) {
    .ultra-modern-header {
        padding: 10px;
    }

    .header-icon-btn {
        width: 36px;
        height: 36px;
    }

    .user-avatar {
        width: 32px;
        height: 32px;
        font-size: 16px;
    }

    .breadcrumb-nav {
        font-size: 12px;
    }
}


/* Search Hints Dropdown */
.search-hints-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.2s ease;
}

.search-hints-header {
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-hints-list {
    padding: 8px 0;
}

.search-hint-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    transition: background 0.2s ease;
}

.search-hint-item:hover {
    background: #f8f9fa;
}

.search-hint-item code {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    color: #0d6efd;
    font-weight: 600;
    border: 1px solid #e9ecef;
}

.search-hint-item span {
    font-size: 13px;
    color: #6c757d;
}

.search-hints-footer {
    padding: 10px 16px;
    border-top: 1px solid #e9ecef;
    background: #f8f9fa;
    text-align: center;
}

.search-hints-footer code {
    background: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    color: #0d6efd;
    border: 1px solid #e9ecef;
}

/* Active filter badge in search input */
.search-filter-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #e7f3ff;
    color: #0d6efd;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-right: 4px;
}

.search-filter-badge i {
    font-size: 10px;
    cursor: pointer;
}

.search-filter-badge i:hover {
    color: #0a58ca;
}

/* Mobile hints */
@media (max-width: 768px) {
    .search-hints-dropdown {
        max-height: 300px;
        overflow-y: auto;
    }

    .search-hint-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .search-hint-item code {
        font-size: 11px;
    }

    .search-hint-item span {
        font-size: 12px;
    }
}


/* Enhanced Search Syntax Highlighting */
.search-hint-item code .keyword {
    color: #0d6efd;
    font-weight: 700;
    background: linear-gradient(135deg, #e7f3ff 0%, #cfe7ff 100%);
    padding: 2px 4px;
    border-radius: 3px;
    margin-right: 2px;
}

.search-hint-item {
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.search-hint-item:hover {
    background: linear-gradient(135deg, #f0f8ff 0%, #e7f3ff 100%);
    border-left-color: #0d6efd;
    transform: translateX(4px);
}

.search-hint-item:active {
    background: linear-gradient(135deg, #e7f3ff 0%, #d0e9ff 100%);
    transform: translateX(2px);
}

.search-hint-item code {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-right: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.search-hint-item:hover code {
    background: white;
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.search-hints-header {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    color: white;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-hints-header i {
    font-size: 16px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.search-hints-footer {
    padding: 12px 16px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.search-hints-footer code {
    background: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    border: 1px solid #dee2e6;
}

.search-hints-footer code .keyword {
    color: #0d6efd;
    font-weight: 700;
}

/* Search input with syntax awareness */
.global-search-input {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

.global-search-input::placeholder {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Clickable hint indicator */
.search-hint-item::after {
    content: '→';
    position: absolute;
    right: 16px;
    opacity: 0;
    transition: all 0.2s ease;
    color: #0d6efd;
    font-weight: bold;
}

.search-hint-item {
    position: relative;
}

.search-hint-item:hover::after {
    opacity: 1;
    right: 12px;
}

/* Enhanced hint list */
.search-hints-list {
    padding: 8px 0;
    max-height: 320px;
    overflow-y: auto;
}

.search-hints-list::-webkit-scrollbar {
    width: 6px;
}

.search-hints-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.search-hints-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 3px;
}

.search-hints-list::-webkit-scrollbar-thumb:hover {
    background: #a0aec0;
}

/* Hint item layout */
.search-hint-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    gap: 12px;
}

.search-hint-item span {
    color: #6c757d;
    font-size: 13px;
    flex: 1;
}

/* Mobile optimizations for hints */
@media (max-width: 768px) {
    .search-hints-dropdown {
        max-height: 300px;
    }
    
    .search-hint-item {
        padding: 12px 16px;
    }
    
    .search-hint-item code {
        font-size: 12px;
    }
    
    .search-hint-item span {
        font-size: 12px;
    }
}

/* Touch feedback for mobile */
@media (hover: none) {
    .search-hint-item:active {
        background: linear-gradient(135deg, #d0e9ff 0%, #b8dcff 100%);
    }
}


/* Subtle Inline Loading Indicator */
.search-loading-inline {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    z-index: 1000;
    animation: fadeIn 0.2s ease;
}

.search-loading-bar {
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #0d6efd 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.search-loading-text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    color: #6c757d;
    font-size: 13px;
}

.search-loading-text i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

/* Remove old loading styles */
.search-loading {
    display: none;
}

/* Alternative: Minimal loading indicator inside search box */
.global-search-input.loading {
    background-image: linear-gradient(90deg, 
        transparent 0%, 
        rgba(13, 110, 253, 0.1) 50%, 
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* Loading state for search icon */
.search-icon.loading {
    animation: spin 1s linear infinite;
}

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

/* Skeleton loading for results (alternative) */
.search-skeleton {
    padding: 12px 16px;
    animation: pulse 1.5s ease-in-out infinite;
}

.search-skeleton-line {
    height: 12px;
    background: linear-gradient(90deg, 
        #f0f0f0 25%, 
        #e0e0e0 50%, 
        #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 4px;
    margin-bottom: 8px;
}

.search-skeleton-line:last-child {
    width: 60%;
    margin-bottom: 0;
}

/* Mobile loading optimizations */
@media (max-width: 768px) {
    .search-loading-text {
        padding: 12px;
        font-size: 12px;
    }
}

/* User Profile Dropdown */
.user-profile-dropdown {
    position: relative;
}

.user-profile-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.user-profile-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.user-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
}

.user-name {
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    line-height: 1.2;
}

.user-role {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.2;
}

.dropdown-icon {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.3s ease;
}

.dropdown-icon.rotated {
    transform: rotate(180deg);
}

/* User Dropdown Menu */
.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 280px;
    background: #1e1e2e;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    animation: dropdownSlideIn 0.2s ease;
    overflow: hidden;
}

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

.dropdown-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.dropdown-user-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-user-name {
    font-size: 16px;
    font-weight: 600;
    color: white;
    line-height: 1.2;
}

.dropdown-user-email {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: rgba(255, 255, 255, 0.85) !important;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(102, 126, 234, 0.15);
    color: #a8b5ff !important;
}

.dropdown-item:visited {
    color: rgba(255, 255, 255, 0.85) !important;
}

.dropdown-item i {
    font-size: 18px;
    width: 20px;
    text-align: center;
    color: rgba(255, 255, 255, 0.7) !important;
}

.dropdown-item span {
    flex: 1;
    color: rgba(255, 255, 255, 0.85) !important;
}

.dropdown-item:hover i {
    color: #a8b5ff !important;
}

.dropdown-item:hover span {
    color: #a8b5ff !important;
}

/* Primary actions (Dashboard, Profile) */
.dropdown-item[href*="admin"]:not([href*="help"]):not([href*="docs"]):not([href*="settings"]):not([href*="activity"]) i {
    color: #667eea !important;
}

.dropdown-item[href*="profile"] i {
    color: #667eea !important;
}

/* Settings and configuration */
.dropdown-item[href*="settings"] i {
    color: #ffa726 !important;
}

.dropdown-item[href*="settings"]:hover {
    background: rgba(255, 167, 38, 0.1);
}

/* Activity and logs */
.dropdown-item[href*="activity"] i {
    color: #26c6da !important;
}

.dropdown-item[href*="activity"]:hover {
    background: rgba(38, 198, 218, 0.1);
}

/* Help and documentation */
.dropdown-item[href*="help"] i,
.dropdown-item[href*="docs"] i {
    color: #66bb6a !important;
}

.dropdown-item[href*="help"]:hover,
.dropdown-item[href*="docs"]:hover {
    background: rgba(102, 187, 106, 0.1);
}

/* Danger actions (Logout) */
.dropdown-item-danger {
    color: #ff6b6b !important;
}

.dropdown-item-danger i {
    color: #ff6b6b !important;
}

.dropdown-item-danger span {
    color: #ff6b6b !important;
}

.dropdown-item-danger:hover {
    background: rgba(255, 107, 107, 0.15) !important;
    color: #ff8787 !important;
}

.dropdown-item-danger:hover i,
.dropdown-item-danger:hover span {
    color: #ff8787 !important;
}

/* Dropdown Backdrop */
.dropdown-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-icon-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
}

.header-icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: white;
    transform: translateY(-2px);
}

.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #ff6b6b;
    border-radius: 50%;
    border: 2px solid #1e1e2e;
}

.header-divider {
    width: 1px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .user-details {
        display: none;
    }
    
    .user-dropdown-menu {
        width: 260px;
    }
    
    .header-icon-btn {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}


/* ============================================
   ENHANCED MOBILE RESPONSIVENESS
   ============================================ */

/* Main Layout Mobile Improvements - CRITICAL OVERRIDES */
@media (max-width: 992px) {
    .page {
        display: flex !important;
        flex-direction: column !important;
        position: relative !important;
        overflow-x: hidden !important;
    }

    .sidebar,
    .interactive-sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 280px !important;
        max-width: 80vw !important;
        height: 100vh !important;
        z-index: 1050 !important;
        transition: left 0.3s ease !important;
        background: linear-gradient(180deg, #1e1e2e 0%, #16161f 100%) !important;
        box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .sidebar.show,
    .interactive-sidebar.show {
        left: 0 !important;
    }

    main {
        width: 100% !important;
        margin-left: 0 !important;
        padding-top: 0 !important;
        min-height: 100vh !important;
        flex: 1 !important;
    }

    .modern-content,
    article {
        padding: 15px !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* Mobile menu overlay */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1040;
    }

    .mobile-overlay.show {
        display: block;
    }

    /* Hamburger menu button */
    .mobile-menu-btn {
        display: block !important;
        position: fixed;
        top: 10px;
        left: 10px;
        z-index: 1060;
        background: white;
        border: none;
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        cursor: pointer;
    }

    .mobile-menu-btn i {
        font-size: 24px;
        color: #333;
    }
}

@media (min-width: 993px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .mobile-overlay {
        display: none !important;
    }
}

/* Container Fluid Mobile */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .row {
        margin-left: -10px;
        margin-right: -10px;
    }

    .col, [class*="col-"] {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* Page Header Mobile */
@media (max-width: 768px) {
    .page-header {
        margin-bottom: 15px !important;
        padding: 15px 0 !important;
    }

    .page-header h1 {
        font-size: 24px !important;
        margin-bottom: 5px !important;
    }

    .page-header p {
        font-size: 13px !important;
    }
}

/* Cards Mobile */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px !important;
        border-radius: 8px !important;
    }

    .card-header {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }

    .card-body {
        padding: 15px !important;
    }

    .modern-card {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    }
}

/* Buttons Mobile */
@media (max-width: 768px) {
    .btn {
        padding: 10px 16px !important;
        font-size: 14px !important;
    }

    .btn-lg {
        padding: 12px 20px !important;
        font-size: 16px !important;
    }

    .btn-sm {
        padding: 6px 12px !important;
        font-size: 12px !important;
    }

    .action-buttons-group {
        flex-direction: column !important;
        gap: 8px !important;
    }

    .action-btn {
        width: 100% !important;
        justify-content: center !important;
    }
}

/* Forms Mobile */
@media (max-width: 768px) {
    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        padding: 10px 12px !important;
    }

    .form-label {
        font-size: 14px !important;
        margin-bottom: 6px !important;
    }

    .input-group {
        flex-wrap: nowrap !important;
    }

    .input-group .btn {
        white-space: nowrap !important;
    }
}

/* Tables Mobile - Force Horizontal Scroll */
@media (max-width: 768px) {
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
        margin-bottom: 15px !important;
    }

    .table {
        min-width: 600px !important;
        font-size: 13px !important;
    }

    .table th,
    .table td {
        padding: 8px !important;
        white-space: nowrap !important;
    }
}

/* Modals Mobile */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0 !important;
        max-width: 100% !important;
        height: 100vh !important;
    }

    .modal-content {
        height: 100% !important;
        border-radius: 0 !important;
    }

    .modal-header {
        padding: 15px !important;
    }

    .modal-body {
        padding: 15px !important;
        overflow-y: auto !important;
    }

    .modal-footer {
        padding: 15px !important;
        flex-direction: column !important;
    }

    .modal-footer .btn {
        width: 100% !important;
        margin: 5px 0 !important;
    }
}

/* Alerts Mobile */
@media (max-width: 768px) {
    .alert {
        padding: 12px 15px !important;
        font-size: 14px !important;
        margin-bottom: 15px !important;
    }

    .alert i {
        font-size: 16px !important;
    }
}

/* Badges Mobile */
@media (max-width: 768px) {
    .badge {
        font-size: 11px !important;
        padding: 4px 8px !important;
    }
}

/* Grid Columns Mobile */
@media (max-width: 768px) {
    .row.g-3 {
        --bs-gutter-x: 1rem !important;
        --bs-gutter-y: 1rem !important;
    }

    .row.g-4 {
        --bs-gutter-x: 1.5rem !important;
        --bs-gutter-y: 1.5rem !important;
    }
}

/* Stat Cards Mobile */
@media (max-width: 768px) {
    .stat-card {
        padding: 15px !important;
    }

    .stat-card h3 {
        font-size: 28px !important;
    }

    .stat-card p {
        font-size: 13px !important;
    }
}

/* Navigation Mobile */
@media (max-width: 992px) {
    .nav-item {
        padding: 14px 20px !important;
        font-size: 15px !important;
    }

    .nav-item i {
        font-size: 20px !important;
        margin-right: 12px !important;
    }
}

/* Dropdown Mobile */
@media (max-width: 768px) {
    .dropdown-menu {
        font-size: 14px !important;
        min-width: 200px !important;
    }

    .dropdown-item {
        padding: 10px 15px !important;
    }
}

/* List Groups Mobile */
@media (max-width: 768px) {
    .list-group-item {
        padding: 12px 15px !important;
        font-size: 14px !important;
    }
}

/* Breadcrumbs Mobile */
@media (max-width: 768px) {
    .breadcrumb {
        font-size: 13px !important;
        padding: 8px 12px !important;
    }
}

/* Pagination Mobile */
@media (max-width: 768px) {
    .pagination {
        font-size: 14px !important;
    }

    .page-link {
        padding: 8px 12px !important;
    }
}

/* Tabs Mobile */
@media (max-width: 768px) {
    .nav-tabs {
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .nav-tabs .nav-link {
        white-space: nowrap !important;
        font-size: 14px !important;
        padding: 10px 15px !important;
    }
}

/* Progress Bars Mobile */
@media (max-width: 768px) {
    .progress {
        height: 8px !important;
    }
}

/* Tooltips Mobile - Disable on touch devices */
@media (hover: none) {
    [data-bs-toggle="tooltip"] {
        pointer-events: none !important;
    }
}

/* Spacing Utilities Mobile */
@media (max-width: 768px) {
    .mb-4 {
        margin-bottom: 1rem !important;
    }

    .mb-5 {
        margin-bottom: 1.5rem !important;
    }

    .mt-4 {
        margin-top: 1rem !important;
    }

    .mt-5 {
        margin-top: 1.5rem !important;
    }

    .p-4 {
        padding: 1rem !important;
    }

    .p-5 {
        padding: 1.5rem !important;
    }
}

/* Text Sizes Mobile */
@media (max-width: 768px) {
    h1 {
        font-size: 24px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    h3 {
        font-size: 20px !important;
    }

    h4 {
        font-size: 18px !important;
    }

    h5 {
        font-size: 16px !important;
    }

    h6 {
        font-size: 14px !important;
    }

    .lead {
        font-size: 18px !important;
    }

    small, .small {
        font-size: 12px !important;
    }
}

/* Fix Horizontal Overflow */
@media (max-width: 768px) {
    body {
        overflow-x: hidden !important;
    }

    .page,
    main,
    .modern-content {
        overflow-x: hidden !important;
    }

    * {
        max-width: 100% !important;
    }

    pre, code {
        max-width: 100% !important;
        overflow-x: auto !important;
        word-wrap: break-word !important;
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    a, button, .btn, .nav-link, .dropdown-item {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Remove hover effects on touch */
    .btn:hover,
    .nav-item:hover,
    .card:hover {
        transform: none !important;
    }

    /* Add active states instead */
    .btn:active {
        transform: scale(0.98) !important;
    }
}

/* Landscape Mode Adjustments */
@media (max-width: 992px) and (orientation: landscape) {
    .sidebar {
        width: 240px !important;
    }

    .page-header {
        padding: 10px 0 !important;
    }

    .page-header h1 {
        font-size: 20px !important;
    }
}

/* Extra Small Devices */
@media (max-width: 576px) {
    .container-fluid {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    .card {
        border-radius: 6px !important;
    }

    .btn {
        font-size: 13px !important;
        padding: 8px 14px !important;
    }

    .page-header h1 {
        font-size: 20px !important;
    }
}

/* Prevent Text Selection on UI Elements */
@media (max-width: 768px) {
    .btn, .nav-link, .badge, .alert .btn-close {
        -webkit-user-select: none !important;
        user-select: none !important;
    }
}

/* Safe Area Insets for Notched Devices */
@supports (padding: max(0px)) {
    @media (max-width: 992px) {
        .sidebar {
            padding-left: max(20px, env(safe-area-inset-left)) !important;
            padding-right: max(20px, env(safe-area-inset-right)) !important;
        }

        main {
            padding-left: max(0px, env(safe-area-inset-left)) !important;
            padding-right: max(0px, env(safe-area-inset-right)) !important;
        }

        .mobile-menu-btn {
            left: max(10px, env(safe-area-inset-left)) !important;
        }
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 2100;
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.6);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle i {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 1999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Show mobile menu button on mobile */
@media (max-width: 640.98px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Mobile sidebar open state */
    .sidebar.mobile-open,
    .interactive-sidebar.mobile-open {
        display: block !important;
        left: 0 !important;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
}

/* Sidebar slide animation on mobile */
@media (max-width: 640.98px) {
    .sidebar,
    .interactive-sidebar {
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Scope Check Items */
.scope-check-item {
    padding: 0.75rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.scope-check-item:hover {
    border-color: #667eea;
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(102, 126, 234, 0.1);
}

.scope-check-item .form-check-input:checked ~ .form-check-label {
    color: #667eea;
}

.scope-check-item .form-check-label {
    cursor: pointer;
    width: 100%;
    margin-left: 0.5rem;
}

.scope-check-item .form-check-label strong {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.scope-check-item .form-check-label small {
    font-size: 0.75rem;
    line-height: 1.3;
}

.scope-check-item .form-check-label i {
    margin-right: 0.5rem;
}
