/* ============================================================
   蚁群劳务管理系统 V6.1 — 主样式表
   设计方向：中国政府网站风格
   参考：国务院发展研究中心 + 人民法院在线服务网
   核心原则：庄重、权威、信息密集
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
  /* 政务红体系（网页版默认主色）—— --gov-red 为主色变量，--gov-primary 为等价别名 */
  --gov-primary:        #C41230;
  --gov-primary-dark:   #A00E28;
  --gov-primary-light:  #D4344E;
  --gov-primary-bg:     #FDF2F4;
  --gov-red:            #C41230;
  --gov-red-dark:       #A00E28;
  --gov-red-light:      #D4344E;
  --gov-red-bg:         #FDF2F4;

  /* 宫墙红（登录页） */
  --palace-red:         #8B1A1A;
  --palace-red-dark:    #7A0A18;

  /* 金色点缀 */
  --gov-gold:           #C49B2A;
  --gov-gold-light:     #FDF8EC;

  /* 链接蓝 */
  --gov-blue-link:      #1559B5;

  /* 背景 */
  --gov-bg:             #F5F5F5;
  --gov-content-bg:     #FFFFFF;
  --gov-card-bg:        #FCFCFC;

  /* 文字 */
  --gov-text:           #222222;
  --gov-text-secondary: #666666;
  --gov-text-muted:     #999999;
  --gov-text-inverse:   #FFFFFF;

  /* 边框 */
  --gov-border:         #E0E0E0;
  --gov-border-light:   #EEEEEE;

  /* 状态色 */
  --color-success:      #1B7B3D;
  --color-success-bg:   #EAF7EE;
  --color-success-dark: #145A2C;
  --color-warning:      #C06200;
  --color-warning-bg:   #FFF6EB;
  --color-warning-dark: #8B4500;
  --color-danger:       #C41230;
  --color-danger-bg:    #FDF2F4;
  --color-danger-dark:  #8B0D1E;
  --color-info:         #1559B5;
  --color-info-bg:      #EDF4FC;

  /* 布局 */
  --gov-header-height:  66px;
  --gov-nav-height:     48px;
  --content-max-width:  1200px;

  /* 阴影（政府风格 — 轻微克制） */
  --shadow-xs:  0 1px 1px rgba(0,0,0,0.04);
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --shadow:     0 1px 4px rgba(0,0,0,0.08);
  --shadow-md:  0 2px 8px rgba(0,0,0,0.10);
  --shadow-lg:  0 4px 20px rgba(0,0,0,0.15);

  /* 圆角 */
  --radius-xs:  2px;
  --radius-sm:  4px;
  --radius:     4px;
  --radius-lg:  6px;
  --radius-full: 9999px;

  /* 过渡 */
  --transition-fast: 0.12s ease;
  --transition:      0.18s ease;
  --transition-slow: 0.3s ease;

  /* 字体 */
  --font-sans: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Source Han Sans SC", "Noto Sans SC", "WenQuanYi Micro Hei", sans-serif;
  --font-heading: "SimHei", "黑体", "Heiti SC", "Microsoft YaHei", sans-serif;
  --font-mono: "SF Mono", "JetBrains Mono", "Consolas", "Courier New", monospace;

  /* 登录页/启动页渐变（节日皮肤通过覆盖这两个变量实现全视觉换肤） */
  --login-gradient:  linear-gradient(180deg, #C41230 0%, #8B1A1A 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #b31224 0%, #7a0a18 52%, #4a060e 100%);
}

