/* 内部通讯管理后台 —— 轻量样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body, #app { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 14px;
  color: #2c3e50;
  background: #f0f2f5;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1f3a5f 0%, #2d5b8e 100%);
}
.login-card {
  width: 360px;
  background: #fff;
  border-radius: 10px;
  padding: 36px 32px 28px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25);
}
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: #8a97a5; font-size: 12px; margin-bottom: 24px; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #5a6b7d; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid #d4dce4;
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #2d6cdf; }
.field textarea { resize: vertical; min-height: 72px; }

.btn {
  display: inline-block;
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
  background: #e7ecf2;
  color: #2c3e50;
}
.btn:hover { filter: brightness(.96); }
.btn.primary { background: #2d6cdf; color: #fff; }
.btn.danger { background: #e5484d; color: #fff; }
.btn.small { padding: 4px 10px; font-size: 12px; border-radius: 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; padding: 11px; font-size: 15px; }

/* ---------- 布局 ---------- */
.layout { display: flex; height: 100%; }
.sidebar {
  width: 210px;
  background: #1f2d3d;
  color: #cfd8e3;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}
.sidebar .brand { padding: 20px 18px 14px; font-size: 16px; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar nav { flex: 1; padding: 10px 0; overflow-y: auto; }
.sidebar nav a {
  display: block;
  padding: 11px 20px;
  color: #cfd8e3;
  text-decoration: none;
  cursor: pointer;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); }
.sidebar nav a.active { background: #2d6cdf; color: #fff; }
.sidebar .foot { padding: 14px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; }
.sidebar .foot .btn { margin-top: 8px; width: 100%; }

.main { flex: 1; overflow-y: auto; padding: 22px 26px; }
.page-title { font-size: 18px; font-weight: 600; margin-bottom: 16px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=text], .toolbar select { padding: 8px 10px; border: 1px solid #d4dce4; border-radius: 6px; font-size: 13px; }

/* ---------- 卡片/表格 ---------- */
.card { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); margin-bottom: 16px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 10px; border-bottom: 1px solid #edf1f5; font-size: 13px; vertical-align: top; }
th { color: #7b8a99; font-weight: 600; background: #fafbfc; }
tr:hover td { background: #f8fafc; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.ellipsis { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.tag { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.green { background: #e3f6e8; color: #1c7c3c; }
.tag.red { background: #fde8e8; color: #c0353a; }
.tag.gray { background: #eef1f4; color: #7b8a99; }
.tag.blue { background: #e6effc; color: #2456b3; }

.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; color: #7b8a99; }

/* 统计卡片 */
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: #fff; border-radius: 8px; padding: 18px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.stat .num { font-size: 26px; font-weight: 700; color: #2d6cdf; }
.stat .lbl { color: #7b8a99; font-size: 12px; margin-top: 4px; }

/* ---------- 弹窗 / 提示 ---------- */
.mask { position: fixed; inset: 0; background: rgba(15,25,40,.45); display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 10px; width: 460px; max-width: 92vw; max-height: 86vh; overflow-y: auto; padding: 22px; }
.modal h3 { margin-bottom: 14px; font-size: 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

.toast {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  padding: 10px 20px; border-radius: 6px; color: #fff; z-index: 200;
  box-shadow: 0 4px 16px rgba(0,0,0,.2); font-size: 14px;
}
.toast.ok { background: #18a058; }
.toast.err { background: #d03050; }

.hint { font-size: 12px; color: #8a97a5; margin-top: 6px; }
.empty { text-align: center; color: #98a6b3; padding: 36px 0; }

/* 成员多选列表 */
.member-picker { max-height: 260px; overflow-y: auto; border: 1px solid #e3e9ef; border-radius: 6px; padding: 6px; }
.member-picker label { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px; cursor: pointer; }
.member-picker label:hover { background: #f4f7fa; }

.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.switch input { width: 16px; height: 16px; }
