/* 콜앤고 토큰 — 값만 둔다(규칙서 §8-1). 컴포넌트·화면은 이 이름만 쓴다. 표·대비는 DESIGN.md §2.
   방향(ui-ux-pro-max 2026-11-05): 현장용 Flat — 그림자 거의 없이 또렷한 면·선, 햇빛 아래 읽히는 짙은 글자,
   주색 청록(이동·진행) + 행동색 주황(전화 걸기 하나에만), 상태 9종은 색 + 글자 + 아이콘으로 함께 구분.
   서체 Pretendard(자체 호스팅) — fonts/pretendard/pretendard.css 는 layout.php 가 먼저 싣는다 */

:root {
  color-scheme: light;

  /* 바탕·선·글자 — 햇빛 대비: 본문 글자 15:1 이상 */
  --bg: #f4f6f5;
  --surface: #ffffff;
  --surface-2: #eef1f0;          /* 입력 칸·약한 바탕 */
  --surface-3: #e1e6e4;
  --border: #d9dfdc;
  --border-strong: #7f8b87;      /* 입력 칸·선택 칸 테두리 — 흰 바탕 3.4:1(비텍스트 3:1 이상) */
  --text: #0f1716;
  --text-2: #3b4744;
  --text-3: #56635f;             /* 흰 바탕 6.3:1 — 작은 글자도 읽힘 */

  /* 주색 — 청록(흰 글자 5.6:1) */
  --primary: #0f6f66;
  --primary-hover: #0b5a53;
  --primary-ink: #0c625a;
  --primary-soft: #dff2ef;
  --on-primary: #ffffff;

  /* 행동색 — 「전화 걸기」 하나에만(흰 글자 5.2:1) */
  --accent: #c2410c;
  --accent-hover: #a3370a;
  --accent-soft: #ffeadf;
  --accent-ink: #9a3412;          /* 옅은 주황 바탕 위 작은 글자(6.3:1) */
  --on-accent: #ffffff;

  --warn: #8a5300;
  --warn-soft: #fff1d1;
  --danger: #b42318;
  --danger-soft: #fde7e4;
  --on-danger: #ffffff;
  --success: #116b33;
  --success-soft: #def5e6;
  --focus: #0f6f66;
  --overlay: rgba(8, 14, 13, .52);
  --tip-bg: #17201e;
  --tip-text: #f3f6f5;
  --tip-err: #ff9b91;
  --tip-ok: #74e0a0;

  /* 상태 9종 — 글자(fg)는 옅은 바탕(bg) 위 4.5:1 이상, 막대(bar)는 목록 왼쪽 띠 */
  --st-waiting-fg: #1d4ed8;   --st-waiting-bg: #e3ebff;   --st-waiting-bar: #2563eb;
  --st-no_answer-fg: #8a5300; --st-no_answer-bg: #fff1d1; --st-no_answer-bar: #d99400;
  --st-callback-fg: #6d28d9;  --st-callback-bg: #efe7ff;  --st-callback-bar: #7c3aed;
  --st-appointment-fg: #0c625a; --st-appointment-bg: #dff2ef; --st-appointment-bar: #0f8a7e;
  --st-visited-fg: #116b33;   --st-visited-bg: #def5e6;   --st-visited-bar: #16a34a;
  --st-refused-fg: #4b5563;   --st-refused-bg: #e9ecef;   --st-refused-bar: #6b7280;
  --st-optout-fg: #b42318;    --st-optout-bg: #fde7e4;    --st-optout-bar: #dc2626;
  --st-ineligible-fg: #7a4519; --st-ineligible-bg: #f6e9dc; --st-ineligible-bar: #a16207;
  --st-canceled-fg: #4b5563;  --st-canceled-bg: #eceae6;  --st-canceled-bar: #8b8680;

  /* 시간표 — 방문·이동·빈 시간·빠듯 */
  --tl-visit: #0f6f66;
  --tl-move: #aab4b0;
  --tl-gap-bg: repeating-linear-gradient(135deg, #fff1d1 0 8px, #fde8b8 8px 16px);
  --tl-tight: #b42318;

  /* 관리자 틀 — 지금 어느 쪽인지 바로 알게(규칙서 §5) */
  --admin-bar: #20283a;
  --admin-bar-text: #f1f4fa;
  --admin-side: #eceff4;
  --admin-side-active: #d9dfeb;
  --platform-bar: #3a2850;       /* 플랫폼 화면 — 회사 관리(남색)와 다른 보라 */

  /* 간격 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-7: 32px;
  --space-8: 48px;

  /* 글자 — 12px 미만 없음, 본문 16 */
  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 32px;
  --text-num: 40px;
  --leading-tight: 1.3;
  --leading-normal: 1.55;
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-bold: 700;
  --weight-heavy: 800;

  /* 모서리·그림자·높이 — Flat: 그림자는 떠 있는 것(대화상자·토스트·아래 탭)에만 */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 16px;
  --r-full: 999px;
  --shadow-1: 0 1px 0 rgba(15, 23, 22, .06);
  --shadow-card: 0 1px 0 rgba(15, 23, 22, .05);
  --shadow-2: 0 12px 32px rgba(15, 23, 22, .18);
  --control-h-sm: 40px;
  --control-h-md: 48px;
  --control-h-lg: 56px;
  --control-h-xl: 64px;          /* 결과 버튼·전화 걸기 — 한 손 엄지 */

  --content-w: 760px;
  --wide-w: 1180px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --dur: 160ms;
}

/* 다크 — 시스템 설정을 따르고(저장값 없으면), 직접 고르면 data-theme. 두 묶음은 같은 값(아래 한 번 더) */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0e1312; --surface: #161d1c; --surface-2: #1f2826; --surface-3: #2a3532;
    --border: #2b3633; --border-strong: #6f7f7b;
    --text: #eef3f2; --text-2: #c3cdca; --text-3: #9aa8a4;
    --primary: #4fd1c0; --primary-hover: #6fdccd; --primary-ink: #6fdccd; --primary-soft: #12332f; --on-primary: #04211d;
    --accent: #ff8a4c; --accent-hover: #ffa071; --accent-soft: #3a1d0e; --accent-ink: #ffa071; --on-accent: #2a0f02;
    --warn: #f5c04a; --warn-soft: #33270a;
    --danger: #f2877d; --danger-soft: #3a1714; --on-danger: #2a0b08;
    --success: #6ad493; --success-soft: #11301d;
    --focus: #6fdccd; --overlay: rgba(0, 0, 0, .64);
    --tip-bg: #eef3f2; --tip-text: #0f1716; --tip-err: #b42318; --tip-ok: #116b33;
    --st-waiting-fg: #9db8ff;   --st-waiting-bg: #18234a;   --st-waiting-bar: #5b8cff;
    --st-no_answer-fg: #f5c04a; --st-no_answer-bg: #33270a; --st-no_answer-bar: #e0a417;
    --st-callback-fg: #c9b0ff;  --st-callback-bg: #2a1c4a;  --st-callback-bar: #9b6bff;
    --st-appointment-fg: #6fdccd; --st-appointment-bg: #12332f; --st-appointment-bar: #2fbfae;
    --st-visited-fg: #6ad493;   --st-visited-bg: #11301d;   --st-visited-bar: #34c467;
    --st-refused-fg: #c3c9d1;   --st-refused-bg: #262b31;   --st-refused-bar: #8b939e;
    --st-optout-fg: #f2877d;    --st-optout-bg: #3a1714;    --st-optout-bar: #f05a4f;
    --st-ineligible-fg: #e7b98a; --st-ineligible-bg: #33240f; --st-ineligible-bar: #c58a3a;
    --st-canceled-fg: #c9c4bd;  --st-canceled-bg: #2a2724;  --st-canceled-bar: #8b8680;
    --tl-visit: #2fbfae; --tl-move: #4a5855;
    --tl-gap-bg: repeating-linear-gradient(135deg, #33270a 0 8px, #3d2f0d 8px 16px);
    --tl-tight: #f05a4f;
    --admin-bar: #151b28; --admin-bar-text: #e9eef8; --admin-side: #121722; --admin-side-active: #222b3d;
    --shadow-1: 0 1px 0 rgba(0, 0, 0, .4); --shadow-card: 0 1px 0 rgba(0, 0, 0, .4); --shadow-2: 0 12px 32px rgba(0, 0, 0, .55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e1312; --surface: #161d1c; --surface-2: #1f2826; --surface-3: #2a3532;
  --border: #2b3633; --border-strong: #6f7f7b;
  --text: #eef3f2; --text-2: #c3cdca; --text-3: #9aa8a4;
  --primary: #4fd1c0; --primary-hover: #6fdccd; --primary-ink: #6fdccd; --primary-soft: #12332f; --on-primary: #04211d;
  --accent: #ff8a4c; --accent-hover: #ffa071; --accent-soft: #3a1d0e; --accent-ink: #ffa071; --on-accent: #2a0f02;
  --warn: #f5c04a; --warn-soft: #33270a;
  --danger: #f2877d; --danger-soft: #3a1714; --on-danger: #2a0b08;
  --success: #6ad493; --success-soft: #11301d;
  --focus: #6fdccd; --overlay: rgba(0, 0, 0, .64);
  --tip-bg: #eef3f2; --tip-text: #0f1716; --tip-err: #b42318; --tip-ok: #116b33;
  --st-waiting-fg: #9db8ff;   --st-waiting-bg: #18234a;   --st-waiting-bar: #5b8cff;
  --st-no_answer-fg: #f5c04a; --st-no_answer-bg: #33270a; --st-no_answer-bar: #e0a417;
  --st-callback-fg: #c9b0ff;  --st-callback-bg: #2a1c4a;  --st-callback-bar: #9b6bff;
  --st-appointment-fg: #6fdccd; --st-appointment-bg: #12332f; --st-appointment-bar: #2fbfae;
  --st-visited-fg: #6ad493;   --st-visited-bg: #11301d;   --st-visited-bar: #34c467;
  --st-refused-fg: #c3c9d1;   --st-refused-bg: #262b31;   --st-refused-bar: #8b939e;
  --st-optout-fg: #f2877d;    --st-optout-bg: #3a1714;    --st-optout-bar: #f05a4f;
  --st-ineligible-fg: #e7b98a; --st-ineligible-bg: #33240f; --st-ineligible-bar: #c58a3a;
  --st-canceled-fg: #c9c4bd;  --st-canceled-bg: #2a2724;  --st-canceled-bar: #8b8680;
  --tl-visit: #2fbfae; --tl-move: #4a5855;
  --tl-gap-bg: repeating-linear-gradient(135deg, #33270a 0 8px, #3d2f0d 8px 16px);
  --tl-tight: #f05a4f;
  --admin-bar: #151b28; --admin-bar-text: #e9eef8; --admin-side: #121722; --admin-side-active: #222b3d;
  --shadow-1: 0 1px 0 rgba(0, 0, 0, .4); --shadow-card: 0 1px 0 rgba(0, 0, 0, .4); --shadow-2: 0 12px 32px rgba(0, 0, 0, .55);
}
