/* ============================================================
   Bingo Design System — Bingo数采平台
   Extracted from target site, adapted for Jinja2 + Alpine.js
   ============================================================ */

/* --- Design Tokens --- */
:root {
  --bingo-primary: #2B6CB0;
  --bingo-primary-hover: #3B82C4;
  --bingo-primary-active: #1E5A9E;
  --bingo-primary-pressed: #CDDDF0;
  --bingo-radius-sm: 4px;
  --bingo-radius-md: 8px;
  --bingo-radius-lg: 5px;
  --bingo-radius-xl: 16px;
  --bingo-radius-full: 9999px;
  --bingo-space-xs: 4px;
  --bingo-space-sm: 8px;
  --bingo-space-md: 12px;
  --bingo-space-lg: 16px;
  --bingo-space-xl: 24px;
  --bingo-space-2xl: 32px;
  --bingo-space-3xl: 48px;
  --bingo-font-xs: 11px;
  --bingo-font-sm: 12px;
  --bingo-font-base: 13px;
  --bingo-font-md: 14px;
  --bingo-font-lg: 16px;
  --bingo-font-xl: 18px;
  --bingo-font-2xl: 22px;
  --bingo-font-3xl: 28px;
  --bingo-font-4xl: 32px;
  --bingo-leading-tight: 1.2;
  --bingo-leading-snug: 1.4;
  --bingo-leading-normal: 1.5;
  --bingo-leading-relaxed: 1.7;
  --bingo-height-sm: 28px;
  --bingo-height-md: 36px;
  --bingo-height-lg: 44px;
  --bingo-sidebar-width: 260px;
  --bingo-sidebar-width-collapsed: 64px;
  --bingo-topbar-height: 60px;
  --bingo-transition-fast: .15s ease;
  --bingo-transition-base: .25s ease;
  --bingo-transition-slow: .4s ease;
  --bingo-z-dropdown: 1000;
  --bingo-z-sticky: 1020;
  --bingo-z-fixed: 1030;
  --bingo-z-modal-backdrop: 1040;
  --bingo-z-modal: 1050;
  --bingo-z-popover: 1060;
  --bingo-z-tooltip: 1070;
  --bingo-accent-blue-fg: #1FA6F8;
  --bingo-accent-blue-bg: #E6F5FF;
  --bingo-accent-blue-border: #80CEFD;
  --bingo-accent-green-fg: #07C100;
  --bingo-accent-green-bg: #E6FFF2;
  --bingo-accent-green-border: #4ADAA0;
  --bingo-accent-red-fg: #EA5E58;
  --bingo-accent-red-bg: #FFE0E0;
  --bingo-accent-red-border: #FF8080;
}

/* --- Light Theme (default) --- */
[data-theme=light] {
  --bingo-primary-light: #D6E6F5;
  --bingo-primary-lighter: #EBF2FA;
  --bingo-primary-border: #9FC5E8;
  --bingo-success: #10B981;
  --bingo-success-light: #F0FDF4;
  --bingo-success-border: #BBF7D0;
  --bingo-warning: #F59E0B;
  --bingo-warning-light: #FFFBEB;
  --bingo-warning-border: #FDE68A;
  --bingo-danger: #EF4444;
  --bingo-danger-light: #FEF2F2;
  --bingo-danger-border: #FECACA;
  --bingo-info: #6B7280;
  --bingo-info-light: #F3F4F6;
  --bingo-info-border: #D1D5DB;
  --bingo-text-1: #111827;
  --bingo-text-2: #374151;
  --bingo-text-3: #6B7280;
  --bingo-text-4: #9CA3AF;
  --bingo-text-white: #FFFFFF;
  --bingo-text-inverse: #FFFFFF;
  --bingo-bg-page: #F9FAFB;
  --bingo-bg-card: #FFFFFF;
  --bingo-bg-card-alt: #FFFFFF;
  --bingo-bg-hover: #F9FAFB;
  --bingo-bg-active: #F3F4F6;
  --bingo-bg-table-header: #f5f5f5;
  --bingo-bg-nav: #FFFFFF;
  --bingo-bg-mask: rgba(0, 0, 0, .45);
  --bingo-border: #D1D5DB;
  --bingo-border-light: #E5E7EB;
  --bingo-border-lighter: #F3F4F6;
  --bingo-border-extra-light: #F9FAFB;
  --bingo-shadow-xs: 0 0 0 1px rgba(17,24,39,.04), 0 1px 2px rgba(17,24,39,.04);
  --bingo-shadow-sm: 0 0 0 1px rgba(17,24,39,.04), 0 1px 2px rgba(17,24,39,.04), 0 1px 3px rgba(17,24,39,.06);
  --bingo-shadow-card: 0 0 0 1px rgba(17,24,39,.04), 0 1px 2px rgba(17,24,39,.04), 0 2px 8px rgba(17,24,39,.05);
  --bingo-shadow-md: 0 0 0 1px rgba(17,24,39,.05), 0 4px 8px rgba(17,24,39,.06), 0 8px 16px rgba(17,24,39,.04);
  --bingo-shadow-lg: 0 0 0 1px rgba(17,24,39,.05), 0 8px 16px rgba(17,24,39,.08), 0 16px 32px rgba(17,24,39,.06);
  --bingo-shadow-popup: 0 0 0 1px rgba(17,24,39,.06), 0 10px 20px rgba(17,24,39,.1), 0 20px 40px rgba(17,24,39,.08);
}

