/* domain_dashboard — tflow-admin 과 같은 모양 (2026-11-11, prompts/13 5절 "화면 모양").
   Bootstrap 5.3.0 + theme_light.css(tflow-admin 그대로 복사) 위에 대시보드 역할 토큰. 밝은 화면만 (tflow-admin 처럼).
   색은 역할 토큰으로만 쓴다 — 글 · 회색 · 테두리는 theme_light 의 회색 단계, 차트 색은 색 검사를 통과한 값 그대로. */
:root {
  color-scheme: light;
  --surface-1: #ffffff;          /* 카드 · 차트 바탕 (Bootstrap card) */
  --page: #ffffff;               /* 화면 바탕 (tflow-admin 본문) */
  --text-primary: var(--bs-body-color);
  --text-secondary: #4B5675;     /* theme_light gray-700 */
  --text-muted: #78829D;         /* gray-600 — 작은 글도 읽히게 (gray-500 #99A1B7 은 흰 바탕에서 흐리다) */
  --grid: #F1F1F4;               /* 격자 · 표 줄 (gray-200 = theme_light 테두리) */
  --axis: #DBDFE9;               /* 기준선 · 표 머리 밑줄 (gray-300) */
  --border: var(--bs-border-color-translucent);
  --series-1: #2a78d6;           /* 막대 · 선 (한 계열) */
  --series-1-wash: rgba(42, 120, 214, 0.10);
  --track: #cde2fb;              /* 진행 막대의 빈 부분 — 같은 파랑의 옅은 단계 */
  --hover-wash: #F9F9F9;         /* gray-100 — tflow-admin 메뉴 hover 와 같다 */
  --good: #0ca30c;
  --warning: #fab219;
  --serious: #ec835a;
  --critical: #d03b3b;
  --link: var(--bs-link-color);
  /* 여러 계열(업체 비율) — 순서 고정 · 흰 바탕에서 검사 (validate_palette.js 통과, 글 범례 필수) */
  --cat-1: #2a78d6;
  --cat-2: #eb6834;
  --cat-3: #1baf7a;
  --cat-4: #eda100;
  --cat-5: #e87ba4;
  --cat-other: #898781;          /* 그 밖 */
  --cat-none: #c3c2b7;           /* 해당 없음 */
}

/* 입력 칸 테두리 (2026-11-11 요청 "checkbox 가 미선택인 경우 잘 안 보인다 — bootstrap 의 ui 를 사용"):
   theme_light 의 --bs-border-color(#F1F1F4)를 Bootstrap 입력 칸이 테두리로 써서 흰 바탕에서 거의 안 보였다.
   Bootstrap 기본 체크박스 · 라디오 모양 그대로 테두리만 진하게, 글 입력 · 고르기는 Bootstrap 기본 테두리 밝기로 */
.form-check-input { border-color: var(--bs-gray-500); }          /* #99A1B7 */
.form-check-input:checked { border-color: var(--bs-primary); }
.form-check-input:disabled { opacity: 0.6; }
.form-control, .form-select { border-color: var(--bs-gray-300); } /* #DBDFE9 ≈ Bootstrap 기본 #dee2e6 */

/* 접기 · 펼치기 아이콘 (2026-11-11 요청 "접기 펼치기 심볼을 구글 아이콘으로") — Google Material Icons,
   접힘 chevron_right · 펼침 expand_more (Dash.chevron). <details> 의 기본 ▶ 표시도 같은 아이콘으로 바꾼다 */
