/* ==========================================================================
   스케줄 프로 (Schedule Pro) - Ultra High-End Glassmorphism Design System
   모바일 최적화 & 반응형 프리미엄 UI 스타일시트
   ========================================================================== */

:root {
  /* 테마 베이스 팔레트 (OLED 친화형 딥 스페이스 다크) */
  --bg-base: #060913;
  --bg-surface: #0c1322;
  --bg-card: rgba(16, 25, 45, 0.72);
  --bg-card-hover: rgba(22, 34, 60, 0.85);
  --bg-glass-input: rgba(10, 16, 30, 0.8);
  --bg-pill: rgba(255, 255, 255, 0.06);

  /* 보더 & 헤어라인 (글래스모피즘 정밀 테두리) */
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-medium: rgba(255, 255, 255, 0.16);
  --border-bright: rgba(255, 255, 255, 0.28);
  --border-focus: #38bdf8;
  --border-glow: rgba(56, 189, 248, 0.4);

  /* 텍스트 컬러 */
  --text-pure: #ffffff;
  --text-main: #f1f5f9;
  --text-sub: #94a3b8;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* 프리미엄 액센트 그라디언트 */
  --accent-blue: #3b82f6;
  --accent-blue-gradient: linear-gradient(135deg, #38bdf8 0%, #2563eb 100%);
  --accent-blue-glow: 0 4px 20px rgba(56, 189, 248, 0.35);

  --accent-emerald: #10b981;
  --accent-call-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
  --accent-call-glow: 0 4px 18px rgba(16, 185, 129, 0.4);

  --accent-purple: #a855f7;
  --accent-amber: #f59e0b;
  --accent-rose: #f43f5e;
  --accent-cyan: #06b6d4;

  /* 상태별 색상 */
  --status-reserved: #38bdf8;
  --status-meeting: #c084fc;
  --status-progress: #fbbf24;
  --status-done: #34d399;
  --status-cancel: #f87171;

  /* 프리미엄 입체 그림자 */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 20px 45px -10px rgba(0, 0, 0, 0.75);
  --shadow-sheet: 0 -10px 40px rgba(0, 0, 0, 0.6);

  /* 곡률 */
  --radius-xs: 6px;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* 애니메이션 타이밍 */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --trans-fast: 0.15s ease;
  --trans-mid: 0.28s var(--ease-smooth);
}

/* ==========================================================================
   기본 리셋 & 폰트 세팅
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  min-height: 100%;
  background-color: var(--bg-base);
  color: var(--text-main);
  font-family: 'Pretendard', 'Outfit', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.font-num {
  font-family: 'Outfit', 'Pretendard', sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* 앰비언트 글로우 배경 */
.ambient-glow {
  position: fixed;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.45;
}

.glow-top {
  width: 420px;
  height: 420px;
  top: -120px;
  right: -80px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(37, 99, 235, 0.12) 60%, transparent 80%);
}

.glow-bottom {
  width: 500px;
  height: 500px;
  bottom: -150px;
  left: -120px;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.18) 0%, rgba(139, 92, 246, 0.1) 60%, transparent 80%);
}

/* 글래스 패널 공통 */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
}

/* 앱 래퍼 */
.app-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  max-width: 1400px;
  margin: 0 auto;
  padding: max(12px, env(safe-area-inset-top)) 14px max(96px, calc(env(safe-area-inset-bottom) + 80px)) 14px;
}

/* ==========================================================================
   1. 상단 프리미엄 헤더
   ========================================================================== */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 0 rgba(255, 255, 255, 0.08);
  position: sticky;
  top: max(8px, env(safe-area-inset-top));
  z-index: 50;
  gap: 8px;
  overflow: hidden;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.app-logo-badge {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: var(--accent-blue-gradient);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--accent-blue-glow);
  flex-shrink: 0;
}

.header-brand {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.app-title {
  font-size: 1.12rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-pure);
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.version-tag {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #041028;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.app-subtitle {
  font-size: 0.74rem;
  color: var(--text-sub);
  font-weight: 500;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 글래스 버튼류 */
.btn-glass {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-main);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  user-select: none;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.btn-glass:active {
  transform: scale(0.94);
}

.btn-icon-only {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 50%;
}

.btn-today {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.3);
  color: #7dd3fc;
  font-weight: 700;
}

.btn-today .dot-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 8px #38bdf8;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.75); }
}