/* --- Dark Theme --- */
[data-theme=dark] {
  --bingo-primary-light: rgba(43,108,176,.2);
  --bingo-primary-lighter: rgba(43,108,176,.1);
  --bingo-primary-border: rgba(43,108,176,.4);
  --bingo-success: #07C100;
  --bingo-success-light: rgba(7,193,0,.15);
  --bingo-success-border: #4ADAA0;
  --bingo-warning: #F59E0B;
  --bingo-warning-light: rgba(245,158,11,.15);
  --bingo-warning-border: rgba(245,158,11,.4);
  --bingo-danger: #EA5E58;
  --bingo-danger-light: rgba(234,94,88,.15);
  --bingo-danger-border: #FF8080;
  --bingo-info: #AAAAAA;
  --bingo-info-light: rgba(170,170,170,.12);
  --bingo-info-border: #808080;
  --bingo-text-1: #FFFFFF;
  --bingo-text-2: #AAAAAA;
  --bingo-text-3: #A0A0A0;
  --bingo-text-4: #505050;
  --bingo-text-white: #FFFFFF;
  --bingo-text-inverse: #111827;
  --bingo-bg-page: #262626;
  --bingo-bg-card: #383838;
  --bingo-bg-card-alt: #2C2C2C;
  --bingo-bg-hover: #424242;
  --bingo-bg-active: #4C4C4C;
  --bingo-bg-table-header: #2C2C2C;
  --bingo-bg-nav: #2C2C2C;
  --bingo-bg-mask: rgba(0,0,0,.65);
  --bingo-border: #4C4C4C;
  --bingo-border-light: #424242;
  --bingo-border-lighter: #363636;
  --bingo-border-extra-light: #2C2C2C;
  --bingo-shadow-xs: 0 0 0 1px rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2);
  --bingo-shadow-sm: 0 0 0 1px rgba(0,0,0,.35), 0 2px 4px rgba(0,0,0,.3);
  --bingo-shadow-card: 0 0 0 1px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.35);
  --bingo-shadow-md: 0 0 0 1px rgba(0,0,0,.45), 0 4px 12px rgba(0,0,0,.4);
  --bingo-shadow-lg: 0 0 0 1px rgba(0,0,0,.5), 0 8px 24px rgba(0,0,0,.5);
  --bingo-shadow-popup: 0 0 0 1px rgba(0,0,0,.6), 0 12px 32px rgba(0,0,0,.55);
}

/* --- Reset & Base --- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { overscroll-behavior: none; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  color: var(--bingo-text-1);
  background: var(--bingo-bg-page);
  line-height: var(--bingo-leading-normal);
  overscroll-behavior: none;
}

/* --- Layout --- */
.dw-layout {
  display: flex;
  width: 100%;
  height: 100vh;
  background: var(--bingo-bg-page);
  overflow-x: hidden;
}

/* --- Sidebar --- */
.dw-sidebar {
  width: var(--bingo-sidebar-width);
  height: 100vh;
  background: var(--bingo-bg-nav);
  border-right: 1px solid var(--bingo-border-light);
  display: flex;
  flex-direction: column;
  transition: width .3s cubic-bezier(.16,1,.3,1), background var(--bingo-transition-base), border-color var(--bingo-transition-base);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}
.dw-sidebar.is-collapsed { width: var(--bingo-sidebar-width-collapsed); }

.dw-sidebar-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  height: var(--bingo-topbar-height);
  padding: 0 14px;
  border-bottom: 1px solid var(--bingo-border-light);
  flex-shrink: 0;
  cursor: pointer;
  transition: padding .3s ease;
}
.is-collapsed .dw-sidebar-logo { justify-content: center; padding: 0; }

.dw-logo-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--bingo-primary), var(--bingo-primary-active));
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  flex-shrink: 0;
  box-shadow: 0 2px 8px #2b6cb04d;
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.dw-sidebar-logo:hover .dw-logo-icon {
  transform: scale(1.08) rotate(-3deg);
  box-shadow: 0 4px 16px #2b6cb066;
}

.dw-logo-text { display: flex; flex-direction: column; min-width: 0; white-space: nowrap; }
.dw-logo-title { font-size: 16px; font-weight: 700; color: var(--bingo-text-1); line-height: 1.2; }
.dw-logo-sub { font-size: 10px; color: var(--bingo-text-3); line-height: 1.2; letter-spacing: .5px; }

/* Sidebar Menu */
.dw-sidebar-menu {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: var(--bingo-space-sm) 0;
  scrollbar-width: thin;
  scrollbar-color: var(--bingo-border-light) transparent;
}
.dw-sidebar-menu::-webkit-scrollbar { width: 4px; }
.dw-sidebar-menu::-webkit-scrollbar-thumb { background: var(--bingo-border-light); border-radius: 2px; }

/* Menu group */
.dw-menu-group {}
.dw-menu-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 700;
  color: var(--bingo-text-1);
  cursor: pointer;
  user-select: none;
  letter-spacing: .3px;
  transition: color var(--bingo-transition-fast);
}
.dw-menu-group-title:hover { color: var(--bingo-primary); }
.dw-menu-group-title i { font-size: 15px; width: 18px; text-align: center; }
.dw-menu-group-title .fa-chevron-down {
  margin-left: auto;
  font-size: 10px;
  transition: transform var(--bingo-transition-fast);
}
.dw-menu-group-title.is-open .fa-chevron-down { transform: rotate(180deg); }
.is-collapsed .dw-menu-group-title span,
.is-collapsed .dw-menu-group-title .fa-chevron-down { display: none; }

