/* 고객 리포트·대표님 화면. 토큰과 리포트 모양(.rh·.kpis·.rtable·.dot·.legend)은 assets/css/style.css를 그대로 쓴다 */

/* 화면 전환은 hidden 속성으로 한다. display를 지정한 요소(.ad, .btn)에서도 숨겨지게 */
[hidden] { display: none !important; }

.gnav-right { display: flex; align-items: center; gap: 12px; margin-left: auto; font-size: 14px; color: var(--on-dark-muted); }
.gnav-who { overflow: hidden; max-width: 260px; text-overflow: ellipsis; white-space: nowrap; }
.gnav-btn {
  min-height: 44px; padding: 0 4px; border: 0; background: none;
  font: inherit; font-size: 14px; color: var(--on-dark); text-decoration: underline; text-underline-offset: 4px; cursor: pointer;
}
.gnav-btn:focus-visible { outline: 2px solid var(--on-dark); outline-offset: 2px; border-radius: 4px; }
.gnav-admin { display: inline-flex; align-items: center; white-space: nowrap; }

/* 화면 바탕: 옅은 회색 위에 흰 종이 */
.rp { min-height: calc(100vh - 48px - 120px); padding: 56px var(--gutter) 80px; background: var(--parchment); }
.rp-wrap { max-width: 860px; margin: 0 auto; }
.rp-panel { max-width: 520px; margin: 0 auto; padding: 40px; border-radius: 18px; background: var(--canvas); overflow-wrap: anywhere; } /* 긴 메일 주소가 칸 밖으로 나가지 않게 */
.rp-panel .eyebrow { font-size: 17px; color: var(--muted-80); }
.rp-title { margin-top: 8px; font-size: 32px; font-weight: 600; line-height: 1.2; letter-spacing: -.03em; }
.rp-panel .desc { margin-top: 12px; font-size: 17px; }
.rp-panel .btn { width: 100%; margin-top: 28px; }
.rp-or { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 15px; font-weight: 600; }
.rp-help { margin-top: 24px; font-size: 14px; line-height: 1.5; color: var(--muted-80); }
.rp-msg { margin-top: 16px; font-size: 15px; line-height: 1.5; }
.rp-msg:empty { display: none; }
.rp-msg-box { padding: 12px 16px; border: 1px solid var(--ink); border-radius: 12px; }
.rp-help-tight { margin-top: 10px; }
/* 링크 메일을 보낸 뒤 스팸함 안내 */
.rp-check { margin-top: 24px; padding: 20px; border-radius: 12px; background: var(--parchment); }
.rp-check h2 { font-size: 15px; font-weight: 600; }
.rp-check ol { margin-top: 8px; padding-left: 1.3em; list-style: decimal; }
.rp-check li { margin-top: 8px; font-size: 15px; line-height: 1.55; color: var(--muted-80); }
.rp-check li b { font-weight: 600; color: var(--ink); }
/* 가입 신청: 동의 문구와 체크 (눌리는 영역 44px) */
.rp-consent { margin-top: 20px; padding: 16px 18px; border-radius: 12px; background: var(--parchment); }
.rp-consent-h { font-size: 14px; font-weight: 600; }
.rp-consent ul { margin-top: 6px; padding-left: 1.1em; list-style: disc; }
.rp-consent li { margin-top: 4px; font-size: 13px; line-height: 1.5; color: var(--muted-80); }
.rp-agree { display: flex; align-items: center; gap: 10px; min-height: 44px; margin-top: 8px; font-size: 15px; font-weight: 600; cursor: pointer; }
.rp-agree input { width: 20px; height: 20px; margin: 0; accent-color: var(--ink); }
.rp-leave { max-width: 520px; margin: 16px auto 0; text-align: right; }
.rp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.rp-panel .rp-actions .btn { flex: 1 1 180px; width: auto; margin-top: 0; }

/* 입력칸: 테두리는 흰 바탕 대비 3:1 이상인 --muted-48 */
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.field label, .field-label { font-size: 14px; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--muted-48); border-radius: 10px; background: var(--canvas);
  font: inherit; font-size: 16px; color: var(--ink);
}
.textarea { min-height: 96px; line-height: 1.5; resize: vertical; }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible, .btn:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.rp-panel form .btn { margin-top: 12px; }
button.btn { border: 0; font-family: inherit; cursor: pointer; }
button.btn-secondary { border: 1px solid var(--ink); background: var(--canvas); }
.btn[disabled] { opacity: .5; cursor: default; }

