:root {
    --color-brand-50: #f0f9ff;
    --color-brand-100: #e0f2fe;
    --color-brand-500: #0ea5e9;
    --color-brand-600: #0284c7;
    --color-emerald-50: #ecfdf5;
    --color-emerald-500: #10b981;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
}
* { scrollbar-width: thin; scrollbar-color: var(--color-slate-300) transparent; }
html { scroll-behavior: smooth; }
body { font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, sans-serif; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--color-slate-300); border-radius: 3px; }
.card {
    background: #fff;
    border: 1px solid var(--color-slate-200);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.card:hover { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05); }
.editable {
    cursor: text;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.25rem 0.5rem;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    min-width: 60px;
    outline: none;
}
.editable:hover { background-color: var(--color-slate-50); border-color: var(--color-slate-200); }
.editable:focus { background-color: #fff; border-color: var(--color-brand-500); box-shadow: 0 0 0 2px var(--color-brand-100); }
.editable-cell {
    cursor: text;
    border: 1px solid transparent;
    border-radius: 0.25rem;
    padding: 0.375rem 0.5rem;
    transition: all 0.15s ease;
    outline: none;
}
.editable-cell:hover { background-color: var(--color-slate-50); border-color: var(--color-slate-200); }
.editable-cell:focus { background-color: #fff; border-color: var(--color-brand-500); box-shadow: 0 0 0 2px var(--color-brand-100); }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; }
.data-table th {
    background-color: var(--color-slate-50);
    color: var(--color-slate-600);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-slate-200);
    text-align: left;
    white-space: nowrap;
}
.data-table td {
    padding: 0.625rem 1rem;
    border-bottom: 1px solid var(--color-slate-100);
    font-size: 0.875rem;
    color: var(--color-slate-700);
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background-color: var(--color-slate-50); }
.data-table .num { font-variant-numeric: tabular-nums; text-align: right; }
.tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 0.5rem;
    transition: all 0.15s ease;
    white-space: nowrap;
}
.tab-btn.active { background-color: var(--color-brand-600); color: #fff; }
.tab-btn:not(.active) { color: var(--color-slate-600); }
.tab-btn:not(.active):hover { background-color: var(--color-slate-100); color: var(--color-slate-900); }
.toggle-switch input { appearance: none; width: 2.25rem; height: 1.25rem; border-radius: 9999px; background-color: var(--color-slate-300); transition: background-color 0.2s; cursor: pointer; position: relative; border: none; outline: none; }
.toggle-switch input::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 1rem; height: 1rem; border-radius: 9999px; background: #fff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); transition: transform 0.2s;
}
.toggle-switch input:checked { background-color: var(--color-brand-500); }
.toggle-switch input:checked::after { transform: translateX(1rem); }
.progress-track { background-color: var(--color-slate-200); border-radius: 9999px; overflow: hidden; height: 0.5rem; }
.progress-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease; }
.form-input { width: 100%; padding: 0.5rem 0.75rem; border: 1px solid var(--color-slate-200); border-radius: 0.5rem; font-size: 0.875rem; color: var(--color-slate-800); background: #fff; transition: border-color 0.15s, box-shadow 0.15s; outline: none; }
.form-input:focus { border-color: var(--color-brand-500); box-shadow: 0 0 0 3px var(--color-brand-100); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.animate-fade-in { animation: fadeIn 0.3s ease-out forwards; }
@media (max-width: 640px) { .data-table th, .data-table td { padding: 0.5rem; font-size: 0.8rem; } }
