/* ─── Reset & Base ──────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  height: 100%;
  overflow: hidden;
  background: #1C1C1E;
}

body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: #2C2C2E;
  color: #FFFFFF;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input {
  font-family: inherit;
  font-size: 15px;
}

/* ─── View 전환 ──────────────────────────────────────────────────────── */

.view {
  display: none;
  flex-direction: column;
  position: relative;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: calc(56px + env(safe-area-inset-bottom));
  isolation: isolate;
}

.view.active {
  display: flex;
}

/* ─── 세팅 화면 ──────────────────────────────────────────────────────── */

.ios-header {
  padding: env(safe-area-inset-top) 20px 0;
  background: #2C2C2E;
  flex-shrink: 0;
}

.ios-title {
  font-size: 24px;
  font-weight: 700;
  color: #FFFFFF;
  padding-bottom: 16px;
}

/* Alpha 뱃지 */
.alpha-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  background: #E8750A;
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  border-radius: 5px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  margin-left: 10px;
  vertical-align: middle;
  line-height: 1;
}

.ios-title-wrap {
  display: flex;
  align-items: center;
  padding-bottom: 8px;
}

.ios-title-wrap .ios-title {
  padding-bottom: 0;
}

.version-display {
  margin-left: auto;
  font-size: 11px;
  color: rgba(235, 235, 245, 0.35);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.setup-body {
  flex: 1;
  padding: 20px 20px 0;
  background: #2C2C2E;
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

.setup-body.has-content {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

/* 업체 선택 버튼 */
.vendor-select-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  background: #3A3A3C;
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 12px;
  font-size: 15px;
  color: #FFFFFF;
  margin-bottom: 20px;
  transition: border-color 0.15s;
}

.vendor-select-btn:active {
  border-color: #E8750A;
  background: rgba(232, 117, 10, 0.1);
}

.vendor-select-btn .chevron {
  color: rgba(235, 235, 245, 0.6);
  flex-shrink: 0;
}

/* 조건 칩 그룹 */
.chip-container {
  min-height: 100px;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 10px;
}

.empty-text {
  font-size: 14px;
  color: rgba(235, 235, 245, 0.6);
  text-align: center;
}

.chip-group {
  margin-bottom: 16px;
}

.chip-group-title {
  font-size: 13px;
  font-weight: 600;
  color: #E8750A;
  margin-bottom: 8px;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(232, 117, 10, 0.15);
  border: 1px solid rgba(232, 117, 10, 0.4);
  border-radius: 20px;
  font-size: 13px;
  color: #E8750A;
}

.chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  font-size: 16px;
  color: #E8750A;
  padding: 0;
  line-height: 1;
}

/* ─── 하단 CTA ──────────────────────────────────────────────────────── */

.setup-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  background: #2C2C2E;
  flex-shrink: 0;
}

.btn-cta-left,
.btn-cta-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 50px;
  font-size: 15px;
  font-weight: 600;
  border-radius: 12px;
  padding: 0 16px;
}

.btn-cta-left {
  background: #3A3A3C;
  color: #EBEBF5;
  border: 1px solid rgba(235, 235, 245, 0.15);
}

.btn-cta-left:active {
  background: #4A4A4C;
}

/* ─── 버튼 공통 ──────────────────────────────────────────────────────── */

.btn-primary {
  display: block;
  width: 100%;
  min-height: 50px;
  padding: 0 20px;
  background: #E8750A;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.15s, opacity 0.15s;
}

.btn-primary:disabled {
  background: rgba(235, 235, 245, 0.2);
  color: rgba(235, 235, 245, 0.4);
}

.btn-primary:active:not(:disabled) {
  background: #C4650A;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  background: #3A3A3C;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid rgba(235, 235, 245, 0.15);
  transition: background 0.15s;
}

.btn-secondary:active {
  background: rgba(235, 235, 245, 0.1);
}

.btn-sm {
  min-height: 36px;
  padding: 0 12px;
  font-size: 13px;
}

.btn-text {
  min-height: 44px;
  padding: 0;
  color: #E8750A;
  font-size: 14px;
  font-weight: 500;
  background: none;
}

/* ─── 결과 화면 ──────────────────────────────────────────────────────── */

.results-action-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
  background: #2C2C2E;
  flex-shrink: 0;
}

.results-action-bar .btn-secondary {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 6px 8px;
  min-height: 36px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
  font-weight: 500;
}

.results-action-bar .btn-secondary:active {
  background: none;
  opacity: 0.6;
}

.action-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.results-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 15px;
  font-weight: 700;
  color: rgba(235, 235, 245, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  max-width: calc(100% - 160px);
}

.results-container {
  flex: 1;
  overflow-y: auto;
  padding: 16px 0;
  background: #2C2C2E;
  -webkit-overflow-scrolling: touch;
}

/* ─── 날짜 탭 (결과 화면 상단) ──────────────────────────────────────── */

.date-tabs {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 10px 16px;
  gap: 8px;
  flex-shrink: 0;
  background: #2C2C2E;
  padding-bottom: 14px;
  /* 스크롤바 숨김 */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.date-tabs::-webkit-scrollbar {
  display: none;
}

.date-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 20px;
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  background: rgba(255, 255, 255, 0.05);
  font-size: 13px;
  font-weight: 500;
  color: rgba(235, 235, 245, 0.6);
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  scroll-snap-align: start;
  transition: all 0.15s;
  min-height: 36px;
  /* peek 효과: 마지막 탭 뒤에 다음 탭이 살짝 보이도록 */
}

