/* ===============================
   고객관리 (CRM) 페이지
   PC/모바일 공통 UI
   =============================== */

/* -------- 전체 컨테이너 --------
   PC(901px+): is-customer-open 시 전체화면 — layout.css에서 처리
   모바일: 풀스크린 오버레이
   -------- */
.customer-page {
  --customer-accent: var(--ds-accent, #2563eb);
  --customer-accent-soft: rgba(37, 99, 235, 0.1);
  --customer-border: #e2e8f0;
  --customer-surface: #f8fafc;
  --customer-text: #0f172a;
  --customer-muted: #94a3b8;
  display: none;
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 7000;
  background: #f1f5f9;
  box-shadow: none;
  flex-direction: column;
  overflow: hidden;
}

.customer-page.open {
  display: flex;
  position: absolute;
}

/* -------- 고객 수정/신규 패널 (별도 페이지) -------- */
.customer-form-panel {
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #f1f5f9;
}

.customer-form-panel.is-open {
  display: flex;
}

.customer-form-panel__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  min-height: 44px;
}

.customer-form-panel__back {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #333;
  font-size: 16px;
  cursor: pointer;
}

.customer-form-panel__back:hover {
  background: #f0f0f0;
}

.customer-form-panel__title {
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

/* -------- 고객 상세 패널 (뷰모드 전용, PC: 우측 탭, 모바일: 풀스크린) -------- */
.customer-detail-panel {
  display: none;
  flex-direction: column;
  overflow: hidden;
  background: #f1f5f9;
}

.customer-detail-panel.is-open {
  display: flex;
}

.customer-detail-panel__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid #e5e5e5;
  min-height: 44px;
}

.customer-detail-panel__back {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #333;
  font-size: 16px;
  cursor: pointer;
}

.customer-detail-panel__back:hover {
  background: #f0f0f0;
}

