:root{
  /* 与 v2-main 统一：暗色纯色、直角、无渐变/阴影 */
  --bg0:#0b1020;
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.08);
  --border:rgba(255,255,255,.14);
  --border2:rgba(255,255,255,.10);
  --text:rgba(255,255,255,.92);
  --muted:rgba(255,255,255,.72);
  --muted2:rgba(255,255,255,.58);
  --primary:#6d5efc;
  --primary2:#22d3ee;
  --ok:#22c55e;
  --warn:#fbbf24;
  --danger:#fb7185;
  --shadow:none;
  --shadow2:none;
  --radius:0px;
  --r2:0px;
  --r3:0px;
  --focus:none;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",system-ui,Arial,sans-serif;
  color:var(--text);
  background:var(--bg0);
}

.bh-wrap{max-width:1180px;margin:0 auto;padding:22px}
.bh-surface{
  background:transparent;
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
.bh-head{
  display:flex;align-items:center;justify-content:space-between;
  gap:12px;flex-wrap:wrap;
  padding:16px 18px;
  border-bottom:1px solid var(--border2);
}
.bh-brand{display:flex;align-items:center;gap:10px}
.bh-logo{
  width:40px;height:40px;border-radius:0;
  background:rgba(255,255,255,.10);
  box-shadow:none;
  display:flex;align-items:center;justify-content:center;
  color:#fff;font-weight:900;
}
.bh-title{display:flex;flex-direction:column;gap:2px}
.bh-title strong{font-size:15px}
.bh-title span{font-size:12px;color:var(--muted2);line-height:1.5}
.bh-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

.bh-layout{display:grid;grid-template-columns:270px 1fr;gap:14px;padding:14px}
@media(max-width:980px){.bh-layout{grid-template-columns:1fr}}

.bh-topbar{
  background:rgba(255,255,255,.06);
  border-radius:0;
  border:1px solid var(--border);
  box-shadow:none;
  padding:10px 14px 10px 16px;
  display:flex;
  gap:10px;
  align-items:center;
  backdrop-filter:none;
}
.bh-search-wrap{
  flex:1;
  display:flex;
  align-items:center;
  gap:8px;
  background:rgba(255,255,255,.06);
  border-radius:0;
  padding:6px 10px 6px 12px;
  border:1px solid var(--border2);
}
.bh-search-icon{font-size:13px;color:rgba(238,242,255,.78)}
.bh-search-input{
  flex:1;
  background:transparent;
  border:none;
  color:var(--text);
  font-size:13px;
  outline:none;
}
.bh-pill-group{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.bh-pill-btn span{font-size:13px}
.bh-chips{display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-width:0}
.bh-chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:2px 8px;
  border-radius:0;
  font-size:10px;
  border:1px solid var(--border2);
  background:rgba(255,255,255,.10);
  color:rgba(255,255,255,.92);
  max-width:240px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.bh-chip button{
  border:none;
  background:transparent;
  color:rgba(255,255,255,.78);
  cursor:pointer;
  font-size:12px;
  line-height:1;
  padding:0;
}
.bh-chip button:hover{color:#ffffff}

.bh-sidebar{
  border-radius:0;
  border:1px solid var(--border2);
  background:var(--card);
  box-shadow:none;
  padding:10px;
}
.bh-sidebar h3{
  font-size:11px;color:var(--muted2);
  letter-spacing:.14em;text-transform:uppercase;
  margin:8px 10px;
}
.bh-navbtn{
  width:100%;
  display:flex;align-items:center;justify-content:space-between;
  border:none;background:transparent;
  padding:10px 10px;border-radius:0;
  cursor:pointer;
  color:var(--muted);
  font-size:13px;font-weight:750;
}
.bh-navbtn .l{display:flex;align-items:center;gap:10px}
.bh-navbtn:hover{background:rgba(255,255,255,.08);color:var(--text)}
.bh-navbtn.active{
  color:rgba(255,255,255,.92);
  background:rgba(255,255,255,.10);
  border:1px solid rgba(255,255,255,.14);
  box-shadow:none;
}

.bh-panel{
  border-radius:0;
  border:1px solid var(--border2);
  background:var(--card);
  box-shadow:none;
  padding:14px;
}
.bh-panel h2{font-size:15px;margin-bottom:6px}
.bh-panel p{font-size:12px;color:var(--muted2);margin-bottom:14px;line-height:1.75}

.bh-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
@media(max-width:720px){.bh-grid{grid-template-columns:1fr}}

.bh-field{display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.bh-label{font-size:12px;color:var(--muted)}
.bh-hint{font-size:11px;color:var(--muted2);line-height:1.6}

.bh-input,.bh-select,.bh-textarea{
  width:100%;
  border-radius:0;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  padding:10px 12px;
  font-size:13px;
  outline:none;
  box-shadow:none;
}
.bh-input::placeholder,.bh-textarea::placeholder{color:rgba(238,242,255,.40)}
.bh-textarea{min-height:92px;resize:vertical}
.bh-input:focus,.bh-select:focus,.bh-textarea:focus{box-shadow:none;border-color:rgba(34,211,238,.55)}

.bh-inputwrap{
  display:flex;align-items:center;gap:10px;
  border-radius:0;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  padding:0 12px;
}
.bh-inputwrap:focus-within{box-shadow:none;border-color:rgba(34,211,238,.55)}
.bh-inputwrap .bh-input{border:none;background:transparent;box-shadow:none;padding:10px 0}

.bh-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}

.bh-btn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:9px 14px;border-radius:0;
  border:1px solid var(--border2);
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.92);
  text-decoration:none;
  font-weight:850;
  font-size:13px;
  cursor:pointer;
  box-shadow:none;
}
.bh-btn:hover{transform:none;box-shadow:none;border-color:rgba(34,211,238,.30);background:rgba(34,211,238,.10)}
.bh-btn:disabled{opacity:.55;cursor:not-allowed;transform:none}
.bh-btn-primary{
  border:none;
  color:#fff;
  background:var(--primary);
  box-shadow:none;
}
.bh-btn-danger{
  border:none;color:#fff;
  background:var(--danger);
}
.bh-btn-ghost{
  border-radius:0;
  border:1px solid var(--border2);
  padding:7px 13px;
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.86);
}
.bh-btn-ghost:hover{
  border-color:rgba(255,255,255,.22);
  background:rgba(255,255,255,.10);
  color:#ffffff;
}
.bh-btn-mini{
  border-radius:0;
  border:1px solid rgba(255,255,255,.14);
  padding:6px 10px;
  background:rgba(255,255,255,.10);
  color:rgba(255,255,255,.92);
  cursor:pointer;
  font-size:11px;
  display:inline-flex;
  gap:6px;
  align-items:center;
}
.bh-btn-mini:hover{
  border-color:rgba(34,211,238,.35);
  filter:brightness(1.06);
}
.bh-btn-mini:disabled{opacity:.6;cursor:not-allowed}
.bh-btn-chip{
  border-radius:0;
  border:1px solid rgba(255,255,255,.14);
  padding:1px 6px;
  font-size:9px;
  line-height:1.35;
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.84);
  cursor:pointer;
}
.bh-btn-chip:hover{
  border-color:rgba(34,211,238,.35);
  background:rgba(34,211,238,.10);
  color:#ffffff;
}
.bh-select-mini{
  border-radius:0;
  border:1px solid var(--border2);
  padding:6px 10px;
  background:rgba(255,255,255,.06);
  color:rgba(255,255,255,.86);
  font-size:11px;
  outline:none;
  cursor:pointer;
}
.bh-inline-muted{color:var(--muted2);font-size:11px}
.bh-hidden{display:none}
.bh-spacer-10{height:10px}
.bh-spacer-12{height:12px}
.bh-section-title{
  font-size:13px;
  margin-bottom:8px;
}

