/* ==========================================================================
   GC Team 财务协同管理系统 - 核心样式表 (Vanilla CSS v4.0)
   包含：极致美感 Fintech 磨砂拟态登录屏、深蓝金融风控制台、客户余额池与多维表格
   ========================================================================== */

:root {
  /* 品牌与基色系统 */
  --primary: #1e3a8a;        /* 经典深蓝 */
  --primary-hover: #172554;
  --primary-light: #eff6ff;
  --primary-border: #bfdbfe;
  
  --secondary: #0f766e;      /* 质感青绿 */
  --secondary-light: #f0fdfa;
  
  --bg-app: #f8fafc;         /* 浅灰底色 */
  --bg-card: #ffffff;
  --bg-sidebar: #0f172a;     /* 极深蓝黑侧栏 */
  --sidebar-text: #94a3b8;
  --sidebar-hover: #1e293b;
  --sidebar-active: #2563eb;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;
  
  --border: #e2e8f0;
  --border-focus: #3b82f6;
  
  /* 状态色 */
  --danger: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --danger-text: #991b1b;
  
  --success: #16a34a;
  --success-bg: #f0fdf4;
  --success-text: #166534;
  
  --warning: #d97706;
  --warning-bg: #fffbeb;
  
  /* 阴影与圆角 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.06), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.03);
  --shadow-modal: 0 20px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  
  --font-family: 'Plus Jakarta Sans', 'Noto Sans SC', system-ui, -apple-system, sans-serif;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ==========================================================================
   🌟 极致美感 Fintech 磨砂拟态登录屏
   ========================================================================== */
.login-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #0b0f19;
  background-image: 
    radial-gradient(at 15% 15%, rgba(37, 99, 235, 0.18) 0px, transparent 50%),
    radial-gradient(at 85% 85%, rgba(15, 118, 110, 0.22) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(15, 23, 42, 0.8) 0px, transparent 100%);
  position: relative;
  overflow: hidden;
  padding: 24px;
}

/* 环境微光光球 */
.glow-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}

.orb-1 {
  width: 380px;
  height: 380px;
  background: rgba(37, 99, 235, 0.25);
  top: -100px;
  left: -80px;
  animation: floatOrb 8s ease-in-out infinite alternate;
}

.orb-2 {
  width: 320px;
  height: 320px;
  background: rgba(13, 148, 136, 0.22);
  bottom: -60px;
  right: -60px;
  animation: floatOrb 10s ease-in-out infinite alternate-reverse;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(40px, 30px) scale(1.1); }
}

/* 磨砂玻璃卡片 */
.login-card-glass {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 440px;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-xl);
  padding: 40px 36px;
  box-shadow: 
    0 30px 60px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05) inset;
  animation: loginCardAppear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes loginCardAppear {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.login-brand {
  text-align: center;
  margin-bottom: 30px;
}

.brand-badge-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
}

.login-logo-glow {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #0d9488);
  color: #ffffff;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 0.5px;
  box-shadow: 0 0 25px rgba(59, 130, 246, 0.5);
}

.brand-pulse-status {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #22c55e;
  border-radius: 50%;
  box-shadow: 0 0 8px #22c55e;
  animation: pulseLight 2s infinite;
}

