/* Shared design tokens; also consumed by the isolated Django admin adapter. */
:root, html[data-theme="dark"] {
    --rj-bg: #292a2c;
    --rj-bg-alt: #2e3032;
    --rj-surface: #343638;
    --rj-surface-2: #404247;
    --rj-text: #f1eee8;
    --rj-muted: #bdb7ae;
    --rj-border: #51504c;
    --rj-control-border: #94928b;
    --rj-primary: #c94718;
    --rj-primary-hover: #b43d12;
    --rj-primary-soft: #4b392f;
    --rj-accent: #ffb27c;
    --rj-danger: #ff8b9b;
    --rj-danger-soft: #483435;
    --rj-success: #64d9aa;
    --rj-success-soft: #343e34;
    --rj-warning: #efc569;
    --rj-warning-soft: #484031;
    --rj-info: #8dbaff;
    --rj-info-soft: #333e48;
    --rj-shadow: 0 2px 4px rgb(16 12 8 / 10%), 0 12px 30px rgb(16 12 8 / 14%);
    --rj-shadow-hover: 0 3px 6px rgb(16 12 8 / 12%), 0 16px 36px rgb(16 12 8 / 20%);
    --rj-shadow-button: 0 2px 3px rgb(24 12 6 / 14%), 0 5px 12px rgb(24 12 6 / 12%);
    --rj-header-bg: linear-gradient(110deg, var(--rj-surface), var(--rj-primary-soft));
    --rj-warm-surface: linear-gradient(135deg, var(--rj-primary-soft), var(--rj-surface));
    --rj-icon-bg: linear-gradient(145deg, var(--rj-primary-soft), var(--rj-surface-2));
    --rj-hero-bg: radial-gradient(ellipse at 0% 30%, var(--rj-primary-soft), transparent 65%), var(--rj-bg);
    --rj-feature-bg: linear-gradient(120deg, var(--rj-primary-soft), var(--rj-surface-2));
    --rj-radius: 16px;
    --rj-radius-sm: 12px;
    --rj-container: 1280px;
    --rj-header-height: 72px;
    --rj-sidebar-width: 224px;
    --rj-font: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
    color-scheme: dark;
}
html[dir="ltr"] { --rj-font: "Inter Variable", Inter, "Segoe UI", Arial, sans-serif; }
html[data-theme="light"] {
    --rj-bg: #e7e2da;
    --rj-bg-alt: #e4ddd2;
    --rj-surface: #f1ece4;
    --rj-surface-2: #e4ddd2;
    --rj-text: #34322f;
    --rj-muted: #625e58;
    --rj-border: #cec6ba;
    --rj-control-border: #807970;
    --rj-primary-soft: #f1dcd0;
    --rj-accent: #a9401b;
    --rj-danger: #b42335;
    --rj-danger-soft: #f0ded9;
    --rj-success: #176f49;
    --rj-success-soft: #e5e7d9;
    --rj-warning: #805600;
    --rj-warning-soft: #efe3cb;
    --rj-info: #225da8;
    --rj-info-soft: #e1e5e8;
    --rj-shadow: 0 2px 4px rgb(68 48 28 / 4%), 0 12px 30px rgb(68 48 28 / 7%);
    --rj-shadow-hover: 0 3px 6px rgb(68 48 28 / 6%), 0 16px 36px rgb(68 48 28 / 11%);
    --rj-shadow-button: 0 2px 3px rgb(105 48 20 / 10%), 0 5px 12px rgb(105 48 20 / 9%);
    color-scheme: light;
}
/* Django's native auto mode uses the same system preference as the public site. */
@media (prefers-color-scheme: light) {
    html:not([data-theme="dark"]):not([data-theme="light"]) {
        --rj-bg: #e7e2da;
        --rj-bg-alt: #e4ddd2;
        --rj-surface: #f1ece4;
        --rj-surface-2: #e4ddd2;
        --rj-text: #34322f;
        --rj-muted: #625e58;
        --rj-border: #cec6ba;
        --rj-control-border: #807970;
        --rj-primary-soft: #f1dcd0;
        --rj-accent: #a9401b;
        --rj-danger: #b42335;
        --rj-danger-soft: #f0ded9;
        --rj-success: #176f49;
        --rj-success-soft: #e5e7d9;
        --rj-warning: #805600;
        --rj-warning-soft: #efe3cb;
        --rj-info: #225da8;
        --rj-info-soft: #e1e5e8;
        --rj-shadow: 0 2px 4px rgb(68 48 28 / 4%), 0 12px 30px rgb(68 48 28 / 7%);
        --rj-shadow-hover: 0 3px 6px rgb(68 48 28 / 6%), 0 16px 36px rgb(68 48 28 / 11%);
        --rj-shadow-button: 0 2px 3px rgb(105 48 20 / 10%), 0 5px 12px rgb(105 48 20 / 9%);
        color-scheme: light;
    }
}
@media (max-width: 1024px) { :root { --rj-header-height: 64px; } }

@media print {
    :root, html[data-theme], html:not([data-theme="dark"]):not([data-theme="light"]) {
        --rj-bg: #fff;
        --rj-bg-alt: #fff;
        --rj-surface: #fff;
        --rj-surface-2: #f3f3f3;
        --rj-text: #000;
        --rj-muted: #444;
        --rj-border: #ccc;
        --rj-control-border: #666;
        --rj-primary: #000;
        --rj-primary-hover: #000;
        --rj-accent: #000;
        --rj-primary-soft: #fff;
        --rj-danger: #000;
        --rj-danger-soft: #fff;
        --rj-success: #000;
        --rj-success-soft: #fff;
        --rj-warning: #000;
        --rj-warning-soft: #fff;
        --rj-info: #000;
        --rj-info-soft: #fff;
        --rj-shadow: none;
        --rj-shadow-hover: none;
        --rj-shadow-button: none;
        --rj-header-bg: #fff;
        --rj-warm-surface: #fff;
        --rj-icon-bg: #fff;
        --rj-hero-bg: #fff;
        --rj-feature-bg: #fff;
        color-scheme: light;
    }
}
