/* ========= 状态圆点（彩色 dot + 中文，取代旧 chip） ========= */
.status-dot {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  color: #475569;
}
.status-dot::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  background: #cbd5e1;
}
.status-dot--on::before      { background: #22c55e; }
.status-dot--off::before     { background: #94a3b8; }
.status-dot--expired::before { background: #ef4444; }

/* ========= Switch 开关（纯 HTML + Tailwind peer 驱动） ========= */
.switch {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  cursor: pointer;
  vertical-align: middle;
}
.switch-track {
  position: absolute;
  inset: 0;
  background: #cbd5e1;
  border-radius: 9999px;
  transition: background 0.15s ease;
}
.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.15s ease;
}
.switch input:checked ~ .switch-track { background: #2563eb; }
.switch input:checked ~ .switch-thumb { transform: translateX(16px); }
.switch input:focus-visible ~ .switch-track {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* ========= Modal ========= */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
}
.modal-box {
  background: white;
  border-radius: 6px;
  padding: 24px;
  width: min(480px, 90vw);
}

/* ========= 侧边栏滑动过渡 ========= */
#sidebar {
  transition: transform 0.25s ease;
}

/* ========= 表格行悬浮 ========= */
tbody tr:hover {
  background-color: #f8fafc;
}

/* ========= 表单聚焦环 ========= */
.form-input:focus {
  outline: 1px solid #2563eb;
  outline-offset: 1px;
}

/* ========= 分页按钮 ========= */
.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 2rem;
  padding: 0 0.5rem;
  border-radius: 6px;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  background: white;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.page-btn:hover { background: #f1f5f9; }
.page-btn.active { background: #2563eb; color: white; border-color: #2563eb; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