/* 政务蓝主题 —— 微信小程序 WebView 环境自动切换（data-theme="govblue"） */
[data-theme="govblue"] {
  --gov-primary:        #1B5AA8;
  --gov-primary-dark:   #14447E;
  --gov-primary-light:  #4A83C7;
  --gov-primary-bg:     #EDF2FA;
  --gov-red:            #1B5AA8;
  --gov-red-dark:       #14447E;
  --gov-red-light:      #4A83C7;
  --gov-red-bg:         #EDF2FA;
  --palace-red:         #14447E;
  --palace-red-dark:    #0F3A6E;
  --login-gradient:  linear-gradient(180deg, #1B5AA8 0%, #0F3A6E 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #1B5AA8 0%, #14447E 52%, #0B2B52 100%);
}

/* 粉红主题 */
[data-theme="pink"] {
  --gov-primary:        #EC407A;
  --gov-primary-dark:   #C2185B;
  --gov-primary-light:  #F06292;
  --gov-primary-bg:     #FDF1F6;
  --gov-red:            #EC407A;
  --gov-red-dark:       #C2185B;
  --gov-red-light:      #F06292;
  --gov-red-bg:         #FDF1F6;
  --palace-red:         #C2185B;
  --palace-red-dark:    #A0134E;
  --login-gradient:  linear-gradient(180deg, #EC407A 0%, #A0134E 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #EC407A 0%, #C2185B 52%, #8A1044 100%);
}

/* 金黄主题 */
[data-theme="gold"] {
  --gov-primary:        #C08A00;
  --gov-primary-dark:   #966C00;
  --gov-primary-light:  #D9B23C;
  --gov-primary-bg:     #FBF4E4;
  --gov-red:            #C08A00;
  --gov-red-dark:       #966C00;
  --gov-red-light:      #D9B23C;
  --gov-red-bg:         #FBF4E4;
  --palace-red:         #966C00;
  --palace-red-dark:    #6E4F00;
  --login-gradient:  linear-gradient(180deg, #C08A00 0%, #6E4F00 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #C08A00 0%, #966C00 52%, #5E4400 100%);
}

/* 翠绿主题 */
[data-theme="green"] {
  --gov-primary:        #2E7D32;
  --gov-primary-dark:   #1B5E20;
  --gov-primary-light:  #4C9A50;
  --gov-primary-bg:     #EDF6EE;
  --gov-red:            #2E7D32;
  --gov-red-dark:       #1B5E20;
  --gov-red-light:      #4C9A50;
  --gov-red-bg:         #EDF6EE;
  --palace-red:         #1B5E20;
  --palace-red-dark:    #14421A;
  --login-gradient:  linear-gradient(180deg, #2E7D32 0%, #14421A 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #2E7D32 0%, #1B5E20 52%, #103F15 100%);
}

/* 暖橙主题 */
[data-theme="orange"] {
  --gov-primary:        #E65100;
  --gov-primary-dark:   #B23C00;
  --gov-primary-light:  #F07A2A;
  --gov-primary-bg:     #FDF1E8;
  --gov-red:            #E65100;
  --gov-red-dark:       #B23C00;
  --gov-red-light:      #F07A2A;
  --gov-red-bg:         #FDF1E8;
  --palace-red:         #B23C00;
  --palace-red-dark:    #8A2E00;
  --login-gradient:  linear-gradient(180deg, #E65100 0%, #8A2E00 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #E65100 0%, #B23C00 52%, #7A2B00 100%);
}

/* 紫罗兰主题 */
[data-theme="purple"] {
  --gov-primary:        #6A4FA3;
  --gov-primary-dark:   #4E3A7A;
  --gov-primary-light:  #8A72C0;
  --gov-primary-bg:     #F4F0FA;
  --gov-red:            #6A4FA3;
  --gov-red-dark:       #4E3A7A;
  --gov-red-light:      #8A72C0;
  --gov-red-bg:         #F4F0FA;
  --palace-red:         #4E3A7A;
  --palace-red-dark:    #3B2C5E;
  --login-gradient:  linear-gradient(180deg, #6A4FA3 0%, #3B2C5E 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #6A4FA3 0%, #4E3A7A 52%, #332652 100%);
}

/* 深青主题 */
[data-theme="teal"] {
  --gov-primary:        #00838F;
  --gov-primary-dark:   #006064;
  --gov-primary-light:  #26A5B3;
  --gov-primary-bg:     #EAF5F6;
  --gov-red:            #00838F;
  --gov-red-dark:       #006064;
  --gov-red-light:      #26A5B3;
  --gov-red-bg:         #EAF5F6;
  --palace-red:         #006064;
  --palace-red-dark:    #00474D;
  --login-gradient:  linear-gradient(180deg, #00838F 0%, #00474D 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #00838F 0%, #006064 52%, #003C40 100%);
}

/* ============================================================
   Base / Reset
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 20px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* 阻止浏览器把「横向边缘滑动」识别成前进/后退导航（防止误退出系统） */
  overscroll-behavior-x: none;
}

body {
  font-family: var(--font-sans);
  background: var(--gov-bg);
  color: var(--gov-text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  /* 只允许纵向滚动，禁用横向手势，避免误触发浏览器返回 */
  touch-action: pan-y;
}

a { color: var(--gov-blue-link); text-decoration: none; transition: color var(--transition-fast); }
a:hover { color: var(--gov-red); }

input, select, textarea, button {
  font-family: inherit;
  font-size: inherit;
}

/* ============================================================
   Layout — 顶部结构
   ============================================================ */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* 主内容区域 */
.gov-content {
  flex: 1;
  background: var(--gov-bg);
  padding-top: calc(var(--gov-header-height) + var(--gov-nav-height));
}

.gov-content-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  padding: 20px 24px 40px;
  position: relative;
  z-index: 1;
}

/* 水印 */
.gov-watermark {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: clamp(60px, 8vw, 120px);
  font-weight: 900;
  color: rgba(196, 18, 48,0.025);
  white-space: nowrap;
  pointer-events: none;
  z-index: 0;
  letter-spacing: 0.4em;
  user-select: none;
}

/* ============================================================
   Header Bar — 顶部政务蓝标识栏
   ============================================================ */
.gov-header {
  height: var(--gov-header-height);
  background: linear-gradient(180deg, var(--gov-red), var(--gov-red-dark));
  color: var(--gov-text-inverse);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.gov-header-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.gov-header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.gov-header-emblem {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
}

.ant-logo-svg {
  width: 36px;
  height: 36px;
  display: block;
}

/* 各角色蚂蚁颜色 */
.ant-role-boss        { color: #C49B2A; } /* 金色 — 老板 */
.ant-role-finance     { color: #D4648A; } /* 玫瑰金 — 财务（女） */
.ant-role-procurement { color: #E8701A; } /* 橙色 — 采购 */
.ant-role-pm          { color: #2C5F9E; } /* 蓝色 — 项目负责人 */
.ant-role-admin       { color: #C41230; } /* 红色 — 管理员 */

/* 小尺寸蚂蚁图标（用于导航、角色标签等） */
.ant-role-icon-svg {
  width: 18px;
  height: 18px;
  display: inline-block;
  vertical-align: middle;
  margin-right: 2px;
}

/* 财务女性蚂蚁：浅粉眼白，柔和感 */
.ant-role-finance .ant-eye-white { fill: #fff5f7; }
.ant-role-finance .ant-eye-dark  { fill: #3d1a28; }

.gov-header-titles {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.gov-header-name {
  font-size: 1.2rem;
  font-weight: 700;
  font-family: var(--font-heading);
  letter-spacing: 3px;
  white-space: nowrap;
}

.gov-header-sub {
  font-size: 0.74rem;
  opacity: 0.75;
  white-space: nowrap;
  letter-spacing: 1px;
}

.gov-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.gov-header-date {
  font-size: 0.88rem;
  opacity: 0.85;
  white-space: nowrap;
}

.gov-header-user {
  font-size: 0.88rem;
  opacity: 0.9;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
}

.gov-header-actions select {
  padding: 4px 8px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.1);
  color: var(--gov-text-inverse);
  font-size: 0.76rem;
  cursor: pointer;
}
.gov-header-actions select:focus { outline: none; border-color: rgba(255,255,255,0.4); }

.gov-header-actions .btn-bell {
  position: relative;
  width: 34px;
  height: 34px;
  border: none;
  background: rgba(255,255,255,0.1);
  border-radius: var(--radius-full);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gov-text-inverse);
}
.gov-header-actions .btn-bell:hover { background: rgba(255,255,255,0.2); }

.bell-badge {
  position: absolute;
  top: -2px;
  right: -2px;
  background: #FFD600;
  color: #333;
  font-size: 0.58rem;
  font-weight: 700;
  min-width: 15px;
  height: 15px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}
.bell-badge:empty { display: none; }

/* ============================================================
   Navigation Bar — 水平导航栏
   ============================================================ */
.gov-nav {
  height: var(--gov-nav-height);
  background: var(--gov-content-bg);
  border-bottom: 2px solid var(--gov-red);
  position: fixed;
  top: var(--gov-header-height);
  left: 0;
  right: 0;
  z-index: 99;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.gov-nav-inner {
  max-width: var(--content-max-width);
  margin: 0 auto;
  height: 100%;
  padding: 0 12px;
}

.gov-nav-list {
  display: flex;
  height: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
}

.gov-nav-item {
  position: relative;
  height: 100%;
}

.gov-nav-link {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 18px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--gov-text);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}

.gov-nav-link:hover {
  color: var(--gov-red);
  background: var(--gov-red-bg);
}

.gov-nav-link.active {
  color: var(--gov-red);
  border-bottom-color: var(--gov-red);
}

.gov-nav-arrow {
  font-size: 0.55rem;
  margin-left: 5px;
  opacity: 0.5;
}

/* 下拉菜单 */
.gov-nav-item.has-dropdown:hover .gov-nav-dropdown {
  display: block;
}

.gov-nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-top: 2px solid var(--gov-red);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 100;
  padding: 4px 0;
}

.gov-nav-dropdown-title {
  padding: 8px 16px 4px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gov-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.gov-nav-dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 0.82rem;
  color: var(--gov-text);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.gov-nav-dropdown a:hover {
  background: var(--gov-red-bg);
  color: var(--gov-red);
}

/* SVG 线性图标对齐（政务风图标库 js/icons.js） */
.gov-ico { vertical-align: -0.125em; flex-shrink: 0; }
.gov-nav-link > .gov-ico { margin-right: 6px; }
.gov-nav-dropdown a > .gov-ico { margin-right: 8px; }

/* 三级子菜单（投标中心 > 标准单价库 > 专业分类） */
.gov-nav-submenu { position: relative; }
.gov-nav-submenu-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-right: 12px;
}
.gov-nav-submenu-list {
  position: absolute;
  left: 100%;
  top: 0;
  min-width: 150px;
  max-height: 340px;
  overflow-y: auto;
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-left: 2px solid var(--gov-red);
  box-shadow: var(--shadow-md);
  display: none;
  z-index: 101;
  padding: 4px 0;
}
.gov-nav-submenu:hover .gov-nav-submenu-list { display: block; }

/* ============================================================
   Breadcrumb
   ============================================================ */
.gov-breadcrumb {
  font-size: 0.78rem;
  color: var(--gov-text-muted);
  margin-bottom: 16px;
  padding: 6px 0;
}
.gov-breadcrumb span { color: var(--gov-text-muted); }

/* ============================================================
   Footer
   ============================================================ */
.gov-footer {
  height: 60px;
  background: var(--gov-content-bg);
  border-top: 1px solid var(--gov-border);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.gov-footer-inner {
  max-width: var(--content-max-width);
  padding: 0 24px;
  font-size: 0.74rem;
  color: var(--gov-text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.gov-footer-divider {
  color: var(--gov-border);
}

/* 移动端底部导航 — 仅移动端（≤768px）显示，桌面端隐藏 */
.mobile-nav { display: none; }

/* ============================================================
   Cards
   ============================================================ */
.card {
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin-bottom: 20px;
  transition: box-shadow var(--transition);
}

.card:hover { box-shadow: var(--shadow); }

/* 项目配置——项目选择灰底条：负 margin 抵消 .card 左右 24px padding，实现通边 */
.project-selector-bar { margin: 0 -24px -20px; }

.card-header {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gov-red);
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--gov-text);
}

.card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gov-text);
  margin-bottom: 12px;
}

.card.status-success { border-left: 3px solid var(--color-success); }
.card.status-warning { border-left: 3px solid var(--color-warning); }
.card.status-danger  { border-left: 3px solid var(--color-danger); }

/* ============================================================
   Data Cards — 政府数据面板卡片（替代旧 stat-card）
   ============================================================ */
.data-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.data-card {
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-left: 3px solid var(--gov-red);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: box-shadow var(--transition);
}

.data-card:hover { box-shadow: var(--shadow); }

.data-card.success { border-left-color: var(--color-success); }
.data-card.warning { border-left-color: var(--color-warning); }
.data-card.danger  { border-left-color: var(--color-danger); }
.data-card.info    { border-left-color: var(--color-info); }

.data-card .data-card-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gov-text-secondary);
  margin-bottom: 4px;
}

.data-card .data-card-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gov-text);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.data-card .data-card-sub {
  font-size: 0.72rem;
  color: var(--gov-text-muted);
  margin-top: 3px;
}

.data-card.success .data-card-value { color: var(--color-success-dark); }
.data-card.warning .data-card-value { color: var(--color-warning-dark); }
.data-card.danger  .data-card-value { color: var(--color-danger-dark); }

/* 旧 stat-card 兼容（保留类名，新样式） */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-left: 3px solid var(--gov-red);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: box-shadow var(--transition);
}

.stat-card:hover { box-shadow: var(--shadow); }

.stat-card.success { border-left-color: var(--color-success); }
.stat-card.warning { border-left-color: var(--color-warning); }
.stat-card.danger  { border-left-color: var(--color-danger); }
.stat-card.info    { border-left-color: var(--color-info); }

.stat-card .stat-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gov-text-secondary);
  margin-bottom: 4px;
}

.stat-card .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gov-text);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.stat-card .stat-sub {
  font-size: 0.72rem;
  color: var(--gov-text-muted);
  margin-top: 3px;
}

.stat-card.success .stat-value { color: var(--color-success-dark); }
.stat-card.warning .stat-value { color: var(--color-warning-dark); }
.stat-card.danger  .stat-value { color: var(--color-danger-dark); }

/* 移除旧 hover 彩色顶条 */
.stat-card::before { display: none; }

/* 预警中心：统计卡筛选高亮 + 预警条目高亮 */
.stat-card.alert-filter-active {
  box-shadow: 0 0 0 2px var(--gov-red) inset, var(--shadow);
  transform: translateY(-1px);
}
.alert-highlight {
  outline: 2px solid var(--gov-red);
  outline-offset: 1px;
  animation: alert-pulse 1.2s ease-in-out 2;
}
@keyframes alert-pulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196, 18, 48,0.12); }
  50% { box-shadow: 0 0 0 7px rgba(196, 18, 48,0.22); }
}

/* ============================================================
   Tables — 政务蓝表头
   ============================================================ */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.82rem;
}