.date-tab.active {
  background: rgba(232, 117, 10, 0.18);
  border-color: #E8750A;
  color: #FFFFFF;
  font-weight: 600;
}

.date-tab:active {
  background: rgba(232, 117, 10, 0.1);
}

/* 탭 상태 아이콘 (SVG CSS) */
.tab-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tab-icon--available svg {
  stroke: #4ADE80;
}

.tab-icon--unavailable svg {
  stroke: #F87171;
}

.tab-icon--loading svg {
  stroke: rgba(235, 235, 245, 0.4);
}

/* 결과 그룹 */
.result-group {
  background: #3A3A3C;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.result-group-header {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(235, 235, 245, 0.15);
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

/* ─── 업체 카드 (탭형 결과 화면) ────────────────────────────────────── */

.vendor-card {
  background: #3A3A3C;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.vendor-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.05);
  border-bottom: 1px solid rgba(235, 235, 245, 0.12);
}

.vendor-card-name {
  font-size: 15px;
  font-weight: 700;
  color: #FFFFFF;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 상품 행 */
.product-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.07);
  gap: 10px;
}

.product-row:last-child {
  border-bottom: none;
}

.product-row-name {
  font-size: 14px;
  font-weight: 400;
  color: #FFFFFF;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-top: 3px;
}

.product-row--unavailable .product-row-name {
  color: rgba(235, 235, 245, 0.45);
}

.result-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.result-table th {
  padding: 8px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  background: rgba(255, 255, 255, 0.03);
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
}

.result-table td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.08);
  vertical-align: middle;
  color: #FFFFFF;
}

.result-table tr:last-child td {
  border-bottom: none;
}

.section-header-row td {
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
}

.section-available td {
  background: rgba(22, 163, 74, 0.12);
  color: #4ADE80;
}

.section-unavailable td {
  background: rgba(220, 38, 38, 0.12);
  color: #F87171;
}

.product-header-row td {
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
}

.result-product-header-inner {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-product-thumb {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.result-product-thumb--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(235, 235, 245, 0.1);
  font-size: 14px;
}

/* 스케줄 그룹 헤더 */
.schedule-group-header {
  font-size: 13px;
  font-weight: 700;
  color: rgba(235, 235, 245, 0.7);
  letter-spacing: 0.2px;
}

/* 결과 행 (스케줄 기준 그룹핑) */
.result-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.08);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row--available {
  background: rgba(22, 163, 74, 0.06);
}

.result-row--loading {
  background: transparent;
}

.result-row--blocked {
  background: transparent;
  opacity: 0.7;
}

.result-thumb-wrap {
  flex-shrink: 0;
}

.result-row-text {
  flex: 1;
  min-width: 0;
}

.result-row-name {
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.result-row-time {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.5);
  margin-top: 2px;
}

.result-row-badge {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* 예약 불가 아코디언 */
.unavailable-accordion {
  border-top: 1px solid rgba(235, 235, 245, 0.08);
}

.unavailable-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: none;
  border: none;
  color: rgba(235, 235, 245, 0.5);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
}

.unavailable-toggle:active {
  background: rgba(235, 235, 245, 0.05);
}

.unavailable-toggle-label {
  flex: 1;
}

.unavailable-toggle-chevron {
  font-size: 12px;
  margin-left: 8px;
}

.unavailable-body {
  border-top: 1px solid rgba(235, 235, 245, 0.06);
}

.unavailable-body.hidden {
  display: none;
}

/* 배지 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.badge-available {
  background: rgba(22, 163, 74, 0.2);
  color: #4ADE80;
}

.badge-unavailable {
  background: rgba(220, 38, 38, 0.2);
  color: #F87171;
}

.badge-unknown {
  background: rgba(235, 235, 245, 0.1);
  color: rgba(235, 235, 245, 0.6);
}

.badge-loading {
  background: rgba(180, 180, 190, 0.12);
  color: rgba(235, 235, 245, 0.4);
  opacity: 0.7;
}

.reason-text {
  font-size: 11px;
  color: rgba(235, 235, 245, 0.4);
  margin-top: 2px;
}

/* 스피너 */
.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(235, 235, 245, 0.2);
  border-top-color: #E8750A;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ─── 바텀시트 ──────────────────────────────────────────────────────── */

.sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  opacity: 1;
  transition: opacity 0.25s;
}

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

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: #3A3A3C;
  border-radius: 20px 20px 0 0;
  z-index: 1001;
  display: flex;
  flex-direction: column;
  min-height: 78vh;
  max-height: 92vh;
  transform: translateY(0);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

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

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(235, 235, 245, 0.3);
  border-radius: 2px;
  margin: 12px auto 4px;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px 12px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
  flex-shrink: 0;
}

.sheet-title {
  font-size: 16px;
  font-weight: 600;
  color: #FFFFFF;
}

.sheet-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 24px;
  color: rgba(235, 235, 245, 0.6);
  margin: -10px -10px -10px 0;
}

.sheet-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.sheet-footer {
  padding: 16px 20px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(235, 235, 245, 0.1);
  flex-shrink: 0;
}

.sheet-section {
  margin-bottom: 24px;
}

.sheet-section-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.6);
  margin-bottom: 8px;
}

.optional-hint {
  font-weight: 400;
  color: rgba(235, 235, 245, 0.4);
}

/* ─── 커스텀 달력 그리드 ──────────────────────────────────────────── */