/* ==========================================================================
   2. 실시간 검색 드로어
   ========================================================================== */
.search-drawer {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all var(--trans-mid);
  margin-bottom: 0;
}

.search-drawer.open {
  max-height: 120px;
  opacity: 1;
  margin-bottom: 12px;
}

.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 14px;
  color: var(--text-sub);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 46px;
  padding: 0 42px 0 42px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.92rem;
  font-family: inherit;
  outline: none;
  transition: all var(--trans-fast);
}

.search-input:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.btn-clear-search {
  position: absolute;
  right: 12px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.search-meta {
  font-size: 0.76rem;
  color: #38bdf8;
  margin-top: 6px;
  padding-left: 6px;
  font-weight: 600;
}

/* ==========================================================================
   3. 요약 통계 바 (Stats Ribbon)
   ========================================================================== */
.stats-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 10px 14px;
  background: rgba(14, 22, 38, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 14px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.stat-label {
  font-size: 0.72rem;
  color: var(--text-sub);
  font-weight: 500;
}

.stat-val {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.02em;
}

.stat-val.stat-highlight {
  color: #34d399;
}

.stat-divider {
  width: 1px;
  height: 24px;
  background: var(--border-subtle);
}

/* ==========================================================================
   4. 메인 콘텐츠 구조
   ========================================================================== */
.main-content {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

/* ==========================================================================
   5. 달력 컴포넌트
   ========================================================================== */
.calendar-card {
  border-radius: var(--radius-lg);
  padding: 16px 14px 12px 14px;
  user-select: none;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.month-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all var(--trans-fast);
}

.month-title-wrap:hover {
  background: rgba(255, 255, 255, 0.08);
}

.month-title-wrap:active {
  transform: scale(0.96);
}

.month-year-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-pure);
}

.month-chevron {
  color: var(--text-sub);
  transition: transform var(--trans-fast);
}

.month-title-wrap:hover .month-chevron {
  color: #38bdf8;
  transform: translateY(1px);
}

.nav-btn-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.btn-arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--border-medium);
}

.btn-arrow:active {
  transform: scale(0.9);
}

/* 요일 헤더 */
.weekday-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  text-align: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 8px;
}

.weekday {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-sub);
}

.weekday.sun { color: #f87171; }
.weekday.sat { color: #60a5fa; }

/* 날짜 그리드 */
.days-grid-container {
  touch-action: pan-y;
  position: relative;
}

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

.day-cell {
  position: relative;
  aspect-ratio: 1 / 1;
  min-height: 46px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
  transition: all var(--trans-fast);
}

.day-cell:hover:not(.empty) {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--border-subtle);
}

.day-cell:active:not(.empty) {
  transform: scale(0.92);
}

.day-cell.other-month {
  opacity: 0.25;
}

.day-cell.sun .day-number { color: #f87171; }
.day-cell.sat .day-number { color: #60a5fa; }

.day-number {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1;
  margin-bottom: 3px;
}

/* 오늘 날짜 */
.day-cell.today {
  border-color: rgba(56, 189, 248, 0.6);
  background: rgba(56, 189, 248, 0.12);
}

.day-cell.today .day-number {
  color: #38bdf8;
  font-weight: 800;
}

/* 선택된 날짜 (하이라이트) */
.day-cell.selected {
  background: var(--accent-blue-gradient) !important;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.6);
  border-color: #60a5fa !important;
  transform: scale(1.02);
}

.day-cell.selected .day-number {
  color: #ffffff !important;
  font-weight: 800;
}

.day-cell.selected .event-dot {
  background: #ffffff !important;
  box-shadow: 0 0 6px #ffffff !important;
}

/* 일정 표시 닷 */
.event-dots-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 8px;
}

.event-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

.event-dot.dot-reserved { background: var(--status-reserved); box-shadow: 0 0 6px var(--status-reserved); }
.event-dot.dot-meeting { background: var(--status-meeting); box-shadow: 0 0 6px var(--status-meeting); }
.event-dot.dot-progress { background: var(--status-progress); box-shadow: 0 0 6px var(--status-progress); }
.event-dot.dot-done { background: var(--status-done); box-shadow: 0 0 6px var(--status-done); }
.event-dot.dot-cancel { background: var(--status-cancel); box-shadow: 0 0 6px var(--status-cancel); }

.event-count-badge {
  font-size: 0.65rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.25);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.4);
  line-height: 1.1;
}