.data-table thead th {
  padding: 9px 12px;
  text-align: left;
  font-weight: 700;
  font-size: 0.76rem;
  color: var(--gov-text-inverse);
  background: var(--gov-red);
  border: 1px solid var(--gov-red-dark);
  white-space: nowrap;
}

.data-table thead th:first-child { border-radius: var(--radius-xs) 0 0 0; }
.data-table thead th:last-child  { border-radius: 0 var(--radius-xs) 0 0; }

.data-table tbody td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--gov-border-light);
  color: var(--gov-text);
}

.data-table tbody tr:nth-child(even) td { background: var(--gov-card-bg); }
.data-table tbody tr:hover td { background: var(--gov-red-bg); }

.data-table .col-amount {
  text-align: right;
  font-family: var(--font-mono);
  font-weight: 600;
}

.data-table tr.row-warning td { background: var(--color-warning-bg); }
.data-table tr.row-danger td  { background: var(--color-danger-bg); color: var(--color-danger-dark); }
.data-table tr.row-guarantee td { background: var(--gov-card-bg); }

/* 成本参考数据库：选中行/卡片高亮（横向滚动时也能看清选的是哪条） */
.data-table tr.cost-row.selected td { background: #fff3bf !important; color: #191919; }
.crmob-card.selected { border: 1px solid var(--gov-red) !important; background: #fff8e1 !important; box-shadow: 0 0 0 2px rgba(196, 18, 48,0.15); }

/* 成本参考数据库：类别按钮统一外观 + 选中高亮 */
.cost-cat-btn { border: 1px solid var(--gov-border) !important; background: var(--gov-content-bg) !important; color: var(--gov-text) !important; }
.cost-cat-btn.active { background: var(--gov-red) !important; color: var(--gov-text-inverse) !important; border-color: var(--gov-red) !important; }

.td-progress { min-width: 100px; }

.progress-bar-inline {
  height: 6px;
  background: var(--gov-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin-top: 3px;
}

.progress-bar-inline .fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gov-red);
  transition: width var(--transition-slow);
}

.progress-bar-inline .fill.high { background: var(--color-success); }
.progress-bar-inline .fill.mid  { background: var(--color-warning); }
.progress-bar-inline .fill.low  { background: var(--color-danger); }

.date-highlight {
  display: inline-block;
  padding: 2px 8px;
  border-radius: var(--radius-xs);
  font-weight: 700;
}

.date-highlight.warning {
  background: var(--color-warning-bg);
  color: var(--color-warning-dark);
}

.date-highlight.normal {
  color: var(--gov-text-secondary);
}

/* ============================================================
   Forms & Inputs
   ============================================================ */
.form-group { margin-bottom: 14px; }

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gov-text);
  margin-bottom: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--gov-text);
  background: var(--gov-content-bg);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  outline: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--gov-red);
  box-shadow: 0 0 0 2px rgba(196, 18, 48,0.1);
}

.form-textarea {
  min-height: 80px;
  resize: vertical;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--gov-text-muted);
  margin-top: 3px;
}

.form-row { display: flex; gap: 12px; }
.form-row .form-group { flex: 1; }
.roster-toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 12px; }
.roster-toolbar .form-group { margin-bottom: 0; }
.roster-toolbar-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.roster-toolbar #roster-search { padding: 6px 10px; border: 1px solid var(--gov-border); border-radius: var(--radius-sm); font-size: 0.82rem; width: 200px; }
.roster-toolbar #btn-add-roster-worker { white-space: nowrap; }
@media (max-width: 768px) {
  .roster-toolbar-actions { width: 100%; margin-left: 0; }
  .roster-toolbar #roster-search { flex: 1; width: auto; min-width: 0; }
  .roster-toolbar #btn-add-roster-worker { margin-left: auto; }
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--gov-red);
  color: var(--gov-text-inverse);
  border-color: var(--gov-red);
}
.btn-primary:hover { background: var(--gov-red-dark); border-color: var(--gov-red-dark); }

.btn-accent {
  background: var(--gov-gold);
  color: var(--gov-text-inverse);
  border-color: var(--gov-gold);
}
.btn-accent:hover { background: #A88222; }

.btn-outline {
  background: transparent;
  color: var(--gov-red);
  border-color: var(--gov-border);
}
.btn-outline:hover { background: var(--gov-red-bg); border-color: var(--gov-red); }

.btn-secondary {
  background: var(--gov-bg);
  color: var(--gov-text);
  border-color: var(--gov-border);
}
.btn-secondary:hover { background: var(--gov-border-light); }

.btn-success { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.btn-warning { background: var(--color-warning); color: #fff; border-color: var(--color-warning); }
.btn-danger  { background: var(--color-danger);  color: #fff; border-color: var(--color-danger); }

.btn-sm { padding: 4px 10px; font-size: 0.74rem; }
.btn-lg { padding: 10px 22px; font-size: 0.9rem; }

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* ============================================================
   Badges
   ============================================================ */
.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-xs);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge-success { background: var(--color-success-bg); color: var(--color-success-dark); }
.badge-warning { background: var(--color-warning-bg); color: var(--color-warning-dark); }
.badge-danger  { background: var(--color-danger-bg);  color: var(--color-danger-dark); }
.badge-info    { background: var(--color-info-bg);    color: #004d99; }
.badge-neutral { background: var(--gov-card-bg);      color: var(--gov-text-secondary); }

/* ============================================================
   Alerts
   ============================================================ */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
  border-left: 3px solid transparent;
}

.alert-success { background: var(--color-success-bg); border-color: var(--color-success); color: var(--color-success-dark); }
.alert-warning { background: var(--color-warning-bg); border-color: var(--color-warning); color: var(--color-warning-dark); }
.alert-danger  { background: var(--color-danger-bg);  border-color: var(--color-danger);  color: var(--color-danger-dark); }
.alert-info    { background: var(--color-info-bg);    border-color: var(--color-info);    color: #004d99; }

/* ============================================================
   Filter Bar
   ============================================================ */
.filter-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px 18px;
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
}

.filter-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gov-text-secondary);
  white-space: nowrap;
}

.filter-bar select,
.filter-bar input {
  padding: 6px 10px;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--gov-text);
  background: var(--gov-content-bg);
  outline: none;
}

.filter-bar select:focus,
.filter-bar input:focus {
  border-color: var(--gov-red);
  box-shadow: 0 0 0 2px rgba(196, 18, 48,0.08);
}

/* ============================================================
   Tabs
   ============================================================ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--gov-border);
  margin-bottom: 18px;
}

.tab-btn {
  padding: 9px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gov-text-secondary);
  background: transparent;
  border: none;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition-fast);
}

.tab-btn:hover { color: var(--gov-red); }

.tab-btn.active {
  color: var(--gov-red);
  border-bottom-color: var(--gov-red);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ============================================================
   Modal
   ============================================================ */

/* confirmDialog 使用的简单弹窗 */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal {
  background: var(--gov-content-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 20px 24px;
  width: 640px;
  max-width: 94vw;
  max-height: 85vh;
  overflow-y: auto;
}

.modal .modal-header {
  font-size: 1rem;
  font-weight: 700;
  color: var(--gov-text);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gov-red);
  background: var(--gov-content-bg);
  position: sticky;
  top: 0;
  z-index: 1;
}

.modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding-top: 12px;
  border: none;
  background: var(--gov-content-bg);
  position: sticky;
  bottom: 0;
  z-index: 1;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.modal-box {
  background: var(--gov-content-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 90%;
  max-width: 680px;
  max-height: 85vh;
  overflow-y: auto;
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-header {
  padding: 16px 24px;
  border-bottom: 1px solid var(--gov-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--gov-red);
  color: var(--gov-text-inverse);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 1;
}

.modal-header-title {
  font-size: 1rem;
  font-weight: 700;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255,255,255,0.15);
  font-size: 1.1rem;
  cursor: pointer;
  color: var(--gov-text-inverse);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition-fast);
}

.modal-close:hover { background: rgba(255,255,255,0.25); }

.modal-body { padding: 20px 24px; }

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--gov-border-light);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  background: var(--gov-content-bg);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   V6.3: 文件上传 / 附件
   ============================================================ */
.file-upload-area {
  border: 2px dashed var(--gov-border);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  background: var(--gov-bg);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
  transition: border-color var(--transition-fast);
}
.file-upload-area:hover { border-color: var(--gov-red); }
.file-upload-label {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--gov-text);
  white-space: nowrap;
}
.file-upload-btn {
  cursor: pointer !important;
  margin: 0 !important;
  position: relative;
  overflow: hidden;
}
.file-upload-btn input[type="file"] {
  position: absolute;
  top: 0; left: 0;
  width: 0.1px; height: 0.1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}
.file-upload-hint {
  font-size: 0.7rem;
  color: #999;
  margin-left: 2px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-new-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #e8f5e9;
  border: 1px solid #66bb6a;
  border-radius: 20px;
  padding: 3px 6px 3px 10px;
  font-size: 0.76rem;
  color: #2e7d32;
  max-width: 220px;
  animation: pillIn 0.2s ease;
}
.file-new-pill .file-new-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 140px;
}
@keyframes pillIn {
  from { opacity: 0; transform: scale(0.9); }
  to   { opacity: 1; transform: scale(1); }
}