.cal-container {
  background: rgba(255, 255, 255, 0.04);
  border: 1.5px solid rgba(235, 235, 245, 0.12);
  border-radius: 14px;
  padding: 12px;
  user-select: none;
  -webkit-user-select: none;
}

.cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.cal-nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-size: 22px;
  font-weight: 300;
  color: rgba(235, 235, 245, 0.7);
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: background 0.12s;
}

.cal-nav-btn:active {
  background: rgba(235, 235, 245, 0.1);
}

.cal-month-label {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  text-align: center;
  flex: 1;
}

.cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}

.cal-weekdays span {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.4);
  padding: 4px 0;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px 0;
}

.cal-cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: 14px;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.1s;
  border-radius: 0;
}

.cal-cell.empty {
  pointer-events: none;
}

.cal-cell.past {
  color: rgba(235, 235, 245, 0.25);
  pointer-events: none;
  cursor: default;
}

/* 범위 하이라이트 배경 (시작일~종료일 사이) */
.cal-cell.in-range {
  background: rgba(232, 117, 10, 0.12);
}

/* 시작일 / 종료일: 주황 원형 */
.cal-cell.selected-start,
.cal-cell.selected-end {
  color: #FFFFFF;
}

.cal-cell.selected-start .cal-day-num,
.cal-cell.selected-end .cal-day-num {
  background: #E8750A;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* 시작일: 오른쪽 절반만 range 색 */
.cal-cell.selected-start.in-range-start::before {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 36px;
  background: rgba(232, 117, 10, 0.12);
  z-index: 0;
}

/* 종료일: 왼쪽 절반만 range 색 */
.cal-cell.selected-end.in-range-end::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 50%;
  height: 36px;
  background: rgba(232, 117, 10, 0.12);
  z-index: 0;
}

/* 시작일=종료일인 경우 range 없음 */
.cal-cell.selected-single .cal-day-num {
  background: #E8750A;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cal-day-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  position: relative;
  z-index: 1;
}

/* 달력 힌트 텍스트 */
.cal-hint {
  margin-top: 10px;
  font-size: 12px;
  color: rgba(235, 235, 245, 0.4);
  text-align: center;
}

/* 달력 내 추가하기 버튼 */
.cal-add-btn {
  margin-top: 12px;
  width: 100%;
}

/* ─── 시간 입력 ──────────────────────────────────────────────────── */

.time-input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 10px;
  font-size: 15px;
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.07);
  appearance: none;
  -webkit-appearance: none;
}

.time-input:focus {
  outline: none;
  border-color: #E8750A;
}

/* 박 수 버튼 그룹 (레거시 — 미사용) */
.duration-btn {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 4px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #FFFFFF;
  transition: all 0.15s;
}

.duration-btn.active {
  background: #E8750A;
  border-color: #E8750A;
  color: #fff;
}

.duration-btn:active:not(.active) {
  background: rgba(235, 235, 245, 0.1);
}

.hint-text {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.4);
  margin-top: 6px;
}

/* 가로 스크롤 칩 행 */
.chip-scroll-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-top: 8px;
  -webkit-overflow-scrolling: touch;
}

.chip-scroll-row:empty {
  display: none;
}

/* 시트 내부 칩 */
.sheet-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: rgba(232, 117, 10, 0.15);
  border: 1px solid rgba(232, 117, 10, 0.4);
  border-radius: 20px;
  font-size: 13px;
  color: #E8750A;
  white-space: nowrap;
  flex-shrink: 0;
}

.sheet-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  font-size: 16px;
  color: #E8750A;
  padding: 0;
  line-height: 1;
}

/* 미리보기 배너 */
.preview-banner {
  padding: 12px 16px;
  background: rgba(232, 117, 10, 0.1);
  border: 1px solid rgba(232, 117, 10, 0.3);
  border-radius: 10px;
  font-size: 13px;
  color: #E8750A;
  font-weight: 500;
}

.preview-banner.hidden {
  display: none;
}

/* ─── 상품 피커 ──────────────────────────────────────────────────────── */

.product-picker {
  max-height: 85vh;
}

.picker-search-wrap {
  padding: 8px 20px 12px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
  flex-shrink: 0;
}

.picker-search {
  width: 100%;
  min-height: 44px;
  padding: 0 12px 0 36px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 10px;
  font-size: 15px;
  color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23EBEBF5' stroke-width='2' stroke-opacity='0.6'/%3E%3Cpath d='M20 20l-4-4' stroke='%23EBEBF5' stroke-width='2' stroke-linecap='round' stroke-opacity='0.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.picker-search:focus {
  outline: none;
  border-color: #E8750A;
}

.picker-check-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px;
  font-size: 15px;
  color: #FFFFFF;
  cursor: pointer;
  flex-shrink: 0;
  min-height: 44px;
}

.picker-check-row input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #E8750A;
  cursor: pointer;
  flex-shrink: 0;
}

.picker-divider {
  border: none;
  border-top: 1px solid rgba(235, 235, 245, 0.1);
  flex-shrink: 0;
}

.picker-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.picker-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  min-height: 52px;
  cursor: pointer;
  border-bottom: 1px solid rgba(235, 235, 245, 0.06);
}

.picker-item.disabled {
  opacity: 0.4;
  pointer-events: none;
}

.picker-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #E8750A;
  flex-shrink: 0;
}

.picker-thumb-wrap {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
}

.picker-thumb {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
}

.picker-thumb--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(235, 235, 245, 0.08);
  border-radius: 8px;
}

