@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700&display=swap");

:root {
  /* 墨玉深底 · 翠绿品牌 · 琥珀点缀（大屏毛玻璃） */
  --bg-deep: #070b09;
  --bg-mid: #0e1512;
  --bg-elevated: #141e19;
  --bg-panel: rgba(16, 26, 21, 0.62);
  --bg-glass: rgba(12, 20, 16, 0.52);
  --bg-glass-strong: rgba(14, 24, 19, 0.72);
  --line: rgba(154, 240, 196, 0.12);
  --line-strong: rgba(62, 207, 142, 0.42);
  --brand: #3ecf8e;
  --brand-deep: #249a64;
  --brand-soft: rgba(62, 207, 142, 0.12);
  --brand-text: #a8f5d0;
  --accent: #f0b429;
  --accent-soft: rgba(240, 180, 41, 0.14);
  --ok: #5ee4a0;
  --ok-soft: rgba(94, 228, 160, 0.12);
  --danger: #ff6b7a;
  --text: #eef6f1;
  --text-muted: #9bb0a4;
  --text-dim: #6a7f74;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font: "Noto Sans SC", "Manrope", "Segoe UI", "Microsoft YaHei", sans-serif;
  --font-display: "Manrope", "Noto Sans SC", "Segoe UI Semibold", sans-serif;
  --blur: blur(18px) saturate(1.25);
  --blur-sm: blur(12px) saturate(1.15);
  --shine-top: inset 0 1px 0 rgba(168, 245, 208, 0.1);
  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.35), var(--shine-top);
  /* 角部柔光：品牌色径向，禁止死白块 */
  --glow-br:
    radial-gradient(ellipse 85% 75% at 100% 100%, rgba(62, 207, 142, 0.16) 0%, transparent 58%),
    radial-gradient(ellipse 55% 50% at 92% 88%, rgba(240, 180, 41, 0.07) 0%, transparent 52%);
  --glow-br-accent:
    radial-gradient(ellipse 85% 75% at 100% 100%, rgba(240, 180, 41, 0.14) 0%, transparent 58%),
    radial-gradient(ellipse 50% 45% at 90% 90%, rgba(62, 207, 142, 0.08) 0%, transparent 50%);
  --glass-fill:
    linear-gradient(155deg, rgba(28, 48, 38, 0.55) 0%, rgba(10, 16, 13, 0.42) 48%, rgba(14, 22, 18, 0.58) 100%);
  --grid-glow:
    radial-gradient(ellipse 65% 42% at 10% -6%, rgba(62, 207, 142, 0.14), transparent 58%),
    radial-gradient(ellipse 50% 38% at 94% 2%, rgba(240, 180, 41, 0.09), transparent 52%),
    radial-gradient(ellipse 40% 30% at 70% 100%, rgba(62, 207, 142, 0.05), transparent 60%),
    linear-gradient(180deg, #0c1410 0%, #070b09 100%);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%;
  font-family: var(--font); background: var(--bg-deep); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-text); text-decoration: none; }

/* 登录 · 双栏品牌首屏（对齐 login-prototype） */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  background: var(--grid-glow);
}
.login-visual {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  border-right: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 10% -10% auto 20%;
  height: 60%;
  background:
    repeating-linear-gradient(90deg, rgba(62, 207, 142, 0.12) 0 2px, transparent 2px 28px),
    repeating-linear-gradient(0deg, rgba(62, 207, 142, 0.08) 0 2px, transparent 2px 28px);
  transform: perspective(400px) rotateX(55deg);
  mask-image: linear-gradient(180deg, #000, transparent);
  pointer-events: none;
}
.login-visual .brand-mark {
  width: 72px; height: 72px; font-size: 16px; margin-bottom: 18px; position: relative;
  border-radius: 18px;
}
.login-visual .brand-mark.is-img {
  width: 96px; height: 96px; border-radius: 22px;
}
.login-visual h1 {
  position: relative;
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 2.2rem;
  letter-spacing: 0.08em;
  color: var(--text);
}
.login-visual p {
  position: relative;
  margin: 0;
  color: var(--text-muted);
  max-width: 32ch;
  line-height: 1.6;
  font-size: 14px;
}
.login-box {
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.login-card {
  width: min(400px, 100%);
  margin: 0 auto;
  background: var(--glass-fill), var(--bg-glass-strong);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px 24px;
  box-shadow: var(--shadow-glass), 0 24px 64px rgba(0, 0, 0, 0.45);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  position: relative;
  overflow: hidden;
}
.login-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow-br);
  pointer-events: none;
  opacity: 0.9;
}
.login-card > * { position: relative; z-index: 1; }
.login-card h2 {
  margin: 0;
  text-align: center;
  font-family: var(--font-display);
  color: var(--brand-text);
  font-size: 1.35rem;
}
.login-card .sub { text-align: center; color: var(--text-muted); margin: 6px 0 20px; font-size: 13px; }
@media (max-width: 800px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-box { padding: 28px 20px; }
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--text-muted); }
.field input, .field select, .field textarea {
  background: rgba(8, 14, 11, 0.55);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  outline: none;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(62, 207, 142, 0.12);
}
.err { color: var(--danger); font-size: 13px; min-height: 1.2em; margin-bottom: 8px; }

