* {
  -webkit-tap-highlight-color: transparent;
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}

:root {
  --vh: 1vh;
}

body {
  overscroll-behavior-y: none;
  -webkit-overflow-scrolling: touch;
}

.parts-procurement-shipment-modal {
  position: fixed;
  inset: 0;
  z-index: 100080;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.38);
}

.parts-procurement-shipment-modal.hidden {
  display: none;
}

.parts-procurement-shipment-dialog {
  width: min(520px, 100%);
  max-height: min(680px, calc(100vh - 32px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.24);
}

.parts-procurement-shipment-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.parts-procurement-shipment-head strong {
  font-size: 14px;
  color: #111827;
}

.parts-procurement-shipment-head button {
  width: 28px;
  height: 28px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  color: #475569;
  background: #f8fafc;
}

.parts-procurement-shipment-search {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 12px;
}

.parts-procurement-shipment-list {
  overflow-y: auto;
  display: grid;
  gap: 8px;
  padding-right: 2px;
}

.parts-procurement-shipment-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.parts-procurement-shipment-item span,
.parts-procurement-shipment-item strong,
.parts-procurement-shipment-item em {
  min-width: 0;
}

.parts-procurement-shipment-item strong,
.parts-procurement-shipment-item b {
  font-size: 12px;
  color: #111827;
}

.parts-procurement-shipment-item em {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  font-size: 11px;
  color: #64748b;
}

.parts-procurement-shipment-summary {
  display: grid;
  gap: 4px;
  padding: 9px 10px;
  border-radius: 8px;
  background: #f1f5f9;
  font-size: 12px;
  color: #475569;
}

.parts-procurement-shipment-summary span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.parts-procurement-shipment-actions {
  display: flex;
  gap: 8px;
}

.parts-procurement-shipment-actions button {
  flex: 1;
  min-height: 38px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
}

.parts-procurement-shipment-actions [data-shipment-copy] {
  background: #e0f2fe;
  color: #0369a1;
}

.parts-procurement-shipment-actions [data-shipment-confirm] {
  background: #2563eb;
  color: #fff;
}

.parts-procurement-shipment-empty {
  padding: 18px 10px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.main-action-grid {
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 4px !important;
  align-items: stretch;
}

.main-action-grid > .mobile-action-menu-wrap,
.main-action-grid > button {
  box-sizing: border-box !important;
  min-width: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}

.main-action-grid > .mobile-action-menu-wrap > button,
.main-action-grid > button {
  box-sizing: border-box !important;
  display: flex !important;
  width: 100% !important;
  max-width: 100% !important;
  height: 34px !important;
  min-height: 34px !important;
  padding: 0 2px !important;
  border: 1px solid #bfcbda !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 8px !important;
  background-color: #dcecff !important;
  color: #173252 !important;
  font-size: 11px !important;
  font-weight: 750 !important;
  line-height: 1 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

/* 모바일에서 PC 전용 요소 숨김 */
#right-panel {
  display: none !important;
}

#pc-layout-wrapper {
  display: block;
}

#left-panel {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  border-right: none !important;
  height: 100dvh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  position: relative !important;
  -webkit-overflow-scrolling: touch;
}

.dashboard-fixed {
  flex-shrink: 0 !important;
  position: relative !important;
  top: 0 !important;
  z-index: 50 !important;
  background: #ffffff !important;
}

.dashboard-fixed.safe-pt-raw {
  padding-top: env(safe-area-inset-top, 0px) !important;
}

#mobile-header-row {
  padding-top: calc(0.625rem + 16px) !important;
}

#ticket-list {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

#reception-modal-content {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  background-color: var(--ascp-workflow-chrome, #f5f5f5) !important;
}


/* 티켓 카드 터치 최적화 */
.ticket-card {
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  touch-action: manipulation;
  cursor: pointer;
  border-left: 3px solid #4f46e5 !important;
  box-shadow: none;
  /* [성능최적화] 터치 반응 성능 향상 */
  will-change: transform, opacity;
}

.ticket-report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  background: #059669;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 185, 129, 0.22);
}

.ticket-report-button:active {
  background: #047857;
}

.ticket-report-mail-failure-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  border: 1px solid #fecaca;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

/* 카드 전환 애니메이션 */
.card-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  /* [성능최적화] 애니메이션 성능 향상 */
  will-change: max-height;
}

.card-detail.expanded {
  max-height: 2000px;
}

.ticket-detail-actions {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.ticket-detail-actions--one {
  grid-template-columns: 1fr;
}

.ticket-detail-actions--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ticket-detail-actions--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.ticket-detail-action {
  min-height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 0;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
}

.ticket-detail-action svg {
  width: 17px;
  height: 17px;
}

.ticket-detail-action-move {
  background: #6366f1;
}

.ticket-detail-action-process {
  background: #0f62fe;
}

.ticket-detail-action-start {
  background: #0f766e;
}

.ticket-detail-action-start.is-started {
  background: #14b8a6;
}

.ticket-detail-action-start.is-running {
  background: #0d9488;
}

.ticket-detail-action-start.is-paused {
  background: #64748b;
}

.ticket-detail-action-restore {
  background: #f59e0b;
}

/* [최적화] 확장된 버전에서는 기본 영역의 메모를 숨김 (중복 방지 및 공간 확보) */
.ticket-card.expanded .memo-compact {
  display: none;
}

/* 설치시운전 티켓 카드 (그린 톤) */
.ticket-card.install-card {
  background: #fff !important;
  border-left: 3px solid #10b981 !important;
  box-shadow: none;
}

/* 선택된 카드 스타일 - 토글 스위치로만 표시 (테두리 강조 없음) */

/* 하단 바 애니메이션 */
.bottom-bar {
  bottom: calc(60px + env(safe-area-inset-bottom, 0px)) !important;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  /* [성능최적화] 애니메이션 성능 향상 */
  will-change: transform;
}

.bottom-bar.visible {
  transform: translateY(0);
}

/* ========================================
     모바일 모달 - 풀스크린 기본
     ======================================== */
.fixed.inset-0 {
  height: 100dvh !important;
  max-height: 100dvh !important;
}

.modal {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-width: 100% !important;
  max-height: 100dvh !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 100001 !important;
}

.modal.active {
  display: flex !important;
  flex-direction: column;
}

#stats-modal.stats-lab-mobile-mode > :not(.stats-lab-mobile-frame-wrap) {
  display: none !important;
}

.stats-lab-mobile-frame-wrap {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100% !important;
  height: 100dvh !important;
  flex-direction: column;
  background: #eef3f8;
  overflow: hidden;
  isolation: isolate;
}

.stats-lab-mobile-bar {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 14px 10px;
  border-bottom: 1px solid #d6dee9;
  background: #fff;
  color: #172033;
}

.stats-lab-mobile-bar strong {
  font-size: 16px;
  font-weight: 800;
}

.stats-lab-mobile-bar button {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 8px;
  background: #eef2f6;
  color: #475569;
  font-size: 26px;
  line-height: 1;
}

#stats-lab-mobile-frame {
  display: block;
  flex: 1;
  min-height: 0;
  width: 100%;
  border: 0;
  background: #eef3f8;
}

/* 모달 내부 컨텐츠 - 풀스크린 */
.modal > div {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  border-radius: 0 !important;
  margin: 0 !important;
}

/* 토글 스위치 스타일 */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 24px;
  height: 14px;
  flex-shrink: 0;
}

.toggle-input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 14px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 10px;
  width: 10px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition:
    transform 0.2s ease,
    background-color 0.2s ease;
  border-radius: 50%;
  transform: translateX(0);
}

.toggle-input:checked + .toggle-slider {
  background-color: #4f46e5;
}

.toggle-input:checked + .toggle-slider:before {
  transform: translateX(10px);
}

/* 배정된 티켓 강조 (주황색 테두리) */
.ticket-card.scheduled {
  border-left: 5px solid #f59e0b !important;
}

/* 설치시운전 + 배정: 주황색 테두리 (설치 그린보다 배정 우선) */
.ticket-card.install-card.scheduled {
  border-left: 5px solid #f59e0b !important;
}

/* 완료 티켓: 흐림 처리 없이 빨간 좌측선으로만 구분 */
.ticket-card.completed-card,
.ticket-card.install-card.completed-card,
.ticket-card.scheduled.completed-card {
  opacity: 1 !important;
  border-left: 5px solid #ef4444 !important;
}

/* 로딩 스피너 */
.spinner {
  border: 3px solid #f3f4f6;
  border-top: 3px solid #4f46e5;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

/* 안전 영역 대응 (노치) */
.safe-top {
  padding-top: env(safe-area-inset-top);
}

.safe-bottom {
  /* 안드로이드 브라우저 하단 네비게이션 바 대응 (보통 48-56px) */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 56px);
}

/* 브라우저 UI를 제외한 실제 뷰포트 높이 */
.h-screen-real {
  height: 100vh;
  /* 폴백 */
  height: calc(var(--vh, 1vh) * 100);
  height: 100dvh;
}

/* 스와이프 카드 컨테이너 */
.swipe-container {
  position: relative;
  overflow: hidden;
}

/* 스와이프 카드 래퍼 */
.swipe-wrapper {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.swipe-wrapper.swiping {
  transition: none;
}

/* 스와이프 액션 버튼 */
.swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding-right: 16px;
}

.swipe-action-btn {
  background: #4f46e5;
  color: white;
  padding: 10px 8px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  min-width: 68px;
  text-align: center;
}

.swipe-action-btn-move {
  background: #0ea5e9;
}

.swipe-action-btn-view {
  background: #06b6d4;
}

/* ========================================
     모바일 스케줄 탭 스타일
     ======================================== */

/* 메인 탭 (티켓/스케줄) */
.mobile-main-tabs {
  display: block;
}

.main-tab {
  min-height: 40px;
}

.main-tab.active {
  background: white;
  color: #111827;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* 요일 탭 */
.day-tabs-container {
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.day-tabs-container::-webkit-scrollbar {
  display: none;
}

.day-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px 0;
  border-radius: 8px;
  background: #f3f4f6;
  border: 1.5px solid transparent;
  transition: all 0.2s ease;
}

.day-tab .day-name {
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
}

.day-tab .day-date {
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  margin-top: 1px;
}

.day-tab.active {
  background: #4f46e5;
  border-color: #4f46e5;
}

.day-tab.active .day-name,
.day-tab.active .day-date {
  color: white;
}

.day-tab.today {
  border-color: #4f46e5;
}

.day-tab.today .day-date {
  color: #4f46e5;
}

.day-tab.active.today {
  background: #4f46e5;
}

.day-tab.active.today .day-date {
  color: white;
}

/* 인원 카드 (스케줄 뷰) - 10% 축소 */
.schedule-person-card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: 100%;
  box-sizing: border-box;
}