.day-cell.selected .event-count-badge {
  background: rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.6);
}

/* 달력 범례 */
.calendar-summary {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  padding-top: 10px;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.74rem;
  color: var(--text-sub);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-dot.active-dot {
  background: var(--accent-blue);
  box-shadow: 0 0 6px rgba(59, 130, 246, 0.8);
}

.legend-dot.today-dot {
  border: 2px solid var(--accent-blue);
  background: transparent;
}

.legend-dot.has-event-dot {
  background: var(--accent-emerald);
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
}

/* ==========================================================================
   6. 상세 일정 섹션
   ========================================================================== */
.schedule-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 2px;
}

.schedule-title-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.selected-date-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text-pure);
}

.schedule-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 800;
}

.desktop-add-btn {
  display: none;
}

/* 필터 탭 (가로 스크롤) */
.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

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

.filter-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-sub);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  user-select: none;
}

.filter-chip .chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.chip-dot.dot-reserved { background: var(--status-reserved); }
.chip-dot.dot-meeting { background: var(--status-meeting); }
.chip-dot.dot-progress { background: var(--status-progress); }
.chip-dot.dot-done { background: var(--status-done); }
.chip-dot.dot-cancel { background: var(--status-cancel); }

.filter-chip:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-pure);
}

.filter-chip.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: #38bdf8;
  color: #7dd3fc;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
}

/* ==========================================================================
   7. 일정 카드 (고급 모바일 최적화 및 원클릭 통화 액션)
   ========================================================================== */
.schedule-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.schedule-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-sm), inset 0 1px 0 0 rgba(255, 255, 255, 0.06);
  position: relative;
  overflow: hidden;
  transition: all var(--trans-mid);
}

.schedule-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--accent-blue);
  opacity: 0.9;
}

.schedule-card.status-예약완료::before { background: var(--status-reserved); }
.schedule-card.status-상담미팅::before { background: var(--status-meeting); }
.schedule-card.status-진행중::before { background: var(--status-progress); }
.schedule-card.status-완료::before { background: var(--status-done); box-shadow: 0 0 8px var(--status-done); }
.schedule-card.status-취소::before { background: var(--status-cancel); }

/* 완료된 일정 카드 시각적 처리 (반투명 및 완료 표시) */
.schedule-card.status-완료 {
  background: rgba(14, 22, 38, 0.45);
  border-color: rgba(52, 211, 153, 0.25);
}

.schedule-card.status-완료 .card-main-content {
  opacity: 0.52;
  transition: opacity var(--trans-mid);
}

.schedule-card.status-완료 .customer-name {
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-color: #34d399;
  text-decoration-thickness: 2px;
}

.schedule-card.status-완료 .card-address-row {
  opacity: 0.65;
}

.schedule-card.status-완료 .card-memo {
  opacity: 0.65;
}

.schedule-card.status-완료 .card-call-row {
  opacity: 0.72;
}

.schedule-card.status-완료:hover .card-main-content,
.schedule-card.status-완료:hover .card-call-row {
  opacity: 0.9;
}

/* 완료 뱃지 태그 */
.completed-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px;
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.45);
  color: #34d399;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: -0.01em;
  text-decoration: none !important;
}

/* 완료 토글 버튼 */
.btn-toggle-complete {
  background: rgba(52, 211, 153, 0.12);
  border-color: rgba(52, 211, 153, 0.35);
  color: #34d399;
}

.btn-toggle-complete:hover {
  background: rgba(52, 211, 153, 0.25);
  border-color: rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.btn-toggle-complete.is-completed {
  background: rgba(52, 211, 153, 0.28);
  border-color: #34d399;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(52, 211, 153, 0.35);
}

.schedule-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  white-space: nowrap;
}

