/*
 * Violet (light) color scheme — the fallback scheme.
 *
 * One of N scheme stylesheets in schemes/. Each scheme defines the
 * palette as CSS custom properties on :root; styles.css holds only
 * structural rules and references the vars via var(--name). Adding
 * a new scheme = drop another .css next to this one with the same
 * var names and different values.
 *
 * Load AFTER styles.css so :root declarations win the cascade.
 * Anonymous (logged-out) users get this scheme; logged-in users
 * may choose a different scheme on their profile.
 */
:root {
    /* Brand */
    --primary-color: #667eea;
    --secondary-color: #764ba2;

    /* Semantic colors */
    --success-color: #10b981;
    --danger-color: #ef4444;
    --danger-hover: #dc2626;

    /* Text */
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --text-on-color: white;
    --text-on-color-muted: rgba(255, 255, 255, 0.8);
    --text-on-color-faint: rgba(255, 255, 255, 0.3);

    /* Page chrome */
    --bg-page: #e8eaf6;                      /* home page flat surface */
    --bg-gradient: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    /* Body bg: in light mode, inner pages get the brand gradient (with
       a white card on top); home opts out via body.page-home → --bg-page.
       In darkmode this gets pointed at --bg-page so every page is flat
       dark and consistent. */
    --body-bg: var(--bg-gradient);
    --surface: white;                        /* cards, drawer, modals */
    --surface-card: #fafbfd;                 /* subtler off-white for grid cards */
    --border-color: #e5e7eb;

    /* "Soft" tinted surface — used for rows inside cards (preferred list,
       active-buyer pill, item rows, upload area, picker items). */
    --bg-soft: #f0f3ff;
    --bg-soft-hover: #eef1ff;
    --bg-soft-active: #e8ebff;
    --border-soft: #e0e6ff;
    --border-soft-hover: #cdd6ff;

    /* Hover/focus glows */
    --primary-glow: rgba(102, 126, 234, 0.1);
    --primary-glow-strong: rgba(102, 126, 234, 0.4);

    /* Shadows */
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.1);
    --shadow-menu: 2px 0 10px rgba(0, 0, 0, 0.1);
    --shadow-modal: 0 20px 60px rgba(0, 0, 0, 0.3);
    --shadow-header: 0 4px 12px rgba(0, 0, 0, 0.18);
    --shadow-card: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.14);
    --shadow-toast: 0 8px 24px rgba(0, 0, 0, 0.2);

    /* Overlays */
    --overlay: rgba(0, 0, 0, 0.5);

    /* Close button (× on cards) */
    --close-color: var(--danger-hover);
    --close-color-hover: #991b1b;
    --close-bg-hover: rgba(0, 0, 0, 0.05);

    /* Inline status backgrounds (.message variants) */
    --bg-error: #fee2e2;
    --bg-success: #d4edda;

    /* Tag/badge palette (admin pill, default-tag, preferred-row.is-default) */
    --admin-badge-bg: #5b21b6;
    --admin-badge-text: #fff;
    --buyers-badge-bg: #1e40af;
    --buyers-badge-text: #fff;
    --preferred-default-bg: #ede9fe;
    --preferred-default-border: var(--admin-badge-bg);
    --preferred-default-shadow: 0 4px 16px rgba(91, 33, 182, 0.18);

    /* Warning palette (verify banner, verify-required) */
    --warn-bg: #fff3cd;
    --warn-border: #ffc107;
    --warn-text: #664d03;

    /* Admin overview stat-card tints (purple = audit, orange = expiring) */
    --admin-stat-audit-bg: #ede9fe;
    --admin-stat-audit-border: #7c3aed;
    --admin-stat-expiring-bg: #fde6d3;
    --admin-stat-expiring-border: #f97316;
    --admin-stat-expiring-text: #9a3412;

    /* Secondary button (gray neutral, dashboard "Cancel"/"Restore") */
    --neutral-bg: #e5e7eb;
    --neutral-bg-hover: #d1d5db;
    --neutral-text: var(--text-dark);

    /* Danger-soft (btn-small.btn-danger hover, error chips inside dashboard) */
    --danger-soft-bg: #fee2e2;
    --danger-soft-border: #fecaca;
    --danger-soft-text: #991b1b;

    /* Info-soft (item-badge.nohist) */
    --info-soft-text: #3730a3;

    /* Code block (raw-text uploads pre) */
    --code-bg: #f3f4f6;
    --code-border: var(--border-color);
}