/* Menu item */
.dw-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 0 32px;
  height: 36px;
  font-size: 13px;
  color: var(--bingo-text-3);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--bingo-transition-fast);
  position: relative;
  border-radius: 0;
}
.dw-menu-item:hover {
  background: var(--bingo-primary-lighter);
  color: var(--bingo-primary);
}
.dw-menu-item:hover i { color: var(--bingo-primary); }
.dw-menu-item.active {
  background: var(--bingo-primary-lighter);
  color: var(--bingo-primary);
  font-weight: 600;
}
.dw-menu-item.active i { color: var(--bingo-primary); }
.dw-menu-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--bingo-primary);
  border-radius: 0 3px 3px 0;
}
.dw-menu-item i { width: 16px; text-align: center; font-size: 13px; flex-shrink: 0; color: var(--bingo-text-4); transition: color var(--bingo-transition-fast); }
.is-collapsed .dw-menu-item span { display: none; }
.is-collapsed .dw-menu-item { justify-content: center; padding: 0; }

/* --- Main Content Area --- */
.dw-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* --- Top Bar --- */
.dw-topbar {
  height: var(--bingo-topbar-height);
  background: var(--bingo-bg-card);
  border-bottom: 1px solid var(--bingo-border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--bingo-space-xl);
  flex-shrink: 0;
  z-index: 5;
}
.dw-topbar-left { display: flex; align-items: center; gap: var(--bingo-space-lg); }
.dw-sidebar-toggle {
  background: none; border: none; cursor: pointer; padding: var(--bingo-space-sm);
  color: var(--bingo-text-2); border-radius: var(--bingo-radius-sm); font-size: var(--bingo-font-lg);
}
.dw-sidebar-toggle:hover { background: var(--bingo-bg-hover); color: var(--bingo-primary); }
.dw-breadcrumb {
  font-size: var(--bingo-font-md); font-weight: 500; color: var(--bingo-text-1);
  display: flex; align-items: center; gap: 6px;
}
.dw-breadcrumb .fa-solid { color: var(--bingo-text-3); }
.dw-breadcrumb span:last-child { color: var(--bingo-text-1); font-weight: 600; }
.dw-user-area {
  display: flex;
  align-items: center;
  gap: var(--bingo-space-lg);
  font-size: var(--bingo-font-sm);
  color: var(--bingo-text-3);
  position: relative;
}
.dw-user-area a {
  color: var(--bingo-accent-red-fg);
  text-decoration: none;
  font-size: var(--bingo-font-sm);
}
.dw-user-area a:hover { text-decoration: underline; }

.dw-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: var(--bingo-radius-sm);
  transition: background var(--bingo-transition-fast);
}
.dw-user-info:hover { background: var(--bingo-bg-hover); }

.dw-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e6a23c;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

.dw-user-detail { display: flex; flex-direction: column; line-height: 1.4; }
.dw-user-name { font-size: 13px; font-weight: 600; color: var(--bingo-text-1); }
.dw-user-tenant { font-size: 12px; color: var(--bingo-text-3); }

.dw-user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: var(--bingo-bg-card);
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  min-width: 150px;
  padding: 4px 0;
  z-index: 100;
}
.dw-user-dropdown-item {
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--bingo-text-2);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.dw-user-dropdown-item:hover {
  background: var(--bingo-bg-hover);
  color: var(--bingo-primary);
}
.dw-user-dropdown-divider {
  height: 1px;
  background: var(--bingo-border-light);
  margin: 4px 0;
}

.dw-theme-toggle {
  background: none;
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-sm);
  padding: 4px 8px;
  cursor: pointer;
  color: var(--bingo-text-3);
  font-size: 14px;
  transition: all var(--bingo-transition-fast);
}
.dw-theme-toggle:hover { color: var(--bingo-primary); border-color: var(--bingo-primary); }

/* --- Content --- */
.dw-content {
  flex: 1;
  overflow: auto;
  padding: var(--bingo-space-xl);
  background: var(--bingo-bg-page);
}

/* --- Tab Bar --- */
.dw-tab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  padding: 0 8px;
  overflow-x: auto;
  white-space: nowrap;
}
.dw-tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 12px;
  cursor: pointer;
  background: #f0f0f0;
  color: #666;
  transition: all .15s ease;
  user-select: none;
}
.dw-tab-item:hover { background: #e8e8e8; }
.dw-tab-item.is-active {
  background: #E8F0FA;
  color: var(--bingo-primary);
  font-weight: 500;
}
.dw-tab-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: none;
  background: none;
  color: var(--bingo-primary);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  border-radius: 50%;
  padding: 0;
  opacity: 0.6;
}
.dw-tab-close:hover {
  opacity: 1;
  background: rgba(43, 108, 176, 0.12);
}

/* --- Tab Panels (iframes) --- */
.dw-tab-panels {
  flex: 1;
  position: relative;
  overflow: hidden;
}
.dw-tab-iframe {
  width: 100%;
  height: 100%;
  border: none;
  position: absolute;
  top: 0;
  left: 0;
  background: var(--bingo-bg-page);
}

/* --- Inner Page (inside iframe) --- */
.dw-inner-page {
  padding: var(--bingo-space-xl);
  background: var(--bingo-bg-page);
  min-height: 100vh;
  box-sizing: border-box;
}

