/* 밝은 테마(body.theme-c) 추가 토큰·규칙 — 디자인 시안 theme-switch(웹디팀원1, 2026-11-04) 의 세 파일을 그대로 이어 붙임. 순서: tokens-theme-c → tokens-theme-c-optional → theme-layout-fix */
/* ===== tokens-theme-c.css ===== */
/* Q6 · theme-c(GFP 밝은 사이드바) 추가 토큰 + 적용 규칙 — 그대로 붙여 넣는 블록 (styles.css의 body.theme-c 블록 뒤)
 * - 기존 --bp-* 값과 theme-c 브랜드 색은 하나도 바꾸지 않음. 새 변수 --bp-c-* 만 추가.
 * - 글자 크기·줄 높이·박스 크기는 바꾸지 않음(색·배경·그림자만). S2 크기는 PLAN 실행 2 그대로.
 * - 모든 글자/배경 쌍 대비 ≥ 4.5:1 (contrast.txt 참고).
 */
body.theme-c {
  /* S2 글자색: 그룹 제목·직책·범위(meta)·비밀번호 변경 (S2 그대로면 neutral-300 #E8DFD4 → 흰 이름칸 위 1.32:1, 지금 계획 neutral-400 → 2.71:1) */
  --bp-c-sidebar-subtle: #665A51;        /* #FFFCF8 위 6.53 · #FFFFFF 위 6.67 · 스크롤 그림자 가장 진한 곳 4.97 · 메뉴 열림 트리거 층 아래 5.29 */
  --bp-c-sidebar-subtle-hover: #2C2420;  /* = --bp-text. 비밀번호 변경·로그아웃 hover (지금 #fff → 흰 이름칸 위 1.0) */
  --bp-c-sidebar-underline: rgba(102, 90, 81, .45); /* 비밀번호 변경 밑줄(장식) */

  /* 메뉴 목록 스크롤 그림자: 더 연하게 + 아래 덮개를 사이드바 배경으로(지금 아래 덮개가 남색 rgb(19,48,82)로 고정) */
  --bp-c-scroll-cover: #FFFCF8;          /* = --bp-sidebar-bg-from */
  --bp-c-scroll-shadow: rgba(44, 36, 32, .14); /* 기본 사이드바 rgba(0,0,0,.45) → 따뜻한 갈색 14% (그림자 가장 진한 곳 위 글자도 ≥4.5) */
  --bp-c-scroll-shadow-size: 10px;       /* 기본 12px */

  /* 현재 화면을 가진 부모(contains-current): 연한 #1B6EF3 계열 배경 + 진한 글자 */
  --bp-c-current-bg: #E8F0FE;            /* #1B6EF3 약 10% */
  --bp-c-current-border: #C7DAFC;        /* 1px 안쪽 선(장식, 자리 크기 그대로) */
  --bp-c-current-text: #0F3E8C;          /* 8.78:1, 둘째 줄 '› 원주'(opacity .85) 6.05:1 */
  --bp-c-current-ico-bg: #FFFFFF;
  --bp-c-current-ico: #1B6EF3;           /* 아이콘(글자 아님) 흰 바탕 위 4.53 */

  /* 이름칸 트리거(U1U3) */
  --bp-c-ub-hover-bg: rgba(138, 126, 116, .08); /* 지금 rgba(255,255,255,.06) → 흰 이름칸에서 안 보임. 트리거가 글자 위층이라 반투명이어야 함 */
  --bp-c-ub-open-bg: rgba(138, 126, 116, .14);  /* 메뉴 열림(aria-expanded=true) */

  /* 계정 메뉴 팝오버 #acctMenu (U1U3) */
  --bp-c-acct-bg: #FFFFFF;
  --bp-c-acct-border: #E8DFD4;
  --bp-c-acct-text: #2C2420;             /* 흰 바탕 15.21:1, hover·포커스 배경 위 13.77:1 */
  --bp-c-acct-icon: #665A51;             /* 지금 --bp-text-secondary(남색 계열 #475569)가 theme-c에서 안 바뀜 */
  --bp-c-acct-hover-bg: #F7F3EE;
  --bp-c-acct-sep: #E8DFD4;
  --bp-c-acct-shadow: 0 8px 24px rgba(44, 36, 32, .14); /* 지금 rgba(15,40,70,.12) 남색 그림자 */
  --bp-c-focus: var(--bp-brand-500);    /* = --bp-brand-500 (포커스 테두리, brand-500 을 따라감 — 대비 수정 A안) */
}

