/*!
 * ============================================================================
 * Copyright (c) 2025 ATH SOLUTIONS (PTY) LTD. All rights reserved.
 * KwaZulu-Natal, Republic of South Africa.
 * ============================================================================
 *
 * @BEGIN Developer Log Header Block
 * @FILENAME: design-tokens.css
 * @TITLE: ATH Performance - Design Tokens
 * @DESCRIPTION: CSS custom properties defining the full design system token set. All component stylesheets must reference these tokens exclusively - no hardcoded hex values, magic numbers, or bare pixel values.
 * @AUTHOR: Ary van der Pijl
 * @COMPANY: ATH SOLUTIONS (PTY) LTD
 * @WEBSITE: https://www.ath.solutions/
 * @EMAIL: info@ath.solutions
 * @COPYRIGHT: All Rights Reserved
 * @LICENSE: ATH SOLUTIONS - PROPRIETARY SOFTWARE LICENCE AGREEMENT (https://www.ath.solutions/documents/ath_solutions_software_licence_agreement.pdf)
 *
 * BEGIN CHANGELOG
 * @IMPORTANT NOTICE: Developers working on these files MUST update and maintain the Developers Change Log, failure to do is not an option:
 * !==================================================================================================================================================================
 * VERSION 1.0.4
 * - File Modified | Ary van der Pijl | 2026-07-21 | ATH-UX-002 | Pivot to a literal Dashtreme glass re-skin (replaces the token-preserving pass): removed [data-theme="dark"] and all six [data-skin="..."] override blocks - nothing sets those attributes anymore, the app now has one dark-glass-over-background look with 15 background choices (see main.css's new Background Themes section) instead of light/dark + 7 colour skins. Added --glass-* tokens for the recipe (translucent panel bg/border, light-on-dark text) since the same ~6 rgba values now repeat across a dozen component rules in main.css. Repointed --color-bg/-surface/-surface-2/-border/-text/-text-muted, --sidebar-*, --header-*, --auth-page-bg/--auth-card-bg at the glass values so most component rules in main.css needed no direct edits. Added --glass-surface-opaque for modals/dropdowns, which stay solid per the source template (not glass, for legibility). Fixed --stat-navy-color (was the dark navy-700 brand hex used as icon foreground - illegible on the new dark background; now navy-300). |
 * VERSION 1.0.3
 * - File Modified | Ary van der Pijl | 2026-07-21 | ATH-UX-001 | Widened the shadow scale to soft single wide-blur shadows (was tight double-shadows) to match the Dashtreme-inspired re-skin's "floating card" elevation - values only, no token names changed, so all 7 skins/dark mode/per-tenant theming are unaffected. |
 * VERSION 1.0.2
 * - File Modified | Ary van der Pijl | 2026-06-16 | ATH-COMPLIANCE-001 | Applied ATH Solutions 2026 standards: updated header to use /*! format per G-17 |
 * VERSION 1.0.1
 * - File Modified | Ary van der Pijl | 2026-06-16 | DS-001 | Replace generic indigo primary with ATH Performance navy/gold brand palette; add extended lodge colour scale; add auth layout tokens |
 * - File Created | Ary van der Pijl | 2026-05-01 | ATH-SKELETON-001 | Initial file |
 * ==================================================================================================================================================================!
 * END CHANGELOG
 */

