/* =====================================================
   COMMUNITY THEME — DARK token values (206)
   Loaded by App.razor when CommunityConfig.IsDarkMode = 1
   (never on /x/ admin routes). True neutral gray palette,
   WCAG 2.1 AA. Brand tokens are theme-agnostic and come
   from community-theme.css + the runtime :root injection.
   ===================================================== */

:root {
    /* Surfaces */
    --surface: #121212;
    --surface-alt: #1e1e1e;
    --surface-sunken: #262626;
    --surface-rgb: 18, 18, 18;

    /* Borders */
    --border: #2e2e2e;
    --border-strong: #3a3a3a;

    /* Text (WCAG AA on the surfaces above) */
    --text-primary: #ededed;      /* 13.9:1 on #121212 */
    --text-secondary: #b0b0b0;    /* 7.4:1 on #1e1e1e */
    --text-tertiary: #8a8a8a;     /* large text / placeholders only */
    --text-contrast-high: #ffffff;
    --accent-text: #6FCFDD;

    /* Glass / shadow / overlay */
    --glass-white: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-strong: rgba(255, 255, 255, 0.4);
    --card-shadow: rgba(0, 0, 0, 0.45);
    --card-shadow-hover: rgba(0, 0, 0, 0.55);
    --scrim: rgba(0, 0, 0, 0.65);

    /* Skeletons */
    --skeleton-base: #1e1e1e;
    --skeleton-sheen: #2a2a2a;

    /* Status */
    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.15);
    --warning: #f59e0b;
    --error: #f87171;
    --info: #60a5fa;
    --accent-bg: rgba(111, 207, 221, 0.12);
    --status-success-bg: rgba(16, 185, 129, 0.16);
    --status-success-text: #6ee7b7;
    --status-warning-bg: rgba(245, 158, 11, 0.16);
    --status-warning-text: #fbbf24;
    --status-error-bg: rgba(239, 68, 68, 0.16);
    --status-error-text: #f87171;
    --status-info-bg: rgba(59, 130, 246, 0.16);
    --status-info-text: #93c5fd;

    /* Back-compat aliases (identical lines to the light file) */
    --bg-white: var(--surface);
    --bg-gray-light: var(--surface-alt);
    --bg-gray: var(--surface-sunken);
    --dark-bg: var(--surface);
    --darker-bg: var(--surface-sunken);
    --border-color: var(--border);
    --border-light: var(--border);
    --success-color: var(--success);
    --warning-color: var(--warning);
    --warning-text: var(--status-warning-text);
}

/* =====================================================
   206 — ADMIN LIGHT PIN (defense-in-depth).
   The /x/ admin must stay light even if this dark file is
   loaded (SPA navigation from a dark public page into /x
   keeps the document's stylesheet — see plan Task 7 Step 3).
   :has() is already used elsewhere in the app's CSS.
   Values MUST byte-match community-theme-light.css.
   ===================================================== */
body:has(.admin-layout) {
    --surface: #ffffff;
    --surface-alt: #f9fafb;
    --surface-sunken: #f3f4f6;
    --surface-rgb: 255, 255, 255;
    --border: #e5e7eb;
    --border-strong: #d1d5db;
    --text-primary: #1f2937;
    --text-secondary: #4B5563;
    --text-tertiary: #9ca3af;
    --text-contrast-high: #374151;
    --accent-text: #1A7A8A;
    --glass-white: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.1);
    --glass-border-strong: rgba(0, 0, 0, 0.3);
    --card-shadow: rgba(209, 209, 209, 0.15);
    --card-shadow-hover: rgba(209, 209, 209, 0.25);
    --scrim: rgba(0, 0, 0, 0.5);
    --skeleton-base: #f0f0f0;
    --skeleton-sheen: #e0e0e0;
    --success: #059669;
    --success-bg: rgba(5, 150, 105, 0.1);
    --warning: #D97706;
    --error: #DC2626;
    --info: #3b82f6;
    --accent-bg: rgba(26, 122, 138, 0.1);
    --status-success-bg: #d1fae5;
    --status-success-text: #065f46;
    --status-warning-bg: #fef3c7;
    --status-warning-text: #92400e;
    --status-error-bg: #fee2e2;
    --status-error-text: #991b1b;
    --status-info-bg: #dbeafe;
    --status-info-text: #1e40af;
}
