/* CSS Variables */
:root {
    --primary-color: #1e3c72;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;

    --card-bg: #ffffff;
    --card-header-bg: #f8f9fa;
    --border-color: #dee2e6;
    --text-color: #495057;
    --text-muted: #6c757d;

    --sidebar-width: 240px;
    --navbar-height: 60px;
    --content-padding: 2rem;

    /* Tailwind-like color palette */
    --gradient-primary: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --accent-blue: #3b82f6;
    --accent-red: #ef4444;
    --secondary-bg: #f8f9fa;
    --tertiary-bg: #e9ecef;
    --hover-bg: rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-xl: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    --primary-bg: #ffffff;
    --text-primary: #212529;
    --text-secondary: #6c757d;
}

/* Purple button styles */
.btn-outline-purple {
    color: #6f42c1;
    border-color: #6f42c1;
}

.btn-outline-purple:hover {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.text-purple {
    color: #6f42c1 !important;
}

/* Dark mode adjustments */
[data-theme="dark"] {
    --card-bg: #1e293b;
    --card-header-bg: #0f172a;
    --border-color: #334155;
    --text-color: #f1f5f9;
    --text-muted: #cbd5e1;
    --secondary-bg: #0f172a;
    --tertiary-bg: #1e293b;
    --hover-bg: rgba(255, 255, 255, 0.1);
    --primary-bg: #020617;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --light-color: #020617;

    /* Enhanced dark mode colors */
    --success-color: #22c55e;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #f8fafc;
}

/* Base styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--light-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
    transition: all 0.3s ease;
}

[data-theme="dark"] body {
    background-color: var(--primary-bg);
    color: var(--text-primary);
}

/* TopNavbar */
.top-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--navbar-height);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
}

[data-theme="light"] .top-navbar {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
}

[data-theme="dark"] .top-navbar {
    background: rgba(2, 6, 23, 0.95);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.navbar-left {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 0 0 auto;
}

.sidebar-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

[data-theme="light"] .sidebar-toggle {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .sidebar-toggle:hover {
    background: rgba(0, 0, 0, 0.12);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary) !important;
    text-decoration: none;
    gap: 0.75rem;
    flex-shrink: 0;
}

.brand-logo {
    height: 32px;
    width: auto;
    object-fit: contain;
    filter: brightness(1.1);
}

.brand-text {
    white-space: nowrap;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

@media (max-width: 768px) {
    .brand-logo {
        height: 26px;
    }

    .navbar-brand {
        font-size: 0.95rem;
        gap: 0.5rem;
    }
}

.navbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    max-width: 500px;
    width: 100%;
    padding: 0 1.5rem;
}

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

.search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    color: var(--text-primary);
    padding: 0.875rem 1.25rem 0.875rem 3.25rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
    font-weight: 400;
}

[data-theme="light"] .search-input {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .search-input:focus {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

[data-theme="light"] .search-input::placeholder {
    color: rgba(0, 0, 0, 0.5);
}

.search-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    outline: none;
    transform: translateY(-1px);
}

.search-container .bi-search {
    position: absolute;
    left: 1.125rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.6);
    pointer-events: none;
    font-size: 0.9rem;
}

[data-theme="light"] .search-container .bi-search {
    color: rgba(0, 0, 0, 0.5);
}

.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 1070;
    display: none;
}

.search-results.show {
    display: block;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.search-result-item:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

.search-result-icon {
    margin-right: 0.75rem;
    width: 20px;
    text-align: center;
}

.search-result-content {
    flex: 1;
}

.search-result-title {
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.search-result-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.navbar-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    margin-left: auto;
}

/* Mobile Search */
.mobile-search-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.mobile-search-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    transform: translateY(-1px);
}

[data-theme="light"] .mobile-search-toggle {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mobile-search-toggle:hover {
    background: rgba(0, 0, 0, 0.12);
}

.mobile-search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1070;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.mobile-search-container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    margin: 1.5rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 3rem);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

[data-theme="light"] .mobile-search-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.mobile-search-header {
    display: flex;
    align-items: center;
    padding: 1.25rem 1.75rem;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 1rem;
}