/* ── S2 글자색 (크기는 실행 2의 body:not(.sidebar-collapsed) 규칙 그대로; 여기는 색만)
 *    실행 2 규칙 (0,3,1)보다 한 단계 높은 (0,4,1)이라 어느 쪽이 뒤에 와도 theme-c 색이 이김. 접힌 사이드바는 건드리지 않음 ── */
body.theme-c:not(.sidebar-collapsed) .sidebar .nav-group,
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .name-row .role,
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .meta,
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .btn-pw-text,
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .acct-hint,
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .acct-chev { color: var(--bp-c-sidebar-subtle); }
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .btn-pw-text { text-decoration-color: var(--bp-c-sidebar-underline); }
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .acct-chev { border-color: var(--bp-c-acct-border); }
body.theme-c:not(.sidebar-collapsed) .sidebar .userbox .btn-pw-text:hover { color: var(--bp-c-sidebar-subtle-hover); }
body.theme-c .sidebar .userbox .btn-logout-icon:hover { color: var(--bp-c-sidebar-subtle-hover); background: var(--bp-c-ub-open-bg); }
/* .nav-subbtn span(본점·원주지점)은 실제 화면 글자 #706965(부모 글자색 × opacity 합성) → 5.27:1(그림자 가장 진한 곳 4.64)로 이미 통과. 바꾸지 않음 */

/* ── 메뉴 목록 스크롤 그림자 (nav-scroll 규칙과 같은 선택자·같은 크기, 색만 theme-c) ── */
@media (min-width: 1024px) {
  body.theme-c:not(.is-narrow) .sidebar nav {
    background:
      linear-gradient(var(--bp-c-scroll-cover) 30%, rgba(255, 252, 248, 0)) center top / 100% 28px no-repeat local,
      linear-gradient(rgba(255, 252, 248, 0), var(--bp-c-scroll-cover) 70%) center bottom / 100% 28px no-repeat local,
      radial-gradient(farthest-side at 50% 0, var(--bp-c-scroll-shadow), rgba(44, 36, 32, 0)) center top / 100% var(--bp-c-scroll-shadow-size) no-repeat scroll,
      radial-gradient(farthest-side at 50% 100%, var(--bp-c-scroll-shadow), rgba(44, 36, 32, 0)) center bottom / 100% var(--bp-c-scroll-shadow-size) no-repeat scroll;
  }
}

/* ── contains-current (펼친 부모 강조 + 접혔을 때 둘째 줄 '› 원주') ── */
body.theme-c .sidebar .nav-btn.has-sub.contains-current,
body.theme-c .sidebar .nav-btn.has-sub.contains-current:hover {
  background: var(--bp-c-current-bg);
  color: var(--bp-c-current-text);
  box-shadow: inset 0 0 0 1px var(--bp-c-current-border); /* 테두리 대신 안쪽 그림자 → 크기 변화 0 */
}
body.theme-c .sidebar .nav-btn.has-sub.contains-current .ico {
  background: var(--bp-c-current-ico-bg);
  color: var(--bp-c-current-ico);
}

