:root {
    --primary-color: #2563eb;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #06b6d4;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8fafc;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   3. CARDS & CONTAINERS
   ============================================ */

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    border-radius: 12px 12px 0 0 !important;
}

.card-body {
    padding: 1.5rem;
}

.tab-content-body {
    border-radius: 0 !important;
}

.table-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.scan-container {
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   4. BUTTONS
   ============================================ */

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #1e40af);
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-success {
    background: var(--success-color);
    border: none;
    padding: 0.625rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-success:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Header Action Buttons */
.header-action-btn {
    min-width: 140px;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border: none;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.header-action-btn.btn-green {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.header-action-btn.btn-green:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.header-action-btn.btn-green:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
}

.header-action-btn.btn-red {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.header-action-btn.btn-red:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
}

.header-action-btn.btn-red:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.3);
}

.header-action-btn.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
}

.header-action-btn.btn-blue:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.header-action-btn.btn-blue:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
    transition: all 0.2s;
}

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

/* ============================================
   5. FORMS & INPUTS
   ============================================ */

.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.625rem 0.875rem;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-input-group .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.filter-input-group .form-control,
.filter-input-group .form-select {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
}

/* ============================================
   6. TABLES
   ============================================ */

/* Table container - NO border-radius here since card handles it */
.table {
    background: white;
    border-radius: 0;
    margin-bottom: 0;
}

/* Table header - no rounded corners, just background and border */
.table thead {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 2px solid var(--border-color);
    border-radius: 0;
}

/* All th elements - absolutely no rounded corners */
.table th {
    font-weight: 600;
    color: var(--dark-color);
    padding: 1rem;
    border: none;
    border-radius: 0 !important;
}

/* Explicitly prevent any rounded corners on thead elements */
.table thead,
.table thead tr,
.table thead th,
.table thead th:first-child,
.table thead th:last-child {
    border-radius: 0 !important;
}

.table td {
    padding: 1rem;
    vertical-align: middle;
    border-color: #f1f5f9;
}

.table tbody tr:hover {
    background-color: #f8fafc;
}

.clickable-row:hover {
    background-color: #f8fafc !important;
}

/* Sortable table headers */
.sortable-th {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s;
    border-radius: 0 !important;
}

.sortable-th:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-radius: 0 !important;
}

.sortable-th:focus,
.sortable-th:active {
    border-radius: 0 !important;
}

.sortable-th a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none !important;
    color: inherit;
}

.sortable-th .sort-icon {
    margin-left: 0.5rem;
    opacity: 0.7;
}

/* ============================================
   7. MODALS
   ============================================ */