.picker-item-name {
  font-size: 14px;
  color: #FFFFFF;
  flex: 1;
}

.picker-footer {
  display: flex;
  gap: 10px;
}

.picker-footer .btn-secondary {
  flex: 1;
}

.picker-footer .btn-primary {
  flex: 2;
}

/* ─── 유틸리티 ──────────────────────────────────────────────────────── */

.hidden {
  display: none !important;
}

/* ─── 업체 드롭다운 ──────────────────────────────────────────────────── */

.vendor-dropdown {
  position: fixed;
  z-index: 1100;
  background: #3A3A3C;
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 12px;
  overflow: hidden;
  max-height: 280px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.vendor-dropdown-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  text-align: left;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(235, 235, 245, 0.08);
  cursor: pointer;
  gap: 8px;
}

.vendor-dropdown-item:active {
  background: rgba(232, 117, 10, 0.12);
}

.vendor-dropdown-item:last-child {
  border-bottom: none;
}

.vendor-picker-name {
  font-size: 15px;
  font-weight: 500;
  color: #FFFFFF;
}

.vendor-picker-platform {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.5);
}

.platform-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  border: none;
  line-height: 1.5;
  flex-shrink: 0;
}

/* ─── 메인 달력 (상시 노출) ──────────────────────────────────────────── */

.main-cal-container {
  margin-bottom: 16px;
}

/* ─── 메인 화면 날짜 칩 ──────────────────────────────────────────────── */

.main-date-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
  min-height: 0;
}

.main-date-chips:empty {
  display: none;
}

.main-date-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(232, 117, 10, 0.15);
  border: 1px solid rgba(232, 117, 10, 0.4);
  border-radius: 20px;
  font-size: 13px;
  color: #E8750A;
}

.main-date-chip-remove {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  font-size: 16px;
  color: #E8750A;
  padding: 0;
  line-height: 1;
}

/* ─── 업체 선택하기 버튼 (메인 화면) ────────────────────────────────── */

.btn-vendor-select-main {
  margin-bottom: 24px;
}

/* ─── 바텀시트 날짜 배너 ─────────────────────────────────────────────── */

.sheet-date-banner {
  padding: 10px 20px;
  background: rgba(232, 117, 10, 0.12);
  border-bottom: 1px solid rgba(232, 117, 10, 0.2);
  font-size: 13px;
  font-weight: 600;
  color: #E8750A;
  flex-shrink: 0;
}

.sheet-date-banner.hidden {
  display: none;
}

/* ─── 바텀시트 인라인 상품 체크박스 ──────────────────────────────────── */

.sheet-inline-products {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1.5px solid rgba(235, 235, 245, 0.12);
  border-radius: 12px;
  overflow: hidden;
}

.sheet-inline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  min-height: 50px;
  cursor: pointer;
  border-bottom: 1px solid rgba(235, 235, 245, 0.07);
  background: rgba(255, 255, 255, 0.03);
  transition: background 0.12s;
}

.sheet-inline-item:last-child {
  border-bottom: none;
}

.sheet-inline-select-all {
  font-weight: 600;
  color: #E8750A;
}

.sheet-inline-item:active {
  background: rgba(232, 117, 10, 0.07);
}

.sheet-inline-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #E8750A;
  flex-shrink: 0;
  cursor: pointer;
}

.sheet-inline-item-name {
  font-size: 14px;
  color: #FFFFFF;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sheet-inline-empty {
  padding: 20px;
  font-size: 14px;
  color: rgba(235, 235, 245, 0.4);
  text-align: center;
}

/* ─── 스케줄 보드 ────────────────────────────────────────────────────── */

.schedule-board {
  padding-bottom: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.schedule-empty {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.schedule-empty-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 80%;
  font-size: 14px;
  color: rgba(235, 235, 245, 0.4);
  text-align: center;
}

/* 스케줄 카드 */
.schedule-card {
  background: #3A3A3C;
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.schedule-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(232, 117, 10, 0.1);
  border-bottom: 1px solid rgba(232, 117, 10, 0.2);
}

.schedule-card-date {
  font-size: 14px;
  font-weight: 700;
  color: #E8750A;
  flex: 1;
  min-width: 0;
}

.schedule-card-delete {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.4);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  min-height: 32px;
}

.schedule-card-delete:active {
  background: rgba(235, 235, 245, 0.1);
  color: rgba(235, 235, 245, 0.7);
}

/* 업체 행 */
.vendor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.07);
  cursor: pointer;
  transition: background 0.12s;
  min-height: 52px;
}

.vendor-row:active {
  background: rgba(235, 235, 245, 0.05);
}

.vendor-row-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.vendor-row-name {
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vendor-row-product-count {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.45);
  white-space: nowrap;
  flex-shrink: 0;
}

.vendor-row-delete {
  font-size: 12px;
  color: rgba(235, 235, 245, 0.35);
  padding: 4px 8px;
  border-radius: 6px;
  flex-shrink: 0;
  min-height: 32px;
  margin-left: 8px;
}

.vendor-row-delete:active {
  background: rgba(235, 235, 245, 0.08);
  color: rgba(235, 235, 245, 0.6);
}

.vendor-row-empty {
  padding: 16px;
  font-size: 13px;
  color: rgba(235, 235, 245, 0.35);
  text-align: center;
}

