/* ============================================================
   CIRRUS SHIELD — DESIGN SYSTEM TOKENS
   Applied globally via Site.Master and Site1.Master
   ============================================================ */

:root {
  /* Color palette */
  --blue-50: #eff6ff;
  --blue-100: #dbeafe;
  --blue-200: #bfdbfe;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;

  /* Backgrounds */
  --bg-app: #f0f2f7;
  --bg-card: #ffffff;
  --bg-muted: #f8fafc;
  --bg-hover: #f1f5ff;

  /* Text */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --text-link: #2563eb;

  /* Borders */
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #3b82f6;

  /* Status colors */
  --status-new-bg: #eff6ff;       --status-new-text: #1e40af;
  --status-progress-bg: #fef9c3;  --status-progress-text: #854d0e;
  --status-won-bg: #dcfce7;       --status-won-text: #166534;
  --status-lost-bg: #fee2e2;      --status-lost-text: #991b1b;
  --status-abandon-bg: #f3e8ff;   --status-abandon-text: #6b21a8;
  --status-pending-bg: #ffedd5;   --status-pending-text: #9a3412;

  /* Danger / error */
  --danger: #ed412d;
  --danger-hover: #c5341f;
  --danger-bg: #fff1f0;
  --red: #dc2626;
  --red-bg: #fef2f2;
  --red-border: #fecaca;
  --green: #16a34a;

  /* Warning — AKH 20260720 - CR2345 - amber, distinct from --danger's red so a
     heads-up (e.g. license expiring soon) doesn't read as an actual error. */
  --warning: #d97706;
  --warning-hover: #b45309;
  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #92400e;

  /* Tooltip — AKH 20260720 - CR2345 - matches mockup.html's own [data-tip] tokens exactly
     (mockup.html:32-33): dark/"black" bg + white text, the same tooltip look used
     throughout mockup's .topbar-right. */
  --tooltip-bg: var(--text-primary);
  --tooltip-text: #ffffff;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 24px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);
  --shadow-xl: 0 40px 90px rgba(7,11,20,.35), 0 10px 24px rgba(7,11,20,.12);

  /* Border radius */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --r-2xl: 24px;
  --r-pill: 99px;
  --shadow-sticky: -4px 0 8px rgba(0,0,0,0.03);

  /* Avatar colors (dark-theme initials circles, matches mockup dark vars) */
  --av-a: #1e3a8a; --av-at: #bfdbfe;
  --av-b: #14532d; --av-bt: #bbf7d0;
  --av-c: #78350f; --av-ct: #fde68a;
  --av-d: #831843; --av-dt: #fbcfe8;
  --av-e: #4c1d95; --av-et: #ddd6fe;
  --av-f: #134e4a; --av-ft: #99f6e4;

  /* Animation */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 120ms;
  --t-base: 200ms;
  --t-slow: 300ms;

  /* Layout dimensions (used by skeleton and shell) */
  --sidebar-w: 230px;
  --sidebar-w-col: 64px;
  --topbar-h: 56px;
  --right-w: 300px;
}

/* Global font + base text — matches mockup body/button/input rules */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important; /* override style.css: font-family:'Roboto'!important */
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  transition: background var(--t-base), color var(--t-base);
}
button {
  cursor: pointer;
  font-family: inherit;
}
input,
select,
textarea {
  font-family: inherit;
}

/* Global scrollbar */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background-color: var(--border-strong);
  border-radius: 10px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background-color: var(--text-muted); }

/* Global focus ring */
/* AKH - 20260901 - CR2345 - reverted same day: the mockup's soft-glow/outline:none technique was
   applied HERE first (app-wide) per an initial request, then the user clarified it should only ever
   apply to the record-details page's inline-edit input specifically — moved to record-detail.css's
   own .inline-edit-input:focus-visible rule instead, this global one is back to its original values,
   unaffected. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0ms !important;
    animation-duration: 0ms !important;
  }
}
