/* 팀 대시보드 › 고객사. 이름·상태 → 미종료 업무 → 최근 등록 흐름. */
.customer-overview-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.customer-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.customer-filter-chip b {
  color: var(--muted);
  font-weight: 600;
}

.customer-filter-chip[aria-pressed="true"] {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  background: var(--blue-soft);
  color: var(--blue);
}

.customer-filter-chip[aria-pressed="true"] b {
  color: inherit;
  opacity: 0.75;
}

.customer-filter-chip:focus-visible,
.customer-card-main:focus-visible,
.customer-reset:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.customer-overview-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.customer-overview-search {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--control-radius);
  background: var(--surface);
  color: var(--muted);
}

.customer-overview-search:focus-within {
  border-color: var(--blue);
  box-shadow: var(--focus-ring);
}

.customer-overview-search input {
  width: 160px;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.customer-overview-body {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.customer-overview-result,
.customer-overview-result > p {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.customer-overview-result {
  justify-content: space-between;
  min-height: 32px;
}

.customer-overview-result p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.customer-overview-result strong {
  color: var(--text);
  font-weight: 600;
}

.customer-reset {
  min-height: 32px;
  padding: 6px 10px;
  border: 0;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.customer-overview-empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 40px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  text-align: center;
}

.customer-overview-empty > svg {
  color: var(--muted);
}

.customer-overview-empty h3 {
  margin: 0;
  font-size: 17px;
}

.customer-overview-empty p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.customer-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
  gap: 16px;
}

.customer-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  background: var(--surface);
}

.customer-card-main {
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
}

button.customer-card-main {
  cursor: pointer;
}

button.customer-card-main:hover {
  background: color-mix(in srgb, var(--blue) 3%, var(--surface));
}

.customer-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.customer-card-name {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
}

.customer-card-name strong {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.customer-card-name small {
  color: var(--muted);
  font-size: 12px;
}

.customer-card-arrow {
  display: flex;
  flex-shrink: 0;
  color: var(--muted);
}

.customer-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}

.customer-card-chip {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.customer-card-chip.is-spike {
  background: color-mix(in srgb, var(--warning) 12%, var(--surface));
  color: var(--warning-strong);
}

.customer-card-chip.is-overdue {
  background: color-mix(in srgb, var(--danger) 12%, var(--surface));
  color: #c21f2f;
}

.customer-card-chip.is-calm {
  background: var(--surface-alt);
  color: var(--muted);
}

body.theme-dark .customer-card-chip.is-overdue { color: #ff8a94; }

.customer-card-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: end;
  gap: 12px;
}

.customer-card-stats > span {
  display: grid;
  gap: 6px;
}

.customer-card-stats small {
  color: var(--muted);
  font-size: 12px;
}

.customer-card-stats strong {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.customer-card-stats-primary strong {
  font-size: 28px;
  letter-spacing: -.5px;
}

.customer-card-stats strong.is-aging {
  color: var(--warning-strong);
}

.customer-card-stats em {
  margin-left: 2px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 500;
}

.customer-card-chart {
  margin: auto 20px 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.customer-card-fallback,
.customer-card-no-trend {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

@media (max-width: 680px) {
  .customer-overview-controls { padding: 14px; }
  .customer-overview-tools { flex: 1 1 100%; }
  .customer-overview-search { flex: 1 1 140px; min-width: 0; }
  .customer-overview-search input { width: 100%; }
  .customer-card-grid { grid-template-columns: minmax(0, 1fr); }
}

/* 고객사 순위 목록(공수·화면번호 탭)의 이름 앞 로고. 이름 칸을 로고만큼 넓힌다. */
.customer-ranked-list.has-marks li {
  grid-template-columns: minmax(0, 176px) minmax(0, 1fr) auto;
}

.customer-ranked-list.has-marks :is(.effort-ranked-name, .customer-ranked-name) {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.customer-ranked-list.has-marks :is(.effort-ranked-name, .customer-ranked-name) > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 고객사 카드: 종료 비율 원, 미종료 요약, 단계 점. 기한 지난 곳은 위에 빨간 선. */
.customer-overview-headline { margin:0 0 12px; color:var(--text); font-size:15px; font-weight:600; line-height:1.6; }
.customer-cards { display:grid; grid-template-columns:repeat(auto-fill,minmax(320px,1fr)); gap:16px; }
.customer-card { display:flex; flex-direction:column; gap:16px; min-width:0; padding:20px 22px 6px; border-radius:16px; background:var(--surface); box-shadow:0 0 0 1px var(--line); }
.customer-card.is-late { box-shadow:0 0 0 1px var(--line),inset 0 3px 0 var(--danger); }
.customer-card > header { display:flex; align-items:center; gap:12px; min-width:0; }
.customer-card > header > div { display:flex; flex-direction:column; min-width:0; }
.customer-card h3 { margin:0; font-size:16px; font-weight:700; }
.customer-card > header > div > span { color:var(--muted); font-size:12px; }
.customer-card > header .customer-card-chip { margin-left:auto; }
.customer-card-body { display:flex; align-items:center; gap:20px; }
.customer-card-rate { flex:none; display:grid; justify-items:center; gap:6px; margin:0; }
.customer-card-rate figcaption { color:var(--muted); font-size:13px; line-height:1.5; text-align:center; }
.customer-card-rate figcaption span { display:block; color:var(--text-soft); }
.customer-current-stages > p { margin:0 0 12px; color:var(--muted); font-size:13px; }
.customer-donut { flex:none; width:88px; height:88px; }
.customer-donut circle { fill:none; stroke:color-mix(in srgb,var(--muted) 14%,var(--surface)); stroke-width:9; }
.customer-donut .customer-donut-value { stroke:var(--donut); stroke-linecap:round; }
.customer-donut.is-high { --donut:var(--success); }
.customer-donut.is-mid { --donut:var(--blue); }
.customer-donut.is-low { --donut:var(--warning-strong); }
.customer-donut text { fill:var(--text); font-size:17px; font-weight:700; text-anchor:middle; }
.customer-donut .customer-donut-label { fill:var(--muted); font-size:12px; font-weight:400; }
.customer-card dl { flex:1; display:grid; gap:6px; margin:0; min-width:0; }
.customer-card dl > div { display:flex; justify-content:space-between; gap:8px; font-size:13px; }
.customer-card dt { color:var(--muted); }
.customer-card dd { margin:0; font-weight:600; }
.customer-card dd em { color:var(--danger); font-style:normal; }
.customer-card dd.is-late { color:var(--danger); }
.customer-card dd.is-today { color:var(--warning-strong); }
.customer-card dd.is-soon { color:var(--blue); }
.customer-card dd.is-none { color:var(--muted); font-weight:400; }
.customer-stages { display:grid; grid-template-columns:repeat(3,1fr); margin:0; padding:0; list-style:none; }
.customer-stage { position:relative; display:flex; flex-direction:column; align-items:center; gap:4px; color:var(--text-soft); font-size:12px; white-space:nowrap; }
.customer-stage + .customer-stage::before { content:""; position:absolute; top:15px; right:50%; width:100%; height:2px; background:var(--line); }
.customer-stage b { position:relative; z-index:1; display:flex; align-items:center; justify-content:center; width:32px; height:32px; border-radius:50%; font-size:13px; background:color-mix(in srgb,var(--stage) 14%,var(--surface)); color:var(--stage); }
.customer-stage.is-empty b { background:color-mix(in srgb,var(--muted) 10%,var(--surface)); color:var(--muted); }
.customer-stage.is-heavy b { background:var(--stage); color:#fff; box-shadow:0 0 0 4px color-mix(in srgb,var(--stage) 18%,var(--surface)); }
.customer-stage.stage-review { --stage:var(--muted); }
.customer-stage.stage-progress { --stage:var(--blue); }
.customer-stage.stage-validation { --stage:var(--purple); }
.customer-stage.stage-done { --stage:var(--success); }
.customer-card > footer { display:flex; align-items:center; justify-content:space-between; gap:8px; padding-top:6px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }
.customer-card-open { display:inline-flex; align-items:center; gap:2px; min-height:44px; padding:0; border:0; background:transparent; color:var(--blue); font:inherit; font-size:13px; font-weight:600; cursor:pointer; }
.customer-card-open:focus-visible { outline:2px solid var(--blue); outline-offset:2px; border-radius:4px; }

.customer-overview-tools .customer-layout-toggle { margin-bottom: 0; }