/* 리포트 보기 줄: 달 고르기 + 인쇄 */
.rp-bar { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.rp-bar .field { margin-top: 0; }
.rp-bar .select { width: auto; min-width: 180px; }

/* 리포트 종이 */
.report-doc { padding: 44px 48px 40px; }
.report-doc .rh-title { font-size: 26px; }
.r-summary { margin-top: 18px; font-size: 17px; line-height: 1.55; }
.report-doc .kpi dt { font-size: 13px; }
.kpi dd.kpi-prev { margin-top: 2px; font-size: 12px; font-weight: 400; line-height: 1.4; letter-spacing: 0; color: var(--muted-80); }
/* 실제 리포트는 첫 화면 목업보다 글자를 키워 읽기 쉽게 한다 */
.report-doc .rtable tbody th, .report-doc .rtable td { font-size: 14px; color: var(--ink); }
.r-count { margin-top: 8px; font-size: 12px; color: var(--muted-80); }
.r-plans { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; margin-top: 32px; }
.r-plan h2 { padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-size: 14px; font-weight: 600; }
.r-list li { padding: 10px 0; border-bottom: 1px solid var(--divider); font-size: 15px; line-height: 1.5; }
.r-empty { color: var(--muted-80); }
.r-note { margin-top: 28px; font-size: 12px; line-height: 1.5; color: var(--muted-80); }

/* 대표님 화면 */
.ad { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; max-width: 1180px; margin: 0 auto; }
.ad-box { padding: 24px; border-radius: 18px; background: var(--canvas); }
.ad-main { display: flex; flex-direction: column; gap: 16px; }
.ad-h { font-size: 17px; font-weight: 600; }
.ad-sub { margin-top: 4px; font-size: 14px; line-height: 1.5; color: var(--muted-80); }
.ad-list { margin-top: 12px; }
.ad-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--divider); }
.ad-pick {
  flex: 1; min-height: 44px; padding: 8px 0; border: 0; background: none; text-align: left;
  font: inherit; font-size: 15px; color: var(--ink); cursor: pointer;
}
.ad-pick[aria-current] { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.ad-tag { flex: none; font-size: 12px; color: var(--muted-80); }
.ad-x {
  flex: none; min-width: 44px; min-height: 44px; border: 0; background: none;
  font: inherit; font-size: 14px; color: var(--muted-80); text-decoration: underline; cursor: pointer;
}
.ad-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.ad-row .input { flex: 1 1 160px; }
.ad-row .btn { flex: none; min-height: 44px; padding: 10px 18px; font-size: 15px; }
.ad-main .ad-box { padding: 32px; }
.ad-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.ad-actions .btn { padding: 10px 20px; font-size: 15px; }
.ad-status { margin-top: 12px; font-size: 14px; color: var(--muted-80); }
.ad-gap { margin-top: 28px; }
/* 가입 신청 목록 */
.ad-apps { margin-top: 12px; }
.ad-apps > li { padding: 14px 0; border-bottom: 1px solid var(--divider); }
.ad-app-info { display: flex; flex-direction: column; gap: 2px; }
.ad-app-info b { font-size: 16px; font-weight: 600; }
.ad-app-info span { font-size: 13px; color: var(--muted-80); }
.ad-app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.ad-app-actions .select { flex: 1 1 240px; width: auto; }
.ad-app-actions .btn { min-height: 44px; padding: 10px 20px; font-size: 15px; }
.ad-invite { margin-top: 12px; font-size: 14px; background: var(--parchment); }
.input-short { max-width: 160px; }

.qtable { width: 100%; margin-top: 8px; border-collapse: collapse; font-size: 14px; }
.qtable th { padding: 6px 4px; border-bottom: 1px solid var(--hairline); font-size: 12px; font-weight: 600; text-align: left; color: var(--muted-80); }
.qtable td { padding: 6px 4px; border-bottom: 1px solid var(--divider); vertical-align: middle; }
.qtable .input, .qtable .select { min-height: 40px; padding: 6px 8px; font-size: 14px; }
.qtable td:nth-child(n+2):not(:last-child) { width: 128px; }
.qtable td:last-child { width: 52px; }
.ad-preview { margin-top: 32px; }
.ad-preview > .ad-h { margin-bottom: 12px; }

@media (max-width: 1068px) {
  .ad { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 734px) {
  .rp { padding: 32px 16px 56px; }
  .rp-panel { padding: 28px 20px; }
  .rp-title { font-size: 26px; }
  .gnav-who { display: none; }
  .rp-bar { align-items: stretch; flex-direction: column; }
  .rp-bar .select, .rp-bar .btn { width: 100%; }

  .report-doc { padding: 24px 20px 20px; }
  .report-doc .rh-title { font-size: 20px; }
  .r-summary { font-size: 16px; }
  /* 첫 화면 목업은 휴대폰에서 질문 2줄만 보이지만, 리포트는 모두 보인다 */
  .report-doc .rtable tbody tr:nth-child(n+3) { display: grid; }
  .r-plans { grid-template-columns: minmax(0, 1fr); gap: 24px; margin-top: 24px; }

  .ad-main .ad-box { padding: 20px 16px; }
  .qtable thead { display: none; }
  .qtable tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 44px; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--divider); }
  .qtable td { padding: 0; border: 0; }
  .qtable td:first-child { grid-column: 1 / -1; }
  .qtable td:nth-child(n+2):not(:last-child), .qtable td:last-child { width: auto; }
}

/* 인쇄·PDF 저장: 리포트 종이만 */
@media print {
  @page { margin: 14mm; }
  .gnav, .footer, .rp-bar, .skip { display: none !important; }
  .rp { min-height: 0; padding: 0; background: none; }
  .report-doc { padding: 0; box-shadow: none; }
  .rtable tr, .r-list li { break-inside: avoid; }
}
