/* ==========================================================================
   공용 디자인 토큰 — templates/components/app_css.html 이 불러온다. 색·반경·그림자·글꼴·사이드바 값은
   여기에만 둔다 (두 화면이 어긋나지 않도록). 라이트 테마만 있다.
   :root[data-theme] 는 관리자 화면용 — Django base.css 의 html[data-theme="light"] 규칙
   (--accent 등)보다 우선하도록 같은 우선순위로 한 번 더 적는다.
   ========================================================================== */

:root,
:root[data-theme] {
  --font-sans: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Malgun Gothic", system-ui, sans-serif;

  --bg: #f4f5f8;
  --surface: #ffffff;
  --surface-2: #f8f9fb;
  --border: #e4e7ec;
  --border-strong: #d0d5dd;
  --text: #1d2433;
  --text-muted: #667085;
  --text-subtle: #98a2b3;

  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-soft: #eef2ff;

  --sidebar-bg: #151a2d;
  --sidebar-text: #aab2c8;
  --sidebar-active: #ffffff;
  --sidebar-active-bg: rgba(255, 255, 255, 0.08);
  --sidebar-width: 248px;

  /* 업무 상태 (칸반 컬럼) */
  --status-todo: #64748b;
  --status-todo-soft: #f1f5f9;
  --status-in-progress: #2563eb;
  --status-in-progress-soft: #eff6ff;
  --status-review: #d97706;
  --status-review-soft: #fffbeb;
  --status-done: #059669;
  --status-done-soft: #ecfdf5;

  /* 프로젝트 상태 */
  --pstatus-planning: #7c3aed;
  --pstatus-active: #2563eb;
  --pstatus-on-hold: #d97706;
  --pstatus-completed: #059669;

  /* 우선순위 */
  --priority-low: #94a3b8;
  --priority-medium: #3b82f6;
  --priority-high: #f59e0b;
  --priority-urgent: #ef4444;

  /* 옅은 배경 위 글자색 (WCAG AA 4.5:1 이상). 채우기·차트에는 위의 기본 토큰을 쓴다. */
  --status-todo-text: #475569;
  --status-in-progress-text: #1d4ed8;
  --status-review-text: #b45309;
  --status-done-text: #047857;
  --pstatus-planning-text: #6d28d9;
  --pstatus-active-text: #1d4ed8;
  --pstatus-on-hold-text: #b45309;
  --pstatus-completed-text: #047857;
  --priority-low-text: #475569;
  --priority-medium-text: #1d4ed8;
  --priority-high-text: #b45309;
  --priority-urgent-text: #b91c1c;
  --warning-text: #b45309;
  --danger-text: #b91c1c;

  /* 견적 상태 (칸반 컬럼) — 채우기·점 색 / 옅은 배경 / 옅은 배경 위 글자색 */
  --q-draft: #64748b;       --q-draft-soft: #f1f5f9;       --q-draft-text: #475569;
  --q-review: #7c3aed;      --q-review-soft: #f5f3ff;      --q-review-text: #6d28d9;
  --q-sent: #2563eb;        --q-sent-soft: #eff6ff;        --q-sent-text: #1d4ed8;
  --q-negotiation: #d97706; --q-negotiation-soft: #fffbeb; --q-negotiation-text: #b45309;
  --q-won: #059669;         --q-won-soft: #ecfdf5;         --q-won-text: #047857;
  --q-lost: #dc2626;        --q-lost-soft: #fef2f2;        --q-lost-text: #b91c1c;

  /* 견적 유형 */
  --qtype-sw: #4f46e5;
  --qtype-hw: #0891b2;
  --qtype-mixed: #9333ea;
  --qtype-maintenance: #65a30d;
  --qtype-goods: #ea580c;
  --qtype-mfg: #0f766e;

  /* Quotation document (_document.html, print): the PDF colours of quotes/pdf_styles.py,
     kept equal by quotes.tests.test_document_parity */
  --doc-paper: #ffffff;
  --doc-ink: #1d2433;
  --doc-muted: #667085;
  --doc-line: #98a2b3;
  --doc-line-soft: #d0d5dd;
  --doc-head-bg: #e9ecf3;
  --doc-section-bg: #f4f5f8;
  --doc-total-bg: #eef2ff;
  --doc-accent: #1f2a6b;

  --danger: #dc2626;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.08), 0 1px 2px rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 12px 24px -6px rgba(16, 24, 40, 0.14);
}
