@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@300;400;500;600;700;800&display=swap');

:root {
  --toss-blue: #3182f6;
  --toss-blue-hover: #1b64da;
  --toss-blue-light: #e8f3ff;
  --toss-green: #00c853;
  --toss-green-light: #e8faf0;
  --toss-red: #f04452;
  --toss-red-light: #fff0f1;
  --toss-orange: #f59f00;
  --toss-orange-light: #fff8e6;
  --toss-purple: #9b59b6;
  --toss-purple-light: #f5eeff;
  --toss-gray-900: #191f28;
  --toss-gray-800: #333d4b;
  --toss-gray-700: #4e5968;
  --toss-gray-600: #6b7684;
  --toss-gray-500: #8b95a1;
  --toss-gray-400: #b0b8c1;
  --toss-gray-300: #d1d6db;
  --toss-gray-200: #e5e8eb;
  --toss-gray-100: #f2f4f6;
  --toss-gray-50: #f9fafb;
  --toss-white: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.05), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--toss-gray-50);
  color: var(--toss-gray-900);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.02em;
}

/* ===== 로그인 ===== */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: var(--toss-white);
}

.login-box {
  width: 380px;
  max-width: 90vw;
  padding: 0 20px;
}

.login-box .logo {
  text-align: center;
  margin-bottom: 40px;
}

.login-box .logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--toss-gray-900);
  letter-spacing: -0.04em;
}

.login-box .logo p {
  font-size: 15px;
  color: var(--toss-gray-500);
  margin-top: 8px;
  font-weight: 400;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--toss-gray-700);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--toss-gray-900);
  background: var(--toss-gray-50);
  transition: var(--transition);
  letter-spacing: -0.02em;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--toss-gray-400);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--toss-blue);
  background: var(--toss-white);
  box-shadow: 0 0 0 3px rgba(49,130,246,0.12);
}

/* ===== 버튼 ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

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

.btn-primary {
  background: var(--toss-blue);
  color: var(--toss-white);
  width: 100%;
  padding: 16px;
  font-size: 16px;
}
.btn-primary:hover { background: var(--toss-blue-hover); }

.btn-blue { background: var(--toss-blue); color: var(--toss-white); }
.btn-blue:hover { background: var(--toss-blue-hover); }

.btn-success { background: var(--toss-green-light); color: #00a344; }
.btn-success:hover { background: #d1f5e0; }

.btn-danger { background: var(--toss-red-light); color: var(--toss-red); }
.btn-danger:hover { background: #ffd6da; }

.btn-warning { background: var(--toss-orange-light); color: #c27d00; }
.btn-warning:hover { background: #ffecb3; }

.btn-ghost { background: transparent; color: var(--toss-gray-600); }
.btn-ghost:hover { background: var(--toss-gray-100); }

.btn-outline {
  background: var(--toss-white);
  border: 1px solid var(--toss-gray-200);
  color: var(--toss-gray-700);
}
.btn-outline:hover { background: var(--toss-gray-50); border-color: var(--toss-gray-300); }

.btn-sm { padding: 8px 14px; font-size: 13px; border-radius: var(--radius-sm); }

.error-msg {
  color: var(--toss-red);
  font-size: 13px;
  text-align: center;
  margin-top: 16px;
  min-height: 20px;
  font-weight: 500;
}

/* ===== 레이아웃 ===== */
.app-layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 240px;
  background: var(--toss-white);
  border-right: 1px solid var(--toss-gray-100);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.sidebar-header {
  padding: 28px 24px 20px;
}

.sidebar-header h2 {
  font-size: 18px;
  font-weight: 800;
  color: var(--toss-gray-900);
  letter-spacing: -0.03em;
}

.sidebar-header .user-info {
  font-size: 13px;
  color: var(--toss-gray-500);
  margin-top: 4px;
  font-weight: 400;
}

.nav-section {
  padding: 8px 12px;
  flex: 1;
}

.nav-section .nav-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--toss-gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 16px 12px 8px;
}

.nav-menu { list-style: none; }
.nav-menu li { margin-bottom: 2px; }

