/* ============================================
   DESIGN TOKENS — FamilyWallet
   ============================================ */

:root {
  /* ── Paleta kolorów ──────────────────────── */
  --red-primary:  #E53935;
  --red-dark:     #C62828;
  --red-light:    #FF6B6B;
  --white:        #FFFFFF;
  --off-white:    #F7F7F7;

  /* ── Glassmorphism (light) ───────────────── */
  --glass-bg:        rgba(255, 255, 255, 0.92);
  --glass-bg-strong: rgba(255, 255, 255, 1.0);
  --glass-border:    rgba(0, 0, 0, 0.12);
  --glass-shadow:    0 2px 12px rgba(0, 0, 0, 0.10), 0 0 0 0.5px rgba(0, 0, 0, 0.08);
  --glass-blur:      blur(20px);

  /* ── Tło ─────────────────────────────────── */
  --bg-gradient: linear-gradient(155deg, #ffffff 0%, #ffeaea 55%, #fff5f5 100%);

  /* ── Nagłówek / nav ──────────────────────── */
  --header-bg:    rgba(255, 255, 255, 0.72);
  --nav-bg:       rgba(255, 255, 255, 0.80);
  --nav-border:   rgba(0, 0, 0, 0.08);

  /* ── Tekst (Apple system colors) ─────────── */
  --text-primary:   #1c1c1e;
  --text-secondary: #6c6c70;
  --text-muted:     #aeaeb2;

  /* ── Feedback ────────────────────────────── */
  --green:          #34C759;
  --color-income:   #1A8A38;
  --color-expense:  #C0392B;
  --yellow:         #FF9500;
  --blue:           #007AFF;

  /* ── Spacing (8px 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;

  /* ── Border radius ───────────────────────── */
  --radius-sm:   8px;
  --radius-md:   16px;
  --radius-lg:   20px;
  --radius-xl:   24px;
  --radius-pill: 50px;

  /* ── Typografia ──────────────────────────── */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-size-xs:   0.70rem;
  --font-size-sm:   0.75rem;
  --font-size-md:   0.875rem;
  --font-size-base: 1rem;
  --font-size-lg:   1.125rem;
  --font-size-xl:   1.5rem;
  --font-size-2xl:  2rem;
  --font-size-3xl:  2.5rem;

  /* ── Animacje ────────────────────────────── */
  --transition:        all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  --transition-fast:   all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

  /* ── Z-index ─────────────────────────────── */
  --z-base:    1;
  --z-nav:     100;
  --z-fab:     110;
  --z-overlay: 200;
  --z-sheet:   300;
  --z-modal:   400;
  --z-toast:   500;

  /* ── Bottom nav height ───────────────────── */
  --bottom-nav-height: 72px;
  --safe-area-bottom:  env(safe-area-inset-bottom, 0px);
}

/* ── Dark mode ──────────────────────────────── */
[data-theme="dark"] {
  /* Cieplejsza, stonowana paleta — mniej agresywnej czerwieni */
  --red-primary:     #FF6B6B;
  --red-dark:        #E85555;
  --red-light:       #FF9393;

  /* Tło: ciepły grafit z subtelnym bordowym akcentem (czytelniejsze niż pełna czerwień) */
  --bg-gradient:     linear-gradient(160deg, #151518 0%, #1f1820 50%, #241418 100%);
  --header-bg:       rgba(22, 22, 26, 0.82);
  --nav-bg:          rgba(18, 18, 22, 0.92);
  --nav-border:      rgba(255, 255, 255, 0.08);
  --glass-bg:        rgba(255, 255, 255, 0.055);
  --glass-bg-strong: rgba(255, 255, 255, 0.10);
  --glass-border:    rgba(255, 255, 255, 0.10);
  --glass-shadow:    0 8px 32px rgba(0, 0, 0, 0.50);
  --text-primary:    #F5F5F7;
  --text-secondary:  rgba(245, 245, 247, 0.72);
  --text-muted:      rgba(245, 245, 247, 0.48);
  --yellow:          #FFB340;
  --green:           #30D158;
  --color-income:    #30D158;
  --color-expense:   #FF6B6B;
  --blue:            #0A84FF;
}