.shell {
  display: grid;
  grid-template-columns: 232px 1fr;
  min-height: 100vh;
}
.side {
  background:
    linear-gradient(180deg, rgba(10, 18, 14, 0.88) 0%, rgba(7, 12, 10, 0.92) 100%),
    var(--bg-deep);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: inset -1px 0 0 rgba(62, 207, 142, 0.06);
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 6px 10px; border-bottom: 1px solid var(--line); }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 13px; color: #04120c;
  background: linear-gradient(135deg, var(--brand), #9af0c4 48%, var(--accent));
  box-shadow: 0 0 20px rgba(62, 207, 142, 0.32), 0 0 40px rgba(240, 180, 41, 0.1);
  overflow: hidden; padding: 0; flex-shrink: 0;
}
.brand-mark img,
img.brand-mark {
  width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit;
}
.brand-mark.is-img {
  background: #f0b429;
  box-shadow: 0 0 18px rgba(240, 180, 41, 0.35), 0 0 28px rgba(62, 207, 142, 0.12);
}
.brand strong { display: block; font-family: var(--font-display); font-size: 16px; letter-spacing: 0.04em; }
.brand span { font-size: 11px; color: var(--text-muted); }
.nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow: auto; }
.nav-sec { font-size: 11px; color: var(--text-dim); padding: 10px 12px 4px; letter-spacing: .06em; }
.nav button {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  border: 0; background: transparent; color: var(--text-muted);
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.nav button:hover { background: rgba(62, 207, 142, 0.06); color: var(--text); }
.nav button:active {
  background: rgba(62, 207, 142, 0.1);
  opacity: 0.85;
}
.nav button.active {
  background: linear-gradient(90deg, rgba(62, 207, 142, 0.2), rgba(62, 207, 142, 0.04));
  color: var(--brand-text);
  box-shadow: inset 3px 0 0 var(--brand), inset 0 1px 0 rgba(168, 245, 208, 0.06);
}
.nav .ico {
  width: 22px; height: 22px; text-align: center; opacity: 0.72; flex-shrink: 0; line-height: 22px;
  border-radius: 7px; display: inline-grid; place-items: center;
  transition: background 0.15s, opacity 0.15s, box-shadow 0.15s, transform 0.15s;
}
.nav button:hover .ico { opacity: 0.95; background: rgba(255, 255, 255, 0.06); }
.nav button.active .ico {
  opacity: 1;
  background: rgba(62, 207, 142, 0.18);
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.28), 0 0 14px rgba(62, 207, 142, 0.22);
}
.nav button:active .ico {
  opacity: 0.55;
  transform: scale(0.92);
  background: rgba(255, 255, 255, 0.04);
}
.side-foot { font-size: 11px; color: var(--text-dim); padding: 8px; }
.main {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--grid-glow);
}
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
  background: rgba(8, 14, 11, 0.55);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shine-top);
  position: sticky; top: 0; z-index: 5;
}
.topbar h2 { margin: 0; font-size: 1.05rem; font-family: var(--font-display); }
.meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 4px 10px; border-radius: var(--radius-pill);
  background: rgba(12, 20, 16, 0.45); border: 1px solid var(--line); color: var(--text-muted);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}
.chip.ok { color: var(--ok); border-color: rgba(111,223,160,.35); background: var(--ok-soft); }
.chip.warn { color: var(--accent); border-color: rgba(240,180,41,.35); background: var(--accent-soft); }
.content {
  padding: 16px 18px 22px; overflow: auto; flex: 1;
  display: flex; flex-direction: column; min-height: 0;
}
.content > .sim-page-fill,
.content > .pool-dash,
.content > .data-dash,
.content > .sim-panel-pool {
  flex: 1;
  min-height: 0;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.kpi-row.kpi-row-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi-row.kpi-row-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kpi {
  position: relative;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass-fill), var(--bg-glass);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  overflow: hidden;
  box-shadow: var(--shadow-glass);
}
/* 右下角柔和边光（墨绿/琥珀），取代死白块 */
.kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow-br);
  pointer-events: none;
  z-index: 0;
}
.kpi > * { position: relative; z-index: 1; }
.kpi-compact .kpi { padding: 8px 10px; min-height: 0; }
.kpi-compact .kpi::after { opacity: 0.45; }
.kpi-compact .kpi .label { font-size: 10px; }
.kpi-compact .kpi .value { font-size: 1.15rem; margin-top: 2px; }
.kpi-compact .kpi .hint { display: none; }
.kpi .label { font-size: 12px; color: var(--text-muted); letter-spacing: 0.02em; }
.kpi .value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text);
  text-shadow: 0 0 24px rgba(62, 207, 142, 0.12);
}
.kpi .hint { margin-top: 4px; font-size: 11px; color: var(--text-dim); }
.kpi.gold .value { color: var(--accent); text-shadow: 0 0 20px rgba(240, 180, 41, 0.2); }
.kpi.gold::after { background: var(--glow-br-accent); }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.toolbar .spacer { flex: 1; }
.btn {
  min-height: 34px;
  border: 1px solid var(--line);
  background: rgba(16, 26, 21, 0.55);
  color: var(--text);
  border-radius: 9px; padding: 0 12px; cursor: pointer;
  font-size: 13px;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  transition: border-color 0.15s, background 0.15s, transform 0.12s, box-shadow 0.15s;
}
.btn:hover {
  border-color: rgba(62, 207, 142, 0.45);
  background: rgba(62, 207, 142, 0.1);
  box-shadow: 0 0 16px rgba(62, 207, 142, 0.08);
}
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(120deg, var(--brand), var(--brand-deep));
  color: #041018; border-color: transparent; font-weight: 700;
  box-shadow: 0 4px 18px rgba(62, 207, 142, 0.28);
}
.btn.accent {
  border-color: rgba(240, 180, 41, 0.45);
  background: rgba(240, 180, 41, 0.12);
  color: #ffd27a; font-weight: 600;
}
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: rgba(255,107,122,.35); background: rgba(255,77,109,.08); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.table-wrap {
  overflow: auto; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--glass-fill), rgba(8, 14, 11, 0.4);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--shine-top);
  max-height: calc(100vh - 210px);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