.card-time-wrap,
.card-date-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap !important;
  flex-shrink: 0;
}

.card-time-wrap svg,
.card-date-badge svg {
  color: #38bdf8;
  flex-shrink: 0;
}

/* 상태 뱃지 (클릭 시 빠른 상태 토글) */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: all var(--trans-fast);
  white-space: nowrap !important;
  flex-shrink: 0;
}

.status-badge:hover {
  transform: scale(1.05);
}

.status-badge:active {
  transform: scale(0.95);
}

.status-badge.예약완료 {
  background: rgba(56, 189, 248, 0.15);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
}

.status-badge.상담미팅 {
  background: rgba(192, 132, 252, 0.15);
  color: #d8b4fe;
  border: 1px solid rgba(192, 132, 252, 0.35);
}

.status-badge.진행중 {
  background: rgba(251, 191, 36, 0.15);
  color: #fde047;
  border: 1px solid rgba(251, 191, 36, 0.35);
}

.status-badge.완료 {
  background: rgba(52, 211, 153, 0.15);
  color: #6ee7b7;
  border: 1px solid rgba(52, 211, 153, 0.35);
}

.status-badge.취소 {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

/* 고객명 및 메모 */
.card-main-content {
  cursor: pointer;
  min-width: 0;
}

.customer-name {
  font-size: 1.16rem;
  font-weight: 800;
  color: var(--text-pure);
  margin-bottom: 4px;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: keep-all;
}

.card-memo {
  font-size: 0.86rem;
  color: var(--text-sub);
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ==========================================================================
   8. 대형 원터치 통화 & 유틸리티 액션 바 (모바일 2단 분리 & 폰번호 줄바꿈 방지)
   ========================================================================== */
.card-action-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
  width: 100%;
}

/* 1단: 100% 너비 원클릭 전화 통화 바 (폰번호 절대 2줄 분할 방지) */
.card-call-row {
  width: 100%;
  display: flex;
}

.btn-call-action {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 16px;
  background: var(--accent-call-gradient);
  color: #ffffff;
  text-decoration: none;
  border-radius: var(--radius-md);
  font-weight: 700;
  box-shadow: var(--accent-call-glow);
  transition: all var(--trans-fast);
  user-select: none;
  white-space: nowrap !important;
  box-sizing: border-box;
}

.btn-call-action:hover {
  box-shadow: 0 6px 24px rgba(16, 185, 129, 0.55);
  transform: translateY(-1px);
}

.btn-call-action:active {
  transform: scale(0.98);
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.4);
}

.call-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  flex-shrink: 0;
}

.call-phone-num {
  font-size: 1.08rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap !important;
  word-break: keep-all !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  flex: 1;
  text-align: left;
  padding-left: 6px;
  color: #ffffff;
  overflow: hidden;
  text-overflow: ellipsis;
}

.call-action-pill {
  font-size: 0.74rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  white-space: nowrap !important;
  flex-shrink: 0;
  letter-spacing: -0.01em;
}

.no-phone-pill {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border-subtle);
  color: var(--text-sub);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap !important;
}

/* 2단: 유틸리티 액션 바 (문자, 복사, 지도, 수정, 삭제 - 균등 플렉스 배치) */
.card-utility-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.btn-util {
  flex: 1;
  min-width: 0;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.76rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap !important;
  transition: all var(--trans-fast);
  box-sizing: border-box;
  user-select: none;
}

.btn-util span {
  white-space: nowrap !important;
}

.btn-util svg {
  flex-shrink: 0;
}

.btn-util:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border-color: var(--border-medium);
}

.btn-util:active {
  transform: scale(0.93);
}

.btn-util-sms {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
}

.btn-util-sms:hover {
  background: rgba(56, 189, 248, 0.22);
  color: #7dd3fc;
  border-color: rgba(56, 189, 248, 0.5);
}

.btn-copy-phone:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-util-map {
  background: rgba(254, 229, 0, 0.12);
  border-color: rgba(254, 229, 0, 0.4);
  color: #fee500;
}

