/* ─── 기본 설정 ─────────────────────────────────────────────── */
* { box-sizing: border-box; }

body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.6;
}

/* ─── 로그인/회원가입 페이지 전체 배경 ────────────────────────── */
#page-login, #page-register {
  margin-top: -80px;
  padding-top: 0;
}

/* ─── 네비게이션 ─────────────────────────────────────────────── */
nav { backdrop-filter: blur(8px); }

.nav-btn { font-size: 14px; }

/* ─── 관리자 탭 ──────────────────────────────────────────────── */
.admin-tab {
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border: none;
}

.admin-tab.active {
  background: white;
  color: #2563eb;
  box-shadow: 0 1px 6px rgba(0,0,0,0.10);
}

.admin-tab:hover:not(.active) {
  background: rgba(255,255,255,0.6);
  color: #374151;
}

/* ─── 주간 그리드 ─────────────────────────────────────────────── */
.week-grid-container {
  width: 100%;
  overflow-x: auto;
}

.week-grid-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  table-layout: fixed;
}

.week-grid-table th {
  background: #f8fafc;
  padding: 12px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 2;
}

.week-grid-table th:first-child {
  width: 80px;
  background: #f1f5f9;
  color: #64748b;
}

.week-grid-table th.today-col {
  background: #eff6ff;
  color: #2563eb;
}

.week-grid-table td {
  border: 1px solid #f0f0f0;
  vertical-align: top;
  padding: 4px;
  min-height: 60px;
  height: 60px;
}

.week-grid-table td:first-child {
  background: #f8fafc;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
  width: 80px;
  padding: 8px 4px;
}

.week-grid-table td.today-col {
  background: #fafcff;
}

/* 일정 아이템 */
.sched-item {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: white;
  border-radius: 8px;
  padding: 5px 7px;
  margin-bottom: 3px;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.4;
  transition: all 0.15s ease;
  box-shadow: 0 1px 3px rgba(37,99,235,0.2);
  overflow: hidden;
}

.sched-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(37,99,235,0.3);
}

.sched-item.status-completed {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 1px 3px rgba(5,150,105,0.2);
}

.sched-item.status-cancelled {
  background: linear-gradient(135deg, #9ca3af, #6b7280);
  box-shadow: 0 1px 3px rgba(107,114,128,0.2);
}

.sched-item .sched-time {
  font-size: 10px;
  opacity: 0.9;
  font-weight: 600;
}

.sched-item .sched-course {
  font-weight: 700;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sched-item .sched-instructor {
  font-size: 10px;
  opacity: 0.85;
}

/* ─── 일정 카드 ──────────────────────────────────────────────── */
.schedule-card {
  background: white;
  border-radius: 16px;
  border: 1px solid #e5e7eb;
  padding: 20px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.schedule-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  transform: translateY(-2px);
  border-color: #dbeafe;
}

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

.status-planned { background: #dbeafe; color: #1d4ed8; }
.status-completed { background: #d1fae5; color: #065f46; }
.status-cancelled { background: #f3f4f6; color: #4b5563; }

/* ─── 테이블 공통 ─────────────────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.data-table th {
  background: #f8fafc;
  padding: 12px 16px;
  text-align: left;
  font-weight: 700;
  font-size: 13px;
  color: #374151;
  border-bottom: 2px solid #e5e7eb;
}

.data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #f3f4f6;
  color: #374151;
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #f8fafc; }

/* ─── 드롭다운 검색 ──────────────────────────────────────────── */
.dropdown-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #374151;
  transition: background 0.1s;
  border-bottom: 1px solid #f3f4f6;
}

.dropdown-item:last-child { border-bottom: none; }
.dropdown-item:hover { background: #eff6ff; color: #2563eb; }

.dropdown-item .sub {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 1px;
}

/* ─── 모달 ───────────────────────────────────────────────────── */
.modal-backdrop {
  backdrop-filter: blur(4px);
}

/* ─── 로딩 스피너 ─────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid #e5e7eb;
  border-radius: 50%;
  border-top-color: #2563eb;
  animation: spin 0.6s linear infinite;
}

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

/* ─── 알림 토스트 ─────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #1e293b;
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  z-index: 9999;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

.toast.success { background: #059669; }
.toast.error { background: #dc2626; }
.toast.info { background: #2563eb; }

/* ─── 실적 수치 카드 ──────────────────────────────────────────── */
.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.stat-chip.blue { background: #dbeafe; color: #1d4ed8; }
.stat-chip.green { background: #d1fae5; color: #065f46; }
.stat-chip.purple { background: #ede9fe; color: #6d28d9; }

/* ─── 반응형 ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { font-size: 14px; }
  .week-grid-table th, .week-grid-table td { padding: 3px; }
  .sched-item { font-size: 10px; padding: 4px 5px; }
  .data-table { font-size: 13px; }
  .data-table th, .data-table td { padding: 10px 12px; }
}

/* ─── 스크롤바 커스터마이즈 ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; border-radius: 3px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── 빈 상태 ─────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: #9ca3af;
}
.empty-state i { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state p { font-size: 16px; }