.file-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.file-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #eafaf1;
  border: 1px solid #b7dfc5;
  border-radius: 20px;
  padding: 4px 8px 4px 12px;
  font-size: 0.78rem;
  transition: background var(--transition-fast);
}
.file-pill:hover { background: #d4f0dd; }
.file-pill-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--gov-text);
}
.file-pill-download,
.file-pill-delete {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  line-height: 1;
  transition: background var(--transition-fast);
}
.file-pill-download {
  background: var(--gov-red);
  color: #fff;
}
.file-pill-download:hover { background: var(--palace-red); }
.file-pill-delete {
  background: #e0e0e0;
  color: #999;
}
.file-pill-delete:hover { background: var(--color-danger); color: #fff; }

/* 图片缩略图预览 */
.file-thumb-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.file-thumb-item {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  border: 1px solid var(--gov-border-light);
  cursor: pointer;
  position: relative;
}
.file-thumb-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-thumb-download {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 20px;
  height: 20px;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Toast
   ============================================================ */
.toast-container {
  position: fixed;
  top: 70px;
  right: 20px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--gov-content-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  padding: 12px 18px;
  font-size: 0.84rem;
  color: var(--gov-text);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideIn 0.3s ease;
  border-left: 3px solid var(--gov-red);
  min-width: 240px;
}

.toast.success { border-color: var(--color-success); }
.toast.warning { border-color: var(--color-warning); }
.toast.error   { border-color: var(--color-danger); }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ============================================================
   Login Overlay — 政务红风格（网页版）；微信环境自动切政务蓝
   ============================================================ */
.login-overlay {
  position: fixed;
  inset: 0;
  background: var(--login-gradient);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(0,0,0,0.06) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(255,255,255,0.02) 0%, transparent 60%);
  pointer-events: none;
}
.login-guardian-ring {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.guardian-ring-item {
  position: absolute;
  left: var(--gx);
  top: var(--gy);
  height: clamp(160px, 30vh, 320px);
  width: auto;
  opacity: 0.09;
  transform: translate(-50%, -50%) rotate(var(--gr, 0deg));
}
.guardian-mirror {
  transform: translate(-50%, -50%) rotate(var(--gr, 0deg)) scaleX(-1);
}

.login-card {
  position: relative;
  z-index: 1;
  width: 420px;
  max-width: 92vw;
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.3);
  padding: 44px 40px 36px;
  text-align: center;
}

.login-emblem {
  margin-bottom: 16px;
}

.login-emblem-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--palace-red), var(--gov-red));
  color: #fff;
  font-size: 1.8rem;
  font-weight: 700;
}

.ant-logo-login {
  width: 52px;
  height: 52px;
  display: block;
}

.login-logo {
  margin-bottom: 16px;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gov-text);
  margin-bottom: 4px;
  letter-spacing: 2px;
}

.login-version {
  font-size: 0.84rem;
  color: var(--gov-text-muted);
  margin-bottom: 24px;
}

.login-form {
  text-align: left;
}

.login-field {
  margin-bottom: 14px;
}

.login-field-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gov-text);
  margin-bottom: 4px;
}

.login-select {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  background: var(--gov-content-bg);
  color: var(--gov-text);
  outline: none;
}
.login-select:focus {
  border-color: var(--gov-red);
  box-shadow: 0 0 0 2px rgba(196, 18, 48,0.1);
}

.login-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  text-align: left;
  outline: none;
}
.login-input:focus {
  border-color: var(--gov-red);
  box-shadow: 0 0 0 2px rgba(196, 18, 48,0.1);
}

.login-error {
  color: var(--color-danger);
  font-size: 0.78rem;
  margin-bottom: 12px;
  min-height: 20px;
}

.login-btn {
  width: 100%;
  padding: 11px;
  background: var(--gov-red);
  color: var(--gov-text-inverse);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 4px;
  transition: background var(--transition-fast);
}
.login-btn:hover { background: var(--gov-red-dark); }
.login-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.login-methods {
  margin-top: 18px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.login-method {
  font-size: 0.76rem;
  color: var(--gov-blue-link);
  cursor: pointer;
}
.login-method.disabled {
  color: var(--gov-text-muted);
  cursor: not-allowed;
}

/* 记住密码 / 忘记密码 */
.login-options {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
}

.login-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--gov-text-secondary);
  cursor: pointer;
  font-size: 0.78rem;
}

.login-checkbox input[type="checkbox"] {
  accent-color: var(--gov-red);
}

.login-forgot {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--gov-blue-link);
  cursor: pointer;
  text-decoration: none;
}
.login-forgot:hover { color: var(--gov-red); text-decoration: underline; }

.login-hint {
  margin-top: 16px;
  font-size: 0.72rem;
  color: var(--gov-text-muted);
}
.login-hint code {
  background: var(--gov-card-bg);
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
}

/* ============================================================
   AI Chat — 小蚂蚁悬浮窗口
   ============================================================ */
.ai-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  border-radius: 0;
  background: none;
  border: none;
  color: #1a1a1a;
  cursor: grab;
  z-index: 300;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,0.35));
  transition: filter var(--transition), transform var(--transition), opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  opacity: 0.65;
  padding: 0;
}
.ant-logo-fab {
  width: 100%;
  height: 100%;
  display: block;
}
.ai-fab:hover {
  opacity: 1;
  transform: scale(1.1);
  filter: drop-shadow(0 6px 16px rgba(0,0,0,0.5));
}
.ai-fab:active {
  cursor: grabbing;
}
.ai-fab.dragging {
  opacity: 1;
  transform: scale(1.05);
  filter: drop-shadow(0 10px 22px rgba(0,0,0,0.55));
  transition: none;
}

.ai-fab-dot { display: none; }

.ai-panel {
  position: fixed;
  bottom: 90px;
  right: 28px;
  width: 380px;
  height: 500px;
  background: var(--gov-content-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 300;
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--gov-border);
}
.ai-panel.show { display: flex; }

.ai-panel-header {
  padding: 12px 16px;
  background: var(--gov-red);
  color: var(--gov-text-inverse);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ai-panel-title {
  font-size: 0.88rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-panel-close {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255,255,255,0.15);
  font-size: 1rem;
  cursor: pointer;
  color: var(--gov-text-inverse);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}
.ai-panel-close:hover { background: rgba(255,255,255,0.25); }

.ai-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  line-height: 1.5;
  animation: msgIn 0.25s ease;
}

.ai-msg.user {
  align-self: flex-end;
  background: var(--gov-red);
  color: var(--gov-text-inverse);
}

.ai-msg.assistant {
  align-self: flex-start;
  background: var(--gov-bg);
  color: var(--gov-text);
  border: 1px solid var(--gov-border-light);
}

/* AI 回复内的富文本：加粗高亮、行内代码、列表 */
.ai-msg.assistant strong {
  color: var(--gov-red);
  font-weight: 700;
}
.ai-msg.assistant code {
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.92em;
}
.ai-msg.assistant .ai-md-list {
  margin: 4px 0;
  padding-left: 18px;
}
.ai-msg.assistant .ai-md-list li {
  margin: 3px 0;
}

.ai-msg.error {
  align-self: flex-start;
  background: var(--color-danger-bg);
  color: var(--color-danger-dark);
}

.ai-panel-footer {
  padding: 10px 14px;
  border-top: 1px solid var(--gov-border-light);
  display: flex;
  gap: 8px;
}

.ai-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  outline: none;
  color: var(--gov-text);
}
.ai-input:focus {
  border-color: var(--gov-red);
  box-shadow: 0 0 0 2px rgba(196, 18, 48,0.08);
}

.ai-send-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--gov-red);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-send-btn:hover { background: var(--gov-red-dark); }
.ai-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-typing {
  display: flex;
  gap: 4px;
  padding: 8px 0;
  align-self: flex-start;
}

.ai-typing span {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--gov-text-muted);
  animation: typingBounce 1.2s ease infinite;
}
.ai-typing span:nth-child(2) { animation-delay: 0.15s; }
.ai-typing span:nth-child(3) { animation-delay: 0.3s; }

@keyframes msgIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30%           { transform: translateY(-6px); }
}

/* ============================================================
   Notification Panel
   ============================================================ */
.notif-panel {
  position: fixed;
  top: calc(var(--gov-header-height) + 6px);
  right: 20px;
  width: 340px;
  max-height: 440px;
  background: var(--gov-content-bg);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
  display: none;
  flex-direction: column;
  border: 1px solid var(--gov-border);
}
.notif-panel.show { display: flex; }

.notif-panel-header {
  padding: 12px 16px;
  background: var(--gov-red);
  color: var(--gov-text-inverse);
  font-weight: 700;
  font-size: 0.86rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.notif-panel-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 0;
}

.notif-item {
  padding: 11px 16px;
  border-bottom: 1px solid var(--gov-border-light);
  cursor: pointer;
  transition: background var(--transition-fast);
  display: flex;
  gap: 10px;
}
.notif-item:hover { background: var(--gov-bg); }
.notif-item.unread { background: var(--gov-red-bg); }

.notif-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  margin-top: 5px;
  flex-shrink: 0;
}
.notif-dot.danger  { background: var(--color-danger); }
.notif-dot.warning { background: var(--color-warning); }
.notif-dot.info    { background: var(--color-info); }
.notif-item:not(.unread) .notif-dot { background: var(--gov-text-muted); }

.notif-body { flex: 1; min-width: 0; }

.notif-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gov-text);
  margin-bottom: 2px;
}

.notif-message {
  font-size: 0.76rem;
  color: var(--gov-text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.notif-time {
  font-size: 0.68rem;
  color: var(--gov-text-muted);
  margin-top: 4px;
}

.notif-panel-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--gov-text-muted);
  font-size: 0.84rem;
}