/* --- Split Layout (left-right) --- */
.dw-split-layout {
  display: flex;
  gap: 0;
  height: calc(100vh - var(--bingo-topbar-height));
  margin: calc(-1 * var(--bingo-space-xl));
  background: var(--bingo-bg-card);
}
.dw-split-left {
  width: 220px;
  min-width: 220px;
  border-right: 1px solid var(--bingo-border-light);
  display: flex;
  flex-direction: column;
  background: var(--bingo-bg-card);
}
.dw-split-left-header {
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--bingo-text-1);
  border-bottom: 1px solid var(--bingo-border-light);
}
.dw-split-left-body {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}
.dw-split-left-item {
  padding: 8px 16px;
  font-size: 13px;
  color: var(--bingo-text-2);
  cursor: pointer;
  transition: all .15s ease;
  border-left: 3px solid transparent;
}
.dw-split-left-item:hover {
  background: var(--bingo-bg-page);
  color: var(--bingo-text-1);
}
.dw-split-left-item.is-active {
  background: #E8F0FA;
  color: var(--bingo-primary);
  font-weight: 500;
  border-left-color: var(--bingo-primary);
}
.dw-split-right {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
  padding: var(--bingo-space-xl);
  background: var(--bingo-bg-page);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: var(--bingo-height-md);
  font-size: var(--bingo-font-md);
  font-weight: 500;
  border: 1px solid var(--bingo-border);
  border-radius: var(--bingo-radius-md);
  cursor: pointer;
  transition: all var(--bingo-transition-fast);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1;
  background: var(--bingo-bg-page);
  color: var(--bingo-text-2);
}
.btn i { font-size: 12px; }
.btn:hover { background: var(--bingo-bg-hover); border-color: var(--bingo-text-4); }
.btn:disabled, .btn.disabled { opacity: .65; cursor: not-allowed; pointer-events: none; }