/* ── 이름칸 트리거 + 계정 메뉴 팝오버 (펼친 상태 .userbox 안 / 포털 #acctMenu 둘 다) ── */
body.theme-c .sidebar .userbox .ub-trigger:hover { background: var(--bp-c-ub-hover-bg); }
body.theme-c .sidebar .userbox .ub-trigger[aria-expanded="true"] { background: var(--bp-c-ub-open-bg); }
body.theme-c .acct-menu { background: var(--bp-c-acct-bg); border-color: var(--bp-c-acct-border); box-shadow: var(--bp-c-acct-shadow); }
body.theme-c .acct-menu .acct-item { color: var(--bp-c-acct-text); }
body.theme-c .acct-menu .acct-item svg { color: var(--bp-c-acct-icon); }
body.theme-c .acct-menu .acct-item:hover,
body.theme-c .acct-menu .acct-item:focus { background: var(--bp-c-acct-hover-bg); }
body.theme-c .acct-menu .acct-item:focus-visible { outline-color: var(--bp-c-focus); }
body.theme-c .acct-menu .acct-sep { background: var(--bp-c-acct-sep); }
/* ===== tokens-theme-c-optional.css ===== */
/* ── 선택(요청 범위 밖) ─────────────────────────────────────────────
 * Q6 요청 4가지(S2 글자색·스크롤 그림자·contains-current·U1U3 메뉴)와 별개로,
 * 지금 theme-c(라이브 styles.css L461~)에 원래 있던 대비 미달 2건을 고치는 값.
 * 적용 여부는 따로 결정. tokens-theme-c.css 다음에 넣음. --bp-* 기존 값은 안 바꿈(새 --bp-c-*만 추가).
 */
body.theme-c {
  --bp-c-nav-text: #665A51;      /* 메뉴 글자: 지금 --bp-text-muted #8A7E74 = #FFFCF8 위 3.86 (미달) → 6.53 */
  --bp-c-brand-title: #2C2420;   /* 로고 옆 '지사 업무포털': 지금 --bp-text-on-brand #FFFFFF = 흰 배경 위 1.02 (안 보임) → 14.87 */
}
body.theme-c .sidebar .nav-btn { color: var(--bp-c-nav-text); }           /* .active / .contains-current 규칙이 더 구체적이라 그대로 이김 */
body.theme-c .sidebar .brand .title { color: var(--bp-c-brand-title); }
/* ===== theme-layout-fix.css ===== */
/* 테마 전환 시 자리 고정(시안 제안). 기존 styles.css의 body.theme-c(GFP용)는 사이드바 오른쪽 선·활성 메뉴·사용자 상자에
 * 1px border를 넣어 파랑↔밝음 전환 때 사이드바 안쪽이 1px씩 움직임(58개 요소). 같은 선을 안쪽 그림자로 그려 크기 변화 0.
 * 색·모양은 같고 자리만 고정. 기존 --bp-* 값은 그대로. */
body.theme-c .sidebar { border-right: 0; box-shadow: inset -1px 0 0 var(--bp-border); }
body.theme-c .sidebar .nav-btn.active { border: 0; box-shadow: inset 0 0 0 1px var(--bp-border), 0 4px 16px rgba(44,36,32,.06); }
body.theme-c .userbox { border: 0; box-shadow: inset 0 0 0 1px var(--bp-border); }

/* ===== tokens-theme-c-contrast.css ===== */
/* 밝은 테마 글자 대비 A안(웹디팀장, 2026-11-04). theme-layout-fix.css 뒤에 붙임. 원본: branch-portal-design-review/team1/followups/theme-c-contrast/tokens-theme-c-contrast.css (kpiB 안 씀) */
/* 밝은 테마(body.theme-c) 글자 대비 수정안
 * 불러오는 순서: styles.css → tokens-theme-c.css → tokens-theme-c-optional.css → theme-layout-fix.css → (이 파일)
 * 원칙: 색상(hue)·채도는 그대로, OKLCH 명도만 내림. 글자 크기·굵기·여백·테두리 그대로(배치 안 움직임).
 * 기준: 보통 글자 4.5:1, 큰 글자(24px 이상, 굵게 18.66px 이상) 3:1. 숫자는 contrast-table.md 참고.
 */
