body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Sidebar */
.nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    margin: 0 0.5rem;
    color: #4b5563;
    /* gray-600 */
    border-radius: 0.5rem;
    /* rounded-lg */
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.nav-link:hover {
    background-color: #f3f4f6;
    /* gray-100 */
    color: #111827;
    /* gray-900 */
}

.nav-link.active {
    background-color: #4f46e5;
    /* indigo-600 */
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -2px rgba(79, 70, 229, 0.2);
}

.nav-link.active svg {
    color: #ffffff;
}

.nav-link svg {
    color: #9ca3af;
    /* gray-400 */
    transition: color 0.2s ease-in-out;
}

.nav-link:hover svg {
    color: #111827;
    /* gray-900 */
}


.nav-section-title {
    padding: 1.5rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #9ca3af;
    /* gray-400 */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Main Content & Cards */
.page-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    /* gray-900 */
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
}

.page-subtitle {
    font-size: 1.125rem;
    color: #6b7280;
    /* gray-500 */
    margin-bottom: 2rem;
}

.card {
    background-color: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    border: 1px solid #e5e7eb;
    /* gray-200 */
    height: 100%;
}

.card-link-wrapper:hover .card {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
}

.card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1f2937;
    /* gray-800 */
}

.card-body {
    margin-top: 0.5rem;
    color: #6b7280;
    /* gray-500 */
    font-size: 0.9rem;
    flex-grow: 1;
}

.card-footer {
    margin-top: 1.5rem;
    color: #4f46e5;
    /* indigo-600 */
    font-weight: 600;
    font-size: 0.9rem;
}

/* Forms */
.form-container {
    background-color: white;
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
    /* gray-700 */
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    /* gray-300 */
    border-radius: 0.5rem;
    transition: border-color 0.2s;
    background-color: #f9fafb;
    /* gray-50 */
}

.form-input:focus {
    outline: none;
    border-color: #4f46e5;
    /* indigo-600 */
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.2);
    background-color: white;
}

.btn-primary {
    background-color: #4f46e5;
    /* indigo-600 */
    color: white;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #4338ca;
    /* indigo-700 */
}

/* Results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.result-card {
    background-color: white;
    padding: 1.25rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.loading-indicator,
.error-message {
    margin-top: 1.5rem;
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
}

.loading-indicator {
    background-color: #eef2ff;
    /* indigo-50 */
    border: 1px solid #c7d2fe;
    /* indigo-200 */
    color: #3730a3;
    /* indigo-800 */
}

.error-message {
    background-color: #fee2e2;
    /* red-50 */
    border: 1px solid #fecaca;
    /* red-200 */
    color: #991b1b;
    /* red-800 */
}

.filter-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Autocomplete Styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 240px;
    overflow-y: auto;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    margin-top: 1px;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.15s ease-in-out;
}

.autocomplete-item:last-child {
    border-bottom: none;
}

.autocomplete-item:hover,
.autocomplete-item.autocomplete-active {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.autocomplete-item.autocomplete-active {
    background-color: #bfdbfe;
}

.industry-btn {
    @apply text-xs px-3 py-2 bg-blue-100 text-blue-800 rounded-md hover:bg-blue-200 transition-colors cursor-pointer border-0 text-left;
}

.industry-small-btn {
    @apply text-xs px-2 py-1 bg-gray-100 text-gray-700 rounded hover:bg-gray-200 transition-colors cursor-pointer border-0 text-left;
}

.country-tag {
    @apply text-xs px-2 py-1 bg-green-100 text-green-800 rounded-full hover:bg-green-200 transition-colors cursor-pointer border-0;
}

.filter-tag {
    @apply text-xs px-2 py-1 bg-purple-100 text-purple-800 rounded-full hover:bg-purple-200 transition-colors cursor-pointer border-0;
}

.csv-upload-component {
    transition: all 0.3s ease;
}

.csv-upload-component:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.csv-preview table {
    font-size: 0.875rem;
}

.csv-preview th {
    background-color: #f9fafb;
    font-weight: 600;
}

.csv-preview td {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.csv-filters-section .grid {
    align-items: start;
}

/* Upload area hover effects */
.border-dashed:hover {
    border-color: #6b7280;
    background-color: #f9fafb;
}

/* Filter info panels */
.csv-filters-section [id$="-info"] {
    transition: all 0.3s ease;
}

.csv-filters-section [id$="-info"]:not(.hidden) {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive improvements */
@media (max-width: 768px) {
    .csv-filters-section .grid {
        grid-template-columns: 1fr;
    }
    
    .csv-preview {
        overflow-x: auto;
    }
    
    .csv-preview table {
        min-width: 500px;
    }
}