.schedule-person-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

.schedule-person-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-person-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.schedule-person-count {
  font-size: 11px;
  color: #6b7280;
  margin-left: auto;
}

/* 타일 리스트 - 10% 축소 */
.schedule-tiles {
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  box-sizing: border-box;
  width: 100%;
}

.schedule-tile {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 8px;
  background: #f3f4f6;
  border-radius: 6px;
  border-left: 3px solid #4f46e5;
  min-width: 0;
  box-sizing: border-box;
  position: relative;
}

.schedule-tile.custom {
  border-left-color: #8b5cf6;
  background: #f5f3ff;
}

/* 설치시운전 타일 (그린) */
.schedule-tile.install {
  border-left-color: #10b981;
  background: #ecfdf5;
}

/* 완료/디밍 타일 (배지용 포지셔닝 포함) */
.schedule-tile.completed-tile,
.schedule-tile.dimmed-tile {
  position: relative;
}

.schedule-tile.completed-tile .schedule-tile-content,
.schedule-tile.dimmed-tile .schedule-tile-content {
  opacity: 0.5;
}

.completed-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  background: #047857;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 4px;
  border-radius: 3px;
  z-index: 5;
}

.tile-badge-stack {
  position: absolute;
  top: 2px;
  right: 2px;
  z-index: 6;
  display: flex;
  gap: 2px;
  align-items: center;
}

.tile-badge-stack .completed-badge {
  position: static;
}

.completed-badge.missed-badge {
  background: #b91c1c;
}

.completed-badge.future-date-badge {
  background: #1d4ed8;
}

.completed-badge.inprogress-badge {
  background: #92400e;
}

.completed-badge.install-complete-badge {
  background: #1d4ed8;
}

.completed-badge.parts-procurement-tile-badge {
  background: #047857;
}

.completed-badge.parts-procurement-tile-badge--request {
  background: #c2410c;
}

.completed-badge.parts-procurement-tile-badge--arrived {
  background: #047857;
}

.completed-badge.parts-procurement-tile-badge--quote {
  background: #854d0e;
}

.completed-badge.parts-procurement-tile-badge--inquiry {
  background: #be123c;
}

.completed-badge.parts-procurement-tile-badge--ordered {
  background: #1d4ed8;
}

.schedule-tile-content {
  flex: 1;
  min-width: 0;
}

/* 1행: 업체명 + 기종 (1:1 비율) */
.schedule-tile-row1 {
  display: flex;
  gap: 4px;
}

.schedule-tile-company {
  flex: 1;
  font-size: 11.5px;
  font-weight: 600;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.schedule-tile-model {
  flex: 1;
  font-size: 10.5px;
  color: #4b5563;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  text-align: right;
}

/* 2행: 증상 */
.schedule-tile-symptom {
  font-size: 10px;
  color: #4b5563;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-schedule-ticket.has-schedule-lock-control .tile-symptom {
  padding-right: 18px;
}

.mobile-schedule-ticket .schedule-lock-control {
  right: 4px;
  bottom: 4px;
  width: 15px;
  height: 15px;
  touch-action: manipulation;
}

.schedule-tile-delete {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  color: #9ca3af;
  margin-top: 2px;
}

.schedule-tile-delete:active {
  background: #fee2e2;
  color: #ef4444;
}

/* 빈 플레이스홀더 (2열 차지) */
.drop-placeholder {
  grid-column: span 2;
}

/* 담당자 선택 버튼 */
.worker-select-btn {
  padding: 10px 8px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: white;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  transition: all 0.15s ease;
}

.worker-select-btn.selected {
  border-color: #4f46e5;
  background: #eef2ff;
  color: #4f46e5;
}

/* 요일 선택 버튼 (모달) */
.assign-day-btn {
  padding: 10px 4px;
  border-radius: 8px;
  border: 2px solid #e5e7eb;
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  transition: all 0.15s ease;
}

.assign-day-btn.selected {
  border-color: #4f46e5;
  background: #4f46e5;
  color: white;
}

/* 드롭존 스타일 */
.drop-zone {
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

.drop-zone.drop-active {
  border: 2px dashed #c7d2fe;
}

.drop-zone.drop-hover {
  background: #eef2ff !important;
  border: 2px dashed #6366f1 !important;
  transform: scale(1.01);
}

.drop-placeholder {
  transition: all 0.2s ease;
}

.drop-zone.drop-hover .drop-placeholder {
  border-color: #6366f1;
  background: #e0e7ff;
  color: #4f46e5;
}

/* PC에서 모바일 전용 요소 숨김 → common.css로 이동됨
 * 이 파일은 max-width:767px에서만 로드되므로 min-width:768px 규칙은 무효 */

/* ========================================
     모바일 터치 UI 최적화
     ======================================== */

/* 인원카드 헤더의 + 버튼 */
.btn-add-custom-tile {
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-add-custom-tile:active {
  transform: scale(0.95);
}

#mobile-title-group {
  max-width: calc(100vw - 92px);
}

#mobile-header-row #app-title {
  min-width: 0;
}

#mobile-header-actions {
  min-width: 0;
  gap: 4px !important;
}

#mobile-header-actions .release-announcement-entry {
  color: #475569;
  opacity: 0.78;
}

.ascp-branch-switcher-mobile {
  max-width: 36px;
}

#app-logo {
  width: 48px;
  height: auto;
  flex: 0 0 auto;
}

@media (max-width: 430px) {
  #mobile-title-group {
    flex: 1 1 auto;
    max-width: none;
  }

  #mobile-header-actions {
    flex: 0 1 auto;
    gap: 4px;
  }

  #mobile-header-row:has(.local-api-emergency-badge:not(.hidden)) > .flex {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  #mobile-header-row:has(.local-api-emergency-badge:not(.hidden)) #mobile-title-group {
    flex-basis: 100%;
  }

  #mobile-header-row:has(.local-api-emergency-badge:not(.hidden)) #mobile-header-actions {
    margin-left: auto;
  }
}

@media (max-width: 359px) {
  #app-logo {
    width: 42px;
  }

  .ascp-header-icon-control {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
  }
}

#realtime-search-surface {
  min-height: 38px;
}

#realtime-search-surface #search-input {
  padding-left: 43px;
  padding-right: 43px;
  line-height: 1.35;
}

.main-search-icon-btn {
  position: absolute;
  top: 50%;
  width: 30px;
  height: 30px;
  min-width: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  z-index: 2;
  transform: translateY(-50%);
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    transform 120ms ease;
}

.main-search-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke-width: 2.4;
}

.main-search-icon-btn.hidden {
  display: none;
}

.main-search-icon-btn:active {
  background: #eef2f7;
  border-color: #cbd5e1;
  transform: translateY(-50%) scale(0.94);
}

.main-search-condition-trigger {
  left: 4px;
}

.main-search-clear {
  right: 4px;
  border-radius: 999px;
}

.schedule-ticket-tools {
  min-width: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 44px minmax(96px, 1fr);
  gap: 6px;
  align-items: center;
  margin-right: 8px;
}

.schedule-filter-cycle {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.12s ease,
    background 0.12s ease,
    color 0.12s ease;
  width: 44px;
  min-width: 44px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  background: #374151;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
}

.schedule-filter-cycle.is-install {
  background: #047857;
}

.schedule-filter-cycle:active {
  transform: scale(0.95);
}

.schedule-ticket-search {
  height: 28px;
  width: 100%;
  min-width: 0;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  padding: 0 32px 0 9px;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  outline: none;
  -webkit-appearance: none;
}

.schedule-ticket-search-wrap {
  position: relative;
  min-width: 0;
}

.schedule-ticket-search-clear {
  position: absolute;
  top: 50%;
  right: 2px;
  width: 26px;
  height: 26px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  transform: translateY(-50%);
}

.schedule-ticket-search-clear.hidden {
  display: none;
}

.schedule-ticket-search-clear svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.3;
}

.schedule-ticket-search-clear:active {
  background: #eef2f7;
  transform: translateY(-50%) scale(0.92);
}

#mobile-week-nav {
  width: 118px;
  display: grid !important;
  grid-template-columns: 28px 54px 28px;
  gap: 4px !important;
  align-items: center;
  justify-content: end;
}

#mobile-week-nav button {
  width: 28px;
  height: 28px;
  padding: 0 !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

#mobile-week-nav > div {
  width: 54px;
  min-width: 54px;
  overflow: hidden;
}

#mobile-week-label {
  font-size: 12px !important;
  font-weight: 900 !important;
}

#mobile-week-dates {
  font-size: 8px !important;
  white-space: nowrap;
}

.schedule-ticket-search::placeholder {
  color: #94a3b8;
  font-weight: 500;
}

.schedule-ticket-search:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 2px rgba(100, 116, 139, 0.14);
}

/* 설치 티켓 좌측 보더 (초록) */
.schedule-ticket-card.border-l-emerald-500 {
  border-left-color: #10b981;
}

/* 빠른 업무 추가 모달 */
#quick-task-modal .quick-task-modal-header {
  margin: -16px -16px 12px;
}

#quick-task-modal input:focus {
  outline: none;
  border-color: #0f62fe;
  box-shadow: 0 0 0 2px rgba(15, 98, 254, 0.14);
}

/* 터치 영역 최소 크기 보장 (WCAG) */
.btn-pick-ticket,
.schedule-tile-delete,
.btn-add-custom-tile {
  min-width: 44px;
  min-height: 32px;
}

/* ========================================
     배정된 티켓 강조 (스케줄 티켓 패널)
     ======================================== */
.schedule-ticket-card.scheduled {
  border-left: 5px solid #f59e0b !important;
}

/* 모바일 스케줄 티켓 선택 패널용 */
.mobile-ticket-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: stretch;
  padding: 8px 10px 8px 4px;
}

.mobile-ticket-card__expand {
  align-self: center;
  justify-self: center;
  width: 30px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #64748b;
  touch-action: manipulation;
}

.mobile-ticket-card__expand svg {
  width: 18px;
  height: 18px;
  stroke-width: 2.4;
}

.mobile-ticket-card__expand:active {
  background: rgba(100, 116, 139, 0.12);
}

.mobile-ticket-card__body {
  min-width: 0;
}