[data-theme="light"] .mobile-search-header {
    background: rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-search-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--text-primary);
    font-size: 1.125rem;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

.mobile-search-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px);
}

[data-theme="light"] .mobile-search-close {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .mobile-search-close:hover {
    background: rgba(0, 0, 0, 0.12);
}

.mobile-search-header span {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    letter-spacing: -0.01em;
}

.mobile-search-input-container {
    position: relative;
    padding: 1.25rem 1.75rem;
}

.mobile-search-input-container .bi-search {
    position: absolute;
    left: 3rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    font-size: 0.9rem;
}

.mobile-search-input {
    width: 100%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    color: var(--text-primary);
    padding: 1rem 1.25rem 1rem 3.25rem;
    font-size: 1rem;
    font-weight: 400;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .mobile-search-input {
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-search-input::placeholder {
    color: var(--text-secondary);
    font-weight: 400;
}

.mobile-search-input:focus {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
    outline: none;
    transform: translateY(-1px);
}

[data-theme="light"] .mobile-search-input:focus {
    background: rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.12);
    box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.06);
}

.mobile-search-results {
    flex: 1;
    overflow-y: auto;
    max-height: 400px;
}

.theme-toggle {
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 12px;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    height: 44px;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.18);
    color: var(--text-primary);
    transform: translateY(-1px);
}

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .theme-toggle:hover {
    background: rgba(0, 0, 0, 0.12);
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: var(--navbar-height);
    left: 0;
    width: 80px;
    height: calc(100vh - var(--navbar-height));
    background: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    z-index: 1040;
    overflow-y: auto;
    overflow-x: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .sidebar {
    background: rgba(2, 6, 23, 0.98);
    border-right: 1px solid rgba(51, 65, 85, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .sidebar {
        top: calc(var(--navbar-height) + 50px);
        height: calc(100vh - var(--navbar-height) - 50px);
    }
}

.sidebar:hover {
    width: 280px;
    box-shadow: var(--shadow-xl);
}

[data-theme="light"] .sidebar {
    background: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
}

[data-theme="dark"] .sidebar {
    background: var(--secondary-bg);
    border-right: 1px solid var(--border-color);
}

.sidebar.collapsed {
    margin-left: -80px;
}

.sidebar-nav {
    padding: 1rem 0;
}

.nav-section {
    margin-bottom: 0.5rem;
}

.nav-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.sidebar:hover .nav-section-title {
    opacity: 1;
}

[data-theme="dark"] .nav-section-title {
    color: #94a3b8;
}

.nav-item {
    margin: 0.25rem 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.5rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    overflow: hidden;
}

.nav-link:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}

[data-theme="light"] .nav-link {
    color: #334155;
}

[data-theme="light"] .nav-link:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #1e293b;
}

[data-theme="dark"] .nav-link {
    color: #f1f5f9;
}

[data-theme="dark"] .nav-link:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
}

.nav-link.active {
    background: var(--accent-blue);
    color: white;
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: white;
}

.nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    min-width: 20px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-link-text {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.sidebar:hover .nav-link-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.nav-link-chevron {
    margin-left: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.9rem;
}

.sidebar:hover .nav-link-chevron {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

/* Dropdown Navigation */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.nav-dropdown-toggle > div {
    display: flex;
    align-items: center;
    flex: 1;
}

.nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--tertiary-bg);
    padding-left: 0;
}

