:root {
  --navy: #12395f;
  --navy-2: #1b4d7a;
  --ink: #1d2733;
  --muted: #6b7a8c;
  --line: #e2e8ef;
  --bg: #f4f6f9;
  --card: #ffffff;
  --accent: #b4894a;
  --ok: #1f7a4d;
  --warn: #b06d12;
  --danger: #b23b3b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(18, 57, 95, .06), 0 6px 20px rgba(18, 57, 95, .05);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--navy-2); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- top bar ---------- */
.topbar {
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 18px;
  letter-spacing: 1px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text b { font-size: 15px; letter-spacing: .5px; }
.brand-text small { color: rgba(255,255,255,.62); font-size: 11px; }
.who { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.role-tag {
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  padding: 2px 9px; border-radius: 20px; font-size: 12px;
  color: #f2e6d2;
}
.who-name { color: #fff; }

/* ---------- nav ---------- */
.nav {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav a {
  color: #34485e;
  padding: 13px 12px;
  font-size: 13.5px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy); text-decoration: none; background: #f7f9fc; }
.nav a.active { color: var(--navy); border-bottom-color: var(--accent); font-weight: 600; }
.nav-sep { width: 1px; height: 18px; background: var(--line); margin: 0 10px; }

/* ---------- layout ---------- */
.wrap { width: 100%; max-width: 1320px; margin: 0 auto; padding: 24px 28px 56px; flex: 1; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 18px; }
.page-head h1 { font-size: 21px; margin: 0 0 4px; letter-spacing: .5px; }
.page-head .muted { margin: 0; }
.head-actions { display: flex; gap: 8px; flex-shrink: 0; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.card.narrow { max-width: 760px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 12px; }
.card-head h2 { font-size: 15px; margin: 0; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
  .topbar, .nav, .wrap { padding-left: 16px; padding-right: 16px; }
}

/* ---------- text ---------- */
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; }
.text-danger { color: var(--danger); }
.prose { white-space: pre-wrap; line-height: 1.85; font-size: 14.5px; }
.hint { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; font-style: normal; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; padding: 0 16px; border-radius: 7px;
  border: 1px solid transparent; font-size: 13px; cursor: pointer;
  background: #eef2f7; color: #2b3c50; font-family: inherit;
  transition: .15s;
}
.btn:hover { text-decoration: none; filter: brightness(.97); }
.btn.primary { background: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.ghost { background: #fff; border-color: #cfd9e5; color: #2b3c50; }
.btn.ghost:hover { border-color: var(--navy-2); color: var(--navy); }
.btn.danger { color: var(--danger); border-color: #e7c6c6; }
.btn.block { width: 100%; height: 40px; font-size: 14.5px; letter-spacing: 2px; }
.link { color: var(--navy-2); font-size: 13px; }
.link-btn {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--navy-2); font-size: 13px; font-family: inherit;
}
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: var(--danger); }
.inline { display: inline; }

/* ---------- flash ---------- */
.flash {
  padding: 10px 14px; border-radius: 8px; margin-bottom: 14px;
  font-size: 13px; border: 1px solid;
}
.flash.ok { background: #eef8f2; border-color: #c4e4d3; color: var(--ok); }
.flash.err { background: #fbf0f0; border-color: #eccfcf; color: var(--danger); }
.flash.warn { background: #fdf6ea; border-color: #ecd9b8; color: var(--warn); }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
@media (max-width: 1000px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 2px;
  border-top: 3px solid var(--navy);
}
.stat.danger { border-top-color: var(--danger); }
.stat-label { color: var(--muted); font-size: 12.5px; }
.stat-value { font-size: 28px; font-weight: 650; letter-spacing: -.5px; line-height: 1.2; color: var(--navy); }
.stat.danger .stat-value { color: var(--danger); }
.stat-sub { color: var(--muted); font-size: 12px; }

/* ---------- table ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-weight: 600; color: #4a5c70; font-size: 12.5px;
  padding: 9px 10px; border-bottom: 1px solid var(--line); background: #fafbfd;
}
.table td { padding: 11px 10px; border-bottom: 1px solid #eef2f6; vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcfe; }
.detail-cell { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tags ---------- */
.tag {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  background: #eef2f7; color: #4a5c70; font-size: 11.5px; line-height: 1.8;
  white-space: nowrap;
}
.tag.ok { background: #e9f6ef; color: var(--ok); }
.tag.warn { background: #fdf3e3; color: var(--warn); }
.tag.danger { background: #fbecec; color: var(--danger); }
.tag.off { background: #f0f1f3; color: #8b95a1; }
.tag.role-chair { background: #f6ecdd; color: #8a5d1c; }
.tag.role-secretary { background: #e8eef8; color: #27507f; }
.tag.role-board { background: #eaf4f2; color: #1f6b5f; }

/* ---------- filters ---------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  padding: 5px 12px; border-radius: 20px; background: #fff;
  border: 1px solid var(--line); color: #4a5c70; font-size: 12.5px;
}
.chip:hover { text-decoration: none; border-color: #b9c8d8; }
.chip.active { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------- progress ---------- */
.progress { display: inline-block; width: 110px; height: 6px; background: #eef2f6; border-radius: 4px; overflow: hidden; vertical-align: middle; margin-right: 8px; }
.progress i { display: block; height: 100%; background: var(--navy-2); }
.progress.big { width: 100%; height: 9px; margin: 14px 0 6px; }

/* ---------- lists ---------- */
.notice-list { list-style: none; margin: 0; padding: 0; }
.notice-list li { padding: 10px 0; border-bottom: 1px solid #eef2f6; display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.notice-list li:last-child { border-bottom: 0; }
.notice-list.big li { padding: 14px 2px; }
.notice-title { font-size: 14.5px; font-weight: 550; color: var(--ink); }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-list li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #eef2f6; }
.todo-list li:last-child { border-bottom: 0; }
.todo-list .small { margin-left: auto; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #c3cfdd; }
.dot.high { background: var(--danger); }
.point-list { margin: 0; padding-left: 20px; }
.point-list li { margin: 7px 0; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 150px 90px 1fr; gap: 10px; padding: 8px 0; border-bottom: 1px dashed #e8eef4; font-size: 13px; }
.timeline .time { color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.timeline .who { color: var(--navy); }

/* ---------- forms ---------- */
.form label { display: block; margin-bottom: 14px; }
.form label > span { display: block; font-size: 12.5px; color: #43556a; margin-bottom: 5px; font-weight: 550; }
.form input[type=text], .form input[type=tel], .form input[type=password],
.form input[type=number], .form input[type=date],
.form select, .form textarea {
  width: 100%; border: 1px solid #cfd9e5; border-radius: 7px;
  padding: 8px 11px; font-size: 13.5px; font-family: inherit; color: var(--ink);
  background: #fff; outline: none;
}
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(27,77,122,.08); }
.form textarea { resize: vertical; line-height: 1.7; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .row-2 { grid-template-columns: 1fr; } }
.actions { display: flex; gap: 10px; margin-top: 6px; }
.fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px 6px; margin: 0 0 16px; }
.fieldset legend { font-size: 12.5px; color: #43556a; font-weight: 600; padding: 0 6px; }
.checks { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px 14px; }
.check { display: flex !important; align-items: center; gap: 8px; margin: 6px 0 !important; font-size: 13px; }
.check input { width: auto !important; }
.check span { margin: 0 !important; font-weight: 400 !important; color: var(--ink) !important; display: inline !important; }
.inline-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.mini-input { width: 62px; padding: 3px 6px; border: 1px solid #d8e0ea; border-radius: 5px; font-size: 12px; }

/* ---------- placeholder ---------- */
.placeholder-card { background: linear-gradient(180deg, #fff, #fbfcfd); }
.mock-bars { margin: 14px 0 8px; display: grid; gap: 9px; }
.mock-bars div { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.mock-bars i { display: block; height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--navy-2), #6f9cc4); opacity: .75; }
.badge { background: #f2ede4; color: #8a5d1c; font-size: 11px; padding: 1px 8px; border-radius: 20px; }
.empty-state { text-align: center; padding: 28px 10px; }
.empty-state h2 { font-size: 16px; margin: 0 0 6px; }
.empty-icon { font-size: 30px; color: #b9c8d8; margin-bottom: 8px; }

/* ---------- login ---------- */
.login-body { background: var(--navy); display: block; }
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.15fr .85fr; }
.login-side {
  color: #fff; padding: 64px 60px; display: flex; flex-direction: column; justify-content: center;
  background:
    radial-gradient(900px 420px at 10% 0%, rgba(180,137,74,.20), transparent 60%),
    radial-gradient(700px 500px at 90% 100%, rgba(255,255,255,.06), transparent 60%),
    var(--navy);
}
.login-mark {
  width: 52px; height: 52px; border-radius: 12px; background: var(--accent);
  display: grid; place-items: center; font-size: 26px; font-weight: 700; margin-bottom: 28px;
}
.login-side h1 { font-size: 32px; line-height: 1.35; margin: 0 0 10px; font-weight: 600; letter-spacing: 1px; }
.login-sub { color: rgba(255,255,255,.62); margin: 0 0 30px; font-size: 13.5px; }
.login-points { list-style: none; padding: 0; margin: 0 0 auto; display: grid; gap: 10px; }
.login-points li { color: rgba(255,255,255,.86); font-size: 14px; padding-left: 18px; position: relative; }
.login-points li:before { content: ""; position: absolute; left: 0; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.login-note { color: rgba(255,255,255,.42); font-size: 12px; margin-top: 40px; }
.login-panel {
  background: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center;
}
.login-panel h2 { font-size: 22px; margin: 0 0 4px; }
.login-panel .muted { margin: 0 0 22px; }
.login-panel .form { max-width: 340px; }
.login-panel .muted.small { margin-top: 18px; }
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-side { padding: 40px 28px; }
  .login-side h1 { font-size: 25px; }
  .login-points { margin-bottom: 0; }
  .login-note { display: none; }
  .login-panel { padding: 40px 28px; }
}

/* ---------- error ---------- */
.error-shell { max-width: 520px; margin: 14vh auto; text-align: center; padding: 0 24px; }
.error-code { font-size: 76px; font-weight: 700; color: #cfdae6; line-height: 1; letter-spacing: 2px; }
.error-shell h1 { font-size: 20px; margin: 8px 0 10px; }
.error-shell .btn { margin-top: 18px; }

/* ---------- footer ---------- */
.foot {
  border-top: 1px solid var(--line); background: #fff;
  padding: 12px 28px; display: flex; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: 11.5px; flex-wrap: wrap;
}