th {
  position: sticky; top: 0;
  background: rgba(16, 28, 22, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: var(--text-muted); font-weight: 600; z-index: 1;
  box-shadow: inset 0 -1px 0 var(--line);
}
tr:hover td { background: rgba(62, 207, 142, 0.05); }
.muted { color: var(--text-muted); }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; background: rgba(62,207,142,.12); color: var(--brand-text); }
.tag.warn { background: rgba(240,180,41,.16); color: var(--accent); }
.tag.danger { background: rgba(255,107,122,.14); color: var(--danger); }

/* 卡池格点：对齐原型 .sim-pool — 等分列 + 固定行高，空位/绑定/亮灯同一 box */
.pool-grid {
  --pool-label: 36px;
  --pool-cell: 40px;
  --pool-head: 22px;
  display: grid;
  grid-template-columns: var(--pool-label) repeat(8, minmax(0, 1fr));
  grid-template-rows: var(--pool-head);
  grid-auto-rows: var(--pool-cell);
  gap: 3px;
  align-items: stretch;
  justify-items: stretch;
  font-size: 10px;
  width: 100%;
  box-sizing: border-box;
}
/* SIM1–SIM8：无外边框，仅文字标签（对齐原型 .sim-pool-col） */
.pool-head {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  color: var(--brand-text);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  font-size: 11px;
}
.pool-rowlab {
  border: none;
  background: transparent;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-family: var(--font-display);
  font-size: 11px;
}
.pool-cell {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: rgba(12, 20, 16, 0.45);
  color: var(--text);
  cursor: pointer;
  padding: 0 2px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s, opacity 0.15s;
}
/* 空位：仅改边框样式/透明度，不撑开尺寸（虚线画在 box 内） */
.pool-cell.empty {
  opacity: 0.45;
  border-style: dashed;
  cursor: default;
  pointer-events: none;
}
.pool-cell.bound {
  background: linear-gradient(160deg, rgba(62, 207, 142, 0.18), rgba(62, 207, 142, 0.05));
  border-color: rgba(62, 207, 142, 0.45);
  color: var(--brand-text);
  opacity: 1;
}
.pool-cell.bound:hover {
  transform: translateY(-1px);
  border-color: rgba(62, 207, 142, 0.65);
}
/* 正在使用：整格绿色闪烁（无红点）；外发光不参与布局 */
.pool-cell.lit {
  border-style: solid;
  border-color: rgba(62, 207, 142, 0.9);
  background: linear-gradient(160deg, rgba(62, 207, 142, 0.42), rgba(62, 207, 142, 0.14));
  box-shadow: 0 0 0 1px rgba(62, 207, 142, 0.35), 0 0 12px rgba(62, 207, 142, 0.28);
  color: var(--text);
  font-weight: 700;
  animation: pool-cell-green-blink 1s ease-in-out infinite;
}
@keyframes pool-cell-green-blink {
  0%, 100% {
    background: linear-gradient(160deg, rgba(62, 207, 142, 0.48), rgba(62, 207, 142, 0.16));
    box-shadow: 0 0 12px rgba(62, 207, 142, 0.35);
  }
  50% {
    background: linear-gradient(160deg, rgba(62, 207, 142, 0.18), rgba(62, 207, 142, 0.06));
    box-shadow: 0 0 2px rgba(62, 207, 142, 0.12);
  }
}
.pool-cell.maint { opacity: .4; }
.pool-cell.selected { box-shadow: 0 0 0 2px var(--accent); }
.pool-cell-label {
  display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; line-height: 1.1; font-size: 9px; letter-spacing: -0.02em;
  font-weight: 700; font-family: var(--font-display);
}
.pool-label-toggle { min-width: 64px; font-weight: 700; }
.pool-toolbar { flex-wrap: nowrap; overflow-x: auto; }
.pool-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }

.panel {
  position: relative;
  background: var(--glass-fill), var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 12px;
  overflow: hidden;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-glass);
}
.panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow-br);
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
}
.panel > * { position: relative; z-index: 1; }
.panel-hd {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.panel-hd h3, .panel h3 {
  margin: 0; font-size: 0.95rem; font-family: var(--font-display);
}
.panel > h3 { margin-bottom: 10px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dim { color: var(--text-dim); font-size: 11px; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .grid-2 { grid-template-columns: 1fr; }
}

.toast {
  position: fixed; right: 18px; bottom: 18px; z-index: 50;
  background: var(--glass-fill), var(--bg-glass-strong);
  border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; min-width: 220px;
  box-shadow: var(--shadow-glass), 0 16px 48px rgba(0, 0, 0, 0.4);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
}
.toast strong { display: block; color: var(--brand-text); margin-bottom: 4px; }
.toast span { color: var(--text-muted); font-size: 13px; }

/* 右侧滑入抽屉 · 对齐原型 sim-sheet */
.sheet {
  position: fixed; inset: 0; z-index: 40;
  display: flex; justify-content: flex-end;
  pointer-events: none;
}
.sheet[hidden] { display: none !important; }
.sheet.is-open { pointer-events: auto; }
.sheet-mask {
  position: absolute; inset: 0;
  background: rgba(0, 0, 0, 0.52);
  opacity: 0;
  transition: opacity 0.22s ease;
  cursor: pointer;
}
.sheet.is-open .sheet-mask { opacity: 1; }
.sheet-panel {
  position: relative; z-index: 1;
  height: 100%; width: min(400px, 92%);
  background: var(--glass-fill), rgba(8, 14, 11, 0.88);
  border-left: 1px solid rgba(62, 207, 142, 0.28);
  display: flex; flex-direction: column;
  box-shadow: -16px 0 48px rgba(0, 0, 0, 0.5), inset 1px 0 0 rgba(168, 245, 208, 0.06);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  transform: translateX(104%);
  transition: transform 0.26s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet.is-wide .sheet-panel { width: min(560px, 96%); }
.sheet.is-open .sheet-panel { transform: translateX(0); }
/* 居中弹窗（绑定项目等 · 非侧栏抽屉） */
.sheet.is-center {
  justify-content: center;
  align-items: center;
  padding: 16px;
}
.sheet.is-center .sheet-panel {
  height: auto;
  max-height: min(88vh, 740px);
  width: min(640px, 94%);
  border-left: none;
  border: 1px solid rgba(62, 207, 142, 0.28);
  border-radius: 14px;
  box-shadow: var(--shadow-glass), 0 24px 64px rgba(0, 0, 0, 0.55);
  transform: translateY(18px) scale(0.97);
  overflow: hidden;
}
.sheet.is-center.is-wide .sheet-panel { width: min(720px, 96%); }
.sheet.is-center.is-open .sheet-panel { transform: translateY(0) scale(1); }
.sheet.is-center .sheet-body { max-height: calc(88vh - 64px); }
.phone-bind-table-wrap {
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.18);
}
.phone-bind-table-wrap table { margin: 0; }
.phone-bind-table-wrap th,
.phone-bind-table-wrap td { padding: 8px 10px; }
.sheet-panel header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.sheet-panel h3 { margin: 0; font-size: 15px; color: var(--brand-text); }
.sheet-body { padding: 16px; overflow: auto; flex: 1; }
.sheet-body pre { white-space: pre-wrap; word-break: break-all; background: var(--bg-mid); padding: 10px; border-radius: 8px; font-size: 12px; }

.sim-muted { color: var(--text-muted); font-size: 13px; margin: 0 0 12px; line-height: 1.45; }
.sim-kv { display: flex; flex-direction: column; gap: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 12px; }
.sim-kv-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.sim-kv-row:last-child { border-bottom: 0; }
.sim-kv-row span { color: var(--text-muted); flex-shrink: 0; }
.sim-kv-row strong { color: var(--text); text-align: right; font-weight: 600; word-break: break-all; }
.sim-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; align-items: center; }
.sim-check {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; color: var(--text); font-size: 13px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--bg-mid);
  cursor: pointer; min-width: 88px;
}
.sim-check input { accent-color: var(--brand); }

