/* 학부모/학생 포탈 — 모바일 우선. 브랜드 톤: 진녹 #162E23, 절제된 라운드(5px) */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  background: #fbfbfa;
  color: #162E23;
  font-size: 15px;
  line-height: 1.5;
}

/* ===== 헤더 ===== */
.pt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: #162E23;
}

.pt-brand {
  color: #fbfbfa;
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 15px;
  text-decoration: none;
}

.pt-logout {
  color: rgba(251, 251, 250, 0.65);
  font-size: 13px;
  text-decoration: none;
}

/* ===== 레이아웃 ===== */
.pt-main {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.pt-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pt-desc {
  font-size: 13px;
  color: #5d6b64;
  margin-bottom: 18px;
}

.pt-card {
  background: #fff;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  padding: 20px;
  box-shadow: 0 2px 8px rgba(22, 46, 35, 0.04);
}

/* ===== 메시지 ===== */
.pt-messages { margin-bottom: 16px; }

.pt-message {
  border-radius: 5px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 8px;
}

.pt-message--error { background: #f9ecec; color: #8c2f2f; }

/* 성공 메시지 — 화면 상단 고정 토스트. 스크롤 위치와 무관하게 보이고, 잠시 후 자동으로 사라진다(base.html). */
.pt-message--success {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  width: calc(100% - 32px);
  max-width: 448px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #162E23;
  color: #fbfbfa;
  font-size: 14px;
  line-height: 1.45;
  padding: 13px 16px;
  box-shadow: 0 8px 28px rgba(22, 46, 35, 0.35);
  animation: pt-toast-in 0.28s ease-out;
  transition: opacity 0.4s ease, margin-top 0.4s ease;
}

.pt-message--success::before {
  content: '✓';
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 50%;
  background: #2f7d54;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pt-message--success.pt-message--hide {
  opacity: 0;
  margin-top: -10px;
  pointer-events: none;
}

@keyframes pt-toast-in {
  from { opacity: 0; transform: translate(-50%, -14px); }
  to   { opacity: 1; transform: translate(-50%, 0); }
}

/* ===== 폼 ===== */
.pt-auth-card { margin-top: 0; }  /* 위 간격은 브랜드 히어로(.pt-auth-hero)가 만든다 */

.pt-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5d6b64;
  margin-bottom: 6px;
}

.pt-input {
  width: 100%;
  height: 46px;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  padding: 0 14px;
  font-size: 16px;
  margin-bottom: 14px;
  transition: border-color 0.15s ease;
}

.pt-input:focus {
  outline: none;
  border-color: #2a5440;
}

.pt-input--code {
  letter-spacing: 0.4em;
  font-feature-settings: "tnum";
  text-align: center;
}

/* ===== 버튼 ===== */
.pt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease;
}

.pt-btn--primary {
  background: #162E23;
  color: #fbfbfa;
  width: 100%;
}