[data-theme="light"] .nav-dropdown-menu {
    background: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .nav-dropdown-menu {
    background: rgba(255, 255, 255, 0.03);
}

.nav-dropdown-menu.show {
    max-height: 500px;
}

.nav-dropdown.open .nav-dropdown-menu {
    max-height: 500px;
}

.nav-dropdown-menu .nav-link {
    padding-left: 3.5rem;
    font-size: 0.9rem;
    padding-top: 0.625rem;
    padding-bottom: 0.625rem;
    font-weight: 400;
}

.sidebar:hover .nav-dropdown-menu .nav-link {
    padding-left: 3.5rem;
}

.nav-link-chevron {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link-chevron.rotate {
    transform: rotate(180deg);
}

/* Tooltip for collapsed sidebar */
.nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-bg);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    margin-left: 1rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .nav-link::after {
    background: var(--primary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .nav-link::after {
    background: var(--primary-bg);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.sidebar:not(:hover) .nav-link:hover::after {
    opacity: 1;
    visibility: visible;
}

/* Main Content */
.main-content {
    margin-left: 80px;
    margin-top: var(--navbar-height);
    padding: 0;
    min-height: calc(100vh - var(--navbar-height));
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: var(--light-color);
}

[data-theme="light"] .main-content {
    background-color: var(--light-color);
}

[data-theme="dark"] .main-content {
    background-color: var(--primary-bg);
}

/* Responsive Behavior */
@media (min-width: 992px) {
    .main-content {
        margin-left: 80px;
        padding: 1.5rem;
    }

    .sidebar {
        margin-left: 0;
        width: 80px;
    }

    .sidebar:hover {
        width: 280px;
    }

    .sidebar.collapsed {
        margin-left: -80px;
    }

    .main-content.sidebar-collapsed {
        margin-left: 0;
    }
}

@media (max-width: 991px) {
    .main-content {
        margin-left: 0 !important;
        padding: 1rem;
    }

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

    .sidebar {
        margin-left: -80px;
        width: 80px;
    }

    .sidebar:hover {
        width: 250px;
    }

    .sidebar.open {
        margin-left: 0;
        width: 80px;
    }

    .sidebar.open:hover {
        width: 250px;
    }
}

@media (max-width: 768px) {
    .main-content {
        margin-top: calc(var(--navbar-height) + 50px);
        min-height: calc(100vh - var(--navbar-height) - 50px);
        min-height: calc(100svh - var(--navbar-height) - 50px); /* Support for small viewport height */
        margin-left: 0 !important;
        padding: 1rem 0.75rem;
        transition: filter 0.3s ease;
    }

    .sidebar {
        position: fixed;
        width: 280px;
        top: calc(var(--navbar-height) + 50px);
        height: calc(100vh - var(--navbar-height) - 50px);
        z-index: 1050;
        box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease;
        transform: translateX(-100%);
        will-change: transform;
    }

    .sidebar:hover {
        /* Disable hover effects on mobile */
        width: 280px;
        transform: translateX(-100%);
    }

    .sidebar.open {
        transform: translateX(0);
        width: 280px;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }

    .main-content.sidebar-open {
        margin-left: 0 !important;
        filter: blur(2px);
    }

    /* Mobile sidebar backdrop */
    .sidebar.open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        opacity: 1;
        transition: opacity 0.3s ease;
    }
    
    .sidebar:not(.open)::before {
        opacity: 0;
        pointer-events: none;
    }

    /* Hide tooltips on mobile */
    .nav-link::after {
        display: none;
    }
}

/* User Dropdown */
.user-dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    color: var(--text-primary);
    padding: 0.75rem 1.125rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
    font-weight: 500;
    height: 44px;
    min-width: 44px;
    position: relative;
    overflow: hidden;
}

.user-dropdown-toggle::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.user-dropdown-toggle:hover::before {
    transform: translateX(100%) translateY(100%) rotate(45deg);
}

.user-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .user-dropdown-toggle {
    background: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.1);
}

[data-theme="light"] .user-dropdown-toggle:hover {
    background: rgba(15, 23, 42, 0.12);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] .user-dropdown-toggle {
    background: rgba(248, 250, 252, 0.08);
    border-color: rgba(248, 250, 252, 0.1);
}

[data-theme="dark"] .user-dropdown-toggle:hover {
    background: rgba(248, 250, 252, 0.12);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-2xl);
    padding: 0.75rem;
    min-width: 220px;
    z-index: 1060;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="light"] .user-dropdown-menu {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

[data-theme="dark"] .user-dropdown-menu {
    background: rgba(30, 41, 59, 0.98);
    border: 1px solid rgba(51, 65, 85, 0.8);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.user-dropdown.open .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.user-dropdown-item {
    display: flex;
    align-items: center;
    padding: 0.875rem 1.125rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

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

.user-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    transform: translateX(4px);
}

[data-theme="light"] .user-dropdown-item:hover {
    background: rgba(0, 0, 0, 0.08);
}

.user-dropdown-item i {
    margin-right: 0.875rem;
    width: 16px;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .navbar-center {
        max-width: 400px;
        padding: 0 0.5rem;
    }

    .search-container {
        max-width: 350px;
    }
}

@media (max-width: 991px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }

    .sidebar.open {
        margin-left: 0;
    }

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

@media (max-width: 768px) {
    .top-navbar {
        padding: 0 1rem;
        flex-wrap: wrap;
        height: auto;
        min-height: var(--navbar-height);
    }

    .navbar-left {
        gap: 0.75rem;
        flex: 0 0 auto;
    }

    .navbar-center {
        flex: 1 1 100%;
        order: 3;
        padding: 0.75rem 0 1rem 0;
        max-width: none;
        margin: 0;
        display: flex !important;
        justify-content: center;
        position: relative;
        transform: none;
        left: auto;
    }

    .navbar-right {
        flex: 0 0 auto;
        margin-left: auto;
        gap: 0.5rem;
    }

    .search-container {
        display: block !important;
        width: 100%;
        max-width: 100%;
        position: relative;
    }

    .search-input {
        font-size: 0.875rem;
        padding: 0.8125rem 1.125rem 0.8125rem 3rem;
        border-radius: 14px;
        display: block !important;
        width: 100% !important;
    }

    .search-container .bi-search {
        left: 1rem;
        display: block !important;
    }

    .theme-toggle {
        padding: 0.75rem;
        width: 44px;
        height: 44px;
        justify-content: center;
    }

    .theme-toggle span {
        display: none;
    }

    .user-dropdown-toggle {
        padding: 0.75rem;
        min-width: 44px;
        width: 44px;
        justify-content: center;
        gap: 0;
    }

    .user-dropdown-toggle span,
    .user-dropdown-toggle .bi-chevron-down {
        display: none;
    }

    .mobile-search-toggle {
        display: none !important;
    }

    .sidebar-toggle {
        padding: 0.6875rem;
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }

    /* Field technician mobile enhancements */
    .main-content {
        padding: 0.75rem 0.75rem 150px 0.75rem; /* Extra bottom padding for mobile */
        margin-top: calc(var(--navbar-height) + 50px);
        min-height: calc(100vh - var(--navbar-height) - 50px);
        min-height: calc(100svh - var(--navbar-height) - 50px); /* Support for small viewport height */
        overflow-x: hidden;
    }

    /* Large touch-friendly buttons for mobile */
    .btn {
        min-height: 44px;
        padding: 0.875rem 1.25rem;
        font-size: 0.9rem;
    }

    .btn-sm {
        min-height: 38px;
        padding: 0.625rem 1rem;
        font-size: 0.85rem;
    }

    /* Mobile card optimizations */
    .card {
        margin-bottom: 1rem;
        border-radius: 12px;
    }

    .card-body {
        padding: 1rem;
    }

    .card-header {
        padding: 0.875rem 1rem;
        font-size: 0.95rem;
    }

    /* Form improvements for mobile */
    .form-control {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
    }

    .form-select {
        min-height: 44px;
        font-size: 16px;
        padding: 0.75rem;
    }

    /* Table responsiveness for field data */
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        margin-bottom: 2rem;
    }

    .table {
        font-size: 0.8rem;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    /* Priority mobile columns - hide less important ones */
    .table .mobile-hide {
        display: none;
    }

    /* Status badges mobile optimization */
    .badge {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
        white-space: nowrap;
    }

    /* Mobile dashboard card grid */
    .dashboard-card {
        margin-bottom: 1rem;
    }

    .dashboard-card .card-body {
        padding: 1.25rem;
    }

    /* Quick action buttons for technicians */
    .quick-action-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
        gap: 0.75rem;
        margin: 1rem 0;
    }

    .quick-action-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1rem 0.5rem;
        border: 2px solid var(--border-color);
        border-radius: 12px;
        text-decoration: none;
        color: var(--text-primary);
        background: var(--secondary-bg);
        transition: all 0.3s ease;
        min-height: 80px;
        touch-action: manipulation;
    }

    .quick-action-btn:hover,
    .quick-action-btn:active {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        color: var(--accent-blue);
        border-color: var(--accent-blue);
    }

    .quick-action-btn i {
        font-size: 1.5rem;
        margin-bottom: 0.25rem;
    }

    .quick-action-btn small {
        font-size: 0.75rem;
        font-weight: 500;
        text-align: center;
        line-height: 1.2;
    }

    /* Mobile schedule view improvements */
    .schedule-item {
        background: var(--secondary-bg);
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 0.875rem;
        margin-bottom: 0.75rem;
        touch-action: manipulation;
    }

    .schedule-item:active {
        background: var(--hover-bg);
    }

    .schedule-time {
        font-weight: 600;
        color: var(--accent-blue);
        font-size: 0.9rem;
    }

    .schedule-customer {
        font-weight: 500;
        margin: 0.25rem 0;
    }

    .schedule-details {
        font-size: 0.8rem;
        color: var(--text-secondary);
        line-height: 1.3;
    }

    /* Floating action button for mobile */
    .mobile-fab {
        position: fixed;
        bottom: 30px; /* Increased spacing from bottom */
        right: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--accent-blue);
        color: white;
        border: none;
        font-size: 1.5rem;
        box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
        z-index: 1000;
        transition: all 0.3s ease;
        touch-action: manipulation;
    }

    .mobile-fab:hover,
    .mobile-fab:active {
        transform: scale(1.1);
        box-shadow: 0 6px 16px rgba(37, 99, 235, 0.5);
    }

    /* Swipe actions hint */
    .swipe-hint {
        font-size: 0.75rem;
        color: var(--text-secondary);
        text-align: center;
        padding: 1rem 0.5rem 2rem 0.5rem; /* Extra bottom padding */
        border-top: 1px solid var(--border-color);
    }

    /* Mobile modal adjustments */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
        max-height: calc(100svh - 2rem);
    }

    .modal-content {
        border-radius: 16px;
        max-height: 100%;
        overflow-y: auto;
    }

    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid var(--border-color);
    }

    .modal-body {
        padding: 1rem;
        max-height: calc(100vh - 200px);
        max-height: calc(100svh - 200px);
        overflow-y: auto;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 1px solid var(--border-color);
    }

    /* Location and map improvements */
    .location-info {
        background: var(--tertiary-bg);
        border-radius: 8px;
        padding: 0.875rem;
        margin: 0.75rem 0;
    }

    .location-actions {
        display: flex;
        gap: 0.5rem;
        margin-top: 0.75rem;
    }

    .location-actions .btn {
        flex: 1;
        font-size: 0.8rem;
    }

    /* Ticket status updates for mobile - fixed positioning improvements */
    .status-update-panel,
    .status-panel-mobile {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--secondary-bg);
        border-top: 2px solid var(--border-color);
        padding: 1rem;
        z-index: 1000;
        box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .status-buttons,
    .status-actions {
        display: flex;
        gap: 0.5rem;
        margin-bottom: 0;
    }

    .status-buttons .btn,
    .status-actions .btn {
        flex: 1;
        font-size: 0.85rem;
        padding: 0.75rem 0.5rem;
    }

    /* Photo capture improvements */
    .photo-capture,
    .photo-capture-mobile {
        border: 2px dashed var(--border-color);
        border-radius: 8px;
        padding: 2rem 1rem;
        text-align: center;
        background: var(--tertiary-bg);
        cursor: pointer;
        transition: all 0.3s ease;
        touch-action: manipulation;
        margin-bottom: 2rem;
    }

    .photo-capture:hover,
    .photo-capture:active,
    .photo-capture-mobile:active {
        border-color: var(--accent-blue);
        background: rgba(37, 99, 235, 0.05);
    }

    .photo-capture i,
    .photo-capture-mobile i {
        font-size: 2rem;
        color: var(--accent-blue);
        margin-bottom: 0.5rem;
    }

    /* Offline indicator */
    .offline-indicator {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--warning-color);
        color: white;
        text-align: center;
        padding: 0.5rem;
        font-size: 0.85rem;
        z-index: 1060;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
    }

    .offline-indicator.show {
        transform: translateY(0);
    }

    /* Last element spacing */
    .main-content > *:last-child,
    .container-fluid > *:last-child {
        margin-bottom: 3rem;
    }

    /* Ensure content is scrollable */
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    html {
        overflow-x: hidden;
        overflow-y: auto;
    }
}