/* 表内可点摘要（绑定项目 / 项目权限） */
.sim-link-op {
  border: 0;
  background: transparent;
  color: var(--brand-text, #ffd56a);
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sim-link-op:hover { color: #ffe9a8; opacity: 0.95; }
.sim-link-op.is-muted { color: var(--text-dim, #8b93a7); text-decoration: none; }
.phone-bind-cell,
.user-proj-cell {
  white-space: nowrap;
  vertical-align: middle;
}
.user-proj-sum {
  display: inline-block;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.phone-bind-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 12px;
}
.phone-bind-stats > div {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 14, 11, 0.45);
  border: 1px solid var(--line);
  box-shadow: var(--shine-top);
}
.phone-bind-stats em {
  display: block;
  font-style: normal;
  font-size: 1.35rem;
  color: var(--brand-text, #ffd56a);
}
.phone-bind-stats span {
  font-size: 11px;
  color: var(--text-muted, #9aa3b5);
}
.sim-bind-list {
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.18);
}
.sim-bind-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  margin-right: 0;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  border-left: 0;
  border-right: 0;
  border-top: 0;
}
.sim-bind-item:last-child { border-bottom: 0; }
.sim-bind-item strong { display: block; font-size: 13px; }
.sim-bind-item em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim, #8b93a7);
  margin-top: 2px;
}
.sim-sms-tl { list-style: none; margin: 0; padding: 0; }
.sim-sms-tl li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sim-sms-tl li:last-child { border-bottom: 0; }
.sim-sms-tl .tl-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-dim, #8b93a7);
  margin-bottom: 4px;
}
.sim-sms-tl .tl-body { font-size: 13px; line-height: 1.45; word-break: break-word; }
.phone-clickable {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--brand-text, #ffd56a);
}

.sim-form-col { display: flex; flex-direction: column; gap: 10px; }
.sim-form-col label { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
.sim-form-col input, .sim-form-col select, .sim-form-col textarea {
  background: var(--bg-mid); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; outline: none; color: var(--text);
}
.sim-form-col input:focus, .sim-form-col select:focus { border-color: var(--brand); }

.sim-inspect-log {
  position: fixed; right: 18px; bottom: 18px; z-index: 30;
  width: min(300px, calc(100vw - 36px)); max-height: 148px;
  background: var(--glass-fill), rgba(8, 14, 11, 0.88);
  border: 1px solid rgba(62, 207, 142, 0.3);
  border-radius: 12px;
  box-shadow: var(--shadow-glass), 0 12px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  display: flex; flex-direction: column; overflow: hidden;
}
.sim-inspect-log[hidden] { display: none !important; }
.sim-inspect-log-hd {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 10px; border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.sim-inspect-log-hd strong { font-size: 12px; color: var(--brand-text); }
.sim-inspect-log-x {
  border: 0; background: transparent; color: var(--text-muted);
  cursor: pointer; font-size: 16px; line-height: 1; padding: 2px 6px;
}
.sim-inspect-log-bd {
  padding: 8px 10px; overflow: auto; font-size: 11px;
  color: var(--text-muted); line-height: 1.4;
}

.empty { padding: 40px; text-align: center; color: var(--text-muted); }
.mono { font-family: ui-monospace, Consolas, monospace; }

/* —— 卡池大屏 / 数据大屏（对齐原型 pool-dash · data-dash） —— */
.pool-dash,
.data-dash {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pool-dash > .kpi-row,
.pool-dash > .panel,
.data-dash > .kpi-row,
.data-dash > .panel,
.data-dash > .grid-2 {
  width: 100%;
  margin-bottom: 0;
}

.pool-dash-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background:
    linear-gradient(125deg, rgba(62, 207, 142, 0.12), rgba(240, 180, 41, 0.05) 55%, rgba(10, 16, 13, 0.35)),
    var(--bg-glass);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-glass);
}
.pool-dash-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow-br);
  pointer-events: none;
  z-index: 0;
}
.pool-dash-bar > * { position: relative; z-index: 1; }
.pool-dash-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--brand-text);
  text-transform: uppercase;
}
.pool-dash-bar strong {
  display: block;
  margin-top: 2px;
  font-family: var(--font-display);
  font-size: 1.15rem;
}
.pool-dash-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}
.pool-dash-metrics div {
  position: relative;
  padding: 8px;
  border-radius: 10px;
  background: rgba(6, 12, 9, 0.45);
  text-align: center;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shine-top);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}
.pool-dash-metrics div::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow-br);
  pointer-events: none;
  opacity: 0.7;
}
.pool-dash-metrics em,
.pool-dash-metrics span { position: relative; z-index: 1; }
.pool-dash-metrics em {
  display: block;
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
}
.pool-dash-metrics em.warn { color: var(--danger); }
.pool-dash-metrics span { font-size: 10px; color: var(--text-muted); }

.pool-dash-trend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-width: 0;
}

.data-dash-hero {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(240, 180, 41, 0.28);
  background:
    linear-gradient(125deg, rgba(240, 180, 41, 0.12), rgba(62, 207, 142, 0.06) 55%, rgba(10, 16, 13, 0.35)),
    var(--bg-glass);
  position: relative;
  overflow: hidden;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow-glass), 0 0 32px rgba(240, 180, 41, 0.06);
}
.data-dash-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--glow-br-accent);
  pointer-events: none;
  z-index: 0;
}
.data-dash-hero > * { position: relative; z-index: 1; }
.data-dash-hero h3 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.data-dash-earn { text-align: right; flex-shrink: 0; }
.data-dash-earn span { display: block; font-size: 11px; color: var(--text-muted); }
.data-dash-earn strong {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
}
.data-dash-kpi .kpi { padding: 18px 18px 16px; min-height: 108px; }
.data-dash-kpi .kpi .value { font-size: 1.85rem; margin-top: 8px; }
.data-dash-kpi .kpi .label { font-size: 13px; }