/* 업체 추가 버튼 (카드 하단) */
.btn-add-vendor {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  font-size: 14px;
  font-weight: 500;
  color: #aaaaaa;
  background: rgba(235, 235, 245, 0.04);
  border-top: 1px solid rgba(235, 235, 245, 0.1);
  transition: background 0.12s;
}

.btn-add-vendor:active {
  background: rgba(235, 235, 245, 0.08);
}

/* ─── 업체 드롭다운 (시트 내부) ──────────────────────────────────────── */

.vendor-dropdown-wrap {
  position: relative;
}

.vendor-dropdown-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 1100;
  background: #3A3A3C;
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 12px;
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* ─── 상품 검색 인풋 ─────────────────────────────────────────────────── */

.product-search-wrap {
  margin-bottom: 10px;
}

.product-search {
  width: 100%;
  min-height: 44px;
  padding: 0 12px 0 36px;
  background: rgba(255, 255, 255, 0.07);
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 10px;
  font-size: 15px;
  color: #FFFFFF;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' viewBox='0 0 24 24'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%23EBEBF5' stroke-width='2' stroke-opacity='0.6'/%3E%3Cpath d='M20 20l-4-4' stroke='%23EBEBF5' stroke-width='2' stroke-linecap='round' stroke-opacity='0.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 10px center;
}

.product-search:focus {
  outline: none;
  border-color: #E8750A;
}

.product-search::placeholder {
  color: rgba(235, 235, 245, 0.35);
}

/* ─── 하단 탭바 ──────────────────────────────────────────────────────── */

.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 900;
  display: flex;
  align-items: flex-start;
  background: #1C1C1E;
  padding-bottom: env(safe-area-inset-bottom);
}

.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 56px;
  color: rgba(235, 235, 245, 0.45);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: color 0.15s;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.tab-item.active {
  color: #E8750A;
}

.tab-item:active {
  opacity: 0.7;
}

.tab-icon-img {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.tab-icon-img svg {
  width: 20px;
  height: 20px;
}

.tab-label {
  font-size: 10px;
  font-weight: 500;
}

/* 탭바 회피는 .view padding-bottom에서 일괄 처리 */
/* manage-body 스크롤 콘텐츠 하단 여백만 유지 */
.manage-body {
  padding-bottom: 120px;
}

/* ─── 관리 화면 ──────────────────────────────────────────────────────── */

.manage-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 0;
  background: #2C2C2E;
  -webkit-overflow-scrolling: touch;
}

/* ─── Speed Dial FAB ────────────────────────────────────────────────── */

.manage-fab-backdrop {
  position: fixed;
  inset: 0;
  z-index: 49;
  background: rgba(0, 0, 0, 0.35);
}
.manage-fab-backdrop.hidden {
  display: none;
}

.manage-fab-wrap {
  position: absolute;
  bottom: 28px;
  right: 20px;
  z-index: 50;
  pointer-events: none;
}

