/* ===========================================
   스마트브랜딩 온보딩 — 메인 스타일시트 (PPT 슬라이드 버전)
   블루 팔레트: #4A9EFF → #0A3D91 → #051E4F
   =========================================== */

/* ---- Reset & Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ---- 홈 링크 (우상단) ---- */
#home-link {
  position: fixed;
  top: 12px;
  right: 16px;
  z-index: 1000;
  padding: 7px 14px;
  background: rgba(255,255,255,0.95);
  color: #051E4F;
  border: 1px solid rgba(5,30,79,0.15);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  text-decoration: none;
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  box-shadow: 0 2px 8px rgba(5,30,79,0.12);
  transition: background .12s, transform .12s;
}
#home-link:hover {
  background: #fff;
  transform: translateY(-1px);
  color: #0A3D91;
}

body {
  font-family: 'Pretendard', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a2535;
  background: #e8edf5;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* ---- 16:9 App Shell ---- */
.app-shell {
  width: min(100vw - 32px, calc((100vh - 32px) * 16 / 9));
  height: min(100vh - 32px, calc((100vw - 32px) * 9 / 16));
  display: flex;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 32px rgba(5, 30, 79, 0.18);
}

/* ---- Sidebar ---- */
.sidebar {
  width: 170px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #051E4F 0%, #0A3D91 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 12px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.logo-mark {
  width: 32px;
  height: 32px;
  background: #4A9EFF;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  flex-shrink: 0;
}

.logo-text { display: flex; flex-direction: column; }

.logo-title {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.logo-sub {
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  line-height: 1.3;
}

/* ---- Tab Buttons ---- */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  overflow-y: auto;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.6);
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border-left: 3px solid transparent;
  width: 100%;
}

.tab-btn:hover {
  background: rgba(74, 158, 255, 0.15);
  color: rgba(255,255,255,0.9);
}

.tab-btn.active {
  background: rgba(74, 158, 255, 0.2);
  color: #fff;
  border-left-color: #4A9EFF;
  font-weight: 600;
}

.tab-btn svg { flex-shrink: 0; opacity: 0.7; }
.tab-btn.active svg { opacity: 1; }

.sidebar-footer {
  padding: 10px 12px;
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  border-top: 1px solid rgba(255,255,255,0.08);
}

/* ---- Main Content ---- */
.main-content {
  flex: 1;
  overflow: hidden;
  position: relative;
  background: #f7f9fc;
  display: flex;
  flex-direction: column;
}