.mobile-ticket-card__headline,
.mobile-ticket-card__summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.mobile-ticket-card__headline {
  margin-bottom: 2px;
}

.mobile-ticket-card__summary {
  font-size: 12px;
}

.mobile-ticket-card__received,
.mobile-ticket-card__worker {
  flex: none;
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.mobile-ticket-card__meta {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  margin-top: 3px;
  color: #64748b;
  font-size: 10px;
  line-height: 1.25;
}

.mobile-ticket-card__meta > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mobile-ticket-card__details {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(148, 163, 184, 0.36);
  display: grid;
  gap: 5px;
}

.mobile-ticket-card__details.hidden {
  display: none;
}

.mobile-ticket-card__details > div {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 6px;
  align-items: start;
  font-size: 11px;
  line-height: 1.35;
}

.mobile-ticket-card__details span {
  color: #64748b;
  font-weight: 700;
}

.mobile-ticket-card__details strong {
  min-width: 0;
  color: #1f2937;
  font-weight: 650;
  overflow-wrap: anywhere;
}

.mobile-ticket-card.scheduled {
  border-left: 5px solid #f59e0b !important;
}

/* ========================================
   진행중 배지 교차 표시 (디졸브)
======================================== */
/* ========================================
   모바일 스케줄 그리드 (데스크탑 스타일 적용 + 2배 확대)
   ======================================== */

/* 인원 카드 컨테이너 */
#mobile-schedule-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 8px 8px 160px;
  min-width: 200vw;
  /* 2배 확대 */
}

/* 인원 카드 */
.mobile-personnel-card {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  transition: all 0.2s;
}

/* 인원 헤더 */
.mobile-personnel-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid #dbe3ea;
}

/* 카드 드래그 핸들 */
.card-drag-handle {
  width: 24px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  cursor: grab;
  flex-shrink: 0;
  touch-action: none;
  transition: color 0.2s;
}

.card-drag-handle:active {
  color: #4f46e5;
  cursor: grabbing;
}

/* 카드 드래그 상태 */
.mobile-personnel-card.card-dragging {
  opacity: 0.5;
  transform: scale(0.98);
  border: 2px dashed #4f46e5;
}

.mobile-personnel-card.card-drop-target {
  border: 2px dashed #d1d5db;
}

.mobile-personnel-card.card-drop-hover {
  border: 2px solid #4f46e5;
  background: #eef2ff;
  transform: scale(1.02);
}

.mobile-personnel-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #26384f;
  color: white;
  font-weight: 600;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mobile-personnel-name {
  font-weight: 800;
  font-size: 14px;
  color: #0f172a;
  flex: 1;
}

.mobile-personnel-count {
  font-size: 12px;
  color: #6b7280;
}

/* 주간 그리드 (월~토) */
.mobile-weekly-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 3px;
  align-items: stretch;
}

/* 요일 헤더 */
.mobile-day-header {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 3px;
  min-height: 24px;
  padding: 2px 3px 4px;
  color: #1f2937;
  border-bottom: 2px solid #cbd5e1;
  min-width: 0;
}

.mobile-day-title {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 0;
  overflow: hidden;
}

.mobile-day-header .day-name {
  font-size: 13px;
  line-height: 1;
  font-weight: 900;
  color: #111827;
}

.mobile-day-header .day-date {
  font-size: 10px;
  line-height: 1;
  font-weight: 800;
  color: #64748b;
}

.schedule-order-open-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  -webkit-user-select: none;
}

.schedule-order-open-btn svg {
  width: 13px;
  height: 13px;
}

.schedule-order-open-btn:active {
  background: #e5e7eb;
  color: #111827;
}

/* 드롭존 셀 */
.mobile-day-cell {
  min-height: 112px;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 4px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 2px;
  overflow: visible;
  position: relative;
  min-width: 0;
  box-sizing: border-box;
}

.mobile-day-cell.has-tickets {
  background: #f1f6fb;
  border-color: #94a3b8;
}

.mobile-day-cell[data-submitting="true"] {
  opacity: 0.68;
  pointer-events: none;
}

.mobile-day-cell::after {
  content: "";
  display: block;
  flex: 0 0 24px;
  min-height: 24px;
}

/* 드롭존 내 티켓 타일 (PC 버전 스타일) */
.mobile-schedule-ticket {
  background: #ffffff;
  border: 1px solid #d7dee8;
  border-left: 3px solid #4f46e5;
  border-radius: 4px;
  padding: 5px 6px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  display: block;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  /* touch-action 제거 - 부모의 none이 적용됨 */
  transition:
    transform 0.12s ease,
    border-color 0.12s ease,
    background 0.12s ease;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.04);
}

.mobile-schedule-ticket:active {
  transform: scale(0.98);
}

.mobile-schedule-ticket.custom {
  border-left-color: #8b5cf6;
  background: #faf5ff;
}

.mobile-schedule-ticket.install {
  border-left-color: #10b981;
  background: #ecfdf5;
}

.mobile-schedule-ticket.selected-ticket {
  background: #fef3c7;
  border-left-color: #fbbf24;
}

/* 타일 내부 텍스트 (2줄 구성) */
.mobile-schedule-ticket .tile-header {
  font-size: 11px;
  line-height: 1.15;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 1px;
  padding-right: 10px;
  min-width: 0;
  max-width: 100%;
}

.mobile-schedule-ticket .tile-symptom {
  font-size: 9px;
  line-height: 1.15;
  font-weight: 600;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  max-width: 100%;
}

.mobile-schedule-ticket .tile-symptom.tile-install-day-label {
  color: #dc2626;
  font-weight: 800;
}

/* 타일 상태 배지 (우상단 점) */
.mobile-schedule-ticket {
  position: relative;
}

.mobile-schedule-ticket .status-dot {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  z-index: 1;
}

.mobile-schedule-ticket .status-dot.completed {
  background: #10b981;
  /* 완료: 초록 */
}

.mobile-schedule-ticket .status-dot.in-progress {
  background: #f59e0b;
  /* 진행중: 주황 */
}

.mobile-schedule-ticket .status-dot.urgent {
  background: #ef4444;
  /* 긴급: 빨강 */
}

/* 완료/과거 타일 흐림 처리 */
.mobile-schedule-ticket.dimmed-tile {
  opacity: 1;
  position: relative;
}

.mobile-schedule-ticket.dimmed-tile .tile-header,
.mobile-schedule-ticket.dimmed-tile .tile-symptom {
  opacity: 0.5;
}

.mobile-schedule-ticket .status-dot,
.mobile-schedule-ticket .tile-badge-stack {
  opacity: 1;
  z-index: 6;
}

.mobile-tile-badge-stack {
  top: 1px;
  right: 1px;
}

.schedule-order-sheet {
  position: absolute;
  inset: 0;
  z-index: 70;
  pointer-events: auto;
  user-select: none;
  -webkit-user-select: none;
}

.schedule-order-sheet.hidden {
  display: none;
}

.schedule-order-scrim {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.18);
}

.schedule-order-panel {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 8px;
  max-height: min(58%, 360px);
  display: flex;
  flex-direction: column;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #f8fafc;
  box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.22);
  overflow: hidden;
  touch-action: none;
}

.schedule-order-grabber {
  width: 34px;
  height: 4px;
  border-radius: 999px;
  background: #94a3b8;
  margin: 7px auto 4px;
  flex: 0 0 auto;
}

.schedule-order-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 10px 8px;
  border-bottom: 1px solid #d7dee8;
}

.schedule-order-title {
  font-size: 14px;
  line-height: 1.15;
  font-weight: 900;
  color: #0f172a;
}

.schedule-order-subtitle {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1;
  font-weight: 700;
  color: #64748b;
}

.schedule-order-close {
  height: 26px;
  padding: 0 9px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  touch-action: manipulation;
}

.schedule-order-list {
  overflow-y: auto;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.schedule-order-item {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #cbd5e1;
  border-left: 4px solid #4f46e5;
  border-radius: 6px;
  background: #ffffff;
  padding: 5px 7px 5px 4px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.05);
}

.schedule-order-item.is-install {
  border-left-color: #10b981;
  background: #ecfdf5;
}

.schedule-order-item.is-custom {
  border-left-color: #8b5cf6;
  background: #faf5ff;
}

.schedule-order-item.is-dragging {
  opacity: 0.82;
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.schedule-order-item.is-recent .schedule-order-handle {
  color: #1d4ed8;
  background: #bfdbfe;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.24);
  transition:
    color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.schedule-order-handle {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  color: #4b5563;
  background: #e5e7eb;
  touch-action: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.schedule-order-handle svg {
  width: 13px;
  height: 13px;
}

.schedule-order-handle:active {
  color: #1d4ed8;
  background: #dbeafe;
  cursor: grabbing;
}

.schedule-order-copy {
  min-width: 0;
  flex: 1;
}

.schedule-order-company {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 900;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-order-meta {
  margin-top: 1px;
  font-size: 10px;
  line-height: 1.15;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.schedule-order-empty {
  padding: 18px 8px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
}

.schedule-order-drag-lock,
.schedule-order-drag-lock * {
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-user-drag: none !important;
}

/* 줌 기능용 컨테이너 */
#schedule-assign-panel {
  /* 브라우저 기본 제스처 비활성화 (줌/팬은 JS로 직접 구현) */
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
  /* 팬/줌 시 아바타 등 자식 요소가 패널 밖으로 삐져나오지 않도록 */
  overflow: hidden;
}

#schedule-assign-panel:active {
  cursor: grabbing;
}

#mobile-schedule-grid {
  transform-origin: top left;
  /* transition 제거 - requestAnimationFrame으로 부드럽게 처리 */
  will-change: transform;
}

#mobile-schedule-view {
  height: calc(100dvh - 105px) !important;
}

/* 스케줄은 하단 기능 FAB나 모달용 안전 여백을 예약하지 않는다. */
body.mobile-schedule-surface-active #left-panel {
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}

body.mobile-schedule-surface-active #left-panel > .dashboard-fixed {
  flex: 0 0 auto;
}

body.mobile-schedule-surface-active #mobile-schedule-view {
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0;
  padding-bottom: 0 !important;
}

.mobile-schedule-empty-state {
  width: min(92vw, 420px);
  margin: 24px auto;
  padding: 18px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}

.mobile-schedule-empty-title {
  font-size: 14px;
  font-weight: 700;
  color: #0f172a;
}

.mobile-schedule-empty-copy {
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.45;
  color: #64748b;
}