.material-icons.chevron { font-size: 1.25em; line-height: 1; vertical-align: -0.25em; margin-left: -0.15em; }
details > summary { list-style: none; cursor: pointer; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before {
  content: "chevron_right"; font-family: "Material Icons"; font-feature-settings: "liga"; -webkit-font-feature-settings: "liga";
  font-weight: normal; font-style: normal; text-transform: none; letter-spacing: normal; white-space: nowrap; direction: ltr;
  -webkit-font-smoothing: antialiased; display: inline-block;
  font-size: 1.25em; line-height: 1; vertical-align: -0.25em; margin: 0 0.1em 0 -0.15em;
}
details[open] > summary::before { content: "expand_more"; }

/* 글꼴 · 크기는 Bootstrap 기본 — tflow-admin 도 Roboto 를 불러오기만 하고 본문은 Bootstrap 기본 글꼴 */
body { background: var(--page); color: var(--text-primary); }
a { color: var(--link); }

/* ── 틀 (tflow-admin static/css/style.css 와 같다) ─────────── */
/* 위쪽 내비바 · 아래쪽 푸터는 붙어 있고, 본문 칸 · 사이드바가 각자 화면 높이 안에서 스크롤 */
#page-content-wrapper > .navbar { position: sticky; top: 0; z-index: 1020; }
#page-content-wrapper > .navbar .nav-item { padding-left: 10px; padding-right: 10px; }
#page-content-wrapper > .navbar .nav-item.active { background-color: #1e90ff80 !important; color: #ffffff; }
#page-content-wrapper > footer { position: sticky; bottom: 0; z-index: 1020; }
body { min-height: 100vh; display: flex; flex-direction: column; }
#wrapper { flex: 1; }
#page-content-wrapper { display: flex; flex-direction: column; height: 100vh; overflow-y: auto; min-width: 0; }
#sidebar-wrapper { height: 100vh; overflow-y: auto; flex: none; }
#sidebar-wrapper .list-group-item .material-icons { font-size: 1.25rem; margin-right: 0.15rem; }
.navbar .who { font-size: 0.875rem; }
.navbar .material-icons { font-size: 1.25rem; }

/* 화면 제목 — tflow-admin 목록 화면의 h4 크기 */
.page-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 1rem; margin-bottom: 1rem; }
.page-head h1 { font-size: calc(1.275rem + 0.3vw); font-weight: 500; margin: 0; }
@media (min-width: 1200px) { .page-head h1 { font-size: 1.5rem; } }
.page-head .meta { color: var(--text-secondary); font-size: 0.875rem; }

.section-title { font-size: 1rem; font-weight: 600; margin: 1.75rem 0 0.25rem; }
.section-note { color: var(--text-muted); font-size: 0.8rem; margin-bottom: 0.75rem; }

/* 탭 (현황 — tflow-admin 대시보드와 같은 Bootstrap nav-tabs, 2026-11-11). 탭 바로 아래 첫 제목은 위 여백 없이 */
.tab-pane > .section-title:first-child,
.tab-pane > .row:first-child > * > .section-title:first-child { margin-top: 0; }
.tab-pane:focus-visible { outline: none; }
/* 진행 탭의 멈춤 의심 수 — 색만이 아니라 ⚠ + 수 (상태 칩 .state.stalled 와 같은 테두리) */
.tab-alert { display: inline-block; margin-left: 0.25rem; padding: 0 0.4rem; font-size: 0.72rem; line-height: 1.5;
             color: var(--text-primary); border: 1px solid var(--serious); border-radius: 999px; vertical-align: 1px; }
.tab-alert[hidden] { display: none; }
/* 탭 안의 작은 탭 (발송 대상 › 산업군별 · 나라별 · MX 업체별) — 위 탭보다 작게 */
.nav-pills-sm .nav-link { padding: 0.25rem 0.75rem; font-size: 0.875rem; }

/* 판 — tflow-admin 의 `card shadow-sm` 과 같은 모양 (마크업은 panel 그대로 — 화면 · JS 여러 곳이 쓴다) */
.panel {
  background: var(--bs-card-bg, var(--surface-1));
  border: var(--bs-border-width) solid var(--bs-border-color-translucent);
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-sm);
  padding: 1rem;
  word-break: keep-all;   /* 한글은 낱말 중간에서 줄을 바꾸지 않게 (좁은 카드 제목 "확 / 인") */
}
/* 같은 줄(.row)의 판은 높이를 맞춘다 — 칸에 판이 하나일 때만 (판이 둘인 칸에 걸면 둘 다 칸 높이가 되어 아래가 빈다,
   본문 칸이 flex 세로 배치라 모든 판에 100% 를 걸면 본문 전체 높이가 된다) */
.row > * > .panel:only-child { height: 100%; }
.panel-title { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; display: flex; flex-wrap: wrap; align-items: center;
               gap: 0 0.5rem; }
.panel-title .sub { color: var(--text-muted); font-weight: 400; font-size: 0.8rem; }

.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.num { font-variant-numeric: tabular-nums; }
.loading { opacity: 0.55; transition: opacity 0.2s; }

