/* ========================================
   COMPANIES PAGE ENHANCED STYLES
   view26 Brand Color Palette
   ======================================== */

/* view26 Brand Colors */
:root {
    /* Primary Colors */
    --v26-blue: #1072FC;
    --v26-blue-light: #E8F1FF;
    --v26-blue-dark: #0A4DB3;

    /* Secondary Colors */
    --v26-purple: #5E40B2;
    --v26-purple-light: #F0EBFF;
    --v26-purple-dark: #3D2875;

    /* Accent Colors */
    --v26-green: #76B817;
    --v26-green-light: #F0F8E6;
    --v26-green-dark: #5A8F12;

    --v26-yellow: #FFA828;
    --v26-yellow-light: #FFF5E6;
    --v26-yellow-dark: #CC8620;

    --v26-red: #F15B5C;
    --v26-red-light: #FFE9E9;
    --v26-red-dark: #C1494A;

    /* Neutrals */
    --v26-gray-50: #F9FAFB;
    --v26-gray-100: #F3F4F6;
    --v26-gray-200: #E5E7EB;
    --v26-gray-300: #D1D5DB;
    --v26-gray-400: #9CA3AF;
    --v26-gray-500: #6B7280;
    --v26-gray-600: #4B5563;
    --v26-gray-700: #374151;
    --v26-gray-800: #1F2937;
    --v26-gray-900: #111827;

    /* Status Colors */
    --status-healthy: var(--v26-green);
    --status-at-risk: var(--v26-yellow);
    --status-critical: var(--v26-red);
    --status-new: #8D70CB;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* ========================================
   DASHBOARD STATS BAR
   ======================================== */

.dashboard-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    padding: var(--spacing-lg);
    background: var(--v26-gray-50);
    border-radius: var(--radius-lg);
}

.stat-card {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    border: 1px solid var(--v26-gray-200);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-color: var(--v26-blue);
}

.stat-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--v26-blue-light);
    border-radius: var(--radius-md);
}

.stat-content {
    flex: 1;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--v26-gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--v26-gray-900);
    line-height: 1;
}

.stat-card.at-risk .stat-icon {
    background: var(--v26-yellow-light);
}

.stat-card.critical .stat-icon {
    background: var(--v26-red-light);
}

.stat-card.healthy .stat-icon {
    background: var(--v26-green-light);
}

/* ========================================
   FILTER BAR
   ======================================== */

.filter-bar {
    background: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--spacing-xl);
    border: 1px solid var(--v26-gray-200);
}

/* Filter row for standalone filter bars (not in tables) */
.filter-bar .filter-row {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
}

.filter-search {
    flex: 1;
    min-width: 250px;
}

