:root {
    --surface-0: #05070C;
    --surface-1: #0A0D12;
    --surface-2: #0F131C;
    --surface-3: #161D2B;
    --surface-4: #1E2636;

    --accent: #38BDF8;
    --accent-hover: #0EA5E9;
    --accent-muted: #1E3A5F;

    --text-primary: #F8FAFC;
    --text-secondary: #94A3B8;
    --text-muted: #64748B;

    --success: #6EE7B7;
    --warning: #FBBF24;
    --error: #F87171;

    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-full: 999px;

    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.2);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --surface-0: #FFFFFF;
        --surface-1: #F8FAFC;
        --surface-2: #F1F5F9;
        --surface-3: #E2E8F0;
        --surface-4: #CBD5E1;

        --text-primary: #0F172A;
        --text-secondary: #475569;
        --text-muted: #94A3B8;

        --accent-muted: #E0F2FE;
    }
}

:root[data-theme="light"] {
    --surface-0: #FFFFFF;
    --surface-1: #F8FAFC;
    --surface-2: #F1F5F9;
    --surface-3: #E2E8F0;
    --surface-4: #CBD5E1;

    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-muted: #94A3B8;

    --accent-muted: #E0F2FE;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--surface-0);
    color: var(--text-primary);
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

.card {
    background: var(--surface-1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--radius-full);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: var(--surface-0);
}

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

.btn-secondary {
    background: var(--surface-3);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: var(--surface-4);
}

.btn-success {
    background: var(--success);
    color: var(--surface-0);
}

.btn-danger {
    background: var(--error);
    color: var(--surface-0);
}

.input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--surface-2);
    border: 1px solid var(--surface-3);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-muted);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface-1);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.table th,
.table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--surface-3);
}

.table th {
    background: var(--surface-2);
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

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

.table tr:hover {
    background: var(--surface-2);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 500;
}

.badge-success {
    background: var(--success);
    color: var(--surface-0);
}

.badge-warning {
    background: var(--warning);
    color: var(--surface-0);
}

.badge-error {
    background: var(--error);
    color: var(--surface-0);
}

.badge-info {
    background: var(--accent);
    color: var(--surface-0);
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.flex {
    display: flex;
    gap: var(--spacing-sm);
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mb-1 { margin-bottom: var(--spacing-xs); }
.mb-2 { margin-bottom: var(--spacing-sm); }
.mb-3 { margin-bottom: var(--spacing-md); }
.mb-4 { margin-bottom: var(--spacing-lg); }

.mt-1 { margin-top: var(--spacing-xs); }
.mt-2 { margin-top: var(--spacing-sm); }
.mt-3 { margin-top: var(--spacing-md); }
.mt-4 { margin-top: var(--spacing-lg); }
