* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #2f6bff;
  --primary-dark: #2456d6;
  --bg: #f3f5f9;
  --card: #fff;
  --text: #26303e;
  --muted: #8a94a6;
  --border: #e5e9f0;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(47, 107, 255, 0.08);
  --green: #1fad64;
  --orange: #f39c12;
  --red: #e3504a;
  --blue: #2f6bff;
}
body { font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; -webkit-font-smoothing: antialiased; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; outline: none; }

/* 首页 */
.home-wrap { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, #f0f4ff 0%, #eef2ff 50%, #fdf0ff 100%); }
.home-hero { text-align: center; margin-bottom: 28px; }
.home-logo { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 18px; background: linear-gradient(135deg, var(--primary), #8b5cf6); color: #fff; font-size: 34px; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(47, 107, 255, 0.3); }
.home-hero h1 { font-size: 26px; color: #1f2937; letter-spacing: 2px; }
.home-hero p { color: var(--muted); margin-top: 8px; font-size: 14px; }
.login-card { width: 420px; max-width: 94vw; background: var(--card); border-radius: 16px; padding: 28px 30px 22px; box-shadow: var(--shadow); }
.login-title { font-size: 18px; font-weight: 600; margin-bottom: 6px; }
.back-link { display: inline-block; font-size: 12px; color: var(--primary); margin-bottom: 14px; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
.ver-name { color: var(--primary); }
.version-tip { font-size: 12px; color: var(--green); margin-bottom: 14px; }
.version-select { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.version-item { border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; transition: all .15s ease; position: relative; }
.version-item .ver-icon { font-size: 26px; }
.version-item b { display: block; font-size: 15px; }
.version-item i { font-style: normal; font-size: 11px; color: var(--muted); }
.version-item.active { border-color: var(--primary); background: #f2f6ff; }
.ver-check { position: absolute; top: 8px; right: 8px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); }
.version-item.active .ver-check { border-color: var(--primary); background: var(--primary); box-shadow: inset 0 0 0 3px #f2f6ff; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--text); margin-bottom: 6px; font-weight: 500; }
.field input { width: 100%; padding: 11px 12px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; transition: border-color .15s; }
.field input:focus { border-color: var(--primary); }
.login-err { color: var(--red); font-size: 12px; min-height: 18px; margin-bottom: 6px; }
.btn-primary { background: var(--primary); color: #fff; border: none; border-radius: 8px; padding: 11px 20px; font-size: 15px; transition: background .15s; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; }
.login-foot { text-align: center; margin-top: 14px; font-size: 12px; color: var(--muted); }

/* 通用按钮 */
.btn { border: 1px solid var(--border); background: var(--card); color: var(--text); border-radius: 8px; padding: 8px 16px; font-size: 13px; transition: all .15s; }
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { padding: 8px 16px; }
.btn-danger { border-color: #fad4d2; color: var(--red); background: #fff; }
.btn-danger:hover { background: #fef2f2; border-color: var(--red); }
.btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.green { background: #e5f8ee; color: var(--green); }
.badge.orange { background: #fef3e2; color: var(--orange); }
.badge.red { background: #fdeceb; color: var(--red); }
.badge.blue { background: #eaf1ff; color: var(--blue); }
.badge.gray { background: #eef1f6; color: var(--muted); }

/* 通用表单弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); display: none; align-items: center; justify-content: center; z-index: 999; }
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 14px; width: 520px; max-width: 94vw; max-height: 90vh; overflow: auto; padding: 22px 24px; }
.modal h3 { font-size: 17px; margin-bottom: 18px; }
.modal-form .field label { margin-bottom: 4px; }
.modal-form input, .modal-form select { width: 100%; padding: 9px 11px; border: 1.5px solid var(--border); border-radius: 8px; font-size: 14px; }
.modal-form input:focus, .modal-form select:focus { border-color: var(--primary); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.form-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }

/* 通用空态 */
.empty { text-align: center; padding: 40px 0; color: var(--muted); }

/* 通用提示 */
.toast { position: fixed; left: 50%; top: 22px; transform: translateX(-50%) translateY(-60px); background: #26303e; color: #fff; padding: 10px 22px; border-radius: 8px; font-size: 13px; z-index: 1200; opacity: 0; transition: all .25s ease; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.success { background: var(--green); }
.toast.error { background: var(--red); }

/* 确认弹窗 */
.confirm-mask { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: center; justify-content: center; z-index: 1100; }
.confirm-mask.show { display: flex; }
.confirm-box { background: #fff; width: 320px; border-radius: 14px; padding: 24px; text-align: center; }
.confirm-box p { margin: 8px 0 20px; color: var(--text); }