.filter-search input {
    width: 100%;
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--v26-gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.filter-search input:focus {
    outline: none;
    border-color: var(--v26-blue);
    box-shadow: 0 0 0 3px var(--v26-blue-light);
}

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

.filter-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--v26-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-select {
    position: relative;
}

.filter-select select {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--v26-gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 150px;
}

.filter-select select:focus {
    outline: none;
    border-color: var(--v26-blue);
    box-shadow: 0 0 0 3px var(--v26-blue-light);
}

.filter-actions {
    display: flex;
    gap: var(--spacing-sm);
    margin-left: auto;
}

.btn-filter {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--v26-gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    background: white;
    color: var(--v26-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-filter:hover {
    background: var(--v26-gray-50);
    border-color: var(--v26-gray-400);
}

.btn-filter.primary {
    background: var(--v26-blue);
    color: white;
    border-color: var(--v26-blue);
}

.btn-filter.primary:hover {
    background: var(--v26-blue-dark);
    border-color: var(--v26-blue-dark);
}

/* Quick Filters */
.quick-filters {
    display: flex;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-md);
    flex-wrap: wrap;
}

.quick-filter-chip {
    padding: var(--spacing-xs) var(--spacing-md);
    border: 1px solid var(--v26-gray-300);
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    background: white;
    color: var(--v26-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-filter-chip:hover {
    background: var(--v26-gray-50);
    border-color: var(--v26-gray-400);
}

.quick-filter-chip.active {
    background: var(--v26-blue);
    color: white;
    border-color: var(--v26-blue);
}

.quick-filter-chip.at-risk.active {
    background: var(--v26-yellow);
    border-color: var(--v26-yellow);
}

.quick-filter-chip.critical.active {
    background: var(--v26-red);
    border-color: var(--v26-red);
}

.quick-filter-chip.expiring.active {
    background: var(--v26-purple);
    border-color: var(--v26-purple);
}

/* ========================================
   COMPANIES TABLE
   ======================================== */

.companies-table-wrapper {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    border: 1px solid var(--v26-gray-200);
}

.companies-table {
    width: 100%;
    border-collapse: collapse;
}

.companies-table thead {
    background: var(--v26-gray-50);
    border-bottom: 2px solid var(--v26-gray-200);
}

.companies-table th {
    padding: var(--spacing-md);
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--v26-gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.companies-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.companies-table th.sortable:hover {
    background: var(--v26-gray-100);
}

.companies-table th.sortable::after {
    content: ' ↕';
    opacity: 0.3;
    font-size: 0.75rem;
}

.companies-table th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
    color: var(--v26-blue);
}

.companies-table th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
    color: var(--v26-blue);
}

.companies-table tbody tr {
    border-bottom: 1px solid var(--v26-gray-200);
    transition: background 0.15s ease;
}

.companies-table tbody tr:hover {
    background: var(--v26-blue-light);
}

.companies-table tbody tr:last-child {
    border-bottom: none;
}

.companies-table td {
    padding: var(--spacing-md);
    font-size: 0.875rem;
    color: var(--v26-gray-800);
}

.companies-table td a {
    color: var(--v26-blue);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.companies-table td a:hover {
    color: var(--v26-blue-dark);
    text-decoration: underline;
}

/* Status Indicator */
.status-indicator {
    font-size: 1.25rem;
    line-height: 1;
    display: inline-block;
}

/* Company Type Badge */
.badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.badge-Customer {
    background: var(--v26-blue-light);
    color: var(--v26-blue-dark);
}

.badge-Partner,
.badge-Solution-Partner {
    background: var(--v26-purple-light);
    color: var(--v26-purple-dark);
}

.badge-Marketplace-Partner {
    background: var(--v26-green-light);
    color: var(--v26-green-dark);
}

.badge-Community-Champion {
    background: var(--v26-yellow-light);
    color: var(--v26-yellow-dark);
}

/* Health Score */
.health-score-cell {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.health-bar {
    flex: 1;
    height: 8px;
    background: var(--v26-gray-200);
    border-radius: 999px;
    overflow: hidden;
    min-width: 60px;
}

.health-bar-fill {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s ease, background-color 0.3s ease;
}

.health-score-value {
    font-weight: 700;
    font-size: 0.875rem;
    min-width: 30px;
    text-align: right;
}

/* Products Count */
.products-count {
    font-weight: 600;
}

.products-count .active {
    color: var(--v26-green);
}

.products-count .total {
    color: var(--v26-gray-500);
}

/* Renewal Badge */
.renewal-badge {
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.renewal-badge.expired {
    background: var(--v26-red);
    color: white;
}

.renewal-badge.critical {
    background: var(--v26-red-light);
    color: var(--v26-red-dark);
}

.renewal-badge.warning {
    background: var(--v26-yellow);
    color: white;
}

.renewal-badge.attention {
    background: var(--v26-yellow-light);
    color: var(--v26-yellow-dark);
}

.renewal-badge.ok {
    background: var(--v26-green-light);
    color: var(--v26-green-dark);
}

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

.empty-state-icon {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.3;
}

.empty-state-text {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: var(--spacing-sm);
}

.empty-state-hint {
    font-size: 0.875rem;
}

/* ========================================
   PAGINATION
   ======================================== */

.pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    margin-top: var(--spacing-lg);
    border: 1px solid var(--v26-gray-200);
}

.pagination-info {
    font-size: 0.875rem;
    color: var(--v26-gray-600);
}

.pagination-info strong {
    color: var(--v26-gray-900);
    font-weight: 700;
}

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

.pagination-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    border: 1px solid var(--v26-gray-300);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 500;
    background: white;
    color: var(--v26-gray-700);
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 36px;
    text-align: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--v26-gray-50);
    border-color: var(--v26-gray-400);
}

.pagination-btn.active {
    background: var(--v26-blue);
    color: white;
    border-color: var(--v26-blue);
}

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

/* ========================================
   LOADING STATES
   ======================================== */

.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--v26-gray-200);
    border-top-color: var(--v26-blue);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-overlay .loading-spinner {
    width: 40px;
    height: 40px;
    border-width: 4px;
}

/* ========================================
   ERROR STATES
   ======================================== */

.error-message {
    background: var(--v26-red-light);
    color: var(--v26-red-dark);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--v26-red);
    margin: var(--spacing-md) 0;
    font-size: 0.875rem;
}

.error-message strong {
    font-weight: 700;
    display: block;
    margin-bottom: var(--spacing-xs);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

/* iPad Portrait and smaller */
@media (max-width: 1024px) {
    .dashboard-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .filter-bar .filter-row {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar .filter-search {
        width: 100%;
        min-width: 0;
    }

    .filter-actions {
        margin-left: 0;
        width: 100%;
    }

    .companies-table {
        font-size: 0.8rem;
    }

    .companies-table th,
    .companies-table td {
        padding: var(--spacing-sm);
    }
}

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

    .companies-table-wrapper {
        overflow-x: auto;
    }

    .companies-table {
        min-width: 800px;
    }

    .pagination-wrapper {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }

    .pagination-controls {
        justify-content: center;
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

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

.slide-in {
    animation: slideIn 0.4s ease-out;
}

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

/* ========================================
   MODERN FILTER BAR REDESIGN - CSS
   Contemporary, clean design for filter UI
   ======================================== */

/* Main Container */
.modern-filter-container {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05),
                0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #e5e7eb;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Primary Filter Row */
.filter-primary-row {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ========================================
   MODERN SEARCH BOX
   ======================================== */
.modern-search-box {
    flex: 1;
    min-width: 300px;
    position: relative;
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.modern-search-box:focus-within {
    background: white;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.search-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    color: #9ca3af;
    transition: color 0.2s;
}

.modern-search-box:focus-within .search-icon-wrapper {
    color: #6366f1;
}

.modern-search-input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 14px 16px 14px 0;
    font-size: 15px;
    color: #111827;
    font-weight: 400;
}

.modern-search-input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.search-clear-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    margin-right: 8px;
    border: none;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    background: #d1d5db;
    color: #374151;
}

/* ========================================
   FILTER TOGGLE BUTTON
   ======================================== */
.filter-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.filter-toggle-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.filter-toggle-btn.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

.filter-badge {
    display: none;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #ef4444;
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 10px;
    margin-left: 4px;
}

.filter-toggle-btn.active .filter-badge {
    background: white;
    color: #6366f1;
}

/* ========================================
   VIEW OPTIONS
   ======================================== */
.view-options {
    display: flex;
    gap: 4px;
    background: #f3f4f6;
    padding: 4px;
    border-radius: 10px;
}

.view-option-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 16px;
}

.view-option-btn:hover {
    color: #374151;
    background: rgba(255, 255, 255, 0.5);
}

.view-option-btn.active {
    background: white;
    color: #6366f1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========================================
   ADVANCED FILTERS PANEL
   ======================================== */
.advanced-filters-panel {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   MODERN FILTER GROUPS
   ======================================== */
.modern-filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-label i {
    color: #6366f1;
    font-size: 14px;
}

.custom-select-wrapper {
    position: relative;
}

.modern-filter-select {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    color: #111827;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
}

.modern-filter-select:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.modern-filter-select:hover {
    border-color: #d1d5db;
}

.select-dropdown-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    transition: color 0.2s;
}

.modern-filter-select:focus + .select-dropdown-icon {
    color: #6366f1;
}

/* Date Range Inputs */
.date-range-inputs {
    display: flex;
    align-items: center;
    gap: 12px;
}

.modern-date-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    background: white;
    font-size: 14px;
    color: #111827;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-date-input:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.date-separator {
    font-size: 13px;
    color: #9ca3af;
    font-weight: 500;
}

/* ========================================
   FILTER ACTIONS
   ======================================== */
.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid #f3f4f6;
}

.btn-modern-primary,
.btn-modern-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid transparent;
}

.btn-modern-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.4);
}

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