.sim-trend-chart { --trend-color: #f0b429; width: 100%; margin-top: 4px; }
.sim-trend-svg {
  display: block; width: 100%; height: auto; min-height: 120px; overflow: visible;
}
.sim-trend-grid { stroke: rgba(180, 210, 190, 0.12); stroke-width: 1; stroke-dasharray: 4 4; }
.sim-trend-axis { stroke: rgba(180, 210, 190, 0.28); stroke-width: 1.2; }
.sim-trend-area { fill: color-mix(in srgb, var(--trend-color) 16%, transparent); stroke: none; }
.sim-trend-line {
  fill: none; stroke: var(--trend-color); stroke-width: 2.2;
  stroke-linejoin: round; stroke-linecap: round;
}
.sim-trend-dot { fill: #132018; stroke: var(--trend-color); stroke-width: 1.8; }
.sim-trend-ylabel, .sim-trend-xlabel {
  fill: var(--text-muted); font-size: 10px; font-family: var(--font-display);
}
.sim-trend-legend {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
  font-size: 12px; color: var(--text-muted);
}
.sim-trend-swatch {
  width: 18px; height: 3px; border-radius: 2px;
  background: var(--trend-color);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--trend-color) 22%, transparent);
}

.proj-bar { margin-bottom: 10px; }
.proj-bar-hd {
  display: flex; justify-content: space-between; font-size: 12px;
  margin-bottom: 4px; color: var(--text-muted);
}
.proj-bar-hd strong { color: var(--accent); }
.proj-bar > i {
  display: block; height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--brand));
}

.sim-log-list { display: flex; flex-direction: column; gap: 6px; }
.sim-log-item {
  display: flex; gap: 10px; align-items: baseline;
  padding: 8px 10px; border-radius: 10px;
  background: rgba(6, 12, 9, 0.4); border: 1px solid var(--line);
  font-size: 12px;
  box-shadow: var(--shine-top);
}
.sim-log-item .t { color: var(--text-dim); font-size: 11px; flex-shrink: 0; min-width: 36px; }
.sim-log-item .type {
  color: var(--brand-text); font-size: 11px; flex-shrink: 0;
  min-width: 32px;
}
.sim-log-item.bad { border-color: rgba(255, 107, 122, 0.28); }
.sim-device-row {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 10px 0; border-bottom: 1px solid var(--line);
}
.sim-device-row:last-child { border-bottom: 0; }
.sim-status {
  font-size: 11px; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--text-muted);
}
.sim-status.idle { color: var(--ok); border-color: rgba(111, 223, 160, 0.35); background: var(--ok-soft); }
.sim-status.off { color: var(--danger); border-color: rgba(255, 107, 122, 0.3); }

.otp { color: var(--accent); font-weight: 600; font-variant-numeric: tabular-nums; }

/* 翻页条 · 上翻/下翻（金币 Top 等） */
.sim-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
  flex-wrap: wrap;
}
.sim-pager .btn { min-height: 30px; padding: 0 10px; font-size: 12px; }
/* 金币 Top：无滚动条，靠上翻/下翻 */
.top-gold-wrap .table-wrap {
  max-height: none !important;
  overflow: visible !important;
  border: 0;
  background: transparent;
}
.top-gold-wrap .sim-pager { margin-top: 8px; }

/* 表格操作图标按钮（对齐原型 emoji ops） */
.sim-ops { white-space: nowrap; }
.sim-ops-inner { display: inline-flex; gap: 4px; align-items: center; }
.sim-icon-op {
  width: 26px; height: 26px; padding: 0; margin: 0;
  border-radius: 7px; border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.06); color: var(--text);
  cursor: pointer; font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.12s, border-color 0.12s, opacity 0.12s, transform 0.12s, filter 0.12s;
}
.sim-icon-op.op-switch { border-color: rgba(240, 180, 41, 0.4); background: rgba(240, 180, 41, 0.16); }
.sim-icon-op.op-switch.is-dim {
  filter: grayscale(0.85) brightness(0.42);
  opacity: 0.5;
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: none;
  color: #6a6a6a;
}
.sim-icon-op.op-switch.is-lit {
  filter: none;
  opacity: 1;
  border-color: rgba(255, 214, 100, 0.85);
  background: rgba(255, 200, 60, 0.32);
  color: #ffe9a0;
  box-shadow:
    0 0 0 1px rgba(255, 230, 140, 0.35),
    0 0 12px rgba(255, 210, 80, 0.55),
    0 0 22px rgba(240, 180, 41, 0.35);
  animation: bulb-glow 1.35s ease-in-out infinite;
}
@keyframes bulb-glow {
  0%, 100% {
    box-shadow:
      0 0 0 1px rgba(255, 230, 140, 0.4),
      0 0 10px rgba(255, 210, 80, 0.45),
      0 0 18px rgba(240, 180, 41, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 1px rgba(255, 240, 180, 0.55),
      0 0 16px rgba(255, 220, 100, 0.7),
      0 0 28px rgba(240, 180, 41, 0.48);
  }
}
.sim-icon-op.op-edit { border-color: rgba(96, 165, 250, 0.4); background: rgba(96, 165, 250, 0.14); }
.sim-icon-op.op-bound, .sim-icon-op.op-assign { border-color: rgba(167, 139, 250, 0.4); background: rgba(167, 139, 250, 0.14); }
.sim-icon-op.op-del { border-color: rgba(255, 107, 122, 0.4); background: rgba(255, 77, 109, 0.12); }
.sim-icon-op.op-copy { border-color: rgba(52, 211, 153, 0.4); background: rgba(52, 211, 153, 0.14); }
.sim-icon-op.op-toggle, .sim-icon-op.op-en { border-color: rgba(62, 207, 142, 0.4); background: rgba(62, 207, 142, 0.14); }
.sim-icon-op.op-open { border-color: rgba(56, 189, 248, 0.4); background: rgba(56, 189, 248, 0.14); }
.sim-icon-op.op-unlock { border-color: rgba(251, 146, 60, 0.45); background: rgba(251, 146, 60, 0.16); }
.sim-icon-op:hover:not(:disabled) {
  border-color: rgba(62, 207, 142, 0.55);
  transform: translateY(-1px);
  filter: brightness(1.08);
}
/* 选中/按下：透明压暗特效（全局图标） */
.sim-icon-op:active:not(:disabled),
.sim-icon-op.is-pressed {
  opacity: 0.45;
  transform: scale(0.9);
  background: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  filter: none;
}
.sim-icon-op:disabled { opacity: 0.35; cursor: not-allowed; }
.btn:active:not(:disabled) { opacity: 0.72; transform: translateY(1px); }
.sim-script-card:active { opacity: 0.7; }

/* 手机号三级筛 + 页面填充（吸底分页） */
.sim-page-fill {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 100%;
  flex: 1;
}
.sim-page-fill > .kpi-row,
.sim-page-fill > .sim-page-toolbar,
.sim-page-fill > .sim-phone-toolbar,
.sim-page-fill > .sim-logs-toolbar {
  flex-shrink: 0;
}
.sim-page-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between;
}
.sim-toolbar-title { margin: 0; font-size: 1rem; font-family: var(--font-display); }
.sim-tier-filters {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1;
}
.sim-tier-filters .sim-input,
.sim-input {
  min-height: 34px; padding: 0 10px;
  border: 1px solid var(--line); border-radius: 9px;
  background: rgba(8, 14, 11, 0.55); color: var(--text);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}