.btn-primary {
  background: linear-gradient(180deg, var(--bingo-primary-hover) 0%, var(--bingo-primary) 100%);
  border-color: var(--bingo-primary);
  color: var(--bingo-text-white);
  box-shadow: inset 0 1px #ffffff2e, 0 1px 2px #2b6cb040;
}
.btn-primary:hover {
  background: linear-gradient(180deg, #4A96D6 0%, var(--bingo-primary-hover) 100%);
  border-color: var(--bingo-primary-hover);
  box-shadow: inset 0 1px #fff3, 0 2px 4px #2b6cb04d;
}
.btn-primary:active {
  background: var(--bingo-primary-active);
  border-color: var(--bingo-primary-active);
}

.btn-secondary { background-color: #8897aa; border-color: #687386; color: #fff; }
.btn-info { background-color: var(--bingo-accent-blue-bg); border-color: var(--bingo-accent-blue-border); color: var(--bingo-accent-blue-fg); }
.btn-info:hover { background-color: var(--bingo-accent-blue-fg); color: #fff; }
.btn-success { background-color: var(--bingo-accent-green-bg); border-color: var(--bingo-accent-green-border); color: var(--bingo-accent-green-fg); }
.btn-success:hover { background-color: var(--bingo-accent-green-fg); color: #fff; }
.btn-danger { background-color: var(--bingo-accent-red-bg); border-color: var(--bingo-accent-red-border); color: var(--bingo-accent-red-fg); }
.btn-danger:hover { background-color: var(--bingo-accent-red-fg); color: #fff; }

.btn-link { background: none; border: none; color: var(--bingo-primary); padding: 0; height: auto; }
.btn-link:hover { color: var(--bingo-primary-active); text-decoration: underline; }

.btn-add, .btn-edit { background-color: var(--bingo-accent-blue-bg); border-color: var(--bingo-accent-blue-border); color: var(--bingo-accent-blue-fg); }
.btn-add:hover, .btn-edit:hover { background-color: var(--bingo-accent-blue-fg); color: #fff; }
.btn-export { background-color: var(--bingo-accent-green-bg); border-color: var(--bingo-accent-green-border); color: var(--bingo-accent-green-fg); }
.btn-export:hover { background-color: var(--bingo-accent-green-fg); color: #fff; }
.btn-delete { background-color: var(--bingo-accent-red-bg); border-color: var(--bingo-accent-red-border); color: var(--bingo-accent-red-fg); }
.btn-delete:hover { background-color: var(--bingo-accent-red-fg); color: #fff; }

.btn-sm { height: var(--bingo-height-sm); padding: 0 10px; font-size: var(--bingo-font-sm); }
.btn-sm i { font-size: 10px; }

/* --- Card / Panel --- */
.dw-card {
  background: var(--bingo-bg-card);
  border-radius: var(--bingo-radius-md);
  box-shadow: var(--bingo-shadow-card);
  border: 1px solid var(--bingo-border-lighter);
}
.dw-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--bingo-space-lg) var(--bingo-space-xl);
  border-bottom: 1px solid var(--bingo-border-lighter);
}
.dw-card-header h3 { font-size: var(--bingo-font-lg); font-weight: 600; color: var(--bingo-text-1); }
.dw-card-body { padding: var(--bingo-space-xl); }

/* --- Search Bar --- */
.dw-search-bar {
  display: flex;
  align-items: center;
  gap: var(--bingo-space-lg);
  padding: var(--bingo-space-lg) var(--bingo-space-xl);
  background: var(--bingo-bg-card);
  border-radius: var(--bingo-radius-md) var(--bingo-radius-md) 0 0;
  border: 1px solid var(--bingo-border-lighter);
  border-bottom: none;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  z-index: 5;
}
.dw-search-fields {
  display: flex;
  align-items: center;
  gap: var(--bingo-space-lg);
  flex-wrap: wrap;
}
.dw-search-field { display: flex; align-items: center; gap: var(--bingo-space-sm); }
.dw-search-field label { font-size: var(--bingo-font-sm); color: var(--bingo-text-3); white-space: nowrap; }
.dw-search-field input, .dw-search-field select {
  height: var(--bingo-height-sm);
  padding: 0 8px;
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-sm);
  font-size: var(--bingo-font-sm);
  background: var(--bingo-bg-card);
  color: var(--bingo-text-1);
  outline: none;
  transition: border-color var(--bingo-transition-fast);
  min-width: 140px;
}
.dw-search-field input:focus, .dw-search-field select:focus { border-color: var(--bingo-primary); }
.dw-search-actions { display: flex; align-items: center; gap: var(--bingo-space-sm); }
.dw-search-row { display: flex; align-items: center; gap: var(--bingo-space-lg); flex-wrap: wrap; }
.dw-toolbar-right { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.dw-toolbar-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-sm); background: var(--bingo-bg-card);
  color: var(--bingo-text-3); cursor: pointer; transition: all var(--bingo-transition-fast);
  font-size: 14px;
}
.dw-toolbar-icon:hover { color: var(--bingo-primary); border-color: var(--bingo-primary); }

/* --- Table --- */
.dw-table-wrap {
  background: var(--bingo-bg-card);
  border: 1px solid var(--bingo-border-lighter);
  border-radius: 0 0 var(--bingo-radius-md) var(--bingo-radius-md);
  overflow: auto;
  /* 表格区独立滚动：列头(thead)与上方搜索栏固定，不随表体上下滑动 */
  max-height: calc(100vh - 160px);
}
.dw-table { width: 100%; min-width: max-content; border-collapse: collapse; font-size: var(--bingo-font-md); }
.dw-table th {
  background: var(--bingo-bg-hover);
  color: var(--bingo-text-3);
  font-weight: 600;
  font-size: var(--bingo-font-sm);
  text-align: left;
  padding: 10px var(--bingo-space-lg);
  border-bottom: 1px solid var(--bingo-border-lighter);
  white-space: nowrap;
  letter-spacing: .3px;
}
.dw-table td {
  padding: 12px var(--bingo-space-lg);
  color: var(--bingo-text-1);
  border-bottom: 1px solid var(--bingo-border-lighter);
  line-height: var(--bingo-leading-snug);
  max-width: 300px;
  word-break: break-all;
}
.dw-table tbody tr:last-child td { border-bottom: none; }
.dw-table tbody tr:hover td { background: var(--bingo-primary-lighter); }
.dw-table .actions { white-space: nowrap; }
.dw-table-wrap thead th, .dw-sticky-head thead th { position: sticky; top: 0; z-index: 2; background: var(--bingo-bg-hover); }

/* 操作列冻结在右侧：sticky（z-index:auto）即可覆盖普通静态列，且不形成层叠上下文，
   避免把"更多"下拉(position:fixed)困在本单元格内、被下方同列遮挡 */
.dw-table td.actions {
  position: sticky;
  right: 0;
  background: var(--bingo-bg-card);
  box-shadow: inset 6px 0 6px -6px rgba(0,0,0,.12);
}
.dw-table tbody tr:hover td.actions { background: var(--bingo-primary-lighter); }
/* 「更多」下拉展开时，抬高该行操作格的层级，使其下拉(position:fixed)盖在下方同列之上 */
.dw-table td.actions:has(.dw-action-dropdown:not([style*="display: none"])) { z-index: 1000; }
/* 操作列表头（右上角，恒为末列）：top+right 同时吸住，层级高于表体 */
.dw-table-wrap:has(td.actions) thead th:last-child {
  right: 0;
  z-index: 3;
}

/* Action dropdown menu */
.dw-action-dropdown {
  background: var(--bingo-bg-card);
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-md);
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  min-width: 130px;
  padding: 4px 0;
}
.dw-action-item {
  padding: 8px 14px;
  cursor: pointer;
  font-size: var(--bingo-font-sm);
  color: var(--bingo-text-2);
  display: flex;
  align-items: center;
  gap: 8px;
}
.dw-action-item:hover { background: var(--bingo-bg-hover); color: var(--bingo-primary); }

/* Switch group (segmented toggle) */
.dw-switch-group {
  display: inline-flex;
  border: 1px solid var(--bingo-border);
  border-radius: 20px;
  overflow: hidden;
}
.dw-switch-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
  background: var(--bingo-bg-base);
  color: var(--bingo-text-3);
  transition: all .15s;
  user-select: none;
}
.dw-switch-item + .dw-switch-item { border-left: 1px solid var(--bingo-border); }
.dw-switch-item.is-active {
  background: var(--bingo-primary);
  color: #fff;
}
.dw-switch-item:hover:not(.is-active) { background: var(--bingo-bg-hover); }

/* Status tags */
.dw-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--bingo-radius-full);
  font-size: var(--bingo-font-xs);
  font-weight: 600;
  line-height: 18px;
}
.dw-tag-success { background: var(--bingo-success-light); color: var(--bingo-success); border: 1px solid var(--bingo-success-border); }
.dw-tag-warning { background: var(--bingo-warning-light); color: var(--bingo-warning); border: 1px solid var(--bingo-warning-border); }
.dw-tag-danger { background: var(--bingo-danger-light); color: var(--bingo-danger); border: 1px solid var(--bingo-danger-border); }
.dw-tag-info { background: var(--bingo-info-light); color: var(--bingo-info); border: 1px solid var(--bingo-info-border); }
.dw-tag-primary { background: var(--bingo-primary-lighter); color: var(--bingo-primary); border: 1px solid var(--bingo-primary-border); }

/* --- Pagination --- */
.dw-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--bingo-space-md) var(--bingo-space-lg);
  font-size: var(--bingo-font-sm);
  color: var(--bingo-text-3);
}
/* 分页位于表格滚动区内时，粘在底部固定，不随表体卷走；left:0 使横向滑动时分页钉在左侧不跟随 */
.dw-table-wrap > .dw-pagination {
  position: sticky;
  bottom: 0;
  left: 0;
  background: var(--bingo-bg-card);
  z-index: 2;
  border-top: 1px solid var(--bingo-border-lighter);
}
.dw-pagination-info { }
.dw-pagination-btns { display: flex; align-items: center; gap: var(--bingo-space-xs); }
.dw-pagination-btns button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-sm);
  background: var(--bingo-bg-card);
  color: var(--bingo-text-2);
  cursor: pointer;
  font-size: var(--bingo-font-sm);
  transition: all var(--bingo-transition-fast);
}
.dw-pagination-btns button:hover:not(:disabled) { border-color: var(--bingo-primary); color: var(--bingo-primary); }
.dw-pagination-btns button:disabled { opacity: .4; cursor: not-allowed; }
.dw-pagination-btns button.active {
  background: var(--bingo-primary);
  border-color: var(--bingo-primary);
  color: #fff;
}