/* ── 단계 카드 ───────────────────────────────────────── */
.stage-no { color: var(--text-muted); font-weight: 600; margin-right: 0.15rem; }
.stage-app { color: var(--text-muted); font-size: 0.72rem; font-weight: 400; }
.stage-value { font-size: 1.6rem; font-weight: 600; line-height: 1.2; margin-top: 0.25rem; }
.stage-value .of { font-size: 0.85rem; font-weight: 400; color: var(--text-secondary); margin-left: 0.25rem; }
.stage-lines { margin-top: 0.6rem; font-size: 0.8rem; color: var(--text-secondary); }
.stage-lines div { display: flex; justify-content: space-between; gap: 0.5rem; padding: 0.1rem 0; }
.stage-lines dt { font-weight: 400; color: var(--text-muted); }
.stage-lines dd { margin: 0; text-align: right; color: var(--text-primary); }

/* 진행 막대 (meter): 채움 = 파랑, 빈 부분 = 같은 파랑의 옅은 단계 */
.meter { height: 8px; border-radius: 4px; background: var(--track); overflow: hidden; margin-top: 0.5rem; }
.meter > span { display: block; height: 100%; background: var(--series-1); border-radius: 4px; }
.meter.thin { height: 6px; margin-top: 0.2rem; }

/* 상태: 색만으로 뜻을 전하지 않는다 — 아이콘 + 글 */
.state { display: inline-flex; align-items: center; gap: 0.35rem; font-size: 0.78rem; color: var(--text-primary); white-space: nowrap;
         border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.55rem 0.1rem 0.4rem; }
.state .dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--text-muted); }
.state.running .dot { background: var(--good); }
.state.stalled .dot { background: var(--serious); }
.state.stalled { border-color: var(--serious); }
.state .icon { font-size: 0.72rem; color: var(--text-secondary); }

.alert-line { border-left: 3px solid var(--serious); background: var(--surface-1); padding: 0.5rem 0.75rem;
              border-radius: 4px; color: var(--text-primary); font-size: 0.85rem; margin-bottom: 1rem; }
.notice-line { border-left: 3px solid var(--axis); background: var(--surface-1); padding: 0.5rem 0.75rem;
               border-radius: 4px; color: var(--text-secondary); font-size: 0.8rem; }
/* 안내 목록 (2026-11-11 요청 — 긴 글은 핵심을 잡기 힘들어 항목으로): 핵심어는 굵게(strong), 경고는 빨강(.warn),
   주의는 짙은 주황(.caution). 색만으로 뜻을 전하지 않게 경고 · 주의 항목도 굵은 글로 시작한다 */
