/* ==========================================================================
   TradeLedger ERP — Premium Design System v3.0
   World-class professional aesthetics for wholesale & retail ERP
   ========================================================================== */

:root {
  /* ── Typography ────────────────────────────────────────────────────────── */
  --font-sans: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, Menlo, Monaco, Consolas, monospace;
  --font-display: 'Outfit', 'Plus Jakarta Sans', 'Hind Siliguri', sans-serif;

  /* ── Colour Palette (Mint Emerald, Ocean Teal & Ivory Edition) ──────── */
  /* Canvas */
  --bg-canvas:          #f4faf7;
  --bg-surface:         #ffffff;
  --bg-surface-subtle:  #f7fbf9;
  --bg-surface-hover:   #eef8f3;
  --bg-surface-raised:  #ffffff;

  /* Sidebar */
  --bg-sidebar:         #06181a;
  --bg-sidebar-hover:   rgba(255,255,255,.06);
  --bg-sidebar-active:  linear-gradient(90deg, rgba(16,185,129,.22) 0%, rgba(13,148,136,.08) 100%);

  /* Text */
  --text-primary:    #0b1120;
  --text-secondary:  #475569;
  --text-muted:      #64748b;
  --text-xmuted:     #94a3b8;
  --text-inverted:   #ffffff;
  --text-sidebar:    #cbd5e1;
  --text-sidebar-muted: #52637a;

  /* Borders */
  --border-subtle:    rgba(15,23,42,.06);
  --border-default:   rgba(15,23,42,.10);
  --border-strong:    rgba(15,23,42,.16);
  --border-sidebar:   rgba(255,255,255,.05);

  /* ── Brand Gradient Palette ────────────────────────────────────────────── */
  --indigo-500:  #10b981;
  --indigo-600:  #059669;
  --indigo-700:  #047857;
  --violet-500:  #14b8a6;
  --violet-600:  #0d9488;
  --blue-500:    #3b82f6;
  --blue-600:    #2563eb;

  --accent:            #059669;
  --accent-hover:      #047857;
  --accent-soft:       #ecfdf5;
  --accent-soft-dark:  rgba(16,185,129,.14);

  /* Gradient stops */
  --grad-primary: linear-gradient(135deg, #22c55e 0%, #0d9488 100%);
  --grad-hero:    linear-gradient(135deg, #06181a 0%, #0f3d3e 50%, #0d9488 100%);
  --grad-glass:   linear-gradient(135deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,.04) 100%);
  --grad-card-shine: linear-gradient(135deg, rgba(16,185,129,.08) 0%, rgba(255,255,255,0) 60%);

  /* Semantic */
  --success-bg: #ecfdf5; --success-text: #047857; --success-border: #a7f3d0;
  --warning-bg: #fffbeb; --warning-text: #b45309; --warning-border: #fde68a;
  --danger-bg:  #fef2f2; --danger-text:  #b91c1c; --danger-border:  #fecaca;
  --info-bg:    #eff6ff; --info-text:    #1d4ed8; --info-border:    #bfdbfe;
  --neutral-bg: #f8fafc; --neutral-text: #64748b; --neutral-border: #e2e8f0;

  /* ── Spacing & Radius ──────────────────────────────────────────────────── */
  --radius-xs:  4px;
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  14px;
  --radius-xl:  18px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* ── Elevation / Shadows ───────────────────────────────────────────────── */
  --shadow-xs:  0 1px 2px rgba(15,23,42,.04);
  --shadow-sm:  0 1px 4px rgba(15,23,42,.06), 0 1px 2px rgba(15,23,42,.04);
  --shadow-md:  0 4px 14px -2px rgba(15,23,42,.09), 0 2px 5px -2px rgba(15,23,42,.05);
  --shadow-lg:  0 16px 40px -6px rgba(15,23,42,.13), 0 6px 14px -6px rgba(15,23,42,.07);
  --shadow-xl:  0 28px 60px -10px rgba(15,23,42,.18), 0 10px 24px -8px rgba(15,23,42,.09);
  --shadow-inset: inset 0 1px 0 rgba(255,255,255,.07);

  /* ── Motion ────────────────────────────────────────────────────────────── */
  --ease-out:    cubic-bezier(.16,1,.3,1);
  --ease-spring: cubic-bezier(.34,1.56,.64,1);
  --t-fast:  120ms var(--ease-out);
  --t-base:  200ms var(--ease-out);
  --t-slow:  350ms var(--ease-out);

  /* ── Layout ────────────────────────────────────────────────────────────── */
  --sidebar-width:           264px;
  --sidebar-collapsed-width: 72px;
  --topbar-height:           68px;
}

/* ── Dark Mode ─────────────────────────────────────────────────────────────── */
html.dark {
  --bg-canvas:         #060913;
  --bg-surface:        #0d1322;
  --bg-surface-subtle: #12192c;
  --bg-surface-hover:  #161f36;
  --bg-surface-raised: #11182b;
  --bg-sidebar:        #041113;
  --bg-sidebar-hover:  rgba(255,255,255,.05);
  --bg-sidebar-active: linear-gradient(90deg, rgba(16,185,129,.22) 0%, rgba(13,148,136,.08) 100%);

  --text-primary:   #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-xmuted:    #475569;
  --text-sidebar:   #cbd5e1;
  --text-sidebar-muted: #475569;

  --border-subtle:  rgba(255,255,255,.05);
  --border-default: rgba(255,255,255,.08);
  --border-strong:  rgba(255,255,255,.14);
  --border-sidebar: rgba(255,255,255,.05);

  --accent:        #10b981;
  --accent-hover:  #34d399;
  --accent-soft:   rgba(16,185,129,.14);

  --success-bg: rgba(16,185,129,.12); --success-text: #34d399; --success-border: rgba(16,185,129,.25);
  --warning-bg: rgba(245,158,11,.12); --warning-text: #fbbf24; --warning-border: rgba(245,158,11,.25);
  --danger-bg:  rgba(239,68,68,.12);  --danger-text:  #f87171; --danger-border:  rgba(239,68,68,.25);
  --info-bg:    rgba(59,130,246,.12); --info-text:    #60a5fa; --info-border:    rgba(59,130,246,.25);
  --neutral-bg: rgba(100,116,139,.1); --neutral-text: #94a3b8; --neutral-border: rgba(100,116,139,.2);

  --shadow-xs:  0 1px 2px rgba(0,0,0,.3);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.4);
  --shadow-md:  0 6px 18px -2px rgba(0,0,0,.5);
  --shadow-lg:  0 18px 44px -6px rgba(0,0,0,.6);
  --shadow-xl:  0 32px 70px -10px rgba(0,0,0,.75);
}