.pt-btn--primary:hover { background: #2a5440; }

.pt-btn--wide { width: 100%; margin-top: 16px; }

/* 인증 화면 하단 상시 안내 */
.pt-hint-box {
  margin-top: 20px;
  padding: 14px 16px;
  background: #fbfbfa;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
}

.pt-hint-title {
  font-size: 12px;
  font-weight: 600;
  color: #2a5440;
  margin-bottom: 6px;
}

.pt-hint-box p {
  font-size: 12px;
  color: #5d6b64;
  line-height: 1.6;
}

.pt-link-sub, .pt-link-back {
  display: inline-block;
  margin-top: 14px;
  font-size: 13px;
  color: #5d6b64;
  text-decoration: none;
}

.pt-link-back { margin: 0 0 12px; }

/* ===== 홈: 자녀 카드 ===== */
.pt-title--brand { letter-spacing: 0.1em; }

.pt-child-list { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }

.pt-child-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.pt-child-name { font-size: 17px; font-weight: 700; }

.pt-child-meta { font-size: 12px; color: #5d6b64; margin-top: 2px; }

/* 기능 버튼 — '오늘' 강조 행 + 그룹 라벨 + 2열 타일 (규칙은 파일 끝 '홈: 기능 버튼 그룹') */
.pt-child-actions { display: flex; flex-direction: column; gap: 8px; }

/* 빈 상태 (연결된 학생 없음) — 규칙은 파일 끝 '홈: 빈 상태' */
.pt-empty { margin-top: 16px; text-align: center; }

/* 식사 운영 종료 안내 */
.pt-service-off {
  background: #fdf6ec;
  border: 1px solid #ecd9b8;
  border-radius: 5px;
  padding: 12px 14px;
  font-size: 13px;
  color: #7a5b1e;
  line-height: 1.55;
  margin-bottom: 14px;
}

/* ===== 식사 신청 (주 단위) ===== */
.pt-week-card { margin-top: 12px; padding: 16px; }

.pt-week-card--closed { background: #f7f8f7; }

.pt-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.pt-week-label { font-size: 15px; font-weight: 700; }

.pt-week-range {
  font-size: 12px;
  color: #5d6b64;
  margin-left: 6px;
  font-feature-settings: "tnum";
}

.pt-week-price {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #7a5b1e;
  margin-top: 2px;
  font-feature-settings: "tnum";
}

.pt-week-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: #2a5440;
  background: #eaf2ed;
  border-radius: 999px;
  padding: 3px 10px;
  white-space: nowrap;
  font-feature-settings: "tnum";
}

.pt-week-badge--closed { color: #8c2f2f; background: #f9ecec; }

/* 식단표 */
.pt-menu { margin-bottom: 12px; }

.pt-menu-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 12px;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  background: #fbfbfa;
  color: #2a5440;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.pt-menu-toggle::-webkit-details-marker { display: none; }

.pt-menu[open] .pt-menu-toggle { background: #eaf2ed; }

.pt-menu-img {
  display: block;
  max-width: 100%;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  margin-top: 8px;
}

.pt-week-days {
  display: flex;
  gap: 8px;
}

.pt-day-cell { flex: 1; cursor: pointer; }

.pt-day-cell input { display: none; }

.pt-day-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 54px;
  border: 1.5px solid #e6e8e7;
  border-radius: 5px;
  transition: all 0.15s ease;
}

.pt-day-name { font-size: 11px; font-weight: 600; color: #5d6b64; }

.pt-day-num { font-size: 15px; font-weight: 700; font-feature-settings: "tnum"; }

.pt-day-cell input:checked + .pt-day-box {
  background: #162E23;
  border-color: #162E23;
}

.pt-day-cell input:checked + .pt-day-box .pt-day-name,
.pt-day-cell input:checked + .pt-day-box .pt-day-num { color: #fbfbfa; }

.pt-day-cell--closed { cursor: not-allowed; }
.pt-day-cell--closed .pt-day-box { opacity: 0.45; }

/* 휴무일 — 선택 불가 + '휴무' 표기 */
.pt-day-cell--holiday .pt-day-box { background: #f7f8f7; border-style: dashed; }

.pt-day-holiday {
  font-size: 10px;
  font-weight: 700;
  color: #8c2f2f;
  letter-spacing: 0.02em;
}

/* 결제 확인된 신청 — 포탈에서 변경 불가 (진녹 유지 + '결제' 표기) */
.pt-day-cell--paid .pt-day-box {
  opacity: 1;
  background: #162E23;
  border-color: #162E23;
}

.pt-day-cell--paid .pt-day-name { color: rgba(251, 251, 250, 0.7); }

.pt-day-paid {
  font-size: 10px;
  font-weight: 700;
  color: #fbfbfa;
  letter-spacing: 0.02em;
}

.pt-week-note {
  font-size: 12px;
  color: #5d6b64;
  margin-top: 10px;
}

/* 주별 취소 안내 + 전체 해제 */
.pt-week-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

/* display: flex 가 hidden 속성을 덮어쓰므로 명시적으로 재차 숨김 */
.pt-week-foot[hidden] { display: none; }

.pt-week-foot .pt-week-note { margin-top: 0; }

.pt-week-clear {
  flex: none;
  background: none;
  border: 1px solid #d7dcd9;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 12px;
  color: #5d6b64;
  cursor: pointer;
}

.pt-week-clear:active { background: #f0f2f1; }

/* 합계 / 저장 */
.pt-total-card { margin-top: 12px; padding: 16px; }

.pt-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-feature-settings: "tnum";
}

.pt-total-row strong { font-size: 15px; }

.pt-total-card .pt-btn--wide { margin-top: 14px; }

/* 현금영수증 발행 정보 — 합계 카드 내 현재 설정 행 */
.pt-cr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #eef0ef;
  font-size: 13px;
  color: #5d6b64;
}

.pt-cr-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #162E23;
  font-weight: 600;
  cursor: pointer;
  font-feature-settings: "tnum";
}

.pt-cr-edit {
  color: #2a5440;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* 현금영수증 모달 */
.pt-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(22, 46, 35, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

/* display: flex 가 hidden 속성(UA display:none)을 덮어쓰므로 명시적으로 재차 숨김 */
.pt-modal-backdrop[hidden] { display: none; }

.pt-modal {
  width: 100%;
  max-width: 380px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 5px;
  padding: 22px 20px;
  box-shadow: 0 4px 12px rgba(22, 46, 35, 0.08);
}

.pt-modal-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.pt-modal-desc {
  font-size: 13px;
  color: #5d6b64;
  line-height: 1.55;
  margin-bottom: 14px;
}

.pt-cr-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1.5px solid #e6e8e7;
  border-radius: 5px;
  padding: 11px 13px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.pt-cr-option:has(input:checked) {
  border-color: #162E23;
  background: #f4f7f5;
}

.pt-cr-option input {
  flex: none;
  width: 16px;
  height: 16px;
  accent-color: #162E23;
}

.pt-cr-option-body { display: flex; flex-direction: column; gap: 1px; }

.pt-cr-option-name { font-size: 14px; font-weight: 600; }

.pt-cr-option-sub {
  font-size: 12px;
  color: #5d6b64;
  font-feature-settings: "tnum";
}

.pt-cr-extra { margin: -2px 0 8px; }

.pt-cr-extra .pt-input { margin-bottom: 0; }

.pt-cr-error {
  font-size: 12px;
  color: #8c2f2f;
  margin: 2px 0 6px;
}

.pt-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.pt-modal-cancel {
  flex: none;
  background: #fbfbfa;
  border: 1px solid #e6e8e7;
  color: #5d6b64;
}

.pt-modal-actions .pt-btn--primary { flex: 1; }

/* 유의사항 */
.pt-notice-card { margin-top: 16px; padding: 16px; }

.pt-notice-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #5d6b64;
  margin-bottom: 10px;
}

.pt-notice-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pt-notice-list li {
  font-size: 13px;
  color: #3d4a44;
  padding-left: 12px;
  position: relative;
}

.pt-notice-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: #2a5440;
}

/* ===== 등록 안내 (오리엔테이션 후속: 안내 본문 · MKT 선택 · 서명 약관) ===== */
.pt-btn--line {
  background: #fff;
  color: #162E23;
  border: 1px solid rgba(22, 46, 35, 0.28);
}
.pt-btn--line:hover { background: #eaf2ed; border-color: #162E23; }

.pt-ot-intro { margin-top: 16px; }
.pt-ot-intro p { font-size: 15px; line-height: 1.65; }
.pt-ot-intro p + p { margin-top: 8px; }

.pt-ot-sec { margin-top: 14px; }
.pt-ot-title {
  font-size: 17px;
  font-weight: 700;
  color: #162E23;
  letter-spacing: -0.01em;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6e8e7;
  margin-bottom: 14px;
}
.pt-ot-body p { font-size: 14.5px; line-height: 1.7; color: #1f2a24; }
.pt-ot-body p + p { margin-top: 10px; }
.pt-ot-body .pt-ot-h {
  font-size: 15px;
  font-weight: 700;
  color: #162E23;
  margin: 18px 0 8px;
}
.pt-ot-body .pt-ot-h:first-child { margin-top: 0; }
.pt-ot-body .pt-ot-sub {
  font-size: 14.5px;
  font-weight: 700;
  color: #1f2a24;
  margin: 14px 0 4px;
}
.pt-ot-note { font-size: 12.5px; color: #5d6b64; margin-top: 10px; line-height: 1.5; }

/* MKT 선택 */
.pt-ot-current { font-size: 14px; color: #1f2a24; margin-bottom: 12px; }
.pt-ot-current strong { color: #162E23; }
.pt-ot-current--none { color: #5d6b64; }
.pt-mkt-list { display: flex; flex-direction: column; gap: 10px; }
.pt-mkt-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 12px;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.pt-mkt-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.pt-mkt-opt.is-on { border-color: #162E23; background: #f3f7f4; }
.pt-mkt-icon { width: 54px; height: auto; flex: 0 0 auto; }
.pt-mkt-text { flex: 1 1 auto; min-width: 0; }
.pt-mkt-head { font-size: 15px; font-weight: 700; color: #162E23; }
.pt-mkt-desc { font-size: 13px; line-height: 1.55; color: #5d6b64; margin-top: 4px; word-break: keep-all; }
.pt-mkt-check {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid #c5cbc7;
  background: #fff;
}
.pt-mkt-opt.is-on .pt-mkt-check {
  border-color: #162E23;
  background: #162E23 radial-gradient(circle, #fbfbfa 0 4px, transparent 4.5px);
}
.pt-mkt-common { font-size: 12.5px; color: #5d6b64; line-height: 1.55; margin-top: 12px; }

/* ===== 주간시간계획 (schedule.html) ===== */
.pt-sch-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 16px;
}

.pt-sch-updated { font-size: 12px; color: #5d6b64; font-feature-settings: "tnum"; }

.pt-week-badge--warn { color: #7A5A1F; background: #F6EBD2; }

.pt-week-badge--muted { color: #5d6b64; background: #eef0ef; }

/* 제출 창구 오픈 전 안내 (월~목) */
.pt-sch-preopen { margin-top: 12px; padding: 16px; font-size: 13px; color: #5d6b64; line-height: 1.6; }

/* 섹션 헤더 (다음 주 계획 / 이번 주 남은 요일 변경) */
.pt-sch-sec-h { margin-top: 28px; }

.pt-sch-sec-range { font-size: 12.5px; font-weight: 600; color: #5d6b64; margin-left: 6px; font-feature-settings: "tnum"; }

/* 다음 주 계획 제출 버튼 영역 */
.pt-sch-submit { margin-top: 14px; }

.pt-sch-submit-note { font-size: 12.5px; color: #5d6b64; line-height: 1.55; margin-top: 8px; }

.pt-sch-day { margin-top: 12px; padding: 16px; }

.pt-sch-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pt-sch-day-name { font-size: 15px; font-weight: 700; }

.pt-sch-edit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(22, 46, 35, 0.28);
  border-radius: 5px;
  background: #fff;
  color: #162E23;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease;
}

.pt-sch-edit:active { background: #eaf2ed; }

/* 요일 카드 요약 — 등원 → 외출 → 하원 세그먼트 */
.pt-sch-summary {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
}

.pt-sch-summary li {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  background: #fbfbfa;
  font-size: 12.5px;
  font-weight: 600;
  color: #1f2a24;
  font-feature-settings: "tnum";
  white-space: nowrap;
}

.pt-sch-summary.is-off li { color: #8c2f2f; background: #f9ecec; border-color: #f0d9d9; }

.pt-sch-none { font-size: 13px; color: #a9b1ac; }

/* 반영 시점 강조 배너 — 페이지 최상단 (브랜드 강조 카드: 그라데이션은 이 카드 하나만) */
.pt-sch-banner {
  background: linear-gradient(160deg, #162E23, #1f4434);
  color: rgba(251, 251, 250, 0.92);
  border-radius: 5px;
  padding: 14px 16px;
  font-size: 13.5px;
  line-height: 1.6;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(22, 46, 35, 0.08);
}

.pt-sch-banner strong { color: #fff; font-weight: 700; }

/* ===== 요일 계획 위저드 모달 ===== */
.pt-sch-modal { position: relative; }

.pt-sch-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 5px;
  background: none;
  color: #5d6b64;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.pt-sch-modal .pt-input { margin-bottom: 10px; font-feature-settings: "tnum"; }

.pt-sch-w-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: #5d6b64;
  margin-bottom: 4px;
}

/* 하원/외출 선택 세그먼트 */
.pt-sch-seg { display: flex; gap: 8px; margin-bottom: 12px; }

.pt-sch-seg-opt { flex: 1; cursor: pointer; }

.pt-sch-seg-opt input { position: absolute; opacity: 0; width: 0; height: 0; }

.pt-sch-seg-opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  border: 1.5px solid #e6e8e7;
  border-radius: 5px;
  font-size: 14px;
  font-weight: 600;
  color: #5d6b64;
  transition: all 0.15s ease;
}

.pt-sch-seg-opt input:checked + span {
  background: #162E23;
  border-color: #162E23;
  color: #fbfbfa;
}

.pt-sch-seg-opt input:disabled + span { opacity: 0.4; cursor: not-allowed; }

.pt-sch-hint { font-size: 12px; color: #5d6b64; margin: -6px 0 10px; }

/* 보조 액션 — 결석 설정 등 */
.pt-sch-alt {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: #5d6b64;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.pt-sch-err { font-size: 12px; color: #8c2f2f; margin-bottom: 8px; }

#w-reason-wrap[hidden] { display: none; }

/* ===== 공부현황 리포트 (report.html) ===== */

.rp-head { padding: 14px 16px; margin-bottom: 12px; }
.rp-student { font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.rp-seat {
  display: inline-flex; align-items: center; justify-content: center;
  height: 20px; padding: 0 7px; border-radius: 4px;
  border: 1px solid rgba(22,46,35,0.18); background: rgba(22,46,35,0.06);
  color: #162E23; font-size: 11px; font-weight: 600;
  font-feature-settings: "tnum";
}
.rp-meta { font-size: 13px; color: #5d6b64; margin-top: 2px; }

.rp-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.rp-tab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  height: 38px; border: 1px solid #d8ded9; border-radius: 5px;
  background: #fff; color: #5d6b64; font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.rp-tab.on { background: #162E23; border-color: #162E23; color: #fbfbfa; }

.rp-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 16px; }
.rp-arrow {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid #d8ded9; border-radius: 5px;
  background: #fff; color: #162E23; font-size: 15px; text-decoration: none;
}
.rp-arrow.off { color: #c5cbc7; border-color: #e6e8e7; }
.rp-period { font-size: 16px; font-weight: 700; font-feature-settings: "tnum"; min-width: 130px; text-align: center; }

.rp-note {
  font-size: 12.5px; color: #5d6b64; background: #f3f7f4;
  border: 1px solid #d8ded9; border-radius: 5px;
  padding: 8px 12px; margin-bottom: 12px;
}

.rp-kpi-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-bottom: 20px; }
.rp-kpi {
  border: 1px solid #e6e8e7; border-radius: 5px; background: #fff;
  padding: 10px 12px; display: flex; flex-direction: column; gap: 2px;
}
.rp-kpi:first-child { grid-column: 1 / -1; }
.rp-kpi-label { font-size: 11px; font-weight: 600; color: #5d6b64; display: flex; align-items: center; gap: 6px; }
.rp-kpi-label::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: var(--rp-tone, #5d6b64);
}
.rp-kpi.tone-good    { --rp-tone: #1B4D3E; }
.rp-kpi.tone-warn    { --rp-tone: #B88334; }
.rp-kpi.tone-sleep   { --rp-tone: #1E3A5F; }
.rp-kpi.tone-neg     { --rp-tone: #B33A3A; }
.rp-kpi.tone-neutral { --rp-tone: #3c4a43; }
.rp-kpi-value {
  font-size: 22px; font-weight: 600; color: #162E23; line-height: 1.1;
  display: flex; align-items: baseline; gap: 3px; font-feature-settings: "tnum";
}
.rp-kpi-value .unit { font-size: 12px; font-weight: 500; color: #5d6b64; }
.rp-kpi-foot { font-size: 11px; color: #5d6b64; font-feature-settings: "tnum"; }

.rp-section-h {
  font-size: 15px; font-weight: 700; color: #162E23;
  padding-bottom: 8px; margin-bottom: 12px;
  border-bottom: 1px solid #162E23;
}
.rp-kpi-row + .rp-section-h, .rp-phone + .rp-section-h, .rp-days + .rp-section-h { margin-top: 24px; }

.rp-stackbar {
  display: flex; height: 38px; border-radius: 3px; overflow: hidden; margin-bottom: 14px;
}
.rp-stackbar .seg {
  min-width: 0; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px; font-weight: 500; white-space: nowrap; gap: 4px;
}
.rp-stackbar .seg.empty { flex: 1; background: #e6e8e7; }

.rp-table { width: 100%; border-collapse: collapse; font-size: 12.5px; color: #162E23; margin-bottom: 14px; border-bottom: 2px solid #162E23; }
.rp-table thead th {
  font-size: 11px; font-weight: 600; color: #5d6b64; text-align: left;
  padding: 8px 6px; border-top: 2px solid #162E23; border-bottom: 2px solid #162E23;
  background: #fbfbfa;
}
.rp-table tbody td { padding: 9px 6px; border-bottom: 1px solid #e6e8e7; vertical-align: middle; }
.rp-table tbody tr:last-child td { border-bottom: none; }
.rp-table .c { text-align: center; }
.rp-table .num { font-feature-settings: "tnum"; white-space: nowrap; }
.rp-table td.grp-cell { text-align: center; border-right: 1px solid #e6e8e7; }
.rp-table .swatch {
  display: inline-block; width: 9px; height: 9px; border-radius: 2px;
  margin-right: 7px; vertical-align: baseline;
}
.rp-table .grp-pill {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px 7px; border-radius: 999px; font-size: 10px; font-weight: 600; white-space: nowrap;
}
.rp-table .grp-good  { background: #E6EFEA; color: #1B4D3E; }
.rp-table .grp-warn  { background: #F6EBD2; color: #7A5A1F; }
.rp-table .grp-sleep { background: #DCE5EE; color: #1E3A5F; }
.rp-table .grp-neg   { background: #F4DCDC; color: #8C2F2F; }
.rp-table tr.zero td { color: #a9b1ac; font-weight: 400; }
.rp-table tr.zero .swatch { opacity: 0.4; }

.rp-phone { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12.5px; color: #3c4a43; }
.rp-phone-item { display: inline-flex; align-items: center; gap: 6px; }
.rp-phone-item b { font-feature-settings: "tnum"; }
.rp-phone .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.rp-phone .dot.ok { background: #1B4D3E; }
.rp-phone .dot.bad { background: #B33A3A; }
.rp-phone .dot.none { background: #a9b1ac; }

.rp-days { border-top: 2px solid #162E23; border-bottom: 2px solid #162E23; }
.rp-day-month {
  font-size: 12px; font-weight: 600; color: #162E23; background: #f3f7f4;
  padding: 6px 10px; border-bottom: 1px solid #e6e8e7;
}
.rp-day { display: flex; align-items: center; gap: 10px; padding: 8px 10px; }
.rp-day + .rp-day, .rp-day-month + .rp-day { border-bottom: 1px solid #eef0ee; }
.rp-day:last-child { border-bottom: none; }
.rp-day-date {
  flex: none; width: 42px; display: flex; align-items: baseline; gap: 4px;
  font-feature-settings: "tnum";
}
.rp-day-date b { font-size: 14px; font-weight: 600; color: #162E23; }
.rp-day-date .dw { font-size: 11px; color: #5d6b64; }
.rp-day-date.sun b, .rp-day-date.sun .dw { color: #B33A3A; }
.rp-day-date.sat b, .rp-day-date.sat .dw { color: #1E3A5F; }
.rp-day-bar { flex: 1; height: 8px; background: #eef0ee; border-radius: 2px; overflow: hidden; }
.rp-day-bar .fill { height: 100%; background: #1B4D3E; border-radius: 2px; }
.rp-day-time { flex: none; width: 84px; text-align: right; font-size: 12.5px; font-weight: 600; color: #162E23; font-feature-settings: "tnum"; }
.rp-day.mute { padding: 5px 10px; }
.rp-day-none { font-size: 11px; color: #a9b1ac; }

.rp-total { padding: 18px 16px; text-align: center; }
.rp-total-value { font-size: 26px; font-weight: 700; color: #1B4D3E; font-feature-settings: "tnum"; }
.rp-total-sub { font-size: 12.5px; color: #5d6b64; margin-top: 4px; }
.rp-total-sub b { color: #162E23; }

.rp-empty { padding: 28px 16px; text-align: center; }
.rp-empty-title { font-size: 15px; font-weight: 700; color: #162E23; }
.rp-empty-desc { font-size: 13px; color: #5d6b64; margin-top: 6px; }

.rp-back { margin-top: 24px; }

/* ===== 직원 미리보기 배너 ===== */
.pt-preview-bar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  padding: 8px 14px;
  background: #B88334; color: #fff;
  font-size: 12.5px; font-weight: 600;
}
.pt-preview-bar a {
  color: #fff; text-decoration: underline; font-weight: 700; flex: none;
}

/* ── 개인정보처리방침 (/portal/privacy/) ── */
.pt-legal {
  margin-top: 16px;
  line-height: 1.75;
  font-size: 14px;
  color: #33413a;
}

.pt-legal p { margin: 0 0 14px; }

.pt-legal-intro {
  padding-bottom: 18px;
  border-bottom: 1px solid #e6e8e7;
  color: #5d6b64;
}

.pt-legal-h {
  font-size: 15px;
  font-weight: 700;
  color: #162e23;
  letter-spacing: -0.01em;
  margin: 26px 0 10px;
}

.pt-legal-h3 {
  font-size: 13.5px;
  font-weight: 600;
  color: #2a5440;
  margin: 16px 0 8px;
}

.pt-legal-ol, .pt-legal-ul {
  margin: 0 0 14px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pt-legal-ol li, .pt-legal-ul li { padding-left: 2px; }

.pt-legal-ul { list-style: none; padding-left: 0; }

.pt-legal-ul li {
  position: relative;
  padding-left: 14px;
}

.pt-legal-ul li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 10px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #a9b1ac;
}

.pt-legal-contact li::before { display: none; }
.pt-legal-contact li { padding-left: 0; }

/* 표는 좁은 화면에서 페이지가 아니라 표 자체가 가로 스크롤되게 한다 */
.pt-legal-table-wrap { overflow-x: auto; margin: 0 0 14px; }

.pt-legal-table {
  width: 100%;
  min-width: 320px;
  border-collapse: collapse;
  font-size: 13.5px;
}

.pt-legal-table th, .pt-legal-table td {
  border: 1px solid #e6e8e7;
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.pt-legal-table th {
  background: #f7f8f7;
  font-weight: 600;
  color: #2a5440;
}

.pt-legal-foot {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid #e6e8e7;
  font-size: 13px;
  color: #5d6b64;
}

.pt-legal-foot p { margin: 0 0 4px; }
.pt-legal-date { margin-top: 10px !important; font-weight: 600; color: #33413a; }

/* ── 앱 셸(WebView) 모드 ── */
/* 웹 헤더가 빠진 자리를 네이티브 상단 영역이 맡는다. 헤더가 주던 여백만 보충한다.
   판별은 portal/context_processors.py 의 app_shell (User-Agent 기준). */
body.is-app .pt-main {
  padding-top: 20px;
}

/* 앱에는 브라우저 주소창이 없어 아래쪽 여백이 부족해 보인다 */
body.is-app .pt-main {
  padding-bottom: 64px;
}

/* 앱 모드 로그아웃 — 웹 헤더를 숨겨 진입점이 없어진 것을 홈 하단에서 대신한다 */
.pt-app-foot {
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.pt-app-logout {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 22px;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  background: #fff;
  color: #5d6b64;
  font-size: 14px;
  text-decoration: none;
}

/* ── 브랜드 락업 (마크 + MY MAKERS) ── */
.pt-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 4px;
  border-bottom: 1px solid #e6e8e7;
}

.pt-mark {
  /* 잉크 기준 viewBox 라 높이만 주면 폭은 비율(0.626)대로 따라온다 */
  height: 22px;
  width: auto;
  flex: none;
  color: #162E23;
  /* 대문자 라틴 글자는 시각 중심이 살짝 위 — 마크를 조금 내려야 나란해 보인다 */
  transform: translateY(0.5px);
}

.pt-lockup .pt-title {
  margin-bottom: 0;
}

/* ── 상태 배지 ── */
/* 작은 status 배지에만 완전 pill 을 쓴다 (메인 버튼·카드에는 금지) */
.pt-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  background: #eef2f0;
  color: #5d6b64;
}

/* 이용 중 — 유일하게 색을 쓰는 상태 */
.pt-status--재원 { background: #e6f0ea; color: #2a5440; }
.pt-status--등원예정 { background: #f6efe4; color: #8a6636; }

.pt-child-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 카드 안에서 이름/메타와 목록 사이 호흡 */
.pt-child-card { gap: 16px; }
.pt-child-meta { margin-top: 3px; }

/* ===== 홈: 기능 버튼 그룹 (오늘 강조 행 + 그룹 라벨 + 2열 타일) ===== */
/* 페이지가 늘어 세로 행 나열로는 카드가 길어진다 — 매일 쓰는 '오늘'만 강조 행,
   나머지는 그룹 라벨 아래 2열 타일로 압축 (2026-08 개편) */

.pt-action-today {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 16px;
  border-radius: 5px;
  background: linear-gradient(160deg, #162E23, #1f4434);
  color: #fbfbfa;
  font-size: 14.5px;
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s ease;
}

.pt-action-today::after { content: '›'; color: rgba(251, 251, 250, 0.65); font-size: 18px; font-weight: 500; }

.pt-action-today:hover, .pt-action-today:active { opacity: 0.92; }

.pt-action-group-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #8a948e;
  margin: 6px 2px -2px;
}

.pt-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pt-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  padding: 0 10px;
  border: 1px solid #e6e8e7;
  border-radius: 5px;
  background: #fbfbfa;
  color: #162E23;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.pt-tile:hover, .pt-tile:active {
  background: #eaf2ed;
  border-color: rgba(22, 46, 35, 0.28);
}

/* ===== 오늘 계획·등원현황 ===== */

.ty-section-h {
  font-size: 15px; font-weight: 700; color: #162E23;
  padding-bottom: 8px; margin: 24px 0 12px;
  border-bottom: 1px solid #162E23;
}

.ty-section-sub { font-size: 12px; font-weight: 500; color: #8a948e; margin-left: 6px; }

.ty-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  margin-top: 12px;
}

.ty-status-date { font-size: 14px; font-weight: 700; font-feature-settings: "tnum"; }

.ty-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 999px; /* 작은 status 배지 — pill 허용 범위 */
  font-size: 12.5px;
  font-weight: 700;
}

.ty-status-pill--in { background: #e6f0ea; color: #2a5440; }
.ty-status-pill--out { background: #f6efe4; color: #8a6636; }
.ty-status-pill--done { background: #eceeed; color: #5d6b64; }
.ty-status-pill--pre { background: #f7f8f7; color: #8a948e; border: 1px solid #e6e8e7; }
.ty-status-pill--off { background: #f9ecec; color: #8c2f2f; }

.ty-list { padding: 6px 16px; }

.ty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  font-size: 14px;
}

.ty-row + .ty-row { border-top: 1px solid #f0f2f1; }

.ty-row-time {
  min-width: 74px;
  font-weight: 600;
  font-feature-settings: "tnum";
  color: #162E23;
}

.ty-cat {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
}

.ty-cat--등원, .ty-cat--복귀 { background: #e6f0ea; color: #2a5440; }
.ty-cat--외출 { background: #f6efe4; color: #8a6636; }
.ty-cat--하원 { background: #eceeed; color: #5d6b64; }

.ty-row-reason { font-size: 13px; color: #5d6b64; }

.ty-row-log { font-weight: 600; }

.ty-row-badge {
  padding: 2px 7px;
  border-radius: 4px;
  background: #f9ecec;
  color: #8c2f2f;
  font-size: 11.5px;
  font-weight: 700;
  margin-left: auto;
}

.ty-row--canceled .ty-row-time,
.ty-row--canceled .ty-row-reason { text-decoration: line-through; color: #a9b1ac; }
.ty-row--canceled .ty-cat { opacity: 0.45; }

.ty-absent { padding: 16px; }
.ty-absent-title { font-size: 14.5px; font-weight: 700; }
.ty-absent-reason { font-size: 13px; color: #5d6b64; margin-top: 4px; }

.ty-empty { padding: 18px 16px; font-size: 13.5px; color: #5d6b64; }

.ty-note { font-size: 12.5px; color: #8a948e; margin-top: 10px; }

/* ===== 아웃카운트 ===== */

.oc-summary { margin-top: 12px; padding: 18px 20px; }

.oc-month {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #8a948e;
}

.oc-total {
  display: flex;
  align-items: baseline;
  gap: 7px;
  margin-top: 6px;
  font-feature-settings: "tnum";
}

.oc-total b { font-size: 30px; font-weight: 700; line-height: 1.15; }

.oc-limit { font-size: 14px; color: #5d6b64; }

.oc-bar {
  height: 8px;
  border-radius: 4px;
  background: #eceeed;
  overflow: hidden;
  margin-top: 12px;
}

.oc-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: #162E23;
  transition: width 0.15s ease;
}

/* 3아웃 이상 — 경고 톤 */
.oc-summary--high .oc-total b, .oc-foot--warn { color: #8c2f2f; }
.oc-summary--high .oc-bar-fill { background: #8c2f2f; }

.oc-foot { font-size: 12.5px; color: #5d6b64; margin-top: 10px; }
.oc-foot--warn { font-weight: 700; }

.oc-item { padding: 12px 0; }
.oc-item + .oc-item { border-top: 1px solid #f0f2f1; }

.oc-item-head { display: flex; align-items: center; gap: 8px; }

.oc-item-date { font-size: 13.5px; font-weight: 700; font-feature-settings: "tnum"; }

.oc-item-amount {
  padding: 2px 8px;
  border-radius: 4px;
  background: #f6efe4;
  color: #8a6636;
  font-size: 12px;
  font-weight: 700;
  font-feature-settings: "tnum";
}

.oc-item-reason { font-size: 13.5px; color: #162E23; margin-top: 4px; }

.oc-item-cancel { font-size: 12.5px; color: #8c2f2f; margin-top: 3px; }

.oc-item--canceled .oc-item-date,
.oc-item--canceled .oc-item-reason { text-decoration: line-through; color: #a9b1ac; }
.oc-item--canceled .oc-item-amount { opacity: 0.45; }

/* ===== 세부 페이지 제목 — 로고 마크 ===== */
/* 밝은 배경 위라 마크는 브랜드 진녹. 한글 20px 볼드의 잉크 중심은 flex 중앙과 이미
   일치한다 (2026-08-31 실측) — translateY 보정을 더하면 오히려 처져 보인다. */

.pt-title--page {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pt-title--page .pt-mark {
  height: 20px;
  color: #162E23;
  transform: none;
}

/* ===== 인증(로그인·인증번호) — 브랜드 히어로 ===== */
/* 앱 첫 화면 — 홈 락업과 같은 재료(마크+워드마크)를 센터 히어로로. */

.pt-auth-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 40px 0 24px;
}

.pt-auth-hero .pt-mark {
  height: 38px;
  transform: none;
}

.pt-auth-word {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #162E23;
  margin-top: 12px;
}

.pt-auth-sub {
  font-size: 12.5px;
  color: #8a948e;
  letter-spacing: 0.02em;
  margin-top: 3px;
}

.pt-auth-title {
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 6px;
}

/* ===== 홈: 빈 상태 (연결된 학생 없음) ===== */

.pt-empty { padding: 30px 20px 26px; }

.pt-empty-mark .pt-mark {
  height: 30px;
  color: #9fb0a7;  /* 마크를 은은하게 — 빈 상태는 강조가 아니라 안내 */
  transform: none;
}

.pt-empty-title {
  font-size: 15.5px;
  font-weight: 700;
  margin: 12px 0 8px;
}

.pt-empty .pt-desc { margin-bottom: 18px; line-height: 1.6; }

.pt-empty-phone {
  font-weight: 600;
  color: #162E23;
  font-feature-settings: "tnum";
}

/* ===== 홈: 등록 안내 할 일 콜아웃 ===== */
/* MKT 레벨 미선택 학부모에게만 맨 위 노출 — 식사 운영 안내(pt-service-off)와 같은 웜 톤.
   선택을 마치면 하단 '등록' 그룹 타일로 내려간다. */

.pt-action-setup {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid #ecd9b8;
  border-radius: 5px;
  background: #fdf6ec;
  text-decoration: none;
  transition: background 0.15s ease;
}

.pt-action-setup::after { content: '›'; color: #b9975f; font-size: 18px; font-weight: 500; flex: none; }

.pt-action-setup:hover, .pt-action-setup:active { background: #f9eeda; }

.pt-action-setup-title {
  display: block;
  font-size: 14.5px;
  font-weight: 700;
  color: #162E23;
}

.pt-action-setup-sub {
  display: block;
  font-size: 12px;
  color: #8a6636;
  margin-top: 2px;
}