@media (max-width: 576px) {
    .navbar-right {
        gap: 0.25rem;
    }

    .sidebar-toggle {
        padding: 0.375rem;
        font-size: 1.25rem;
    }

    .theme-toggle {
        padding: 0.375rem;
        width: 36px;
        height: 36px;
    }

    .user-dropdown-toggle {
        padding: 0.375rem 0.5rem;
        min-width: 36px;
    }

    .mobile-search-toggle {
        width: 36px;
        height: 36px;
        padding: 0.375rem;
    }

    /* Extra small mobile optimizations */
    .main-content {
        padding: 0.5rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .quick-action-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.5rem;
    }

    .quick-action-btn {
        min-height: 70px;
        padding: 0.75rem 0.25rem;
    }

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

    .quick-action-btn small {
        font-size: 0.7rem;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.75rem 1rem;
    }

    .table {
        font-size: 0.75rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        max-width: 100px;
    }

    .status-buttons .btn {
        font-size: 0.75rem;
        padding: 0.625rem 0.25rem;
    }
}

/* Touch-friendly hover states */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }

    .card:hover {
        transform: none;
    }

    .quick-action-btn:hover {
        transform: none;
    }
}

/* Landscape mobile optimizations */
@media (max-width: 896px) and (orientation: landscape) {
    .main-content {
        margin-top: var(--navbar-height);
    }

    .mobile-fab {
        bottom: 15px;
        right: 15px;
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .quick-action-grid {
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    }

    .quick-action-btn {
        min-height: 60px;
        padding: 0.5rem;
    }
}

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

    .card {
        border: 2px solid var(--border-color);
    }

    .quick-action-btn {
        border-width: 3px;
    }
}

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

    .mobile-fab:hover,
    .mobile-fab:active {
        transform: none;
    }
}

