/* 后台管理样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f0f2f5; color: #333; font-size: 14px; line-height: 1.6;
}
a { color: #1890ff; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }

.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4a90e2, #357abd);
}
.login-box {
  background: #fff; border-radius: 10px; padding: 40px 36px;
  width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.login-box h1 { text-align: center; margin-bottom: 28px; color: #357abd; font-size: 22px; }
.login-box label { display: block; margin-bottom: 6px; color: #555; }
.login-box input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid #d9d9d9;
  border-radius: 6px; margin-bottom: 16px; font-size: 14px;
}
.login-box input:focus { border-color: #4a90e2; outline: none; }
.login-box .btn-submit {
  width: 100%; height: 42px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: #fff; border: none; border-radius: 6px; font-size: 15px; font-weight: 600;
}
.login-box .hint { text-align: center; margin-top: 14px; color: #999; font-size: 12px; }
.login-box .captcha-row { display: flex; gap: 10px; margin-bottom: 16px; }
.login-box .captcha-row input { flex: 1; margin-bottom: 0; }
.login-box .captcha-img {
  height: 40px; width: 110px; border: 1px solid #d9d9d9; border-radius: 6px;
  cursor: pointer; background: #f5f5f5; flex-shrink: 0;
}
.login-box .login-err {
  margin-top: 10px; padding: 8px 12px; background: #fff2f0; border: 1px solid #ffccc7;
  border-radius: 4px; color: #ff4d4f; font-size: 13px;
}

.app-layout { min-height: 100vh; }
.app-header {
  background: #001529; color: #fff; height: 54px; display: flex;
  align-items: center; padding: 0 20px; position: sticky; top: 0; z-index: 50;
}
.app-header .logo { font-size: 16px; font-weight: 700; flex: 1; }
.app-header .user-area { display: flex; align-items: center; gap: 14px; font-size: 13px; color: rgba(255,255,255,0.75); }
.app-header .user-area a { color: rgba(255,255,255,0.75); }

.app-body { padding: 16px; max-width: 1400px; margin: 0 auto; }

.card { background: #fff; border-radius: 8px; box-shadow: 0 1px 2px rgba(0,0,0,0.05); margin-bottom: 16px; }
.card-header { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; justify-content: space-between; }
.card-header h3 { font-size: 16px; font-weight: 600; }
.card-body { padding: 16px; }

.btn { display: inline-block; padding: 6px 16px; border-radius: 4px; border: 1px solid #d9d9d9; background: #fff; color: #333; font-size: 13px; text-decoration: none; }
.btn:hover { border-color: #4a90e2; color: #4a90e2; }
.btn-primary { background: #4a90e2; border-color: #4a90e2; color: #fff; }
.btn-primary:hover { background: #357abd; border-color: #357abd; color: #fff; }
.btn-danger { color: #ff4d4f; border-color: #ff4d4f; }
.btn-danger:hover { background: #fff1f0; color: #ff4d4f; }
.btn-sm { padding: 3px 10px; font-size: 12px; }
.btn-link { border: none; background: none; color: #4a90e2; padding: 0; }
.btn-link:hover { text-decoration: underline; }

table.table { width: 100%; border-collapse: collapse; }
table.table th, table.table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; text-align: left; font-size: 13px; }
table.table th { background: #fafafa; font-weight: 600; color: #555; white-space: nowrap; }
table.table tr:hover td { background: #fafbfc; }

.search-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search-bar input { height: 34px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; min-width: 220px; }

.pagination { margin-top: 14px; display: flex; justify-content: flex-end; align-items: center; gap: 8px; font-size: 13px; color: #666; }
.pagination button { padding: 4px 10px; border: 1px solid #d9d9d9; background: #fff; border-radius: 4px; }
.pagination button:disabled { opacity: 0.5; cursor: not-allowed; }

.form-row { display: flex; gap: 14px; margin-bottom: 12px; flex-wrap: wrap; }
.form-item { flex: 1; min-width: 240px; display: flex; align-items: center; gap: 10px; }
.form-item label { width: 110px; text-align: right; color: #555; flex-shrink: 0; }
.form-item input, .form-item textarea, .form-item select { flex: 1; height: 34px; padding: 0 10px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 13px; }
.form-item textarea { height: auto; min-height: 64px; padding: 8px 10px; }
.form-item input:focus, .form-item textarea:focus { border-color: #4a90e2; outline: none; }

.sub-card { background: #f9fafb; border: 1px solid #e8eaed; border-radius: 6px; padding: 14px; margin-bottom: 12px; position: relative; }
.sub-card .sub-title { font-weight: 600; color: #357abd; margin-bottom: 10px; display: flex; justify-content: space-between; align-items: center; }

.qr-modal { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; }
.qr-box { background: #fff; padding: 24px 30px; border-radius: 10px; text-align: center; max-width: 90%; }
.qr-box img { width: 260px; height: 260px; }
.qr-box .qr-code-text { margin-top: 10px; color: #666; font-family: monospace; font-size: 13px; }
.qr-box .close-btn { display: block; margin: 16px auto 0; padding: 6px 24px; background: #4a90e2; color: #fff; border: none; border-radius: 4px; }

.tabs { display: flex; border-bottom: 1px solid #f0f0f0; margin-bottom: 16px; }
.tabs .tab { padding: 10px 18px; cursor: pointer; color: #666; border-bottom: 2px solid transparent; }
.tabs .tab.active { color: #4a90e2; border-bottom-color: #4a90e2; font-weight: 600; }

.msg-toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); background: #fff; border: 1px solid #4a90e2; color: #4a90e2; padding: 10px 24px; border-radius: 4px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 300; }
.msg-toast.error { border-color: #ff4d4f; color: #ff4d4f; }
.msg-toast.success { border-color: #52c41a; color: #52c41a; }

.link-btn { color: #4a90e2; cursor: pointer; text-decoration: underline; font-size: 13px; }