.mobile-schedule-empty-action {
  margin-top: 14px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #4f46e5;
  border-radius: 8px;
  background: #4f46e5;
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
}

/* ====================================
   프로그레스 링 오버레이
   ==================================== */
.progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.2s,
    visibility 0.2s;
}

.progress-overlay.active {
  opacity: 1;
  visibility: visible;
}

.progress-ring-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.2);
  stroke-width: 8;
}

.progress-ring-fill {
  fill: none;
  stroke: #4f46e5;
  stroke-width: 8;
  stroke-linecap: round;
  stroke-dasharray: 314;
  stroke-dashoffset: 314;
  transition: stroke-dashoffset 0.3s ease;
}

.progress-percent {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 24px;
  font-weight: 700;
  color: white;
}

.progress-status {
  margin-top: 16px;
  font-size: 14px;
  color: white;
  text-align: center;
}

/* 모바일 도구는 상단 메뉴를 사용한다. PC 푸터는 데스크톱 CSS가 담당한다. */
#footer-bar {
  display: none !important;
}

/* 대시보드 카운터 숨김 (기능 미사용) */
#dashboard-stats {
  display: none !important;
}

.main-mode-switch-rail {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 10px auto;
  max-width: 360px;
}

.main-mode-switch-btn {
  min-width: 0;
  height: 32px;
  border: 1px solid #d7dde8;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.main-mode-switch-btn.is-active {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.main-mode-switch-btn--empty {
  background: #f1f5f9;
  color: transparent;
}

.parts-dashboard-view {
  height: calc(100dvh - 50px);
  overflow-y: auto;
  background: #f3f6fb;
  padding: 8px;
}

.parts-dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.parts-dashboard-status-tools {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 6px;
}

.parts-dashboard-toolbar h3 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
}

.parts-dashboard-toolbar p {
  margin: 2px 0 0;
  color: #64748b;
  font-size: 10px;
  line-height: 1.2;
}

.parts-dashboard-sync-state {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  min-height: 18px;
  margin-top: 0;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0 7px;
  white-space: nowrap;
}

.parts-dashboard-progress-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 1 1 132px;
  min-width: 84px;
  max-width: 180px;
}

.parts-dashboard-progress-search-wrap.hidden {
  display: none;
}

.parts-dashboard-progress-search {
  width: 100%;
  height: 32px;
  padding: 0 34px 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #172033;
  font-size: 12px;
  font-weight: 700;
}

.parts-dashboard-progress-search:disabled {
  background: #eef2f7;
  color: #94a3b8;
}

.parts-dashboard-progress-search-clear {
  position: absolute;
  right: 2px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #64748b;
  transform: translateY(-50%);
}

.parts-dashboard-progress-search-clear.hidden {
  display: none;
}

.parts-dashboard-progress-search-clear svg {
  width: 15px;
  height: 15px;
}

.parts-dashboard-sync-state[data-state="synced"] {
  border-color: #86efac;
  background: #dcfce7;
  color: #166534;
}

.parts-dashboard-sync-state[data-state="saving"],
.parts-dashboard-sync-state[data-state="checking"] {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.parts-dashboard-sync-state[data-state="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.parts-dashboard-add-row {
  width: 38px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: #4f6f8f;
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
}

.parts-dashboard-toolbar-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.parts-dashboard-history-toggle {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.parts-dashboard-history-toggle.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.parts-dashboard-history-search {
  width: min(150px, 32vw);
  height: 32px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
}

.parts-dashboard-empty,
.parts-dashboard-history-empty {
  padding: 18px;
  text-align: center;
  font-size: 12px;
  color: #64748b;
}

.parts-dashboard-trash-btn,
.parts-dashboard-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 32px;
  border: 1px solid #5f6f7f;
  border-radius: 8px;
  background: #5f6f7f;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 0;
}

.parts-dashboard-history-toggle.parts-dashboard-action-btn {
  border-color: #4f6f8f;
  background: #4f6f8f;
}

.parts-dashboard-trash-btn.parts-dashboard-action-btn {
  border-color: #8a555a;
  background: #8a555a;
}

@media (max-width: 359px) {
  .parts-dashboard-toolbar {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .parts-dashboard-status-tools,
  .parts-dashboard-toolbar-actions {
    flex: 1 1 100%;
  }

  .parts-dashboard-progress-search-wrap {
    max-width: none;
  }

  .parts-dashboard-action-btn,
  .parts-dashboard-add-row {
    flex: 1 1 0;
    width: auto;
  }
}

.parts-dashboard-card-table {
  overflow-x: auto;
  overflow-y: visible;
  background: #f8f9fa;
}

.parts-dashboard-header {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  min-width: 100%;
  border-top: 1px solid #c8d3e1;
  border-left: 1px solid #c8d3e1;
  background: #eef1f4;
}

.parts-dashboard-header span {
  min-width: 0;
  min-height: 28px;
  border-right: 1px solid #c8d3e1;
  border-bottom: 1px solid #c8d3e1;
  color: #111827;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 28px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.parts-dashboard-header span:nth-child(n + 5) {
  display: none;
}

.parts-dashboard-rows {
  display: grid;
  gap: 0;
  border-left: 1px solid #c8d3e1;
  background: #f8f9fa;
  overflow: visible;
  padding-bottom: 160px;
}

.parts-dashboard-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(74px, 1fr));
  gap: 0;
  min-width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #f8f9fa;
}

.parts-dashboard-row.parts-dashboard-row--vendor-match {
  background: #fff7cc;
}

.parts-dashboard-row:hover {
  background: #eff6ff;
}

.parts-dashboard-row.parts-dashboard-row--status-moved,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-cell,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-mobile-summary span,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-input,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-owner-select,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-price-trigger,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-status-trigger,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-receipt-trigger,
.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-cycle-trigger {
  animation: parts-dashboard-status-moved-fade 13s ease var(--parts-status-moved-highlight-delay, 0ms) both;
}

.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-cell {
  position: relative;
  isolation: isolate;
}

.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: #fef08a;
  animation: parts-dashboard-status-moved-overlay-fade 13s ease var(--parts-status-moved-highlight-delay, 0ms) both;
}

.parts-dashboard-row.parts-dashboard-row--status-moved .parts-dashboard-cell > * {
  position: relative;
  z-index: 1;
}

@keyframes parts-dashboard-status-moved-fade {
  0%,
  76.923% {
    background-color: #fef08a;
  }

  100% {
    background-color: #ffffff;
  }
}

@keyframes parts-dashboard-status-moved-overlay-fade {
  0%,
  76.923% {
    opacity: 0.72;
  }

  100% {
    opacity: 0;
  }
}

.parts-dashboard-mobile-summary {
  display: contents;
}

.parts-dashboard-mobile-summary span {
  min-width: 0;
  min-height: 30px;
  border-right: 1px solid #c8d3e1;
  border-bottom: 1px solid #c8d3e1;
  color: #0f172a;
  background: inherit;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 30px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}

.parts-dashboard-mobile-summary [data-summary-field="arrivalStatus"] {
  align-self: stretch;
  justify-self: stretch;
  width: auto;
  min-height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-right: 1px solid #c8d3e1;
  border-bottom: 1px solid #c8d3e1;
  border-radius: 0;
  background: inherit;
  color: transparent;
  font-size: 0;
  padding: 0;
  box-sizing: border-box;
  white-space: nowrap;
}

.parts-dashboard-mobile-summary [data-summary-field="arrivalStatus"]::before {
  content: attr(data-status);
  width: 44px;
  min-height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0f766e;
  border-radius: 3px;
  background: #ccfbf1;
  color: #0f766e;
  font-size: 8.5px;
  font-weight: 650;
  line-height: 1.1;
  padding: 0 2px;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="접수"] {
  color: transparent;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="접수"]::before {
  border-color: #c20000;
  background: #fee2e2;
  color: #c20000;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="입고"] {
  color: transparent;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="입고"]::before {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="견적발행"] {
  color: transparent;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="견적발행"]::before {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="발주완료"] {
  color: transparent;
}

.parts-dashboard-mobile-summary
  [data-summary-field="arrivalStatus"][data-status="발주완료"]::before {
  border-color: #7c3aed;
  background: #ede9fe;
  color: #5b21b6;
}

.parts-dashboard-mobile-detail-close,
.parts-dashboard-mobile-detail-stack {
  display: none;
}

body.parts-dashboard-mobile-detail-active {
  overflow: hidden;
}

.parts-dashboard-mobile-screen-backdrop {
  position: fixed;
  z-index: 100025;
  inset: 0;
  display: none;
  border: 0;
  background: rgba(15, 23, 42, 0.48);
}

.parts-dashboard-mobile-screen-backdrop.is-active {
  display: block;
}

