/* ══════════════════════════════════════════════════════
 *  공통 부품 — 화면 머리 · 카드 · 통계 · 배너 · 목록 · 표 · 진행바 · 빈 상태 · 스켈레톤 (R4, 2026-11-09)
 *  /css/components/surfaces.css   (출처: 시안 v1 app.css, 색은 토큰)
 * ══════════════════════════════════════════════════════ */

/* 화면 머리 */
.ph { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ph-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--accent); }
.ph h1 { font-family: var(--font-serif); font-weight: 600; font-size: 30px; margin: 4px 0; letter-spacing: -0.03em; line-height: 1.3; }
.ph p { margin: 0; color: var(--ink-60); font-size: 15px; }
.ph-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 카드 */
.card { background: var(--paper); border-radius: 20px; padding: 24px; box-shadow: var(--card-shadow); min-width: 0; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-h h2 { margin: 0; font-size: 17px; letter-spacing: -0.03em; display: flex; align-items: center; gap: 8px; }
.card-h a, .card-h .link { font-size: 13.5px; font-weight: 600; color: var(--ink-60); display: inline-flex; align-items: center; gap: 2px; }
.card-h a:hover { color: var(--accent); }

/* 통계 */
.stat { background: var(--paper); border-radius: 20px; padding: 20px 22px; box-shadow: var(--card-shadow); display: flex; flex-direction: column; gap: 4px; }
.stat-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent-lt); color: var(--accent); display: grid; place-items: center; margin-bottom: 10px; }
.stat-l { font-size: 13.5px; color: var(--ink-60); font-weight: 600; }
.stat-v { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; line-height: 1.2; }
.stat-v small { font-size: 14px; font-weight: 600; margin-left: 2px; }
.stat-s { font-size: 12.5px; color: var(--ink-60); }

/* 안내 배너 */
.banner { display: flex; align-items: center; gap: 16px; background: linear-gradient(100deg, var(--accent-lt), var(--paper) 80%); border-radius: 20px; padding: 18px 22px; }
.banner-ic { width: 44px; height: 44px; border-radius: 14px; background: var(--paper); color: var(--accent); display: grid; place-items: center; flex: none; box-shadow: var(--shadow-sm); }
.banner > div { flex: 1; min-width: 0; }
.banner strong { display: block; font-size: 15.5px; }
.banner span { font-size: 13.5px; color: var(--ink-60); }

/* 목록 행 */
.rows { display: grid; grid-template-columns: minmax(0, 1fr); }
.row { display: flex; align-items: center; gap: 14px; padding: 14px 4px; border-top: 1px solid var(--ink-10); }
.row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; font-size: 15px; }
.row-main span { display: block; font-size: 13px; color: var(--ink-60); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; align-items: center; gap: 10px; flex: none; }
.row-time { font-size: 12.5px; color: var(--ink-60); }