.content-area {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ---- Slide Nav Bar (하단) ---- */
.slide-nav-bar {
  flex-shrink: 0;
  height: 38px;
  background: #fff;
  border-top: 1px solid #dce3ef;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.slide-nav-btn {
  width: 28px;
  height: 28px;
  border: 1px solid #c8d5e8;
  border-radius: 4px;
  background: #f7f9fc;
  color: #0A3D91;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.12s, opacity 0.12s;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}

.slide-nav-btn:hover:not(:disabled) {
  background: #e8f0fe;
}

.slide-nav-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.slide-indicator {
  font-size: 12px;
  font-weight: 600;
  color: #6b7a99;
  min-width: 40px;
  text-align: center;
  letter-spacing: 0.04em;
}

/* ---- Loading / Error States ---- */
.state-loading,
.state-error,
.state-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: 10px;
  color: #6b7280;
  font-size: 13px;
}

.loading-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #e5e7eb;
  border-top-color: #0A3D91;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ---- Slide Pages ---- */
.slide-page {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  overflow: hidden;
}

.slide-page.visible {
  opacity: 1;
  pointer-events: auto;
}

/* ---- Slide Header ---- */
.slide-header {
  background: #fff;
  border-bottom: 1px solid #dce3ef;
  padding: 9px 18px 8px;
  flex-shrink: 0;
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.slide-title {
  font-size: clamp(20px, 2.4vw, 32px);
  font-weight: 800;
  color: #051E4F;
  line-height: 1.2;
}

.slide-subtitle {
  font-size: clamp(12px, 1.1vw, 15px);
  color: #6b7a99;
  font-weight: 400;
}

/* ---- Slide Body ---- */
.slide-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
}

/* ---- PPT 타이포 스케일 ---- */
.hero-number {
  font-size: clamp(48px, 6vw, 88px);
  font-weight: 900;
  color: #0A3D91;
  line-height: 1;
  letter-spacing: -0.02em;
}

.hero-text {
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 800;
  color: #051E4F;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.hero-label {
  font-size: clamp(12px, 1.1vw, 16px);
  color: #6b7a99;
  font-weight: 500;
  margin-top: 4px;
}

.section-heading {
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 700;
  color: #0A3D91;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #dce3ef;
}

.body-text {
  font-size: clamp(14px, 1.3vw, 18px);
  line-height: 1.65;
  color: #1a2535;
}

/* ---- Stat Cards Grid ---- */
.stat-grid {
  display: grid;
  gap: 12px;
}

.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid-2 { grid-template-columns: repeat(2, 1fr); }

.stat-card {
  background: #fff;
  border: 1px solid #dce3ef;
  border-radius: 4px;
  padding: 16px 14px;
  text-align: center;
}

.stat-card .hero-number { font-size: clamp(36px, 4.5vw, 64px); }

/* ---- Content Cards ---- */
.content-card {
  background: #fff;
  border: 1px solid #dce3ef;
  border-radius: 4px;
  padding: 14px 16px;
}

/* 전역 margin-top 규칙 제거됨.
   flex/grid 컨테이너는 `gap`으로, 단독 flow 스택은 개별 margin으로 처리. */

.card-title {
  font-size: clamp(14px, 1.5vw, 18px);
  font-weight: 700;
  color: #0A3D91;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e8edf5;
}

.card-desc {
  font-size: clamp(13px, 1.2vw, 16px);
  color: #374151;
  line-height: 1.65;
}

/* ---- Tables ---- */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: clamp(13px, 1.2vw, 17px);
}

.data-table th {
  background: #0A3D91;
  color: #fff;
  padding: 7px 10px;
  text-align: left;
  font-weight: 600;
  font-size: clamp(12px, 1.1vw, 15px);
}

.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e8edf5;
  vertical-align: top;
  line-height: 1.5;
}