/* --- Dialog / Modal --- */
.dw-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--bingo-bg-mask);
  z-index: var(--bingo-z-modal-backdrop);
  justify-content: center;
  align-items: center;
}
.dw-dialog-overlay.show { display: flex; }

.dw-dialog {
  background: var(--bingo-bg-card);
  border-radius: var(--bingo-radius-xl);
  box-shadow: var(--bingo-shadow-popup);
  width: 560px;
  max-width: 92vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: dwDialogIn .2s ease;
}
@keyframes dwDialogIn {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* --- Confirm Dialog --- */
.dw-confirm-overlay {
  position: fixed; inset: 0; background: var(--bingo-bg-mask);
  z-index: var(--bingo-z-modal-backdrop);
  display: flex; justify-content: center; align-items: center;
}
.dw-confirm {
  background: var(--bingo-bg-card); border-radius: var(--bingo-radius-xl);
  box-shadow: var(--bingo-shadow-popup); width: 400px; max-width: 90vw;
  display: flex; flex-direction: column; animation: dwDialogIn .2s ease;
}
.dw-confirm-header {
  display: flex; align-items: center;
  padding: var(--bingo-space-xl) var(--bingo-space-xl) var(--bingo-space-md);
}
.dw-confirm-header h3 { font-size: var(--bingo-font-lg); font-weight: 600; color: var(--bingo-text-1); }
.dw-confirm-body {
  padding: 0 var(--bingo-space-xl) var(--bingo-space-xl);
  color: var(--bingo-text-2); font-size: var(--bingo-font-md);
}
.dw-confirm-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: var(--bingo-space-md) var(--bingo-space-xl) var(--bingo-space-xl);
}
.dw-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--bingo-space-xl) var(--bingo-space-xl) var(--bingo-space-md);
}
.dw-dialog-header h3 { font-size: var(--bingo-font-lg); font-weight: 600; color: var(--bingo-text-1); }
.dw-dialog-close {
  width: 32px; height: 32px; border: none; background: var(--bingo-bg-hover);
  font-size: 18px; color: var(--bingo-text-4); cursor: pointer;
  border-radius: var(--bingo-radius-sm); display: flex; align-items: center; justify-content: center;
  transition: all var(--bingo-transition-fast);
}
.dw-dialog-close:hover { background: rgba(0,0,0,0.12); color: var(--bingo-text-2); }

.dw-dialog-body { padding: 0 var(--bingo-space-xl) var(--bingo-space-xl); overflow-y: auto; }
.dw-dialog-footer {
  padding: var(--bingo-space-md) var(--bingo-space-xl) var(--bingo-space-xl);
  display: flex;
  justify-content: flex-end;
  gap: var(--bingo-space-sm);
}

/* --- Form --- */
.dw-form-group { margin-bottom: var(--bingo-space-lg); }
.dw-form-group label {
  display: block;
  margin-bottom: var(--bingo-space-xs);
  font-size: var(--bingo-font-sm);
  font-weight: 500;
  color: var(--bingo-text-2);
}
.dw-form-group label .required { color: var(--bingo-danger); margin-left: 2px; }
.dw-form-input, .dw-form-select, .dw-form-textarea {
  width: 100%;
  height: var(--bingo-height-md);
  padding: 0 var(--bingo-space-md);
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-sm);
  font-size: var(--bingo-font-md);
  color: var(--bingo-text-1);
  background: var(--bingo-bg-card);
  outline: none;
  transition: border-color var(--bingo-transition-fast), box-shadow var(--bingo-transition-fast);
}
.dw-form-input:focus, .dw-form-select:focus, .dw-form-textarea:focus {
  border-color: var(--bingo-primary);
  box-shadow: 0 0 0 2px var(--bingo-primary-lighter);
}
.dw-form-input:disabled, .dw-form-select:disabled, .dw-form-textarea:disabled {
  background: var(--bingo-bg-table-header);
  color: var(--bingo-text-3);
  cursor: not-allowed;
}
.dw-form-textarea { height: auto; padding: var(--bingo-space-md); resize: vertical; min-height: 80px; }
.dw-form-input.error { border-color: var(--bingo-danger); }
.dw-date-range {
  display: flex;
  align-items: center;
  gap: var(--bingo-space-sm);
  position: relative;
  cursor: pointer;
}
.dw-date-range .dw-form-input { flex: 1; }
.dw-date-range-box { cursor: pointer; background: var(--bingo-bg-card); }
.dw-fp-hidden {
  position: absolute;
  width: 1px; height: 1px;
  border: 0; padding: 0;
  opacity: 0;
  pointer-events: none;
}
.dw-date-range-sep {
  flex-shrink: 0;
  color: var(--bingo-text-3);
  font-size: var(--bingo-font-sm);
}
.dw-multi-panel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  min-width: 200px;
  max-height: 220px;
  overflow-y: auto;
  background: var(--bingo-bg-card);
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-sm);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  padding: 4px 0;
}
.dw-multi-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: var(--bingo-font-sm);
  color: var(--bingo-text-1);
}
.dw-multi-item:hover { background: var(--bingo-bg-hover); }
.dw-multi-item input { width: 14px; height: 14px; cursor: pointer; }
.dw-multi-empty { padding: 12px; color: var(--bingo-text-4); font-size: var(--bingo-font-sm); }
.flatpickr-calendar.open { z-index: 100000 !important; }
.dw-form-readonly {
  height: var(--bingo-height-md);
  line-height: var(--bingo-height-md);
  padding: 0 var(--bingo-space-md);
  font-size: var(--bingo-font-md);
  color: var(--bingo-text-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --- Switch Toggle --- */
.dw-switch {
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--bingo-border);
  cursor: pointer;
  transition: background var(--bingo-transition-fast);
}
.dw-switch.active { background: var(--bingo-success); }
.dw-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
  transition: transform var(--bingo-transition-fast);
}
.dw-switch.active::after { transform: translateX(18px); }