:root {
  /* ── Brand Palette ────────────────────────────────────────────────────────── */
  --color-navy-900: #0d1624;
  --color-navy-800: #131e35;
  --color-navy-700: #1B2A4A;   /* Primary brand - Deep Navy */
  --color-navy-600: #243761;
  --color-navy-500: #2e477a;
  --color-navy-400: #4a6399;
  --color-navy-300: #7a95be;
  --color-navy-200: #b0c3da;
  --color-navy-100: #e0e8f2;
  --color-navy-50:  #f0f4f9;

  --color-gold-900: #7a5800;
  --color-gold-800: #9a6e00;
  --color-gold-700: #B8860B;   /* Primary accent - Compass Gold */
  --color-gold-600: #d4a017;
  --color-gold-500: #e8b830;
  --color-gold-400: #f0ca5a;
  --color-gold-300: #f5d98a;
  --color-gold-200: #fae9b8;
  --color-gold-100: #fdf3da;
  --color-gold-50:  #fffbf0;

  /* ── Primary Brand Aliases ────────────────────────────────────────────────── */
  --color-primary:        var(--color-navy-700);   /* #1B2A4A */
  --color-primary-hover:  var(--color-navy-600);   /* #243761 */
  --color-primary-dark:   var(--color-navy-800);
  --color-primary-light:  var(--color-navy-50);
  --color-primary-text:   #ffffff;

  --color-accent:         var(--color-gold-700);   /* #B8860B */
  --color-accent-hover:   var(--color-gold-600);
  --color-accent-light:   var(--color-gold-50);
  --color-accent-text:    var(--color-navy-900);
  /* Gold-700 is only ~3.25:1 on white - fine for icons/borders (WCAG 1.4.11, 3:1)
     but fails 1.4.3 (4.5:1) for actual text. Use this variant for gold text/links
     on a light surface; gold-900 clears 6.5:1. */
  --color-accent-text-on-light: var(--color-gold-900);

  /* ── Neutral Scale ────────────────────────────────────────────────────────── */
  --color-neutral-900: #0f172a;
  --color-neutral-800: #1e293b;
  --color-neutral-700: #334155;
  --color-neutral-600: #475569;
  --color-neutral-500: #64748b;
  --color-neutral-400: #94a3b8;
  --color-neutral-300: #cbd5e1;
  --color-neutral-200: #e2e8f0;
  --color-neutral-100: #f1f5f9;
  --color-neutral-50:  #f8fafc;

  /* ── Backgrounds ──────────────────────────────────────────────────────────── */
  /* Glass re-skin: surfaces are translucent panels over the body's bg-theme
     image/gradient, not solid fills - see the Glass Recipe block below. */
  --color-bg:        #151313;
  --color-surface:   var(--glass-bg-dark);
  --color-surface-2: var(--glass-bg-light);

  /* ── Borders ──────────────────────────────────────────────────────────────── */
  --color-border:       var(--glass-border);
  --color-border-light: var(--glass-border);

  /* ── Text ─────────────────────────────────────────────────────────────────── */
  --color-text:        var(--glass-text);
  --color-text-muted:  var(--glass-text-muted);
  --color-text-subtle: rgb(255 255 255 / 35%);

  /* ── Semantic Status ─────────────────────────────────────────────────────── */
  --color-success:    #16a34a;
  --color-success-bg: #f0fdf4;
  --color-warning:    #d97706;
  --color-warning-bg: #fffbeb;
  --color-danger:     #dc2626;
  --color-danger-bg:  #fef2f2;
  --color-info:       #0284c7;
  --color-info-bg:    #f0f9ff;

  /* ── Sidebar ──────────────────────────────────────────────────────────────── */
  --sidebar-bg:          var(--glass-bg-dark);
  --sidebar-width:       260px;
  --sidebar-collapsed:   72px;
  --sidebar-text:        var(--glass-text);
  --sidebar-text-hover:  #ffffff;
  --sidebar-hover-bg:    var(--glass-bg-light);
  --sidebar-active-bg:   var(--glass-bg-light);
  --sidebar-active-text: #ffffff;
  --sidebar-active-border: transparent;
  --sidebar-border:      var(--glass-border);

  /* ── Header ───────────────────────────────────────────────────────────────── */
  --header-height: 64px;
  --header-bg:     var(--glass-bg-dark);
  --header-border: var(--glass-border);

  /* ── Auth Layout ──────────────────────────────────────────────────────────── */
  --auth-page-bg:       transparent;
  --auth-card-bg:       var(--glass-bg-dark);
  --auth-card-radius:   12px;
  --auth-card-shadow:   0 20px 60px rgba(0, 0, 0, 0.30);
  --auth-crest-size:    80px;
  --auth-crest-bg:      rgba(184, 134, 11, 0.15);
  --auth-crest-border:  var(--color-accent);
  --auth-brand-color:   #ffffff;
  --auth-sub-color:     rgba(255, 255, 255, 0.55);
  --auth-footer-color:  rgba(255, 255, 255, 0.60);
  --auth-footer-link:   var(--color-gold-500);

  /* ── Dashboard Stat Cards ─────────────────────────────────────────────────── */
  --stat-navy-bg:    rgba(27, 42, 74, 0.08);
  --stat-navy-color: var(--color-navy-300);   /* navy-700 is too dark to read on the glass background */
  --stat-gold-bg:    rgba(184, 134, 11, 0.10);
  --stat-gold-color: var(--color-gold-700);
  --stat-red-bg:     rgba(220, 38, 38, 0.08);
  --stat-red-color:  var(--color-danger);
  --stat-green-bg:    rgba(22, 163, 74, 0.08);
  --stat-green-color: var(--color-success);
  --stat-blue-bg:     rgba(2, 132, 199, 0.08);
  --stat-blue-color:  var(--color-info);
  --stat-amber-bg:    rgba(217, 119, 6, 0.08);
  --stat-amber-color: var(--color-warning);

  /* ── Module Shortcut Tiles ────────────────────────────────────────────────── */
  --module-tile-bg:       rgba(27, 42, 74, 0.05);
  --module-tile-bg-gold:  rgba(184, 134, 11, 0.05);
  --module-tile-bg-green: rgba(25, 135, 84, 0.05);
  --module-tile-bg-blue:  rgba(13, 110, 253, 0.05);
  --module-tile-disabled-opacity: 0.45;

  /* ── Glass Recipe (literal Dashtreme values - translucency only, no blur) ─── */
  --glass-bg-dark:     rgb(0 0 0 / 20%);
  --glass-bg-light:    rgb(255 255 255 / 12%);
  --glass-border:      rgb(255 255 255 / 15%);
  --glass-text:        rgb(255 255 255 / 70%);
  --glass-text-heading: #ffffff;
  --glass-text-muted:  rgb(255 255 255 / 50%);
  --glass-hover-bg:    rgb(255 255 255 / 7.5%);
  /* Modals/dropdowns are deliberately opaque in the source template, not glass -
     legibility over the busy background. */
  --glass-surface-opaque: #1a1a1a;

  /* ── Shadows ──────────────────────────────────────────────────────────────── */
  /* Soft, wide-blur elevation (re-skin, ATH-UX-001) - one wide low-opacity blur per
     step rather than a tight double-shadow, matching the "floating card" look. */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 24px rgba(0, 0, 0, 0.10);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.12);
  --shadow-glow-gold: 0 0 0 3px rgba(184, 134, 11, 0.25);

  /* ── Radii ────────────────────────────────────────────────────────────────── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 9999px;

  /* ── Spacing (4px base grid) ─────────────────────────────────────────────── */
  --space-1:  4px;
  --space-2:  8px;
  --space-3:  12px;
  --space-4:  16px;
  --space-5:  20px;
  --space-6:  24px;
  --space-8:  32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* ── Typography ──────────────────────────────────────────────────────────── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  --text-xs:   11px;
  --text-sm:   13px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   16px;
  --text-xl:   18px;
  --text-2xl:  20px;
  --text-3xl:  24px;
  --text-4xl:  30px;

  --fw-normal:   400;
  --fw-medium:   500;
  --fw-semibold: 600;
  --fw-bold:     700;

  --lh-tight:  1.25;
  --lh-normal: 1.5;
  --lh-loose:  1.75;

  /* ── Transitions ─────────────────────────────────────────────────────────── */
  --transition-fast: 100ms ease;
  --transition-base: 150ms ease;
  --transition-slow: 250ms ease;

  /* ── Z-index Scale ───────────────────────────────────────────────────────── */
  --z-dropdown: 1000;
  --z-sticky:   1020;
  --z-fixed:    1030;
  --z-modal:    1050;
  --z-toast:    1080;
  --z-tooltip:  1090;

  /* ── Breakpoints (reference - use in media queries, not var()) ───────────── */
  --bp-sm:  576px;
  --bp-md:  768px;
  --bp-lg:  1024px;
  --bp-xl:  1280px;
  --bp-2xl: 1536px;
}

/* ── Reduced Motion ──────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