.btn-util-map:hover {
  background: rgba(254, 229, 0, 0.22);
  color: #fef08a;
  border-color: rgba(254, 229, 0, 0.6);
}

.btn-edit:hover {
  background: rgba(147, 197, 253, 0.15);
  color: #93c5fd;
  border-color: rgba(147, 197, 253, 0.4);
}

.btn-delete-card:hover {
  background: rgba(248, 113, 113, 0.15);
  color: #fca5a5;
  border-color: rgba(248, 113, 113, 0.4);
}

/* 빈 상태 디자인 */
.empty-schedule-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 42px 20px;
  text-align: center;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px dashed var(--border-medium);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
}

.empty-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  color: #38bdf8;
}

.empty-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.empty-desc {
  font-size: 0.84rem;
  line-height: 1.45;
  margin-bottom: 18px;
  color: var(--text-sub);
}

/* ==========================================================================
   9. 모바일 플로팅 액션 버튼 (FAB)
   ========================================================================== */
.mobile-fab-container {
  position: fixed;
  bottom: max(20px, env(safe-area-inset-bottom));
  right: 20px;
  z-index: 90;
}

.btn-fab {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 54px;
  padding: 0 22px;
  border-radius: var(--radius-full);
  background: var(--accent-blue-gradient);
  color: #ffffff;
  font-size: 0.96rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 26px rgba(37, 99, 235, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all var(--trans-mid);
}

.btn-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.7);
}

.btn-fab:active {
  transform: scale(0.95);
}

/* ==========================================================================
   10. 모달 & 모바일 바텀시트 (Bottom Sheet)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 200;
  display: flex;
  align-items: flex-end; /* 모바일: 바텀시트 */
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--trans-mid);
}

.modal-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  width: 100%;
  max-width: 560px;
  background: #0f172a;
  border: 1px solid var(--border-medium);
  border-top-left-radius: var(--radius-xl);
  border-top-right-radius: var(--radius-xl);
  padding: 12px 20px max(28px, calc(env(safe-area-inset-bottom) + 16px)) 20px;
  box-shadow: var(--shadow-sheet);
  transform: translateY(100%);
  transition: transform var(--trans-mid);
  max-height: 92vh;
  overflow-y: auto;
}

.modal-backdrop.open .modal-sheet {
  transform: translateY(0);
}

.sheet-handle-bar {
  width: 44px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  margin: 0 auto 16px auto;
}

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

.modal-title {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--text-pure);
  letter-spacing: -0.02em;
}

.btn-close-modal {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  transition: all var(--trans-fast);
}

.btn-close-modal:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* 폼 요소 */
.modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-row {
  display: flex;
  gap: 12px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.form-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label .required {
  color: #f87171;
}

.label-sub {
  font-size: 0.74rem;
  color: #38bdf8;
}

.label-badge {
  font-size: 0.72rem;
  color: #34d399;
  font-weight: 600;
}

.form-control {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--bg-glass-input);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 0.94rem;
  font-family: inherit;
  outline: none;
  transition: all var(--trans-fast);
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--border-glow);
}

.textarea-control {
  height: auto;
  min-height: 84px;
  padding: 12px 14px;
  resize: vertical;
}

/* 시간 프리셋 칩 */
.time-presets {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: -6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.time-presets::-webkit-scrollbar {
  display: none;
}

.btn-time-chip {
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--trans-fast);
  white-space: nowrap;
}

.btn-time-chip:hover {
  background: rgba(56, 189, 248, 0.15);
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
}

.btn-time-chip:active {
  transform: scale(0.94);
}

/* 모달 상태 셀렉터 (터치 친화형 라디오 버튼) */
.modal-status-selector {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.status-select-btn {
  height: 38px;
  padding: 0 4px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.status-select-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-pure);
}

.status-select-btn.active {
  background: rgba(56, 189, 248, 0.22);
  border-color: #38bdf8;
  color: #7dd3fc;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.3);
}

/* 전화번호 인풋 */
.phone-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.phone-prefix-icon {
  position: absolute;
  left: 14px;
  color: #34d399;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.phone-input {
  padding-left: 42px;
}

