:root {
  --blue: #002966;
  --border: #a7b4c4;
  --page: #eef1f5;
  --text: #202b38;
  --muted: #657182;
  --danger: #8e1c1c;
}
* { box-sizing: border-box; }
html { background: var(--page); }
body { margin: 0; color: var(--text); font: 13px Verdana, Arial, sans-serif; }
a { color: #064f9c; text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, textarea, select { font: inherit; }
.page-width { width: min(1120px, calc(100% - 28px)); margin: 0 auto; }
.site-header { background: var(--blue); color: #fff; border-bottom: 3px solid #001a40; }
.header-inner { width: min(1120px, calc(100% - 28px)); height: 64px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; }
.brand { color: #fff; font: bold 23px Arial, sans-serif; }
.brand:hover { text-decoration: none; }
.header-account { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.nav-bar { background: #dbe4ef; border-bottom: 1px solid var(--border); box-shadow: 0 1px 2px #b7c0cb; }
.nav-inner { display: flex; min-height: 36px; align-items: stretch; }
.nav-inner a { padding: 11px 16px 9px; color: #12385f; border-left: 1px solid #c2cfdd; font-weight: bold; font-size: 12px; }
.nav-inner a:last-child { border-right: 1px solid #c2cfdd; }
.nav-inner a:hover { background: #cbd9e8; text-decoration: none; }
.main-content { min-height: calc(100vh - 146px); padding: 18px 0 35px; }
.breadcrumb { margin: 0 0 12px; color: var(--muted); font-size: 11px; }
.panel { background: #fff; border: 1px solid var(--border); box-shadow: 0 1px 2px #d0d5dc; margin-bottom: 14px; }
.panel-title { background: var(--blue); color: #fff; padding: 8px 11px; font: bold 14px Arial, sans-serif; border-bottom: 1px solid #001b43; }
.panel-body { padding: 12px; }
.forum-row { display: grid; grid-template-columns: 46px 1fr 120px 135px; gap: 10px; align-items: center; padding: 11px 12px; border-bottom: 1px solid #d7dde5; }
.forum-row:last-child { border-bottom: 0; }
.forum-icon { width: 34px; height: 30px; background: #dce8f5; border: 1px solid #a9bfd9; color: var(--blue); display: grid; place-items: center; font: bold 17px Arial; }
.forum-name { font-weight: bold; font-size: 14px; }
.forum-description { margin-top: 4px; color: var(--muted); font-size: 11px; }
.stats, .last-post { color: var(--muted); font-size: 11px; line-height: 1.5; }
.thread-row { display: grid; grid-template-columns: 1fr 100px 145px; gap: 10px; padding: 10px 12px; border-bottom: 1px solid #d7dde5; align-items: center; }
.thread-row:last-child { border-bottom: 0; }
.thread-title { font-weight: bold; }
.thread-meta { color: var(--muted); font-size: 11px; margin-top: 4px; }
.post { display: grid; grid-template-columns: 155px 1fr; border: 1px solid var(--border); background: #fff; margin-bottom: 12px; }
.post-user { background: #e9eef5; border-right: 1px solid var(--border); padding: 12px; font-size: 11px; }
.post-user strong { display: block; color: var(--blue); font-size: 13px; margin-bottom: 6px; }
.post-body { min-width: 0; padding: 12px 14px; }
.post-head { color: var(--muted); font-size: 11px; border-bottom: 1px solid #e1e5eb; padding-bottom: 8px; margin-bottom: 12px; display: flex; justify-content: space-between; }
.post-content { white-space: pre-wrap; line-height: 1.6; min-height: 55px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; margin: 0 0 10px; gap: 10px; }
.toolbar h1 { font: bold 20px Arial, sans-serif; color: var(--blue); margin: 0; }
.button { background: linear-gradient(#fff, #e5e9ee); color: #1a3859; border: 1px solid #8c9bad; border-radius: 2px; padding: 7px 12px; cursor: pointer; font-weight: bold; font-size: 12px; }
.button:hover { background: #dce7f3; }
.button-primary { background: var(--blue); color: #fff; border-color: #001c44; }
.button-danger { color: var(--danger); border-color: #c28b8b; }
.button-light { background: #f4f7fb; padding: 5px 9px; }
.form-row { margin-bottom: 12px; }
label { display: block; font-weight: bold; margin-bottom: 5px; }
input, textarea, select { width: 100%; padding: 8px; border: 1px solid #8c9bad; background: #fff; color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.muted { color: var(--muted); }
.notice { background: #fff7d6; border: 1px solid #d5bf69; color: #654d00; padding: 9px 11px; margin-bottom: 12px; }
.notice.error { background: #fff0f0; border-color: #ca8585; color: var(--danger); }
.badge { display: inline-block; padding: 3px 6px; background: #dbe8f7; border: 1px solid #aec5df; color: #234e7e; font-size: 10px; font-weight: bold; }
.site-footer { border-top: 1px solid var(--border); background: #dce3ec; color: #536174; text-align: center; padding: 18px; font-size: 11px; }
.dialog { border: 1px solid #66788e; padding: 0; width: min(430px, calc(100% - 30px)); box-shadow: 0 8px 30px #1f2e4050; }
.dialog::backdrop { background: #0a1d3380; }
.dialog form { padding: 18px; }
.dialog h2 { color: var(--blue); margin: 0 0 8px; font: bold 18px Arial; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.empty { padding: 22px 12px; color: var(--muted); text-align: center; }
@media (max-width: 700px) {
  .brand { font-size: 18px; }
  .nav-inner { overflow-x: auto; width: 100%; }
  .nav-inner a { white-space: nowrap; }
  .forum-row { grid-template-columns: 40px 1fr; }
  .stats, .last-post { display: none; }
  .thread-row { grid-template-columns: 1fr; gap: 4px; }
  .post { grid-template-columns: 1fr; }
  .post-user { border-right: 0; border-bottom: 1px solid var(--border); }
  .grid-2 { grid-template-columns: 1fr; }
}