.bh-stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:10px;margin-top:10px}
.bh-stat{
  border-radius:0;border:1px solid var(--border2);
  padding:12px;
  background:rgba(255,255,255,.06);
}
.bh-stat .k{font-size:11px;color:var(--muted2);margin-bottom:4px}
.bh-stat .v{font-size:18px;font-weight:950}
.bh-v-ok{color:var(--ok)}
.bh-v-warn{color:var(--warn)}
.bh-v-err{color:var(--danger)}

.bh-pill{
  display:inline-flex;align-items:center;gap:8px;
  border:1px solid var(--border2);
  background:rgba(255,255,255,.06);
  border-radius:0;
  padding:7px 10px;
  font-size:12px;color:var(--muted);
}
.bh-pill-btn{
  border-radius:0;
  border:1px solid var(--border2);
  padding:6px 11px;
  font-size:11px;
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
}
.bh-pill-btn:hover{
  border-color:rgba(34,211,238,.30);
  background:rgba(34,211,238,.10);
  color:#ffffff;
}
.bh-pill-btn.active{
  border-color:rgba(109,94,252,.30);
  color:#ffffff;
  background:rgba(255,255,255,.14);
}
.bh-badge{
  display:inline-flex;align-items:center;gap:6px;
  border-radius:0;
  padding:2px 8px;
  font-size:11px;font-weight:900;
  border:1px solid var(--border2);
  background:rgba(255,255,255,.06);
}
.bh-badge.ok{color:var(--ok);border-color:rgba(34,197,94,.30);background:rgba(34,197,94,.10)}
.bh-badge.warn{color:var(--warn);border-color:rgba(251,191,36,.30);background:rgba(251,191,36,.10)}
.bh-badge.err{color:var(--danger);border-color:rgba(251,113,133,.30);background:rgba(251,113,133,.10)}

