/* =====================================================================
   Greenpeace Dialer — Design Tokens (single source of truth)
   Direction: HYBRID — A-base (clean neutral work areas) + B-chrome
   (forest brand on sidebar/headers/dashboard) + C-density (dialer only).

   This file is the canonical token map. Bootstrap theme vars, the
   gp-polish.css layer, and the Tailwind config should all read from
   these — do NOT hardcode hex/radius/shadow elsewhere.
   Values intentionally match the existing app so adding this file does
   not change appearance; migration of scattered :root blocks is incremental.
   ===================================================================== */

:root {
  /* ---- Brand (chrome) ------------------------------------------------ */
  --gp-green:        #2eaa47;   /* primary action / positive (existing --primary-green) */
  --gp-green-hover:  #23913a;
  --gp-green-d:      #1d703e;   /* forest — sidebar/header chrome (existing --dark-green) */
  --gp-green-50:     #e8f6ec;   /* tonal bg for positive pills */
  --gp-green-700:    #176534;   /* text on green-50 */
  --gp-forest:       #16602f;   /* deep forest — sidebar gradient end */
  --gp-sun:          #f5a623;   /* B-direction accent (non-"go" CTAs, highlights) */
  --gp-sky:          #00a0df;   /* data/info accent (existing --accent-blue) */

  /* ---- Neutrals (A-base work areas) --------------------------------- */
  --gp-bg:           #f7f8fa;
  --gp-surface:      #ffffff;
  --gp-surface-2:    #f3f5f7;
  --gp-border:       #e7eaee;
  --gp-text:         #101828;
  --gp-muted:        #667085;
  --gp-muted-2:      #98a2b3;

  /* ---- Semantic (all AA on white) ----------------------------------- */
  --gp-success:      #12805c;  --gp-success-50: #e6f4ef;  --gp-success-700: #0c5e44;
  --gp-warning:      #b54708;  --gp-warning-50: #fdf0e6;  --gp-warning-700: #8a3606;
  --gp-danger:       #d92d20;  --gp-danger-50:  #fbeae9;  --gp-danger-700:  #a82117;
  --gp-info:         #175cd3;  --gp-info-50:    #e8effb;  --gp-info-700:    #114296;

  /* ---- Agent/call status palette (5 states, AA, memorizable) -------- */
  --gp-status-live:    #0a7d2c;  /* ready / on-call / live   */
  --gp-status-ringing: #b06f00;  /* ringing / dialing        */
  --gp-status-paused:  #7a5cff;  /* paused / break           */
  --gp-status-failed:  #c0341d;  /* failed / cooling-off     */
  --gp-status-idle:    #5a6470;  /* idle / offline           */

  /* ---- Stat-card accents (named — kill inline style="--c:...") ------ */
  --gp-stat-green: #2eaa47;
  --gp-stat-blue:  #175cd3;
  --gp-stat-amber: #b54708;
  --gp-stat-violet:#7a5cff;
  --gp-stat-teal:  #0e7490;

  /* ---- Typography --------------------------------------------------- */
  --gp-font-body:    'Open Sans', system-ui, -apple-system, sans-serif;
  --gp-font-head:    'Montserrat', var(--gp-font-body);
  --gp-fs-xs:  0.75rem;   /* 12 */
  --gp-fs-sm:  0.875rem;  /* 14 */
  --gp-fs-md:  1rem;      /* 16 */
  --gp-fs-lg:  1.25rem;   /* 20 */
  --gp-fs-xl:  1.5rem;    /* 24 */
  --gp-fs-2xl: 1.875rem;  /* 30 */
  --gp-lh-body: 1.5;
  --gp-fw-head: 600;

  /* ---- Spacing (4-based) -------------------------------------------- */
  --gp-sp-1: 0.25rem; --gp-sp-2: 0.5rem; --gp-sp-3: 0.75rem;
  --gp-sp-4: 1rem;    --gp-sp-5: 1.5rem; --gp-sp-6: 2rem;

  /* ---- Radius / shadow / motion (existing values promoted) ---------- */
  --gp-radius-sm: 0.375rem;
  --gp-radius:    0.625rem;
  --gp-radius-lg: 1rem;
  --gp-shadow-sm: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.08);
  --gp-shadow:    0 2px 8px rgba(16,24,40,.06), 0 8px 24px rgba(16,24,40,.06);
  --gp-shadow-lg: 0 12px 32px rgba(16,24,40,.12);
  --gp-ring:      0 0 0 3px rgba(46,170,71,.25);   /* focus ring */
  --gp-transition: 160ms cubic-bezier(.4,0,.2,1);

  /* ---- Layout ------------------------------------------------------- */
  --gp-sidebar-w: 256px;

  /* ---- Z-index stack (one source — ends the !important wars) -------- */
  --gp-z-dropdown: 1000;
  --gp-z-sticky:   1020;
  --gp-z-backdrop: 1040;
  --gp-z-modal:    1050;
  --gp-z-toast:    1060;  /* swal/toasts above modals */
}

/* ---- Dark mode (C-dialer default + app-wide toggle) ----------------- */
[data-bs-theme="dark"] {
  --gp-bg:        #0c0e12;
  --gp-surface:   #15181d;
  --gp-surface-2: #1a1d22;
  --gp-border:    #2b3038;
  --gp-text:      #e7eaee;
  --gp-muted:     #98a2b3;
  --gp-green-50:  rgba(46,170,71,.14);
  --gp-success-50: rgba(18,128,92,.16);
  --gp-warning-50: rgba(181,71,8,.16);
  --gp-danger-50:  rgba(217,45,32,.16);
  --gp-info-50:    rgba(23,92,211,.16);
}

@media (prefers-reduced-motion: reduce) {
  :root { --gp-transition: 0ms; }
}
