/* ============================================================
   WhatsApp Manager — Design System
   public/design-system.css
   All CSS custom properties. Import this first on every page.
   ============================================================ */

:root {
  /* ─── Backgrounds (Darker, more refined) ─────── */
  --bg-base:       #0a0f14;
  --bg-surface:    #0f1419;
  --bg-elevated:   #1a1f26;
  --bg-hover:      #23282f;
  --bg-overlay:    rgba(0, 0, 0, 0.72);

  /* ─── Borders (More subtle) ────────────────────────────────────────── */
  --border-subtle:  rgba(255, 255, 255, 0.05);
  --border-default: #1e242b;
  --border-strong:  #2d3748;

  /* ─── Accent colors (Refined teal/sky blue) ──────────────────────────── */
  --accent-primary: #0ea5e9;
  --accent-hover:   #0284c7;
  --accent-muted:   rgba(14, 165, 233, 0.12);
  --accent-border:  rgba(14, 165, 233, 0.25);

  /* ─── Telegram blue accent (badges/icons only) ────────── */
  --tg-primary:    #2196f3;
  --tg-muted:      rgba(33, 150, 243, 0.15);

  /* ─── Danger ─────────────────────────────────────────── */
  --danger:        #ef4444;
  --danger-hover:  #dc2626;
  --danger-muted:  rgba(239, 68, 68, 0.15);

  /* ─── Success / Warning ──────────────────────────────── */
  --success:       #22c55e;
  --success-muted: rgba(34, 197, 94, 0.15);
  --warning:       #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.12);

  /* ─── Text (Refined contrast) ───────────────────────────────────────────── */
  --text-primary:   #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted:     #64748b;
  --text-disabled:  #475569;
  --text-on-accent: #ffffff;

  /* ─── Typography ─────────────────────────────────────── */
  --font-base: 'Segoe UI', 'Arial Hebrew', Arial, sans-serif;
  --font-mono: 'Consolas', 'Courier New', monospace;

  --text-xs:   0.8125rem;  /* 13px (was 12px) */
  --text-sm:   0.9375rem;  /* 15px (was 14px) */
  --text-base: 1rem;       /* 16px (unchanged) */
  --text-lg:   1.125rem;   /* 18px (unchanged) */
  --text-xl:   1.375rem;   /* 22px (was 20px) */
  --text-2xl:  1.75rem;    /* 28px (was 24px) */
  --text-3xl:  2.25rem;    /* 36px (was 30px) */

  --font-normal:    400;
  --font-medium:    500;
  --font-semibold:  600;  /* NEW: subtle emphasis */
  --font-bold:      700;

  --leading-tight:  1.3;   /* was 1.25 */
  --leading-normal: 1.6;   /* was 1.5 */
  --leading-loose:  1.8;   /* was 1.75 */

  /* ─── Spacing ────────────────────────────────────────── */
  --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-14: 56px;   /* NEW: large section gaps */
  --space-16: 64px;
  --space-20: 80px;   /* NEW: hero sections */

  /* ─── Border Radius ──────────────────────────────────── */
  --radius-sm:   6px;
  --radius-md:   10px;
  --radius-lg:   14px;
  --radius-xl:   20px;
  --radius-full: 9999px;

  /* ─── Shadows (Subtle, no glow) ─────────────────────────────────────────── */
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.15);   /* NEW */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);    /* was 0.4 */
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.25);   /* was 0 4px 12px 0.5 */
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.3);   /* was 0 8px 24px 0.6 */
  --shadow-xl: 0 8px 32px rgba(0, 0, 0, 0.4);   /* NEW: for modals */

  /* ─── Transitions ─────────────────────────────────────── */
  --transition-fast: 0.12s ease;
  --transition-base: 0.2s ease;
  --transition-slow: 0.35s ease;

  /* ─── Layout ─────────────────────────────────────────── */
  --sidebar-width:      240px;
  --nav-height-mobile:  62px;
  --container-max:      640px;   /* was 480px */
  --container-wide:     1200px;  /* was 900px */

  /* ─── Z-index Stack ──────────────────────────────────── */
  --z-base:    1;
  --z-raised:  10;
  --z-nav:     100;
  --z-overlay: 9000;
  --z-toast:   9999;
}

/* ─── Global Reset ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: var(--leading-normal);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--text-primary);
  text-decoration: none;
}

h1, h2, h3, h4, h5 {
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  color: var(--text-primary);
}

/* ─── Admin-only elements (hidden by default, revealed when admin) ──── */
.admin-only { display: none !important; }
body.is-admin .admin-only { display: revert; }

/* ─── Utility classes ──────────────────────────────────────── */
.hidden { display: none; }
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
