* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f4f6fa; color: #1f2430; }
a { color: #3b82f6; cursor: pointer; }

/* 登录 */
.login-wrap { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1e293b, #0f172a); }
.login-card { width: 340px; background: #fff; border-radius: 14px; padding: 36px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.login-logo { font-size: 22px; font-weight: 700; text-align: center; }
.login-sub { text-align: center; color: #94a3b8; margin: 6px 0 22px; font-size: 13px; }
.login-card input { width: 100%; padding: 11px 12px; margin-bottom: 12px; border: 1px solid #e2e8f0; border-radius: 8px; font-size: 14px; }
.login-tip { margin-top: 14px; font-size: 12px; color: #94a3b8; text-align: center; }

/* 布局 */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 232px; background: #0f172a; color: #cbd5e1; display: flex; flex-direction: column; }
.brand { padding: 18px 18px 14px; font-size: 16px; font-weight: 700; color: #fff; border-bottom: 1px solid #1e293b; }
.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; color: #cbd5e1; text-align: left; border-radius: 8px; cursor: pointer; font-size: 14px; margin-bottom: 2px; }
.nav-item:hover { background: #1e293b; }
.nav-item.active { background: #2563eb; color: #fff; }
.nav-item .ico { font-size: 16px; }
.foot { padding: 14px 18px; font-size: 12px; color: #64748b; border-top: 1px solid #1e293b; }

.main { flex: 1; display: flex; flex-direction: column; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e8edf3; display: flex; align-items: center; justify-content: space-between; padding: 0 22px; }
.crumb { font-weight: 600; }
.ver { font-size: 12px; color: #94a3b8; }
.content { padding: 22px; overflow-y: auto; }

/* 概况卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin: 14px 0 26px; }
.card { background: #fff; border: 1px solid #e8edf3; border-radius: 12px; padding: 18px; text-align: center; }
.card .num { font-size: 26px; font-weight: 700; color: #2563eb; }
.card .lbl { font-size: 13px; color: #64748b; margin-top: 6px; }
.notices .notice { background: #fff; border: 1px solid #e8edf3; border-left: 3px solid #2563eb; border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; }
.notices .notice p { color: #475569; font-size: 13px; margin-top: 4px; }

/* 表格 */
.bar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.actions { display: flex; gap: 8px; }
.btn { padding: 8px 14px; border: 1px solid #d6deea; background: #fff; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn.primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.btn.block { width: 100%; padding: 11px; margin-top: 4px; font-size: 15px; }
.tablebox { background: #fff; border: 1px solid #e8edf3; border-radius: 12px; padding: 6px; overflow: auto; }
.grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.grid th, .grid td { padding: 10px 12px; border-bottom: 1px solid #f1f5f9; text-align: left; vertical-align: top; }
.grid th { color: #64748b; font-weight: 600; background: #f8fafc; }
.grid tr:hover { background: #f8fafc; }
.empty { padding: 40px; text-align: center; color: #94a3b8; }
.link { background: none; border: 0; color: #2563eb; cursor: pointer; margin-right: 10px; font-size: 13px; }
.link.danger { color: #ef4444; }

/* 表单 / 弹窗 */
.form { display: grid; gap: 12px; max-width: 560px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; color: #475569; }
.field input, .field textarea { padding: 9px 11px; border: 1px solid #d6deea; border-radius: 8px; font-size: 14px; font-family: inherit; }
.overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; z-index: 50; }
.modal { background: #fff; border-radius: 14px; padding: 24px; width: 620px; max-width: 92vw; box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.modal h3 { margin-bottom: 16px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.hint { color: #64748b; font-size: 13px; margin-bottom: 12px; line-height: 1.6; }
.fox-form { margin-bottom: 16px; }

/* 狐友扫码登录 */
.qr-box { display: flex; flex-direction: column; align-items: center; gap: 14px; background: #fff; border: 1px solid #e8edf3; border-radius: 14px; padding: 26px; margin: 6px 0 16px; max-width: 380px; box-shadow: 0 4px 16px rgba(15,23,42,.05); }
.qr-img { width: 220px; height: 220px; border: 1px solid #eef2f7; border-radius: 8px; image-rendering: pixelated; }
.qr-state { text-align: center; color: #475569; font-size: 14px; line-height: 1.7; }
.qr-state span { color: #94a3b8; font-size: 12px; }
.circle-row { max-width: 380px; margin-top: 6px; }
.circle-row .btn { align-self: flex-start; margin-top: 4px; }
.fox-manual { margin-top: 22px; border-top: 1px solid #e8edf3; padding-top: 14px; max-width: 600px; }
.fox-manual summary { cursor: pointer; color: #64748b; font-size: 13px; margin-bottom: 14px; }

/* toast */
.toast { position: fixed; top: 20px; right: 20px; padding: 12px 18px; border-radius: 10px; color: #fff; font-size: 14px; z-index: 100; box-shadow: 0 10px 30px rgba(0,0,0,.2); }
.toast.ok { background: #16a34a; }
.toast.err { background: #ef4444; }