/* ============================================================
   Charts — CSS 图表
   ============================================================ */
.chart-section { margin-bottom: 20px; }

/* 水平条形图 */
.bar-chart-cell { margin-bottom: 12px; }

.bar-chart-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gov-text);
  margin-bottom: 4px;
}

.bar-chart-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bar-chart-bg {
  flex: 1;
  height: 12px;
  background: var(--gov-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
}

.bar-chart-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--gov-red);
  transition: width var(--transition-slow);
  min-width: 2px;
}
.bar-chart-fill.warn   { background: linear-gradient(90deg, var(--color-warning), #ffab40); }
.bar-chart-fill.danger { background: linear-gradient(90deg, var(--color-danger), #ff5252); }

.bar-chart-redline {
  position: absolute;
  top: -3px;
  bottom: -3px;
  width: 2px;
  background: var(--color-danger);
  border-radius: 1px;
}
.bar-chart-redline::after {
  content: '红线';
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--color-danger);
  white-space: nowrap;
}

.bar-chart-value {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gov-text-secondary);
  font-family: var(--font-mono);
  min-width: 70px;
  text-align: right;
}

/* 环形图 */
.donut-chart {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
}
.donut-chart::after {
  content: '';
  position: absolute;
  width: 68px;
  height: 68px;
  background: var(--gov-content-bg);
  border-radius: 50%;
}

.donut-center {
  position: relative;
  z-index: 1;
  text-align: center;
}

.donut-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--gov-text-muted);
}

.donut-value {
  font-size: 1rem;
  font-weight: 800;
  color: var(--gov-text);
  font-family: var(--font-mono);
}

/* 对比条形图 */
.diff-bar-bg {
  height: 20px;
  background: var(--gov-border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  position: relative;
}

.diff-bar-fill {
  height: 100%;
  transition: width var(--transition-slow);
  display: inline-block;
}
.diff-bar-fill.high { background: var(--color-success); }
.diff-bar-fill.mid  { background: var(--color-warning); }
.diff-bar-fill.low  { background: var(--color-danger); }

/* 分组柱状图 */
.chart-group-bars {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  height: 200px;
  padding: 0 10px;
}

.chart-bar-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.chart-bar-stack {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 2px;
  height: 160px;
}

.chart-bar-segment {
  width: 100%;
  border-radius: var(--radius-xs) var(--radius-xs) 0 0;
  transition: height var(--transition-slow);
}

.chart-bar-label {
  font-size: 0.65rem;
  color: var(--gov-text-muted);
  text-align: center;
  margin-top: 4px;
}

/* ============================================================
   Invoice Cards
   ============================================================ */
.invoice-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.invoice-card {
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  padding: 16px;
}

.invoice-card-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--gov-text-secondary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gov-border-light);
}

.invoice-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 0;
  font-size: 0.82rem;
}
.invoice-row .label { color: var(--gov-text-secondary); }
.invoice-row .value { font-weight: 700; font-family: var(--font-mono); }

.invoice-row.total {
  border-top: 2px solid var(--gov-border);
  margin-top: 6px;
  padding-top: 10px;
  font-weight: 800;
  font-size: 0.9rem;
}

/* ============================================================
   Empty State
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 32px 16px;
  color: var(--gov-text-muted);
}

.empty-icon { font-size: 2.5rem; margin-bottom: 10px; color: var(--gov-primary); opacity: 0.55; }
.empty-text { font-size: 0.9rem; font-weight: 600; }

/* ============================================================
   Theme Variant — 暗夜模式
   ============================================================ */
[data-theme="dark"] {
  --gov-bg:             #1A1A1A;
  --gov-content-bg:     #262626;
  --gov-card-bg:        #2E2E2E;
  --gov-text:           #E0E0E0;
  --gov-text-secondary: #A0A0A0;
  --gov-text-muted:     #707070;
  --gov-border:         #404040;
  --gov-border-light:   #353535;
  --color-success-bg:   rgba(27, 123, 61, 0.15);
  --color-warning-bg:   rgba(192, 98, 0, 0.15);
  --color-danger-bg:    rgba(196, 18, 48, 0.15);
  --color-info-bg:      rgba(21, 89, 181, 0.15);
  --gov-red-bg:         rgba(196, 18, 48,0.15);
  --gov-gold-light:     rgba(196, 155, 42, 0.1);
  --shadow-xs: 0 1px 1px rgba(0,0,0,0.2);
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.25);
  --shadow:    0 1px 4px rgba(0,0,0,0.3);
  --shadow-md: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-lg: 0 4px 20px rgba(0,0,0,0.5);
}

[data-theme="dark"] .gov-nav { background: var(--gov-content-bg); }
[data-theme="dark"] .gov-nav-dropdown { background: var(--gov-content-bg); }
[data-theme="dark"] .gov-nav-submenu-list { background: var(--gov-content-bg); }
[data-theme="dark"] .gov-footer { background: var(--gov-content-bg); }
[data-theme="dark"] .modal-header { background: var(--gov-red); }
[data-theme="dark"] .modal-footer { background: var(--gov-content-bg); }
[data-theme="dark"] .ai-panel-header { background: var(--gov-red); }
[data-theme="dark"] .donut-chart::after { background: var(--gov-content-bg); }
[data-theme="dark"] .notif-panel-header { background: var(--gov-red); }
[data-theme="dark"] .ai-msg.assistant { background: var(--gov-bg); }
[data-theme="dark"] .ai-msg.assistant code { background: rgba(255, 255, 255, 0.14); }
[data-theme="dark"] .data-table tbody tr:nth-child(even) td { background: var(--gov-card-bg); }
[data-theme="dark"] .data-table tbody tr:hover td { background: var(--gov-red-bg); }

/* ============================================================
   Scrollbar
   ============================================================ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.15); border-radius: var(--radius-full); }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.25); }

/* ============================================================
   Utility
   ============================================================ */
.text-muted    { color: var(--gov-text-muted); }
.text-success  { color: var(--color-success); }
.text-warning  { color: var(--color-warning); }
.text-danger   { color: var(--color-danger); }
.text-right    { text-align: right; }
.text-center   { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.hidden { display: none !important; }

/* 可折叠区域 */
.collapsible-toggle {
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--gov-text);
}
.collapsible-toggle .arrow {
  transition: transform var(--transition-fast);
  font-size: 0.7rem;
}
.collapsible-toggle.open .arrow { transform: rotate(90deg); }

.collapsible-body {
  overflow: hidden;
  transition: max-height var(--transition);
}
.collapsible-body.collapsed { max-height: 0 !important; }

/* ============================================================
   折叠卡片（项目配置页 — 独立模块卡片）
   ============================================================ */
.fold-card {
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.fold-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.fold-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--gov-text);
  transition: background 0.15s ease;
}
.fold-card-header:hover {
  background: #fafbfc;
}

.fold-card-body {
  overflow: hidden;
  transition: max-height 0.2s ease;
}
/* V6.5: 项目详情卡片式布局 */
.proj-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: var(--gov-border-light);
  border: 1px solid var(--gov-border-light);
  border-radius: 6px;
  overflow: hidden;
}
.proj-detail-item {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 10px 14px;
  background: #fff;
}
.proj-detail-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gov-text-muted);
  white-space: nowrap;
  min-width: 70px;
  flex-shrink: 0;
}
.proj-detail-value {
  font-size: 0.88rem;
  color: var(--gov-text);
  flex: 1;
  word-break: break-word;
  overflow-wrap: break-word;
}
.proj-detail-empty {
  color: #c0c4cc;
  font-style: italic;
  font-size: 0.82rem;
}
.proj-detail-blocks {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.proj-detail-block {
  background: #fafbfc;
  border: 1px solid var(--gov-border-light);
  border-radius: 6px;
  padding: 12px 14px;
}
.proj-detail-block .proj-detail-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gov-text);
}
.proj-detail-text {
  font-size: 0.85rem;
  color: var(--gov-text);
  line-height: 1.7;
  word-break: break-word;
  overflow-wrap: break-word;
}

.fold-card-body.collapsed {
  max-height: 0 !important;
}

.fold-card-body-inner {
  padding: 12px 16px;
  border-top: 1px solid var(--gov-border-light);
}

.fold-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 0.65rem;
  color: var(--gov-text-muted);
}
.fold-arrow.open {
  transform: rotate(180deg);
}

/* ============================================================
   Responsive — 小屏适配
   ============================================================ */
@media (max-width: 768px) {
  .gov-header-name { font-size: 0.9rem; }
  .gov-header-sub { display: none; }
  .gov-header-date { display: none; }
  .gov-header-user { font-size: 0.72rem; }
  .gov-nav-link { padding: 0 10px; font-size: 0.78rem; }
  .gov-content-inner { padding: 14px 12px 24px; }
  .data-card-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .invoice-section { grid-template-columns: 1fr; }
  .ai-panel { width: calc(100vw - 24px); right: 12px; bottom: 80px; height: 420px; }
}

/* ============================================================
   PWA 安装引导条
   ============================================================ */
.iq-install-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--gov-red);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 16px;
  font-size: 0.88rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  box-shadow: 0 -2px 12px rgba(0,0,0,0.2);
}
.iq-install-banner.iq-visible { transform: translateY(0); }