/* --- Message Toast --- */
.dw-message {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: var(--bingo-z-tooltip);
  padding: 12px 20px;
  border-radius: var(--bingo-radius-md);
  font-size: var(--bingo-font-md);
  box-shadow: var(--bingo-shadow-md);
  animation: dwMsgIn .3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
@keyframes dwMsgIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }
.dw-message.success { background: var(--bingo-success-light); color: var(--bingo-success); border: 1px solid var(--bingo-success-border); }
.dw-message.error { background: var(--bingo-danger-light); color: var(--bingo-danger); border: 1px solid var(--bingo-danger-border); }
.dw-message.warning { background: var(--bingo-warning-light); color: var(--bingo-warning); border: 1px solid var(--bingo-warning-border); }

/* --- Toolbar --- */
.dw-toolbar {
  display: flex;
  align-items: center;
  padding: var(--bingo-space-md) 0;
  min-height: 40px;
}
.dw-toolbar-left {
  display: flex;
  align-items: center;
  gap: var(--bingo-space-sm);
  min-width: 0;
}

/* --- Column Toggle & Export Control Panel --- */
.dw-ctrl-panel {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  margin-left: auto;
  position: relative;
}
.dw-ctrl-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: var(--bingo-radius-sm);
  color: var(--bingo-text-3);
  transition: all 0.2s;
}
.dw-ctrl-btn:hover,
.dw-ctrl-btn.is-active {
  background: var(--bingo-bg-hover);
  color: var(--bingo-primary);
}
.dw-ctrl-btn svg {
  width: 16px;
  height: 16px;
}
.dw-ctrl-pop {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-md);
  box-shadow: 0 6px 24px rgba(0,0,0,.15);
  z-index: 9999;
  min-width: 160px;
  overflow: hidden;
}
[data-theme="dark"] .dw-ctrl-pop {
  background: #2a2a2a;
  box-shadow: 0 6px 24px rgba(0,0,0,.6);
}
.dw-ctrl-pop-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid var(--bingo-border-light);
  font-size: 14px;
  font-weight: 600;
  color: var(--bingo-text-1);
}
.dw-ctrl-pop-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: none;
  background: none;
  cursor: pointer;
  color: var(--bingo-text-4);
  border-radius: 2px;
  padding: 0;
}
.dw-ctrl-pop-close:hover {
  color: var(--bingo-text-2);
  background: var(--bingo-bg-hover);
}
.dw-ctrl-pop-body {
  padding: 6px 0;
  max-height: 280px;
  overflow-y: auto;
}
.dw-ctrl-col-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
  color: var(--bingo-text-2);
  transition: all 0.15s;
  user-select: none;
}
.dw-ctrl-col-item:hover {
  background: var(--bingo-bg-hover);
}
.dw-ctrl-col-item.is-active {
  color: var(--bingo-text-1);
}
.dw-ctrl-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--bingo-border);
  border-radius: 3px;
  flex-shrink: 0;
  transition: all 0.15s;
}
.dw-ctrl-col-item.is-active .dw-ctrl-checkbox {
  background: var(--bingo-primary);
  border-color: var(--bingo-primary);
  color: #fff;
}
.dw-ctrl-checkbox svg {
  width: 10px;
  height: 10px;
}
.dw-ctrl-col-label {
  white-space: nowrap;
}