/* 모달 하단 버튼 */
.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.modal-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-md);
  background: var(--accent-blue-gradient);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 800;
  border: none;
  cursor: pointer;
  box-shadow: var(--accent-blue-glow);
  transition: all var(--trans-fast);
}

.btn-primary:hover {
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.6);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: scale(0.97);
}

.btn-secondary {
  height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-subtle);
  color: var(--text-sub);
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.btn-delete {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 48px;
  padding: 0 16px;
  border-radius: var(--radius-md);
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.3);
  color: #f87171;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-delete:hover {
  background: rgba(248, 113, 113, 0.22);
}

/* ==========================================================================
   11. 월 빠른 선택 12-그리드 모달
   ========================================================================== */
.year-selector {
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
}

.btn-icon-sub {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
}

.month-grid-12 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}

.month-picker-btn {
  height: 52px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-size: 0.96rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.month-picker-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--border-medium);
}

.month-picker-btn.active {
  background: var(--accent-blue-gradient);
  border-color: #38bdf8;
  color: #ffffff;
  box-shadow: var(--accent-blue-glow);
}

/* ==========================================================================
   12. 데이터 관리 모달
   ========================================================================== */
.data-menu-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.data-menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  text-align: left;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.data-menu-item:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

.item-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.item-icon-wrap.icon-green { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.item-icon-wrap.icon-blue { background: rgba(56, 189, 248, 0.18); color: #38bdf8; }
.item-icon-wrap.icon-purple { background: rgba(168, 85, 247, 0.18); color: #c084fc; }
.item-icon-wrap.icon-amber { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

.item-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-title {
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text-pure);
}

.item-desc {
  font-size: 0.78rem;
  color: var(--text-sub);
}

.danger-item:hover {
  border-color: rgba(248, 113, 113, 0.4);
}

/* ==========================================================================
   13. 토스트 알림 (Toast)
   ========================================================================== */
.toast-container {
  position: fixed;
  top: max(24px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 350;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  padding: 12px 22px;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: var(--radius-full);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 700;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(56, 189, 248, 0.3);
  animation: toastPop 2.8s forwards var(--ease-smooth);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

@keyframes toastPop {
  0% { opacity: 0; transform: translateY(-20px) scale(0.9); }
  12% { opacity: 1; transform: translateY(0) scale(1); }
  85% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-20px) scale(0.9); }
}

/* ==========================================================================
   14. PC / 태블릿 반응형 (1024px 이상)
   ========================================================================== */
@media (min-width: 1024px) {
  .app-wrapper {
    padding: 24px 32px;
  }

  .app-header {
    padding: 14px 22px;
    margin-bottom: 20px;
  }

  .app-title {
    font-size: 1.35rem;
  }

  /* 좌/우 2열 분할 레이아웃 */
  .main-content {
    display: grid;
    grid-template-columns: 460px 1fr;
    gap: 28px;
    align-items: start;
  }

  .calendar-section {
    position: sticky;
    top: 90px;
  }

  .calendar-card {
    padding: 24px 20px;
  }

  .day-cell {
    min-height: 56px;
  }

  .day-number {
    font-size: 1.05rem;
  }

  /* PC에서도 따라다니는 단일 플로팅 등록 버튼으로 통일 (상단 중복 버튼 제거) */
  .desktop-add-btn {
    display: none !important;
  }

  .mobile-fab-container {
    display: block !important;
    bottom: 32px;
    right: 32px;
  }

  /* PC에서 모달은 중앙 팝업 다이얼로그 형태로 표시 */
  .modal-backdrop {
    align-items: center;
    padding: 20px;
  }

  .modal-sheet {
    border-radius: var(--radius-xl);
    transform: scale(0.94) translateY(12px);
    padding: 26px 28px;
  }

  .modal-backdrop.open .modal-sheet {
    transform: scale(1) translateY(0);
  }

  .sheet-handle-bar {
    display: none;
  }
}

/* ==========================================================================
   15. 사용자 인증 & 프로필 뱃지 스타일
   ========================================================================== */
.user-profile-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-full);
}

.user-avatar-icon {
  font-size: 0.85rem;
}

.user-name-text {
  font-size: 0.82rem;
  font-weight: 700;
  color: #7dd3fc;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-logout {
  padding: 2px 7px;
  background: rgba(248, 113, 113, 0.2);
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: var(--radius-full);
  color: #fca5a5;
  font-size: 0.7rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-logout:hover {
  background: rgba(248, 113, 113, 0.35);
  color: #ffffff;
}

.btn-auth-trigger {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.2), rgba(37, 99, 235, 0.2));
  border-color: rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  font-weight: 700;
}