.note-list { margin: 0; padding-left: 1.1rem; font-size: 0.8rem; color: var(--text-secondary); line-height: 1.55; }
.note-list li + li { margin-top: 0.1rem; }
.note-list li::marker { color: var(--text-muted); }
.note-list strong { color: var(--text-primary); font-weight: 600; }
.note-list .warn, .note-list .warn strong { color: var(--critical); }
.note-list .caution, .note-list .caution strong { color: #a14f00; }   /* 흰 바탕 대비 5:1 이상 */
.note-list .warn::marker, .note-list .caution::marker { color: currentColor; }
.note-problem { color: var(--critical); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.35rem; }

/* ── 표 ─────────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.data-table th { color: var(--text-muted); font-weight: 500; text-align: left; padding: 0.35rem 0.5rem;
                 border-bottom: 1px solid var(--axis); white-space: nowrap; position: sticky; top: 0; background: var(--surface-1); }
.data-table td { padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--grid); vertical-align: middle; }
.data-table td.n, .data-table th.n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table tbody tr:hover { background: var(--hover-wash); }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.is-active td:first-child { box-shadow: inset 3px 0 0 var(--series-1); }
.table-scroll { overflow-x: auto; }
.table-scroll.tall { max-height: 70vh; overflow-y: auto; }
/* 공급처별 하루 (이메일 CSV) — 표가 든 칸이 넓으면 2단, 좁으면 1단. 줄이 많아(업체 모두) 입력 칸을 낮게.
   기준은 화면 폭이 아니라 칸 폭 (사이드바가 생겨 본문이 좁아졌다 — 2026-11-11) */
.caps-host { container-type: inline-size; }
.caps-grid { display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 1.5rem; }
/* 2단 — 표 영역이 1,300px 이상일 때 (2026-11-12 그룹 열을 더해 1,080 → 1,300: 좁으면 하루 건수 칸이 잘려서) */
@container (min-width: 1300px) { .caps-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.caps-grid .form-control { padding-top: 0.1rem; padding-bottom: 0.1rem; min-height: 0; }
.caps-grid td { padding-top: 0.2rem; padding-bottom: 0.2rem; }

/* 표 안의 비율 막대 (한 계열) */
.share { display: flex; align-items: center; gap: 0.5rem; min-width: 120px; }
.share .bar { flex: 1; height: 6px; border-radius: 3px; background: var(--grid); overflow: hidden; }
.share .bar > span { display: block; height: 100%; background: var(--series-1); border-radius: 3px; }
.share .pct { width: 3.6rem; text-align: right; color: var(--text-secondary); font-variant-numeric: tabular-nums; }
/* 한 전체를 나눈 얇은 막대 — 글 없음 (이름 · 수 · 비율은 옆 범례에), 조각 사이 2px 틈, 너비는 flex-grow 로 값에 비례 */
.split { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; }
.split > span { display: block; flex: 0 0 0; min-width: 2px; }
/* 체크박스 여러 개 (나라 · 산업군 고르기) — 칸을 맞춰 늘어놓고 길면 스크롤 */
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0.1rem 1rem;
              max-height: 300px; overflow-y: auto; }
.check-grid .form-check { margin: 0; }
.check-grid .n { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
/* 나라 줄의 GMT 시차 · 현지 시각 (2026-11-11) — 이름 아래 작은 줄 */
.check-grid .tz-clock { display: block; font-size: 0.78rem; line-height: 1.2; color: var(--text-muted);
                        font-variant-numeric: tabular-nums; }
/* 이메일 CSV ① 발송 대상 표 (2026-11-12) — 대상 회사 − 제외 대상 = 발송 대상 − 이미 받은 주소 = 받을 수 있는 주소 */
.preview-table { max-width: 820px; font-size: 0.85rem; }
.preview-table .sign { width: 1.75rem; text-align: center; color: var(--text-muted); font-weight: 700; }
.preview-table tbody th { position: static; background: none; color: var(--text-primary); font-weight: 500;
                          padding: 0.35rem 0.5rem; border-bottom: 1px solid var(--grid); white-space: nowrap; }
.preview-table td.n { min-width: 6rem; }
.preview-table td.note { color: var(--text-muted); font-size: 0.78rem; }
.preview-table tr.sub th { padding-left: 1.5rem; color: var(--text-secondary); font-weight: 400; font-size: 0.8rem; }
.preview-table tr.sub td { color: var(--text-secondary); font-size: 0.8rem; padding-top: 0.2rem; padding-bottom: 0.2rem; }
.preview-table tr.sub th { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.preview-table tr.total th, .preview-table tr.total td.n { font-weight: 700; }
.preview-table tr.total td, .preview-table tr.total th { background: var(--series-1-wash); border-top: 1px solid var(--axis); }
/* 이메일 CSV 나라 — GMT 시차 표 (2026-11-12) — 줄마다 ☐ · GMT · 현지 시각 · 나라 체크박스들 · 고른 · 대상 */
.country-table td { vertical-align: top; }
.country-table .pick { width: 2rem; }
.country-table td.pick .form-check-input { margin: 0.1rem 0 0; }
.country-table td.gmt, .country-table td.local { white-space: nowrap; font-variant-numeric: tabular-nums; }
.country-table td.gmt label { margin: 0; cursor: pointer; }
.country-table td.names { line-height: 1.55; }
.country-table .form-check-inline { margin: 0 1rem 0 0; }
.country-table .cnt { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.country-table .tz-note { margin-left: 0.3rem; font-size: 0.72rem; color: var(--text-muted); }
/* 나라 묶음 (시간대 3시간씩 · 나라별 순위 10개씩 · 지역별) — 묶음마다 접기/펼치기 · 모두 고르기/지우기 */
.country-groups { max-height: 500px; overflow-y: auto; }
.country-group + .country-group { border-top: 1px solid var(--grid); }
.country-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.9rem; padding: 0.35rem 0; }
.country-group-head .count { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.country-group .check-grid { max-height: none; overflow: visible; padding: 0 0 0.5rem 1.35rem; }

.cell-meter { min-width: 92px; }
.cell-meter .top { display: flex; justify-content: space-between; gap: 0.4rem; font-variant-numeric: tabular-nums; }

/* ── 차트 ───────────────────────────────────────────── */
.viz { position: relative; width: 100%; }
.viz svg { display: block; width: 100%; overflow: visible; }
.viz .grid line { stroke: var(--grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz .baseline { stroke: var(--axis); stroke-width: 1; shape-rendering: crispEdges; }
.viz .tick { fill: var(--text-muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.viz .bar { fill: var(--series-1); }
.viz .bar.is-hover { opacity: 0.75; }
.viz .bar.estimate { fill-opacity: 0.4; }   /* 과거 집계 — 처리 시각으로 센 추정 */
.legend-key { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--series-1);
              vertical-align: -1px; margin-right: 0.3rem; }
.legend-key.estimate { opacity: 0.4; }
.legend-item { margin-right: 0.9rem; white-space: nowrap; }
.viz .hit { fill: transparent; cursor: default; }
.viz .hit:focus { outline: none; }
.viz .hit:focus-visible { stroke: var(--text-secondary); stroke-width: 1; }
.viz .line { fill: none; stroke: var(--series-1); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.viz .area { fill: var(--series-1-wash); stroke: none; }
.viz .end-dot { fill: var(--series-1); stroke: var(--surface-1); stroke-width: 2; }
.viz .crosshair { stroke: var(--axis); stroke-width: 1; }
.viz .limit { stroke: var(--axis); stroke-width: 1; }
.viz .limit-label { fill: var(--text-muted); font-size: 10px; }
.viz-empty { color: var(--text-muted); font-size: 0.8rem; padding: 2rem 0; text-align: center; }
.viz-toggle { font-size: 0.75rem; margin-left: auto; color: var(--text-secondary); background: none; border: none; padding: 0; text-decoration: underline; }

.tooltip-box {
  position: fixed; z-index: 1080; pointer-events: none; display: none;
  background: var(--surface-1); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  padding: 0.4rem 0.6rem; font-size: 0.78rem; min-width: 120px;
}
.tooltip-box .tt-value { font-weight: 600; font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.tooltip-box .tt-label { color: var(--text-secondary); }
.tooltip-box .tt-key { display: inline-block; width: 12px; height: 2px; background: var(--series-1); vertical-align: middle; margin-right: 0.35rem; }

/* ── 깔때기 ─────────────────────────────────────────── */
.funnel td.label { white-space: nowrap; }
.funnel td.note { color: var(--text-muted); }

/* ── 이메일 CSV ─────────────────────────────────────── */
/* 단계별 내려받기 (2026-11-11 요청 — 진행 막대 UI): 동그라미를 선으로 잇고 아래에 이름 · 고른 내용.
   끝남 = 초록 ✓, 지금 = 초록 + 바깥 고리, 아직 = 회색 번호, 고칠 것 = 빨간 ! (색만이 아니라 표시 글자도 바뀐다) */
:root { --step-done: #27a356; --step-todo: #99A1B7; }
.stepper { display: flex; list-style: none; margin: 0 0 1.5rem; padding: 0.25rem 0 0; }
.stepper li { flex: 1 1 0; position: relative; min-width: 0; }
.stepper li + li::before {   /* 앞 동그라미 가운데에서 이 동그라미 가운데까지 */
  content: ""; position: absolute; top: calc(0.25rem + 17px); left: -50%; width: 100%; height: 3px;
  background: var(--bs-gray-300); }
.stepper li.reached::before { background: var(--step-done); }
.stepper .step { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 0.3rem;
                 width: 100%; padding: 0 0.25rem; border: 0; background: none; color: inherit; text-align: center; }
.stepper .step:disabled { cursor: default; }
.stepper .step:focus-visible { outline: 2px solid var(--step-done); outline-offset: 2px; border-radius: 6px; }
.stepper .dot { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%;
                background: var(--step-todo); color: #fff; font-weight: 700; font-size: 1rem;
                box-shadow: 0 0 0 4px var(--surface-1); }   /* 선 위에 떠 있게 바깥을 바탕색으로 */
.stepper li.done .dot, .stepper li.current .dot { background: var(--step-done); }
.stepper li.current .dot { box-shadow: 0 0 0 3px var(--surface-1), 0 0 0 5px var(--step-done); }
.stepper li.error .dot { background: var(--critical); }
.stepper .label { font-weight: 600; color: var(--text-secondary); line-height: 1.25; word-break: keep-all; }
.stepper li.current .label { color: var(--text-primary); }
.stepper .sum { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; word-break: keep-all; }
.stepper li.error .sum { color: var(--critical); }
.stepper .step:not(:disabled):hover .label { color: var(--text-primary); text-decoration: underline; }
.step-nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem;
            border-top: 1px solid var(--grid); margin-top: 1.25rem; padding-top: 1rem; }
.step-preview { border-top: 1px dashed var(--axis); padding-top: 0.75rem; }
.step-body > h2:focus { outline: none; }
.step-sub { font-size: 0.95rem; font-weight: 600; margin: 0 0 0.5rem; }   /* ⓪ 시작 안의 최근 다운로드 · 수신거부 */   /* 단계를 옮길 때 화면 읽기용으로 제목에 초점 (tabindex -1, 탭 순서 밖) */
.review-table th { width: 9rem; color: var(--text-secondary); font-weight: 500; position: static; white-space: nowrap; }
.review-table td.fix { width: 1%; white-space: nowrap; text-align: right; }
@media (max-width: 575.98px) {
  .stepper .sum { display: none; }
  .stepper .label { font-size: 0.75rem; }
}
.filter-row { display: flex; flex-wrap: wrap; gap: 0.75rem; align-items: flex-end; }
.filter-row .form-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.2rem; }
.big-number { font-size: 2rem; font-weight: 600; line-height: 1.1; }
/* 판정일 — 시작일 ~ 끝일 · 빠른 선택 (필터 줄에서 바로) */
.filter-row .date-input { width: 9.5rem; }
.filter-row .date-sep { color: var(--text-muted); padding-bottom: 0.3rem; margin: 0 -0.35rem; }
.date-foot { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.25rem 0.75rem; margin-top: 0.6rem;
             font-size: 0.8rem; font-variant-numeric: tabular-nums; }
.date-foot #date-summary { color: var(--text-primary); font-weight: 500; }

/* ── 발송 계획 (/plan · 이메일 CSV ② 의 계획 열, prompts/18 10절, 2026-11-11) ─────────── */
/* 상태 칩 — 색만이 아니라 ●/○/⚠ 표시 글자도 바뀐다 */
.plan-chip { display: inline-block; padding: 0.05rem 0.55rem; border: 1px solid var(--border); border-radius: 999px;
             font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; }
.plan-chip.ok { border-color: var(--good); color: #0a6e0a; }          /* 흰 바탕 대비 5:1 이상 */
.plan-chip.bad { border-color: var(--critical); color: var(--critical); white-space: normal; }
/* 채널 표시 — CSV · API (글이 곧 뜻, 색은 덧붙임) */
.chan { display: inline-block; min-width: 2.6rem; text-align: center; padding: 0 0.35rem; border-radius: 4px;
        font-size: 0.72rem; font-weight: 600; border: 1px solid var(--axis); color: var(--text-secondary); }
.chan.csv { border-color: var(--series-1); color: #1d5ea8; }
.chan.api { border-color: #a14f00; color: #a14f00; }
/* 공급처별 할당량 표 — 날 칸은 오른쪽 맞춤 숫자 입력, 오늘 열은 옅은 파랑 */
/* 주간 · 날 열은 내용만큼만 (2026-11-12 요청 "컬럼들을 최소한으로 줄이기") — 남는 폭은 설명 열로. 칸은 6자리(업체 없음 100,000)까지 */
.plan-table th.weekly, .plan-table td.weekly, .plan-table th.day, .plan-table td.day {
  width: 1%; padding-left: 0.3rem; padding-right: 0.3rem; }
.plan-table th.today, .plan-table td.today { background: var(--series-1-wash); }
.plan-table .plan-input { width: 4.6rem; margin-left: auto; padding: 0.1rem 0.35rem; min-height: 0; }
/* 그 밖 업체 기본(*)을 따르는 값 — 흐린 글 + 점선 테두리 (기울임은 오른쪽 맞춤 칸에서 끝 글자가 잘려 쓰지 않는다) */
.plan-table .plan-input.inherited { color: var(--text-muted); border-style: dashed; border-color: var(--bs-gray-500); }
.plan-table span.inherited { color: var(--text-muted); }
.plan-table td.past { color: var(--text-secondary); }
.plan-table .used { font-size: 0.72rem; color: var(--text-muted); line-height: 1.3; min-height: 0; }
.plan-table .used.over { color: #a14f00; font-weight: 600; white-space: normal; }   /* 긴 경고는 줄을 바꿔 열을 넓히지 않게 */
.plan-table tr.group-row td { background: var(--hover-wash); }
/* 첫 줄 — 날마다 합 (2026-11-12): 굵은 숫자 · 아래 굵은 선으로 업체 줄과 나눈다 */
.plan-table tr.sum-row td { background: var(--hover-wash); font-weight: 600; border-bottom: 2px solid var(--axis); }
.plan-table tr.sum-row td.today { background: var(--series-1-wash); }
.plan-table tr.sum-row .used { font-weight: 400; }
/* ③ 오늘 마지막 줄 — 합 (2026-11-12) */
.data-table tr.today-sum td { background: var(--hover-wash); font-weight: 600; border-top: 2px solid var(--axis); }
/* 설명 — 따로 한 열 (2026-11-12, 그 전에는 이름 아래 흐린 글): 메일 서비스 · 줄의 뜻, 넓어지지 않게 */
.plan-table td.desc { font-size: 0.8rem; color: var(--text-muted); min-width: 9rem; max-width: 20rem; }
.plan-table td.desc .own-rule { color: var(--text-secondary); margin-top: 0.15rem; }
/* 주 사용 나라 — 따로 한 열 (2026-11-12, 그 전에는 이름 옆 배지) */
.plan-table td.home { white-space: nowrap; }
/* 보안 게이트웨이 열 (2026-11-12) — 발송 계획 · 이메일 CSV 공급처별 하루 표 */
/* 공급처별 하루 표의 이름 칸(그룹 다음) — 열이 늘어도 글자 단위로 끊기지 않게 (넘치면 표 안에서 가로로 넘긴다) */
.caps-host .data-table td:nth-child(2), #others .data-table td:nth-child(2) { min-width: 8rem; }
/* 공급처 그룹 (2026-11-12 요청 "첫 컬럼에 추가하고 색상을 주어 구별") — 첫 열 칩 + 줄 왼쪽 색 띠.
   대한민국 노랑(주 사용 나라 배지와 같은 계열) · 러시아 청록 · 호스팅 · 중국 보라 · 대형 파랑 · 보안 게이트웨이 빨강 · 작은 업체 회색 · 일반 초록 */
.tier-chip { display: inline-block; padding: 0.1rem 0.5rem; border-radius: 999px; border: 1px solid transparent;
             font-size: 0.72rem; font-weight: 600; line-height: 1.4; white-space: nowrap; }
.tier-chip.tier-kr { background: #fff3cd; color: #7a5600; border-color: #f0cf6e; }
.tier-chip.tier-ru { background: #cffafe; color: #0e7490; border-color: #7dd3e0; }   /* 러시아 주사용 — 청록 */
.tier-chip.tier-hosting { background: #ede9fe; color: #5b21b6; border-color: #c4b5fd; }   /* 호스팅 · 중국 — 보라 */
.tier-chip.tier-major { background: #dbeafe; color: #1d4ed8; border-color: #a7c4f2; }
.tier-chip.tier-gateway { background: #fde2e1; color: #b42318; border-color: #f2aca6; }
.tier-chip.tier-small { background: #eef0f3; color: #4b5563; border-color: #d3d8de; }
.tier-chip.tier-general { background: #dcfce7; color: #166534; border-color: #9fdcb5; }
tr.tier-row > td:first-child { border-left: 4px solid transparent; }
tr.tier-kr > td:first-child { border-left-color: #f0b400; }
tr.tier-ru > td:first-child { border-left-color: #06b6d4; }
tr.tier-hosting > td:first-child { border-left-color: #8b5cf6; }
tr.tier-major > td:first-child { border-left-color: #3b82f6; }
tr.tier-gateway > td:first-child { border-left-color: #dc3545; }
tr.tier-small > td:first-child { border-left-color: #9ca3af; }
tr.tier-general > td:first-child { border-left-color: #22a35a; }
td.tier { white-space: nowrap; }
/* 그룹별 수량 칸 — 칩 이름 + 숫자 칸 */
/* 그룹별 하루 격자 (2026-11-12 요청 "각 그룹들은 보기 좋게 표시") — 넓은 화면 4열 · 중간 2열 · 좁으면 1열.
   칸마다 왼쪽 그룹 색 띠 · 칩 · 줄 수 / 아래 [수량][적용], 마지막 칸 [모든 그룹 적용] */
.tier-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.5rem 0.75rem; }
@media (max-width: 1199.98px) { .tier-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .tier-grid { grid-template-columns: minmax(0, 1fr); } }
.tier-item { display: flex; flex-direction: column; gap: 0.3rem; margin: 0; padding: 0.4rem 0.55rem;
             border: 1px solid var(--bs-border-color); border-left: 4px solid #9ca3af; border-radius: 0.375rem;
             background: var(--bs-body-bg); }
.tier-item.tier-kr { border-left-color: #f0b400; }
.tier-item.tier-ru { border-left-color: #06b6d4; }
.tier-item.tier-hosting { border-left-color: #8b5cf6; }
.tier-item.tier-major { border-left-color: #3b82f6; }
.tier-item.tier-gateway { border-left-color: #dc3545; }
.tier-item.tier-small { border-left-color: #9ca3af; }
.tier-item.tier-general { border-left-color: #22a35a; }
.tier-item-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; min-width: 0; }
.tier-item-head .tier-chip { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tier-count { font-size: 0.75rem; color: var(--text-muted); white-space: nowrap; }
.tier-item .input-group { flex-wrap: nowrap; }
.tier-item-tail { display: flex; align-items: flex-end; justify-content: flex-end; }
.plan-table td.desc { min-width: 12rem; }
.plan-table td.home .badge { margin-left: 0 !important; }
.plan-table td { padding-top: 0.2rem; padding-bottom: 0.2rem; }
.plan-slots .form-select, .plan-slots .form-control { padding-top: 0.1rem; padding-bottom: 0.1rem; min-height: 0; }
/* 이메일 CSV ② 공급처별 하루 — 계획 열 (계획 하루 · 지금 열린 CSV 몫) */
.caps-grid .plan-open { display: block; font-size: 0.72rem; color: var(--text-muted); }
.plan-line { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; padding: 0.45rem 0.75rem;
             border-left: 3px solid var(--series-1); background: var(--series-1-wash); border-radius: 4px; font-size: 0.85rem; }
.plan-line.bad { border-left-color: var(--critical); background: #fdf1f1; }
.plan-line.none { border-left-color: var(--axis); background: var(--hover-wash); }
/* 이메일 CSV ② 발송 계획 — 일자별 계획 표 (2026-11-12): 고른 날은 옅은 파랑, 고를 수 없는 날은 흐리게 */
.plan-days-table { max-width: 860px; font-size: 0.85rem; }
.plan-days-table .pick { width: 2rem; text-align: center; }
.plan-days-table label { cursor: pointer; font-weight: 500; }
.plan-days-table tr.picked td { background: var(--series-1-wash); }
.plan-days-table tr.picked td:first-child { box-shadow: inset 3px 0 0 var(--series-1); }
.plan-days-table tr.off td { color: var(--text-muted); }
.plan-days-table tr.off label { cursor: default; font-weight: 400; }
.plan-days-table td.n { min-width: 5.5rem; }

/* ── 로그인 · 단추 (tflow-admin static/css/style.css 와 같다) ─────────── */
.login-card { max-width: 500px; margin-left: auto; margin-right: auto; }
.btn.btn-outline:not(.btn-outline-dashed) { border: 1px solid var(--bs-gray-300); }
.btn.btn-text-gray-700 { color: var(--bs-text-gray-700); }
.btn.btn-flex { display: inline-flex; align-items: center; }
.flex-center { justify-content: center; align-items: center; }
.bg-state-light { cursor: pointer; }
.bg-state-light:hover { background: var(--bs-gray-100); }

/* 발송 리포트 (prompts/20 4절) — 경고 칸: 빨강 = ▲ 와 같이, 노랑은 짙은 주황(흰 바탕 대비). 색만으로 뜻을 전하지 않는다 */
.rate-red { color: var(--critical); font-weight: 600; }
.rate-yellow { color: #a14f00; font-weight: 600; }
.rate-pct { color: var(--text-muted); font-weight: 400; font-size: 0.75rem; }
.rate-red .rate-pct, .rate-yellow .rate-pct { color: inherit; }

/* 좁은 화면: 표는 칸 안에서만 가로로 밀리고, 화면 전체가 옆으로 밀리지 않게 */
.panel, .col { min-width: 0; }
@media (max-width: 575.98px) {
  .share { min-width: 64px; }
  .share .pct { width: 2.8rem; }
  .stage-lines dd { overflow-wrap: anywhere; }
  main.container-fluid.p-4 { padding: 1rem !important; }
}

@media (forced-colors: active) {
  .meter > span, .share .bar > span, .viz .bar { forced-color-adjust: none; background: Highlight; fill: Highlight; }
  .split > span, .legend-key { forced-color-adjust: none; }   /* 업체 비율은 색이 곧 구분 — 범례 글이 같이 있다 */
}
