:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --success: #10B981;
    --warning: #F59E0B;
    --danger: #EF4444;
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
}

body {
    background: var(--gray-50);
    min-height: 100vh;
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.nav-container {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-900));
    color: white;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    margin-bottom: 0;
}

.nav-content {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    font-size: 2rem;
    color: var(--primary);
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.5));
}

.app-title {
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    margin: 0;
}

.stats-container {
    display: flex;
    gap: 1rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    padding: 0.75rem 1.5rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.supplier-stats-container {
    background: linear-gradient(to right, var(--gray-800), var(--gray-900));
    padding: 1.5rem 0;
    margin-bottom: 2rem;
}

.supplier-stats-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.supplier-stats-title {
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.supplier-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.supplier-stat-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border-radius: 0.5rem;
    padding: 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.supplier-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}

.supplier-header {
    margin-bottom: 1rem;
}

.supplier-name {
    color: white;
    font-weight: 600;
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.new-flag {
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.supplier-count, .supplier-mrr {
    color: var(--gray-300);
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

.supplier-details, .supplier-details-expanded {
    display: grid;
    gap: 1rem;
}

.detail-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0.375rem;
    padding: 1rem;
}

.detail-section h4 {
    color: var(--gray-300);
    font-size: 0.875rem;
    margin: 0 0 0.5rem 0;
}

.metric-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.metric-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--gray-300);
    font-size: 0.8125rem;
    padding: 0.25rem 0;
}

.metric-name {
    max-width: 70%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.metric-count {
    font-weight: 500;
}

.supplier-expand-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.supplier-expand-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-controls {
    display: flex;
    gap: 1rem;
    margin: 0;
    flex-wrap: wrap;
    flex: 1;
    min-width: 300px;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-select {
    min-width: 150px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    background-color: white;
    font-size: 0.875rem;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.main-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.control-panel {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    border: 1px solid var(--gray-200);
}

.last-update {
    color: var(--gray-600);
    font-size: 0.875rem;
    white-space: nowrap;
}

.refresh-btn {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.refresh-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.refresh-animation {
    animation: spin 1s linear infinite;
}

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

.data-table {
    background: white;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--gray-200);
}

.data-table table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: var(--gray-50);
    padding: 0.75rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-600);
    border-bottom: 1px solid var(--gray-200);
}

.data-table td {
    padding: 1rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-100);
}

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

.data-table tr:hover td {
    background: var(--gray-50);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.75rem;
    display: inline-block;
}

.status-indicator.offline {
    background: var(--danger);
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    animation: pulse 2s infinite;
}

.verification-status {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: var(--gray-100);
    flex: 1;
    text-align: center;
}

.verification-status.verifying {
    background: var(--warning);
    color: white;
}

.verification-status.success {
    background: var(--success);
    color: white;
}

.verification-status.error {
    background: var(--danger);
    color: white;
}

.empty-state, .error-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state i {
    color: var(--success);
    margin-bottom: 1rem;
}

.error-state {
    color: var(--danger);
}

.error-state i {
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .search-controls {
        flex-direction: column;
    }

    .stats-container {
        flex-wrap: wrap;
        justify-content: center;
    }

    .control-panel {
        flex-direction: column;
        text-align: center;
    }

    .supplier-stats-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        overflow-x: auto;
    }
}

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: 4px;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}