:root {
  --text: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --row: #fafaf8;
  --accent: #0ea5e9;
  --primary: #0aa3b5;
  --bg-light: #f9fafb;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Pretendard", system-ui, -apple-system, Segoe UI, Roboto,
    Helvetica, Arial, "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic",
    "맑은 고딕", sans-serif;
  color: var(--text);
  background: #fff;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

.page-header {
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid var(--border);
}

.page-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
}

.info-content {
  margin-bottom: 40px;
}

.info-section {
  background: #fff;
  border-radius: 8px;
}

.section-title {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 24px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary);
}

/* 회사 정보 테이블 */
.info-table {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
}

.info-row {
  display: grid;
  grid-template-columns: 150px 1fr 150px 1fr;
}

.info-row.full {
  grid-template-columns: 150px 1fr;
}

.info-label {
  background: var(--bg-light);
  padding: 16px 20px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
}

.info-value {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  outline: none;
  cursor: text;
}

.info-value:focus {
  background: #fafffe;
}

.info-value:hover {
  background: #fcfcfc;
}

/* 에디터 섹션 */
.editor-section {
  margin-bottom: 32px;
}

.editor-label {
  background: var(--bg-light);
  padding: 16px 20px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
}

.editor-area {
  min-height: 200px;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

/* 콘텐츠 표시 섹션 */
.content-section {
  margin-bottom: 32px;
}

.content-label {
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 11px 20px;
  background: var(--bg-light);
  border-radius: 4px;
  display: inline-block;
}

.content-display {
  border: none;
  padding: 11px 20px;
  background: #fff;
  line-height: 1.6;
}

.content-display h3 {
  margin: 24px 0 12px 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  border-bottom: 2px solid var(--primary);
  padding-bottom: 8px;
}

.content-display h3:first-child {
  margin-top: 0;
}

.content-display p {
  margin: 12px 0;
  font-size: 14px;
  color: var(--text);
}

.content-display ul {
  margin: 12px 0;
  padding-left: 20px;
}

.content-display li {
  margin: 8px 0;
  font-size: 14px;
  color: var(--text);
}

.content-display strong {
  font-weight: 600;
  color: var(--primary);
}

/* 연락처 정보 */
.contact-info {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  margin-top: 32px;
}

.contact-row {
  display: grid;
  grid-template-columns: 150px 1fr 150px 1fr;
}

.contact-row.full {
  grid-template-columns: 150px 1fr;
}

.contact-label {
  background: var(--bg-light);
  padding: 16px 20px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
}

.contact-value {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  outline: none;
  cursor: text;
}

.contact-value:focus {
  background: #fafffe;
}

.contact-value:hover {
  background: #fcfcfc;
}

/* 버튼 */
.actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 40px;
  padding-top: 40px;
  border: none;
}

.detail_actions {
  justify-content: space-between;
}

.delete_btn {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #dbdbdb;
  width: 140px;
  height: 44px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
}

.detail_btns {
  display: flex;
  gap: 8px;
}

.btn {
  min-width: 140px;
  height: 44px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  cursor: pointer;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.2s;
}

.btn:hover {
  opacity: 0.9;
}

.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.btn.secondary {
  background: #ffffff;
  border-color: var(--primary);
  color: var(--primary);
}

.btn.secondary:hover {
  background: var(--bg-light);
}

/* CKEditor 스타일 커스터마이징 */
.ck-editor__editable {
  min-height: 200px;
}

.ck.ck-editor__main > .ck-editor__editable {
  border-radius: 0 0 8px 8px;
}

.ck.ck-toolbar {
  border-radius: 8px 8px 0 0;
  background: var(--bg-light) !important;
  border-color: var(--border) !important;
}

/* 반응형 */
@media (max-width: 768px) {
  .info-row {
    grid-template-columns: 1fr;
  }

  .info-row .info-label,
  .info-row .info-value {
    border-right: none;
  }

  .info-row .info-label {
    border-bottom: 1px solid var(--border);
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .container {
    padding: 20px 16px;
  }

  .page-header h1 {
    font-size: 24px;
  }
}

/* 프린트 시 actions 클래스 숨김 */
@media print {
  .actions {
    display: none !important;
  }
  .btnbox {
    display: none !important;
  }
}