.manage-fab-dial {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* 메인 버튼 */
.manage-fab-main {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #E8750A;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  margin-top: 12px;
  position: relative;
  transition: background 0.2s ease, transform 0.15s ease;
  pointer-events: auto;
}
.manage-fab-main:active {
  transform: scale(0.93);
}
.manage-fab-dial.open .manage-fab-main {
  background: #3A3A3C;
}

/* + 아이콘 / × 아이콘 전환 */
.manage-fab-main-plus,
.manage-fab-main-close {
  position: absolute;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.manage-fab-main-close {
  opacity: 0;
  transform: rotate(-45deg) scale(0.7);
}
.manage-fab-dial.open .manage-fab-main-plus {
  opacity: 0;
  transform: rotate(45deg) scale(0.7);
}
.manage-fab-dial.open .manage-fab-main-close {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* 서브 아이템 */
.manage-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  opacity: 0;
  transform: translateY(16px) scale(0.85);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.manage-fab-dial.open .manage-fab-item {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.manage-fab-dial.open .manage-fab-item[data-index="1"] { transition-delay: 0s; }
.manage-fab-dial.open .manage-fab-item[data-index="0"] { transition-delay: 0.06s; }
.manage-fab-item[data-index="0"] { transition-delay: 0s; }
.manage-fab-item[data-index="1"] { transition-delay: 0.04s; }

.manage-fab-label {
  display: none;
}

.manage-fab-child {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.manage-fab-child:active {
  transform: scale(0.9);
}
.manage-fab-child--add {
  background: #E8750A;
  color: #fff;
  position: relative;
}

.manage-fab-add-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.manage-fab-add-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  width: 16px;
  height: 16px;
  background: #fff;
  color: #E8750A;
  border-radius: 50%;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.manage-fab-child--refresh {
  background: #2C2C2E;
  color: #E8750A;
  border: 1.5px solid rgba(232, 117, 10, 0.45);
}
.manage-fab-child--refresh:disabled {
  opacity: 0.45;
}

/* ─── 업체 추가 모달 ────────────────────────────────────────────────── */
.manage-url-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}
.manage-url-modal.hidden {
  display: none;
}

.manage-url-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.manage-url-modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #2C2C2E;
  border-radius: 20px;
  padding: 24px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 80vh;
  overflow: hidden;
}

.manage-modal-step.hidden {
  display: none;
}

.manage-modal-step {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.manage-url-modal-title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
}

.manage-url-modal-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* 모달 액션 버튼 */
.manage-modal-actions {
  display: flex;
  gap: 8px;
}

.manage-modal-btn {
  flex: 1;
  height: 46px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  -webkit-tap-highlight-color: transparent;
}

.manage-modal-btn--cancel {
  background: #3A3A3C;
  color: rgba(235, 235, 245, 0.6);
}

.manage-modal-btn--primary {
  background: #E8750A;
  color: #fff;
}

.manage-modal-btn--primary:disabled {
  opacity: 0.5;
}

/* Step2 미리보기 */
.manage-modal-preview-vendor {
  font-size: 16px;
  font-weight: 700;
  color: #FFFFFF;
}

.manage-modal-preview-list {
  overflow-y: auto;
  max-height: 40vh;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.manage-preview-product-row {
  font-size: 14px;
  color: rgba(235, 235, 245, 0.75);
  padding: 10px 0;
  border-bottom: 1px solid rgba(235, 235, 245, 0.07);
}

/* URL 등록 영역 */
.manage-register-section {
  margin-bottom: 20px;
}

.manage-register-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.manage-url-input {
  flex: 1;
  min-height: 46px;
  padding: 0 14px;
  background: #3A3A3C;
  border: 1.5px solid rgba(235, 235, 245, 0.15);
  border-radius: 12px;
  font-size: 14px;
  color: #FFFFFF;
  transition: border-color 0.15s;
}

.manage-url-input:focus {
  outline: none;
  border-color: #E8750A;
}

.manage-url-input::placeholder {
  color: rgba(235, 235, 245, 0.35);
}

.manage-register-btn {
  min-height: 46px;
  padding: 0 18px;
  background: #E8750A;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
  border-radius: 12px;
  flex-shrink: 0;
  transition: background 0.15s, opacity 0.15s;
}

.manage-register-btn:disabled {
  opacity: 0.5;
}

.manage-register-btn:active:not(:disabled) {
  background: #C4650A;
}

/* 업체 리스트 */
.manage-vendor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-bottom: 24px;
}

/* 업체 카드 */
.manage-vendor-card {
  background: #3A3A3C;
  border-radius: 14px;
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: border-color 0.15s;
}

.manage-vendor-card.open {
  border-color: #E8750A;
}

/* 카드 헤더 */
.manage-vendor-header {
  display: flex;
  align-items: stretch;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* 왼쪽 갱신 섹션 (칼람 벨 섹션과 동일한 구조) */
.manage-sync-section {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  flex-shrink: 0;
  border-right: 1px solid rgba(235, 235, 245, 0.08);
}

/* 오른쪽 헤더 콘텐츠 */
.manage-vendor-header-content {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 14px 12px;
  gap: 10px;
}

.manage-vendor-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.manage-vendor-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

/* 플랫폼 뱃지 */
.manage-platform-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.manage-platform-badge--naver {
  background: rgba(3, 199, 90, 0.2);
  color: #03C75A;
}

.manage-platform-badge--etc {
  background: rgba(235, 235, 245, 0.1);
  color: rgba(235, 235, 245, 0.7);
}

/* 업체명 */
.manage-vendor-name {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  min-width: 0;
}

/* 갱신 버튼 */
.manage-sync-btn {
  background: none;
  border: none;
  padding: 8px;
  color: rgba(235, 235, 245, 0.45);
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.manage-sync-btn:active:not(:disabled) {
  color: #E8750A;
  opacity: 0.8;
}

.manage-sync-btn:disabled {
  opacity: 0.3;
}

.manage-sync-btn.loading {
  color: #E8750A;
  animation: manage-spin 0.8s linear infinite;
}

@keyframes manage-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* 아코디언 화살표 */
.manage-chevron {
  font-size: 18px;
  color: rgba(235, 235, 245, 0.45);
  flex-shrink: 0;
  line-height: 1;
  user-select: none;
  -webkit-user-select: none;
}

/* 카드 바디 (열린 상태) */
.manage-vendor-body {
  padding: 0 14px 14px;
  border-top: 1px solid rgba(235, 235, 245, 0.1);
}


/* 전체 활성/비활성 토글 행 */
.manage-bulk-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 10px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
}

.manage-bulk-toggle-label {
  font-size: 13px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.6);
}

/* 상품 검색 */
.manage-product-search-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 0 8px;
}

.manage-product-search-wrap .manage-product-search {
  flex: 1;
  min-width: 0;
}

.manage-product-search {
  padding-left: 36px;
}

/* 상품 행 */
.manage-product-list {
  display: flex;
  flex-direction: column;
}

.manage-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid rgba(235, 235, 245, 0.07);
  gap: 10px;
}

.manage-product-row:last-child {
  border-bottom: none;
}

.manage-product-name {
  font-size: 14px;
  color: #FFFFFF;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* iOS 스타일 토글 */
.ios-toggle {
  position: relative;
  display: inline-flex;
  width: 48px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

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

.ios-toggle-slider {
  position: absolute;
  inset: 0;
  background: #636366;
  border-radius: 14px;
  transition: background 0.2s;
}

.ios-toggle-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  background: #FFFFFF;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.2s;
}

.ios-toggle input:checked + .ios-toggle-slider {
  background: #E8750A;
}

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


/* 전체 갱신 버튼 로딩 상태 */
.manage-fab-child--refresh.loading {
  opacity: 0.5;
}

/* 상태 텍스트 */
.manage-loading,
.manage-error,
.manage-empty,
.manage-empty-products {
  padding: 20px 16px;
  font-size: 14px;
  color: rgba(235, 235, 245, 0.45);
  text-align: center;
}

.manage-error {
  color: #F87171;
}

/* ─── 결과화면 칼람 CTA ──────────────────────────────────────────────── */

.kalarm-cta-bar {
  padding: 12px 16px;
  background: #2C2C2E;
  border-top: 1px solid rgba(235, 235, 245, 0.08);
  flex-shrink: 0;
}

.kalarm-cta-btn {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 0 20px;
  background: #E8750A;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  border-radius: 12px;
  transition: background 0.15s, opacity 0.15s;
}

.kalarm-cta-btn:active:not(:disabled) {
  background: #C4650A;
}

.kalarm-cta-btn:disabled {
  background: rgba(235, 235, 245, 0.15);
  color: rgba(235, 235, 245, 0.4);
}

.kalarm-cta-btn.kalarm-cta-added {
  background: rgba(235, 235, 245, 0.15);
  color: rgba(235, 235, 245, 0.4);
}

/* ─── 칼람 탭 ────────────────────────────────────────────────────────── */

.kalarm-body {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  padding: 16px 16px 0;
  background: #2C2C2E;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 24px;
}

.kalarm-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 40px 20px;
}

.kalarm-empty-icon {
  opacity: 0.6;
}

.kalarm-empty-text {
  font-size: 14px;
  color: rgba(235, 235, 245, 0.45);
  text-align: center;
  line-height: 1.6;
}

.kalarm-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 스와이프-투-딜리트 래퍼 */
.kalarm-swipe-wrapper {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
}

/* 칼람 카드 (래퍼 안에서 좌우로 이동) */
.kalarm-card {
  position: relative;
  z-index: 1;
  background: #3A3A3C;
  border-radius: 14px;
  overflow: hidden;
}

.kalarm-swipe-delete {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 80px;
  background: #3A3A3C;
  color: #FF453A;
  font-size: 14px;
  font-weight: 600;
  border: none;
  border-left: 1px solid rgba(235, 235, 245, 0.08);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.kalarm-swipe-delete:active {
  background: rgba(255, 69, 58, 0.15);
}

.kalarm-card-header {
  display: flex;
  align-items: stretch;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
}

.kalarm-card-header:active {
  background: rgba(235, 235, 245, 0.05);
}

.kalarm-card-header--open {
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
}

/* 벨 섹션 (왼쪽 독립 영역) */
.kalarm-bell-section {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-right: 1px solid rgba(235, 235, 245, 0.1);
  flex-shrink: 0;
}

/* 콘텐츠 섹션 (날짜 + 칩) */
.kalarm-content-section {
  flex: 1;
  padding: 14px 14px 14px 16px;
  min-width: 0;
}

.kalarm-card-date {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.3px;
  margin-bottom: 8px;
}

/* 업체명 칩 */
.kalarm-vendor-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kalarm-vendor-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: #48484A;
  color: rgba(235, 235, 245, 0.8);
  font-size: 12px;
  font-weight: 500;
  border-radius: 99px;
}

/* 벨 버튼 */
.kalarm-bell-btn {
  background: none;
  border: none;
  padding: 6px;
  cursor: pointer;
  color: #636366;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s;
}

.kalarm-bell-btn--on {
  color: #E8750A;
}

.kalarm-bell-btn:active {
  opacity: 0.6;
}

/* 액션 버튼 (조회 / 삭제) */
.kalarm-action-btns {
  display: flex;
  align-items: center;
  padding: 12px 14px 12px 8px;
  flex-shrink: 0;
}

.kalarm-action-btn--search {
  background: #E8750A;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}

.kalarm-action-btn--search:active {
  background: #C96309;
}

.kalarm-action-btn--search:disabled {
  opacity: 0.4;
}

/* 아코디언 */
.kalarm-accordion-body {
  background: #2C2C2E;
}

.kalarm-accordion-empty {
  padding: 16px;
  font-size: 13px;
  color: rgba(235, 235, 245, 0.4);
  text-align: center;
}

/* 업체 탭 (아코디언 내) */
.kalarm-vendor-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
  padding: 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}

.kalarm-vendor-tabs::-webkit-scrollbar {
  display: none;
}

.kalarm-vendor-tab {
  padding: 10px 12px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(235, 235, 245, 0.5);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}

.kalarm-vendor-tab.active {
  color: #FFFFFF;
  border-bottom-color: #E8750A;
}

.kalarm-vendor-panel {
  padding: 4px 0;
}

/* 상품 목록 (아코디언 내) */
.kalarm-product-list {
  padding: 0;
}

.kalarm-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.06);
}