.nav-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: var(--toss-gray-600);
  text-decoration: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.nav-menu a:hover {
  background: var(--toss-gray-50);
  color: var(--toss-gray-900);
}

.nav-menu a.active {
  background: var(--toss-blue-light);
  color: var(--toss-blue);
  font-weight: 600;
}

.nav-menu a .nav-icon {
  width: 20px;
  text-align: center;
  font-size: 16px;
}

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--toss-gray-100);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  color: var(--toss-gray-500);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.sidebar-footer a:hover {
  background: var(--toss-gray-50);
  color: var(--toss-gray-700);
}

.main-content {
  margin-left: 240px;
  flex: 1;
  padding: 32px 40px;
  min-height: 100vh;
  max-width: 1200px;
}

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

.page-header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.03em;
}

.page-header .header-actions { display: flex; gap: 8px; }

/* ===== 알림 배너 ===== */
.followup-banner {
  background: var(--toss-blue);
  color: var(--toss-white);
  padding: 16px 24px;
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDown {
  from { transform: translateY(-12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.followup-banner .banner-text { font-size: 15px; font-weight: 500; }
.followup-banner .banner-text strong { font-size: 18px; font-weight: 700; }

.followup-banner .btn {
  background: rgba(255,255,255,0.2);
  color: var(--toss-white);
  font-size: 13px;
  padding: 8px 16px;
}
.followup-banner .btn:hover { background: rgba(255,255,255,0.3); }

/* ===== 통계 카드 ===== */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--toss-white);
  padding: 20px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--toss-gray-100);
  transition: var(--transition);
}

.stat-card:hover { border-color: var(--toss-gray-200); }

.stat-card .stat-label {
  font-size: 13px;
  color: var(--toss-gray-500);
  font-weight: 500;
  margin-bottom: 8px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--toss-gray-900);
  letter-spacing: -0.03em;
}

.stat-card.blue .stat-value { color: var(--toss-blue); }
.stat-card.green .stat-value { color: var(--toss-green); }
.stat-card.orange .stat-value { color: var(--toss-orange); }
.stat-card.red .stat-value { color: var(--toss-red); }

/* ===== 필터 바 ===== */
.filter-bar {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-bar label {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-700);
}

.filter-bar input[type="date"] {
  padding: 8px 12px;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--toss-gray-700);
  background: var(--toss-white);
  transition: var(--transition);
}

.filter-bar input[type="date"]:focus {
  outline: none;
  border-color: var(--toss-blue);
}

.filter-bar .sep { color: var(--toss-gray-400); font-size: 13px; }

/* ===== 캘린더 ===== */
.calendar-container {
  background: var(--toss-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--toss-gray-100);
  padding: 24px;
}

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

.calendar-nav h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

.calendar-nav button {
  background: var(--toss-white);
  border: 1px solid var(--toss-gray-200);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--toss-gray-600);
  transition: var(--transition);
  font-family: inherit;
}

.calendar-nav button:hover {
  background: var(--toss-gray-50);
  border-color: var(--toss-gray-300);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1px solid var(--toss-gray-100);
  border-left: 1px solid var(--toss-gray-100);
}

.calendar-header-cell {
  background: var(--toss-gray-50);
  color: var(--toss-gray-600);
  padding: 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  border-right: 1px solid var(--toss-gray-100);
  border-bottom: 1px solid var(--toss-gray-100);
}

.calendar-header-cell:first-child { color: var(--toss-red); }
.calendar-header-cell:last-child { color: var(--toss-blue); }

.calendar-cell {
  background: var(--toss-white);
  min-height: 96px;
  padding: 8px;
  cursor: pointer;
  transition: var(--transition);
  border-right: 1px solid var(--toss-gray-100);
  border-bottom: 1px solid var(--toss-gray-100);
}

.calendar-cell:hover { background: var(--toss-blue-light); }

.calendar-cell.other-month { background: var(--toss-gray-50); }
.calendar-cell.other-month .day-number { color: var(--toss-gray-300); }

.calendar-cell.today { background: var(--toss-blue-light); }