/* ==========================================================================
   16. 주소 검색 & 카카오맵 연동 스타일
   ========================================================================== */
.btn-address-search {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: var(--radius-full);
  color: #38bdf8;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.btn-address-search:hover {
  background: rgba(56, 189, 248, 0.28);
  transform: translateY(-1px);
}

.address-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.address-prefix-icon {
  position: absolute;
  left: 14px;
  color: #38bdf8;
  pointer-events: none;
  display: flex;
  align-items: center;
}

.address-input {
  padding-left: 42px;
}

/* 일정 카드 내 주소 행 & 카카오맵 바로가기 */
.card-address-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: #cbd5e1;
  text-decoration: none;
  transition: all var(--trans-fast);
  margin-top: 2px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
}

.card-address-row:hover {
  background: rgba(254, 229, 0, 0.1);
  border-color: rgba(254, 229, 0, 0.35);
  color: #fee500;
}

.card-address-icon {
  color: #fee500;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.card-address-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  word-break: keep-all;
  line-height: 1.3;
}

.card-address-badge {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fee500;
  color: #191919;
  flex-shrink: 0;
  letter-spacing: -0.02em;
  white-space: nowrap !important;
}

/* 카카오맵 버튼 (카드 하단 액션바) */
.btn-map-action {
  width: 44px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background: rgba(254, 229, 0, 0.12);
  border: 1px solid rgba(254, 229, 0, 0.4);
  color: #fee500;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--trans-fast);
  flex-shrink: 0;
}

.btn-map-action:hover {
  background: rgba(254, 229, 0, 0.25);
  transform: translateY(-1px);
}

.btn-map-action:active {
  transform: scale(0.92);
}

/* ==========================================================================
   17. 회원가입 & 로그인 모달
   ========================================================================== */
.auth-sheet {
  max-width: 450px;
}

.auth-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.06);
  padding: 3px;
  border-radius: var(--radius-full);
}

.auth-tab-btn {
  padding: 6px 18px;
  border-radius: var(--radius-full);
  border: none;
  background: transparent;
  color: var(--text-sub);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  transition: all var(--trans-fast);
}

.auth-tab-btn.active {
  background: var(--accent-blue-gradient);
  color: #ffffff;
  box-shadow: var(--accent-blue-glow);
}

.auth-form {
  margin-top: 4px;
}

.auth-error-msg {
  font-size: 0.8rem;
  color: #f87171;
  font-weight: 600;
  min-height: 18px;
  padding: 2px 4px;
}

.auth-submit-btn {
  width: 100%;
  margin-top: 6px;
}

/* ==========================================================================
   18. 모바일 전용 텍스트 줄바꿈 방지 & 초소형 화면 완벽 최적화
   ========================================================================== */