.kalarm-product-row:last-child {
  border-bottom: none;
}

.kalarm-product-name {
  font-size: 14px;
  color: #FFFFFF;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── 히스토리 탭 ────────────────────────────────────────────────── */

.history-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 12px 16px;
}

.history-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.history-empty-text {
  font-size: 14px;
  color: rgba(235, 235, 245, 0.45);
  text-align: center;
  line-height: 1.6;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 히스토리 카드 */
.history-card {
  background: #3A3A3C;
  border-radius: 14px;
  padding: 14px 16px;
  cursor: pointer;
  transition: background 0.12s;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.history-card:active {
  background: rgba(235, 235, 245, 0.08);
}

.history-card-fired {
  font-size: 15px;
  font-weight: 600;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
}

.history-card-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.history-card-count-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #E8750A;
}

.history-card-count {
  font-size: 14px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.history-card-push {
  display: flex;
  align-items: center;
  color: #E8750A;
}

.history-card-push--muted {
  color: rgba(235, 235, 245, 0.3);
}

/* ─── 히스토리 상세 모달 ─────────────────────────────────────────── */

.history-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
}

.history-modal.hidden {
  display: none;
}

.history-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
}

.history-modal-box {
  position: relative;
  width: 100%;
  max-width: 400px;
  background: #3A3A3C;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 72vh;
}