.modal-content {
    border: none;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

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

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

.modal-backdrop.show {
    opacity: 0.7;
}

.modal {
    z-index: 1060;
}

/* ============================================
   8. BADGES & ALERTS
   ============================================ */

.badge {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.875rem;
}

.alert {
    border: none;
    border-radius: 10px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
}

.location-status {
    padding: 0.75rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.875rem;
}

/* ============================================
   9. TABS & NAVIGATION
   ============================================ */

.nav-tabs {
    border-bottom: none;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 0;
}

.nav-tabs .nav-link {
    color: #6b7280;
    border: none;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    background: white;
    border-radius: 12px 12px 0 0;
    transition: all 0.3s ease;
    margin: 0;
    border-bottom: 3px solid transparent;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.nav-tabs .nav-link:hover {
    background: rgba(16, 185, 129, 0.05);
    color: #10b981;
}

.nav-tabs .nav-link.active {
    color: white;
    background: linear-gradient(135deg, #10b981, #059669);
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.3);
    font-weight: 600;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

.tab-content > .tab-pane {
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-top: -1px;
}

.tab-content .data-table-card {
    box-shadow: none;
    border: none;
    margin-top: 0;
    margin-bottom: 0;
}

/* ============================================
   12. MOBILE COMPONENTS
   ============================================ */

/* Mobile Cards */
.mobile-card {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s;
}

.mobile-card:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.mobile-card-image {
    padding: 1rem;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-card-image img {
    max-width: 120px;
    width: 100%;
    height: auto;
}

.mobile-card-content {
    padding: 1rem;
}

.mobile-card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.mobile-card-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.mobile-card-info {
    font-size: 0.85rem;
    color: #9ca3af;
    margin-bottom: 0.75rem;
}

.mobile-card-header {
    padding: 1rem;
    background: linear-gradient(135deg, #f9fafb, #f3f4f6);
    border-bottom: 1px solid #e5e7eb;
}

.mobile-card-body {
    padding: 1rem;
}

.mobile-card-body strong {
    color: #374151;
    font-size: 0.875rem;
}

/* Mobile Mega Menu */
.mobile-mega-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    overflow-y: auto;
}

.mobile-mega-menu.active {
    opacity: 1;
    visibility: visible;
}

.mobile-mega-menu-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.mobile-mega-menu-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 10px;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.mobile-menu-close:active {
    transform: scale(0.9);
    background: rgba(255, 255, 255, 0.3);
}

.mobile-mega-menu-content {
    background: white;
    min-height: calc(100vh - 100px);
    padding: 1rem;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: white;
    border-radius: 12px;
    text-decoration: none;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.2s;
    border: 1px solid #e5e7eb;
}

.mobile-menu-item:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.mobile-menu-item-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #2563eb;
    flex-shrink: 0;
}

.mobile-menu-item.primary .mobile-menu-item-icon {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
}

.mobile-menu-item.secondary .mobile-menu-item-icon {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.mobile-menu-item.danger .mobile-menu-item-icon {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    color: #ef4444;
}

.mobile-menu-item-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.mobile-menu-item-text .title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
}

.mobile-menu-item-text .subtitle {
    font-size: 0.875rem;
    color: #6b7280;
}

.mobile-menu-item.primary .mobile-menu-item-text .title {
    color: #2563eb;
}

.mobile-menu-item.secondary .mobile-menu-item-text .title {
    color: #10b981;
}

.mobile-menu-item.danger .mobile-menu-item-text .title {
    color: #ef4444;
}

.mobile-menu-item > i.fa-chevron-right {
    font-size: 1rem;
    color: #d1d5db;
    flex-shrink: 0;
}

.mobile-menu-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 1rem 0;
}

/* Mobile Language Section */
.mobile-language-section {
    margin-top: 1rem;
    background: #f9fafb;
    padding: 1.25rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
}

.mobile-language-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.mobile-language-title i {
    color: #2563eb;
    font-size: 1.25rem;
}

.mobile-language-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.mobile-language-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 0.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    min-height: 80px;
}

.mobile-language-btn:active {
    transform: scale(0.95);
}

.mobile-language-btn.active {
    border-color: #2563eb;
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
}

.mobile-language-btn .flag-icon {
    width: 32px;
    height: 22px;
    margin: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.mobile-language-btn .fa-check {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    font-size: 0.875rem;
    color: #2563eb;
}

/* Gradient Stats Cards */
.gradient-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gradient-blue {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

/* ============================================
   13. FILTERS & DATA TABLES
   ============================================ */

.filters-card {
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filters-card .card-header {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 0.75rem 1rem;
}

.filters-card .card-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 0.95rem;
}

.filters-card .card-body {
    padding: 1rem;
}

.data-table-card {
    border: 2px solid #e9ecef;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.07);
    overflow: hidden;
}

.data-table-card .card-header {
    background: linear-gradient(135deg, #0d7a6f 0%, #10b981 100%);
    color: white;
    border-radius: 10px 10px 0 0 !important;
    padding: 1rem;
}

.data-table-card .card-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.1rem;
}

/* Tab Navigation - Shared Styles */
.tab-header {
    background: transparent;
    border: none;
}

.tab-btn {
    flex: 1;
    border: none;
    padding: 1rem;
    font-weight: 600;
    transition: all 0.3s;
    background: #f3f4f6;
    color: #6b7280;
    cursor: pointer;
}

.tab-btn:hover:not(.active) {
    background: #e5e7eb;
    color: #374151;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tab-btn.tab-btn-left {
    border-radius: 12px 0 0 0;
}

.tab-btn.tab-btn-middle {
    border-radius: 0;
}

.tab-btn.tab-btn-right {
    border-radius: 0 12px 0 0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

/* Table content body - rounded bottom corners */
.tab-content-body {
    border-radius: 0 0 12px 12px;
}

/* Mobile: Equal width tabs */
@media (max-width: 768px) {
    .tab-header {
        display: flex !important;
    }
    
    .tab-header .d-flex {
        display: flex !important;
        width: 100%;
    }
    
    .tab-btn {
        flex: 1 !important;
        min-width: 0 !important;
        max-width: none !important;
        padding: 1rem 0.5rem !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.35rem !important;
        line-height: 1.2 !important;
    }
    
    .tab-btn i {
        display: block;
        font-size: 1.1rem;
        margin: 0 !important;
    }
    
    .tab-btn .badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.4rem;
        margin: 0 !important;
    }
}

@media (max-width: 576px) {
    .tab-btn {
        padding: 0.85rem 0.35rem !important;
        gap: 0.3rem !important;
        font-size: 0.8rem !important;
    }
    
    .tab-btn i {
        font-size: 1rem;
    }
    
    .tab-btn .badge {
        font-size: 0.65rem;
        padding: 0.1rem 0.35rem;
    }
}

/* Ensure table and thead have NO rounded corners */
.data-table-card .table,
.data-table-card .table thead,
.data-table-card .table thead tr,
.data-table-card .table thead th,
.data-table-card .table thead th:first-child,
.data-table-card .table thead th:last-child,
.data-table-card .table thead .sortable-th,
.data-table-card .table thead .sortable-th:hover,
.data-table-card .table thead .sortable-th:first-child,
.data-table-card .table thead .sortable-th:last-child {
    border-radius: 0 !important;
}

/* Date range picker styling */
.daterangepicker {
    font-family: inherit;
}

/* ============================================
   14. ACTION BUTTONS
   ============================================ */

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

.action-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    font-size: 0.875rem;
}

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

.action-icon-btn.action-btn-view {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
}

.action-icon-btn.action-btn-view:hover {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    color: white;
}

.action-icon-btn.action-btn-edit {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    color: white;
}

.action-icon-btn.action-btn-edit:hover {
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
}

.action-icon-btn.action-btn-delete {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
}

.action-icon-btn.action-btn-delete:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
}

/* ============================================
   15. RESPONSIVE STYLES
   ============================================ */

/* Tablet and below (991px) */
@media (max-width: 991px) {
    .table-container {
        padding: 1rem;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .container-fluid {
        padding: 0.5rem !important;
    }
    
    .card {
        margin-bottom: 0.75rem !important;
    }
    
    .filters-card .card-header {
        padding: 0.5rem 0.75rem;
    }
    
    .filters-card .card-header h6 {
        font-size: 0.85rem;
    }
    
    .filters-card .card-body {
        padding: 0.75rem;
    }
    
    .data-table-card .card-header h5 {
        font-size: 0.95rem;
    }
    
    .btn-lg {
        font-size: 0.9rem;
        padding: 0.6rem 0.8rem;
    }
    
    .header-action-btn {
        min-width: auto;
        font-size: 0.85rem;
        padding: 0.45rem 0.6rem;
    }
    
    .filter-input-group {
        margin-bottom: 0;
    }
    
    .filter-input-group .form-label {
        font-size: 0.75rem;
        margin-bottom: 0.2rem;
    }
    
    .filter-input-group .form-control,
    .filter-input-group .form-select {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Mobile daterangepicker optimization */
    .daterangepicker {
        position: fixed !important;
        top: 50% !important;
        left: 50% !important;
        transform: translate(-50%, -50%) !important;
        max-width: 95vw !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
        z-index: 9999 !important;
        margin: 0 !important;
    }
    
    .daterangepicker:before,
    .daterangepicker:after {
        display: none !important;
    }
    
    .daterangepicker .ranges {
        width: 100% !important;
    }
    
    .daterangepicker .drp-calendar {
        max-width: 100% !important;
    }
}

/* Small mobile (576px and below) */
@media (max-width: 576px) {
    .stats-card-compact {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .stats-icon-compact {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }
    
    .stats-number {
        font-size: 1.1rem;
    }
    
    .stats-label {
        font-size: 0.6rem;
    }
    
    .mobile-card {
        padding: 0.75rem;
    }
    
    h4 {
        font-size: 1.1rem;
    }
    
    .nav-tabs {
        border-bottom: 2px solid #e5e7eb;
    }
    
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .btn {
        font-size: 0.875rem;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: 0.35rem 0.5rem;
    }
    
    .pagination {
        font-size: 0.875rem;
    }
    
    .page-link {
        padding: 0.375rem 0.5rem;
    }
    
    .pagination-info {
        font-size: 0.8rem;
    }
    
    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        font-size: 1.15rem;
    }
    
    .mobile-mega-menu-header h3 {
        font-size: 1.1rem;
    }
    
    .mobile-menu-item {
        padding: 1rem;
    }
    
    .mobile-menu-item-icon {
        width: 45px;
        height: 45px;
        font-size: 1.35rem;
    }
    
    .mobile-menu-item-text .title {
        font-size: 0.95rem;
    }
    
    .mobile-menu-item-text .subtitle {
        font-size: 0.8rem;
    }
    
    .mobile-language-btn {
        padding: 0.75rem 0.35rem;
        min-height: 70px;
        font-size: 0.8rem;
    }
    
    .mobile-language-btn .flag-icon {
        width: 28px;
        height: 19px;
    }
    
    .mobile-card-image {
        padding: 0.75rem;
    }
    
    .mobile-card-image img {
        max-width: 100px;
    }
    
    .mobile-card-content,
    .mobile-card-header,
    .mobile-card-body {
        padding: 0.85rem;
    }
    
    .mobile-card-title {
        font-size: 0.95rem;
    }
    
    .mobile-card-subtitle,
    .mobile-card-info {
        font-size: 0.8rem;
    }
    
    .header-action-btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.5rem;
        min-width: auto;
    }
    
    .filters-card .row.g-2 {
        row-gap: 0.5rem !important;
    }
    
    .filter-mobile-full {
        order: 5;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        padding: 0.65rem 1rem;
    }
    
    .btn-sm {
        min-height: 38px;
        padding: 0.5rem 0.75rem;
    }
    
    .mobile-card {
        margin-bottom: 1rem;
    }
    
    .nav-tabs .nav-link {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ============================================
   16. DARK MODE SUPPORT
   ============================================ */

[data-bs-theme="dark"] body {
    background-color: #111827;
}

[data-bs-theme="dark"] .card {
    background: #1f2937;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

[data-bs-theme="dark"] .card-header {
    background: #374151;
    border-bottom-color: #4b5563;
}

[data-bs-theme="dark"] .card-body {
    background: #1f2937;
    color: #ffffff;
}

[data-bs-theme="dark"] .table {
    background: #1f2937;
    color: #ffffff;
}

[data-bs-theme="dark"] .table thead {
    background: linear-gradient(135deg, #374151, #4b5563);
}

[data-bs-theme="dark"] .table th {
    color: #ffffff;
}

[data-bs-theme="dark"] .table td {
    border-color: #374151;
    color: #ffffff;
}

[data-bs-theme="dark"] .table tbody tr:hover {
    background-color: #374151;
}

[data-bs-theme="dark"] .clickable-row:hover {
    background-color: #374151 !important;
}

[data-bs-theme="dark"] .modal-content {
    background: #1f2937;
    color: #ffffff;
}

[data-bs-theme="dark"] .modal-header {
    border-bottom-color: #4b5563;
}

[data-bs-theme="dark"] .modal-footer {
    border-top-color: #4b5563;
}

[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus {
    background: #374151;
    border-color: #6b7280;
    color: #ffffff;
}

[data-bs-theme="dark"] .nav-tabs .nav-link {
    background: #374151;
    color: #9ca3af;
}

[data-bs-theme="dark"] .nav-tabs .nav-link:hover {
    background: rgba(16, 185, 129, 0.1);
    color: #10b981;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

[data-bs-theme="dark"] .tab-content > .tab-pane {
    background: #1f2937;
}

[data-bs-theme="dark"] .tab-btn {
    background: #374151;
    color: #9ca3af;
}

[data-bs-theme="dark"] .tab-btn:hover:not(.active) {
    background: #4b5563;
    color: #e5e7eb;
}

[data-bs-theme="dark"] .tab-btn.active {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

[data-bs-theme="dark"] .stats-card-compact {
    background: #374151;
}

[data-bs-theme="dark"] .stats-number {
    color: #ffffff;
}

[data-bs-theme="dark"] .stats-label {
    color: #9ca3af;
}

[data-bs-theme="dark"] .mobile-card {
    background: #1f2937;
    border-color: #374151;
}

[data-bs-theme="dark"] .mobile-card-image {
    background: #374151;
    border-bottom-color: #4b5563;
}

[data-bs-theme="dark"] .mobile-card-title {
    color: #ffffff;
}

[data-bs-theme="dark"] .mobile-card-subtitle {
    color: #9ca3af;
}

[data-bs-theme="dark"] .mobile-card-info {
    color: #6b7280;
}

[data-bs-theme="dark"] .mobile-card-header {
    background: linear-gradient(135deg, #374151, #4b5563);
}

[data-bs-theme="dark"] .mobile-card-body {
    background: #1f2937;
}

[data-bs-theme="dark"] .mobile-card-body strong {
    color: #d1d5db;
}

[data-bs-theme="dark"] .filters-card {
    background: #1f2937;
    border-color: #374151;
}

[data-bs-theme="dark"] .filters-card .card-body {
    background: #1f2937;
}

[data-bs-theme="dark"] .data-table-card {
    border-color: #374151;
}

[data-bs-theme="dark"] .table-container {
    background: #1f2937;
}

[data-bs-theme="dark"] .mobile-mega-menu-content {
    background: #111827;
}

[data-bs-theme="dark"] .mobile-menu-item {
    background: #1f2937;
    border-color: #374151;
}

[data-bs-theme="dark"] .mobile-menu-item-text .title {
    color: #ffffff;
}

[data-bs-theme="dark"] .mobile-menu-item-text .subtitle {
    color: #9ca3af;
}

[data-bs-theme="dark"] .mobile-language-section {
    background: #1f2937;
    border-color: #374151;
}

[data-bs-theme="dark"] .mobile-language-title {
    color: #ffffff;
}

[data-bs-theme="dark"] .mobile-language-btn {
    background: #374151;
    border-color: #4b5563;
    color: #9ca3af;
}

[data-bs-theme="dark"] .mobile-language-btn.active {
    background: linear-gradient(135deg, #1e3a8a, #1e40af);
    border-color: #3b82f6;
    color: #3b82f6;
}

[data-bs-theme="dark"] .sortable-th:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

[data-bs-theme="dark"] .timeline-item {
    border-bottom-color: #374151;
}

[data-bs-theme="dark"] .filter-input-group .form-label {
    color: #ffffff;
}

[data-bs-theme="dark"] .pagination .page-link {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

[data-bs-theme="dark"] .pagination .page-link:hover {
    background: #4b5563;
    border-color: #6b7280;
    color: #ffffff;
}

[data-bs-theme="dark"] .pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #2563eb, #1e40af);
    border-color: #2563eb;
    color: white;
}

[data-bs-theme="dark"] .pagination .page-item.disabled .page-link {
    background: #1f2937;
    border-color: #374151;
    color: #6b7280;
}

[data-bs-theme="dark"] .pagination-info {
    color: #ffffff;
}

[data-bs-theme="dark"] .pagination-info strong {
    color: #ffffff;
}

[data-bs-theme="dark"] .alert {
    background: #374151;
    color: #ffffff;
}

[data-bs-theme="dark"] .location-status {
    background: #374151;
    border-color: #4b5563;
    color: #ffffff;
}

[data-bs-theme="dark"] .mobile-menu-divider {
    background: #4b5563;
}

[data-bs-theme="dark"] .mobile-mega-menu {
    background: rgba(0, 0, 0, 0.7);
}

[data-bs-theme="dark"] .scan-container {
    background: #1f2937;
    color: #ffffff;
}
