/* ==========================================================================
   arHSEman — Shared Design Tokens & Base Styles
   Single source of truth for colors, spacing and base resets.
   Linked from every page: <link rel="stylesheet" href="assets/css/theme.css">
   (adjust the relative path per folder depth: "../assets/css/theme.css" from
   /modules or /apps, "assets/css/theme.css" from the project root)

   Palette is derived from the arHSEman logo: navy (shield/"A") + green (leaf).
   Variable NAMES are unchanged from the original inline stylesheets so this
   file can be dropped in without touching any page's markup or JS logic —
   only the <style> block that declared these tokens is removed from each
   page and replaced with a <link> to this file.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@100;300;400;500;600;700;900&display=swap');

/* ============================================
   THEME VARIABLES — DARK (default)
============================================ */
:root {
    --bg-deep: #0a0a0b;
    --bg-surface: #141416;
    --bg-elevated: #1c1c1f;
    --bg-hover: #242428;
    --border-subtle: rgba(63, 145, 66, 0.12);
    --border-soft: rgba(255, 255, 255, 0.06);

    /* Primary brand accent (from logo) */
    --gold: #3f9142;
    --gold-soft: #8ed08f;
    --gold-deep: #2f6b31;
    --gold-glow: rgba(63, 145, 66, 0.25);

    --text-primary: #f5f5f0;
    --text-secondary: #a0a0a5;
    --text-muted: #6b6b70;

    /* Module accent colors */
    --health: #10b981;
    --chemical: #2a4f97;
    --training: #fbbf24;
    --risk: #f472b6;
    --assistant: #3b82f6;
    --pricing: #ec4899;
    --software: #06b6d4;

    --body-bg-radial-1: rgba(63, 145, 66, 0.08);
    --body-bg-radial-2: rgba(42, 79, 151, 0.05);
    --card-bg: linear-gradient(180deg, #141416 0%, #0a0a0b 100%);
    --shadow-color: rgba(0, 0, 0, 0.4);

    /* Glass navbar */
    --navbar-bg: rgba(10, 10, 11, 0.75);
    --navbar-border: rgba(63, 145, 66, 0.15);
    --navbar-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    --nav-item-bg: transparent;
    --nav-item-hover-bg: rgba(255, 255, 255, 0.05);
    --nav-item-active-bg: linear-gradient(135deg, rgba(63, 145, 66, 0.15), rgba(63, 145, 66, 0.05));
    --nav-item-active-border: rgba(63, 145, 66, 0.3);
    --nav-icon-bg: rgba(255, 255, 255, 0.05);
    --nav-icon-active-bg: linear-gradient(135deg, rgba(63, 145, 66, 0.2), rgba(63, 145, 66, 0.05));
    --logo-bg: rgba(255, 255, 255, 0.05);
    --logo-border: rgba(63, 145, 66, 0.2);
    --mobile-menu-bg: rgba(10, 10, 11, 0.95);
    --mobile-menu-border: rgba(63, 145, 66, 0.15);
    --hamburger-color: var(--gold-soft);
    --danger: #ef4444;

    /* Standardized spacing / radius / shadow scale (new — additive, for
       any new component work; existing pages are unaffected). */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
    --sp-5: 24px; --sp-6: 32px; --sp-7: 48px;
    --shadow-soft-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-soft-md: 0 12px 32px rgba(0, 0, 0, 0.30);
    --shadow-soft-lg: 0 20px 48px rgba(0, 0, 0, 0.35);
}

/* ============================================
   THEME VARIABLES — LIGHT
============================================ */
[data-theme="light"] {
    --bg-deep: #f8fafc;
    --bg-surface: #ffffff;
    --bg-elevated: #f1f5f9;
    --bg-hover: #e2e8f0;
    --border-subtle: rgba(63, 145, 66, 0.3);
    --border-soft: rgba(0, 0, 0, 0.08);

    --gold: #2a4f97;
    --gold-soft: #1c3d78;
    --gold-deep: #16305f;
    --gold-glow: rgba(42, 79, 151, 0.2);

    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --health: #059669;
    --chemical: #1c3d78;
    --training: #d97706;
    --risk: #db2777;
    --assistant: #2563eb;
    --pricing: #be185d;
    --software: #0891b2;

    --body-bg-radial-1: rgba(42, 79, 151, 0.06);
    --body-bg-radial-2: rgba(28, 61, 120, 0.04);
    --card-bg: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    --shadow-color: rgba(0, 0, 0, 0.08);

    --navbar-bg: rgba(255, 255, 255, 0.8);
    --navbar-border: rgba(63, 145, 66, 0.25);
    --navbar-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    --nav-item-bg: transparent;
    --nav-item-hover-bg: rgba(0, 0, 0, 0.03);
    --nav-item-active-bg: linear-gradient(135deg, rgba(42, 79, 151, 0.12), rgba(42, 79, 151, 0.04));
    --nav-item-active-border: rgba(42, 79, 151, 0.4);
    --nav-icon-bg: rgba(0, 0, 0, 0.04);
    --nav-icon-active-bg: linear-gradient(135deg, rgba(42, 79, 151, 0.15), rgba(42, 79, 151, 0.05));
    --logo-bg: rgba(0, 0, 0, 0.03);
    --logo-border: rgba(42, 79, 151, 0.3);
    --mobile-menu-bg: rgba(255, 255, 255, 0.98);
    --mobile-menu-border: rgba(63, 145, 66, 0.2);
    --hamburger-color: var(--gold-soft);
    --danger: #dc2626;

    --shadow-soft-sm: 0 2px 8px rgba(15, 34, 71, 0.06);
    --shadow-soft-md: 0 12px 32px rgba(15, 34, 71, 0.10);
    --shadow-soft-lg: 0 20px 48px rgba(15, 34, 71, 0.14);
}

/* ============================================
   BASE RESET
============================================ */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background: var(--bg-deep);
    color: var(--text-primary);
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 300;
    -webkit-font-smoothing: antialiased;
    transition: background 0.5s ease, color 0.5s ease;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 20% 0%, var(--body-bg-radial-1), transparent 50%),
                radial-gradient(ellipse 60% 50% at 80% 100%, var(--body-bg-radial-2), transparent 50%);
    pointer-events: none;
    z-index: 0;
    transition: background 0.5s ease;
}

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