.calendar-cell.today .day-number {
  background: var(--toss-blue);
  color: var(--toss-white) !important;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-cell .day-number {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--toss-gray-800);
}

.calendar-cell .day-number.sunday { color: var(--toss-red); }
.calendar-cell .day-number.saturday { color: var(--toss-blue); }

.calendar-cell .day-stats {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.calendar-cell .day-stats .tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  line-height: 1.6;
}

.tag-phone { background: var(--toss-blue-light); color: var(--toss-blue); }
.tag-field { background: var(--toss-orange-light); color: #c27d00; }
.tag-online { background: var(--toss-green-light); color: #00a344; }
.tag-pending { background: var(--toss-orange-light); color: var(--toss-orange); }
.tag-closed { background: var(--toss-green-light); color: var(--toss-green); }
.tag-failed { background: var(--toss-red-light); color: var(--toss-red); }
.tag-followup { background: var(--toss-purple-light); color: var(--toss-purple); }

/* ===== 담당자 탭 ===== */
.staff-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.staff-tab {
  padding: 8px 16px;
  border: 1px solid var(--toss-gray-200);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  background: var(--toss-white);
  color: var(--toss-gray-600);
  transition: var(--transition);
  font-family: inherit;
}

.staff-tab:hover { border-color: var(--toss-gray-300); }

.staff-tab.active {
  background: var(--toss-gray-900);
  color: var(--toss-white);
  border-color: var(--toss-gray-900);
}

/* ===== 담당자 카드 ===== */
.staff-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
}

.staff-card {
  background: var(--toss-white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--toss-gray-100);
  cursor: pointer;
  transition: var(--transition);
}

.staff-card:hover {
  border-color: var(--toss-blue);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.staff-card .staff-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--toss-blue-light);
  color: var(--toss-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 14px;
}

.staff-card .staff-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

.staff-card .staff-id {
  font-size: 13px;
  color: var(--toss-gray-400);
  margin-top: 2px;
}

/* ===== 테이블 ===== */
.table-container {
  background: var(--toss-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--toss-gray-100);
  overflow: hidden;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  background: var(--toss-gray-50);
  color: var(--toss-gray-600);
  padding: 12px 20px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border-bottom: 1px solid var(--toss-gray-100);
}

.data-table td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--toss-gray-50);
  font-size: 14px;
  color: var(--toss-gray-800);
}

.data-table tr { cursor: pointer; transition: var(--transition); }
.data-table tbody tr:hover { background: var(--toss-blue-light); }
.data-table tbody tr:last-child td { border-bottom: none; }

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending { background: var(--toss-orange-light); color: #c27d00; }
.status-closed { background: var(--toss-green-light); color: #00a344; }
.status-failed { background: var(--toss-red-light); color: var(--toss-red); }

/* ===== 상담 상세 ===== */
.consult-container { max-width: 720px; }

.record-info {
  background: var(--toss-white);
  border-radius: var(--radius-lg);
  padding: 28px;
  border: 1px solid var(--toss-gray-100);
  margin-bottom: 20px;
}

.record-info .info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
}

.record-info .info-item { display: flex; flex-direction: column; gap: 4px; }

.record-info .info-label {
  font-size: 12px;
  color: var(--toss-gray-500);
  font-weight: 500;
}

.record-info .info-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--toss-gray-900);
}

.action-bar {
  display: flex;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--toss-gray-100);
  flex-wrap: wrap;
}

/* ===== 상담 로그 ===== */
.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin: 24px 0 12px;
}

.chat-log {
  background: var(--toss-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--toss-gray-100);
  max-height: 500px;
  overflow-y: auto;
}

.chat-log .log-item {
  padding: 16px 24px;
  border-bottom: 1px solid var(--toss-gray-50);
  transition: var(--transition);
}

.chat-log .log-item:last-child { border-bottom: none; }
.chat-log .log-item:hover { background: var(--toss-gray-50); }

.chat-log .log-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.chat-log .log-author { font-size: 13px; font-weight: 700; color: var(--toss-gray-800); }
.chat-log .log-time { font-size: 11px; color: var(--toss-gray-400); }