@keyframes pulseLight {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

.pulse-text {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  letter-spacing: 0.3px;
}

.login-title {
  font-size: 22px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: -0.3px;
}

.login-subtitle {
  font-size: 12.5px;
  color: #94a3b8;
  margin-top: 5px;
}

/* 登录表单控件 */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group-login {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group-login label {
  font-size: 12px;
  font-weight: 600;
  color: #cbd5e1;
  letter-spacing: 0.2px;
}

.login-input-box {
  position: relative;
  display: flex;
  align-items: center;
}

.login-icon {
  position: absolute;
  left: 14px;
  color: #64748b;
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: var(--transition);
}

.login-input {
  width: 100%;
  background: rgba(30, 41, 59, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #f8fafc;
  padding: 12px 14px 12px 42px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  font-family: inherit;
  outline: none;
  transition: var(--transition);
}

.login-input::placeholder {
  color: #64748b;
}

.login-input:focus {
  background: rgba(30, 41, 59, 0.95);
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.login-input:focus + .login-icon,
.login-input:focus ~ .login-icon {
  color: #3b82f6;
}

.btn-toggle-pwd {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: var(--transition);
}

.btn-toggle-pwd:hover {
  color: #cbd5e1;
}

/* 登录按钮 */
.btn-login-primary {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-md);
  font-size: 14.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 10px 20px -5px rgba(37, 99, 235, 0.5);
  transition: var(--transition);
  margin-top: 6px;
}

.btn-login-primary:hover {
  background: linear-gradient(135deg, #1d4ed8, #1e40af);
  box-shadow: 0 12px 25px -4px rgba(37, 99, 235, 0.7);
  transform: translateY(-1px);
}

.btn-login-primary:active {
  transform: translateY(0);
}

.login-alert {
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  font-weight: 600;
  text-align: center;
  animation: shake 0.3s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

.login-card-footer {
  text-align: center;
  font-size: 11.5px;
  color: #64748b;
  margin-top: 6px;
}

/* ==========================================================================
   主布局结构 (与之前一致)
   ========================================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 260px;
  background-color: var(--bg-sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 50;
}

.brand-container {
  padding: 24px 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-logo {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #2563eb, #0f766e);
  color: #fff;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.3);
}

.brand-title {
  font-size: 17px;
  font-weight: 700;
  color: #f8fafc;
  letter-spacing: -0.2px;
}

.brand-subtitle {
  font-size: 11px;
  color: var(--sidebar-text);
  display: block;
}

/* 导航菜单 */
.nav-menu {
  flex: 1;
  padding: 20px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: #64748b;
  font-weight: 600;
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: transparent;
  border: none;
  color: var(--sidebar-text);
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.nav-item:hover {
  background-color: var(--sidebar-hover);
  color: #f8fafc;
}

.nav-item.active {
  background-color: var(--sidebar-active);
  color: #ffffff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.nav-icon {
  font-size: 16px;
}

.badge {
  margin-left: auto;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  font-weight: 600;
}

.tag-alert-dot {
  background: #dc2626 !important;
  color: #ffffff !important;
  padding: 0 6px !important;
  font-weight: 800 !important;
}

.nav-item.active .badge {
  background: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

/* 用户挂件与退出按钮 */
.user-profile-widget {
  padding: 16px;
  margin: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-gap: 8px 10px;
  align-items: center;
}

.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #3b82f6;
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.user-details {
  overflow: hidden;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #f8fafc;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.user-role {
  font-size: 11px;
  color: #38bdf8;
  font-weight: 500;
}

.btn-widget-link {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 11.5px;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: var(--transition);
}

.btn-widget-link:hover {
  color: #38bdf8;
  background: rgba(255, 255, 255, 0.05);
}

/* 主内容区域 */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
}

/* 顶部操作条 */
.top-header {
  background: #ffffff;
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
}

.page-desc {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 按钮规范 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}

.btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}

.btn-primary {
  background-color: var(--primary);
  color: #ffffff;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

.btn-secondary {
  background-color: #f1f5f9;
  color: var(--text-main);
  border-color: #e2e8f0;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
}

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-muted);
}

.btn-outline:hover {
  background: #f8fafc;
  color: var(--text-main);
}

.btn-success {
  background-color: var(--secondary);
  color: #ffffff;
}

.btn-success:hover {
  background-color: #115e59;
}

.btn-text {
  background: transparent;
  border: none;
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.btn-text:hover {
  text-decoration: underline;
}

/* 页面内容区 */
.content-body {
  padding: 30px 32px;
}

.tab-pane {
  display: none;
  animation: fadeIn 0.25s ease-out;
}

.tab-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* KPI 网格卡片 */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.kpi-card {
  background: var(--bg-card);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.kpi-card.highlight-card {
  background: linear-gradient(to bottom right, #ffffff, #f0fdfa);
  border-color: #99f6e4;
}

.kpi-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kpi-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-tag {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.tag-blue { background: #dbeafe; color: #1e40af; }
.tag-teal { background: #ccfbf1; color: #115e59; }
.tag-green { background: #dcfce7; color: #166534; }
.tag-gray { background: #f1f5f9; color: #475569; }

.kpi-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-main);
  margin: 14px 0 6px;
  letter-spacing: -0.5px;
}

.kpi-footer {
  font-size: 12px;
  color: var(--text-subtle);
}

/* 警示横幅 */
.alert-banner {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  animation: fadeIn 0.3s ease-in-out;
}

.alert-banner .alert-icon {
  font-size: 20px;
}

.alert-banner .alert-content {
  flex: 1;
  font-size: 13px;
  color: #92400e;
}

/* 客户广告余额卡片列表 */
.balance-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.balance-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: var(--transition);
}

.balance-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.balance-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.balance-card-company {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

.balance-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
}

.status-safe { background: #dcfce7; color: #15803d; }
.status-warning { background: #fef3c7; color: #b45309; }
.status-danger { background: #fee2e2; color: #b91c1c; }

.balance-amount-display {
  margin: 10px 0;
}

.balance-amount-label {
  font-size: 12px;
  color: var(--text-muted);
}

.balance-amount-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.balance-sub-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
  font-size: 12px;
}

.balance-sub-item span {
  display: block;
  color: var(--text-muted);
}

.balance-sub-item strong {
  color: var(--text-main);
  font-size: 13px;
}

.balance-card-action {
  margin-top: 14px;
}

/* 看板图表分析网格 */
.dashboard-analytics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.analytics-card {
  background: var(--bg-card);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-main);
}

.card-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* 统计条列表 */
.breakdown-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.breakdown-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.breakdown-info {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
}

.breakdown-bar-bg {
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
}

.breakdown-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fill-blue { background: #2563eb; }
.fill-teal { background: #0f766e; }
.fill-orange { background: #ea580c; }
.fill-indigo { background: #6366f1; }

/* 筛选工具栏 */
.filter-bar {
  background: var(--bg-card);
  padding: 16px 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
}

.filter-actions {
  display: flex;
  gap: 10px;
}

/* 表单控件 */
.input-control, .select-control {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-family: inherit;
  color: var(--text-main);
  background: #ffffff;
  outline: none;
  transition: var(--transition);
}

.input-control:focus, .select-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.textarea-control {
  min-height: 80px;
  resize: vertical;
}

/* 表格容器与样式 */
.table-container {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.recent-container {
  padding: 20px;
}

.recent-container .table-wrapper {
  margin-top: 10px;
}

.table-wrapper {
  overflow-x: auto;
  width: 100%;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13.5px;
}

.data-table th {
  background-color: #f8fafc;
  color: #475569;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tbody tr:hover {
  background-color: #f8fafc;
}

.tr-overspent {
  background-color: #fff5f5 !important;
}

.variance-over {
  color: var(--danger-text);
  font-weight: 700;
  background: var(--danger-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.variance-under {
  color: var(--success-text);
  font-weight: 600;
  background: var(--success-bg);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  display: inline-block;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-success { color: var(--success); }
.font-bold { font-weight: 700; }

.table-footer {
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f8fafc;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
}

.table-summary-strip {
  display: flex;
  gap: 20px;
  font-weight: 600;
  color: var(--text-main);
}

/* 参数字典卡片 */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.settings-card {
  background: var(--bg-card);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.settings-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.settings-card-head h3 {
  font-size: 15px;
  font-weight: 700;
}

.tag-input-box {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tag-input-box input {
  flex: 1;
}

.dictionary-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.dict-tag {
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  color: var(--text-main);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dict-tag-del {
  cursor: pointer;
  color: #94a3b8;
  font-weight: 700;
  font-size: 14px;
}

.dict-tag-del:hover {
  color: var(--danger);
}

/* 预留模块卡片 */
.module-header-box {
  background: var(--bg-card);
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.box-info h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 4px;
}

.box-info p {
  font-size: 13px;
  color: var(--text-muted);
}

/* 弹窗 Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 640px;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: var(--text-muted);
  cursor: pointer;
}

.modal-card form {
  padding: 24px;
  overflow-y: auto;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
}

.required {
  color: var(--danger);
}

.calc-preview-box {
  background: #f8fafc;
  border: 1px dashed var(--border);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}

.modal-footer {
  padding-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
}

/* Toast 提示 */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideInRight 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* 响应式适配 */
@media (max-width: 900px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .top-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 20px;
  }
  .content-body {
    padding: 20px;
  }
  .dashboard-analytics-grid {
    grid-template-columns: 1fr;
  }
}
