:root {
    --border: hsl(240 5.9% 90%);
    --input: hsl(240 5.9% 90%);
    --ring: hsl(240 10% 3.9%);
    --background: hsl(0 0% 100%);
    --foreground: hsl(240 10% 3.9%);
    --primary: hsl(240 5.9% 10%);
    --primary-foreground: hsl(0 0% 98%);
    --secondary: hsl(240 4.8% 95.9%);
    --secondary-foreground: hsl(240 5.9% 10%);
    --muted: hsl(240 4.8% 95.9%);
    --muted-foreground: hsl(240 3.8% 46.1%);
    --radius: 0.5rem;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: var(--background);
    color: var(--foreground);
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.header {
    border-bottom: 1px solid var(--border);
    background: var(--background);
    padding: 1rem 2rem;
    flex-shrink: 0;
}

.header-content {
    display: flex;
    justify-content: between;
    align-items: center;
    gap: 2rem;
}

.header-logo {
    height: 25px;
    filter: invert(1) brightness(0);
    transition: opacity 0.2s;
}

.header-logo:hover {
    opacity: 0.8;
}

.slogan {
    margin: 0;
    letter-spacing: 5px;
    font-size: 12px;
    font-weight: bold;
}

.main-container {
    padding: 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.stats-row {
    display: flex;
    gap: 2rem;
    padding: 1rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    align-items: baseline;
    flex-shrink: 0;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--foreground);
}

.controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
    flex-shrink: 0;
    justify-content: space-between;
}

.controls-left {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex: 1;
}

.controls-right {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input {
    flex: 1;
    max-width: 300px;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    background: var(--background);
    transition: border-color 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--ring);
}

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

.filter-select:focus {
    outline: none;
    border-color: var(--ring);
}

.btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--background);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn:hover {
    background:#333 !important;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    border-color: var(--primary);
}

.btn-primary:hover {
    opacity: 0.9;
    background: #333 !important;
} 

.table-container {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--background);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.table-scroll {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

thead {
    position: sticky;
    top: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    z-index: 10;
}

th {
    text-align: left;
    padding: 0.75rem 1rem;
    font-weight: 500;
    color: var(--muted-foreground);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

tr:hover {
    background: var(--secondary);
}

.checkbox {
    width: 1rem;
    height: 1rem;
    cursor: pointer;
    accent-color: var(--primary);
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.loading-content {
    background: var(--background);
    padding: 2rem;
    border-radius: var(--radius);
    text-align: center;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--muted-foreground);
}

.empty-state i {
    font-size: 3rem;
    opacity: 0.3;
    margin-bottom: 1rem;
}

.badge {
    padding: 0.25rem 0.5rem;
    border-radius: calc(var(--radius) / 2);
    font-size: 0.75rem;
    font-weight: 500;
    display: inline-block;
}

.badge-success {
    background: hsl(142 76% 94%);
    color: hsl(142 76% 36%);
}

.badge-danger {
    background: hsl(0 72% 94%);
    color: hsl(0 72% 36%);
}

.badge-secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 0;
    min-width: 300px;
    max-height: 400px;
    overflow: hidden;
    z-index: 1000;
    display: none;
    right: 0;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-header {
    padding: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

.column-list {
    max-height: 300px;
    overflow-y: auto;
    overflow-x: hidden;
}

.column-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--background);
    z-index: 1;
}

.column-search input {
    width: 100%;
    padding: 0.375rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) / 2);
    font-size: 0.875rem;
    background: var(--background);
}

.column-search input:focus {
    outline: none;
    border-color: var(--ring);
}

.column-item {
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.column-item:hover {
    background: var(--secondary);
}

.column-item input[type="checkbox"] {
    cursor: pointer;
}