/* 熊猫IM 钱包后台 —— 样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #eef2fb;
  color: #1f2937;
  -webkit-font-smoothing: antialiased;
}
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

/* ── 登录页 ── */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2fb 0%, #dfe7f8 100%);
}
.login-card {
  width: 360px; background: #fff; border-radius: 16px; padding: 40px 36px 32px;
  box-shadow: 0 16px 48px rgba(27, 95, 224, 0.14);
}
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 14px;
  display: block; object-fit: contain;
}
.login-card h1 { font-size: 20px; text-align: center; margin-bottom: 4px; }
.login-card .sub { font-size: 13px; color: #8a93a4; text-align: center; margin-bottom: 24px; }

/* ── 通用 ── */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #5b6472; margin-bottom: 6px; }
.field input {
  width: 100%; height: 42px; padding: 0 12px; font-size: 14px;
  border: 1px solid #d4dae6; border-radius: 8px; outline: none;
}
.field input:focus { border-color: #1B5FE0; }
.btn {
  width: 100%; height: 44px; border: none; border-radius: 8px;
  background: #1B5FE0; color: #fff; font-size: 15px; font-weight: 600;
}
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn.sm { width: auto; height: 36px; padding: 0 18px; font-size: 14px; }
.btn.gray { background: #6b7280; }
.btn.danger { background: #dc2626; }
.err { color: #dc2626; font-size: 13px; margin-top: 8px; min-height: 18px; }

/* ── 主框架 ── */
.topbar {
  height: 56px; background: #fff; display: flex; align-items: center;
  padding: 0 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.topbar-logo {
  width: 32px; height: 32px; border-radius: 7px; margin-right: 10px;
  object-fit: contain;
}
.topbar .brand { font-size: 16px; font-weight: 700; color: #1B5FE0; margin-right: 28px; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: #5b6472; margin-right: 14px; }
.topbar .tabs { display: flex; gap: 4px; }
.topbar .tabs a {
  display: inline-block; padding: 6px 16px; font-size: 14px; color: #5b6472;
  cursor: pointer; border-radius: 6px;
}
.topbar .tabs a:hover { background: #f1f4fa; }
.topbar .tabs a.active { background: #1B5FE0; color: #fff; font-weight: 600; }
.logout {
  background: none; border: 1px solid #d4dae6; border-radius: 6px;
  padding: 6px 14px; font-size: 13px; color: #5b6472;
}
.main { max-width: 1080px; margin: 28px auto; padding: 0 20px; }

.panel {
  background: #fff; border-radius: 12px; padding: 22px 24px; margin-bottom: 20px;
  box-shadow: 0 4px 16px rgba(27,95,224,.06);
}
.panel h2 { font-size: 15px; margin-bottom: 16px; display: flex; align-items: center; gap: 8px; }
.panel h2 .spacer { flex: 1; }
.panel h3 { font-size: 13px; color: #5b6472; margin-bottom: 10px; }

/* IP 卡 */
.ip-box { background: #f6f8fc; border-radius: 8px; padding: 14px 16px; margin-bottom: 8px; }
.ip-main { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ip-main .dot { width: 8px; height: 8px; border-radius: 50%; }
.ip-main .dot.on { background: #16a34a; box-shadow: 0 0 0 3px rgba(22,163,74,.18); }
.ip-main .dot.off { background: #c9ced8; }
.ip-state { font-size: 13px; color: #5b6472; }
.ip-flag {
  background: #dbeafe; color: #1d4ed8; padding: 1px 8px; border-radius: 10px;
  font-size: 11px;
}
.ip-addr {
  font-size: 22px; font-weight: 700; color: #1B5FE0;
  font-family: Consolas, monospace; letter-spacing: 1px;
}
code {
  font-family: Consolas, monospace; background: #f1f4fa; padding: 1px 6px;
  border-radius: 4px; font-size: 12px;
}

/* 搜索行 */
.search-row { display: flex; gap: 10px; }
.search-row input {
  flex: 1; height: 42px; padding: 0 12px; font-size: 14px;
  border: 1px solid #d4dae6; border-radius: 8px; outline: none;
}
.search-row input:focus { border-color: #1B5FE0; }

/* 搜索结果下拉 */
.search-results {
  margin-top: 10px; border: 1px solid #d4dae6; border-radius: 8px;
  max-height: 360px; overflow-y: auto; background: #fff;
}
.search-results-title {
  padding: 8px 14px; font-size: 12px; color: #5b6472;
  background: #f6f8fc; border-bottom: 1px solid #ecedf1;
}
.search-result-item {
  padding: 10px 14px; border-bottom: 1px solid #f4f5f8; cursor: pointer;
  transition: background 0.12s;
}
.search-result-item:last-child { border-bottom: 0; }
.search-result-item:hover { background: #eef3fd; }
.sr-main {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 14px;
}
.sr-nick { font-weight: 600; color: #1f2937; }
.sr-uid {
  font-family: Consolas, monospace; font-size: 12px; color: #1B5FE0;
  background: #eef3fd; padding: 1px 8px; border-radius: 4px;
}
.sr-sub { font-size: 12px; color: #8a93a4; margin-top: 4px; }

/* 账户卡 */
.acct-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; margin-bottom: 4px; }
.acct-item { background: #f6f8fc; border-radius: 8px; padding: 14px 16px; }
.acct-item .k { font-size: 12px; color: #8a93a4; margin-bottom: 6px; }
.acct-item .v { font-size: 18px; font-weight: 700; }
.acct-item .v.money { color: #1B5FE0; }
.acct-meta { font-size: 12px; color: #8a93a4; margin-top: 10px; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge.ok { background: #dcfce7; color: #16a34a; }
.badge.frozen { background: #fef3c7; color: #b45309; }
.badge.gray { background: #f1f4fa; color: #5b6472; }

/* 调整表单 */
.adjust-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.adjust-row .field { margin-bottom: 0; }
.seg { display: flex; border: 1px solid #d4dae6; border-radius: 8px; overflow: hidden; }
.seg button {
  border: none; background: #fff; padding: 0 18px; height: 42px; font-size: 14px; color: #5b6472;
}
.seg button.active-add { background: #16a34a; color: #fff; }
.seg button.active-sub { background: #dc2626; color: #fff; }

/* 流水表 */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid #eef0f4; }
th { color: #8a93a4; font-weight: 600; }
td.add { color: #16a34a; font-weight: 600; }
td.sub { color: #dc2626; font-weight: 600; }
.empty { text-align: center; color: #aab2c0; padding: 28px 0; }
.pager { display: flex; gap: 8px; align-items: center; margin-top: 14px; font-size: 13px; }
.pager button {
  border: 1px solid #d4dae6; background: #fff; border-radius: 6px;
  padding: 5px 12px; font-size: 13px;
}
.pager button:disabled { opacity: .4; cursor: not-allowed; }

.toast {
  position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
  background: #1f2937; color: #fff; padding: 10px 22px; border-radius: 8px;
  font-size: 14px; z-index: 99; box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.toast.ok { background: #16a34a; }
.toast.err { background: #dc2626; }