/* Cards and other components styling */
.card {
    background: var(--secondary-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.card-header {
    background: var(--tertiary-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.card-body {
    padding: 1.5rem;
    color: var(--text-primary);
}

[data-theme="dark"] .card {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(51, 65, 85, 0.5);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .card-header {
    background: rgba(15, 23, 42, 0.8);
    border-bottom: 1px solid rgba(51, 65, 85, 0.5);
    color: #f8fafc;
}

[data-theme="dark"] .card-body {
    color: #f1f5f9;
}

/* Buttons */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-primary);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.4);
    color: var(--text-primary);
}

/* Form Controls */
.form-control {
    background: var(--tertiary-bg);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: var(--tertiary-bg);
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 0.25rem rgba(37, 99, 235, 0.25);
    color: var(--text-primary);
}

[data-theme="dark"] .form-control {
    background: rgba(30, 41, 59, 0.6);
    border: 2px solid rgba(51, 65, 85, 0.5);
    color: #f8fafc;
}

[data-theme="dark"] .form-control:focus {
    background: rgba(30, 41, 59, 0.8);
    border-color: #3b82f6;
    color: #ffffff;
}

[data-theme="dark"] .form-control::placeholder {
    color: #94a3b8;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    color: var(--success-color);
    border-left: 4px solid var(--success-color);
}

.alert-warning {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(217, 119, 6, 0.1));
    color: var(--warning-color);
    border-left: 4px solid var(--warning-color);
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.1), rgba(185, 28, 28, 0.1));
    color: var(--accent-red);
    border-left: 4px solid var(--accent-red);
}

