/* ===== 共创计划公示平台 · 统一样式（深青 #0F5C6B，PC+H5 响应式） ===== */
:root {
  --teal: #0F5C6B;
  --teal-dark: #0A4350;
  --teal-light: #EEF6F7;
  --ink: #1C1E21;
  --muted: #5A6472;
  --line: #D8DEE6;
  --bg: #F7F9FA;
  --card: #FFFFFF;
  --red: #C0392B;
  --green: #1E8449;
  --radius: 10px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 14px; line-height: 1.6;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- 登录页 ---- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #0F5C6B 0%, #0A4350 100%); padding: 20px;
}
.login-card {
  background: var(--card); border-radius: 14px; padding: 40px 36px; width: 100%; max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.login-card .logo { text-align: center; margin-bottom: 28px; }
.login-card .logo .mark {
  width: 52px; height: 52px; border-radius: 12px; background: var(--teal); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 24px; font-weight: 700;
}
.login-card h1 { font-size: 20px; margin-top: 12px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(15,92,107,.12);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 14px; font-family: inherit; background: var(--teal); color: #fff; transition: .15s;
}
.btn:hover { background: var(--teal-dark); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.block { width: 100%; }
.btn.ghost { background: #fff; color: var(--teal); border: 1px solid var(--teal); }
.btn.ghost:hover { background: var(--teal-light); }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: var(--red); }
.btn.danger:hover { background: #96281B; }
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 14px; display: none; }
.alert.show { display: block; }
.alert.error { background: #FDEDEC; color: var(--red); border: 1px solid #F5B7B1; }
.alert.ok { background: #E9F7EF; color: var(--green); border: 1px solid #A9DFBF; }

/* ---- 应用框架 ---- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; background: var(--teal-dark); color: #D7E3E8; flex-shrink: 0;
  display: flex; flex-direction: column; position: fixed; top: 0; bottom: 0; left: 0; z-index: 40;
}
.sidebar .brand {
  padding: 18px 20px; font-size: 16px; font-weight: 700; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.12); display: flex; align-items: center; gap: 10px;
}
.sidebar .brand .mark {
  width: 30px; height: 30px; border-radius: 8px; background: rgba(255,255,255,.16);
  display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.sidebar nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.sidebar nav a {
  display: flex; align-items: center; gap: 10px; padding: 11px 20px; color: #C3D4DB;
  font-size: 14px; border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.sidebar nav a.active { background: rgba(255,255,255,.12); color: #fff; border-left-color: #7FD1DD; }
.sidebar nav a .ico { width: 18px; text-align: center; }
.sidebar .foot { padding: 14px 20px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; color: #9FB6BF; }
.main { flex: 1; margin-left: 220px; padding: 24px; min-width: 0; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px;
  flex-wrap: wrap; gap: 10px;
}
.topbar h2 { font-size: 20px; }
.topbar .who { color: var(--muted); font-size: 13px; }
.topbar .who b { color: var(--ink); }

/* ---- 卡片与网格 ---- */
.grid { display: grid; gap: 16px; }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 20px;
}
.card .card-title { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.card .card-title .extra { font-size: 12px; color: var(--muted); font-weight: 400; }
.stat .num { font-size: 26px; font-weight: 700; color: var(--teal); }
.stat .lbl { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stat.warn .num { color: var(--red); }

/* ---- 表格 ---- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th {
  background: var(--teal-light); color: var(--teal); text-align: left; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; font-weight: 700;
}
table.tbl td { padding: 9px 12px; border-bottom: 1px solid #EDF1F5; vertical-align: top; }
table.tbl tr:nth-child(even) td { background: #FAFBFC; }
table.tbl tr:hover td { background: var(--teal-light); }
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px;
  background: var(--teal-light); color: var(--teal); white-space: nowrap;
}
.tag.gray { background: #EEF0F3; color: var(--muted); }
.tag.red { background: #FDEDEC; color: var(--red); }
.tag.green { background: #E9F7EF; color: var(--green); }
.mono { font-family: Consolas, Menlo, monospace; font-size: 12.5px; }

/* ---- 公告 ---- */
.ann-item { padding: 14px 0; border-bottom: 1px solid #EDF1F5; }
.ann-item:last-child { border-bottom: none; }
.ann-item .head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ann-item .head .t { font-weight: 700; }
.ann-item .head .d { color: var(--muted); font-size: 12px; }
.ann-item .body { margin-top: 6px; color: #333; white-space: pre-wrap; }

/* ---- 提示 ---- */
.empty { text-align: center; color: var(--muted); padding: 36px 0; font-size: 13px; }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; flex-wrap: wrap; }
.tabs button {
  padding: 9px 16px; border: none; background: none; cursor: pointer; font-size: 14px;
  color: var(--muted); border-bottom: 2px solid transparent; font-family: inherit;
}
.tabs button.active { color: var(--teal); border-bottom-color: var(--teal); font-weight: 700; }
.pane { display: none; }
.pane.active { display: block; }
.mobile-menu-btn { display: none; }

/* ---- 强制改密弹窗 ---- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(10,40,48,.55); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask.hidden { display: none; }
.modal {
  background: #fff; border-radius: 14px; padding: 28px 26px; width: 100%; max-width: 420px;
  box-shadow: 0 24px 70px rgba(0,0,0,.3);
}
.modal h3 { font-size: 17px; margin-bottom: 6px; }
.modal .sub { font-size: 13px; color: var(--muted); margin-bottom: 18px; }

/* ---- H5 / 移动端 ---- */
@media (max-width: 860px) {
  .sidebar {
    transform: translateX(-100%); transition: transform .25s; width: 240px;
  }
  .sidebar.open { transform: translateX(0); box-shadow: 0 0 40px rgba(0,0,0,.3); }
  .main { margin-left: 0; padding: 16px; }
  .mobile-menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 8px; border: 1px solid var(--line);
    background: #fff; font-size: 18px; cursor: pointer; color: var(--teal);
  }
  .grid.cols-4, .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
  .grid.cols-4.keep2 { grid-template-columns: 1fr 1fr; }
  .topbar h2 { font-size: 17px; }
  .stat .num { font-size: 22px; }
  table.tbl th, table.tbl td { padding: 8px 10px; }
  .login-card { padding: 28px 22px; }
}
@media (max-width: 480px) {
  .grid.cols-4.keep2 { grid-template-columns: 1fr; }
  .tabs button { padding: 8px 10px; font-size: 13px; }
}