/* 모달 헤더: fired_at + 닫기 버튼 */
.history-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
  flex-shrink: 0;
}

.history-modal-meta-fired {
  font-size: 18px;
  font-weight: 700;
  color: #FFFFFF;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}

.history-modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: rgba(235, 235, 245, 0.5);
  flex-shrink: 0;
}

.history-modal-close:active {
  opacity: 0.6;
}

/* ── 칼람 목록: 스크롤 컨테이너 ── */
#history-modal-kalarm-list {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  min-height: 0; /* flex 자식 스크롤 활성화 필수 */
}

/* ── 칼람 카드 구분선 ── */
.history-modal-kalarm-card + .history-modal-kalarm-card {
  border-top: 1px solid rgba(235, 235, 245, 0.1);
}

/* ── 1뎁스: 칼람 카드 헤더 레이아웃 재활용 ── */
.history-modal-summary {
  display: flex;
  align-items: stretch;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.12s;
  flex-shrink: 0;
}

.history-modal-summary:active {
  background: rgba(235, 235, 245, 0.05);
}

/* 콘텐츠 섹션 */
.history-modal-content-section {
  flex: 1;
  padding: 14px 14px 14px 16px;
  min-width: 0;
}

/* chevron 섹션 */
.history-modal-chevron-section {
  display: flex;
  align-items: center;
  padding: 0 14px;
  flex-shrink: 0;
}

.history-modal-chevron {
  display: flex;
  align-items: center;
  color: rgba(235, 235, 245, 0.4);
  transition: transform 0.2s;
}

.history-modal-chevron--open {
  transform: rotate(180deg);
}

/* ── 2뎁스: 상품 결과 ── */
.history-modal-products {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border-top: 1px solid rgba(235, 235, 245, 0.1);
}

.history-modal-products.hidden {
  display: none;
}

/* 업체 그룹 */
.history-vendor-group {
  padding: 0;
}

.history-vendor-group + .history-vendor-group {
  margin-top: 8px;
}

.history-vendor-group-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px 6px;
  background: rgba(235, 235, 245, 0.04);
}

.history-vendor-group-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.7);
}

/* source 뱃지 */
.history-source-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 500;
  background: rgba(232, 119, 10, 0.18);
  color: #E8750A;
}

/* 상품 row */
.history-modal-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.06);
  gap: 12px;
}

.history-modal-product-row:last-child {
  border-bottom: none;
}

.history-modal-product {
  font-size: 14px;
  color: #FFFFFF;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-modal-empty {
  padding: 20px 16px;
  font-size: 14px;
  color: rgba(235, 235, 245, 0.4);
  text-align: center;
}

/* 가용성 뱃지 */
.history-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.history-badge--available {
  background: rgba(74, 222, 128, 0.15);
  color: #4ADE80;
}

.history-badge--unavailable {
  background: rgba(248, 113, 113, 0.15);
  color: #F87171;
}

.history-badge--unknown {
  background: rgba(235, 235, 245, 0.1);
  color: rgba(235, 235, 245, 0.45);
}

/* 칼람 섹션 구분 */
.history-kalarm-section {
  margin-bottom: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(235, 235, 245, 0.1);
}

.history-kalarm-section:first-child {
  padding-top: 0;
  border-top: none;
}

.history-kalarm-section:last-child {
  margin-bottom: 0;
}

/* 히스토리 모달 2뎁스 — kalarm 그룹 */
.history-kalarm-group {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}

.history-kalarm-group-date {
  font-size: 11px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.45);
  padding-bottom: 6px;
  letter-spacing: 0.02em;
}

/* kalarm 그룹 내 상품 없음 표시 */
.history-kalarm-no-products {
  padding: 10px 16px 14px;
  font-size: 13px;
  color: rgba(235, 235, 245, 0.3);
}

/* 모달 summary 날짜 — kalarm-card-date보다 작게, 보조 정보 */
.history-modal-summary-date {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: rgba(235, 235, 245, 0.55);
  letter-spacing: 0;
  margin-bottom: 8px;
}

/* ── 2뎁스 테이블 ── */
.history-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.history-table-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(235, 235, 245, 0.05);
  border-bottom: 1px solid rgba(235, 235, 245, 0.1);
}

.history-table-header-cell {
  font-size: 11px;
  font-weight: 600;
  color: rgba(235, 235, 245, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.history-table-header-cell:first-child {
  flex: 0 0 44%;
}

.history-table-header-cell:nth-child(2) {
  flex: 1;
  padding-left: 8px;
}

.history-table-header-cell:last-child {
  flex: 0 0 56px;
  text-align: right;
}

.history-table-row {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(235, 235, 245, 0.06);
}

.history-table-row:last-child {
  border-bottom: none;
}

.history-table-cell {
  font-size: 13px;
  color: rgba(235, 235, 245, 0.75);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-table-cell:first-child {
  flex: 0 0 44%;
  font-weight: 500;
}

.history-table-cell:nth-child(2) {
  flex: 1;
  padding-left: 8px;
  color: #FFFFFF;
}

.history-table-cell:last-child {
  flex: 0 0 56px;
  display: flex;
  justify-content: flex-end;
}

