/* ========================================
   事项管理平台 - 公共主题样式表
   紫绿方形风格：主色 #4B3FE3 / 强调色 #32F08C
   覆盖 Bootstrap / GXON 内容页为紫绿方形风格
   ======================================== */

/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "SF Pro Text", -apple-system, system-ui, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", Roboto, sans-serif;
  background: #ffffff;
  color: #171717;
  -webkit-font-smoothing: antialiased;
}

/* ===== 覆盖 Bootstrap 主题变量 ===== */
:root {
  --bs-primary: #4B3FE3;
  --bs-primary-rgb: 75, 63, 227;
  --bs-success: #32F08C;
  --bs-success-rgb: 50, 240, 140;
  --bs-danger: #dc2626;
  --bs-danger-rgb: 220, 38, 38;
  --bs-warning: #ea580c;
  --bs-warning-rgb: 234, 88, 12;
  --bs-info: #0891b2;
  --bs-info-rgb: 8, 145, 178;
}

/* ===== Layout ===== */
.app { display: flex; min-height: 100vh; }

/* ===== Sidebar ===== */
.sidebar {
  width: 240px;
  background: linear-gradient(165deg, #f6f4ff 0%, #fbfffd 45%, #f3fff8 100%);
  border-right: 1px solid rgba(75, 63, 227, 0.08);
  padding: 0;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
  transition: width 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.sidebar::before {
  content: '';
  position: absolute;
  top: -60px;
  left: -80px;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(75, 63, 227, 0.14) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.sidebar::after {
  content: '';
  position: absolute;
  bottom: 80px;
  right: -90px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, rgba(50, 240, 140, 0.16) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
.sidebar > * { position: relative; z-index: 1; }

/* 菜单区域：独立滚动，顶部 logo 与底部登录信息固定 */
.sidebar-nav {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* ===== Logo + Toggle (顶部区域) ===== */
.logo {
  padding: 13px 16px 13px 24px;
  border-bottom: 1px solid rgba(75, 63, 227, 0.08);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-sizing: border-box;
  height: 64px;
  flex-shrink: 0;
}
.logo-mark {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: linear-gradient(135deg, #4B3FE3 0%, #6366f1 55%, #32F08C 100%);
}
.logo-mark::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.18) 0%, transparent 50%);
}
.logo-mark svg { position: relative; z-index: 1; }
/* 后台配置了 LogoUrl 时以图片替换内置 SVG 图标 */
.logo-mark img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.brand-text img {
  display: block;
  height: 40px;
  max-width: 220px;
  object-fit: contain;
}
.logo-body { min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; }
.logo-text {
  font-size: 20px;
  font-weight: 700;
  color: #171717;
  letter-spacing: -0.5px;
  line-height: 1.2;
}
.logo-text span { color: #4B3FE3; }
.logo-sub {
  font-size: 11px;
  color: #8888a8;
  margin-top: 3px;
}

/* 折叠按钮 - 悬浮在 sidebar 右边缘 */
.sidebar-toggle {
  position: fixed;
  top: 18px;
  left: 226px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  border: 1px solid rgba(75, 63, 227, 0.12);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(75, 63, 227, 0.14);
  cursor: pointer;
  color: #6b6b80;
  z-index: 30;
  transition: left 0.28s cubic-bezier(0.4, 0, 0.2, 1),
              background 0.18s, color 0.18s, box-shadow 0.18s, border-color 0.18s;
}
.sidebar-toggle:hover {
  background: #4B3FE3;
  color: #fff;
  border-color: #4B3FE3;
  box-shadow: 0 4px 14px rgba(75, 63, 227, 0.3);
}
.sidebar-toggle svg { width: 14px; height: 14px; transition: transform 0.28s; }
.sidebar.collapsed .sidebar-toggle {
  left: 50px;
  color: #4B3FE3;
}
.sidebar.collapsed .sidebar-toggle svg {
  transform: rotate(180deg);
}

/* ===== Nav Section Label ===== */
.nav-section {
  padding: 14px 24px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #9b95c7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ===== Nav Item (基础) ===== */
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 18px 9px 21px;
  font-size: 14px;
  color: #4a4a5c;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
  margin: 2px 12px;
  border-left: 3px solid transparent;
  white-space: nowrap;
}
.nav-item:hover {
  background: rgba(75, 63, 227, 0.08);
  color: #4B3FE3;
  border-left-color: rgba(75, 63, 227, 0.3);
}
.nav-item.active {
  background: linear-gradient(90deg, rgba(75, 63, 227, 0.12) 0%, rgba(75, 63, 227, 0.02) 100%);
  color: #4B3FE3;
  font-weight: 600;
  border-left-color: #4B3FE3;
}
.nav-item .icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.nav-item .label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.nav-badge {
  background: #32F08C;
  color: #0f5a32;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 0;
  box-shadow: 0 1px 4px rgba(50, 240, 140, 0.4);
  line-height: 1.4;
}

/* ===== 两级菜单：父级 + 展开箭头 ===== */
.nav-arrow {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
  color: #9b95c7;
}
.nav-arrow svg { transition: transform 0.2s ease; }
.nav-group.open > .nav-item .nav-arrow svg {
  transform: rotate(90deg);
}

/* ===== 两级菜单：子菜单容器 ===== */
.nav-children {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.28s ease;
}
.nav-group.open > .nav-children {
  max-height: 500px;
}
.nav-child {
  padding: 8px 18px 8px 54px;
  font-size: 13px;
  margin: 2px 12px;
  color: #6b6b7c;
  border-left: 3px solid transparent;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-child:hover {
  background: rgba(75, 63, 227, 0.06);
  color: #4B3FE3;
}
.nav-child.active {
  color: #4B3FE3;
  font-weight: 600;
  border-left-color: #4B3FE3;
  background: rgba(75, 63, 227, 0.06);
}
.nav-child .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #c0bcd6;
  flex-shrink: 0;
}
.nav-child:hover .dot { background: #4B3FE3; }
.nav-child.active .dot { background: #4B3FE3; }

/* ===== Sidebar Footer ===== */
.sidebar-footer {
  flex-shrink: 0;
  padding: 20px 24px;
  border-top: 1px solid rgba(75, 63, 227, 0.08);
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #4B3FE3 0%, #6366f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(75, 63, 227, 0.3);
}
.user-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}
.user-info .name {
  font-size: 13px;
  font-weight: 600;
  color: #171717;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-info .role {
  font-size: 12px;
  color: #737373;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.user-action-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(75, 63, 227, 0.12);
  color: #6b6b80;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}
.user-action-btn:hover {
  background: rgba(75, 63, 227, 0.08);
  border-color: rgba(75, 63, 227, 0.3);
  color: #4B3FE3;
}
.logout-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

/* ===== Main ===== */
.main {
  flex: 1;
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: margin-left 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}
.main.expanded { margin-left: 64px; }

/* ===== Topbar ===== */
.topbar {
  height: 64px;
  background: #ffffff;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  padding: 0 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.breadcrumb {
  font-size: 14px;
  color: #737373;
  display: flex;
  align-items: center;
  line-height: 1;
  margin-bottom: 0;
  padding: 0;
}
.breadcrumb .current { color: #171717; font-weight: 500; }
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

/* ===== Search ===== */
.search-box {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  padding: 8px 14px;
  width: 280px;
}
.search-box input {
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  font-size: 13px;
  color: #171717;
  margin-left: 8px;
}
.search-box input::placeholder { color: #a3a3a3; }

/* ===== Icon Button ===== */
.icon-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  color: #404040;
}
.icon-btn:hover { background: #f5f5f5; }
.icon-btn .dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 8px;
  height: 8px;
  background: #32F08C;
}

/* ===== Content ===== */
.content {
  padding: 28px 32px 40px;
  flex: 1;
  background: #ffffff;
}

/* ===== Scrollbar（隐藏滚动条，保留滚动能力）===== */
.sidebar-nav::-webkit-scrollbar { display: none; }

/* ========================================
   折叠态样式
   ======================================== */
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .logo-body,
.sidebar.collapsed .nav-section,
.sidebar.collapsed .nav-item .label,
.sidebar.collapsed .nav-badge,
.sidebar.collapsed .nav-arrow,
.sidebar.collapsed .user-info,
.sidebar.collapsed .user-actions { display: none; }

.sidebar.collapsed .logo {
  padding: 16px 0;
  flex-direction: column;
  gap: 10px;
  height: auto;
}
.sidebar.collapsed .nav-item {
  justify-content: center;
  padding: 8px 0;
  margin: 2px 8px;
  border-left: none;
}
.sidebar.collapsed .nav-item.active { border-left: none; }
.sidebar.collapsed .nav-children { display: none; }
.sidebar.collapsed .sidebar-footer { padding: 20px 0; }
.sidebar.collapsed .user-card { justify-content: center; }

/* ===== 折叠态：悬停弹出面板 ===== */
.nav-flyout {
  position: fixed;
  background: #ffffff;
  border: 1px solid rgba(75, 63, 227, 0.12);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  min-width: 180px;
  padding: 8px 0;
  z-index: 9999;
  display: none;
  border-radius: 0;
}
.nav-flyout.show { display: block; }
.nav-flyout .flyout-header {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: #4B3FE3;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 4px;
  white-space: nowrap;
}
.nav-flyout .flyout-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13px;
  color: #4a4a5c;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s;
}
.nav-flyout .flyout-item:hover {
  background: rgba(75, 63, 227, 0.08);
  color: #4B3FE3;
}
.nav-flyout .flyout-item.active {
  color: #4B3FE3;
  font-weight: 600;
  background: rgba(75, 63, 227, 0.06);
}
.nav-flyout .flyout-item .dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c0bcd6;
  flex-shrink: 0;
}
.nav-flyout .flyout-item:hover .dot { background: #4B3FE3; }
.nav-flyout .flyout-item.active .dot { background: #4B3FE3; }

/* ========================================
   Bootstrap / GXON 内容页覆盖层
   ======================================== */

/* 卡片 */
.card {
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-radius: 0 !important;
  box-shadow: none;
}
.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid #f5f5f5;
  background: #ffffff;
  border-radius: 0 !important;
}
.card-body { padding: 24px; }
.card-title {
  font-size: 16px;
  font-weight: 600;
  color: #171717;
}

/* 按钮：方形、紫绿 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  font-size: 13px;
  color: #404040;
  background: #fff;
  border: 1px solid #e5e5e5;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  border-radius: 0 !important;
  font-weight: 500;
}
.btn:hover { background: #f5f5f5; border-color: #d4d4d4; color: #171717; text-decoration: none; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.btn-danger { padding: 8px 16px; border: none; }
.btn-primary {
  background: #32F08C !important;
  border-color: #32F08C !important;
  color: #171717 !important;
}
.btn-primary:hover { background: #26d17a !important; border-color: #26d17a !important; color: #171717 !important; }
.btn-secondary {
  background: #4B3FE3 !important;
  border-color: #4B3FE3 !important;
  color: #ffffff !important;
}
.btn-secondary:hover { background: #3d32c0 !important; border-color: #3d32c0 !important; color: #ffffff !important; }
.btn-success {
  background: #32F08C !important;
  border-color: #32F08C !important;
  color: #0f5a32 !important;
}
.btn-info {
  background: #0891b2 !important;
  border-color: #0891b2 !important;
  color: #ffffff !important;
}
.btn-danger {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
  color: #ffffff !important;
}
.btn-outline-secondary { color: #4B3FE3; border-color: #d4d4d4; }
.btn-outline-secondary:hover { background: #4B3FE3; border-color: #4B3FE3; color: #fff; }

/* 分页 */
.pagination .page-link { border-radius: 0 !important; color: #4B3FE3; }
.pagination .page-item.active .page-link { background: #4B3FE3; border-color: #4B3FE3; color: #fff; }

/* 表格 */
.table thead th { background: #f9f8ff; font-weight: 600; color: #404040; border-bottom: 2px solid #edeafd; }
.table td, .table th { padding: 12px; }

/* 导航/标签辅助 */
.text-primary { color: #4B3FE3 !important; }
.text-success { color: #1ea85e !important; }
.bg-primary { background-color: #4B3FE3 !important; }
.bg-success { background-color: #32F08C !important; }
.badge { border-radius: 0 !important; }

/* 下拉菜单/弹窗 */
.dropdown-menu { border-radius: 0 !important; border: 1px solid #f0f0f0; }
.modal-content { border-radius: 0 !important; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.collapsed { transform: translateX(-100%); width: 240px; }
  .sidebar.mobile-open { transform: translateX(0); }
  .main, .main.expanded { margin-left: 0; }
  .content { padding: 20px 16px 32px; }
  .topbar { padding: 0 16px; }
  .search-box { display: none; }
}

/* ===== 顶栏用户区 ===== */
.topbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
}
.topbar-user:hover { background: #f5f5f5; }
.topbar-user .avatar {
  width: 32px;
  height: 32px;
  font-size: 13px;
}
.topbar-user-info { text-align: left; line-height: 1.25; }
.topbar-user-info .name { font-size: 13px; font-weight: 600; color: #171717; }
.topbar-user-info .role { font-size: 11px; color: #a3a3a3; }

/* ===== 预警红点徽标 ===== */
.alert-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  line-height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  background: #dc2626;
  text-align: center;
  border-radius: 0;
}

/* ========================================
   认证页（登录 / 修改密码 / 谷歌验证 / 访问拒绝）
   ======================================== */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #4B3FE3 0%, #6366f1 55%, #32F08C 100%);
  padding: 24px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  box-shadow: 0 20px 60px rgba(20, 20, 60, 0.25);
  padding: 40px 36px;
}
.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}
.auth-brand .logo-mark {
  width: 40px;
  height: 40px;
}
.auth-brand .brand-text {
  font-size: 20px;
  font-weight: 700;
  color: #171717;
}
.auth-brand .brand-text span { color: #4B3FE3; }
.auth-title {
  font-size: 22px;
  font-weight: 700;
  color: #171717;
  text-align: center;
  margin-bottom: 6px;
}
.auth-sub {
  text-align: center;
  font-size: 13px;
  color: #a3a3a3;
  margin-bottom: 28px;
}
.auth-form .form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #404040;
  margin-bottom: 6px;
}
.auth-form .form-control {
  height: 46px;
  font-size: 14px;
  margin-bottom: 18px;
}
.auth-btn {
  width: 100%;
  height: 46px;
  border: none;
  cursor: pointer;
  background: #32F08C;
  color: #171717;
  font-size: 16px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
}
.auth-btn:hover { background: #26d17a; color: #171717; }
.auth-btn:disabled { background: #a7f3d0; cursor: not-allowed; }
.auth-error {
  display: none;
  margin-top: 16px;
  padding: 10px 12px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 13px;
  text-align: center;
}
.auth-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: #a3a3a3;
}
.auth-links {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.auth-links .auth-btn { flex: 1; }
.auth-qr {
  text-align: center;
  margin-bottom: 20px;
}
.auth-qr img {
  width: 180px;
  height: 180px;
  border: 1px solid #f0f0f0;
  background: #fafafa;
  padding: 8px;
}
.auth-qr .secret {
  margin-top: 12px;
  font-size: 12px;
  color: #737373;
  word-break: break-all;
}
.auth-qr .secret strong { color: #171717; }
.auth-btn .spinner-border {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(23, 23, 23, 0.25);
  border-top-color: #171717;
  border-radius: 50%;
  animation: auth-spin 0.6s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }

/* ===== 全部预警弹窗 ===== */
.all-alerts-modal {
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-height: 480px;
  overflow-y: auto;
}
.all-alerts-section {
  border: 1px solid #e5e7eb;
  padding: 12px;
}
.all-alerts-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #4a4a5c;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #f3f4f6;
  display: flex;
  align-items: center;
}
.all-alerts-list {
  max-height: 320px;
  overflow-y: auto;
  padding-right: 4px;
}
.all-alerts-empty {
  padding: 24px 0;
  text-align: center;
  color: #9ca3af;
  font-size: 13px;
}
.all-alert-item {
  padding: 8px 10px;
  margin-bottom: 6px;
  border-left: 3px solid #dc2626;
  background: #fafafa;
  transition: background 0.15s;
}
.all-alert-item:hover { background: #f3f4f6; }
.all-alert-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.all-alert-badge {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}
.all-alert-type {
  font-size: 12px;
  color: #4a4a5c;
  font-weight: 500;
  flex: 1;
}
.all-alert-date {
  font-size: 11px;
  color: #9ca3af;
}
.all-alert-title {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.4;
  word-break: break-all;
  margin-top: 2px;
}
.all-alerts-total {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  background: #dc2626;
  color: #fff;
  line-height: 1.5;
}

/* ========================================
   自研组件层（不依赖 Bootstrap / GXON）
   供编辑页、弹窗、向导统一使用
   ======================================== */

/* ===== 表单控件 ===== */
.form-control {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #171717;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  border-radius: 0;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
  border-color: #4B3FE3;
  box-shadow: 0 0 0 3px rgba(75, 63, 227, 0.08);
}
.form-control::placeholder { color: #a3a3a3; }
.form-control:disabled,
.form-control[readonly] { background: #fafafa; color: #737373; cursor: not-allowed; }
textarea.form-control {
  height: auto;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}
select.form-control,
.form-select {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 34px 0 12px;
  border: 1px solid #e5e5e5;
  background-color: #ffffff;
  color: #171717;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a3a3a3' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.form-select:focus {
  border-color: #4B3FE3;
  box-shadow: 0 0 0 3px rgba(75, 63, 227, 0.08);
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: #404040;
  margin-bottom: 8px;
}
.form-label .required { color: #dc2626; }
.form-field { margin-bottom: 16px; }
.form-tip {
  font-size: 12px;
  color: #a3a3a3;
  line-height: 1.7;
  background: #fafafa;
  border: 1px solid #f0f0f0;
  padding: 12px 14px;
}
.form-tip b { color: #4B3FE3; font-weight: 600; }

/* ===== 表单栅格（替代 Bootstrap row/col）===== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 20px;
}
.form-grid.cols-1 { grid-template-columns: minmax(0, 1fr); }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-grid > .span-full { grid-column: 1 / -1; }
@media (max-width: 900px) {
  .form-grid,
  .form-grid.cols-2,
  .form-grid.cols-3,
  .form-grid.cols-4 { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 表单操作区 ===== */
.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid #f0f0f0;
}

/* ===== 单选 / 复选（替代 Bootstrap form-check）===== */
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #404040;
  cursor: pointer;
  margin-bottom: 10px;
}
.check input[type="radio"],
.check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #4B3FE3;
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
}

/* ===== 提示条（替代 Bootstrap alert）===== */
.notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 14px;
  border-left: 3px solid #4B3FE3;
  background: rgba(75, 63, 227, 0.06);
  color: #404040;
  font-size: 13px;
  line-height: 1.7;
}
.notice-info { border-left-color: #4B3FE3; background: rgba(75, 63, 227, 0.06); }
.notice-success { border-left-color: #32F08C; background: rgba(50, 240, 140, 0.1); }
.notice-warning { border-left-color: #ea580c; background: rgba(234, 88, 12, 0.08); }
.notice-danger { border-left-color: #dc2626; background: rgba(220, 38, 38, 0.06); }

/* ===== 标签页（替代 Bootstrap nav-tabs）===== */
.tab-group {
  display: flex;
  border-bottom: 1px solid #f0f0f0;
}
.tab-group .tab {
  padding: 10px 20px;
  font-size: 13px;
  color: #737373;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.tab-group .tab:hover { color: #4B3FE3; }
.tab-group .tab.active {
  color: #4B3FE3;
  font-weight: 600;
  border-bottom-color: #4B3FE3;
  background: transparent;
}

/* ===== 按钮补充 ===== */
.btn-danger {
  background: #dc2626;
  color: #ffffff;
  border: none;
  padding: 10px 20px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-radius: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 7px 14px; font-size: 12px; }
.btn-block { width: 100%; justify-content: center; }

/* ===== 布局 / 文本工具（替代 Bootstrap 工具类）===== */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; min-width: 0; }
.flex-center { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-between-start { display: flex; align-items: flex-start; justify-content: space-between; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-end { justify-content: flex-end; }
.justify-center { justify-content: center; }
.gap-4 { gap: 4px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.text-muted { color: #a3a3a3; }
.text-secondary-2 { color: #737373; }
.text-danger { color: #dc2626; }
.text-success { color: #1ea85e; }
.text-primary { color: #4B3FE3; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-nowrap { white-space: nowrap; }
.fw-600 { font-weight: 600; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.hidden { display: none !important; }

/* ===== 按钮内加载指示 ===== */
.spinner-sm {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: currentColor;
  border-radius: 50%;
  vertical-align: -2px;
  margin-right: 4px;
  animation: auth-spin 0.6s linear infinite;
}
.btn-primary .spinner-sm { border-color: rgba(23, 23, 23, 0.25); border-top-color: #171717; }

/* ===== 内容页小标题 ===== */
.section-title {
  font-size: 15px;
  font-weight: 600;
  color: #171717;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
}

/* ===== 顶栏预警下拉（自研）===== */
.bell-wrap { position: relative; display: flex; }
.bell-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  border-radius: 0;
  display: none;
  z-index: 200;
}
.bell-menu.show { display: block; }
.bell-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  font-weight: 600;
  color: #171717;
}
.bell-menu-head .bell-count {
  display: inline-block;
  margin-left: 8px;
  padding: 1px 8px;
  font-size: 11px;
  font-weight: 600;
  background: #dc2626;
  color: #fff;
  line-height: 1.5;
}
.bell-menu-body { max-height: 360px; overflow-y: auto; padding: 8px; }
.bell-menu-body .bell-empty { padding: 40px 0; text-align: center; color: #a3a3a3; font-size: 13px; }
.bell-menu-foot { padding: 8px; border-top: 1px solid #f0f0f0; }
.bell-item {
  padding: 8px 10px;
  margin-bottom: 4px;
  border-left: 3px solid #dc2626;
  background: #fafafa;
  cursor: pointer;
  transition: background 0.15s;
}
.bell-item:hover { background: #f3f4f6; }
.bell-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.bell-item-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #dc2626;
  flex-shrink: 0;
}
.bell-item-title { font-size: 12px; font-weight: 600; color: #171717; }
.bell-item-desc {
  font-size: 11px;
  color: #737373;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bell-item-date { font-size: 10px; color: #a3a3a3; }
.bell-section-label {
  font-size: 12px;
  font-weight: 600;
  color: #dc2626;
  padding: 4px 4px 8px;
}

/* ===== 自研 Toast 提示 ===== */
.toast-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.toast-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 240px;
  max-width: 360px;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #f0f0f0;
  border-left: 3px solid #4B3FE3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  animation: sj-toast-in 0.2s ease;
}
.toast-item--hide {
  opacity: 0;
  transform: translateX(12px);
  transition: all 0.2s ease;
}
.toast-item__main { flex: 1; min-width: 0; }
.toast-item__title {
  font-size: 13px;
  font-weight: 600;
  color: #171717;
  margin-bottom: 2px;
}
.toast-item__msg {
  font-size: 13px;
  color: #4a4a5c;
  line-height: 1.6;
  word-break: break-all;
}
.toast-item__close {
  border: none;
  background: transparent;
  color: #a3a3a3;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.toast-item__close:hover { color: #171717; }
.toast-item--success { border-left-color: #32F08C; }
.toast-item--error { border-left-color: #dc2626; }
.toast-item--warning { border-left-color: #ea580c; }
.toast-item--info { border-left-color: #4B3FE3; }
@keyframes sj-toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: none; }
}

/* ===== 自研 Offcanvas 侧滑弹层 ===== */
.sj-offcanvas-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 1040;
}
.sj-offcanvas-backdrop--open { opacity: 1; }
.sj-offcanvas {
  position: fixed;
  background: #ffffff;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease;
  box-shadow: 0 0 24px rgba(0, 0, 0, 0.18);
}
.sj-offcanvas--start { top: 0; left: 0; bottom: 0; transform: translateX(-100%); }
.sj-offcanvas--end { top: 0; right: 0; bottom: 0; transform: translateX(100%); }
.sj-offcanvas--top { left: 0; right: 0; top: 0; transform: translateY(-100%); }
.sj-offcanvas--bottom { left: 0; right: 0; bottom: 0; transform: translateY(100%); }
.sj-offcanvas--open { transform: none; }
.sj-offcanvas__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f0f0;
}
.sj-offcanvas__title { font-size: 15px; font-weight: 600; color: #171717; }
.sj-offcanvas__close {
  border: none;
  background: transparent;
  font-size: 22px;
  line-height: 1;
  color: #a3a3a3;
  cursor: pointer;
}
.sj-offcanvas__close:hover { color: #171717; }
.sj-offcanvas__body { flex: 1; min-height: 0; }
.sj-offcanvas__body iframe { width: 100%; height: 100%; border: none; display: block; }
