/* 로그인 뒤 화면(계정 대시보드·운영자 화면) 공통 모양. 사이트 style.css 의 색 토큰 위에 얹는다.
   구성은 MemoryPlugin 대시보드(왼쪽 메뉴 + 오른쪽 본문, 처음 들어오면 단계별 안내)를 참고했다. */
.dashboard-body { min-height: 100vh; }
.dash { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.dash-side { border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 20px; position: sticky; top: 0; height: 100vh; background: var(--surface); }
.dash-side .logo { padding: 4px 8px; }
.dash-nav { display: flex; flex-direction: column; gap: 2px; }
.dash-nav-title { font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 14px 10px 4px; }
.dash-nav a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-weight: 500; }
.dash-nav a:hover { background: var(--accent-soft); }
.dash-nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.dash-side-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 6px; padding: 10px; border-top: 1px solid var(--line); font-size: 14px; }
.dash-side-bottom a { color: var(--text); text-decoration: none; }
.dash-main { padding: 36px clamp(16px, 4vw, 48px) 64px; max-width: 1100px; width: 100%; }
.dash-main h1 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 6px; text-align: left; max-width: none; }
.dash-main h2 { font-size: 20px; margin: 28px 0 10px; }
.dash-main .card { margin-top: 14px; }
.dash-main .card h2 { margin-top: 0; }
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.small { font-size: 14px; }
.back-link { display: inline-block; margin-bottom: 10px; text-decoration: none; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.kpi-label { font-size: 13px; color: var(--muted); }
.kpi-value { font-size: 26px; font-weight: 700; margin: 2px 0; }
.kpi-note { font-size: 13px; color: var(--muted); min-height: 1.2em; }

.state-list { list-style: none; padding: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
.state-list li { display: grid; grid-template-columns: 240px 1fr; gap: 6px 18px; padding: 14px 18px; border-top: 1px solid var(--line); }
.state-list li:first-child { border-top: none; }
.state-name { font-weight: 700; }
.state-name .tag { margin-left: 4px; }
.state-text { color: var(--muted); }

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-top: 10px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.data-table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.data-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.data-table tr.clickable { cursor: pointer; }
.data-table tr.clickable:hover td { background: var(--accent-soft); }
.data-table .tag { margin-left: 0; }
.search { width: 100%; max-width: 420px; font: inherit; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); margin-top: 8px; }

.dash-main button, .wizard button { font: inherit; font-weight: 600; border: none; border-radius: 10px; padding: 10px 16px; background: var(--accent); color: var(--on-accent); cursor: pointer; }
.dash-main button.secondary, .wizard button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.dash-main button.danger { background: #c0392b; color: #fff; }
.dash-main button:disabled { opacity: 0.55; cursor: default; }
.small-button { padding: 6px 10px !important; font-size: 13px !important; }
.row { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; align-items: center; }
.row input, .row select { flex: 1; min-width: 140px; font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--background); color: var(--text); }
.message { margin-top: 10px; min-height: 1em; color: var(--muted); font-size: 14px; }
.message.bad { color: #c0392b; }
.bar { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
.bar div { height: 100%; background: var(--accent); }

/* 시작하기 체크리스트(오른쪽 아래 떠 있는 상자) */
.checklist-pop { position: fixed; right: 20px; bottom: 20px; width: 340px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,0.25); z-index: 20; }
.checklist-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; }
.checklist-head b { display: block; }
.checklist-ring { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--accent); background: conic-gradient(var(--accent) var(--done, 0%), var(--line) 0); }
.checklist-ring span { width: 26px; height: 26px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; }
.checklist-items { list-style: none; margin: 0; padding: 0 6px 8px; border-top: 1px solid var(--line); }
.checklist-items li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 8px; border-radius: 8px; }
.checklist-items li a { color: var(--text); text-decoration: none; }
.checklist-items .tick { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; }
.checklist-items li.done .tick { background: var(--ready); border-color: var(--ready); }
.checklist-items li.done a { color: var(--muted); text-decoration: line-through; }
.checklist-pop.collapsed .checklist-items { display: none; }

/* 처음 들어온 사람용 단계별 안내(전체 화면) */
.wizard { position: fixed; inset: 0; z-index: 30; background: var(--background); display: grid; grid-template-rows: auto 1fr auto; }
.wizard-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--line); font-weight: 700; }
.wizard-top button { background: none !important; color: var(--muted) !important; font-size: 22px; padding: 0 6px !important; }
.wizard-body { display: grid; grid-template-columns: 260px 1fr; min-height: 0; }
.wizard-steps { border-right: 1px solid var(--line); padding: 22px 16px; display: flex; flex-direction: column; gap: 4px; }
.wizard-step { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted); border: 1px solid transparent; }
.wizard-step .number { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--line); color: var(--text); flex: none; }
.wizard-step.done .number { background: var(--ready); color: #fff; }
.wizard-step.current { color: var(--accent); font-weight: 700; border-color: var(--accent); background: var(--accent-soft); }
.wizard-step.current .number { background: var(--accent); color: var(--on-accent); }
.wizard-progress { margin-top: auto; font-size: 13px; color: var(--muted); }
.wizard-content { overflow-y: auto; padding: 48px clamp(16px, 6vw, 96px); }
.wizard-content h1 { font-size: clamp(26px, 3.4vw, 34px); margin: 0 0 8px; text-align: left; max-width: none; }
.wizard-content > p { color: var(--muted); max-width: 640px; margin: 0 0 24px; }
.choice-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 900px; }
.choice-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.choice-card.recommended { border-color: var(--accent); }
.choice-card h3 { margin: 10px 0 6px; }
.choice-card p { color: var(--muted); margin: 0 0 14px; }
.choice-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); display: grid; place-items: center; font-size: 20px; }
.badge-line { display: flex; justify-content: space-between; align-items: center; }
.live-check { display: flex; gap: 10px; align-items: center; margin-top: 20px; max-width: 900px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 14px; }
.live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--soon); flex: none; animation: pulse 1.6s infinite; }
.live-check.ok .live-dot { background: var(--ready); animation: none; }
.live-check.ok { color: var(--ready); border-color: var(--ready); }
@keyframes pulse { 50% { opacity: 0.35; } }
.wizard-foot { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); }
.wizard-foot .skip { background: none; color: var(--muted); }

@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; }
  .dash-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; border-right: none; border-bottom: 1px solid var(--line); }
  .dash-nav { flex-direction: row; flex-wrap: wrap; }
  .dash-nav-title, .dash-side-bottom { display: none; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .dash-grid, .choice-cards { grid-template-columns: 1fr; }
  .state-list li { grid-template-columns: 1fr; }
  .wizard-body { grid-template-columns: 1fr; }
  .wizard-steps { display: none; }
  .checklist-pop { left: 12px; right: 12px; width: auto; }
}

/* 요금제 칸 */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.plan.current { border-color: var(--accent); }
.plan ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; flex: 1; }
.plan b { font-size: 18px; }
.next-steps { margin: 0; padding-left: 20px; color: var(--muted); }
.next-steps li { margin-bottom: 6px; }
@media (max-width: 860px) { .plans { grid-template-columns: 1fr; } }

/* 왜: display 를 정한 상자(.dash, .wizard 등)도 hidden 이면 확실히 숨기게. */
[hidden] { display: none !important; }