.sim-tier-filters select.sim-input option {
  background: #15201a; color: var(--text);
}
.sim-tier-filters .tier-col { min-width: 110px; max-width: 140px; }
.sim-tier-filters .tier-search { flex: 1; min-width: 140px; }
.sim-phone-toolbar { display: flex; flex-direction: column; gap: 8px; }
.sim-chip-row {
  display: flex; flex-wrap: wrap; gap: 6px; width: 100%;
}
.sim-chip-btn {
  min-height: 28px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: transparent; color: var(--text-muted);
  font-size: 12px;
  transition: background 0.12s, color 0.12s, border-color 0.12s, opacity 0.12s;
}
.sim-chip-btn:hover,
.sim-chip-btn.active {
  border-color: rgba(62, 207, 142, 0.45);
  color: var(--brand-text);
  background: rgba(62, 207, 142, 0.14);
}
.sim-chip-btn:active { opacity: 0.55; }
.sim-chip-row-dense .sim-chip-btn { min-height: 26px; padding: 0 8px; font-size: 11px; }
.sim-phone-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sim-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sim-panel-table .table-wrap { max-height: calc(100vh - 280px); }
/* 调度日志：列表占满、分页吸底，去掉过大空白 */
.sim-logs-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding-bottom: 0;
}
.sim-logs-panel .sim-log-list {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none;
  overflow: auto;
  padding: 4px 2px 8px;
}
.sim-logs-panel .sim-pager {
  margin-top: auto;
  flex-shrink: 0;
  position: sticky;
  bottom: 0;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 10px 4px 12px;
  background: linear-gradient(180deg, rgba(8, 14, 11, 0.55), rgba(7, 11, 9, 0.92));
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
}
.sms-body-cell {
  max-width: 280px;
  vertical-align: middle;
}
.sms-body-ellipsis {
  display: block;
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sim-kv { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.sim-kv-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 13px;
}
.sim-kv-row span { color: var(--text-muted); flex-shrink: 0; }
.sim-kv-row strong { text-align: right; font-weight: 600; word-break: break-all; }
.sim-form-col { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.sim-form-col label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.sim-form-col input, .sim-form-col select, .sim-form-col textarea {
  min-height: 34px; padding: 6px 10px; border-radius: 9px;
  border: 1px solid var(--line); background: rgba(8, 14, 11, 0.55); color: var(--text);
}
.sim-muted { color: var(--text-muted); font-size: 13px; line-height: 1.55; }
.wrap { white-space: normal; max-width: 220px; }
.status-idle { color: var(--ok); }
.status-off { color: var(--danger); }

@media (max-width: 1100px) {
  .pool-dash-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pool-dash-trend-grid { grid-template-columns: 1fr; }
  .data-dash-hero { flex-direction: column; }
  .kpi-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 卡池：无外框强调 · 以色块区分空/绑/使用中 */
.sim-panel-pool {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 4px 0 0 !important;
}
.sim-panel-pool::after { display: none !important; }
.pool-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between; margin-bottom: 8px;
}
.pool-search-wrap { display: flex; gap: 6px; flex: 1; min-width: 200px; }
.pool-search-wrap .pool-type { width: 96px; flex-shrink: 0; }
.pool-search-wrap .pool-search { flex: 1; min-width: 120px; }
.pool-actions { display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.pool-actions .btn { flex-shrink: 0; white-space: nowrap; }
/* 导入双栏 + 历史同宽 */
.sim-import-split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px;
}
.sim-import-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px;
}
.sim-import-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.sim-import-actions {
  grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.sim-drop {
  margin-top: 10px; padding: 28px 16px; text-align: center;
  border: 1px dashed rgba(62, 207, 142, 0.35); border-radius: 12px;
  color: var(--text-muted); font-size: 13px;
  background: rgba(0, 0, 0, 0.18);
}
.sim-import-history h3 { margin: 0 0 10px; font-family: var(--font-display); font-size: 0.95rem; }
.sim-import-history .table-wrap { max-height: none; }

/* 脚本卡片 */
.sim-script-card {
  display: block; width: 100%; text-align: left; margin-bottom: 8px;
  padding: 12px 14px; border-radius: 12px; cursor: pointer;
  border: 1px solid var(--line);
  background: var(--glass-fill), rgba(8, 14, 11, 0.4);
  color: var(--text);
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--shine-top);
}
.sim-script-card strong { display: block; margin-bottom: 4px; }
.sim-script-card code { font-size: 11px; color: var(--text-muted); }
.sim-script-card.active, .sim-script-card:hover {
  border-color: rgba(62, 207, 142, 0.45);
  background: linear-gradient(90deg, rgba(62, 207, 142, 0.14), rgba(62, 207, 142, 0.04));
}
.sim-code {
  margin: 0; padding: 12px; border-radius: 10px; overflow: auto;
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line);
  font-size: 12px; color: var(--brand-text); white-space: pre-wrap;
}