.parts-dashboard-row--mobile.is-detail-open {
  position: fixed;
  z-index: 100030;
  top: 50%;
  right: 10px;
  left: 10px;
  max-height: min(
    76dvh,
    calc(
      100dvh - 116px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    )
  );
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: visible;
  border: 1px solid #d7dde8;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.34);
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-mobile-summary,
.parts-dashboard-row--mobile.is-detail-open
  .parts-dashboard-mobile-detail-close,
.parts-dashboard-row--mobile.is-detail-open
  .parts-dashboard-mobile-detail-stack {
  position: relative;
  z-index: 1;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-mobile-summary {
  display: none;
}

.parts-dashboard-row--mobile.is-detail-open
  .parts-dashboard-mobile-detail-close {
  order: 3;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  height: 38px;
  margin: 0 10px 10px;
  border: 0;
  border-radius: 8px;
  background: #334155;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}

.parts-dashboard-row--mobile.is-detail-open
  .parts-dashboard-mobile-detail-stack {
  order: 2;
  position: relative;
  z-index: 3;
  display: grid;
  gap: 8px;
  min-height: 0;
  overflow: visible;
  overscroll-behavior: contain;
  padding: 10px;
  border-radius: 10px 10px 0 0;
  background: #eef3f8;
}

.parts-dashboard-mobile-detail-grid {
  display: grid;
  min-width: 0;
  overflow: visible;
  border-top: 1px solid #d7dde8;
  border-left: 1px solid #d7dde8;
  background: #ffffff;
}

.parts-dashboard-mobile-detail-grid--three {
  grid-template-columns: minmax(0, 1.1fr) minmax(72px, 0.72fr) minmax(0, 0.9fr);
}

.parts-dashboard-mobile-detail-grid--one {
  grid-template-columns: minmax(0, 1fr);
}

.parts-dashboard-mobile-detail-grid--five {
  grid-template-columns:
    minmax(58px, 0.68fr) minmax(58px, 0.68fr) minmax(48px, 0.58fr)
    minmax(48px, 0.58fr) minmax(84px, 1.08fr);
}

.parts-dashboard-mobile-detail-grid--two {
  grid-template-columns: minmax(0, 0.72fr) minmax(84px, 0.28fr);
}

@media (max-width: 390px) {
  .parts-dashboard-row--mobile.is-detail-open {
    right: 6px;
    left: 6px;
    max-height: min(
      80dvh,
      calc(
        100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
      )
    );
  }

  .parts-dashboard-row--mobile.is-detail-open
    .parts-dashboard-mobile-detail-stack {
    gap: 6px;
    padding: 7px;
  }

  .parts-dashboard-mobile-detail-grid--three {
    grid-template-columns: minmax(0, 1fr) minmax(62px, 0.62fr) minmax(0, 0.86fr);
  }

  .parts-dashboard-mobile-detail-grid--five {
    grid-template-columns:
      minmax(48px, 0.64fr) minmax(48px, 0.64fr) minmax(42px, 0.52fr)
      minmax(42px, 0.52fr) minmax(78px, 1.12fr);
  }

  .parts-dashboard-mobile-detail-grid--two {
    grid-template-columns: minmax(0, 0.7fr) minmax(78px, 0.3fr);
  }
}

.parts-dashboard-cell {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border-right: 1px solid #c8d3e1;
  border-bottom: 1px solid #c8d3e1;
  background: #ffffff;
  text-align: center;
}

.parts-dashboard-mobile-label {
  min-height: 18px;
  border-bottom: 1px solid #edf1f7;
  color: #64748b;
  background: #f8fafc;
  font-size: 9px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parts-dashboard-input-wrap,
.parts-dashboard-status-cell {
  position: relative;
  min-width: 0;
}

.parts-dashboard-date-wrap {
  display: flex;
  align-items: center;
}

.parts-dashboard-input,
.parts-dashboard-status-trigger,
.parts-dashboard-receipt-trigger,
.parts-dashboard-cycle-trigger {
  width: 100%;
  min-width: 0;
  height: 27px;
  border: 0;
  border-radius: 3px;
  background: #ffffff;
  color: #0f172a;
  font-size: var(--parts-cell-font-size, 10.5px);
  font-weight: 600;
  line-height: 1.15;
  padding: 0 3px;
  outline: none;
  overflow: hidden;
  text-overflow: ellipsis;
}

.parts-dashboard-row--mobile:not(.is-detail-open) > .parts-dashboard-cell {
  display: none;
}

.parts-dashboard-receipt-trigger {
  cursor: pointer;
  text-align: center;
  width: 58px;
  height: 22px;
  border-width: 0.5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 600;
  padding: 0 2px;
  white-space: nowrap;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-input-wrap,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-status-cell,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-price-cell,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-date-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-price-cell {
  z-index: 8;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-price-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-status-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-receipt-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-cycle-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-owner-select {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-input,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-status-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-receipt-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-cycle-trigger {
  text-align: center;
}

.parts-dashboard-row--mobile.is-detail-open
  [data-column="note"]
  .parts-dashboard-input {
  text-align: center;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-date-value {
  height: 28px;
  padding: 0 22px 0 2px;
  text-align: center;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-date-trigger {
  top: 5px;
  right: 2px;
  width: 20px;
  height: 20px;
  border-radius: 5px;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-date-trigger svg {
  width: 13px;
  height: 13px;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-status-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-receipt-trigger,
.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-cycle-trigger {
  width: calc(100% - 6px);
  max-width: 56px;
  height: 22px;
  margin: 0 auto;
  font-size: 9px;
  padding: 0 1px;
  white-space: nowrap;
}

.parts-dashboard-row--mobile.is-detail-open
  [data-column="note"]
  .parts-dashboard-input-wrap {
  min-height: 32px;
}

.parts-dashboard-status-trigger {
  width: 50px;
  height: 20px;
  border-width: 1px;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 600;
  padding: 0 2px;
  white-space: nowrap;
}

.parts-dashboard-cycle-trigger {
  cursor: pointer;
  width: 58px;
  height: 22px;
  border-width: 0.5px;
  border-color: #0f766e;
  border-radius: 3px;
  background: #ccfbf1;
  color: #636363;
  text-align: center;
  font-size: 9.5px;
  font-weight: 600;
  padding: 0 2px;
  white-space: nowrap;
}

.parts-dashboard-cycle-trigger.is-empty {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #64748b;
}

[data-column="customerName"] .parts-dashboard-input,
[data-column="ownerName"] .parts-dashboard-owner-select,
[data-column="arrivalStatus"] .parts-dashboard-status-trigger,
[data-column="saleType"] .parts-dashboard-cycle-trigger,
[data-column="purchaseReceipt"] .parts-dashboard-receipt-trigger,
[data-column="note"] .parts-dashboard-input {
  padding-left: 3px;
  padding-right: 3px;
}

.parts-dashboard-cycle-trigger[data-value="고객발송"] {
  border-color: #2563eb;
  background: #dbeafe;
  color: #c20000;
}

.parts-dashboard-cycle-trigger[data-value="AS출장"] {
  border-color: #0f766e;
  background: #d3eee8;
  color: #636363;
}

.parts-dashboard-receipt-trigger[data-value="미수신"] {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

.parts-dashboard-receipt-trigger[data-value="수신"] {
  border-color: #16a34a;
  background: #e8f2ec;
  color: #166534;
}

.parts-dashboard-status-trigger[data-status="접수"] {
  border-color: #7c3aed;
  background: #eed3e9;
  color: #5b21b6;
}

.parts-dashboard-status-trigger[data-status="입고"] {
  border-color: #16a34a;
  background: #c6ddce;
  color: #166534;
}

.parts-dashboard-status-trigger[data-status="견적발행"] {
  border-color: #ea580c;
  background: #f5e8d6;
  color: #9a3412;
}

.parts-dashboard-status-trigger[data-status="문의중"] {
  border-color: #e11d48;
  background: #ffe4e6;
  color: #9f1239;
}

.parts-dashboard-status-trigger[data-status="발주완료"] {
  border-color: #2563eb;
  background: #cedced;
  color: #1e40af;
}

.parts-dashboard-status-trigger[data-status="출하완료"] {
  border-color: #475569;
  background: #e2e8f0;
  color: #1e293b;
}

.parts-dashboard-status-menu button[data-status="삭제"] {
  border-color: #dc2626;
  background: #fee2e2;
  color: #991b1b;
}

.parts-dashboard-status-pulse {
  animation: parts-dashboard-status-pulse 1.2s ease-in-out infinite;
}

@keyframes parts-dashboard-status-pulse {
  0%,
  100% {
    background: #fff7ed;
    box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.28);
  }

  50% {
    background: #fed7aa;
    box-shadow: 0 0 0 5px rgba(249, 115, 22, 0.12);
  }
}

.parts-dashboard-price-cell {
  position: relative;
  min-width: 0;
}

.parts-dashboard-price-trigger {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  min-width: 0;
  height: 27px;
  border: 1px solid #cbd5e1;
  border-radius: 3px;
  background: #ffffff;
  color: #0f172a;
  font-size: var(--parts-cell-font-size, 11px);
  font-weight: 600;
  line-height: 1.15;
  padding: 0 3px;
  text-align: center;
}

.parts-dashboard-price-trigger.has-labor-price {
  color: #9a3412;
}

.parts-dashboard-price-trigger.has-quote-image::after {
  content: "";
  position: absolute;
  top: 3px;
  right: 3px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 1px #ffffff;
}

.parts-dashboard-price-total {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parts-dashboard-price-modal {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 4px);
  width: min(260px, calc(100vw - 36px));
  border: 1px solid #fb923c;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.2);
  padding: 8px;
}

.parts-dashboard-row--mobile.is-detail-open .parts-dashboard-price-modal {
  z-index: 120;
  top: auto;
  bottom: calc(100% + 6px);
  left: 0;
  width: min(280px, calc(100vw - 44px));
  max-height: min(210px, calc(100dvh - 220px));
  overflow-y: auto;
}

.parts-dashboard-price-modal label {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.parts-dashboard-price-modal input {
  width: 100%;
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  padding: 0 8px;
  text-align: right;
}

.parts-dashboard-price-modal-total,
.parts-dashboard-price-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.parts-dashboard-price-modal-total {
  border-top: 1px solid #fed7aa;
  margin-top: 4px;
  padding-top: 7px;
  color: #9a3412;
  font-size: 12px;
  font-weight: 900;
}

.parts-dashboard-quote-image-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  border-top: 1px solid #ede9fe;
  margin-top: 7px;
  padding-top: 7px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 800;
}

.parts-dashboard-quote-image-view,
.parts-dashboard-quote-image-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid #c4b5fd;
  border-radius: 7px;
  background: #f5f3ff;
  color: #6d28d9;
}

.parts-dashboard-quote-image-delete {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.parts-dashboard-quote-image-view svg,
.parts-dashboard-quote-image-delete svg {
  width: 16px;
  height: 16px;
}

.parts-dashboard-price-modal-actions {
  justify-content: flex-end;
  margin-top: 8px;
}

.parts-dashboard-price-modal-actions button {
  height: 28px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  padding: 0 10px;
}

.parts-dashboard-price-modal-actions [data-price-action="save"] {
  border-color: #f97316;
  background: #f97316;
  color: #ffffff;
}

.parts-dashboard-quote-image-viewer,
.process-quote-image-viewer {
  position: fixed;
  inset: 0;
  z-index: 100060;
}

.parts-dashboard-quote-image-viewer.hidden,
.process-quote-image-viewer.hidden {
  display: none;
}

.parts-dashboard-quote-image-viewer-backdrop,
.process-quote-image-viewer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.62);
}

.parts-dashboard-quote-image-viewer-dialog,
.process-quote-image-viewer-dialog {
  position: absolute;
  inset: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #0f172a;
  padding: 42px 12px 12px;
  overflow: hidden;
  touch-action: none;
}

.parts-dashboard-quote-image-viewer-dialog img,
.process-quote-image-viewer-dialog img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #ffffff;
  transform-origin: center center;
  will-change: transform;
  touch-action: none;
}

.parts-dashboard-quote-image-close,
.process-quote-image-close {
  position: absolute;
  right: 10px;
  top: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.85);
  color: #ffffff;
}

#process-parts-cost-label.process-parts-cost-label--quote-image {
  color: #7c3aed;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.parts-dashboard-date-value {
  padding-right: 30px;
}

.parts-dashboard-native-date {
  position: absolute;
  left: 0;
  top: 100%;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
}

.parts-dashboard-date-trigger {
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 5px;
  background: #eef2ff;
  color: #1d4ed8;
}

.parts-dashboard-date-trigger svg {
  width: 14px;
  height: 14px;
}

[data-column="vendorName"] .parts-dashboard-input {
  padding-left: 30px;
  padding-right: 32px;
}

[data-column="partName"] .parts-dashboard-input {
  padding-right: 30px;
}

.parts-dashboard-request-doc-btn {
  position: absolute;
  top: 3px;
  right: 4px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border: 0;
  background: transparent;
  color: #4f46e5;
  padding: 0;
}

.parts-dashboard-request-doc-btn svg {
  width: 14px;
  height: 14px;
}

.parts-dashboard-request-doc-modal {
  position: absolute;
  z-index: 35;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  min-width: min(260px, calc(100vw - 32px));
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  padding: 9px;
}

.parts-dashboard-request-doc-modal strong {
  display: block;
  margin-bottom: 5px;
  color: #3730a3;
  font-size: 11px;
  font-weight: 900;
}

.parts-dashboard-request-doc-modal p {
  margin: 0;
  color: #1f2937;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
}

.parts-dashboard-full-text-trigger {
  cursor: text;
}

.parts-dashboard-full-text-panel {
  position: absolute;
  z-index: 36;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  min-width: min(280px, calc(100vw - 32px));
  max-height: 220px;
  overflow: auto;
  border: 1px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  padding: 9px;
}

.parts-dashboard-full-text-panel strong {
  display: block;
  margin-bottom: 5px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
}

.parts-dashboard-full-text-panel p {
  margin: 0;
  color: #1f2937;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.parts-dashboard-ticket-focus-btn,
.parts-dashboard-ticket-link-btn {
  position: absolute;
  top: 3px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  width: 22px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #1d4ed8;
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
}

.parts-dashboard-ticket-focus-btn {
  left: 4px;
}

.parts-dashboard-ticket-link-btn {
  right: 4px;
}

.parts-dashboard-ticket-focus-btn svg,
.parts-dashboard-ticket-link-btn svg {
  width: 13px;
  height: 13px;
}

.parts-dashboard-ticket-link-btn.is-linked {
  background: #dcfce7;
  color: #166534;
  box-shadow:
    inset 0 0 0 1px #86efac,
    0 1px 4px rgba(22, 101, 52, 0.18);
}

.parts-dashboard-ticket-focus-btn.is-targeted {
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow:
    inset 0 0 0 1px #93c5fd,
    0 1px 4px rgba(29, 78, 216, 0.16);
}

.parts-dashboard-trash-modal {
  position: fixed;
  inset: 0;
  z-index: 100030;
}

.parts-dashboard-trash-modal.hidden {
  display: none !important;
}

.parts-dashboard-trash-modal {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.32);
}

.parts-dashboard-trash-modal .parts-dashboard-dialog strong {
  display: block;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}


.parts-dashboard-dialog-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100030;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.32);
}

.parts-dashboard-dialog {
  width: min(360px, 100%);
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 20px 44px rgba(15, 23, 42, 0.22);
  padding: 14px;
}

.parts-dashboard-dialog h4 {
  margin: 0 0 6px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.parts-dashboard-dialog p {
  margin: 0 0 12px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.parts-dashboard-trash-restore {
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.parts-dashboard-trash-restore {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.parts-dashboard-trash-list {
  display: grid;
  gap: 7px;
  max-height: min(360px, 70vh);
  overflow: auto;
}

.parts-dashboard-trash-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
}

.parts-dashboard-trash-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.parts-dashboard-trash-actions [data-restore-row-id],
.parts-dashboard-trash-actions [data-hard-delete-row-id] {
  min-height: 30px;
  border: 1px solid #2563eb;
  border-radius: 7px;
  background: #2563eb;
  color: #ffffff;
  padding: 0 9px;
  font-size: 11px;
  font-weight: 900;
}

.parts-dashboard-trash-actions [data-hard-delete-row-id] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #dc2626;
}

.parts-dashboard-trash-item strong,
.parts-dashboard-trash-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parts-dashboard-trash-item strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.parts-dashboard-trash-item span,
.parts-dashboard-trash-empty {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.parts-dashboard-autocomplete-dropdown,
.parts-dashboard-status-menu,
.parts-dashboard-ticket-link-dropdown {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 3px);
  max-height: 160px;
  overflow-y: auto;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.16);
}

.parts-dashboard-status-menu {
  right: auto;
  min-width: max-content;
  width: max-content;
  max-width: 180px;
}

.parts-dashboard-autocomplete-dropdown button,
.parts-dashboard-status-menu button,
.parts-dashboard-ticket-link-dropdown button {
  display: block;
  width: 100%;
  border: 0;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  padding: 7px 8px;
}

.parts-dashboard-status-menu button {
  min-width: 82px;
  white-space: nowrap;
}

.parts-dashboard-autocomplete-dropdown
  button.parts-dashboard-autocomplete-active {
  background: #dbeafe;
  color: #1d4ed8;
}

.parts-dashboard-ticket-link-dropdown {
  min-width: min(280px, calc(100vw - 32px));
}

.parts-dashboard-ticket-link-search-wrap {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.parts-dashboard-ticket-link-search {
  width: 100%;
  height: 28px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  padding: 0 8px;
  outline: none;
}

.parts-dashboard-ticket-link-dropdown button strong,
.parts-dashboard-ticket-link-dropdown button span,
.parts-dashboard-ticket-link-dropdown button em {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parts-dashboard-ticket-link-section {
  position: sticky;
  top: 41px;
  z-index: 1;
  padding: 5px 8px;
  border-bottom: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  font-size: 10px;
  font-weight: 900;
}

.parts-dashboard-ticket-link-dropdown button.is-quote-request {
  background: #fff7ed;
}

.parts-dashboard-ticket-link-dropdown button.is-quote-request:hover {
  background: #ffedd5;
}

.parts-dashboard-ticket-link-dropdown button.is-current-linked {
  box-shadow: inset 3px 0 0 #f97316;
}

.parts-dashboard-ticket-link-dropdown button strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
}

.parts-dashboard-ticket-link-dropdown button span {
  margin-top: 2px;
  color: #334155;
  font-size: 10px;
  font-weight: 800;
}

.parts-dashboard-ticket-link-dropdown button em {
  margin-top: 2px;
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 700;
}

.parts-dashboard-ticket-link-empty {
  padding: 8px;
  color: #64748b;
  font-size: 10px;
  font-weight: 800;
}

.parts-dashboard-change-log-trigger {
  cursor: pointer;
}

.parts-dashboard-change-log-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 4px);
  z-index: 40;
  width: min(300px, calc(100vw - 32px));
  max-height: 260px;
  overflow: auto;
  border: 1px solid #94a3b8;
  border-radius: 7px;
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
  padding: 8px;
}

.parts-dashboard-change-log-title {
  margin-bottom: 6px;
  color: #0f172a;
  font-size: 11px;
  font-weight: 900;
}

.parts-dashboard-change-log-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border-top: 1px solid #e2e8f0;
  padding: 6px 0;
}

.parts-dashboard-change-log-item strong,
.parts-dashboard-change-log-item time,
.parts-dashboard-change-log-item span,
.parts-dashboard-change-log-empty {
  min-width: 0;
  font-size: 10px;
  line-height: 1.35;
}

.parts-dashboard-change-log-item strong {
  color: #0f172a;
  font-weight: 900;
}

.parts-dashboard-change-log-item time {
  color: #64748b;
  font-weight: 800;
  white-space: nowrap;
}

.parts-dashboard-change-log-item span {
  color: #334155;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.parts-dashboard-change-log-empty {
  color: #64748b;
  font-weight: 800;
}

/* 모달 내부 footer: 기존 하단 보정 방식으로 복원 */
.modal .safe-pb-1 {
  padding-bottom: calc(1rem + env(safe-area-inset-bottom) + 56px) !important;
}
.modal .safe-pb-075 {
  padding-bottom: calc(0.75rem + env(safe-area-inset-bottom) + 56px) !important;
}

/* ===== 일괄처리 FAB - 모바일 푸터 위 ===== */
#bulk-fab {
  right: 24px !important;
  bottom: calc(52px + env(safe-area-inset-bottom) + 16px) !important;
  left: auto !important;
}

/* Main top action popovers */
.mobile-action-menu-wrap {
  position: relative;
  min-width: 0;
}

.mobile-top-filter-btn {
  width: 100%;
  min-height: 34px;
  padding: 0.5rem 0.25rem;
  border: 1px solid #bfcbda;
  border-radius: 0.5rem;
  background-color: #dcecff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  -webkit-user-select: none;
  user-select: none;
  transition:
    background-color 150ms ease,
    transform 120ms ease;
}

.mobile-top-filter-btn--incomplete {
  background-color: #dcecff;
}

.mobile-top-filter-btn--all {
  background-color: #dcecff;
}

.mobile-top-filter-btn--install {
  background-color: #dcecff;
}

.mobile-top-filter-btn--parts {
  background-color: #dcecff;
}

.mobile-top-filter-btn.is-active {
  background-color: #cfe3fb;
  border-color: #aabbd1;
}

#btn-reception {
  border-color: #0353e9 !important;
  background: #0f62fe !important;
  color: #ffffff !important;
  box-shadow: 0 1px 3px rgba(15, 98, 254, 0.28) !important;
  font-weight: 600;
}
#btn-reception:active {
  background: #0353e9 !important;
}