.bh-toast{
  position:fixed;right:18px;bottom:18px;
  padding:10px 13px;border-radius:0;
  font-size:12px;font-weight:800;
  background:rgba(255,255,255,.08);
  border:1px solid var(--border2);
  color:rgba(255,255,255,.92);
  box-shadow:none;
  display:none;z-index:50;
}
.bh-toast.show{display:block}
.bh-toast.ok{border-color:rgba(34,197,94,.30);color:rgba(255,255,255,.92)}
.bh-toast.err{border-color:rgba(251,113,133,.30);color:rgba(255,255,255,.92)}
.bh-banner{
  border-radius:0;
  border:1px solid rgba(251,191,36,.22);
  background:rgba(255,255,255,.06);
  box-shadow:none;
  padding:12px 14px;
  display:none;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.bh-banner.show{display:flex}
.bh-banner-title{font-size:13px;font-weight:750}
.bh-banner-subtitle{font-size:12px;color:rgba(255,255,255,.76);margin-top:2px;line-height:1.6}
.bh-banner-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.bh-btn-warn{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  padding:9px 14px;border-radius:0;
  border:1px solid rgba(251,191,36,.35);
  background:rgba(251,191,36,.14);
  color:#fff7ed;text-decoration:none;font-weight:750;font-size:13px;cursor:pointer;
}
.bh-btn-warn:hover{border-color:rgba(251,191,36,.72);color:#ffffff}
.bh-toolbar-inline{
  display:none;
  margin-top:8px;
  padding-top:8px;
  border-top:1px solid rgba(255,255,255,.10);
  gap:8px;
  align-items:center;
  flex-wrap:wrap;
}
.bh-toolbar-inline.show{display:flex}
.bh-toolbar-inline .bh-inline-muted{font-size:11px}
.bh-pager{
  display:none;
  flex-shrink:0;
  align-items:center;
  justify-content:center;
  gap:10px;
  padding:4px 0 2px;
  border-top:1px solid rgba(255,255,255,.10);
  margin-top:2px;
}
.bh-pager-inner{
  display:flex;
  align-items:center;
  gap:10px;
  flex-wrap:wrap;
  justify-content:center;
}
.bh-pager-info{
  font-size:11px;
  color:var(--muted2);
  min-width:7em;
  text-align:center;
}
.bh-pager-btn:disabled{opacity:.45;cursor:not-allowed}

.ico{
  width:16px;height:16px;
  display:inline-block;
  vertical-align:-3px;
  stroke:currentColor;
  fill:none;
  stroke-width:2;
  stroke-linecap:round;
  stroke-linejoin:round;
  opacity:.95;
}
.ico.muted{opacity:.65}

/* Auth pages */
.bh-auth{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}

.bh-modal-backdrop{
  position:fixed;
  inset:0;
  background:rgba(2,6,23,.52);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:40;
  backdrop-filter:none;
}
.bh-modal-backdrop.show{display:flex}
.bh-modal{
  max-width:560px;
  width:100%;
  background:rgba(15,23,51,.78);
  border-radius:0;
  border:1px solid rgba(255,255,255,.14);
  box-shadow:none;
  padding:16px 18px 14px;
  color:rgba(255,255,255,.92);
  backdrop-filter:none;
}
.bh-modal-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:8px;
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,.10);
  margin-bottom:10px;
}
.bh-modal-title{font-size:14px;font-weight:600}
.bh-modal-close{
  border:none;
  background:transparent;
  color:rgba(255,255,255,.75);
  cursor:pointer;
  font-size:20px;
  line-height:1;
}
.bh-modal-body{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding-top:4px;
}
.bh-modal-footer{
  display:flex;
  justify-content:flex-end;
  gap:8px;
  margin-top:10px;
  font-size:12px;
}
.bh-field-compact{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.bh-field-compact label,
.bh-field-compact .bh-field-label{
  font-size:11px;
  color:var(--muted);
}
.bh-field-compact .bh-input,
.bh-field-compact .bh-select,
.bh-field-compact .bh-textarea{
  padding:8px 10px;
  font-size:12px;
}
.bh-field-compact .bh-textarea{
  min-height:60px;
  max-height:180px;
}
.bh-authcard{
  width:min(520px, 92vw);
  border-radius:0;
  border:1px solid var(--border2);
  background:rgba(255,255,255,.06);
  box-shadow:var(--shadow);
  padding:18px;
}
.bh-authhead{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.bh-authhead .bh-logo{width:44px;height:44px;border-radius:0}
.bh-authtitle{display:flex;flex-direction:column;gap:2px}
.bh-authtitle strong{font-size:16px}
.bh-authtitle span{font-size:12px;color:var(--muted2);line-height:1.6}
.bh-authfoot{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:10px}
.bh-link{color:rgba(34,211,238,.92);text-decoration:none;font-weight:800}
.bh-link:hover{text-decoration:underline}

/* OAuth / 回调结果页（v2-login_result、v2-bind_result） */
.bh-result-card{text-align:center;padding:26px 22px}
.bh-result-title{
  font-size:20px;font-weight:900;margin-bottom:14px;color:var(--text);
}
.bh-result-ico{font-size:44px;line-height:1;margin-bottom:10px}
.bh-result-ico--ok{color:var(--ok)}
.bh-result-ico--err{color:var(--danger)}
.bh-result-msg{
  color:var(--muted);font-size:14px;line-height:1.7;margin:12px 0 18px;
}
.bh-result-actions{margin-top:12px;display:none}
.bh-result-actions.is-visible{display:block}
.bh-result-actions .bh-btn-primary{display:inline-block;text-decoration:none}
.bh-result-hint{color:var(--muted2);font-size:12px;margin-top:8px}