/* --- Login Page --- */
.login-page {
  width: 100vw;
  height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  z-index: 0;
  filter: hue-rotate(190deg) saturate(0.8);
}
.login-bg-fill {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}
.login-shell {
  position: relative;
  z-index: 1;
  width: 440px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  margin-left: auto;
  background: var(--bingo-bg-card);
  border-left: 1px solid var(--bingo-border-light);
}
.login-panel {
  width: 100%;
  display: flex;
  flex-direction: column;
}
.login-brand-wrap {
  margin-bottom: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.login-logo { height: 44px; width: auto; }
.login-brand-text {}
.login-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--bingo-text-1);
  line-height: 1.2;
}
.login-subtitle-wrap { display: flex; align-items: baseline; gap: 8px; }
.login-subtitle {
  font-size: 12px;
  color: var(--bingo-text-4);
  font-weight: 400;
}
.login-version {
  font-size: 10px;
  color: var(--bingo-text-4);
}
.login-field { margin-bottom: 20px; }
.login-field label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--bingo-font-sm);
  font-weight: 500;
  color: var(--bingo-text-2);
}
.login-field input, .login-field select {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-md);
  font-size: var(--bingo-font-md);
  color: var(--bingo-text-1);
  background: var(--bingo-bg-card);
  outline: none;
  transition: border-color var(--bingo-transition-fast), box-shadow var(--bingo-transition-fast);
}
.login-field input:focus, .login-field select:focus {
  border-color: var(--bingo-primary);
  box-shadow: 0 0 0 3px var(--bingo-primary-lighter);
}
.login-btn {
  width: 100%;
  height: 42px;
  background: linear-gradient(135deg, var(--bingo-primary) 0%, var(--bingo-primary-hover) 100%);
  border: none;
  border-radius: var(--bingo-radius-md);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--bingo-transition-fast);
  box-shadow: 0 2px 8px #2b6cb04d;
}
.login-btn:hover { box-shadow: 0 4px 16px #2b6cb066; transform: translateY(-1px); }
.login-btn:active { transform: translateY(0); }
.login-footnote {
  margin-top: 24px;
  font-size: 11px;
  color: var(--bingo-text-4);
  text-align: center;
}
.login-error {
  padding: 10px 14px;
  background: var(--bingo-danger-light);
  border: 1px solid var(--bingo-danger-border);
  border-radius: var(--bingo-radius-md);
  color: var(--bingo-danger);
  font-size: var(--bingo-font-sm);
  margin-bottom: 16px;
}
.login-history-dropdown {
  position: absolute;
  left: 0; right: 0;
  top: 100%;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  z-index: 10;
  margin-top: -2px;
  overflow: hidden;
}
.login-history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  font-size: 12px;
  color: #999;
  border-bottom: 1px solid #f0f0f0;
}
.login-history-close {
  cursor: pointer;
  font-size: 16px;
  color: #999;
  line-height: 1;
}
.login-history-close:hover { color: #666; }
.login-history-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f0f0f0;
  transition: background var(--bingo-transition-fast);
}
.login-history-item:last-child { border-bottom: none; }
.login-history-item:hover { background: #f5f7fa; }
.login-history-user {
  font-size: 14px;
  color: #333;
}
.login-history-tenant {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* --- Empty State --- */
.dw-empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--bingo-text-4);
}
.dw-empty i { font-size: 48px; margin-bottom: 16px; display: block; }
.dw-empty p { font-size: var(--bingo-font-md); }

/* --- Placeholder Page --- */
.dw-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  color: var(--bingo-text-3);
  gap: var(--bingo-space-lg);
}
.dw-placeholder i { font-size: 64px; color: var(--bingo-text-4); }
.dw-placeholder h2 { font-size: var(--bingo-font-2xl); font-weight: 600; color: var(--bingo-text-2); }
.dw-placeholder p { font-size: var(--bingo-font-md); }

/* --- Utility --- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-primary { color: var(--bingo-primary); }
.text-success { color: var(--bingo-success); }
.text-danger { color: var(--bingo-danger); }
.text-warning { color: var(--bingo-warning); }
.text-muted { color: var(--bingo-text-3); }
.fw-600 { font-weight: 600; }
.mb-sm { margin-bottom: var(--bingo-space-sm); }
.mb-md { margin-bottom: var(--bingo-space-md); }
.mb-lg { margin-bottom: var(--bingo-space-lg); }
.mt-md { margin-top: var(--bingo-space-md); }
.gap-sm { gap: var(--bingo-space-sm); }
.gap-md { gap: var(--bingo-space-md); }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* --- Tab Container (参数配置等) --- */
.dw-tab-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 160px);
  overflow: hidden;
}
.dw-tabs-header {
  flex-shrink: 0;
  background: var(--bingo-bg-card);
  border-radius: var(--bingo-radius-lg) var(--bingo-radius-lg) 0 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.dw-tabs-nav {
  display: flex;
  border-bottom: 1px solid var(--bingo-border-light);
}
.dw-tabs-item {
  padding: 12px 24px;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  font-size: 14px;
  color: var(--bingo-text-3);
  transition: color 0.2s;
}
.dw-tabs-item:hover {
  color: var(--bingo-text-1);
}
.dw-tabs-item.is-active {
  color: var(--bingo-primary);
  font-weight: 600;
  border-bottom-color: var(--bingo-primary);
}
.dw-content-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  min-height: 0;
  background: var(--bingo-bg-card);
  border-radius: 0 0 var(--bingo-radius-lg) var(--bingo-radius-lg);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
  overflow: hidden;
  padding: 16px 20px;
}

/* --- Tip Alert (配置页面提示) --- */
.dw-tip-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  background: #EBF5FF;
  border: 1px solid #D0E7FF;
  border-radius: var(--bingo-radius-md);
  margin-bottom: 12px;
  font-size: 13px;
  color: #3B82F6;
  line-height: 1.6;
  flex-shrink: 0;
}
[data-theme="dark"] .dw-tip-alert {
  background: rgba(59,130,246,0.1);
  border-color: rgba(59,130,246,0.2);
  color: #93C5FD;
}
.dw-tip-alert > i {
  font-size: 16px;
  margin-top: 2px;
  flex-shrink: 0;
}
.dw-tip-alert-body {
  flex: 1;
}
.dw-tip-alert-body code {
  background: rgba(255,255,255,0.6);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
}
[data-theme="dark"] .dw-tip-alert-body code {
  background: rgba(255,255,255,0.1);
}
.dw-tip-alert-body ul {
  margin: 4px 0 0 18px;
  padding: 0;
  list-style: disc;
}
.dw-tip-alert-body li {
  margin: 2px 0;
}

/* --- Config Textarea --- */
.dw-config-textarea {
  flex: 1;
  min-height: 0;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--bingo-border-light);
  border-radius: var(--bingo-radius-md);
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  background: var(--bingo-bg);
  color: var(--bingo-text-1);
  box-sizing: border-box;
}
.dw-config-textarea:disabled {
  background: var(--bingo-bg-card);
  cursor: default;
}
.dw-config-textarea::placeholder {
  color: var(--bingo-text-4);
}

/* --- Config Actions --- */
.dw-config-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 10px;
  flex-shrink: 0;
}