#btn-ticket-mode-filter {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}
#btn-ticket-mode-filter.is-active {
  border-color: #93c5fd !important;
  background: #eff6ff !important;
  color: #1d4ed8 !important;
}

#btn-parts-filter {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}

#btn-incomplete {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}
#btn-incomplete:active {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

#btn-schedule-mode {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}
#btn-schedule-mode:active {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

#btn-ops-menu {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}
#btn-ops-menu:active {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.mobile-top-filter-btn:active {
  transform: scale(0.98);
  filter: brightness(0.92);
}

.mobile-action-popover {
  position: absolute;
  top: calc(100% + 7px);
  left: 50%;
  z-index: 80;
  display: flex;
  width: 112px;
  min-width: 112px;
  transform: translateX(-50%);
  flex-direction: column;
  gap: 6px;
  pointer-events: auto;
}

.main-action-grid > .mobile-action-menu-wrap:first-child .mobile-action-popover {
  left: 0;
  transform: none;
}

.main-action-grid > .mobile-action-menu-wrap:last-child .mobile-action-popover {
  right: 0;
  left: auto;
  transform: none;
}

.mobile-action-popover.mobile-tools-menu {
  display: grid;
  grid-template-columns: 112px;
  width: 112px;
  min-width: 112px;
}

.mobile-tools-column {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
}