.customer-detail-panel__title {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.customer-detail-panel__edit {
  flex-shrink: 0;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: transparent;
  border: 1px solid #2b6cff;
  border-radius: 6px;
  cursor: pointer;
}

.customer-detail-panel__edit:hover {
  background: rgba(43, 108, 255, 0.08);
}

/* 모바일: 상세/폼 패널 풀스크린 */
@media (max-width: 900px) {
  .customer-detail-panel.is-open,
  .customer-form-panel.is-open {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 7100;
    width: 100%;
    height: 100%;
  }
  .customer-detail-panel.is-open .customer-detail-view {
    flex: 1;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
    /* 모바일에서도 상세 헤더부터 전체 스크롤 */
    overflow-y: auto;
  }
  .customer-form-panel.is-open .customer-form-view {
    flex: 1;
    min-height: 0;
    display: flex !important;
    flex-direction: column;
    overflow: hidden;
  }
  /* 취소/저장 아래 비치는 영역 제거 (safe-area + 고객목록 비침 방지) */
  .customer-form-panel.is-open .customer-form__actions {
    padding-bottom: max(12px, env(safe-area-inset-bottom, 0));
  }
}


/* -------- 상단 헤더 (공통: components/page-header.css) -------- */
.customer-header__title-wrap {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-header__title-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.customer-header__info {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.customer-header__info-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.customer-header__info-btn:hover,
.customer-header__info-btn:focus-visible {
  border-color: var(--customer-accent, #2563eb);
  color: var(--customer-accent, #2563eb);
  background: var(--customer-accent-soft, rgba(37, 99, 235, 0.1));
  outline: none;
}

.customer-header__crm-meta {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  z-index: 30;
  width: max-content;
  max-width: min(340px, 74vw);
  padding: 6px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.96);
  font-size: 11px;
  font-weight: 500;
  color: #64748b;
  line-height: 1.35;
  margin: 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.1);
  transform: translate(-3px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.customer-header__crm-meta::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  background: rgba(248, 250, 252, 0.96);
  transform: translateY(-50%) rotate(45deg);
}

.customer-header__info:hover .customer-header__crm-meta,
.customer-header__info:focus-within .customer-header__crm-meta,
.customer-header__info.is-visible .customer-header__crm-meta {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

.customer-list-toolbar {
  flex-shrink: 0;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #fff;
  border-bottom: 1px solid var(--customer-border, #e2e8f0);
}

.customer-list-toolbar--has-teams {
  display: flex;
}

.customer-list-toolbar--visible {
  display: flex;
}

.customer-list-toolbar__field--search {
  flex: 0 1 auto;
  min-width: 0;
}

.customer-list-toolbar__actions {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

.customer-list-toolbar__actions .customer-mobile-calendar-btn,
.customer-list-toolbar__actions .customer-mobile-today-btn,
.customer-list-toolbar__actions .customer-add-btn {
  flex: 0 0 auto;
  height: 32px;
  margin-left: 0;
}

.customer-list-toolbar .customer-view-mode-tabs {
  margin-left: auto;
}

.customer-list-toolbar__search {
  flex: 1;
  min-width: 120px;
  max-width: 320px;
  height: 34px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 10px;
  border: 1px solid var(--customer-border, #e2e8f0);
  background: var(--customer-surface, #f8fafc);
  color: var(--customer-text, #0f172a);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.customer-list-toolbar__search:hover {
  border-color: #cbd5e1;
  background: #fff;
}

.customer-list-toolbar__search:focus {
  outline: none;
  border-color: var(--customer-accent, #2563eb);
  background: #fff;
  box-shadow: 0 0 0 3px var(--customer-accent-soft, rgba(37, 99, 235, 0.1));
}

/* 자동완성 감지 후 정리용 (JS animationstart) */
@keyframes customerListSearchAutofillStart {
  from { opacity: 1; }
  to { opacity: 1; }
}

.customer-list-toolbar__search:-webkit-autofill {
  animation-name: customerListSearchAutofillStart;
}

.customer-view-mode-tabs {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f1f5f9;
  box-shadow: inset 0 1px 1px rgba(15, 23, 42, 0.04);
}

.customer-view-mode-tabs[hidden] {
  display: none !important;
}

.customer-view-mode-tabs__btn {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  height: 28px;
  padding: 0 10px;
  border: none;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.customer-view-mode-tabs__icon {
  display: inline-flex;
  flex-shrink: 0;
  opacity: 0.85;
}

.customer-view-mode-tabs__icon svg {
  display: block;
}

.customer-view-mode-tabs__text {
  line-height: 1;
}

.customer-view-mode-tabs__btn:hover {
  color: var(--customer-accent, #2563eb);
  background: rgba(255, 255, 255, 0.55);
}

.customer-view-mode-tabs__btn.active {
  background: #fff;
  color: var(--customer-accent, #2563eb);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.customer-view-mode-tabs__btn.active .customer-view-mode-tabs__icon {
  opacity: 1;
}

.customer-search-results__head {
  flex: 1 1 100%;
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  padding: 2px 4px 6px;
}

.customer-search-results__cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0;
  width: 100%;
}

.customer-card--search-result {
  width: 100%;
  box-sizing: border-box;
}

.customer-card--search-result .customer-card__date {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
}

.customer-card--search-result .customer-card__actions {
  display: none;
}

/* 고밀도 고객 디렉토리 목록 (목록보기·검색·카테고리) — 셸 */
.customer-category-collection--directory {
  gap: 0;
}

.customer-category-collection__dir {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-dir-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
}

.customer-dir-list__head {
  display: none;
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid #e5e7eb;
  background: #f8fafc;
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  letter-spacing: -0.01em;
}

.customer-dir-list__body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

@media (min-width: 901px) {
  .customer-dir-list__head {
    display: grid;
    grid-template-columns: 28px 148px minmax(140px, 1.1fr) minmax(160px, 1.6fr) 108px;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 1;
  }

  .customer-dir-list__h-star {
    width: 28px;
  }

  .customer-dir-list__h-meta {
    text-align: right;
  }
}

@media (max-width: 900px) {
  .customer-dir-list {
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
}

.customer-list-toolbar__field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #4b5563;
}

.customer-list-toolbar__label {
  flex-shrink: 0;
}

.customer-list-toolbar__select {
  min-width: 120px;
  max-width: 55vw;
  height: 34px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 10px;
  border: 1px solid var(--customer-border, #e2e8f0);
  background: #fff;
  color: #334155;
}

.customer-card__crm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.customer-card__tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.customer-card__tags > span {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-crm-chip {
  display: inline-block;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  line-height: 1.3;
  font-weight: 600;
}

.customer-card__tags .customer-crm-chip,
.customer-card__tags .customer-card__type-badge,
.customer-card__tags .customer-card__badge {
  font-size: 9px;
  padding: 0 3px;
  border-radius: 3px;
  line-height: 1.35;
  font-weight: 600;
}

.customer-crm-chip--team {
  background: #e0e7ff;
  color: #3730a3;
}

.customer-crm-chip--owner {
  background: #ecfdf5;
  color: #047857;
}

.customer-crm-chip--vis {
  background: #f3f4f6;
  color: #4b5563;
}

.customer-detail__crm-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 14px 8px;
}

.customer-detail__crm-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.customer-detail__assignee-edit-btn {
  flex-shrink: 0;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: transparent;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.customer-detail__assignee-edit-btn:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
}

.customer-form__group--assignee {
  margin-top: 4px;
}

.customer-form__assignee-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customer-form__assignee-display {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.4;
}

.customer-form__assignee-btn {
  flex-shrink: 0;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}

.customer-form__assignee-btn:hover {
  background: #f3f4f6;
}

.customer-assignee-form__group {
  margin-bottom: 14px;
}

.customer-assignee-form__group:last-of-type {
  margin-bottom: 8px;
}

.customer-assignee-form__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.customer-assignee-form__hint {
  margin: 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.customer-form__crm-tier-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.customer-form__crm-tier-btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-form__crm-tier-btn:hover {
  background: #f8fafc;
  border-color: #94a3b8;
}

.customer-form__crm-tier-btn.is-active {
  background: #eff6ff;
  border-color: #2563eb;
  color: #1d4ed8;
}

.customer-form__group--crm-tier .customer-form__label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}

.customer-form__group--crm-tier .customer-form__label-row .customer-form__label {
  margin-bottom: 0;
}

.customer-form__crm-tier-info {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
}

.customer-form__crm-tier-info-btn {
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 999px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  cursor: help;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.customer-form__crm-tier-info-btn:hover,
.customer-form__crm-tier-info-btn:focus-visible {
  border-color: var(--customer-accent, #2563eb);
  color: var(--customer-accent, #2563eb);
  background: var(--customer-accent-soft, rgba(37, 99, 235, 0.1));
  outline: none;
}

.customer-form__crm-tier-hint {
  position: absolute;
  left: calc(100% + 8px);
  top: 50%;
  z-index: 40;
  width: max-content;
  max-width: min(320px, 78vw);
  padding: 8px 10px;
  border: 1px solid rgba(226, 232, 240, 0.75);
  border-radius: 8px;
  /* 요소 opacity와 별개로 배경만 반투명 — 아래 공유 버튼이 비침 */
  background: rgba(255, 255, 255, 0.55);
  font-size: 11px;
  font-weight: 500;
  color: #475569;
  line-height: 1.45;
  margin: 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translate(-3px, -50%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.customer-form__crm-tier-hint::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-left: 1px solid rgba(226, 232, 240, 0.75);
  border-bottom: 1px solid rgba(226, 232, 240, 0.75);
  background: rgba(255, 255, 255, 0.55);
  transform: translateY(-50%) rotate(45deg);
}

.customer-form__crm-tier-info:hover .customer-form__crm-tier-hint,
.customer-form__crm-tier-info:focus-within .customer-form__crm-tier-hint,
.customer-form__crm-tier-info.is-visible .customer-form__crm-tier-hint {
  opacity: 1;
  transform: translate(0, -50%);
  pointer-events: auto;
}

@media (max-width: 900px) {
  /* 모바일: ! 가 왼쪽이라 우측 팝업은 화면 밖 → 라벨 행 아래 전체 폭으로 */
  .customer-form__group--crm-tier .customer-form__label-row {
    position: relative;
  }

  .customer-form__crm-tier-info {
    position: static;
  }

  .customer-form__crm-tier-hint {
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    width: auto;
    max-width: none;
    transform: translate(0, -4px);
    box-sizing: border-box;
  }

  .customer-form__crm-tier-hint::before {
    left: 52px;
    right: auto;
    top: -4px;
    transform: rotate(135deg);
  }

  .customer-form__crm-tier-info:hover .customer-form__crm-tier-hint,
  .customer-form__crm-tier-info:focus-within .customer-form__crm-tier-hint,
  .customer-form__crm-tier-info.is-visible .customer-form__crm-tier-hint {
    transform: translate(0, 0);
  }
}

.customer-form__fee-split {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #e2e8f0;
}

.customer-form__fee-split-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  margin-bottom: 6px;
}

.customer-form__fee-split-bar {
  width: 100%;
}

.customer-form__fee-split-bar .feeSplitBar {
  min-height: 44px;
}

.customer-form__fee-split-bar .feeSplitBar__seg--origin {
  background: #eff6ff;
}

.customer-form__fee-split-bar .feeSplitBar__seg--closer {
  background: #ecfdf5;
}

.customer-form__fee-split-hint {
  margin: 6px 0 0;
  font-size: 11px;
  color: #64748b;
  line-height: 1.4;
}

.customer-crm-toast {
  position: fixed;
  left: 50%;
  bottom: max(24px, env(safe-area-inset-bottom, 0));
  transform: translateX(-50%) translateY(120%);
  z-index: 7100;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #111;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0;
  pointer-events: none;
}

.customer-crm-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.customer-detail__edit-phone {
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.customer-detail__edit-phone:hover {
  background: #f3f3f3;
}

/* -------- 메인 컨텐츠 영역 -------- */
.customer-main {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 고객 상세 열릴 때: 달력 숨겨서 하단 내역이 넓게 보이도록, 전체 스크롤 */
.customer-main.customer-main--detail-open .customer-calendar-wrap {
  display: none;
}

.customer-main.customer-main--detail-open .customer-detail-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  /* 고객 메인 내 상세 뷰에서도 헤더~하단까지 전체 스크롤 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-main.customer-main--detail-open .customer-detail__body {
  flex: 0 0 auto;
  min-height: 200px;
  overflow: visible;
}

/* -------- 일정 달력 (최상단 단독, Material/Android 스타일) -------- */
.customer-calendar-wrap {
  flex-shrink: 0;
  width: 100%;
  padding: 8px 12px;
  background: var(--customer-calendar-bg, #f1f5f9);
  border-bottom: 1px solid var(--customer-border, #e2e8f0);
}

.customer-calendar__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding: 0 2px;
}

.customer-calendar__nav {
  width: 26px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--customer-calendar-on-surface, #1c1b1f);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
  outline: none;
}

.customer-calendar__nav:hover {
  background: rgba(0, 0, 0, 0.08);
}

.customer-calendar__nav:active {
  background: rgba(0, 0, 0, 0.12);
}

.customer-calendar__title {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: var(--customer-calendar-on-surface, #1c1b1f);
}

.customer-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: 14px repeat(6, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  max-width: 260px;
  height: 130px;
  margin: 0 auto;
  font-size: 10px;
  font-weight: 500;
  background: var(--customer-calendar-surface, #fff);
  border-radius: 20px;
  padding: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  overflow: hidden;
}

.customer-calendar__weekday {
  text-align: center;
  color: var(--customer-calendar-on-surface-variant, #49454f);
  font-size: 9px;
  font-weight: 500;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.customer-calendar__day {
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  background: transparent;
  color: var(--customer-calendar-on-surface, #1c1b1f);
  transition: background 0.15s ease, color 0.15s ease;
  outline: none;
  font-size: inherit;
  max-height: 100%;
}

.customer-calendar__day:hover {
  background: rgba(0, 0, 0, 0.08);
}

.customer-calendar__day:active {
  background: rgba(0, 0, 0, 0.12);
}

.customer-calendar__day.other-month {
  color: var(--customer-calendar-outline-variant, #cac4d0);
}

.customer-calendar__day.is-visible-week:not(.today) {
  background: #e5e7eb;
  border-radius: 0;
}

.customer-calendar__day.is-visible-week.is-week-start:not(.today) {
  border-radius: 999px 0 0 999px;
}

.customer-calendar__day.is-visible-week.is-week-end:not(.today) {
  border-radius: 0 999px 999px 0;
}

.customer-calendar__day.is-visible-week:not(.today):hover {
  background: #d1d5db;
}

.customer-calendar__day.today {
  background: var(--customer-calendar-primary, #2563eb);
  color: var(--customer-calendar-on-primary, #fff);
  font-weight: 600;
}

.customer-calendar__day.today:hover {
  background: var(--customer-calendar-primary-hover, #1a5ae6);
  color: var(--customer-calendar-on-primary, #fff);
}

.customer-calendar__day.has-schedule {
  position: relative;
}

.customer-calendar__day.has-schedule::after {
  content: "";
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--customer-calendar-primary, #2563eb);
}

.customer-calendar__day.has-schedule.today::after {
  background: rgba(255, 255, 255, 0.9);
}

.customer-calendar__day.has-schedule.other-month::after {
  background: var(--customer-calendar-outline-variant, #cac4d0);
}

/* -------- 고객 목록 뷰 -------- */
.customer-list-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* 카테고리 패널 (재생목록 스타일) */
.customer-categories-panel {
  position: relative;
  z-index: 3;
  flex-shrink: 0;
  width: 180px;
  min-width: 160px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--customer-border, #e2e8f0);
  overflow: visible;
}

.customer-categories-panel__handle {
  position: absolute;
  top: 50%;
  right: -18px;
  z-index: 6;
  width: 18px;
  height: 64px;
  margin: 0;
  padding: 0;
  transform: translateY(-50%);
  border: 1px solid var(--customer-border, #e2e8f0);
  border-left: none;
  border-radius: 0 10px 10px 0;
  background: #fff;
  box-shadow: 2px 0 10px rgba(15, 23, 42, 0.06);
  color: #64748b;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
  /* 보이는 탭은 유지, 터치/클릭만 확대 (~44×112) */
  touch-action: manipulation;
}

.customer-categories-panel__handle::before {
  content: "";
  position: absolute;
  top: -24px;
  bottom: -24px;
  left: -16px;
  right: -14px;
}

.customer-categories-panel__handle:hover {
  background: #f8fafc;
  color: #0f172a;
}

.customer-categories-panel__handle::after {
  content: "‹";
  position: relative;
  z-index: 1;
}

.customer-categories-panel__handle[aria-expanded="false"]::after {
  content: "›";
}

@media (min-width: 901px) {
  .customer-categories-panel.is-collapsed {
    width: 0;
    min-width: 0;
    border-right: none;
  }

  .customer-categories-panel.is-collapsed > :not(.customer-categories-panel__handle) {
    visibility: hidden;
    pointer-events: none;
  }

  .customer-categories-panel.is-collapsed .customer-categories-panel__handle {
    right: auto;
    left: 0;
    border: 1px solid #eee;
    border-left: none;
  }
}

.customer-categories-panel__header {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid var(--customer-border, #e2e8f0);
  min-width: 0;
  background: linear-gradient(180deg, #fff 0%, #fafbfc 100%);
}

.customer-categories-panel__title {
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.customer-categories-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 4px 6px;
  min-width: 0;
  flex: 1 1 auto;
  margin-left: auto;
}

.customer-categories-panel__bulk-add {
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.customer-categories-panel__bulk-add:hover {
  background: rgba(43, 108, 255, 0.1);
}

.customer-categories-panel__bulk-add.hidden {
  display: none;
}

.customer-categories-panel__new {
  padding: 3px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: transparent;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}

.customer-categories-panel__new:hover {
  background: rgba(43, 108, 255, 0.1);
}

.customer-category-create {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
  background: #f9f9f9;
}

.customer-category-create.hidden {
  display: none;
}

.customer-category-create__input {
  flex: 1 1 100%;
  min-width: 0;
  width: 100%;
  padding: 6px 10px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}

.customer-category-create__save {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: #2b6cff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.customer-category-create__save:hover {
  background: #1a5ae6;
}

.customer-category-create__cancel {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  background: transparent;
  border: 1px solid #ddd;
  border-radius: 6px;
  cursor: pointer;
}

.customer-category-create__cancel:hover {
  background: #f0f0f0;
  color: #333;
}

.customer-categories-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  -webkit-overflow-scrolling: touch;
}

.customer-category-owner-sep {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 8px 4px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: -0.02em;
  line-height: 1.2;
  user-select: none;
  pointer-events: none;
}

.customer-category-owner-sep::before,
.customer-category-owner-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

.customer-category-owner-sep span {
  flex-shrink: 0;
  max-width: 70%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-category-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  font-size: 12px;
  color: #334155;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}

.customer-category-item:hover {
  background: #f1f5f9;
}

.customer-category-item.is-active {
  background: var(--customer-accent-soft, rgba(37, 99, 235, 0.1));
  color: var(--customer-accent, #2563eb);
  font-weight: 700;
}

.customer-category-item--all {
  margin-bottom: 6px;
  padding-bottom: 8px;
  box-shadow: inset 0 -1px 0 #e5e7eb;
}

.customer-category-item--all .customer-category-item__name {
  font-weight: 700;
}

.customer-category-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-category-item__count {
  flex-shrink: 0;
  font-size: 10px;
  color: #888;
  margin-left: 4px;
}

.customer-category-item--folder {
  cursor: pointer;
}

.customer-category-item--folder:hover {
  background: #f5f8ff;
}

.customer-category-item.is-active .customer-category-item__count {
  color: rgba(43, 108, 255, 0.9);
}

.customer-category-item__controls {
  display: none;
}

.customer-category-item__edit,
.customer-category-item__edit-save,
.customer-category-item__edit-cancel,
.customer-category-item__delete {
  display: none;
}

.customer-category-item__edit {
  background: #f5f5f5;
  color: #555;
}

.customer-category-item__edit:hover {
  background: #e9ecff;
  color: #2b6cff;
}

.customer-category-item__edit-save {
  background: #2b6cff;
  color: #fff;
}

.customer-category-item__edit-save:hover {
  background: #1f54d4;
}

.customer-category-item__edit-cancel {
  background: #f5f5f5;
  color: #777;
}

.customer-category-item__edit-cancel:hover {
  background: #eee;
}

.customer-category-item__delete {
  padding: 0 5px;
  color: #bbb;
  font-size: 12px;
}

.customer-category-item__delete:hover {
  background: #fee;
  color: #c00;
}

.customer-category-item__input {
  display: none;
}

.customer-categories-panel__manage {
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: var(--customer-accent, #2563eb);
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-categories-panel__manage:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.customer-categories-panel__filter {
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-categories-panel__filter:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--customer-accent, #2563eb);
}

.customer-mobile-crm-filter {
  display: none;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  background: #fff;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-mobile-crm-filter:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--customer-accent, #2563eb);
}

.customer-header .customer-mobile-crm-filter {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  height: 32px;
  padding: 0 11px;
  font-size: 12px;
  border-radius: 10px;
  white-space: nowrap;
}

select.customer-account-switch {
  appearance: none;
  -webkit-appearance: none;
  max-width: 9.5rem;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  background-size: 12px;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: #475569;
  line-height: 1.2;
}

select.customer-account-switch:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 1px;
}

select.customer-account-switch[hidden],
.customer-account-switch-btn[hidden] {
  display: none !important;
}

.customer-categories-panel__filter.customer-account-switch {
  height: auto;
  min-height: 28px;
  max-width: 11rem;
  padding: 4px 1.5rem 4px 10px;
  font-size: 0.82rem;
}

/* 모바일 헤더: select 숨기고 짧은 버튼만 */
.customer-header #customerAccountSwitchMobile {
  display: none !important;
}

.customer-header .customer-account-switch-btn {
  display: none;
  flex: 0 0 auto;
  min-width: 0;
  max-width: 3.4rem;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-account-switch-sheet {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.customer-account-switch-sheet__item {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 12px;
  background: #fff;
  color: #0f172a;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.customer-account-switch-sheet__item:hover,
.customer-account-switch-sheet__item:focus-visible {
  background: #f8fafc;
  border-color: #bfdbfe;
}

.customer-account-switch-sheet__item.is-active {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1d4ed8;
}

.customer-account-switch-sheet__sep {
  margin: 6px 2px 2px;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.customer-account-switch-modal__panel {
  max-width: 420px;
}

@media (max-width: 900px) {
  .customer-header .customer-account-switch-btn:not([hidden]) {
    display: inline-flex;
  }

  .customer-account-switch-modal__panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    max-width: none;
    width: 100%;
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: min(70vh, 480px);
  }
}

/* customer-page(7000) 형제로 두었을 때 반드시 그 위에 보이도록 */
.customer-admin-account-modal__panel {
  max-width: 420px;
}

.customer-admin-account-btn,
.admin-account-scope-btn {
  white-space: nowrap;
}

.customer-categories-panel__filter.customer-admin-account-btn,
.customer-categories-panel__filter.admin-account-scope-btn {
  font-size: 0.82rem;
}

.customer-crm-filter-modal {
  position: fixed;
  inset: 0;
  z-index: 7300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.customer-crm-filter-modal.hidden {
  display: none;
}

.customer-crm-filter-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.customer-crm-filter-modal__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.customer-crm-filter-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
}

.customer-crm-filter-modal__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
}

.customer-crm-filter-modal__close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  color: #6b7280;
}

.customer-crm-filter-modal__close:hover {
  background: #f3f4f6;
}

.customer-crm-filter-modal__body {
  padding: 12px 14px;
  overflow-y: auto;
  font-size: 13px;
}

.customer-crm-filter-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.customer-crm-filter-option:last-child {
  border-bottom: none;
}

.customer-crm-filter-option__hit {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}

.customer-crm-filter-option__hit input {
  margin-top: 3px;
  flex-shrink: 0;
}

.customer-crm-filter-option__text {
  flex: 1;
  min-width: 0;
}

.customer-crm-filter-option__label {
  font-weight: 600;
  color: #111;
}

.customer-crm-filter-option__hint {
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
}

.customer-crm-filter-option--with-select {
  align-items: center;
}

.customer-crm-filter-option__select {
  flex: 0 1 148px;
  width: 148px;
  max-width: 42%;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #374151;
  align-self: center;
}

.customer-crm-filter-option__select.is-active-scope {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.15);
}

.customer-crm-filter-sub {
  margin: 6px 0 0 22px;
}

.customer-crm-filter-sub select {
  width: 100%;
  max-width: 100%;
  padding: 6px 8px;
  font-size: 13px;
  border-radius: 6px;
  border: 1px solid #d1d5db;
}

.customer-crm-filter-modal__footer {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding: 10px 14px 12px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.customer-crm-filter-modal__btn {
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #fff;
  cursor: pointer;
}

.customer-crm-filter-modal__btn--primary {
  background: #2b6cff;
  border-color: #2b6cff;
  color: #fff;
  font-weight: 600;
}

.customer-crm-filter-modal__btn--primary:hover {
  background: #1a5ae6;
}

/* 고객 전체 페이지(7000)·모바일 카테고리 드로어 위에 표시 — map-wrap 직계 형제 */
.customer-category-manage-modal {
  position: fixed;
  inset: 0;
  z-index: 7300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.customer-category-manage-modal.hidden {
  display: none;
}

.customer-category-manage-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.customer-category-manage-modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.customer-category-manage-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-bottom: 1px solid #eee;
}

.customer-category-manage-modal__title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.customer-category-manage-modal__close {
  border: none;
  background: transparent;
  font-size: 18px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-category-manage-modal__close:hover {
  background: rgba(0, 0, 0, 0.06);
}

.customer-category-manage-modal__body {
  padding: 10px 14px 14px;
  overflow-y: auto;
}

.customer-category-manage__new-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.customer-category-manage__input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #ddd;
  font-size: 12px;
  box-sizing: border-box;
}

.customer-category-manage__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-category-manage-item {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.customer-category-tree-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  color: #374151;
  text-align: left;
}

.customer-category-tree-btn:hover {
  background: #f3f4ff;
  border-color: #e5e7eb;
}

.customer-category-tree-btn.is-selected {
  background: #eef2ff;
  border-color: #4f46e5;
  box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.4);
}

.customer-category-tree-btn.is-drag-over {
  background: #e5f3ff;
  border-color: #38bdf8;
}

.customer-category-manage-item.is-insert-above::before,
.customer-category-manage-item.is-insert-below::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  height: 2px;
  background: #38bdf8;
  border-radius: 999px;
}

.customer-category-manage-item.is-insert-above::before {
  top: -1px;
}

.customer-category-manage-item.is-insert-below::after {
  bottom: -1px;
}

.customer-category-tree-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-category-tree-count {
  flex-shrink: 0;
  font-size: 10px;
  color: #9ca3af;
}

.customer-category-manage__order {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.customer-category-manage__move {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
}

.customer-category-manage__move:hover {
  background: rgba(148, 163, 184, 0.15);
  color: #4b5563;
}

.customer-category-manage__count {
  font-size: 11px;
  color: #999;
}

.customer-category-manage__btn {
  flex-shrink: 0;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  cursor: pointer;
  background: #f9fafb;
  color: #374151;
}

.customer-category-manage__btn--primary {
  background: #2b6cff;
  border-color: #2b6cff;
  color: #fff;
}

.customer-category-manage__btn--primary:hover {
  background: #1a5ae6;
  border-color: #1a5ae6;
}

.customer-category-manage__btn--danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.customer-category-manage__btn--danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

.customer-category-manage__footer {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #eef0f4;
  display: flex;
  justify-content: flex-end;
}

.customer-category-manage__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.customer-category-manage__toolbar-left,
.customer-category-manage__toolbar-right {
  display: flex;
  gap: 6px;
  align-items: center;
}

.customer-category-manage__parent {
  min-width: 120px;
  max-width: 160px;
  padding: 4px 6px;
  font-size: 11px;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
}

.customer-category-manage__parent:focus {
  outline: none;
  border-color: #2b6cff;
  box-shadow: 0 0 0 1px rgba(43, 108, 255, 0.3);
}

.customer-list-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* -------- 일정 보기(날짜별) 모달 -------- */
.customer-schedule-day-modal {
  position: fixed;
  inset: 0;
  z-index: 3095;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.customer-schedule-day-modal.hidden {
  display: none;
}

.customer-schedule-day-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.customer-schedule-day-modal__panel {
  position: relative;
  width: 100%;
  max-width: 380px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.customer-schedule-day-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.customer-schedule-day-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.customer-schedule-day-modal__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  color: #666;
  cursor: pointer;
}

.customer-schedule-day-modal__close:hover {
  background: #f0f0f0;
}

.customer-schedule-day-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  min-height: 60px;
}

.customer-schedule-day-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  border: 1px solid #eee;
  padding: 14px 16px;
  margin-bottom: 12px;
}

.customer-schedule-day-card:last-child {
  margin-bottom: 0;
}

.customer-schedule-day-card__body {
  margin-bottom: 10px;
}

.customer-schedule-day-card__body:last-child {
  margin-bottom: 0;
}

.customer-schedule-day-card__actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  padding-top: 10px;
  border-top: 1px solid #f0f0f0;
}

.customer-schedule-day-card__btn {
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  background: #f0f0f0;
  color: #333;
}

.customer-schedule-day-card__btn:hover {
  background: #e5e5e5;
}

.customer-schedule-day-card__btn--edit {
  background: #2b6cff;
  color: #fff;
}

.customer-schedule-day-card__btn--edit:hover {
  background: #1a5ae6;
}

.customer-schedule-day-card__btn--delete {
  background: #fff;
  color: #c00;
  border: 1px solid #fcc;
}

.customer-schedule-day-card__btn--delete:hover {
  background: #fee;
}

.customer-schedule-day-empty {
  margin: 0;
  color: #888;
  font-size: 14px;
  text-align: center;
  padding: 12px 0;
}

.customer-schedule-day-row {
  margin-bottom: 14px;
}

.customer-schedule-day-row:last-child {
  margin-bottom: 0;
}

.customer-schedule-day-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  margin-bottom: 4px;
}

.customer-schedule-day-value {
  margin: 0;
  font-size: 14px;
  color: #333;
  white-space: pre-wrap;
  word-break: break-word;
}

.customer-schedule-day-list {
  margin: 0;
  padding-left: 18px;
}

.customer-schedule-day-list li {
  margin-bottom: 4px;
  font-size: 14px;
  color: #333;
}

.customer-schedule-day-tag {
  display: inline-block;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: rgba(43, 108, 255, 0.1);
  border-radius: 4px;
  margin-right: 6px;
}

.customer-schedule-day-modal__footer {
  flex-shrink: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
}

.customer-schedule-day-modal__btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  background: #f0f0f0;
  color: #333;
}

.customer-schedule-day-modal__btn:hover {
  background: #e5e5e5;
}

.customer-schedule-day-modal__btn--primary {
  background: #2b6cff;
  color: #fff;
}

.customer-schedule-day-modal__btn--primary:hover {
  background: #1a5ae6;
}

.customer-schedule-day-modal__btn--danger {
  background: #fff;
  color: #c00;
  border: 1px solid #fcc;
}

.customer-schedule-day-modal__btn--danger:hover {
  background: #fee;
}

.customer-schedule-day-modal__delete.hidden {
  display: none !important;
}

/* -------- 일정 편집 모달 -------- */
.customer-schedule-modal {
  position: fixed;
  inset: 0;
  z-index: 3100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.customer-schedule-modal.hidden {
  display: none;
}

.customer-schedule-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.customer-schedule-modal__panel {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.customer-schedule-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.customer-schedule-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.customer-schedule-modal__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  color: #666;
  cursor: pointer;
}

.customer-schedule-modal__close:hover {
  background: #f0f0f0;
}

.customer-schedule-modal__body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.customer-schedule-form__group {
  margin-bottom: 14px;
}

.customer-schedule-form__group:last-child {
  margin-bottom: 0;
}

.customer-schedule-form__label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  margin-bottom: 6px;
}

.customer-schedule-form__memo,
.customer-schedule-form__input {
  width: 100%;
  padding: 8px 10px;
  font-size: 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-sizing: border-box;
}

.customer-schedule-form__memo {
  resize: vertical;
  min-height: 60px;
}

.customer-schedule-customers {
  min-height: 36px;
  margin-bottom: 8px;
}

.customer-schedule-customer-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  margin-bottom: 4px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 13px;
}

.customer-schedule-customer-item__label {
  flex-shrink: 0;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: rgba(43, 108, 255, 0.1);
  border-radius: 4px;
}

.customer-schedule-customer-item__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-schedule-customer-item__remove {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #888;
  font-size: 16px;
  cursor: pointer;
}

.customer-schedule-customer-item__remove:hover {
  background: #fee;
  color: #c00;
}

.customer-schedule-add-wrap {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.customer-schedule-add-select {
  flex: 1;
  min-width: 100px;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.customer-schedule-add-label {
  width: 90px;
  padding: 6px 8px;
  font-size: 13px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.customer-schedule-add-btn {
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #2b6cff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.customer-schedule-add-btn:hover {
  background: #1a5ae6;
}

.customer-schedule-modal__footer {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #f9f9f9;
}

.customer-schedule-modal__delete {
  padding: 6px 10px;
  font-size: 12px;
  color: #c00;
  background: transparent;
  border: 1px solid #fcc;
  border-radius: 6px;
  cursor: pointer;
}

.customer-schedule-modal__delete:hover {
  background: #fee;
}

.customer-schedule-modal__actions {
  display: flex;
  gap: 8px;
}

.customer-schedule-modal__cancel,
.customer-schedule-modal__save {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.customer-schedule-modal__cancel {
  background: #fff;
  border: 1px solid #ddd;
  color: #555;
}

.customer-schedule-modal__save {
  background: #2b6cff;
  border: none;
  color: #fff;
}

.customer-schedule-modal__save:hover {
  background: #1a5ae6;
}

/* -------- 카테고리 고객 일괄 추가 모달 (고객상세패널 위에 표시) -------- */
.customer-bulk-add-modal {
  position: fixed;
  inset: 0;
  z-index: 7200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.customer-bulk-add-modal.hidden {
  display: none;
}

.customer-bulk-add-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.customer-bulk-add-modal__panel {
  position: relative;
  width: 100%;
  max-width: 360px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.customer-bulk-add-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #eee;
}

.customer-bulk-add-modal__title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #111;
}

.customer-bulk-add-modal__close {
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 20px;
  color: #666;
  cursor: pointer;
}

.customer-bulk-add-modal__close:hover {
  background: #f0f0f0;
}

.customer-bulk-add-modal__toolbar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #f9f9f9;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.customer-bulk-add-modal__check-all {
  cursor: pointer;
  font-weight: 500;
}

.customer-bulk-add-modal__count {
  color: #666;
  font-size: 12px;
}

.customer-bulk-add-modal__list {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
  max-height: 280px;
}

.customer-bulk-add-modal__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
}

.customer-bulk-add-modal__item:hover {
  background: #f5f5f5;
}

.customer-bulk-add-modal__item input {
  flex-shrink: 0;
}

.customer-bulk-add-modal__item span {
  flex: 1;
  min-width: 0;
}

.customer-bulk-add-modal__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
}

.customer-bulk-add-modal__cancel,
.customer-bulk-add-modal__submit {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
}

.customer-bulk-add-modal__cancel {
  background: #fff;
  border: 1px solid #ddd;
  color: #555;
}

.customer-bulk-add-modal__submit {
  background: #2b6cff;
  border: none;
  color: #fff;
}

.customer-bulk-add-modal__submit:hover {
  background: #1a5ae6;
}

/* -------- 연락기록 추가 모달 (연락이력 전용) -------- */
.customer-add-log-modal {
  position: fixed;
  inset: 0;
  /* 모바일에서 고객 상세 패널(7100) 위에 오도록 충분히 높게 설정 */
  z-index: 7200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.customer-add-log-modal.hidden {
  display: none;
}

.customer-add-log-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.customer-add-log-modal__panel {
  position: relative;
  width: 100%;
  max-width: 340px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.customer-add-log-modal__header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-bottom: 1px solid #eee;
}

.customer-add-log-modal__title {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  color: #111;
}

.customer-add-log-modal__close {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 18px;
  color: #666;
  cursor: pointer;
}

.customer-add-log-modal__close:hover {
  background: #f0f0f0;
}

.customer-add-log-modal__body {
  padding: 10px 12px;
}

.customer-add-log-form__group {
  margin-bottom: 10px;
}

.customer-add-log-form__group:last-child {
  margin-bottom: 0;
}

.customer-add-log-form__label {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: #444;
  margin-bottom: 4px;
}

.customer-add-log-form__input,
.customer-add-log-form__textarea {
  width: 100%;
  padding: 6px 8px;
  font-size: 11px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
}

.customer-add-log-form__textarea {
  min-height: 80px;
  resize: vertical;
}

.customer-add-log-form__asset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.customer-add-log-form__asset-select {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 11px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.customer-add-log-form__asset-add {
  flex-shrink: 0;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: transparent;
  border: 1px solid rgba(43, 108, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
}

.customer-add-log-form__asset-add:hover {
  background: rgba(43, 108, 255, 0.1);
}

.customer-add-log-form__group--search {
  margin-top: 4px;
}

.customer-add-log-form__group--search .customer-add-log-form__asset-tags {
  margin-bottom: 8px;
}

.customer-add-log-form__search-row {
  display: flex;
  gap: 6px;
  margin-bottom: 6px;
}

.customer-add-log-form__search-input {
  flex: 1;
  min-width: 0;
  padding: 6px 8px;
  font-size: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.customer-add-log-form__search-btn {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: #2b6cff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

.customer-add-log-form__search-btn:hover {
  background: #1a5ae6;
}

.customer-add-log-form__search-results {
  min-height: 0;
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 6px;
  background: #fafafa;
}

.customer-add-log-form__search-results.has-results {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.customer-add-log-form__search-results .mini-card {
  cursor: pointer;
  margin: 0;
}

.customer-add-log-form__search-results .mini-card:hover {
  background: rgba(43, 108, 255, 0.06);
}

.customer-add-log-form__search-empty {
  margin: 0;
  padding: 12px;
  font-size: 12px;
  color: #666;
  text-align: center;
}

.customer-add-log-form__asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
  min-height: 0;
}

.customer-add-log-form__asset-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 10px;
  background: rgba(43, 108, 255, 0.12);
  color: #2b6cff;
  border-radius: 4px;
}

.customer-add-log-form__asset-tag-remove {
  padding: 0;
  width: 14px;
  height: 14px;
  border: none;
  background: transparent;
  color: #666;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  border-radius: 2px;
}

.customer-add-log-form__asset-tag-remove:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #333;
}

.customer-add-log-modal__footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  padding: 8px 12px;
  border-top: 1px solid #eee;
}

.customer-add-log-modal__cancel,
.customer-add-log-modal__submit {
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.customer-add-log-modal__cancel {
  background: #fff;
  border: 1px solid #ddd;
  color: #555;
}

.customer-add-log-modal__submit {
  background: #2b6cff;
  border: none;
  color: #fff;
}

.customer-add-log-modal__submit:hover {
  background: #1a5ae6;
}

.customer-add-btn-wrap {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  padding: 0;
  background: transparent;
  border-bottom: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* 헤더 쪽은 모바일 계정/필터만 — 전부 hidden이면 자리 차지하지 않음 */
.customer-add-btn-wrap--header:not(:has(:not([hidden]))) {
  display: none;
}

.customer-categories-panel .customer-calendar-wrap {
  display: none;
}

.customer-mobile-calendar-btn {
  display: inline-flex;
  flex-shrink: 0;
  width: auto;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-mobile-calendar-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--customer-accent, #2563eb);
}

.customer-mobile-calendar-btn.is-hidden {
  display: none !important;
}

.customer-mobile-today-btn {
  display: inline-flex;
  flex-shrink: 0;
  width: auto;
  height: 32px;
  padding: 0 11px;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.customer-mobile-today-btn:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--customer-accent, #2563eb);
}

.customer-mobile-today-btn.is-hidden {
  display: none !important;
}

.customer-header .customer-mobile-crm-filter,
.customer-header .customer-admin-account-btn,
.customer-header .admin-account-scope-btn {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 11px;
  margin-left: 0;
  border-radius: 10px;
  font-size: 12px;
  white-space: nowrap;
}

.customer-list-toolbar__actions .customer-mobile-calendar-btn {
  display: inline-flex;
}

.customer-list-toolbar__actions .customer-mobile-today-btn {
  display: inline-flex;
}

.customer-mobile-calendar-modal {
  position: fixed;
  inset: 0;
  z-index: 7200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.customer-mobile-calendar-modal.hidden {
  display: none;
}

.customer-mobile-calendar-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.42);
}

.customer-mobile-calendar-modal__panel {
  position: relative;
  width: min(360px, 100%);
  padding: 14px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.22);
}

.customer-mobile-calendar-modal__header {
  display: grid;
  grid-template-columns: 32px 1fr 32px 32px;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
}

.customer-mobile-calendar-modal__title-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.customer-mobile-calendar-modal__title-wrap .customer-calendar__title {
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.customer-mobile-calendar-modal__close {
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.customer-mobile-calendar-modal__close:hover {
  background: #f0f0f0;
}

.customer-mobile-calendar-modal__today {
  height: 24px;
  padding: 0 8px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.customer-mobile-calendar-modal__today:hover {
  background: #f3f4f6;
}

.customer-mobile-calendar {
  max-width: none;
  height: 230px;
  box-shadow: none;
  border: 1px solid #eee;
  border-radius: 14px;
}

.customer-mobile-calendar .customer-calendar__day.today {
  border-radius: 0;
}

.customer-mobile-calendar .customer-calendar__day.today.is-sunday,
.customer-mobile-calendar .customer-calendar__day.today.is-week-start {
  border-radius: 999px 0 0 999px;
}

.customer-mobile-calendar .customer-calendar__day.today.is-saturday,
.customer-mobile-calendar .customer-calendar__day.today.is-week-end {
  border-radius: 0 999px 999px 0;
}

/* 카테고리 드로어 백드롭 (모바일에서 패널 열릴 때만 표시) */
.customer-categories-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 3009;
  background: rgba(0, 0, 0, 0.35);
}

.customer-categories-backdrop.hidden {
  display: none !important;
}

.customer-add-btn {
  flex-shrink: 0;
  width: auto;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--customer-accent, #2563eb);
  border-radius: 10px;
  background: var(--customer-accent, #2563eb);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.25);
  transition: background 0.15s, border-color 0.15s, transform 0.12s, box-shadow 0.15s;
}

.customer-add-btn:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

.customer-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px 20px;
  -webkit-overflow-scrolling: touch;
}

/* -------- 주간 연락 보드 (PC 전용) -------- */
.customer-week-view {
  display: none;
}

@keyframes customer-week-slide-in-next {
  from {
    transform: translate3d(40px, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes customer-week-slide-in-prev {
  from {
    transform: translate3d(-40px, 0, 0);
  }
  to {
    transform: translate3d(0, 0, 0);
  }
}

@keyframes customer-week-item-rise {
  from {
    opacity: 0;
    transform: translate3d(0, 14px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.customer-week-nav {
  flex-shrink: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid var(--customer-border, #e2e8f0);
}

.customer-week-nav__btn {
  flex-shrink: 0;
  align-self: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--customer-border, #e2e8f0);
  border-radius: 10px;
  background: #fff;
  color: #334155;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.customer-week-nav__btn:hover {
  border-color: #bfdbfe;
  color: var(--customer-accent, #2563eb);
  background: #eff6ff;
}

.customer-week-nav__days {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(100px, 1fr));
  gap: 6px;
}

.customer-week-nav__day {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 4px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid transparent;
  font: inherit;
  appearance: none;
  transition: box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.customer-week-nav__day:hover {
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
  background: #fff;
}

.customer-week-nav__day.is-today {
  background: rgba(37, 99, 235, 0.16);
  border-color: #1d4ed8;
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.customer-week-nav__day.is-saturday {
  background: #eff6ff;
  border-color: #dbeafe;
}

.customer-week-nav__day.is-sunday {
  background: #fff1f2;
  border-color: #ffe4e6;
}

.customer-week-nav__day.is-tuesday,
.customer-week-nav__day.is-thursday {
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.customer-week-nav__label {
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.2;
  white-space: nowrap;
  letter-spacing: -0.02em;
}

.customer-week-nav__day.is-today .customer-week-nav__label {
  color: #1e40af;
  font-weight: 800;
}

.customer-week-nav__count {
  display: none;
}

.customer-week-board-shell {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.customer-week-board {
  flex: 1;
  min-height: 0;
  padding: 12px;
  overflow: hidden;
  background-color: #f1f5f9;
}

.customer-week-board--full {
  display: block;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 8px 12px 12px;
  background-image: none;
  background-color: #f1f5f9;
}

.customer-week-board--full .customer-search-results__cards,
.customer-week-board--full .customer-category-collection,
.customer-week-board--full > .customer-empty,
.customer-week-board--full > .customer-week-carousel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.customer-week-view--full-board .customer-week-nav {
  display: none;
}

.customer-week-nav:not(:has(.customer-week-nav__day)) {
  display: none;
}

.customer-week-view--slide-next .customer-week-nav__days,
.customer-week-view--slide-next .customer-week-board {
  animation: customer-week-slide-in-next 0.26s cubic-bezier(0.33, 1, 0.68, 1) both;
  will-change: transform;
}

.customer-week-view--slide-prev .customer-week-nav__days,
.customer-week-view--slide-prev .customer-week-board {
  animation: customer-week-slide-in-prev 0.26s cubic-bezier(0.33, 1, 0.68, 1) both;
  will-change: transform;
}

@media (min-width: 901px) {
  .customer-week-view--slide-next .customer-week-nav__days,
  .customer-week-view--slide-prev .customer-week-nav__days {
    animation: none !important;
  }

  .customer-week-view--slide-next .customer-week-column-shell,
  .customer-week-view--slide-prev .customer-week-column-shell {
    animation: none !important;
  }
}

.customer-week-view--slide-next .customer-week-column-shell,
.customer-week-view--slide-prev .customer-week-column-shell,
.customer-week-view--slide-next .customer-mobile-week-section,
.customer-week-view--slide-prev .customer-mobile-week-section {
  animation: customer-week-item-rise 0.26s ease-out both;
  will-change: transform, opacity;
}

.customer-week-view--slide-next .customer-week-column-shell:nth-child(2),
.customer-week-view--slide-prev .customer-week-column-shell:nth-child(2),
.customer-week-view--slide-next .customer-mobile-week-section:nth-child(2),
.customer-week-view--slide-prev .customer-mobile-week-section:nth-child(2) {
  animation-delay: 0.025s;
}

.customer-week-view--slide-next .customer-week-column-shell:nth-child(3),
.customer-week-view--slide-prev .customer-week-column-shell:nth-child(3),
.customer-week-view--slide-next .customer-mobile-week-section:nth-child(3),
.customer-week-view--slide-prev .customer-mobile-week-section:nth-child(3) {
  animation-delay: 0.05s;
}

.customer-week-view--slide-next .customer-week-column-shell:nth-child(4),
.customer-week-view--slide-prev .customer-week-column-shell:nth-child(4),
.customer-week-view--slide-next .customer-mobile-week-section:nth-child(4),
.customer-week-view--slide-prev .customer-mobile-week-section:nth-child(4) {
  animation-delay: 0.075s;
}

.customer-week-view--slide-next .customer-week-column-shell:nth-child(5),
.customer-week-view--slide-prev .customer-week-column-shell:nth-child(5),
.customer-week-view--slide-next .customer-mobile-week-section:nth-child(5),
.customer-week-view--slide-prev .customer-mobile-week-section:nth-child(5) {
  animation-delay: 0.1s;
}

.customer-week-view--slide-next .customer-week-column-shell:nth-child(6),
.customer-week-view--slide-prev .customer-week-column-shell:nth-child(6),
.customer-week-view--slide-next .customer-mobile-week-section:nth-child(6),
.customer-week-view--slide-prev .customer-mobile-week-section:nth-child(6) {
  animation-delay: 0.125s;
}

.customer-week-view--slide-next .customer-week-column-shell:nth-child(7),
.customer-week-view--slide-prev .customer-week-column-shell:nth-child(7),
.customer-week-view--slide-next .customer-mobile-week-section:nth-child(7),
.customer-week-view--slide-prev .customer-mobile-week-section:nth-child(7) {
  animation-delay: 0.15s;
}

@media (prefers-reduced-motion: reduce) {
  .customer-week-view--slide-next .customer-week-nav__days,
  .customer-week-view--slide-next .customer-week-board,
  .customer-week-view--slide-prev .customer-week-nav__days,
  .customer-week-view--slide-prev .customer-week-board,
  .customer-week-view--slide-next .customer-week-column-shell,
  .customer-week-view--slide-prev .customer-week-column-shell,
  .customer-week-view--slide-next .customer-mobile-week-section,
  .customer-week-view--slide-prev .customer-mobile-week-section {
    animation: none;
  }
}

.customer-week-column__empty {
  padding: 18px 8px;
  font-size: 12px;
  color: #94a3b8;
  text-align: center;
  line-height: 1.45;
  letter-spacing: -0.01em;
}

.customer-category-collection {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-category-collection__title {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 2px 4px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #111;
}

.customer-category-collection__count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #888;
}

.customer-category-collection__date-groups {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-category-date-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.customer-category-date-section__title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 2px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
}

.customer-category-date-section__count {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: #888;
}

.customer-category-date-section__cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  align-items: start;
  grid-auto-rows: max-content;
  gap: 8px;
}

.customer-category-date-section__cards .customer-card {
  align-self: start;
}

/* PC 모드: 고객관리 전체화면 + 주간 연락 보드 */
@media (min-width: 901px) {
  /*
   * PC: 고객관리 헤더는 왼쪽 열만, 오른쪽(툴바+주간보드)은 맨 위부터 사용
   * → 전체폭 헤더 1행을 없애 주간보드 세로를 한 행 더 확보
   */
  body.is-customer-open .map-wrap .customer-page.open,
  .customer-page.open {
    display: grid !important;
    grid-template-columns: 200px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas:
      "cheader ctoolbar"
      "ccats   cboard";
    align-content: stretch;
  }

  body.is-customer-open .map-wrap .customer-page.open:has(.customer-categories-panel.is-collapsed),
  .customer-page.open:has(.customer-categories-panel.is-collapsed) {
    grid-template-columns: 0 minmax(0, 1fr);
  }

  body.is-customer-open .map-wrap .customer-page.open:has(.customer-detail-panel.is-open),
  body.is-customer-open .map-wrap .customer-page.open:has(.customer-form-panel.is-open),
  .customer-page.open:has(.customer-detail-panel.is-open),
  .customer-page.open:has(.customer-form-panel.is-open) {
    /* 고객관리 | 고객등록/상세 | 주간보드 */
    grid-template-columns: 200px 400px minmax(0, 1fr);
    grid-template-areas:
      "cheader cside ctoolbar"
      "ccats   cside cboard";
  }

  body.is-customer-open .map-wrap .customer-page.open:has(.customer-categories-panel.is-collapsed):has(.customer-detail-panel.is-open),
  body.is-customer-open .map-wrap .customer-page.open:has(.customer-categories-panel.is-collapsed):has(.customer-form-panel.is-open),
  .customer-page.open:has(.customer-categories-panel.is-collapsed):has(.customer-detail-panel.is-open),
  .customer-page.open:has(.customer-categories-panel.is-collapsed):has(.customer-form-panel.is-open) {
    grid-template-columns: 0 400px minmax(0, 1fr);
    grid-template-areas:
      "cheader cside ctoolbar"
      "ccats   cside cboard";
  }

  .customer-page.open > .customer-crm-toast {
    position: absolute;
    z-index: 20;
  }

  .customer-page.open > .customer-header {
    grid-area: cheader;
    box-sizing: border-box;
    min-width: 0;
    min-height: 44px;
    height: 44px;
    padding-top: 6px;
    padding-bottom: 6px;
    border-right: 1px solid var(--customer-border, #e2e8f0);
  }

  .customer-page.open > .customer-main,
  .customer-page.open .customer-list-view,
  .customer-page.open .customer-list-area {
    display: contents;
  }

  .customer-page.open .customer-categories-panel {
    grid-area: ccats;
    width: auto !important;
    min-width: 0 !important;
    max-width: none;
    /* 토글 핸들이 고객등록/상세 패널(z-index 1001) 위에 유지 */
    z-index: 1002;
    overflow: visible;
  }

  .customer-page.open .customer-categories-panel__handle {
    z-index: 1003;
  }

  .customer-page.open .customer-list-toolbar {
    grid-area: ctoolbar;
    min-width: 0;
    padding-top: 6px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--customer-border, #e2e8f0);
  }

  .customer-page.open .customer-week-view,
  .customer-page.open .customer-list {
    grid-area: cboard;
    min-width: 0;
    min-height: 0;
  }

  .customer-page.open .customer-categories-backdrop {
    display: none !important;
  }

  .customer-page.open .customer-detail-panel.is-open,
  .customer-page.open .customer-form-panel.is-open {
    grid-area: cside;
    min-height: 0;
    z-index: 1001;
  }

  /* 고객등록/상세 헤더 = 좌(고객관리)·우(검색 툴바)와 높이·배경·하단선 맞춤 */
  .customer-page.open .customer-form-panel.is-open .customer-form-panel__header,
  .customer-page.open .customer-detail-panel.is-open .customer-detail-panel__header {
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    padding: 6px 14px;
    gap: 8px;
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset;
  }

  .customer-page.open .customer-form-panel.is-open .customer-form-panel__back,
  .customer-page.open .customer-detail-panel.is-open .customer-detail-panel__back {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #0f172a;
  }

  .customer-page.open .customer-form-panel.is-open .customer-form-panel__back:hover,
  .customer-page.open .customer-detail-panel.is-open .customer-detail-panel__back:hover {
    background: #f1f5f9;
    color: #2563eb;
  }

  .customer-page.open .customer-form-panel.is-open .customer-form-panel__title,
  .customer-page.open .customer-detail-panel.is-open .customer-detail-panel__title {
    margin: 0;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.25;
    color: #0f172a;
    letter-spacing: -0.03em;
  }

  .customer-page.open .customer-list-toolbar {
    box-sizing: border-box;
    min-height: 44px;
    height: 44px;
    align-items: center;
  }

  .customer-add-btn-wrap--header {
    flex: 0 0 auto;
  }

  .customer-list-toolbar__field--search {
    flex: 0 1 240px;
  }

  .customer-list-toolbar__search {
    max-width: none;
    width: 100%;
  }

  .customer-page.open .customer-week-view:not([hidden]) {
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .customer-week-view:not([hidden]) {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .customer-week-view:not(.customer-week-view--full-board) .customer-week-nav,
  .customer-week-view:not(.customer-week-view--full-board) .customer-week-board {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .customer-week-view:not(.customer-week-view--full-board) .customer-week-nav__days,
  .customer-week-view:not(.customer-week-view--full-board) .customer-week-board {
    min-width: min(100%, calc(7 * 100px + 6 * 8px));
  }

  .customer-week-board:not(.customer-week-board--full) {
    display: grid;
    grid-template-columns: repeat(7, minmax(100px, 1fr));
    gap: 8px;
    background-image: none;
  }

  .customer-week-board.customer-week-board--carousel {
    display: block;
    overflow: hidden;
    grid-template-columns: unset;
    background-image: none;
  }

  .customer-week-board.customer-week-board--carousel.is-week-swiping {
    overflow: hidden;
  }

  .customer-week-board--carousel .customer-week-carousel {
    --week-carousel-gap: 10px;
    overflow: hidden;
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .customer-week-board--carousel .customer-week-carousel__track {
    display: flex;
    width: 100%;
    gap: var(--week-carousel-gap);
    will-change: transform;
    align-items: stretch;
    height: 100%;
    min-height: 0;
  }

  .customer-week-board--carousel .customer-week-carousel__pane {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
    height: 100%;
    min-height: 0;
  }

  .customer-week-board__pane-body {
    display: grid;
    grid-template-columns: repeat(7, minmax(100px, 1fr));
    grid-template-rows: minmax(0, 1fr);
    gap: 8px;
    height: 100%;
    min-height: 0;
    overflow: hidden;
    background-image: none;
  }

  .customer-week-board.customer-week-board--full {
    display: block;
    background-image: none;
    background-color: #f1f5f9;
  }

  .customer-week-column-shell {
    --week-scroll-fade: #ffffff;
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  }

  .customer-week-column-shell::before,
  .customer-week-column-shell::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 36px;
    pointer-events: none;
    opacity: 0;
    z-index: 2;
  }

  .customer-week-column-shell::before {
    top: 0;
    background: linear-gradient(
      to bottom,
      var(--week-scroll-fade) 0%,
      var(--week-scroll-fade) 12%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .customer-week-column-shell::after {
    bottom: 0;
    background: linear-gradient(
      to top,
      var(--week-scroll-fade) 0%,
      var(--week-scroll-fade) 12%,
      rgba(255, 255, 255, 0) 100%
    );
  }

  .customer-week-column-shell.can-scroll-up::before,
  .customer-week-column-shell.can-scroll-down::after {
    opacity: 1;
  }

  .customer-week-column {
    position: relative;
    min-width: 0;
    min-height: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 8px 6px 12px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  /* 카드는 줄이지 않고 원래 높이 유지 → 넘치면 열 스크롤 */
  .customer-week-column > .customer-card,
  .customer-week-column > .customer-week-column__empty {
    flex: 0 0 auto;
    flex-shrink: 0;
    min-height: auto;
  }

  .customer-week-column::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .customer-week-column-shell:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    transform: translateY(-1px);
  }

  .customer-week-column-shell.is-saturday {
    --week-scroll-fade: #f8fbff;
    background: #f8fbff;
    border-color: #dbeafe;
  }

  .customer-week-column-shell.is-sunday {
    --week-scroll-fade: #fff8f8;
    background: #fff8f8;
    border-color: #ffe4e6;
  }

  .customer-week-column-shell.is-tuesday,
  .customer-week-column-shell.is-thursday {
    --week-scroll-fade: #f8fafc;
    background: #f8fafc;
    border-color: #e2e8f0;
  }

  .customer-week-column-shell.is-today {
    --week-scroll-fade: #dbeafe;
    outline: none;
    border-color: #3b82f6;
    background: #dbeafe;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35);
  }

  .customer-week-column-shell.is-today:hover {
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.35), 0 8px 24px rgba(15, 23, 42, 0.08);
  }

  .customer-list-area > .customer-list {
    display: none;
  }

  .customer-week-nav {
    padding: 10px 12px;
  }

  .customer-week-nav__btn {
    display: none;
  }

  .customer-week-nav__days {
    gap: 8px;
  }

  .customer-card--week-column {
    gap: 4px;
    padding: 8px;
    min-width: 0;
    overflow: hidden;
    max-width: 100%;
    flex: 0 0 auto;
    flex-shrink: 0;
  }

  .customer-card--week-column .customer-card__top {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: nowrap;
  }

  .customer-card--week-column .customer-card__star {
    width: 20px;
    height: 20px;
    font-size: 14px;
    flex-shrink: 0;
  }

  .customer-card--week-column .customer-card__type-chip {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 36%;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 9px;
    padding: 2px 5px;
  }

  .customer-card--week-column .customer-card__log-badge {
    flex: 0 1 auto;
    flex-shrink: 1;
    min-width: 0;
    max-width: 48%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 9px;
    padding: 2px 5px;
  }

  .customer-card--week-column .customer-card__phone {
    font-size: 12px;
    white-space: normal;
    word-break: break-all;
  }

  .customer-card--week-column .customer-card__summary {
    font-size: 10px;
    -webkit-line-clamp: 3;
  }

  .customer-card--week-column .customer-card__date,
  .customer-card--week-column .customer-card__actions,
  .customer-card--week-column .customer-card__tags {
    display: none;
  }

  body.is-customer-detail-open .customer-card--week-column .customer-card__tags,
  body.is-customer-detail-open .customer-card--week-column .customer-card__condition {
    display: none;
  }

  /* 카테고리 폭은 PC 그리드 열(200px)이 담당 — 패널 width 고정 해제 */
  .customer-page.open .customer-categories-panel {
    width: auto !important;
    min-width: 0 !important;
  }

  .customer-add-btn-wrap--header {
    justify-content: flex-end;
    padding: 0;
  }

  .customer-list-toolbar__actions .customer-add-btn {
    flex: 0 0 auto;
    width: auto;
    margin-left: 0;
  }

  .customer-calendar-wrap {
    padding: 10px 14px;
  }

  .customer-calendar {
    max-width: 280px;
    height: 130px;
    font-size: 11px;
  }

  .customer-mobile-calendar-modal__panel .customer-mobile-calendar {
    max-width: none;
    height: 230px;
    font-size: 11px;
  }
}

/* -------- 필터 버튼 -------- */
.customer-filter-wrap {
  display: flex;
  gap: 6px;
  padding: 10px 14px;
  background: #fff;
  border-bottom: 1px solid #eee;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-filter-btn {
  flex-shrink: 0;
  height: 28px;
  padding: 0 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  color: #555;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.customer-filter-btn:hover {
  border-color: #2b6cff;
  color: #2b6cff;
}

.customer-filter-btn.active {
  background: #2b6cff;
  border-color: #2b6cff;
  color: #fff;
}

/* -------- 고객 카드 (장부 listing-week-card 스타일) -------- */
.customer-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  margin-bottom: 0;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.customer-card.customer-card--detail-open {
  border-color: #2563eb;
  box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.28), 0 4px 12px rgba(37, 99, 235, 0.12);
}

.customer-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14);
  transform: translateY(-1px);
}

/* 디렉토리 행: 카드 스타일 무력화 (기본 .customer-card 뒤에 위치해야 함) */
.customer-card.customer-dir-row {
  display: grid;
  grid-template-columns: 28px minmax(108px, 0.9fr) minmax(0, 1.2fr);
  grid-template-areas:
    "star phone identity"
    "star memo meta";
  align-items: center;
  column-gap: 8px;
  row-gap: 2px;
  margin: 0;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  cursor: pointer;
  min-height: 44px;
  gap: 0;
  transition: background 0.12s ease;
}

.customer-card.customer-dir-row:hover {
  background: #f8fafc;
  border-color: transparent;
  box-shadow: none;
  transform: none;
}

.customer-card.customer-dir-row.customer-card--detail-open {
  background: rgba(37, 99, 235, 0.06);
  border-color: transparent;
  box-shadow: inset 2px 0 0 var(--customer-accent, #2563eb);
}

.customer-dir-row__star {
  grid-area: star;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.customer-dir-row__phone {
  grid-area: phone;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.customer-dir-row__identity {
  grid-area: identity;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  min-width: 0;
}

.customer-dir-row__type {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  color: #475569;
  background: #f1f5f9;
  padding: 2px 5px;
  border-radius: 3px;
  line-height: 1.2;
}

.customer-dir-row__label {
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-dir-row__owner {
  flex: 1 1 100%;
  display: block;
  margin-top: 0;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  color: #1d4ed8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-card__owner-meta {
  margin: 2px 0 4px;
  padding: 2px 0;
  font-size: 12px;
  font-weight: 650;
  color: #1d4ed8;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-card__owner-meta--compact {
  margin: 0 0 4px;
  font-size: 11px;
}

.customer-dir-row__memo {
  grid-area: memo;
  min-width: 0;
  font-size: 12px;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.customer-dir-row__meta {
  grid-area: meta;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}

.customer-dir-row__date {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  font-variant-numeric: tabular-nums;
}

.customer-dir-row__count {
  min-width: 1.5em;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.customer-dir-row__count::after {
  content: "회";
  margin-left: 1px;
  font-weight: 600;
  color: #94a3b8;
}

@media (min-width: 901px) {
  .customer-card.customer-dir-row {
    grid-template-columns: 28px 148px minmax(140px, 1.1fr) minmax(160px, 1.6fr) 108px;
    grid-template-areas: "star phone identity memo meta";
    column-gap: 10px;
    padding: 5px 10px;
    min-height: 36px;
  }

  .customer-dir-row__meta {
    gap: 10px;
  }
}

@media (max-width: 900px) {
  .customer-list .customer-card.customer-dir-row,
  .customer-week-board .customer-card.customer-dir-row {
    padding: 8px 12px;
  }

  .customer-dir-row__memo {
    grid-column: 2 / -1;
  }
}

.customer-card__top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.customer-card__star {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  color: #d1d5db;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, color 0.15s ease;
}

.customer-card__star--on {
  color: #f59e0b;
}

.customer-card__star:hover {
  transform: scale(1.08);
}

.customer-card__type-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 3px 6px;
  border-radius: 6px;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.customer-card__log-badge {
  flex-shrink: 0;
  margin-left: auto;
  padding: 3px 6px;
  border-radius: 6px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  user-select: none;
}

/* 주간보드(좁은 열): 연락횟수 배지가 카드 밖으로 나가지 않도록 */
.customer-card--week-column {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  box-sizing: border-box;
}

.customer-card--week-column .customer-card__top {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
}

.customer-card--week-column .customer-card__log-badge {
  flex: 0 1 auto;
  flex-shrink: 1;
  min-width: 0;
  max-width: 48%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-sizing: border-box;
}

.customer-card__phone {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  color: #111827;
  line-height: 1.35;
}

.customer-card__type-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 5px;
  background: #f5f3ff;
  color: #7c3aed;
  font-size: 10px;
  font-weight: 700;
}

.customer-card__badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 5px;
  border-radius: 5px;
  background: #eff6ff;
  color: #3b82f6;
  font-size: 10px;
  font-weight: 700;
}

.customer-card__condition {
  font-size: 11px;
  font-weight: 700;
  color: #334155;
  line-height: 1.35;
  word-break: break-all;
}

.customer-card__date {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
}

.customer-card__summary {
  font-size: 11px;
  color: #64748b;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.customer-card__actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

.customer-card__action {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  color: #64748b;
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}

.customer-card__action:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.customer-card__action--call:hover {
  color: #03c75a;
  border-color: #86efac;
}

.customer-card__action--sms:hover {
  color: #03c75a;
  border-color: #86efac;
}

.customer-card--compact .customer-card__top {
  justify-content: flex-end;
}

.customer-card--compact .customer-card__log-badge {
  margin-left: 0;
  background: #eff6ff;
  color: #3b82f6;
}

.customer-card__layout {
  display: contents;
}

.customer-card__marker-col,
.customer-card__content-col,
.customer-card__info-row,
.customer-card__info-label,
.customer-card__info-value {
  display: none;
}

/* 네이버 스타일 전화/문자 버튼 (다른 곳에서 사용) */
.customer-action-btn {
  padding: 5px 8px;
  border: none;
  border-radius: 6px;
  background: #03C75A;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.customer-action-btn:hover {
  background: #02b350;
  color: #fff;
}

/* 세부내역서 추천 고객 — 주간보드(week-column) 카드와 동일 */
.detailSheet__recommendedCustomersBlock.detailSheet__viewSection {
  padding: 12px 14px;
}

.detailSheet__recommendedCustomersBlock .detailSheet__viewSectionTitleRow {
  margin-bottom: 10px;
  padding-bottom: 8px;
}

.detailSheet__recommendedCustomersBlock .detailSheet__recommendedCustomersList {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detailSheet__recommendedCustomersBlock .customer-card {
  margin-bottom: 0;
  flex-shrink: 0;
}

/* 주간보드 week-column 컴팩트 스타일 (세부내역서 전 구간) */
.detailSheet__recommendedCustomersBlock .customer-card--week-column {
  gap: 4px;
  padding: 8px;
}
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__star {
  width: 20px;
  height: 20px;
  font-size: 14px;
}
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__type-chip,
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__log-badge {
  font-size: 9px;
  padding: 2px 5px;
}
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__phone {
  font-size: 12px;
}
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__summary {
  font-size: 10px;
  -webkit-line-clamp: 2;
}
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__date,
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__actions,
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__tags,
.detailSheet__recommendedCustomersBlock .customer-card--week-column .customer-card__condition {
  display: none;
}

.detailSheet__recommendedCustomersBlock .detailSheet__recommendedCustomerEmpty {
  font-size: 12px;
  color: #777;
  padding: 8px 2px;
}

.detailSheet__recommendedCustomersList {
  max-height: none;
  position: relative;
}
.detailSheet__recommendedCustomersList--collapsed {
  /* 카드 1장 전체 + 2번째 상단만 살짝 (flex 축소 방지와 함께 사용) */
  max-height: 100px;
  overflow: hidden;
}
.detailSheet__recommendedCustomersList--collapsed::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}
.detailSheet__recommendedToggle {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 6px;
  border: none;
  background: transparent;
  color: #555;
  cursor: pointer;
}
.detailSheet__recommendedToggle:hover {
  color: #000;
}

/* -------- 입력 폼 뷰 -------- */
.customer-form-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.customer-form {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  -webkit-overflow-scrolling: touch;
}

.customer-form__group {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #eee;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customer-form__group--files {
  margin-bottom: 12px;
}

.customer-form__group--date {
  display: none !important;
}

.customer-form__phone-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.customer-form__phone-input {
  flex: 1;
  min-width: 0;
}

.customer-form__phone-check-btn {
  flex-shrink: 0;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: #2b6cff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
}

.customer-form__phone-check-btn:hover:not(:disabled) {
  background: #1a5ae6;
}

.customer-form__phone-check-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.customer-form__phone-check-status {
  margin: 8px 0 0;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: 8px;
}

.customer-form__phone-check-status.is-new {
  color: #0f5132;
  background: #d1e7dd;
  border: 1px solid #badbcc;
}

.customer-form__phone-check-status.is-existing {
  color: #084298;
  background: #cfe2ff;
  border: 1px solid #b6d4fe;
}

.customer-form__phone-check-status.is-error {
  color: #842029;
  background: #f8d7da;
  border: 1px solid #f5c2c7;
}

.customer-form__phone-office-log {
  margin: 6px 0 0;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1.45;
  color: #6b7280;
  white-space: pre-wrap;
}

.customer-form__phone-office-log[hidden] {
  display: none;
}

.customer-timeline__item--phone-check .customer-timeline__note {
  color: #6b7280;
  font-size: 12px;
}

.customer-timeline__item--phone-check .customer-timeline__dot {
  background: #9ca3af;
}

.customer-form__group--type-category .customer-form__type-block {
  margin-bottom: 10px;
}

.customer-form__label--category {
  margin-top: 4px;
}

.customer-form__files-wrap {
  min-height: 60px;
}

/* 고객 폼 첨부파일: 첨부 버튼 작게 */
.customer-form__files-wrap .detailSheet__gallery-upload {
  padding: 4px 0;
}

.customer-form__files-wrap .detailSheet__gallery-upload-zone {
  padding: 0;
  /* 고객 수정 모드에서는 업로드 버튼만 보이도록
     회색 테두리/배경 제거 */
  border: none;
  background: transparent;
}

.customer-form__files-wrap .detailSheet__gallery-upload-btns {
  gap: 4px;
}

.customer-form__files-wrap .detailSheet__gallery-upload-btn {
  padding: 2px 6px;
  font-size: 10px;
  border-radius: 4px;
}

.customer-form__files-wrap .detailSheet__gallery-upload-btn + .detailSheet__gallery-upload-btn {
  margin-left: 0;
}

.customer-form__group--assets .customer-add-log-form__asset-tags {
  margin-bottom: 8px;
}

.customer-form__label {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: #444;
  margin-bottom: 4px;
}

.customer-form__type-btns {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  padding: 3px;
  background: #f1f5f9;
  border-radius: 10px;
}

.customer-form__type-btn {
  flex: 1;
  min-width: 0;
  min-height: 36px;
  padding: 8px 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.customer-form__type-btn:hover {
  background: rgba(255, 255, 255, 0.65);
  color: #0f172a;
}

.customer-form__type-btn.is-active {
  background: #fff;
  color: var(--ds-accent, #2563eb);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

.customer-form__input,
.customer-form__input--select,
.customer-form__textarea {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 11px;
  font-family: inherit;
}

.customer-form__input--select {
  cursor: pointer;
  background: #fff;
}

.customer-form__input:focus,
.customer-form__input--select:focus,
.customer-form__textarea:focus {
  outline: none;
  border-color: #2b6cff;
  box-shadow: 0 0 0 2px rgba(43, 108, 255, 0.2);
}

.customer-form__textarea {
  min-height: 80px;
  resize: vertical;
}

.customer-form__section-divider {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 18px 0 10px;
  padding: 0;
  border-top: none;
  letter-spacing: -0.01em;
}

.customer-form__conditions {
  margin-top: 0;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customer-form__conditions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.customer-form__conditions-row:last-child {
  margin-bottom: 0;
}

.customer-form__conditions-row .customer-form__label {
  flex: 0 0 100%;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0;
  letter-spacing: -0.01em;
}

.customer-form__conditions-row span {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.customer-form__conditions .customer-form__input--short,
.customer-form__conditions .customer-form__input--select {
  flex: 1;
  min-width: 0;
  max-width: none;
  width: auto;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-form__conditions .customer-form__input--short:focus,
.customer-form__conditions .customer-form__input--select:focus {
  outline: none;
  border-color: var(--ds-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.customer-form__conditions .customer-form__input--select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

.customer-form__input--short {
  flex: 1;
  min-width: 50px;
  max-width: 100px;
  padding: 5px 6px;
  font-size: 11px;
}

.customer-form__conditions-guide {
  margin: -2px 0 12px;
  padding: 8px 10px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.customer-form__actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid #eee;
  background: #fff;
}

.customer-form__submit,
.customer-form__cancel,
.customer-form__delete {
  flex: 1;
  height: 32px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.customer-form__submit {
  border: none;
  background: #2b6cff;
  color: #fff;
}

.customer-form__submit:hover {
  background: #1a5ae6;
}

.customer-form__cancel {
  border: 1px solid #ddd;
  background: #fff;
  color: #555;
}

.customer-form__cancel:hover {
  background: #f5f5f5;
}

.customer-form__delete {
  flex: 0 0 auto;
  min-width: 64px;
  border: 1px solid #dc3545;
  background: transparent;
  color: #dc3545;
}

.customer-form__delete:hover {
  background: rgba(220, 53, 69, 0.08);
}

/* -------- 고객 상세 뷰 -------- */
.customer-detail-view {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  /* 상세 헤더(전화/유형/카테고리)부터 요약/연락이력/매물조건까지
     전체가 하나의 스크롤 영역이 되도록 처리 */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-detail__header {
  flex-shrink: 0;
  padding: 10px 14px 12px;
  background: #fff;
  border-bottom: 1px solid #eee;
}

.customer-detail__header .customer-detail__section-title {
  margin-bottom: 2px;
  padding-bottom: 0;
}

.customer-detail__phone-row {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-bottom: 4px;
}

.customer-detail__phone-office-log {
  margin: 0 0 8px;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1.45;
  color: #6b7280;
  white-space: pre-wrap;
}

.customer-detail__phone-office-log[hidden] {
  display: none;
}

.customer-detail__phone-row .customer-detail__action-icon {
  margin-left: 2px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 6px;
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.15s;
}
.customer-detail__phone-row .customer-detail__action-icon:first-of-type {
  margin-left: auto;
}
.customer-detail__phone-row .customer-detail__call {
  background: #03C75A;
}
.customer-detail__phone-row .customer-detail__call:hover {
  opacity: 0.9;
}
.customer-detail__phone-row .customer-detail__sms {
  background: #03C75A;
}
.customer-detail__phone-row .customer-detail__sms:hover {
  opacity: 0.9;
}
.customer-detail__phone-row .customer-detail__share {
  width: auto;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 11px;
  background: #2b6cff;
  color: #fff;
}
.customer-detail__phone-row .customer-detail__share:hover {
  background: #1a5ae6;
  color: #fff;
}

.customer-detail__phone {
  font-size: 12px;
  font-weight: 700;
  color: #111;
}

.customer-detail__type-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
  font-size: 11px;
}

.customer-detail__type-label {
  flex-shrink: 0;
  color: #666;
  font-weight: 600;
}

.customer-detail__type-btns {
  display: flex;
  flex-wrap: nowrap;
  flex: 1;
  min-width: 0;
  gap: 2px;
  padding: 3px;
  background: #f1f5f9;
  border-radius: 10px;
}

.customer-detail__type-btn {
  flex: 1;
  min-width: 0;
  min-height: 32px;
  padding: 6px 4px;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  color: #475569;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: default;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
  /* 뷰모드에서는 유형 변경을 막기 위해 클릭 비활성화 */
  pointer-events: none;
}

.customer-detail__type-btn:hover {
  background: transparent;
  color: #475569;
}

.customer-detail__type-btn.is-active {
  background: #fff;
  color: var(--ds-accent, #2563eb);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.1);
}

/* 뷰모드: 유형 + 카테고리를 하나의 카드처럼 묶기 */
.customer-detail__type-category-wrap {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customer-detail__type-category-wrap .customer-detail__category-wrap {
  margin-top: 8px;
}

.customer-detail__star {
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: transparent;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.customer-detail__category-wrap {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.customer-detail__category-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 0;
}

.customer-detail__category-row .customer-detail__section-title {
  margin-bottom: 0;
  padding-bottom: 0;
}

.customer-detail__category-row .customer-detail__category-add-wrap {
  margin-left: auto;
  margin-top: 0;
}

.customer-detail__category-list {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 4px;
  margin-left: 6px;
  margin-top: 0;
  min-height: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-detail__category-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #2b6cff;
  background: rgba(43, 108, 255, 0.1);
  border-radius: 6px;
}

.customer-detail__category-tag-remove {
  padding: 0;
  width: 14px;
  height: 14px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: #666;
  font-size: 12px;
  line-height: 1;
  cursor: default;
  pointer-events: none;
}

.customer-detail__category-tag-remove:hover {
  background: rgba(0,0,0,0.08);
  color: #c00;
}

.customer-detail__category-add-wrap {
  margin-top: 0;
}

.customer-detail__category-add-select {
  width: 100%;
  max-width: 200px;
  padding: 5px 8px;
  font-size: 11px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: #fff;
}

.customer-detail__actions-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}


.customer-detail__add-log {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 5px 10px;
  border: 2px solid #2b6cff;
  border-radius: 6px;
  background: transparent;
  color: #2b6cff;
  font-weight: 700;
  font-size: 11px;
  cursor: pointer;
}

.customer-detail__add-log:hover {
  background: rgba(43, 108, 255, 0.08);
}

.customer-detail__body {
  flex: 0 0 auto;
  padding: 12px 14px;
  padding-bottom: 28px;
}

.customer-detail__footer.detailSheet__footer {
  margin-left: 8px;
  margin-right: 8px;
  width: calc(100% - 16px);
  padding: 10px 14px 12px;
}

.customer-detail__section-title {
  font-size: 11px;
  font-weight: 700;
  color: #555;
  margin-bottom: 6px;
  padding-bottom: 2px;
  letter-spacing: -0.02em;
}

.customer-detail__summary-section {
  margin-bottom: 12px;
}

.customer-detail__summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.customer-detail__summary-row .customer-detail__section-title {
  margin-bottom: 0;
}

.customer-detail__summary-edit {
  flex-shrink: 0;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #2b6cff;
  background: transparent;
  border: 1px solid rgba(43, 108, 255, 0.5);
  border-radius: 6px;
  cursor: pointer;
}

.customer-detail__summary-edit:hover {
  background: rgba(43, 108, 255, 0.08);
}

.customer-detail__summary-text {
  font-size: 12px;
  color: #333;
  line-height: 1.5;
  white-space: pre-wrap;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 8px;
  min-height: 2.5em;
}

.customer-detail__summary-text.hidden {
  display: none;
}

.customer-detail__summary-edit-wrap {
  margin-top: 4px;
}

.customer-detail__summary-edit-wrap.hidden {
  display: none;
}

.customer-detail__summary-input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 10px;
  font-size: 12px;
  line-height: 1.5;
  border: 1px solid #ddd;
  border-radius: 8px;
  resize: vertical;
  min-height: 60px;
}

.customer-detail__summary-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  margin-top: 6px;
}

.customer-detail__summary-cancel,
.customer-detail__summary-save {
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}

.customer-detail__summary-cancel {
  background: #f0f0f0;
  border: 1px solid #ddd;
  color: #555;
}

.customer-detail__summary-cancel:hover {
  background: #e5e5e5;
}

.customer-detail__summary-save {
  background: #2b6cff;
  border: none;
  color: #fff;
}

.customer-detail__summary-save:hover {
  background: #1a5ae6;
}

.customer-detail__section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.customer-detail__section-row .customer-detail__section-title {
  margin-bottom: 0;
  padding-bottom: 0;
}

.customer-detail__add-log-btn {
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid #2b6cff;
  border-radius: 6px;
  background: rgba(43, 108, 255, 0.06);
  color: #2b6cff;
  font-weight: 600;
  font-size: 11px;
  cursor: pointer;
}

.customer-detail__add-log-btn:hover {
  background: rgba(43, 108, 255, 0.12);
}

.customer-detail__add-log-btn--needs-save {
  opacity: 0.55;
  border-color: #93b4ff;
  color: #6b8fd9;
}

/* -------- 매물 조건 (추천 매칭) - 최신 카드 스타일 -------- */
.customer-detail__conditions-wrap {
  margin-bottom: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.customer-detail__conditions-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 0;
}

.customer-detail__conditions-row:last-of-type {
  margin-bottom: 0;
}

.customer-detail__conditions-label {
  flex: 0 0 100%;
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.customer-detail__conditions-input,
.customer-detail__conditions-select {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: #0f172a;
  font-family: inherit;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.customer-detail__conditions-input:focus,
.customer-detail__conditions-select:focus {
  outline: none;
  border-color: var(--ds-accent, #2563eb);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.customer-detail__conditions-select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 4.5L6 8l3.5-3.5' stroke='%2364748b' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

/* 뷰모드: 세부내역서처럼 네모칸 없이 값만 오른쪽 정렬 */
.customer-detail__conditions-input:disabled,
.customer-detail__conditions-select:disabled {
  background: transparent;
  border: none;
  border-radius: 0;
  color: #334155;
  font-size: 13px;
  font-weight: 500;
  cursor: default;
  text-align: right;
  padding: 4px 0;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  background-image: none;
}

.customer-detail__conditions-select:disabled {
  background-image: none;
  padding-right: 0;
}

.customer-detail__conditions-sep {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
}

.customer-detail__conditions-guide {
  margin: -2px 0 12px;
  padding: 8px 10px;
  font-size: 11px;
  color: #64748b;
  line-height: 1.45;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

@media (max-width: 480px) {
  .customer-detail__conditions-guide {
    margin-left: 0;
  }
}

.customer-detail__conditions-save {
  display: block;
  margin-top: 2px;
  margin-left: auto;
  min-width: 36px;
  width: max-content;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #9ca3af;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  box-sizing: border-box;
}

.customer-detail__conditions-save:hover {
  background: #6b7280;
}

/* -------- 추천매물 (고객 상세 전용) -------- */
.customer-detail__recommended-wrap {
  margin-bottom: 16px;
  min-height: 24px;
}

.customer-detail__recommended-visible,
.customer-detail__recommended-collapsed {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-detail__recommended-collapsed.hidden {
  display: none !important;
}

.customer-detail__recommended-toggle {
  margin-top: 6px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #2b6cff;
  background: transparent;
  border: 1px solid rgba(43, 108, 255, 0.4);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.customer-detail__recommended-toggle:hover {
  background: rgba(43, 108, 255, 0.08);
  color: #1a5ae6;
}

.customer-detail__recommended-asset {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 600;
  color: #1976d2;
  background: #e3f2fd;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.customer-detail__recommended-asset:hover {
  background: #bbdefb;
  color: #0d47a1;
}

/* -------- 고객 첨부파일 (최상단, 세부내역서처럼 작게) -------- */
.customer-detail__files-top {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f5f6f8;
  border-radius: 8px;
  border-bottom: none;
}

.customer-detail__files-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.customer-detail__files-row .customer-detail__section-title--inline {
  margin-bottom: 0;
  padding-bottom: 0;
}

.customer-detail__files-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 6px 8px;
}

.customer-detail__files-wrap .detailSheet__gallery {
  min-height: 0;
  margin: 0;
  background: transparent;
  box-shadow: none;
  flex: 1 1 100%;
  width: 100%;
}

.customer-detail__files-wrap .detailSheet__gallery-track {
  display: flex;
  gap: 6px;
  padding: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.customer-detail__files-wrap .detailSheet__gallery-thumb {
  width: 56px;
  height: 56px;
  border-radius: 4px;
}

.customer-detail__files-wrap .detailSheet__gallery-compact .detailSheet__gallery-thumb {
  width: 56px;
  height: 56px;
}

.customer-detail__files-wrap .detailSheet__gallery-countbadge {
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  font-size: 10px;
  line-height: 18px;
}

.customer-detail__files-wrap .detailSheet__gallery-item {
  flex-shrink: 0;
}

.customer-detail__files-wrap .detailSheet__gallery--empty {
  min-height: 56px;
  font-size: 10px;
}

.customer-detail__files-wrap .detailSheet__gallery--empty::before {
  font-size: 10px;
  letter-spacing: 0.02em;
  justify-content: center;
  padding-left: 0;
  text-align: center;
  white-space: nowrap;
}

.customer-detail__files-wrap .detailSheet__gallery-delete {
  width: 18px;
  height: 18px;
  top: 2px;
  right: 2px;
  font-size: 12px;
}

.customer-detail__files-wrap .detailSheet__gallery-mainbadge,
.customer-detail__files-wrap .detailSheet__gallery-mainbtn {
  font-size: 9px;
  padding: 1px 4px;
}

.customer-detail__files-wrap .detailSheet__gallery-upload {
  padding: 4px 0;
}

.customer-detail__files-wrap .detailSheet__gallery-upload-zone {
  padding: 8px 10px;
  border-width: 1px;
}

.customer-detail__files-wrap .detailSheet__gallery-upload-btns {
  gap: 4px;
}

.customer-detail__files-wrap .detailSheet__gallery-upload-btn {
  padding: 2px 5px;
  font-size: 10px;
  border-radius: 4px;
}

.customer-detail__files-wrap .detailSheet__gallery-upload-btn + .detailSheet__gallery-upload-btn {
  margin-left: 0;
}

.customer-detail__files-save {
  flex-shrink: 0;
  min-width: 36px;
  padding: 3px 6px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #9ca3af;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.customer-detail__files-save:hover {
  background: #6b7280;
}

/* -------- 연락 이력 (흰색 카드) -------- */
.customer-detail__timeline-card {
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
  border: 1px solid #eee;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

/* -------- 연락 로그 타임라인 -------- */
.customer-timeline {
  position: relative;
  padding-left: 24px;
}

.customer-timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #e0e0e0;
}

.customer-timeline__item {
  position: relative;
  padding-bottom: 14px;
}

.customer-timeline__item:last-child {
  padding-bottom: 0;
}

.customer-timeline__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 4px;
}

.customer-timeline__actions {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.customer-timeline__edit,
.customer-timeline__delete {
  width: 22px;
  height: 22px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: #f5f5f5;
  color: #888;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s;
}

.customer-timeline__edit:hover {
  background: rgba(43, 108, 255, 0.1);
  color: #2b6cff;
}

.customer-timeline__delete:hover {
  background: #fee;
  color: #c00;
}

.customer-timeline__dot {
  position: absolute;
  left: -24px;
  top: 6px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2b6cff;
  border: 3px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.customer-timeline__date {
  font-size: 10px;
  color: #888;
  margin-bottom: 4px;
}

.customer-timeline__pending-badge {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #92400e;
  background: #fef3c7;
  vertical-align: middle;
}

.customer-timeline__item--pending .customer-timeline__dot {
  background: #f59e0b;
}

.customer-timeline__summary {
  font-size: 11px;
  font-weight: 700;
  color: #333;
  margin-bottom: 6px;
}

.customer-timeline__note {
  font-size: 11px;
  color: #444;
  line-height: 1.55;
  white-space: pre-wrap;
  background: #fafafa;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #eee;
}

.customer-timeline__asset-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.customer-timeline__asset-tag {
  margin: 0;
}

/* 연락 이력 매물: 미니카드 (정보 풀 표시, 크기만 약간 축소) */
.customer-timeline__asset-cards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.customer-timeline__mini-card-wrap {
  flex: 0 0 auto;
}

/* 연락 이력 내 미니카드: 기존 대비 조금만 작게 (썸네일 60px, 폰트 약 92%) */
.customer-timeline__asset-cards .customer-timeline__mini-card-wrap .mini-card {
  font-size: 12px;
}

.customer-timeline__asset-cards .customer-timeline__mini-card-wrap .mini-card .mini-card-thumb,
.customer-timeline__asset-cards .customer-timeline__mini-card-wrap .mini-card .mini-card-thumb-wrap .mini-card-thumb {
  width: 60px !important;
  height: 60px !important;
  min-width: 60px !important;
  min-height: 60px !important;
}

.customer-timeline__asset-cards .customer-timeline__mini-card-wrap .mini-card .mini-card-price {
  font-size: 12px;
}

.customer-timeline__asset-cards .customer-timeline__mini-card-wrap .mini-card .mini-card-name {
  font-size: 12px;
}

.customer-timeline__asset-cards .customer-timeline__mini-card-wrap .mini-card .mini-card-shortmemo {
  font-size: 11px;
}

/* 폴백: 상세 조회 실패 시 라벨만 보이는 작은 카드 */
.customer-timeline__mini-card {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 160px;
  padding: 4px 6px;
  background: #fff;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.customer-timeline__mini-card:hover {
  background: #f5f8ff;
  border-color: rgba(43, 108, 255, 0.4);
}

.customer-timeline__mini-card-thumb {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: #eee;
  border: 1px solid #e0e0e0;
}

.customer-timeline__mini-card-body {
  flex: 1;
  min-width: 0;
}

.customer-timeline__mini-card-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 빈 목록 -------- */
.customer-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: #888;
}

.customer-empty__icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.customer-empty__text {
  font-size: 12px;
  line-height: 1.5;
}

/* -------- 뷰 전환 (hidden) -------- */
.customer-list-view.hidden,
.customer-form-view.hidden,
.customer-detail-view.hidden {
  display: none !important;
}

/* ===============================
   모바일: 가로폭 좁을 때 대응
   - 카테고리 패널 → 슬라이드 드로어
   - 리스트 영역 전체 가로 사용
   =============================== */
@media (max-width: 900px) {
  .customer-week-view:not([hidden]) {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .customer-week-nav {
    display: none;
  }

  .customer-week-board {
    position: relative;
    display: block;
    height: 100%;
    min-height: 0;
    padding: 10px 12px 18px;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    background-color: transparent;
    background-image: none;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-y;
    scrollbar-width: none;
  }

  .customer-week-board::-webkit-scrollbar {
    width: 0;
    height: 0;
    display: none;
  }

  .customer-week-board-shell {
    --week-scroll-fade: #f8f9fb;
    position: relative;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background-color: #f8f9fb;
  }

  .customer-week-board-shell::before,
  .customer-week-board-shell::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 36px;
    pointer-events: none;
    opacity: 0;
    z-index: 4;
  }

  .customer-week-board-shell::before {
    top: 0;
    background: linear-gradient(
      to bottom,
      var(--week-scroll-fade) 0%,
      var(--week-scroll-fade) 12%,
      rgba(248, 249, 251, 0) 100%
    );
  }

  .customer-week-board-shell::after {
    bottom: 0;
    background: linear-gradient(
      to top,
      var(--week-scroll-fade) 0%,
      var(--week-scroll-fade) 12%,
      rgba(248, 249, 251, 0) 100%
    );
  }

  .customer-week-board-shell.can-scroll-up::before,
  .customer-week-board-shell.can-scroll-down::after {
    opacity: 1;
  }

  .customer-week-board.is-week-swiping {
    overflow: hidden;
    touch-action: none;
  }

  .customer-week-board-shell:has(.customer-week-board.is-week-swiping)::before,
  .customer-week-board-shell:has(.customer-week-board.is-week-swiping)::after {
    opacity: 0;
  }

  .customer-week-carousel {
    --week-carousel-gap: 10px;
    overflow: hidden;
    width: 100%;
  }

  .customer-week-carousel__track {
    display: flex;
    width: 100%;
    gap: var(--week-carousel-gap);
    will-change: transform;
    align-items: flex-start;
  }

  .customer-week-carousel__pane {
    flex: 0 0 100%;
    width: 100%;
    min-width: 100%;
    box-sizing: border-box;
  }

  .customer-mobile-week-sections {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .customer-mobile-week-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid rgba(226, 232, 240, 0.95);
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
    transition: box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
  }

  .customer-mobile-week-section.is-saturday {
    background: #f8fbff;
    border-color: #dbeafe;
  }

  .customer-mobile-week-section.is-sunday {
    background: #fff8f8;
    border-color: #ffe4e6;
  }

  .customer-mobile-week-section.is-tuesday,
  .customer-mobile-week-section.is-thursday {
    background: #f8fafc;
    border-color: #e2e8f0;
  }

  .customer-mobile-week-section.is-today {
    outline: none;
    border-color: #93c5fd;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.2);
  }

  .customer-mobile-week-section__title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 0 2px;
    font-size: 13px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
  }

  .customer-mobile-week-section.is-today .customer-mobile-week-section__title {
    color: #1d4ed8;
  }

  .customer-mobile-week-section__count {
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
  }

  .customer-mobile-week-section__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .customer-category-collection {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100%;
  }

  .customer-category-collection__title {
    padding: 0 2px 10px;
  }

  .customer-category-collection__date-groups {
    display: flex;
    flex-direction: column;
    gap: 14px;
    overflow: visible;
  }

  .customer-category-date-section__title {
    font-size: 13px;
    color: #111;
  }

  .customer-category-date-section__cards {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .customer-category-date-section__cards .customer-card {
    align-self: stretch;
    width: 100%;
  }

  .customer-mobile-crm-filter {
    display: inline-flex;
    align-items: center;
  }

  .customer-mobile-calendar-btn {
    display: inline-flex;
  }

  .customer-mobile-today-btn {
    display: inline-flex;
  }

  .customer-list-toolbar__actions .customer-add-btn {
    flex: 0 0 auto;
    width: auto;
    min-width: 82px;
    padding: 0 10px;
    margin-left: 0;
  }

  /*
   * 모바일 2행:
   * 1) ←고객관리 …… [나] [검색] (계정은 검색 바로 왼쪽)
   * 2) 달력 / 오늘 / 고객등록 / 주간|목록
   * ※ position은 fixed 유지 (relative로 바꾸면 풀스크린 오버레이가 깨짐)
   */
  .customer-header {
    flex-wrap: nowrap;
    /* 검색폭 + 계정버튼 폭 여유 + 간격 + 우측 여백 */
    padding-right: calc(min(38vw, 155px) + 52px);
  }

  .customer-header__title-wrap {
    flex: 1 1 auto;
    min-width: 0;
  }

  .customer-add-btn-wrap--header {
    position: absolute;
    top: 7px;
    /* 검색(right:12, width) 왼쪽 + 간격 8px */
    right: calc(12px + min(38vw, 155px) + 8px);
    height: 34px;
    margin: 0;
    padding: 0;
    z-index: 6;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    overflow: visible;
  }

  .customer-list-area > .customer-list-toolbar {
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
  }

  .customer-list-toolbar__field--search {
    position: absolute;
    top: 7px;
    right: 12px;
    width: min(38vw, 155px);
    height: 34px;
    margin: 0;
    z-index: 6;
    display: flex;
    align-items: center;
  }

  .customer-list-toolbar__field--search .customer-list-toolbar__label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .customer-list-toolbar__field--search .customer-list-toolbar__search {
    width: 100%;
    max-width: none;
    min-width: 0;
    height: 34px;
  }

  .customer-list-toolbar__actions {
    flex: 1 1 auto;
    min-width: 0;
  }

  .customer-list-toolbar .customer-view-mode-tabs {
    margin-left: auto;
  }

  .customer-categories-backdrop:not(.hidden) {
    display: block;
  }

  /* 카테고리 패널: 화면 밖에 두었다가 열 때만 슬라이드 인 */
  .customer-categories-panel {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 260px;
    max-width: 85vw;
    min-width: 0;
    z-index: 3010;
    transform: translateX(-100%);
    transition: transform 0.2s ease-out;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.15);
    overflow: visible;
  }

  .customer-categories-panel.is-open {
    transform: translateX(0);
  }

  .customer-categories-panel__handle {
    z-index: 3011;
  }

  .customer-categories-panel .customer-calendar-wrap {
    display: none;
  }

  .customer-list-area {
    width: 100%;
    min-width: 0;
  }

  /* 달력/카드 등 넘침 방지 */
  .customer-calendar-wrap {
    min-width: 0;
    overflow: hidden;
  }

  .customer-list {
    min-width: 0;
  }

  .customer-list .customer-card:not(.customer-dir-row),
  .customer-week-board .customer-card:not(.customer-dir-row) {
    padding: 8px 10px;
  }

  .customer-card--mobile-split {
    display: grid;
    grid-template-columns: 30% minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    column-gap: 10px;
    row-gap: 4px;
    padding: 8px;
  }

  .customer-card--mobile-split .customer-card__top {
    grid-column: 1;
    grid-row: 1;
    gap: 4px;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    flex-wrap: wrap;
  }

  .customer-card--mobile-split .customer-card__top .customer-card__log-badge {
    margin-left: 0;
    flex: 1 1 auto;
    flex-shrink: 1;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .customer-card--mobile-split .customer-card__type-chip {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .customer-card--mobile-split .customer-card__type-chip,
  .customer-card--mobile-split .customer-card__log-badge {
    font-size: 9px;
    padding: 2px 5px;
  }

  .customer-card--mobile-split .customer-card__star {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }

  .customer-card--mobile-split .customer-card__layout {
    display: contents;
  }

  .customer-card--mobile-split .customer-card__marker-col,
  .customer-card--mobile-split .customer-card__content-col,
  .customer-card--mobile-split .customer-card__info-row {
    display: flex;
  }

  .customer-card--mobile-split .customer-card__marker-col {
    grid-column: 1;
    grid-row: 2;
    flex-direction: column;
    flex-shrink: 0;
    min-width: 0;
    padding-right: 6px;
    border-right: 1px solid #eef2f7;
    justify-content: center;
    align-items: center;
  }

  .customer-card--mobile-split .customer-card__content-col {
    grid-column: 2;
    grid-row: 1 / -1;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 0;
    padding-left: 2px;
    align-self: stretch;
  }

  .customer-card--mobile-split .customer-card__info-row {
    align-items: center;
    gap: 6px;
    min-width: 0;
    line-height: 1.3;
  }

  .customer-card--mobile-split .customer-card__info-label {
    display: inline;
    flex: 0 0 auto;
    font-size: 10px;
    font-weight: 700;
    color: #94a3b8;
    white-space: nowrap;
  }

  .customer-card--mobile-split .customer-card__info-value {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    color: #64748b;
  }

  .customer-card--mobile-split .customer-card__summary,
  .customer-card--mobile-split .customer-card__recent-text {
    -webkit-line-clamp: unset;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .customer-card--mobile-split .customer-card__phone {
    width: 100%;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .customer-card--week-column .customer-card__condition {
    display: none;
  }

  .customer-mobile-week-section__cards .customer-card,
  .customer-category-date-section__cards .customer-card {
    width: 100%;
  }
}