/* 设置手风琴 */
.sim-settings-panel { max-width: 560px; }
.sim-settings-folds { display: flex; flex-direction: column; gap: 6px; }
.sim-settings-fold {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--glass-fill), rgba(8, 14, 11, 0.4);
  overflow: hidden;
  backdrop-filter: var(--blur-sm);
  -webkit-backdrop-filter: var(--blur-sm);
  box-shadow: var(--shine-top);
}
.sim-settings-fold-hd {
  display: flex; justify-content: space-between; width: 100%;
  border: 0; background: transparent; color: var(--text);
  font-size: 14px; font-weight: 600; padding: 12px 14px; cursor: pointer;
}
.sim-settings-fold-hd:hover { background: rgba(62, 207, 142, 0.06); }
.sim-settings-fold.is-open .sim-settings-fold-hd {
  border-bottom: 1px solid var(--line); color: var(--brand-text);
}
.sim-settings-fold-bd { padding: 12px 14px 14px; }

/* 翻页吸底 */
.sim-page-fill > .sim-panel-table {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin-bottom: 0;
}
.sim-page-fill .table-wrap,
.sim-page-fill .sim-log-list {
  flex: 1 1 auto;
  min-height: 0;
}
.sim-page-fill .sim-pager {
  margin-top: auto;
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  padding: 10px 0 0;
  background: rgba(8, 14, 11, 0.35);
}
table tr.is-dim td { opacity: 0.55; }

@media (max-width: 900px) {
  .sim-import-split { grid-template-columns: 1fr; }
  .sim-import-grid { grid-template-columns: 1fr; }
}

/* 表内可点摘要（绑定项目 / 项目权限） */
.sim-link-op {
  border: 0;
  background: transparent;
  color: var(--brand-text, #ffd56a);
  font: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.sim-link-op:hover { color: #ffe9a8; opacity: 0.95; }
.sim-link-op.is-muted { color: var(--text-dim, #8b93a7); text-decoration: none; }
.phone-bind-cell,
.user-proj-cell { white-space: nowrap; vertical-align: middle; }
.user-proj-sum {
  display: inline-block;
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.phone-bind-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 10px 0 12px;
}
.phone-bind-stats > div {
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 14, 11, 0.45);
  border: 1px solid var(--line);
  box-shadow: var(--shine-top);
}
.phone-bind-stats em {
  display: block;
  font-style: normal;
  font-size: 1.35rem;
  color: var(--brand-text, #ffd56a);
}
.phone-bind-stats span {
  font-size: 11px;
  color: var(--text-muted, #9aa3b5);
}
.sim-bind-list {
  max-height: min(42vh, 360px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px 10px;
  background: rgba(0, 0, 0, 0.18);
}
.sim-bind-item {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 2px;
  margin-right: 0;
  min-width: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
}
.sim-bind-item:last-child { border-bottom: 0; }
.sim-bind-item strong { display: block; font-size: 13px; color: var(--text); }
.sim-bind-item em {
  display: block;
  font-style: normal;
  font-size: 11px;
  color: var(--text-dim, #8b93a7);
  margin-top: 2px;
}
.sim-sms-tl { list-style: none; margin: 0; padding: 0; }
.sim-sms-tl li {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.sim-sms-tl li:last-child { border-bottom: 0; }
.sim-sms-tl .tl-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--text-dim, #8b93a7);
  margin-bottom: 4px;
}
.sim-sms-tl .tl-body { font-size: 13px; line-height: 1.45; word-break: break-word; }
.phone-clickable {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: var(--brand-text, #ffd56a);
}