/* Tables */
.table {
    color: var(--text-primary);
    background: transparent;
}

.table th {
    background: var(--tertiary-bg);
    border-color: var(--border-color);
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
}

.table td {
    border-color: var(--border-color);
    padding: 1rem;
    vertical-align: middle;
}

.table-striped tbody tr:nth-of-type(odd) {
    background: rgba(255, 255, 255, 0.02);
}

.table-hover tbody tr:hover {
    background: var(--hover-bg);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}

/* Custom styles for the application */
.sidebar {
    min-height: 100vh;
    background-color: #f8f9fa;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.375rem;
}

.badge {
    font-size: 0.75em;
}

.table th {
    border-top: none;
    font-weight: 600;
}

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

/* Dashboard cards */
.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

/* Navigation styles */
.nav-pills .nav-link {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
}

/* Form styles */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Alert styles */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Customer List Responsive Styles */
.sortable {
    cursor: pointer;
    user-select: none;
}

.sortable:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.customer-card {
    transition: transform 0.2s ease-in-out;
}

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

/* Compact search and filters */
.auto-filter {
    transition: border-color 0.2s ease;
}

.auto-filter:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Live search input */
#liveSearchInput {
    transition: all 0.2s ease;
}

#liveSearchInput:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    transform: scale(1.02);
}

