/* ===========================================================================
   Pertineo — Color tokens
   Derived from Theme.swift, Models.swift (keywordStyle/status) and the iOS
   system palette the app builds on. Base ramp + semantic aliases.
   =========================================================================== */
:root {
  /* --- Brand greens ------------------------------------------------------ */
  --pertineo-green: #198754;     /* primary brand green (buttons, accents)   */
  --pertineo-teal: #20c997;      /* gradient end / fresh accent              */
  --pertineo-dark-green: #1c4d2d;/* titles, deep brand                       */
  /* Logo-specific greens (the mark itself) */
  --logo-pin: #00814e;           /* pin + swoosh                             */
  --logo-people: #004f2a;        /* the three figures                        */

  /* Green ramp (tints/shades of the primary, for surfaces & states) */
  --green-50:  #e8f5ee;
  --green-100: #d3ecdf;
  --green-200: #a7d9bf;
  --green-300: #6fc398;
  --green-400: #3aa873;
  --green-500: #198754;          /* = --pertineo-green                       */
  --green-600: #147346;
  --green-700: #0f5836;
  --green-800: #1c4d2d;          /* = --pertineo-dark-green                  */
  --green-900: #0c3a22;

  /* --- Neutrals (iOS system grays, light mode) --------------------------- */
  --white: #ffffff;
  --black: #000000;
  --gray-6: #f2f2f7;             /* systemGray6  — app backgrounds           */
  --gray-5: #e5e5ea;            /* systemGray5  — hairlines, fills          */
  --gray-4: #d1d1d6;            /* systemGray4  — borders                   */
  --gray-3: #c7c7cc;            /* systemGray3  — dashed/placeholders       */
  --gray-2: #aeaeb2;            /* systemGray2                              */
  --gray-1: #8e8e93;            /* systemGray   — secondary glyphs          */

  /* Text */
  --label: #000000;             /* primary label                            */
  --label-secondary: #3c3c4399; /* secondaryLabel (60%)                     */
  --label-tertiary: #3c3c434d;  /* tertiaryLabel (30%)                      */
  --label-on-green: #ffffff;

  /* --- iOS system semantic colors used by the app ------------------------ */
  --ios-red: #ff3b30;            /* errors, rifiutata, destructive           */
  --ios-orange: #ff9500;         /* in attesa / da inviare                   */
  --ios-blue: #007aff;           /* in lavorazione / biometria               */
  --ios-yellow: #ffcc00;

  /* --- Status (segnalazione lifecycle) ----------------------------------- */
  --status-sent: var(--pertineo-green);   /* inviata / approvata            */
  --status-pending: var(--ios-orange);    /* in attesa / da inviare         */
  --status-working: var(--ios-blue);      /* in lavorazione                 */
  --status-rejected: var(--ios-red);      /* rifiutata / respinta           */
  --unread-dot: var(--ios-red);           /* badge non letti                */

  /* --- Category accents (Tema keywordStyle, from / to / badge / text) ---- */
  --cat-pericolo-from: #ff6b35;  --cat-pericolo-to: #ff8c42;  --cat-pericolo-badge: #fff4f0;  --cat-pericolo-text: #c2400c;
  --cat-rifiuti-from: #f59e0b;   --cat-rifiuti-to: #fbbf24;   --cat-rifiuti-badge: #fffbeb;   --cat-rifiuti-text: #92400e;
  --cat-viabilita-from: #3b82f6; --cat-viabilita-to: #60a5fa; --cat-viabilita-badge: #eff6ff; --cat-viabilita-text: #1d4ed8;
  --cat-disagio-from: #8b5cf6;   --cat-disagio-to: #a78bfa;   --cat-disagio-badge: #faf5ff;   --cat-disagio-text: #6d28d9;
  --cat-animali-from: #10b981;   --cat-animali-to: #34d399;   --cat-animali-badge: #f0fdf4;   --cat-animali-text: #065f46;
  --cat-manutenzione-from: #eab308; --cat-manutenzione-to: #facc15; --cat-manutenzione-badge: #fefce8; --cat-manutenzione-text: #713f12;
  /* QR / relazioni tile gradient */
  --tile-qr-from: #3369b3; --tile-qr-to: #1a8fc7;

  /* --- Semantic surface / line aliases ----------------------------------- */
  --surface-app: var(--gray-6);          /* screen background               */
  --surface-card: var(--white);          /* cards, sheets                   */
  --surface-sunken: var(--gray-6);       /* inset fields, grouped rows      */
  --surface-brand: var(--pertineo-green);/* green headers                   */
  --border-hairline: var(--gray-5);      /* 0.5px dividers                  */
  --border-control: var(--gray-4);       /* input borders                   */
  --text-body: var(--label);
  --text-muted: var(--label-secondary);
  --accent: var(--pertineo-green);

  /* Brand gradient (primary CTA, floating accents) */
  --gradient-brand: linear-gradient(135deg, var(--pertineo-green), var(--pertineo-teal));
}
