/* ===== 건강일지 전용 스타일 ===== */
.dj-wrap {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  align-items: start;
  margin-top: 4px;
}

/* 카드 공통 */
.dj-card {
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
  margin-bottom: 20px;
}
.dj-card__head {
  background: linear-gradient(135deg, #1a6fc4 0%, #0e4fa0 100%);
  color: #fff;
  padding: 14px 22px;
  font-size: 18px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dj-card__body { padding: 18px 22px; }

/* 섹션 구분 */
.dj-section {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f0f6ff;
  border-left: 4px solid #1a6fc4;
  color: #1a4f8c;
  font-size: 17px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: 0 6px 6px 0;
  margin: 20px 0 10px;
}

/* 행 */
.dj-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 4px;
  border-bottom: 1px solid #f0f0f0;
}
.dj-row:last-child { border-bottom: none; }

.dj-label {
  flex: 0 0 100px;
  font-size: 17px;
  font-weight: 600;
  color: #444;
}

.dj-field {
  flex: 1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 17px;
  color: #333;
}

/* 입력 필드 */
.dj-input {
  padding: 9px 12px;
  border: 1.5px solid #cdd5e0;
  border-radius: 8px;
  font-size: 17px;
  font-family: inherit;
  color: #222;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
  box-sizing: border-box;
}
.dj-input:focus {
  outline: none;
  border-color: #1a6fc4;
  box-shadow: 0 0 0 3px rgba(26,111,196,.12);
}
.dj-num { width: 100px; text-align: center; }
.dj-input[type=date] { width: 200px; }

/* 라디오 버튼 그룹 */
.dj-radio-group { display: flex; flex-wrap: wrap; gap: 8px; }
.dj-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 17px;
  cursor: pointer;
  padding: 7px 14px;
  border: 1.5px solid #d0d8e4;
  border-radius: 8px;
  background: #f8fafc;
  transition: all .15s;
  user-select: none;
}
.dj-radio:hover { border-color: #1a6fc4; background: #f0f6ff; }
.dj-radio:has(input:checked) {
  border-color: #1a6fc4;
  background: #e8f1fb;
  color: #1a4f8c;
  font-weight: 700;
}
.dj-radio input[type=radio] {
  accent-color: #1a6fc4;
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* 단위 텍스트 */
.dj-unit { font-size: 16px; color: #666; white-space: nowrap; }

/* 저장 버튼 */
.dj-save-wrap {
  text-align: center;
  padding: 24px 0 8px;
}
.dj-btn-save {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #1a6fc4 0%, #0e4fa0 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 19px;
  font-weight: 700;
  font-family: inherit;
  padding: 14px 48px;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(26,111,196,.3);
  transition: all .15s;
}
.dj-btn-save:hover {
  background: linear-gradient(135deg, #1560a8 0%, #0a3d80 100%);
  box-shadow: 0 5px 16px rgba(26,111,196,.4);
  transform: translateY(-1px);
}

/* ===== 사이드 패널: 최근 기록 ===== */
.dj-side-card {
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
  position: sticky;
  top: 80px;
}
.dj-side-card__head {
  background: linear-gradient(135deg, #059669 0%, #065f46 100%);
  color: #fff;
  padding: 13px 18px;
  font-size: 17px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.dj-side-card__body { padding: 0; }

/* 최근 기록 테이블 */
.dj-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 16px;
}
.dj-list-table thead th {
  background: #f0f6ff;
  color: #1a4f8c;
  font-weight: 700;
  font-size: 15px;
  padding: 9px 10px;
  text-align: center;
  border-bottom: 2px solid #d0e4f7;
}
.dj-list-table tbody td {
  border-bottom: 1px solid #f0f4f8;
  padding: 8px 10px;
  text-align: center;
  font-size: 16px;
  vertical-align: middle;
}
.dj-list-table tbody tr:hover { background: #f5f9ff; }
.dj-list-table tbody tr:last-child td { border-bottom: none; }
.dj-active-row { background: #fffde7 !important; }
.dj-active-row td { font-weight: 700; color: #1a4f8c; }

/* 컨디션 배지 */
.dj-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
}
.dj-badge--good    { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.dj-badge--normal  { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; }
.dj-badge--bad     { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }

/* 날짜 링크 */
.dj-date-link {
  font-size: 15px;
  color: #1a6fc4;
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.dj-date-link:hover { text-decoration: underline; }

/* 빈 기록 메시지 */
.dj-empty {
  text-align: center;
  padding: 30px 16px;
  font-size: 16px;
  color: #888;
}

/* ===== 건강 평가 카드 ===== */
.ev-card {
  background: #fff;
  border: 1px solid #e0e7ef;
  border-radius: 14px;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  overflow: hidden;
  margin-bottom: 18px;
}
.ev-card__head {
  padding: 13px 18px;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #7c3aed 0%, #4c1d95 100%);
}
.ev-grade-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px 12px;
}
.ev-grade-circle {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ev-grade-circle__letter {
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}
.ev-grade-circle__label {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}
.ev-grade-info { flex: 1; }
.ev-grade-info__label {
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}
.ev-grade-info__score {
  font-size: 15px;
  color: #666;
  margin-top: 4px;
}
.ev-advice {
  margin: 0 18px 14px;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 16px;
  line-height: 1.6;
  border-left: 4px solid;
}
.ev-items { padding: 0 18px 16px; }
.ev-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid #f0f4f8;
  font-size: 16px;
}
.ev-item:last-child { border-bottom: none; }
.ev-item__icon { font-size: 18px; flex-shrink: 0; width: 24px; text-align: center; }
.ev-item__name { flex: 0 0 56px; font-size: 15px; font-weight: 600; color: #555; }
.ev-item__msg  { flex: 1; font-size: 15px; }
.ev-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.ev-dot--good   { background: #059669; }
.ev-dot--warn   { background: #d97706; }
.ev-dot--danger { background: #dc2626; }
.ev-dot--none   { background: #d1d5db; }
.ev-item__msg--good   { color: #065f46; }
.ev-item__msg--warn   { color: #92400e; }
.ev-item__msg--danger { color: #991b1b; font-weight: 600; }
.ev-item__msg--none   { color: #9ca3af; }

.ev-symptom {
  margin: 0 18px 14px;
  padding: 8px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  font-size: 15px;
  color: #9a3412;
}
.ev-symptom__title { font-weight: 700; margin-bottom: 4px; }

/* 반응형 */
@media (max-width: 900px) {
  .dj-wrap { grid-template-columns: 1fr; }
  .dj-side-card { position: static; }
}
@media (max-width: 600px) {
  .dj-label { flex: 0 0 82px; font-size: 16px; }
  .dj-input  { font-size: 16px; padding: 8px 10px; }
  .dj-radio  { font-size: 16px; padding: 6px 10px; }
  .dj-card__body { padding: 14px 14px; }
  .dj-input[type=date] { width: 100%; }
  .dj-num { width: 80px; }
}

