:root {
  --board-primary: #163f77;
  --board-primary-dark: #0f2e59;
  --board-text: #172033;
  --board-muted: #6b7280;
  --board-line: #e5e7eb;
  --board-soft: #f7f9fc;
  --board-danger: #b42318;
}

.board-page { color: var(--board-text); }
.board-wrap { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.board-hero { padding: 86px 0 52px; background: linear-gradient(180deg, #f7faff 0%, #fff 100%); border-bottom: 1px solid var(--board-line); }
.board-eyebrow { margin: 0 0 10px; color: var(--board-primary); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.board-hero h1 { margin: 0; font-size: clamp(34px, 4vw, 54px); line-height: 1.12; }
.board-hero p:last-child { margin: 16px 0 0; color: var(--board-muted); font-size: 17px; }
.board-section { padding: 48px 0 90px; }

.board-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.board-search { display: flex; gap: 8px; flex: 1; }
.board-search select { width: 120px; }
.board-search input { max-width: 420px; flex: 1; }

.board-btn,
.board-form button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--board-primary); border-radius: 10px; background: var(--board-primary); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.board-btn:hover { background: var(--board-primary-dark); color: #fff; }
.board-btn-light { background: #fff; color: var(--board-primary); border-color: #cfd7e5; }
.board-btn-light:hover { background: var(--board-soft); color: var(--board-primary); }
.board-btn-danger { background: #fff; border-color: #efc6c2; color: var(--board-danger); }
.board-btn-danger:hover { background: #fff5f4; color: var(--board-danger); }

.board-table-wrap { overflow-x: auto; border-top: 2px solid var(--board-text); }
.board-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.board-table th { padding: 15px 12px; background: var(--board-soft); border-bottom: 1px solid var(--board-line); font-weight: 800; text-align: center; }
.board-table td { padding: 17px 12px; border-bottom: 1px solid var(--board-line); text-align: center; color: #4b5563; }
.board-table .board-title-cell { text-align: left; }
.board-table .board-title-cell a { color: var(--board-text); text-decoration: none; font-weight: 700; }
.board-table .board-title-cell a:hover { color: var(--board-primary); }
.board-col-no { width: 82px; }
.board-col-category { width: 92px; }
.board-col-author { width: 120px; }
.board-col-date { width: 120px; }
.board-col-views { width: 78px; }

.board-badge { display: inline-flex; align-items: center; min-height: 26px; padding: 0 9px; border-radius: 999px; background: #eef4ff; color: var(--board-primary); font-size: 12px; font-weight: 800; }
.board-empty { padding: 56px 12px !important; color: var(--board-muted) !important; }

.board-pagination { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 28px; }
.board-pagination a { display: grid; place-items: center; min-width: 38px; height: 38px; padding: 0 7px; border: 1px solid var(--board-line); border-radius: 8px; color: #4b5563; text-decoration: none; }
.board-pagination a.is-active { background: var(--board-primary); border-color: var(--board-primary); color: #fff; }

.board-view { border-top: 2px solid var(--board-text); }
.board-view-head { padding: 28px 4px 24px; border-bottom: 1px solid var(--board-line); }
.board-view-head h2 { margin: 13px 0 14px; font-size: clamp(24px, 3vw, 36px); line-height: 1.35; }
.board-meta { display: flex; flex-wrap: wrap; gap: 10px 20px; color: var(--board-muted); font-size: 14px; }
.board-content { min-height: 260px; padding: 34px 4px 50px; border-bottom: 1px solid var(--board-line); line-height: 1.9; overflow-wrap: anywhere; }

.board-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 22px; }
.board-actions > div { display: flex; gap: 8px; }

.board-form, .board-confirm { max-width: 880px; margin: 0 auto; }
.board-form { display: grid; gap: 18px; }
.board-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.board-form label { display: grid; gap: 8px; }
.board-form label > span { font-weight: 800; font-size: 14px; }
.board-form input,
.board-form select,
.board-form textarea,
.board-search input,
.board-search select,
.board-confirm input { width: 100%; border: 1px solid #d5dbe5; border-radius: 10px; background: #fff; color: var(--board-text); font: inherit; outline: none; }
.board-form input, .board-form select, .board-search input, .board-search select, .board-confirm input { height: 46px; padding: 0 13px; }
.board-form textarea { resize: vertical; padding: 13px; line-height: 1.7; }
.board-form input:focus, .board-form select:focus, .board-form textarea:focus, .board-search input:focus, .board-search select:focus, .board-confirm input:focus { border-color: var(--board-primary); box-shadow: 0 0 0 3px rgba(22,63,119,.10); }

.board-confirm { padding: 34px; border: 1px solid var(--board-line); border-radius: 16px; background: var(--board-soft); }
.board-confirm h2 { margin-top: 0; }
.board-confirm form { margin-top: 22px; }

.board-alert { margin: 0 0 20px; padding: 14px 16px; border: 1px solid #f1b9b4; border-radius: 10px; background: #fff4f3; color: #8f1d14; font-weight: 700; }
.board-hp { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.board-mobile-list { display: none; }

@media (max-width: 760px) {
  .board-wrap { width: min(100% - 28px, 1180px); }
  .board-hero { padding: 58px 0 36px; }
  .board-section { padding: 30px 0 64px; }
  .board-toolbar { align-items: stretch; flex-direction: column; }
  .board-search { width: 100%; }
  .board-search input { max-width: none; min-width: 0; }
  .board-table-wrap { display: none; }
  .board-mobile-list { display: grid; gap: 10px; }
  .board-mobile-card { display: grid; gap: 8px; padding: 16px; border: 1px solid var(--board-line); border-radius: 12px; color: var(--board-text); text-decoration: none; }
  .board-mobile-card strong { line-height: 1.45; }
  .board-mobile-card > span { color: var(--board-muted); font-size: 13px; }
  .board-empty-card { padding: 38px 18px; border: 1px solid var(--board-line); border-radius: 12px; text-align: center; color: var(--board-muted); }
  .board-form-row { grid-template-columns: 1fr; }
  .board-actions { align-items: stretch; flex-direction: column-reverse; }
  .board-actions > div { width: 100%; }
  .board-actions .board-btn { flex: 1; }
}

@media (max-width: 520px) {
  .board-search { display: grid; grid-template-columns: 95px 1fr; }
  .board-search .board-btn { grid-column: 1 / -1; }
}


/* ===== Rich editor upgrade ===== */
.board-editor-field { display:grid; gap:8px; }
.board-field-label { font-weight:800; font-size:14px; }
#board-editor-toolbar { border-radius:10px 10px 0 0; border-color:#d5dbe5; background:#fafbfc; }
#board-editor { min-height:360px; border-radius:0 0 10px 10px; border-color:#d5dbe5; background:#fff; font-size:16px; }
#board-editor .ql-editor { min-height:360px; line-height:1.8; }
#board-editor .ql-editor img, .board-rich-content img { display:block; max-width:100%; height:auto; margin:18px auto; border-radius:10px; }
.board-editor-tools { display:flex; align-items:center; gap:12px; flex-wrap:wrap; margin-top:6px; }
.board-upload-note { color:var(--board-muted); font-size:12px; line-height:1.5; }
.board-upload-status { min-height:20px; color:var(--board-primary); font-size:13px; font-weight:700; }
.board-rich-content { padding:34px 4px 50px !important; min-height:260px; white-space:normal; overflow-wrap:anywhere; }
.board-rich-content a { color:var(--board-primary); text-decoration:underline; text-underline-offset:3px; }
.board-rich-content blockquote { border-left:4px solid #d5dbe5; margin:18px 0; padding-left:16px; color:#4b5563; }
.board-rich-content pre { overflow:auto; padding:16px; border-radius:10px; background:#111827; color:#f9fafb; }
.board-rich-content h1,.board-rich-content h2,.board-rich-content h3 { margin:1.2em 0 .55em; line-height:1.35; }
@media (max-width:760px){#board-editor,#board-editor .ql-editor{min-height:300px}.board-editor-tools{align-items:stretch;flex-direction:column}.board-editor-tools .board-btn{width:100%}}