.iq-install-text { flex: 1; text-align: center; }
.iq-install-text strong { color: #FFD54F; }

.iq-install-btn {
  background: #fff;
  color: var(--gov-red);
  border: none;
  padding: 8px 18px;
  border-radius: 20px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.iq-install-btn:hover { background: #FFD54F; }
.iq-install-btn:active { transform: scale(0.96); }

.iq-install-close {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.8rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
}
.iq-install-close:hover { background: rgba(255,255,255,0.35); }

.iq-ios-guide { background: #007AFF; }
.iq-wx-guide { background: #2BA245; }
.iq-generic-guide { background: var(--gov-red); }

/* 移动端底部加安全区 */
@media (max-width: 768px) {
  .iq-install-banner {
    padding: 10px 12px 16px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    font-size: 0.8rem;
  }
  .iq-install-btn { font-size: 0.78rem; padding: 6px 14px; }
}

/* ============================================================
   文件资料 — 文件管理器（仿 Windows 资源管理器）
   ============================================================ */
.file-manager {
  display: flex;
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-height: 560px;
  box-shadow: var(--shadow-xs);
}

/* 左侧快速访问边栏 */
.folder-sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--gov-card-bg);
  border-right: 1px solid var(--gov-border);
  display: flex;
  flex-direction: column;
}

.folder-sidebar-header {
  padding: 12px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--gov-text);
  border-bottom: 2px solid var(--gov-red);
  flex-shrink: 0;
}

.folder-tree {
  list-style: none;
  margin: 0;
  padding: 4px 0;
  flex: 1;
  overflow-y: auto;
}

.folder-tree li { list-style: none; }

.folder-node {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gov-text);
  border-left: 3px solid transparent;
  transition: background var(--transition-fast), color var(--transition-fast);
}

.folder-node:hover { background: var(--gov-bg); }

.folder-node.active {
  background: var(--gov-red-bg);
  border-left-color: var(--gov-red);
  color: var(--gov-red);
}

.folder-toggle {
  width: 14px;
  flex-shrink: 0;
  font-size: 0.6rem;
  color: var(--gov-text-muted);
  text-align: center;
  transition: transform var(--transition-fast);
}

.folder-toggle.expanded { transform: rotate(90deg); }
.folder-toggle.empty { visibility: hidden; }

.folder-icon { flex-shrink: 0; font-size: 0.95rem; }

.folder-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-count {
  flex-shrink: 0;
  font-size: 0.7rem;
  color: var(--gov-text-muted);
  background: var(--gov-bg);
  padding: 0 6px;
  border-radius: var(--radius-full);
}

.folder-children { list-style: none; margin: 0; padding: 0; }

/* 右侧主区域 */
.file-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* 工具栏 */
.file-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--gov-border);
  background: var(--gov-content-bg);
  flex-wrap: wrap;
  flex-shrink: 0;
}

.file-nav-btns { display: flex; gap: 4px; }

.file-nav-btn {
  width: 30px;
  height: 30px;
  border: 1px solid var(--gov-border);
  background: var(--gov-content-bg);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.85rem;
  color: var(--gov-text);
  transition: all var(--transition-fast);
}

.file-nav-btn:hover:not(:disabled) {
  background: var(--gov-red-bg);
  border-color: var(--gov-red);
  color: var(--gov-red);
}

.file-nav-btn:disabled { opacity: 0.35; cursor: not-allowed; }

.file-breadcrumb {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: 0.8rem;
  color: var(--gov-text-secondary);
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.file-breadcrumb a { cursor: pointer; color: var(--gov-text-secondary); }
.file-breadcrumb a:hover { color: var(--gov-red); }

.breadcrumb-sep { margin: 0 3px; color: var(--gov-text-muted); }
.breadcrumb-current { color: var(--gov-text); font-weight: 600; }

.file-search {
  width: 200px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--gov-text);
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.file-search:focus {
  border-color: var(--gov-red);
  box-shadow: 0 0 0 2px var(--gov-red-bg);
}

.file-view-toggle {
  display: flex;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.file-view-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: var(--gov-content-bg);
  cursor: pointer;
  color: var(--gov-text-secondary);
  transition: all var(--transition-fast);
}

.file-view-btn:hover { background: var(--gov-bg); }
.file-view-btn.active { background: var(--gov-red); color: var(--gov-text-inverse); }

/* 内容区 */
#file-grid-container { flex: 1; overflow-y: auto; padding: 16px; }

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

/* 卡片 */
.file-card {
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.file-card:hover { border-color: var(--gov-red); box-shadow: var(--shadow-md); }

.file-card-preview {
  position: relative;
  height: 108px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gov-bg);
  border-bottom: 1px solid var(--gov-border-light);
  overflow: hidden;
}

.folder-preview { background: var(--gov-gold-light); }

.file-card-preview img { width: 100%; height: 100%; object-fit: cover; }

.file-card-type-icon { font-size: 2.6rem; }

.file-card-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.file-card:hover .file-card-actions { opacity: 1; }

.file-card-actions button {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
}

.file-card-actions button:hover { background: var(--gov-red); color: #fff; }

.file-card-body { padding: 8px 10px 10px; }

.file-card-name {
  font-size: 0.8rem;
  color: var(--gov-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-card-meta {
  display: flex;
  gap: 8px;
  margin-top: 3px;
  font-size: 0.7rem;
  color: var(--gov-text-muted);
}

/* 空状态 */
.file-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--gov-text-muted);
  text-align: center;
}

.file-empty-icon { font-size: 3rem; opacity: 0.45; margin-bottom: 12px; color: var(--gov-primary); }
.file-empty-text { font-size: 0.9rem; font-weight: 600; color: var(--gov-text-secondary); }
.file-empty-hint { font-size: 0.78rem; margin-top: 6px; }

/* 列表视图 */
.file-list-table td { vertical-align: middle; }
.file-list-table .folder-row:hover td { background: var(--gov-red-bg); }

/* 右键菜单 */
.context-menu {
  position: fixed;
  z-index: 10000;
  min-width: 160px;
  background: var(--gov-content-bg);
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  padding: 4px;
  animation: context-menu-in var(--transition-fast);
}

@keyframes context-menu-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

.context-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gov-text);
  text-align: left;
  border-radius: var(--radius-xs);
  transition: background var(--transition-fast), color var(--transition-fast);
}

.context-menu-item:hover { background: var(--gov-red-bg); color: var(--gov-red); }
.context-menu-item.danger { color: var(--color-danger); }
.context-menu-item.danger:hover { background: var(--color-danger-bg); }

.context-menu-separator { height: 1px; background: var(--gov-border-light); margin: 4px 0; }

/* 上传进度遮罩 */
.upload-progress-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.upload-progress-title { color: #fff; font-size: 0.9rem; font-weight: 600; margin-bottom: 12px; }

.upload-progress-bar {
  width: 260px;
  height: 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: var(--gov-red);
  border-radius: var(--radius-full);
  transition: width var(--transition);
}

.upload-progress-text { color: rgba(255, 255, 255, 0.9); font-size: 0.78rem; margin-top: 10px; }

/* 移动文件 — 文件夹选择器 */
.folder-picker {
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--gov-border);
  border-radius: var(--radius-sm);
  padding: 6px;
}

.folder-picker-node {
  padding: 6px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--gov-text);
  transition: background var(--transition-fast);
}

.folder-picker-node:hover { background: var(--gov-bg); }
.folder-picker-node.selected { background: var(--gov-red-bg); color: var(--gov-red); }

/* 补充缺失的工具类 */
.btn-xs { padding: 2px 8px; font-size: 0.7rem; border-radius: var(--radius-xs); }
.font-bold { font-weight: 700; }

/* 文件管理器 — 移动端适配 */
@media (max-width: 768px) {
  .file-manager { flex-direction: column; }
  .folder-sidebar {
    width: 100%;
    max-height: 170px;
    border-right: none;
    border-bottom: 1px solid var(--gov-border);
  }
  .file-search { width: 120px; }
}

/* ============================================================
   启动页（蚂蚁徽章 + 宣传语）
   ============================================================ */
.splash-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--splash-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: opacity 0.6s ease, visibility 0.6s;
}
.splash-overlay.splash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(232, 184, 75, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(232, 184, 75, 0.05) 1px, transparent 1px);
  background-size: 42px 42px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0%, transparent 72%);
  pointer-events: none;
}
.splash-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.splash-avatar-wrap {
  position: relative;
  width: 200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: splash-emblem-in 0.9s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.splash-ant-head {
  width: 170px;
  height: 170px;
  position: relative;
  z-index: 2;
  animation: ant-glow 3.2s ease-in-out infinite, ant-float 5s ease-in-out infinite;
}
@keyframes ant-glow {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(232, 184, 75, 0.30)); }
  50% { filter: drop-shadow(0 0 22px rgba(232, 184, 75, 0.55)); }
}
@keyframes ant-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.splash-tech-ring {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  border: 1px solid rgba(232, 184, 75, 0.35);
  z-index: 1;
  animation: tech-ring-spin 9s linear infinite;
}
.splash-tech-ring::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 50%;
  margin-left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #e8b84b;
  box-shadow: 0 0 10px #e8b84b, 0 0 22px #e8b84b;
}
.splash-tech-ticks {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1px dashed rgba(232, 184, 75, 0.22);
  z-index: 0;
  animation: tech-ring-spin-rev 22s linear infinite;
}
@keyframes tech-ring-spin { to { transform: rotate(360deg); } }
@keyframes tech-ring-spin-rev { to { transform: rotate(-360deg); } }
@keyframes splash-emblem-in {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}
.splash-title {
  margin-top: 24px;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 8px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  animation: splash-rise 0.7s 0.35s ease both;
}
.splash-slogan {
  margin-top: 18px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0.8em;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: clamp(1.35rem, 5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  color: #ffe9a8;
  letter-spacing: 0.18em;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.45), 0 0 26px rgba(232, 184, 75, 0.28);
  animation: splash-rise 0.7s 0.55s ease both;
}
@keyframes splash-rise {
  from { transform: translateY(18px); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.splash-progress {
  margin-top: 34px;
  width: 180px;
  height: 3px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}
.splash-progress-bar {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #e8b84b, #ffd97a);
  border-radius: 999px;
  animation: splash-load 2.4s ease forwards;
}
@keyframes splash-load { to { width: 100%; } }
.splash-skip {
  margin-top: 18px;
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.72rem;
  padding: 4px 16px;
  border-radius: 999px;
  cursor: pointer;
  letter-spacing: 2px;
  transition: all 0.15s ease;
}
.splash-skip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.6);
}
.splash-foot {
  position: absolute;
  bottom: 26px;
  left: 0;
  right: 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  letter-spacing: 2px;
}