/* SMS audience section */
#smsAudienceFilter, #smsTagFilter {
    border: 1px solid #ced4da;
    transition: border-color 0.2s ease;
}

#smsAudienceFilter:focus, #smsTagFilter:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group {
        flex-direction: column;
        gap: 0.25rem;
    }

    .btn-group .btn {
        width: 100%;
    }

    .card-body {
        padding: 1rem;
    }

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

    /* Stack form controls vertically on mobile */
    .row.g-3 .col-md-4,
    .row.g-3 .col-md-3,
    .row.g-3 .col-md-2 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media (max-width: 576px) {
    .table td,
    .table th {
        padding: 0.5rem 0.25rem;
        font-size: 0.8rem;
    }

    .btn-group-sm .btn {
        padding: 0.125rem 0.25rem;
    }

    .badge {
        font-size: 0.65em;
    }
}

/* Column toggle styles */
.dropdown-menu .dropdown-item-text {
    cursor: pointer;
    margin-bottom: 0;
    padding: 0.375rem 1rem;
    display: flex;
    align-items: center;
    user-select: none;
    white-space: nowrap;
}

.dropdown-menu .dropdown-item-text:hover {
    background-color: #f8f9fa;
}

[data-theme="light"] .dropdown-menu .dropdown-item-text:hover {
    background-color: #f8f9fa;
}

[data-theme="dark"] .dropdown-menu .dropdown-item-text:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-menu .dropdown-item-text input[type="checkbox"] {
    margin-right: 0.5rem;
    cursor: pointer;
}

/* View toggle styles */
.btn-group .btn.active {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: white;
}

/* Search enhancement */
.input-group .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    border-color: #86b7fe;
}

/* SMS modal enhancements */
.modal-dialog {
    max-width: 500px;
}

.text-success {
    color: #198754 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-danger {
    color: #dc3545 !important;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
}

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

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    line-height: 1;
}

.stats-label {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Compact Stats Cards */
.stats-card-compact {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-blue));
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 60px;
}

.stats-number-small {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.stats-label-small {
    font-size: 0.75rem;
    opacity: 0.9;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Clickable Rows */
.clickable-row {
    transition: background-color 0.2s ease;
}

.clickable-row:hover {
    background-color: var(--secondary-bg) !important;
}

/* Filter Cards */
.filter-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

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

.filter-card.active {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.filter-card.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Sortable Headers */
.sortable {
    user-select: none;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: var(--hover-bg) !important;
}

.sortable i {
    font-size: 0.8rem;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.sortable:hover i {
    opacity: 1;
}

.sortable .bi-arrow-up,
.sortable .bi-arrow-down {
    opacity: 1;
    color: var(--accent-blue);
}