/* ============================================================
   JOSAY — HARMONIVITA  ·  Design System v2
   main.css — Tokens, Reset, Base
   ============================================================ */

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

/* ── Design Tokens ─────────────────────────────────────────── */
:root {
  /* Brand */
  --brand-dark:      #0A1812;   /* sidebar bg */
  --brand-green:     #16a34a;
  --brand-green-mid: #22c55e;
  --brand-green-lt:  #4ade80;
  --brand-green-bg:  #f0fdf4;
  --brand-teal:      #0d9488;

  /* Semantic */
  --success:       #16a34a;
  --success-bg:    #f0fdf4;
  --success-border:#bbf7d0;
  --warning:       #d97706;
  --warning-bg:    #fffbeb;
  --warning-border:#fcd34d;
  --danger:        #dc2626;
  --danger-bg:     #fff5f5;
  --danger-border: #fca5a5;
  --info:          #2563eb;
  --info-bg:       #eff6ff;
  --info-border:   #bfdbfe;

  /* Neutrals (warm-tinted) */
  --white:     #ffffff;
  --surface:   #ffffff;
  --bg:        #F5F4F0;   /* page background */
  --bg-subtle: #FAFAF8;
  --border:    #ECEAE4;
  --border-lt: #F0EEE8;
  --n50:  #FAFAF8;
  --n100: #F5F4F0;
  --n200: #ECEAE4;
  --n300: #D8D5CC;
  --n400: #B0ADA4;
  --n500: #888480;
  --n600: #6B6860;
  --n700: #4A4844;
  --n800: #2E2C28;
  --n900: #111110;

  /* Text */
  --text:        #111110;
  --text-sec:    #4A4844;
  --text-muted:  #888480;
  --text-faint:  #B0ADA4;
  --text-inv:    #ffffff;

  /* Typography */
  --font:    'Inter', system-ui, -apple-system, sans-serif;
  --sz-xs:   0.75rem;
  --sz-sm:   0.8125rem;
  --sz-base: 0.9375rem;
  --sz-md:   1rem;
  --sz-lg:   1.125rem;
  --sz-xl:   1.25rem;
  --sz-2xl:  1.5rem;
  --sz-3xl:  1.875rem;
  --sz-4xl:  2.25rem;

  /* Spacing */
  --s1:  0.25rem;
  --s2:  0.5rem;
  --s3:  0.75rem;
  --s4:  1rem;
  --s5:  1.25rem;
  --s6:  1.5rem;
  --s8:  2rem;
  --s10: 2.5rem;
  --s12: 3rem;
  --s16: 4rem;

  /* Borders */
  --r-sm:   4px;
  --r:      8px;
  --r-md:   10px;
  --r-lg:   12px;
  --r-xl:   16px;
  --r-2xl:  20px;
  --r-full: 9999px;

  /* Shadows */
  --sh-xs: 0 1px 2px rgba(0,0,0,0.04);
  --sh-sm: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --sh:    0 2px 8px rgba(0,0,0,0.08), 0 1px 3px rgba(0,0,0,0.05);
  --sh-md: 0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.05);
  --sh-lg: 0 10px 30px rgba(0,0,0,0.10), 0 4px 10px rgba(0,0,0,0.06);
  --sh-xl: 0 20px 50px rgba(0,0,0,0.14), 0 8px 20px rgba(0,0,0,0.08);

  /* Transitions */
  --t:  150ms ease;
  --ts: 250ms ease;

  /* Z-index */
  --z-drop:  100;
  --z-stick: 200;
  --z-modal: 300;
  --z-toast: 400;
}

/* ── Reset ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font);
  font-size: var(--sz-base);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand-green); text-decoration: none; }
a:hover { color: var(--brand-dark); }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }
button { font-family: var(--font); }
input, select, textarea { font-family: var(--font); }

h1,h2,h3,h4,h5,h6 { font-weight: 700; line-height: 1.2; color: var(--text); letter-spacing: -0.02em; }
h1 { font-size: var(--sz-3xl); font-weight: 800; }
h2 { font-size: var(--sz-2xl); }
h3 { font-size: var(--sz-xl); }
h4 { font-size: var(--sz-lg); }
h5 { font-size: var(--sz-base); }
p  { color: var(--text-sec); line-height: 1.6; }

/* ── Utility classes ──────────────────────────────────────── */
.d-flex    { display: flex; }
.d-grid    { display: grid; }
.d-none    { display: none !important; }
.flex-col  { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center   { align-items: center; }
.items-start    { align-items: flex-start; }
.items-end      { align-items: flex-end; }
.justify-center  { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end     { justify-content: flex-end; }
.flex-1 { flex: 1; }
.gap-2  { gap: var(--s2); }
.gap-3  { gap: var(--s3); }
.gap-4  { gap: var(--s4); }
.gap-6  { gap: var(--s6); }
.w-full { width: 100%; }
.text-center { text-align: center; }
.text-right  { text-align: right; }
.font-medium  { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-black    { font-weight: 900; }
.text-xs   { font-size: var(--sz-xs); }
.text-sm   { font-size: var(--sz-sm); }
.text-base { font-size: var(--sz-base); }
.text-lg   { font-size: var(--sz-lg); }
.text-xl   { font-size: var(--sz-xl); }
.text-muted  { color: var(--text-muted); }
.text-faint  { color: var(--text-faint); }
.text-green  { color: var(--brand-green); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-white  { color: var(--white); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mt-2 { margin-top: var(--s2); }
.mt-4 { margin-top: var(--s4); }
.mt-6 { margin-top: var(--s6); }
.mb-2 { margin-bottom: var(--s2); }
.mb-4 { margin-bottom: var(--s4); }
.mb-6 { margin-bottom: var(--s6); }
.ml-auto { margin-left: auto; }
.p-4 { padding: var(--s4); }
.p-6 { padding: var(--s6); }
.rounded { border-radius: var(--r); }
.rounded-lg { border-radius: var(--r-lg); }
.overflow-hidden { overflow: hidden; }
.cursor-pointer { cursor: pointer; }