/* 기본 텍스트 줄바꿈 방지 공통 유틸리티 */
.font-num {
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.btn-glass {
  white-space: nowrap;
  flex-shrink: 0;
}

.status-select-btn {
  white-space: nowrap !important;
}

.filter-chip {
  white-space: nowrap !important;
}

.legend-item {
  white-space: nowrap !important;
}

.btn-fab {
  white-space: nowrap !important;
}

@media (max-width: 480px) {
  .app-wrapper {
    padding: max(8px, env(safe-area-inset-top)) 8px max(90px, calc(env(safe-area-inset-bottom) + 78px)) 8px;
  }

  .app-header {
    padding: 8px 10px;
    margin-bottom: 10px;
    gap: 8px;
    overflow: hidden;
  }

  .header-left {
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .app-logo-badge {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
  }

  .app-logo-badge svg {
    width: 17px;
    height: 17px;
  }

  .header-brand {
    min-width: 0;
    overflow: hidden;
  }

  .brand-row {
    min-width: 0;
    overflow: hidden;
    gap: 4px;
    white-space: nowrap;
  }

  .app-title {
    font-size: 1.02rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.2;
  }

  /* 모바일 헤더: 텍스트 충돌/겹침 방지를 위해 Pro 뱃지와 서브 날짜는 숨김 */
  .version-tag {
    display: none !important;
  }

  .app-subtitle {
    display: none !important;
  }

  .header-actions {
    gap: 5px;
    flex-shrink: 0;
  }

  /* 모바일 우측 액션 버튼들을 통일된 34px 원형 글래스 버튼으로 최적화 */
  .btn-glass {
    height: 34px;
    padding: 0 10px;
    font-size: 0.78rem;
    gap: 4px;
  }

  .btn-icon-only {
    width: 34px;
    height: 34px;
    padding: 0;
  }

  /* 로그인 버튼: 모바일에서는 34px 원형 아이콘 버튼으로 변환하여 텍스트 겹침 완전 차단 */
  .btn-auth-trigger {
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }

  .auth-btn-text {
    display: none !important;
  }

  /* 오늘 버튼 */
  .btn-today {
    height: 34px;
    padding: 0 8px;
    font-size: 0.74rem;
    gap: 4px;
  }

  .today-btn-text {
    display: inline;
  }

  .user-profile-badge {
    padding: 2px 7px;
    gap: 4px;
    max-width: 110px;
  }

  .user-name-text {
    max-width: 44px;
    font-size: 0.74rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .btn-logout {
    padding: 1px 5px;
    font-size: 0.65rem;
  }

  /* 요약 통계 바 컴팩트 */
  .stats-ribbon {
    padding: 8px 10px;
    margin-bottom: 10px;
  }

  .stat-label {
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .stat-val {
    font-size: 1.02rem;
    white-space: nowrap;
  }

  /* 일정 카드 패딩 및 폰트 */
  .schedule-card {
    padding: 13px 12px;
    gap: 10px;
  }

  .customer-name {
    font-size: 1.08rem;
  }

  /* 통화 버튼 모바일 최적화 (절대 줄바꿈 방지) */
  .btn-call-action {
    min-height: 46px;
    padding: 7px 12px;
    gap: 8px;
  }

  .call-icon-wrap {
    width: 30px;
    height: 30px;
  }

  .call-icon-wrap svg {
    width: 15px;
    height: 15px;
  }

  .call-phone-num {
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    padding-left: 2px;
  }

  .call-action-pill {
    padding: 3px 8px;
    font-size: 0.72rem;
  }

  /* 유틸리티 액션 버튼 바 */
  .card-utility-bar {
    gap: 5px;
  }

  .btn-util {
    height: 36px;
    font-size: 0.74rem;
    gap: 3px;
    padding: 0 2px;
  }

  .btn-util svg {
    width: 14px;
    height: 14px;
  }

  .filter-chip {
    padding: 5px 11px;
    font-size: 0.76rem;
  }

  .status-select-btn {
    height: 36px;
    font-size: 0.72rem;
    padding: 0 2px;
  }
}

@media (max-width: 390px) {
  .btn-today {
    width: 34px;
    padding: 0;
    justify-content: center;
    border-radius: 50%;
  }

  .today-btn-text {
    display: none !important;
  }

  .app-title {
    font-size: 0.98rem;
  }
}

@media (max-width: 360px) {
  .app-wrapper {
    padding-left: 5px;
    padding-right: 5px;
  }

  .app-title {
    font-size: 0.92rem;
  }

  .btn-call-action {
    padding: 6px 10px;
  }

  .call-phone-num {
    font-size: 0.94rem;
  }

  .call-action-pill {
    font-size: 0.68rem;
    padding: 2px 6px;
  }

  .btn-util {
    height: 34px;
    font-size: 0.7rem;
    gap: 2px;
  }

  .btn-util svg {
    width: 13px;
    height: 13px;
  }
}