.chat-log .log-content {
  font-size: 14px;
  line-height: 1.6;
  color: var(--toss-gray-700);
}

.chat-log .log-system { background: var(--toss-gray-50); }
.chat-log .log-system .log-author { color: var(--toss-gray-400); }
.chat-log .log-system .log-content { color: var(--toss-gray-500); font-size: 13px; }

.chat-input {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

.chat-input textarea {
  flex: 1;
  padding: 14px 16px;
  border: 1px solid var(--toss-gray-200);
  border-radius: var(--radius-md);
  resize: vertical;
  min-height: 56px;
  font-family: inherit;
  font-size: 14px;
  color: var(--toss-gray-900);
  background: var(--toss-white);
  transition: var(--transition);
}

.chat-input textarea:focus {
  outline: none;
  border-color: var(--toss-blue);
  box-shadow: 0 0 0 3px rgba(49,130,246,0.12);
}

.chat-input .btn-blue { align-self: flex-end; padding: 14px 24px; }

.chat-hint {
  font-size: 12px;
  color: var(--toss-gray-400);
  margin-top: 6px;
}

/* ===== 모달 ===== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  animation: fadeIn 0.15s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal {
  background: var(--toss-white);
  border-radius: var(--radius-xl);
  padding: 32px;
  width: 440px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--toss-gray-900);
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
}

/* ===== 영업등록 폼 ===== */
.form-card {
  background: var(--toss-white);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--toss-gray-100);
  max-width: 560px;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--toss-gray-100);
  margin: 24px 0;
}

.form-hint {
  font-size: 13px;
  color: var(--toss-gray-400);
  margin-bottom: 16px;
}

/* ===== 통계 페이지 ===== */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.stats-card-lg {
  background: var(--toss-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--toss-gray-100);
  padding: 28px;
}

.stats-card-lg h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--toss-gray-500);
  margin-bottom: 16px;
}

.stats-card-lg .big-number {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.stats-card-lg .big-number.blue { color: var(--toss-blue); }
.stats-card-lg .big-number.green { color: var(--toss-green); }

.stats-card-lg .sub-stat {
  font-size: 13px;
  color: var(--toss-gray-500);
  margin-top: 8px;
}

.rate-bar-container { margin-top: 20px; }

.rate-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 500;
  color: var(--toss-gray-600);
  margin-bottom: 8px;
}

.rate-bar {
  height: 8px;
  background: var(--toss-gray-100);
  border-radius: 100px;
  overflow: hidden;
}

.rate-bar-fill {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.rate-bar-fill.green { background: var(--toss-green); }
.rate-bar-fill.red { background: var(--toss-red); }

.breakdown-list { margin-top: 20px; }

.breakdown-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--toss-gray-50);
}

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

.breakdown-item .b-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--toss-gray-700);
}

.breakdown-item .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.breakdown-item .b-value {
  font-size: 15px;
  font-weight: 700;
  color: var(--toss-gray-900);
}

.dot-blue { background: var(--toss-blue); }
.dot-orange { background: var(--toss-orange); }
.dot-green { background: var(--toss-green); }
.dot-red { background: var(--toss-red); }
.dot-purple { background: var(--toss-purple); }

/* ===== 반응형 ===== */

/* 모바일 햄버거 버튼 */
.mobile-header {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: var(--toss-white);
  border-bottom: 1px solid var(--toss-gray-100);
  z-index: 200;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.mobile-header .hamburger {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none;
  font-size: 22px; cursor: pointer;
  border-radius: var(--radius-sm);
  color: var(--toss-gray-700);
}
.mobile-header .hamburger:active { background: var(--toss-gray-100); }

.mobile-header .mobile-title {
  font-size: 16px; font-weight: 700; color: var(--toss-gray-900);
  letter-spacing: -0.03em;
}

.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}
.sidebar-overlay.show { display: block; }