/* ===== 投标中心 · 标准单价库折叠分组 ===== */
.bc-group {
  border: 1px solid var(--gov-border);
  border-radius: var(--radius, 6px);
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--gov-card-bg);
}
.bc-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s ease;
}
.bc-group-head:hover {
  background: var(--gov-primary-bg);
}
.bc-group-arrow {
  width: 14px;
  flex: 0 0 14px;
  color: var(--gov-text-muted);
  font-size: 0.8rem;
  line-height: 1;
}
.bc-group-name {
  font-weight: 600;
  color: var(--gov-text);
}
.bc-group-cat {
  font-size: 0.72rem;
  color: var(--gov-text-secondary);
  border: 1px solid var(--gov-border);
  border-radius: 4px;
  padding: 1px 7px;
  white-space: nowrap;
}
.bc-group-count {
  margin-left: auto;
  font-size: 0.78rem;
  color: var(--gov-text-muted);
  white-space: nowrap;
}
.bc-group-body {
  display: none;
  border-top: 1px solid var(--gov-border-light);
}
.bc-group.open .bc-group-body {
  display: block;
}
.bc-group.open .bc-group-arrow {
  color: var(--gov-primary);
}

/* ============================================================
   节日主题皮肤（data-theme="festival-*"，由 festival-theme.js 自动切换）
   每套覆盖主色/宫墙色/金色/背景 + 登录页/启动页渐变，实现全视觉换肤
   ============================================================ */

