﻿:root,
html[data-theme="light"] {
    color-scheme: light;

    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --surface-strong: #eef2f7;

    --text: #172033;
    --text-soft: #667085;
    --text-faint: #98a2b3;

    --border: #e4e8ef;
    --border-strong: #d5dbe5;

    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-soft: #eaf1ff;

    --success: #15803d;
    --success-soft: #ecfdf3;

    --danger: #c2413a;
    --danger-soft: #fff1f0;

    --warning: #a16207;
    --warning-soft: #fff8e1;

    --sidebar: #101828;
    --sidebar-soft: #182230;
    --sidebar-text: #d0d5dd;
    --sidebar-muted: #98a2b3;

    --shadow-sm: 0 8px 24px rgba(16, 24, 40, 0.05);
    --shadow-md: 0 18px 50px rgba(16, 24, 40, 0.09);
}

html[data-theme="dark"] {
    color-scheme: dark;

    --bg: #0f141d;
    --surface: #161d28;
    --surface-soft: #1c2532;
    --surface-strong: #222d3b;

    --text: #f1f5f9;
    --text-soft: #aab6c5;
    --text-faint: #7c899c;

    --border: #2a3545;
    --border-strong: #354257;

    --primary: #5b8cff;
    --primary-hover: #79a2ff;
    --primary-soft: #19284a;

    --success: #4ade80;
    --success-soft: #143322;

    --danger: #fb7185;
    --danger-soft: #3a1d24;

    --warning: #facc15;
    --warning-soft: #352d13;

    --sidebar: #0a0f17;
    --sidebar-soft: #131b27;
    --sidebar-text: #d7dee9;
    --sidebar-muted: #8d9aad;

    --shadow-sm: 0 8px 24px rgba(0, 0, 0, 0.18);
    --shadow-md: 0 18px 50px rgba(0, 0, 0, 0.28);
}

html {
    background: var(--bg);
}

body {
    background: var(--bg);
    color: var(--text);
    transition: background-color .2s ease, color .2s ease;
}

a {
    color: var(--primary);
}

.form-control,
.form-select,
.table,
.card {
    color: var(--text);
}

.table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--text);
    --bs-table-border-color: var(--border);
}

.card {
    background: var(--surface);
    border-color: var(--border);
}

.text-muted {
    color: var(--text-soft) !important;
}