.mobile-action-popover.hidden {
  display: none;
}

.mobile-action-pop {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cfd6df;
  border-radius: 10px;
  background-color: #f3f6fa;
  color: #111827;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.14);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  transform-origin: top center;
  animation: mobile-action-boing 360ms cubic-bezier(0.2, 1.35, 0.36, 1) both;
  -webkit-tap-highlight-color: transparent;
}

.mobile-action-pop[data-top-filter="incomplete"] {
  background-color: #f3f6fa;
  color: #111827;
}

.mobile-action-pop[data-top-filter="all"] {
  background-color: #f3f6fa;
  color: #111827;
}

.mobile-action-pop[data-top-filter="install"] {
  background-color: #f3f6fa;
  color: #111827;
}

.mobile-action-pop[data-top-filter^="parts:"] {
  background-color: #f3f6fa;
  color: #111827;
}

.mobile-action-pop:nth-child(2) {
  animation-delay: 45ms;
}

.mobile-action-pop:nth-child(3) {
  animation-delay: 90ms;
}

.mobile-action-pop:nth-child(4) {
  animation-delay: 135ms;
}

.mobile-action-pop:nth-child(5) {
  animation-delay: 180ms;
}

.mobile-action-pop:nth-child(6) {
  animation-delay: 225ms;
}

@keyframes mobile-action-boing {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.62);
  }
  52% {
    opacity: 1;
    transform: translateY(4px) scale(1.12);
  }
  74% {
    transform: translateY(-2px) scale(0.96);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Activity bottom sheet */
.activity-sheet {
  position: fixed;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  z-index: 100000;
  display: flex;
  align-items: stretch;
  overflow-x: hidden;
  background: #f8fafc;
}

.activity-sheet.hidden {
  display: none;
}

.activity-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: 100vh;
  height: 100dvh;
  height: 100dvh;
  max-height: none;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 0;
  background: #f8fafc;
  box-shadow: none;
  padding-top: calc(env(safe-area-inset-top) + 8px);
}

.activity-grabber {
  display: none;
}

.activity-worker-strip {
  display: flex;
  gap: 5px;
  padding: 0 10px 6px;
  overflow-x: auto;
  flex-shrink: 0;
  scrollbar-width: none;
}

.activity-worker-strip::-webkit-scrollbar {
  display: none;
}

.activity-worker-chip {
  height: 24px;
  min-width: 42px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #e2e8f0;
  color: #475569;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.activity-worker-chip.active {
  background: #334155;
  border-color: #334155;
  color: #fff;
}

.activity-header {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 32px 38px;
  gap: 6px;
  align-items: center;
  padding: 0 10px 7px;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.activity-nav,
.activity-close {
  width: 32px;
  height: 30px;
  border-radius: 9px;
  background: #e2e8f0;
  color: #334155;
  font-size: 16px;
  font-weight: 900;
}

.activity-close {
  width: 38px;
  background: #334155;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
}

.activity-title {
  text-align: center;
  min-width: 0;
}

.activity-title-main {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.1;
}

.activity-title-sub {
  margin-top: 2px;
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 7px 9px calc(14px + env(safe-area-inset-bottom));
  -webkit-overflow-scrolling: touch;
}

.activity-section-title {
  display: flex;
  justify-content: space-between;
  padding: 4px 2px 6px;
  color: #475569;
  font-size: 10px;
  font-weight: 900;
}

.activity-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.activity-bulk-toggle {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.activity-bulk-toggle.is-active {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

.activity-ticket-list {
  display: grid;
  gap: 6px;
}

.activity-ticket {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
  min-height: 72px;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-left: 4px solid #f59e0b;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.activity-ticket.is-readonly {
  grid-template-columns: minmax(0, 1fr) auto;
  border-left-color: #94a3b8;
}

.activity-ticket.is-bulk-mode {
  grid-template-columns: 38px minmax(0, 1fr) auto;
}

.activity-ticket.is-install {
  border-left-color: #10b981;
}

.activity-ticket.is-expanded {
  border-left-color: #0f62fe;
  align-items: start;
}

.activity-handle {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: #f1f5f9;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  user-select: none;
}

.activity-bulk-select {
  width: 30px;
  height: 30px;
  margin-left: 2px;
  border: 2px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #fff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.activity-bulk-select.is-selected {
  border-color: #f59e0b;
  background: #f59e0b;
}

.activity-bulk-select:disabled {
  border-color: #e2e8f0;
  background: #f1f5f9;
  opacity: .7;
}

.activity-ticket.is-bulk-mode .activity-meta {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.35;
}

.activity-bulk-bar {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 12px 14px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 14px;
  background: rgba(255, 251, 235, .97);
  box-shadow: 0 8px 24px rgba(120, 53, 15, .16);
  color: #92400e;
  font-size: 12px;
}

.activity-bulk-bar button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 10px;
  background: #f59e0b;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.activity-bulk-bar button:disabled {
  background: #d6d3d1;
  color: #78716c;
}

.activity-handle svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.activity-handle.is-recent {
  background: #dbeafe;
  color: #2563eb;
}

.activity-ticket-copy {
  min-width: 0;
  width: 100%;
  text-align: left;
}

.activity-company {
  width: 100%;
  font-size: 12.75px;
  font-weight: 900;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-company-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 5px;
}

.activity-meta-line {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
}

.activity-meta-line .activity-meta {
  min-width: 0;
  flex: 1 1 auto;
  margin-top: 0;
}

.activity-meta {
  width: 100%;
  margin-top: 2px;
  font-size: 10.75px;
  color: #475569;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-process {
  min-height: 44px;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: #0f62fe;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.activity-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 112px;
  min-width: 112px;
  gap: 4px;
  align-items: stretch;
}

.activity-actions.has-start {
  grid-template-columns: 1fr 1fr 1fr;
}

.activity-actions.is-completed {
  grid-template-columns: 1fr;
  width: 56px;
  min-width: 56px;
}

.activity-status-badge {
  align-self: center;
  min-width: 54px;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: #4338ca;
  color: #fff;
  font-size: 10px;
  font-weight: 900;
}

.activity-status-badge.is-moving {
  animation: activity-move-blink 1s ease-in-out infinite;
}

.activity-status-badge.is-completed {
  background: #16a34a;
}

.activity-move {
  min-height: 44px;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: #6366f1;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.activity-start {
  min-height: 44px;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: #0f766e;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
}

.activity-start.is-started {
  background: #14b8a6;
}

.activity-start.is-running {
  background: #0d9488;
}

.activity-start.is-paused {
  background: #64748b;
}

.activity-move.is-moving {
  background: #4338ca;
  animation: activity-move-blink 1s ease-in-out infinite;
}

.activity-move.is-locked,
.activity-move:disabled {
  background: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  animation: none;
  opacity: 0.82;
}

.activity-process.is-completed {
  background: #16a34a;
}

.activity-process.is-opening {
  opacity: 0.72;
  cursor: wait;
}

@keyframes activity-move-blink {
  0%,
  100% {
    opacity: 1;
    box-shadow: 0 0 0 rgba(67, 56, 202, 0);
  }
  50% {
    opacity: 0.58;
    box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.14);
  }
}

.activity-detail {
  grid-column: 2 / 4;
  display: grid;
  gap: 0;
  margin-top: 7px;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  background: #f8fafc;
}

.activity-ticket.is-readonly .activity-detail {
  grid-column: 1 / -1;
}

.activity-ticket-history {
  grid-column: 1 / -1;
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid #cbd5e1;
}

.activity-ticket-history-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #475569;
  font-size: 11.5px;
  font-weight: 900;
}

.activity-ticket-history-list {
  display: grid;
  gap: 5px;
}

.activity-ticket-history-row {
  padding: 6px 7px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #fff;
}

.activity-ticket-history-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 800;
}

.activity-ticket-history-text {
  margin-top: 4px;
  color: #1f2937;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.activity-detail-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 8px;
  padding: 5px 0;
  border-top: 1px solid #e5e7eb;
  font-size: 10px;
  line-height: 1.4;
}

.activity-detail-row:first-child {
  border-top: 0;
}

.activity-detail-label {
  display: block;
  width: 52px;
  color: #64748b;
  font-weight: 900;
  white-space: nowrap;
  text-align: justify;
  text-align-last: justify;
}

.activity-detail-label::after {
  content: "";
  display: inline-block;
  width: 100%;
}

.activity-detail-value {
  min-width: 0;
  color: #1f2937;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.activity-detail-row.is-long .activity-detail-value {
  white-space: pre-wrap;
}

.activity-phone {
  color: #0f62fe;
  font-weight: 900;
}

.activity-log-block {
  margin-top: 8px;
}

.activity-log-heading {
  display: flex;
  justify-content: space-between;
  padding: 3px 2px 6px;
  color: #475569;
  font-size: 10.5px;
  font-weight: 900;
}

.activity-log-list {
  margin-top: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: #fff;
  overflow: visible;
}

.activity-log-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 18px;
  gap: 6px;
  align-items: start;
  padding: 6px 4px;
  border-top: 1px solid #f1f5f9;
}

.activity-log-row:first-child {
  border-top: 0;
}

.activity-log-row.is-readonly {
  grid-template-columns: 48px minmax(0, 1fr);
}

.activity-log-lead {
  display: grid;
  justify-items: start;
  gap: 3px;
}

.activity-log-time {
  color: #64748b;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.35;
}

.activity-log-type {
  display: inline-flex;
  min-width: 30px;
  justify-content: center;
  padding: 2px 4px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 8px;
  font-weight: 900;
  line-height: 1.2;
}