/* 春节 —— 喜庆红金 */
[data-theme="festival-spring"] {
  --gov-primary: #D40000; --gov-primary-dark: #8B0000; --gov-primary-light: #E04040; --gov-primary-bg: #FFF5F5;
  --gov-red: #D40000; --gov-red-dark: #8B0000; --gov-red-light: #E04040; --gov-red-bg: #FFF5F5;
  --palace-red: #8B0000; --palace-red-dark: #6B0000;
  --gov-gold: #FFD700; --gov-gold-light: #FFF8E1;
  --gov-bg: #FFF9F0;
  --login-gradient: linear-gradient(180deg, #D40000 0%, #8B0000 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #e63939 0%, #a80f0f 52%, #5c0606 100%);
}

/* 元宵节 —— 暖橙灯会 */
[data-theme="festival-lantern"] {
  --gov-primary: #E65100; --gov-primary-dark: #B23C00; --gov-primary-light: #F07033; --gov-primary-bg: #FFF6F0;
  --gov-red: #E65100; --gov-red-dark: #B23C00; --gov-red-light: #F07033; --gov-red-bg: #FFF6F0;
  --palace-red: #B23C00; --palace-red-dark: #8A2E00;
  --gov-gold: #FFC107; --gov-gold-light: #FFF8E1;
  --gov-bg: #FFFAF2;
  --login-gradient: linear-gradient(180deg, #E65100 0%, #B23C00 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #f57c00 0%, #bf3f00 52%, #6e2400 100%);
}

/* 清明节 —— 青绿素雅 */
[data-theme="festival-qingming"] {
  --gov-primary: #4E7A5C; --gov-primary-dark: #33543F; --gov-primary-light: #6FA07E; --gov-primary-bg: #F2F7F3;
  --gov-red: #4E7A5C; --gov-red-dark: #33543F; --gov-red-light: #6FA07E; --gov-red-bg: #F2F7F3;
  --palace-red: #33543F; --palace-red-dark: #243C2E;
  --gov-gold: #C9A86A; --gov-gold-light: #F7F1E3;
  --gov-bg: #F5F6F3;
  --login-gradient: linear-gradient(180deg, #4E7A5C 0%, #33543F 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #6b9a7a 0%, #3f624b 52%, #223829 100%);
}

/* 劳动节 —— 工装蓝 + 活力红 */
[data-theme="festival-labor"] {
  --gov-primary: #1B5AA8; --gov-primary-dark: #14447E; --gov-primary-light: #4A83C7; --gov-primary-bg: #EDF2FA;
  --gov-red: #1B5AA8; --gov-red-dark: #14447E; --gov-red-light: #4A83C7; --gov-red-bg: #EDF2FA;
  --palace-red: #14447E; --palace-red-dark: #0F3A6E;
  --gov-gold: #D84315; --gov-gold-light: #FBE9E7;
  --gov-bg: #F4F6F8;
  --login-gradient: linear-gradient(180deg, #1B5AA8 0%, #14447E 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #3b78c0 0%, #1b4a86 52%, #0e2c52 100%);
}

/* 端午节 —— 粽叶绿 */
[data-theme="festival-dragonboat"] {
  --gov-primary: #2E7D32; --gov-primary-dark: #1B5E20; --gov-primary-light: #4C9A50; --gov-primary-bg: #EFF7EF;
  --gov-red: #2E7D32; --gov-red-dark: #1B5E20; --gov-red-light: #4C9A50; --gov-red-bg: #EFF7EF;
  --palace-red: #1B5E20; --palace-red-dark: #144616;
  --gov-gold: #F9A825; --gov-gold-light: #FEF7E0;
  --gov-bg: #F4F8F2;
  --login-gradient: linear-gradient(180deg, #2E7D32 0%, #1B5E20 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #4c9a50 0%, #27682b 52%, #143d16 100%);
}

/* 儿童节 —— 活泼橙蓝 */
[data-theme="festival-children"] {
  --gov-primary: #FF7043; --gov-primary-dark: #E64A19; --gov-primary-light: #FF8A65; --gov-primary-bg: #FFF3EE;
  --gov-red: #FF7043; --gov-red-dark: #E64A19; --gov-red-light: #FF8A65; --gov-red-bg: #FFF3EE;
  --palace-red: #E64A19; --palace-red-dark: #BF360C;
  --gov-gold: #29B6F6; --gov-gold-light: #E1F5FE;
  --gov-bg: #FFF9F5;
  --login-gradient: linear-gradient(180deg, #FF7043 0%, #E64A19 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #ff8a65 0%, #f4511e 52%, #b32d00 100%);
}

/* 母亲节 —— 康乃馨粉 */
[data-theme="festival-mother"] {
  --gov-primary: #EC407A; --gov-primary-dark: #C2185B; --gov-primary-light: #F06292; --gov-primary-bg: #FDF0F5;
  --gov-red: #EC407A; --gov-red-dark: #C2185B; --gov-red-light: #F06292; --gov-red-bg: #FDF0F5;
  --palace-red: #C2185B; --palace-red-dark: #960F44;
  --gov-gold: #F8BBD0; --gov-gold-light: #FCE4EC;
  --gov-bg: #FDF5F8;
  --login-gradient: linear-gradient(180deg, #EC407A 0%, #C2185B 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #f2709c 0%, #cf2a62 52%, #7d0f3c 100%);
}

/* 父亲节 —— 沉稳深蓝 */
[data-theme="festival-father"] {
  --gov-primary: #3949AB; --gov-primary-dark: #283593; --gov-primary-light: #5C6BC0; --gov-primary-bg: #EFF1FA;
  --gov-red: #3949AB; --gov-red-dark: #283593; --gov-red-light: #5C6BC0; --gov-red-bg: #EFF1FA;
  --palace-red: #283593; --palace-red-dark: #1A237E;
  --gov-gold: #90CAF9; --gov-gold-light: #E3F2FD;
  --gov-bg: #F4F5F8;
  --login-gradient: linear-gradient(180deg, #3949AB 0%, #283593 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #5c6bc0 0%, #303f9f 52%, #1a237e 100%);
}

/* 七夕节 —— 浪漫玫瑰 */
[data-theme="festival-qixi"] {
  --gov-primary: #AD1457; --gov-primary-dark: #7B0F40; --gov-primary-light: #D81B60; --gov-primary-bg: #FDF0F6;
  --gov-red: #AD1457; --gov-red-dark: #7B0F40; --gov-red-light: #D81B60; --gov-red-bg: #FDF0F6;
  --palace-red: #7B0F40; --palace-red-dark: #5C0B30;
  --gov-gold: #F48FB1; --gov-gold-light: #FCE4EC;
  --gov-bg: #FDF6F9;
  --login-gradient: linear-gradient(180deg, #AD1457 0%, #7B0F40 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #d81b60 0%, #96124d 52%, #5c0b30 100%);
}

/* 中秋节 —— 月夜深蓝 + 金桂 */
[data-theme="festival-midautumn"] {
  --gov-primary: #1A237E; --gov-primary-dark: #0D1448; --gov-primary-light: #3949AB; --gov-primary-bg: #EEF0FA;
  --gov-red: #1A237E; --gov-red-dark: #0D1448; --gov-red-light: #3949AB; --gov-red-bg: #EEF0FA;
  --palace-red: #0D1448; --palace-red-dark: #070C2E;
  --gov-gold: #FFC107; --gov-gold-light: #FFF8E1;
  --gov-bg: #F4F4F8;
  --login-gradient: linear-gradient(180deg, #1A237E 0%, #0D1448 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #3949ab 0%, #1a237e 52%, #0d1448 100%);
}

/* 国庆节 —— 中国红 + 五星金 */
[data-theme="festival-national"] {
  --gov-primary: #C62828; --gov-primary-dark: #8E1A1A; --gov-primary-light: #D93434; --gov-primary-bg: #FDF2F2;
  --gov-red: #C62828; --gov-red-dark: #8E1A1A; --gov-red-light: #D93434; --gov-red-bg: #FDF2F2;
  --palace-red: #8E1A1A; --palace-red-dark: #6B1414;
  --gov-gold: #FFD54F; --gov-gold-light: #FFF8E1;
  --gov-bg: #FDF6F2;
  --login-gradient: linear-gradient(180deg, #C62828 0%, #8E1A1A 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #e04343 0%, #a01f1f 52%, #5c0f0f 100%);
}

/* 元旦 —— 新年亮红 + 香槟金 */
[data-theme="festival-newyear"] {
  --gov-primary: #E53935; --gov-primary-dark: #B71C1C; --gov-primary-light: #EF5350; --gov-primary-bg: #FEF0EF;
  --gov-red: #E53935; --gov-red-dark: #B71C1C; --gov-red-light: #EF5350; --gov-red-bg: #FEF0EF;
  --palace-red: #B71C1C; --palace-red-dark: #8E1A1A;
  --gov-gold: #FFCA28; --gov-gold-light: #FFF8E1;
  --gov-bg: #FDF8F6;
  --login-gradient: linear-gradient(180deg, #E53935 0%, #B71C1C 100%);
  --splash-gradient: radial-gradient(circle at 50% 32%, #f05757 0%, #c62828 52%, #7f0f0f 100%);
}

/* ============================================================
   节日动态装饰层（festival-effects.js 注入 #festival-fx）
   ============================================================ */
#festival-fx {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 1200; overflow: hidden;
}
.fx-item {
  position: absolute; top: 0; line-height: 1;
  will-change: transform, opacity; user-select: none;
}
.fx-item svg { width: 3em; height: 3em; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.25)); }

/* 福字（春节） */
.fx-fu {
  display: flex; align-items: center; justify-content: center;
  width: 1.7em; height: 1.7em;
  background: #D40000; color: #FFD700;
  border: 2px solid #FFD700; border-radius: 8px;
  font-weight: 900;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

@keyframes fx-fall {
  0%   { transform: translateY(-10vh) translateX(0) rotate(0deg); opacity: 0; }
  6%   { opacity: 1; }
  100% { transform: translateY(112vh) translateX(var(--fx-sway, 40px)) rotate(var(--fx-rot, 240deg)); opacity: 0.85; }
}
@keyframes fx-rise {
  0%   { transform: translateY(112vh) translateX(0); opacity: 0; }
  6%   { opacity: 1; }
  100% { transform: translateY(-10vh) translateX(var(--fx-sway, 40px)); opacity: 0; }
}
@keyframes fx-float {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50%      { transform: translateY(-20px) rotate(8deg); }
}
@keyframes fx-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes fx-twinkle {
  0%, 100% { opacity: 0.15; transform: scale(0.6); }
  50%      { opacity: 1; transform: scale(1.15); }
}
@keyframes fx-burst {
  0%   { transform: scale(0.1); opacity: 1; }
  55%  { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.7); opacity: 0; }
}

.fx-fall    { animation: fx-fall linear infinite; }
.fx-rise    { animation: fx-rise linear infinite; }
.fx-float   { animation: fx-float ease-in-out infinite; }
.fx-spin    { animation: fx-spin linear infinite; }
.fx-twinkle { animation: fx-twinkle ease-in-out infinite; }
.fx-burst   { animation: fx-burst ease-out infinite; }

/* ============================================================
   节日特色边框：顶部装饰带纹样 + 金色边框
   每个节日一条专属纹样，打破「千篇一律」
   ============================================================ */
:root {
  --festival-frame: #FFD700;
  --festival-stripe: repeating-linear-gradient(45deg, #FFD700 0 6px, #C41230 6px 12px);
}
[data-theme="govblue"] {
  --festival-frame: #FFD700;
  --festival-stripe: repeating-linear-gradient(45deg, #FFD700 0 6px, #1B5AA8 6px 12px);
}
[data-theme="festival-newyear"]    { --festival-frame:#FFCA28; --festival-stripe: repeating-linear-gradient(45deg,#FFCA28 0 5px,#E53935 5px 10px); }
[data-theme="festival-spring"]     { --festival-frame:#FFD700; --festival-stripe: repeating-linear-gradient(45deg,#FFD700 0 6px,#D40000 6px 12px); }
[data-theme="festival-lantern"]    { --festival-frame:#FFC107; --festival-stripe: repeating-linear-gradient(90deg,#FFC107 0 8px,#E65100 8px 16px); }
[data-theme="festival-qingming"]   { --festival-frame:#C9A86A; --festival-stripe: repeating-linear-gradient(45deg,#C9A86A 0 4px,#4E7A5C 4px 8px); }
[data-theme="festival-labor"]      { --festival-frame:#FFC107; --festival-stripe: repeating-linear-gradient(90deg,#1B5AA8 0 8px,#FFC107 8px 16px); }
[data-theme="festival-dragonboat"] { --festival-frame:#F9A825; --festival-stripe: repeating-linear-gradient(45deg,#2E7D32 0 6px,#F9A825 6px 12px); }
[data-theme="festival-children"]   { --festival-frame:#29B6F6; --festival-stripe: repeating-linear-gradient(90deg,#FF7043 0 8px,#29B6F6 8px 16px,#FFCA28 16px 24px); }
[data-theme="festival-mother"]     { --festival-frame:#F06292; --festival-stripe: repeating-linear-gradient(45deg,#EC407A 0 6px,#F8BBD0 6px 12px); }
[data-theme="festival-father"]     { --festival-frame:#5C6BC0; --festival-stripe: repeating-linear-gradient(90deg,#3949AB 0 8px,#90CAF9 8px 16px); }
[data-theme="festival-qixi"]       { --festival-frame:#D81B60; --festival-stripe: repeating-linear-gradient(45deg,#AD1457 0 6px,#F48FB1 6px 12px); }
[data-theme="festival-midautumn"]  { --festival-frame:#FFC107; --festival-stripe: repeating-linear-gradient(90deg,#1A237E 0 8px,#FFC107 8px 16px); }
[data-theme="festival-national"]   { --festival-frame:#FFD54F; --festival-stripe: repeating-linear-gradient(90deg,#C62828 0 8px,#FFD54F 8px 16px); }

/* 顶部栏底部节日装饰带（纹样花边）—— 已移除：手机上 6px 斜纹贴在蓝条底部像「边界框压住一部分」，老板要求去掉 */
/* .gov-header::after { ... } */

/* 导航栏底部金色边框（节日色） */
.gov-nav {
  border-bottom: 3px solid var(--festival-frame);
}

/* 节日祝福：启动页大字封面化 */
.splash-title.festival-on {
  color: var(--festival-frame, #FFD700);
  font-size: clamp(42px, 8vw, 76px);
  letter-spacing: 0.15em;
  text-shadow: 0 3px 14px rgba(0, 0, 0, 0.4);
}

/* 顶部栏节日祝福角标 */
.festival-greeting-tag {
  display: inline-flex; align-items: center;
  background: var(--festival-frame, #FFD700);
  color: #7a0a18;
  font-weight: 700; font-size: 0.8rem;
  padding: 3px 12px; border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  white-space: nowrap;
}

/* 登录页背景场景层 */
.festival-scene {
  position: absolute; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.scene-side {
  position: absolute; top: 50%;
  width: clamp(200px, 23vw, 300px);
  transform: translateY(-50%);
  opacity: 0;
  animation: sceneEnter 1.5s cubic-bezier(0.32, 0.72, 0, 1) both;
  will-change: transform, opacity;
  pointer-events: none;
}
.scene-left { left: 3.5vw; animation-delay: 0.08s; }
.scene-right { right: 3.5vw; animation-delay: 0.28s; }
.scene-side svg {
  display: block; width: 100%; height: auto;
  filter: drop-shadow(0 10px 34px rgba(0, 0, 0, 0.28));
  animation: sceneFloat 10s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}
.scene-left svg { animation-delay: 0.08s; }
.scene-right svg { animation-delay: 0.28s; }
@keyframes sceneEnter {
  from { opacity: 0; transform: translateY(calc(-50% + 26px)); }
  to   { opacity: 1; transform: translateY(-50%); }
}
@keyframes sceneFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14px); }
}
@media (max-width: 900px) {
  .scene-side { display: none; }
}

/* 登录卡片节日化：顶部纹样花边 */
.login-card.festival-on::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: var(--festival-stripe);
  border-radius: 8px 8px 0 0;
}