/* 표 */
.tbl-wrap { overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12.5px; color: var(--ink-60); font-weight: 600; padding: 10px 12px; background: var(--warm); }
.tbl th:first-child { border-radius: 10px 0 0 10px; }
.tbl th:last-child { border-radius: 0 10px 10px 0; }
.tbl td { padding: 14px 12px; border-bottom: 1px solid var(--ink-10); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* 진행 바 */
.prog { height: 8px; border-radius: 8px; background: var(--ink-10); overflow: hidden; }
.prog i { display: block; height: 100%; border-radius: 8px; background: var(--accent); }
.prog-row { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; }
.prog-row .prog { flex: 1; }

/* 정보 목록 · 상자 · 구분선 */
.dl { display: grid; grid-template-columns: 88px 1fr; gap: 10px 12px; margin: 0; font-size: 14px; }
.dl dt { color: var(--ink-60); }
.dl dd { margin: 0; font-weight: 600; }
.box { background: var(--warm); border-radius: 14px; padding: 14px 16px; font-size: 14px; color: var(--ink-70); }
.divider { height: 1px; background: var(--ink-10); margin: 18px 0; }

/* 빈 상태 */
.empty { text-align: center; padding: 36px 16px; color: var(--ink-60); font-size: 14px; }
.empty .s-ico { width: 32px; height: 32px; margin: 0 auto 10px; color: var(--ink-30); display: block; }
.empty strong { display: block; color: var(--ink-70); font-size: 15px; margin-bottom: 4px; }

/* 불러오는 중 */
.skel { border-radius: 12px; background: linear-gradient(90deg, var(--ink-10), var(--ink-05), var(--ink-10)); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .skel { animation: none; } }

@media (max-width: 768px) {
  .ph h1 { font-size: 24px; }
  .ph-actions { width: 100%; }
  .ph-actions .btn { flex: 1; }
  .card { padding: 18px; border-radius: 18px; }
  .stat { padding: 16px; }
  .stat-v { font-size: 22px; }
  .stat-ic { width: 34px; height: 34px; margin-bottom: 6px; }
  .banner { flex-wrap: wrap; }
  .banner .btn { width: 100%; }
}

/* 토스트 (js/global.js showToast 가 #toast.toast 를 만든다)
 * R5-5a: B안 틀은 옛 global.css 를 읽지 않아 토스트에 스타일이 없었다 — 문구가 페이지 맨 아래에 글자로 붙고 사라지지 않음 */
.toast {
  position: fixed; right: 32px; bottom: 32px; z-index: 2000; max-width: min(440px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 10px; padding: 13px 20px; border-radius: 999px;
  background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); pointer-events: none;
  opacity: 0; transform: translateY(12px); transition: opacity .25s ease, transform .25s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast .s-ico, .toast svg { width: 16px; height: 16px; flex: none; }

/* 종류별 바탕 (showToast(문구, 'error'|'warning'|'success'), R7-6) — 흰 글씨 대비 AA: 빨강 4.83 · 주황 5.02 · 초록 5.48 */
.toast.toast-error { background: var(--danger-600, #DC2626); }
.toast.toast-warning { background: #B45309; }
.toast.toast-success { background: #047857; }
@media (max-width: 768px) {
  .toast { left: 16px; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); justify-content: center; border-radius: 16px; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

/* ══ 시작 단계 카드 (2026-12-01) — config/start_steps.php · js/start-steps.js · 커플·플래너·업체 대시보드 맨 위 ══ */
.ss { background: var(--paper); border-radius: 20px; padding: 22px 24px; box-shadow: var(--card-shadow); margin-bottom: 20px; }
.ss[hidden] { display: none; }
.ss-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ss-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--accent); }
.ss-h h2 { margin: 2px 0 4px; font-size: 19px; letter-spacing: -0.03em; }
.ss-h p { margin: 0; font-size: 14px; color: var(--ink-60); }
.ss-meta { display: flex; align-items: center; gap: 8px; flex: none; }
.ss-cnt { font-size: 13px; font-weight: 700; color: var(--accent); white-space: nowrap; }
.ss-hide { min-height: 36px; padding: 0 12px; border: 1px solid var(--ink-10, #e5e7eb); border-radius: 999px; background: transparent; color: var(--ink-60); font: inherit; font-size: 13px; cursor: pointer; }
.ss-hide:hover { color: var(--ink-80, #1f2937); background: var(--ink-05, #f3f4f6); }
.ss-prog { margin: 14px 0 6px; }
.ss-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.ss-step { display: grid; grid-template-columns: 32px 1fr; grid-template-rows: auto 1fr auto; column-gap: 10px; row-gap: 8px; padding: 14px; border-radius: 16px; background: var(--ink-05, #f6f6f8); }
.ss-n { grid-row: 1 / span 2; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; background: var(--paper); color: var(--ink-60); }
.ss-tx { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ss-tx b { font-size: 15px; letter-spacing: -0.02em; }
.ss-tx small { font-size: 12.5px; color: var(--ink-60); line-height: 1.5; }
.ss-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: var(--paper); color: var(--ink-60); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.ss-go { grid-column: 1 / -1; justify-self: start; min-height: 40px; }
.ss-step.is-now { background: var(--accent-lt); }
.ss-step.is-now .ss-n { background: var(--accent); color: #fff; }
.ss-step.is-done { opacity: .75; }
.ss-step.is-done .ss-n { background: var(--accent-lt); color: var(--accent); }
.ss-step.is-done b { color: var(--ink-60); }
@media (max-width: 640px) {
  .ss { padding: 18px 16px; border-radius: 16px; }
  .ss-h { flex-direction: column; }
  .ss-meta { width: 100%; justify-content: space-between; }
  .ss-list { grid-template-columns: 1fr; }
  .ss-step { padding: 12px; }
  .ss-step.is-done { grid-template-rows: auto; padding: 10px 12px; }
  .ss-step.is-done .ss-n { grid-row: auto; }
  .ss-go { justify-self: stretch; }
}


/* 플래너 대시보드 — 머리 그림 바로 아래 시작 단계 카드 간격 (2026-12-01) */
.phero + .ss { margin-top: 20px; }