.btn-modern-secondary {
    background: white;
    color: #6b7280;
    border-color: #e5e7eb;
}

.btn-modern-secondary:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

/* ========================================
   MODERN QUICK FILTERS
   ======================================== */
.modern-quick-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f3f4f6;
    flex-wrap: wrap;
}

.quick-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-chips-container {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Modern Chips */
.modern-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.modern-chip::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    opacity: 0;
    transition: opacity 0.3s;
}

.modern-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.modern-chip:hover::before {
    opacity: 1;
}

.chip-icon {
    font-size: 16px;
    line-height: 1;
}

.chip-text {
    position: relative;
    z-index: 1;
}

.chip-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: #f3f4f6;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    position: relative;
    z-index: 1;
}

/* Chip States */
.modern-chip.active {
    border-color: transparent;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.2);
}

.modern-chip.active .chip-count {
    background: rgba(255, 255, 255, 0.3);
    color: white;
}

/* Chip Color Variants */
.chip-new.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.chip-warning.active {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.chip-critical.active {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.chip-expiring.active {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.chip-healthy.active {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

/* ========================================
   ACTIVE FILTERS DISPLAY
   ======================================== */
.active-filters-container {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
    padding: 16px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 12px;
    border: 1px solid #bae6fd;
    animation: slideDown 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.active-filters-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #0369a1;
    white-space: nowrap;
}

.active-filters-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.active-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: white;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    color: #0369a1;
}

.remove-filter-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border: none;
    background: #f0f9ff;
    color: #0369a1;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 10px;
}

.remove-filter-btn:hover {
    background: #0369a1;
    color: white;
}

.clear-all-filters {
    padding: 6px 12px;
    background: white;
    border: 1px solid #bae6fd;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #0369a1;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.clear-all-filters:hover {
    background: #0369a1;
    color: white;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .filter-primary-row {
        flex-direction: column;
        align-items: stretch;
    }

    .modern-search-box {
        min-width: 100%;
    }

    .view-options {
        justify-content: center;
    }

    .filters-grid {
        grid-template-columns: 1fr;
    }

    .filter-actions {
        flex-direction: column-reverse;
    }

    .btn-modern-primary,
    .btn-modern-secondary {
        width: 100%;
        justify-content: center;
    }

    .modern-quick-filters {
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-chips-container {
        width: 100%;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .modern-filter-container *,
    .modern-chip,
    .advanced-filters-panel {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.modern-chip:focus,
.view-option-btn:focus,
.filter-toggle-btn:focus,
.btn-modern-primary:focus,
.btn-modern-secondary:focus {
    outline: 2px solid #6366f1;
    outline-offset: 2px;
}

/* ========================================
   SEARCH-ONLY FILTER BAR
   Minimal search design
   ======================================== */
.search-only-bar {
    background: white;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.search-box-minimal {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 600px;
}

.search-icon {
    color: #9ca3af;
    font-size: 18px;
}

.search-input-minimal {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    padding: 8px 0;
    font-size: 15px;
    color: #111827;
    font-weight: 400;
}

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

.search-input-minimal:focus + .search-icon {
    color: #6366f1;
}

.search-clear-minimal {
    display: none;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s;
}

.search-clear-minimal:hover {
    background: #e5e7eb;
    color: #374151;
}

/* ========================================
   MODERN TABLE HEADER WITH FILTERS
   ======================================== */
.companies-table thead th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 16px;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.th-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.th-label {
    flex: 1;
}

.th-controls {
    display: flex;
    align-items: center;
    gap: 4px;
}

.filter-dropdown-btn,
.sort-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #9ca3af;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
}

.filter-dropdown-btn:hover,
.sort-btn:hover {
    background: #e5e7eb;
    color: #6366f1;
}

.filter-dropdown-btn.has-filter {
    background: #6366f1;
    color: white;
}

.filter-dropdown-btn.has-filter:hover {
    background: #5558e3;
}

/* Column Filter Dropdown */
.column-filter-dropdown {
    position: fixed;
    width: 280px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15),
                0 4px 6px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    z-index: 1000;
    animation: dropdownSlide 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.filter-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
}

.filter-dropdown-title {
    font-weight: 600;
    font-size: 14px;
    color: #111827;
}

.filter-dropdown-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #6b7280;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-dropdown-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.filter-dropdown-search {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.filter-search-icon {
    color: #9ca3af;
    font-size: 14px;
}

.filter-search-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    padding: 6px 10px;
    font-size: 13px;
    color: #111827;
    background: white;
    outline: none;
    transition: all 0.2s;
}

.filter-search-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

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

.filter-dropdown-body {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px;
}

.filter-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.filter-checkbox-label:hover {
    background: #f9fafb;
}

.filter-checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #6366f1;
}

.filter-checkbox-text {
    flex: 1;
    font-size: 14px;
    color: #374151;
}

.filter-dropdown-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e7eb;
}

.btn-filter-clear-column,
.btn-filter-apply-column {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-filter-clear-column {
    background: transparent;
    color: #6b7280;
}

.btn-filter-clear-column:hover {
    background: #f3f4f6;
    color: #374151;
}

.btn-filter-apply-column {
    background: #6366f1;
    color: white;
}

.btn-filter-apply-column:hover {
    background: #5558e3;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .search-box-minimal {
        max-width: 100%;
    }

    .th-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .th-controls {
        width: 100%;
        justify-content: flex-end;
    }

    .column-filter-dropdown {
        width: 90vw;
        max-width: 320px;
    }
}