.data-table tbody tr:nth-child(even) td { background: #f7f9fc; }
.data-table tbody tr:last-child td { border-bottom: none; }

.td-label {
  font-weight: 600;
  color: #374151;
  white-space: nowrap;
  width: 28%;
}

.td-service {
  font-weight: 600;
  color: #1a3a6b;
  white-space: nowrap;
}

.font-mono {
  font-family: 'Consolas', 'Courier New', monospace;
  color: #0A3D91;
  font-weight: 600;
}

/* ---- Two-col Layout ---- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

/* ---- Quotes ---- */
.big-quote {
  background: #f0f4fa;
  border-left: 4px solid #0A3D91;
  border-radius: 0 4px 4px 0;
  padding: 16px 20px;
  font-size: clamp(16px, 1.8vw, 22px);
  line-height: 1.65;
  color: #1a2535;
  font-weight: 500;
}

.big-quote strong {
  color: #0A3D91;
  font-weight: 800;
}

.inline-quote {
  background: #f0f4fa;
  border-left: 3px solid #0A3D91;
  border-radius: 0 4px 4px 0;
  padding: 12px 14px;
  font-size: clamp(13px, 1.2vw, 16px);
  line-height: 1.65;
  color: #1a2535;
}

/* ---- Keyword Block (히어로 강조) ---- */
.keyword-block {
  background: #051E4F;
  color: #fff;
  border-radius: 4px;
  padding: 18px 22px;
  text-align: center;
}

.keyword-block .hero-text { color: #4A9EFF; }
.keyword-block .hero-label { color: rgba(255,255,255,0.6); }

/* ---- Highlight Banner ---- */
.highlight-banner {
  background: #0A3D91;
  color: #fff;
  border-radius: 4px;
  padding: 14px 18px;
  font-size: clamp(15px, 1.6vw, 20px);
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
}

/* ---- Bullet Lists ---- */
.bullet-list {
  padding-left: 18px;
  font-size: clamp(13px, 1.2vw, 16px);
  color: #374151;
}

.bullet-list li {
  margin-bottom: 5px;
  line-height: 1.6;
}

/* ---- Flow Diagrams ---- */
.flow-diagram {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  flex-wrap: nowrap;
}

.flow-node {
  flex: 1;
  background: #f0f4fa;
  border: 1px solid #c8d5e8;
  border-radius: 4px;
  padding: 8px 10px;
  text-align: center;
}

.flow-node.active {
  background: #0A3D91;
  border-color: #0A3D91;
  color: #fff;
}

.flow-node-label {
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 600;
}

.flow-node-sub {
  font-size: clamp(11px, 0.9vw, 13px);
  opacity: 0.7;
  margin-top: 2px;
}

.flow-arrow { color: #9ca3af; flex-shrink: 0; }

/* Vertical flow */
.flow-diagram.vertical {
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.flow-node-v { text-align: center; width: 100%; }

.flow-vnode {
  background: #f0f4fa;
  border: 1px solid #c8d5e8;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: clamp(14px, 1.3vw, 18px);
  font-weight: 600;
  display: inline-block;
  min-width: 140px;
}

.flow-vnode.primary {
  background: #0A3D91;
  border-color: #0A3D91;
  color: #fff;
}

.flow-vnode-desc {
  font-size: clamp(11px, 0.9vw, 13px);
  color: #6b7a99;
  margin-top: 3px;
}

.flow-varrow { color: #9ca3af; }

/* ---- Rules ---- */
.rule-block {
  display: flex;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid #e8edf5;
}

.rule-block:last-child { border-bottom: none; }

.rule-number {
  font-size: clamp(28px, 3.5vw, 52px);
  font-weight: 900;
  color: #dce3ef;
  line-height: 1;
  flex-shrink: 0;
  width: 52px;
  text-align: right;
}

.rule-title {
  font-size: clamp(16px, 1.8vw, 22px);
  font-weight: 700;
  color: #051E4F;
  margin-bottom: 6px;
}

.rule-warn {
  color: #b91c1c;
  font-weight: 600;
}

/* ---- Org Tree ---- */
.org-tree { font-size: clamp(13px, 1.2vw, 16px); }

.org-tree-root {
  background: #051E4F;
  color: #fff;
  padding: 6px 14px;
  border-radius: 4px;
  font-weight: 700;
  font-size: clamp(14px, 1.3vw, 17px);
  display: inline-block;
  margin-bottom: 6px;
  margin-left: 8px;
}

.org-tree-children {
  display: flex;
  gap: 8px;
  margin-top: 4px;
  padding-left: 16px;
  border-left: 2px solid #dce3ef;
  padding-bottom: 4px;
}

.org-tree-branch {
  background: #f0f4fa;
  border: 1px solid #c8d5e8;
  border-radius: 4px;
  padding: 6px 10px;
  font-size: clamp(12px, 1.1vw, 15px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.org-tree-branch.primary {
  background: #e8f0fe;
  border-color: #4A9EFF;
  color: #0A3D91;
  font-weight: 600;
}

.branch-sub {
  font-size: clamp(10px, 0.8vw, 12px);
  color: #6b7a99;
  font-weight: 400;
}

/* ---- Badges ---- */
.badge-new {
  display: inline-block;
  background: #4A9EFF;
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  vertical-align: middle;
  margin-left: 3px;
}

.tbd {
  color: #9ca3af;
  font-style: italic;
}

/* ---- Seat Map ---- */
.seat-desc {
  font-size: clamp(11px, 0.9vw, 13px);
  color: #6b7a99;
  margin-bottom: 10px;
}

.seat-grid-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.seat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  width: 100%;
  max-width: 340px;
}

.seat {
  border-radius: 4px;
  padding: 8px 10px;
  border: 1px solid #c8d5e8;
  min-height: 52px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.seat.exec { background: #051E4F; border-color: #051E4F; color: #fff; }
.seat.mgmt { background: #e8f0fe; border-color: #4A9EFF; }
.seat.biz1 { background: #ecfdf5; border-color: #6ee7b7; }
.seat.support { background: #f0f4fa; border-color: #c8d5e8; }
.seat.vacant { background: #f3f4f6; border-color: #e5e7eb; opacity: 0.6; }

.seat-role {
  font-size: clamp(10px, 0.85vw, 13px);
  color: inherit;
  opacity: 0.75;
  line-height: 1.2;
}

.seat.exec .seat-role { opacity: 0.7; }

.seat-name {
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  color: inherit;
  line-height: 1.2;
  margin-top: 2px;
}

.seat.vacant .seat-name { color: #9ca3af; }

.seat-badge {
  display: inline-block;
  background: #4A9EFF;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 2px;
  vertical-align: middle;
}

.seat-door {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 0.9vw, 13px);
  color: #6b7a99;
  border-top: 2px dashed #9ca3af;
  width: 100%;
  padding-top: 6px;
  justify-content: center;
}

.seat-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e8edf5;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: clamp(11px, 0.9vw, 13px);
  color: #6b7a99;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid;
}

.legend-dot.exec { background: #051E4F; border-color: #051E4F; }
.legend-dot.mgmt { background: #e8f0fe; border-color: #4A9EFF; }
.legend-dot.biz1 { background: #ecfdf5; border-color: #6ee7b7; }
.legend-dot.support { background: #f0f4fa; border-color: #c8d5e8; }
.legend-dot.vacant { background: #f3f4f6; border-color: #e5e7eb; }

/* ---- Seat Map Compact (우측 35% 패널용) ---- */
.seat-grid--compact {
  gap: 5px;
  max-width: 100%;
}

.seat--compact {
  padding: 5px 8px;
  min-height: 38px;
}

.seat--compact .seat-role {
  font-size: clamp(9px, 0.72vw, 11px);
}

.seat--compact .seat-name {
  font-size: clamp(11px, 0.95vw, 13px);
}

.seat-door--compact {
  font-size: clamp(10px, 0.8vw, 12px);
  padding-top: 4px;
}

/* ---- Operations ---- */
.sub-title {
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 700;
  color: #374151;
  margin-bottom: 6px;
}

.checklist {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: clamp(13px, 1.2vw, 16px);
  color: #374151;
  cursor: pointer;
  padding: 4px 5px;
  border-radius: 3px;
  transition: background 0.1s;
}

.check-item:hover { background: #f0f4fa; }

.check-item input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #0A3D91;
  cursor: pointer;
  flex-shrink: 0;
}

/* ---- Placeholder ---- */
.placeholder-block {
  background: #f7f9fc;
  border: 1px dashed #c8d5e8;
  border-radius: 4px;
  padding: 10px 12px;
  font-size: clamp(12px, 1vw, 15px);
  color: #9ca3af;
  text-align: center;
}

/* ---- YouTube Link ---- */
.yt-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0A3D91;
  font-size: clamp(13px, 1.2vw, 16px);
  font-weight: 600;
  text-decoration: none;
  padding: 8px 12px;
  border: 1px solid #c8d5e8;
  border-radius: 4px;
  transition: background 0.15s;
}

.yt-link:hover { background: #e8f0fe; }

/* ---- Utility ---- */
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

/* ---- Notion Link Buttons ---- */
.notion-link-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  flex-shrink: 0;
}

.notion-link-btn {
  display: inline-block;
  background: #eef4ff;
  border: 1px solid #4A9EFF;
  border-radius: 4px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0A3D91;
  text-decoration: none;
  transition: background 0.15s;
  line-height: 1.4;
}

.notion-link-btn:hover {
  background: #e0ecff;
}

/* 헤더 우측 배치 (공간 빠듯한 슬라이드용) */
.slide-header-notion {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
}

.slide-header-notion .slide-header-titles {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.notion-link-btn.sm {
  font-size: 12px;
  padding: 5px 10px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* ---- Scrollbar ---- */
.slide-body::-webkit-scrollbar,
.sidebar-nav::-webkit-scrollbar {
  width: 5px;
}

.slide-body::-webkit-scrollbar-track { background: #f7f9fc; }

.slide-body::-webkit-scrollbar-thumb {
  background: #c8d5e8;
  border-radius: 10px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}
