:root {
  --primary: #1a3a6b;
  --primary-light: #2d5a9e;
  --accent: #c8a951;
  --bg: #f0f2f5;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
  --success: #22c55e;
  --warning: #f59e0b;
  --danger: #ef4444;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* 헤더 */
.header {
  position: sticky; top: 0; z-index: 100;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: white; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-left img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,0.3); }
.header-title-wrap { display: flex; flex-direction: column; }
.header-sub { font-size: 10px; opacity: 0.7; letter-spacing: 1px; }
.header-name { font-size: 16px; font-weight: 700; }
.header-badge { background: var(--accent); color: var(--primary); font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.header-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.header-btn {
  background: rgba(255,255,255,0.15); color: white; border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px; border-radius: 8px; font-size: 13px; cursor: pointer; text-decoration: none;
  transition: all 0.2s; font-family: inherit;
}
.header-btn:hover { background: rgba(255,255,255,0.25); }

/* 레이아웃 */
.layout { display: flex; max-width: 1200px; margin: 0 auto; gap: 24px; padding: 24px; }

/* 사이드바 */
.sidebar {
  position: sticky; top: 80px; align-self: flex-start;
  width: 240px; min-width: 240px;
  background: var(--card-bg); border-radius: 16px; padding: 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  max-height: calc(100vh - 100px); overflow-y: auto;
}
.sidebar h3 { font-size: 12px; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; }
.sidebar-section { margin-bottom: 20px; }
.sidebar-section-title {
  font-size: 13px; font-weight: 700; color: var(--primary);
  padding: 6px 0; border-bottom: 1px solid var(--border); margin-bottom: 6px;
}
.sidebar a {
  display: block; padding: 6px 12px; font-size: 13px; color: var(--text);
  text-decoration: none; border-radius: 8px; transition: all 0.15s;
}
.sidebar a:hover { background: #f1f5f9; color: var(--primary); }
.sidebar a.active { background: var(--primary); color: white; }

/* 메인 콘텐츠 */
.content { flex: 1; min-width: 0; }

/* 섹션 */
.section {
  background: var(--card-bg); border-radius: 16px; padding: 32px;
  margin-bottom: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.section h1 {
  font-size: 24px; font-weight: 900; color: var(--primary);
  margin-bottom: 8px; padding-bottom: 12px; border-bottom: 3px solid var(--accent);
}
.section h2 {
  font-size: 20px; font-weight: 700; color: var(--primary);
  margin: 28px 0 12px; padding-bottom: 8px; border-bottom: 2px solid var(--border);
}
.section h2:first-child { margin-top: 0; }
.section h3 {
  font-size: 16px; font-weight: 700; color: var(--text);
  margin: 20px 0 8px;
}
.section p { margin: 8px 0; font-size: 14px; }

/* 단계 표시 */
.steps { counter-reset: step; margin: 12px 0; }
.step {
  counter-increment: step;
  display: flex; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid #f1f5f9;
}
.step:last-child { border-bottom: none; }
.step::before {
  content: counter(step);
  flex-shrink: 0; width: 28px; height: 28px;
  background: var(--primary); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
}
.step-content { flex: 1; font-size: 14px; }
.step-content strong { color: var(--primary); }

/* 스크린샷 영역 */
.screenshot-placeholder {
  background: #f8fafc; border: 2px dashed var(--border);
  border-radius: 12px; padding: 24px; margin: 12px 0;
  text-align: center; color: var(--text-light); font-size: 13px;
}
.screenshot-placeholder .icon { font-size: 32px; margin-bottom: 8px; }
.screenshot-placeholder .label { font-weight: 700; color: var(--text); margin-bottom: 4px; }

/* 팁/경고/정보 박스 */
.callout {
  border-radius: 10px; padding: 14px 16px; margin: 12px 0;
  font-size: 13px; display: flex; gap: 10px; align-items: flex-start;
}
.callout-icon { font-size: 18px; flex-shrink: 0; }
.callout.info { background: #eff6ff; border-left: 4px solid #3b82f6; }
.callout.tip { background: #f0fdf4; border-left: 4px solid #22c55e; }
.callout.warning { background: #fffbeb; border-left: 4px solid #f59e0b; }
.callout.danger { background: #fef2f2; border-left: 4px solid #ef4444; }

/* 역할 뱃지 */
.role-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700; color: white;
}
.role-badge.master { background: #7c3aed; }
.role-badge.admin { background: var(--primary); }
.role-badge.user { background: #27ae60; }

/* 상태 뱃지 */
.status-badge {
  display: inline-block; padding: 2px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 700;
}
.status-badge.pending { background: #fef3c7; color: #92400e; }
.status-badge.confirmed { background: #dcfce7; color: #166534; }
.status-badge.cancelled { background: #fee2e2; color: #991b1b; }

/* 테이블 */
.manual-table {
  width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px;
}
.manual-table th {
  background: var(--primary); color: white; padding: 10px 12px;
  text-align: left; font-weight: 600;
}
.manual-table td {
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.manual-table tr:hover td { background: #f8fafc; }

/* PDF 다운로드 버튼 */
.pdf-btn {
  background: var(--primary); color: white; border: none;
  padding: 10px 24px; border-radius: 10px; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.2s; font-family: inherit;
}
.pdf-btn:hover { background: var(--primary-light); transform: translateY(-1px); }

/* 모바일 반응형 */
@media (max-width: 768px) {
  .layout { flex-direction: column; padding: 12px; gap: 12px; }
  .sidebar {
    position: static; width: 100%; min-width: auto;
    max-height: none; overflow: visible;
  }
  .section { padding: 20px; }
  .section h1 { font-size: 20px; }
  .section h2 { font-size: 17px; }
  .header-badge { display: none; }
  .header { flex-wrap: wrap; gap: 8px; }
}

/* 인쇄용 스타일 */
@media print {
  body { background: white; }
  .header { position: static; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  .sidebar, .no-print { display: none !important; }
  .layout { max-width: 100%; padding: 0; }
  .section {
    box-shadow: none; border: 1px solid #e5e7eb;
    break-inside: avoid; page-break-inside: avoid;
    margin-bottom: 12px;
  }
  .section h1, .section h2 { break-after: avoid; }
  .step { break-inside: avoid; }
  .screenshot-placeholder {
    border-style: solid; border-color: #d1d5db;
    print-color-adjust: exact; -webkit-print-color-adjust: exact;
  }
  .callout { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  a { color: var(--primary) !important; text-decoration: none !important; }
}
