/* DCP v2 — Design Tokens
   Apple-style, DGAJ green, no Bootstrap
   ───────────────────────────────────────── */

:root {
  /* ── Brand ── */
  --color-primary:        #008236;
  --color-primary-dark:   #006629;
  --color-primary-light:  #e6f4ec;
  --color-primary-hover:  #00993f;
  --color-primary-rgb:    0, 130, 54;

  /* ── Neutrals (Apple scale) ── */
  --color-white:          #ffffff;
  --color-bg:             #f5f5f7;
  --color-surface:        #ffffff;
  --color-surface-2:      #fafafa;
  --color-border:         #e0e0e5;
  --color-border-strong:  #c7c7cc;

  --color-gray-50:        #f9f9fb;
  --color-gray-100:       #f2f2f7;
  --color-gray-200:       #e5e5ea;
  --color-gray-300:       #d1d1d6;
  --color-gray-400:       #aeaeb2;
  --color-gray-500:       #8e8e93;
  --color-gray-600:       #636366;
  --color-gray-700:       #48484a;
  --color-gray-800:       #3a3a3c;
  --color-gray-900:       #1c1c1e;

  /* ── Status: Contracts ── */
  --status-draft-bg:          #f2f2f7;
  --status-draft-text:        #636366;
  --status-draft-border:      #aeaeb2;

  --status-pending-bg:        #fff8e6;
  --status-pending-text:      #9a5500;
  --status-pending-border:    #f5c842;

  --status-active-bg:         #e6f4ec;
  --status-active-text:       #006629;
  --status-active-border:     #34c759;

  --status-executing-bg:      #e6f0ff;
  --status-executing-text:    #1541b3;
  --status-executing-border:  #4088ff;

  --status-completed-bg:      #f0ebff;
  --status-completed-text:    #5229b3;
  --status-completed-border:  #9966ff;

  --status-archived-bg:       #f2f2f7;
  --status-archived-text:     #636366;
  --status-archived-border:   #aeaeb2;

  --status-cancelled-bg:      #fff0f0;
  --status-cancelled-text:    #ae0000;
  --status-cancelled-border:  #ff4444;

  /* ── Priority ── */
  --priority-low-bg:      #f0faf0;
  --priority-low-text:    #2d6a2d;
  --priority-medium-bg:   #fff8e6;
  --priority-medium-text: #9a5500;
  --priority-high-bg:     #fff0e6;
  --priority-high-text:   #b34000;
  --priority-urgent-bg:   #fff0f0;
  --priority-urgent-text: #ae0000;

  /* ── Semantic ── */
  --color-success:        #30b058;
  --color-success-bg:     #e6f9ee;
  --color-warning:        #f5a623;
  --color-warning-bg:     #fff8e6;
  --color-danger:         #ff3b30;
  --color-danger-bg:      #fff0f0;
  --color-info:           #007aff;
  --color-info-bg:        #e6f0ff;

  /* ── Typography ── */
  --font-family:          'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono:            ui-monospace, 'Cascadia Code', 'SF Mono', Menlo, monospace;

  --font-size-xs:         0.6875rem;  /* 11px */
  --font-size-sm:         0.8125rem;  /* 13px */
  --font-size-base:       0.9375rem;  /* 15px */
  --font-size-md:         1rem;       /* 16px */
  --font-size-lg:         1.0625rem;  /* 17px */
  --font-size-xl:         1.25rem;    /* 20px */
  --font-size-2xl:        1.5rem;     /* 24px */
  --font-size-3xl:        1.875rem;   /* 30px */

  --font-weight-regular:  400;
  --font-weight-medium:   500;
  --font-weight-semibold: 600;
  --font-weight-bold:     700;

  --line-height-tight:    1.25;
  --line-height-normal:   1.5;
  --line-height-relaxed:  1.625;

  /* ── Spacing (8px grid) ── */
  --space-0:   0;
  --space-px:  1px;
  --space-0-5: 0.125rem;  /* 2px  */
  --space-1:   0.25rem;   /* 4px  */
  --space-1-5: 0.375rem;  /* 6px  */
  --space-2:   0.5rem;    /* 8px  */
  --space-2-5: 0.625rem;  /* 10px */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-7:   1.75rem;   /* 28px */
  --space-8:   2rem;      /* 32px */
  --space-9:   2.25rem;   /* 36px */
  --space-10:  2.5rem;    /* 40px */
  --space-11:  2.75rem;   /* 44px */
  --space-12:  3rem;      /* 48px */
  --space-14:  3.5rem;    /* 56px */
  --space-16:  4rem;      /* 64px */

  /* ── Layout ── */
  --sidebar-width:        240px;
  --sidebar-collapsed:    64px;
  --topbar-height:        56px;
  --content-max:          1440px;

  /* ── Borders ── */
  --radius-none:   0;
  --radius-xs:     0.1875rem;  /* 3px */
  --radius-sm:     0.25rem;    /* 4px */
  --radius-md:     0.5rem;     /* 8px */
  --radius-lg:     0.75rem;    /* 12px */
  --radius-xl:     1rem;       /* 16px */
  --radius-2xl:    1.25rem;    /* 20px */
  --radius-full:   9999px;

  /* ── Elevation ── */
  --shadow-xs:      0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-sm:      0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md:      0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
  --shadow-lg:      0 10px 20px -3px rgba(0, 0, 0, 0.08), 0 4px 8px -2px rgba(0, 0, 0, 0.04);
  --shadow-xl:      0 20px 40px -5px rgba(0, 0, 0, 0.10), 0 8px 16px -4px rgba(0, 0, 0, 0.05);
  --shadow-frosted: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-focus:   0 0 0 3px rgba(var(--color-primary-rgb), 0.2);

  /* ── Transitions ── */
  --ease-default:  cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring:   cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out:      cubic-bezier(0, 0, 0.2, 1);
  --ease-in:       cubic-bezier(0.4, 0, 1, 1);

  --transition-fast:   120ms var(--ease-default);
  --transition-base:   200ms var(--ease-default);
  --transition-slow:   350ms var(--ease-default);
  --transition-spring: 300ms var(--ease-spring);

  /* ── Z-index ── */
  --z-base:        0;
  --z-raised:      10;
  --z-dropdown:    100;
  --z-sticky:      200;
  --z-overlay:     300;
  --z-modal:       400;
  --z-toast:       500;
  --z-tooltip:     600;
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --color-bg:            #000000;
  --color-surface:       #1c1c1e;
  --color-surface-2:     #252528;
  --color-border:        #2c2c2e;
  --color-border-strong: #3a3a3c;

  --color-gray-50:       #1c1c1e;
  --color-gray-100:      #2c2c2e;
  --color-gray-200:      #3a3a3c;
  --color-gray-300:      #48484a;
  --color-gray-400:      #636366;
  --color-gray-500:      #8e8e93;
  --color-gray-600:      #aeaeb2;
  --color-gray-700:      #c7c7cc;
  --color-gray-800:      #e5e5ea;
  --color-gray-900:      #f5f5f7;
  --color-white:         #1c1c1e;

  --color-primary-light: rgba(0, 130, 54, 0.15);

  --status-active-bg:         rgba(0, 130, 54, 0.15);
  --status-active-text:       #34c759;
  --status-active-border:     rgba(52, 199, 89, 0.4);

  --status-pending-bg:        rgba(245, 166, 35, 0.15);
  --status-pending-text:      #ffa930;
  --status-pending-border:    rgba(255, 169, 48, 0.4);

  --status-executing-bg:      rgba(64, 136, 255, 0.15);
  --status-executing-text:    #64a8ff;
  --status-executing-border:  rgba(100, 168, 255, 0.4);

  --status-completed-bg:      rgba(153, 102, 255, 0.15);
  --status-completed-text:    #be90ff;
  --status-completed-border:  rgba(190, 144, 255, 0.4);

  --status-draft-bg:          #2c2c2e;
  --status-draft-text:        #8e8e93;
  --status-draft-border:      #48484a;

  --shadow-md:      0 4px 12px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2);
  --shadow-lg:      0 10px 30px rgba(0, 0, 0, 0.4);
  --shadow-frosted: 0 8px 32px rgba(0, 0, 0, 0.5), 0 2px 8px rgba(0, 0, 0, 0.3);
}
