/* 企业退出管家 MVP —— 全局样式 */
:root {
  --primary: #1d4ed8;
  --primary-dark: #1e40af;
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --danger: #dc2626;
  --success: #16a34a;
  --warning: #d97706;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}
/* 顶部导航 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  background: #0f2a5c; color: #fff; padding: 12px 20px;
  position: sticky; top: 0; z-index: 10;
}
.topbar .brand { font-weight: 700; font-size: 17px; }
.topbar .brand small { font-weight: 400; opacity: .75; margin-left: 8px; font-size: 12px; }
.topbar .user { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.role-tag {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px; padding: 2px 10px; font-size: 12px;
}
.btn-logout {
  background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5);
  border-radius: 6px; padding: 4px 12px; cursor: pointer; font-size: 13px;
}
.btn-logout:hover { background: rgba(255,255,255,.15); }
.container { max-width: 1180px; margin: 20px auto; padding: 0 16px 40px; }
/* 统计卡 */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card {
  background: var(--card); border-radius: 12px; padding: 16px 18px;
  border: 1px solid var(--border); box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.stat-card .label { color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.stat-card .value { font-size: 30px; font-weight: 700; color: var(--primary); }
/* 面板 */
.panel {
  background: var(--card); border-radius: 12px; border: 1px solid var(--border);
  padding: 16px 18px; margin-bottom: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.panel h2 { margin: 0 0 12px; font-size: 16px; border-left: 4px solid var(--primary); padding-left: 10px; }
.panel h3 { margin: 14px 0 8px; font-size: 14px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }
/* 表格 */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-weight: 600; background: #f8fafc; white-space: nowrap; }
tr:hover td { background: #f8fafc; }
.empty { color: var(--muted); padding: 14px; text-align: center; font-size: 13px; }
/* 按钮 */
.btn {
  border: none; border-radius: 8px; padding: 8px 16px; cursor: pointer;
  font-size: 14px; background: var(--primary); color: #fff;
}
.btn:hover { background: var(--primary-dark); }
.btn.secondary { background: #e2e8f0; color: var(--text); }
.btn.secondary:hover { background: #cbd5e1; }
.btn.danger { background: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 12.5px; border-radius: 6px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
/* 输入 */
input, select, textarea {
  border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px;
  font-size: 14px; font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: 2px solid #bfdbfe; border-color: var(--primary); }
textarea { width: 100%; resize: vertical; }
/* 状态徽章 */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; background: #e0e7ff; color: #3730a3; white-space: nowrap;
}
.badge.warn { background: #fef3c7; color: #92400e; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.gray { background: #e2e8f0; color: #475569; }
/* 登录页 */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #0f2a5c, #1d4ed8); }
.login-card { background: #fff; border-radius: 14px; padding: 34px 38px; width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.login-card h1 { margin: 0 0 4px; font-size: 20px; }
.login-card p { color: var(--muted); font-size: 13px; margin: 0 0 20px; }
.login-card label { display: block; font-size: 13px; margin: 12px 0 6px; color: var(--muted); }
.login-card input { width: 100%; }
.login-card .btn { width: 100%; margin-top: 20px; padding: 10px; }
.err { color: var(--danger); font-size: 13px; margin-top: 10px; min-height: 18px; }
/* toast */
#toast {
  position: fixed; left: 50%; bottom: 30px; transform: translateX(-50%);
  background: #0f172a; color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 14px; display: none; z-index: 50; max-width: 80%;
}
#toast.err { background: #991b1b; }
#toast.show { display: block; animation: fadein .2s; }
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; align-items: center; justify-content: center; z-index: 40; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 12px; padding: 22px 24px; width: 460px; max-width: 92vw; max-height: 86vh; overflow: auto; }
.modal h3 { margin: 0 0 14px; font-size: 16px; }
.modal .fld { margin-bottom: 12px; }
.modal .fld label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.modal .fld input, .modal .fld select, .modal .fld textarea { width: 100%; }
.modal .actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }
/* 时间线 */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 8px 0 8px 18px; border-left: 2px solid var(--border); position: relative; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary); }
.timeline .time { color: var(--muted); font-size: 12px; }
/* 通知列表 */
.notif { padding: 10px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.notif.unread { font-weight: 600; }
.notif .time { color: var(--muted); font-size: 12px; margin-left: 8px; font-weight: 400; }
.sect-title { font-size: 20px; margin: 6px 0 16px; }