body.theme-c {
  /* ① 보조 글자: #8A7E74 → #72665D  (#F7F3EE 위 3.58→5.00, 흰색 3.95→5.52, #FFFCF8 3.86→5.39) */
  --bp-text-muted:   #72665D;
  --bp-sidebar-text: #72665D;
  --bp-neutral-500:  #72665D;   /* 계약리스트 표 머리(#F8FAFC 위 3.77→5.28) · 하단 탭 아이콘 */

  /* ② 글자로 쓰인 neutral-400: #A89B90 → #786C62  (흰색 2.71→5.00, #FFFCF8 2.65→4.88) — 힌트·하단 탭 글자 */
  --bp-neutral-400:  #786C62;

  /* ③ 상태 배지 '정상' 글자: #2A9D8F → #007B6F  (#E6F6F3 위 2.98→4.64) — 배지 바탕은 그대로 */
  --bp-success:      #007B6F;

  /* ④ 브랜드 코랄: #E85D4C → #C73E30  (흰 글자 3.44→5.05 · 흰 바탕 위 글자 3.44→5.05 · brand-100 위 3.12→4.58 · #FFFCF8 위 3.37→4.94)
   *   한 번에 고쳐지는 곳: 버튼(.btn.primary), 계약리스트 입력 탭(활성), 월 버튼(.mb-btn.on), 선택된 세그먼트,
   *   사이드바 아바타, 링크, 저장 타이머, 하단 탭(활성), pill.demo(미사용) */
  --bp-brand-500:    #C73E30;
  --bp-brand-400:    #C25146;   /* 버튼 hover(흰 글자 2.73→4.60). 지금처럼 500보다 살짝 옅음 */
  --bp-brand-600:    #B03A2D;   /* 500보다 진하게 유지(흰 글자 4.81→6.00) — 진한 띠·속보 강조 글자 */

  /* ⑤ KPI 카드(GFP 휴대폰 홈 .gfp-heroes) — 기본 = A안 '배경 진하게'(흰 글자 유지) */
  --bp-c-hero-a1: #C73E30;  --bp-c-hero-a2: #AE621A;   /* 코랄→호박: #E85D4C→#F4A261 의 명도만 내림 */
  --bp-c-hero-b1: #007A6E;  --bp-c-hero-b2: #008378;   /* 청록: #2A9D8F→#48B5A8 의 명도만 내림 */
  --bp-c-hero-fg: #FFFFFF;
  --bp-c-hero-label-opacity: 1;                        /* 라벨 .9 → 1 (12px 글자라 4.5 필요) */
}

body.theme-c .gfp-heroes .hero,
body.theme-c .kpi-hero,
body.theme-c .headline-kpis .hero {
  background: linear-gradient(145deg, var(--bp-c-hero-a1), var(--bp-c-hero-a2));
  color: var(--bp-c-hero-fg);
}
body.theme-c .gfp-heroes .hero.b,
body.theme-c .headline-kpis .hero:nth-child(2),
body.theme-c .kpi-heroes .kpi-hero:nth-child(2) {
  background: linear-gradient(145deg, var(--bp-c-hero-b1), var(--bp-c-hero-b2));
}
body.theme-c .gfp-heroes .hero .l { opacity: var(--bp-c-hero-label-opacity); }

/* ⑥ (토큰 아님, 새로 찾은 곳) 수기입력 활성 탭의 숫자 동그라미: 흰 글자 on 흰색 25% 겹침
 *   지금 #E85D4C 위 2.54 · brand-500만 바꾸면 3.36(여전히 미달) → 동그라미를 '진한 갈색 25%'로: 6.78. 크기·모양 그대로. */
body.theme-c .entry-tabs .tab-btn.active .count { background: rgba(44,36,32,.25); }
