@tailwind base;
@tailwind components;
@tailwind utilities;

:root {
    --bg: #0b0c10;
    --card: #111318;
    --border: #1f2430;
    --text: #e6e6e6;
    --muted: #a0a7b4;
    --accent: #7c3aed;
    /* inspired accent */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
}

/* Explicit theme overrides via data-theme attribute */
[data-theme="dark"] {
    --bg: #0b0c10;
    --card: #111318;
    --border: #1f2430;
    --text: #e6e6e6;
    --muted: #a0a7b4;
}

[data-theme="light"] {
    --bg: #f8fafc;
    --card: #ffffff;
    --border: #e5e7eb;
    --text: #0f172a;
    --muted: #475569;
}

[data-theme="blue"] {
    --bg: #1e293b;
    --card: #2d3b4e;
    --border: #3d4f66;
    --text: #f1f5f9;
    --muted: #94a3b8;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg: #f8fafc;
        --card: #ffffff;
        --border: #e5e7eb;
        --text: #0f172a;
        --muted: #475569;
    }
}

html,
body,
#root {
    height: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
}

.container {
    margin: 0 auto;
    padding: 24px;
    max-width: 1100px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 2px 12px rgba(0, 0, 0, 0.08);
}

.stat {
    display: flex;
    align-items: center;
    gap: 12px;
}

.badge {
    display: inline-block;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(124, 58, 237, 0.08);
    color: var(--text);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

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

.muted {
    color: var(--muted);
}

.accent {
    color: var(--accent);
}

.success {
    color: var(--success);
}

.warning {
    color: var(--warning);
}

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

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.button {
    border: 1px solid var(--border);
    background: var(--card);
    color: var(--text);
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.button:hover {
    filter: brightness(1.05);
}