@media (max-width: 1024px) {
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  /* 모바일 헤더 표시 */
  .mobile-header { display: flex; }

  /* 사이드바 슬라이드 메뉴 */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 300;
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow-lg);
  }

  /* 메인 콘텐츠 */
  .main-content {
    margin-left: 0;
    padding: 72px 16px 24px;
  }

  /* 페이지 헤더 */
  .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .page-header h1 { font-size: 20px; }
  .header-actions { width: 100%; display: flex; gap: 8px; }
  .header-actions .btn { flex: 1; text-align: center; justify-content: center; }

  /* 통계 카드 */
  .stats-row {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .stat-card { padding: 16px 14px; }
  .stat-label { font-size: 12px; }
  .stat-value { font-size: 22px; }

  /* 캘린더 */
  .calendar-container { padding: 16px; }
  .calendar-nav { padding: 0 0 12px; }
  .calendar-nav h2 { font-size: 16px; }
  .calendar-nav button { padding: 6px 12px; font-size: 12px; }
  .calendar-cell { min-height: 56px; padding: 3px; }
  .calendar-cell .day-num { font-size: 11px; }
  .calendar-cell .day-stats .tag { font-size: 7px; padding: 0 2px; line-height: 14px; }

  /* 담당자 탭 */
  .staff-tabs { gap: 6px; flex-wrap: wrap; }
  .staff-tab { padding: 6px 12px; font-size: 12px; }

  /* 테이블 → 카드 변환 */
  .table-container { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data-table { min-width: 600px; }
  .data-table th, .data-table td { padding: 10px 8px; font-size: 13px; }

  /* 폼 */
  .form-card { padding: 20px 16px; }
  .form-group input, .form-group select, .form-group textarea {
    padding: 12px 14px; font-size: 14px;
  }

  /* 모달 */
  .modal-overlay { padding: 16px; align-items: flex-end; }
  .modal {
    max-height: 85vh;
    overflow-y: auto;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    padding: 24px 20px;
    animation: slideUp 0.3s ease;
  }

  @keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  /* 상담 상세 */
  .record-info { padding: 16px; }
  .info-grid { grid-template-columns: 1fr; gap: 12px; }
  .action-bar { flex-wrap: wrap; }
  .action-bar .btn { flex: 1; min-width: calc(50% - 4px); }

  .chat-input { padding: 12px; gap: 8px; }
  .chat-input textarea { font-size: 14px; }

  /* 필터 바 */
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-bar input { width: 100%; }

  /* 통계 페이지 */
  .stats-grid { grid-template-columns: 1fr; gap: 16px; }
  .stats-card-lg { padding: 20px; }
  .big-number { font-size: 36px; }

  /* 팔로업 배너 */
  .followup-banner {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
  }
  .followup-banner .btn { width: 100%; }

  /* 계정/담당자 */
  .staff-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
  .staff-card { padding: 16px; }

  /* 로그인 */
  .login-box { margin: 16px; padding: 32px 24px; }
}

@media (max-width: 480px) {
  .stats-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-value { font-size: 20px; }
  .staff-list { grid-template-columns: 1fr 1fr; gap: 8px; }
  .calendar-cell .day-stats { display: none; }
  .calendar-cell { min-height: 40px; }
  .calendar-cell .day-num { font-size: 12px; margin-bottom: 0; }
  .data-table { min-width: 500px; }
}

/* ===== 유틸리티 ===== */
.hidden { display: none !important; }

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--toss-gray-300); border-radius: 100px; }
::-webkit-scrollbar-thumb:hover { background: var(--toss-gray-400); }

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--toss-gray-400);
}

.empty-state .empty-icon { font-size: 48px; margin-bottom: 16px; }
.empty-state .empty-text { font-size: 15px; font-weight: 500; }

/* 상담 로그 삭제 버튼 */
.btn-log-delete {
  background: none;
  border: none;
  color: var(--toss-gray-300);
  cursor: pointer;
  font-size: 13px;
  padding: 2px 6px;
  margin-left: 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.btn-log-delete:hover {
  color: #ff4d4f;
  background: rgba(255, 77, 79, 0.08);
}
.log-meta {
  display: flex;
  align-items: center;
}