.activity-log-type.is-reception { background: #fff7ed; color: #c2410c; }
.activity-log-type.is-move { background: #eef2ff; color: #4338ca; }
.activity-log-type.is-process,
.activity-log-type.is-action { background: #eff6ff; color: #1d4ed8; }
.activity-log-type.is-complete { background: #dcfce7; color: #15803d; }
.activity-log-type.is-memo { background: #f5f3ff; color: #7c3aed; }
.activity-log-type.is-custom { background: #fef3c7; color: #a16207; }

.activity-log-copy {
  color: #1f2937;
  font-size: 11.5px;
  line-height: 1.38;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: keep-all;
}

.activity-log-main {
  min-width: 0;
}

.activity-event-name {
  margin-left: 7px;
  color: #475569;
  font-weight: 900;
}

.activity-log-meta {
  margin-top: 3px;
  color: #64748b;
  font-size: 9.5px;
  font-weight: 700;
}

.activity-log-attached {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4px;
  margin-top: 3px;
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.35;
}

.activity-log-attached span {
  min-width: 0;
}

.activity-log-delete {
  width: 16px;
  height: 16px;
  min-width: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #cbd5e1;
  font-family: inherit;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  text-align: center;
  cursor: pointer;
}

.activity-log-attached .activity-log-delete {
  width: 16px;
  height: 16px;
  min-width: 16px;
  font-size: 10px;
  line-height: 1;
  margin-left: auto;
}

.activity-log-delete:hover,
.activity-log-delete:active {
  background: #fee2e2;
  color: #b91c1c;
}

.activity-empty {
  padding: 18px 8px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
  background: #fff;
}

.activity-empty.is-compact {
  padding: 9px 8px;
  border-radius: 0;
  font-size: 11px;
}

.activity-custom-log {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 6px;
  margin-top: 8px;
  padding: 0;
}

.activity-custom-log-input {
  min-width: 0;
  min-height: 34px;
  appearance: none;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  padding: 0 9px;
}

.activity-custom-log-input:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.activity-custom-log-submit {
  min-height: 34px;
  appearance: none;
  border: 0;
  border-radius: 8px;
  background: #334155;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.activity-custom-log-submit:disabled {
  opacity: 0.55;
}

/* 활동 모달 가독성: 기존 크기에서 한 단계 확대 */
.activity-worker-chip { height: 26px; font-size: 11px; }
.activity-nav,
.activity-close { font-size: 17px; }
.activity-close { font-size: 12px; }
.activity-title-main { font-size: 14px; }
.activity-title-sub { font-size: 10px; }
.activity-section-title { font-size: 11px; }
.activity-company { font-size: 14px; }
.activity-meta { font-size: 12px; }
.activity-process,
.activity-move,
.activity-start { min-height: 40px; min-width: 52px; padding: 0 5px; font-size: 14px; }
.activity-status-badge { font-size: 11px; }
.activity-detail-row { font-size: 11px; }
.activity-log-heading { font-size: 11.5px; }
.activity-log-time { font-size: 11.5px; }
.activity-log-type { font-size: 9px; }
.activity-log-copy { font-size: 12.5px; }
.activity-log-meta { font-size: 10.5px; }
.activity-log-attached { font-size: 11.5px; }
.activity-empty { font-size: 13px; }
.activity-empty.is-compact { font-size: 12px; }
.activity-custom-log-input,
.activity-custom-log-submit { font-size: 13px; }

/* Keep form panels at layout height; the OS keyboard overlays the body. */
:is(#schedule-assign-modal, #reception-modal, #install-modal, #process-modal)[data-modal-viewport="layout"] {
  overflow: visible;
}

:is(#schedule-assign-modal .ascp-work-modal__footer, #reception-modal .ascp-workflow-modal-footer, #install-modal .ascp-workflow-modal-footer) {
  position: relative;
  z-index: 2;
  transform: translateY(calc(-1 * var(--ascp-modal-footer-offset, 0px)));
}

#reception-modal-content {
  padding-bottom: var(--ascp-modal-footer-offset, 0px);
}

#process-modal-content {
  padding-bottom: calc(75px + env(safe-area-inset-bottom, 0px));
  margin-bottom: var(--ascp-modal-footer-offset, 0px);
}

#process-modal .process-modal-footer {
  min-height: 0 !important;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 16px !important;
  padding-bottom: 0 !important;
}

#reception-modal .ascp-workflow-modal-footer {
  gap: 16px;
  padding-top: 16px !important;
}

.workflow-progress {
  --workflow-progress: 0%;
  width: 100%;
  padding: 0 2px;
}

.workflow-progress__track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.workflow-progress__track > span {
  display: block;
  width: var(--workflow-progress);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
  transition: width 240ms ease, background-color 160ms ease;
}

.workflow-progress[data-status="active"] .workflow-progress__track > span {
  background-size: 28px 28px;
  background-image: linear-gradient(135deg, rgba(255,255,255,.22) 25%, transparent 25%, transparent 50%, rgba(255,255,255,.22) 50%, rgba(255,255,255,.22) 75%, transparent 75%, transparent);
  animation: workflow-progress-stripes .8s linear infinite;
}

.workflow-progress[data-status="error"] .workflow-progress__track > span { background: #dc2626; }

.workflow-progress__labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
  color: #9ca3af;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.workflow-progress__labels > .is-complete { color: #0f766e; }
.workflow-progress__labels > .is-current { color: #111827; }
.workflow-progress[data-status="error"] .workflow-progress__labels > .is-current { color: #b91c1c; }

@keyframes workflow-progress-stripes { to { background-position: 28px 0; } }

@media (prefers-reduced-motion: reduce) {
  .workflow-progress__track > span { transition: none; animation: none !important; }
}

:is(#schedule-assign-scroll, #install-form) {
  padding-bottom: calc(16px + var(--ascp-modal-footer-offset, 0px));
}

#schedule-assign-modal .ascp-work-modal__footer {
  padding-bottom: calc(19px + env(safe-area-inset-bottom, 0px)) !important;
}

#schedule-assign-modal-panel > .schedule-assign-sheet {
  max-height: min(85dvh, 100%);
}

/* iOS Safari zooms focused controls below 16px and preserves that zoom for the
 * next full-screen surface. Keep only keyboard-bearing controls at 16px. */
@supports (-webkit-touch-callout: none) {
  :is(#reception-form, #process-form) :is(input:not([type="hidden"]), textarea, select) {
    font-size: 16px !important;
  }

  #activity-summary-sheet[data-modal-viewport="layout"] {
    overflow: visible;
  }

  #activity-summary-sheet[data-modal-viewport="layout"] > .activity-panel[data-modal-panel-viewport="visible"] {
    position: fixed;
    left: var(--ascp-modal-viewport-left, 0px);
    top: var(--ascp-modal-viewport-top, 0px);
    width: var(--ascp-modal-viewport-width, 100vw);
    height: var(--ascp-modal-viewport-height, 100dvh);
    max-width: var(--ascp-modal-viewport-width, 100vw);
    max-height: var(--ascp-modal-viewport-height, 100dvh);
    right: auto;
    bottom: auto;
  }

  #install-modal[data-modal-viewport="layout"]::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--ascp-surface-canvas, #f5f5f5);
    pointer-events: none;
  }

  #install-modal[data-modal-viewport="layout"] > div {
    z-index: 1;
    background: var(--ascp-surface-canvas, #f5f5f5);
  }

  #install-modal[data-modal-viewport="layout"] > div,
  #install-modal[data-modal-viewport="layout"] > div > .bg-white {
    min-height: 0;
    overflow: hidden;
  }

  #install-form :is(input:not([type="hidden"]), textarea, select) {
    font-size: 16px !important;
  }

  .activity-custom-log-input {
    font-size: 16px !important;
  }
}

:is(#schedule-assign-scroll, #reception-modal-content, #reception-form, #process-modal-content)[data-modal-scroll-owner] {
  min-height: 0;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-block: 16px;
}

.main-search-sheet {
  border: 1px solid #dce5f2;
  border-radius: 8px;
  background: rgba(248, 250, 252, 0.98);
  padding: 8px;
}

.main-search-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}

.main-search-sheet-head button {
  height: 24px;
  border: 1px solid #d5dce8;
  border-radius: 8px;
  background: #fff;
  color: #475569;
  padding: 0 7px;
  font-size: 10px;
  font-weight: 800;
}

.main-search-condition-list {
  display: grid;
  gap: 6px;
}

.main-search-condition-row {
  display: grid;
  grid-template-columns: 82px 1fr 28px;
  gap: 5px;
  align-items: center;
}

.main-search-condition-row select,
.main-search-condition-row input {
  width: 100%;
  min-width: 0;
  height: 32px;
  border: 1px solid #d8e0ec;
  border-radius: 8px;
  background: #fff;
  padding: 0 7px;
  color: #334155;
  font-size: 11px;
  font-weight: 700;
}

.main-search-condition-value {
  min-width: 0;
}

.main-search-date-range {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 4px;
  align-items: center;
}

.main-search-date-range input[type="text"] {
  color: #94a3b8;
}

.main-search-date-range span {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.main-search-condition-remove,
.main-search-add-condition {
  height: 32px;
  border: 0;
  border-radius: 8px;
  font-weight: 900;
}

.main-search-condition-remove {
  background: #eef2f7;
  color: #64748b;
  font-size: 15px;
}

.main-search-add-condition {
  width: 100%;
  margin-top: 6px;
  background: #1f2937;
  color: #fff;
  font-size: 12px;
}

.reception-date-mode-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 1fr);
  gap: 10px;
  align-items: end;
}

.reception-date-field {
  min-width: 0;
}

#reception-date-btn {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#unified-modal-status {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#unified-modal-badge {
  flex-shrink: 0;
  white-space: nowrap;
}

.reception-mode-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.reception-mode-btn {
  min-width: 0;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.reception-mode-btn.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.reception-mode-btn[data-reception-toggle="quote"].is-active {
  border-color: #f59e0b;
  background: #fff7ed;
  color: #c2410c;
}

.reception-mode-btn[data-reception-toggle="urgent"].is-active {
  border-color: #fb923c;
  background: #fff7ed;
  color: #ea580c;
}

.reception-mode-btn[data-reception-toggle="relocation"].is-active {
  border-color: #10b981;
  background: #ecfdf5;
  color: #047857;
}

.reception-mode-btn[data-reception-toggle="test"].is-active {
  border-color: #0284c7;
  background: #f0f9ff;
  color: #0369a1;
}

@media (max-width: 414px) {
  .reception-date-mode-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .reception-mode-buttons {
    gap: 6px;
  }

  .reception-mode-btn {
    height: 44px;
    font-size: 12px;
  }
}

@media (max-width: 360px) {
  #process-modal .process-modal-footer {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  .process-modal-footer-actions {
    gap: 6px;
  }

  .process-modal-footer-actions > button {
    min-width: 0;
    font-size: 13px !important;
    white-space: nowrap;
  }
}
