/* ============================================================
   杭州市再生资源回收监测统计系统 · 现代设计系统 v2
   在 bootstrap.min.css / style.css 之后引入，全面覆盖旧样式
   设计：深青绿侧边栏 + 白色顶栏 + 浅灰内容区 + 卡片化布局
   ============================================================ */

:root {
  /* 品牌色 */
  --primary: #0aa679;
  --primary-dark: #07855f;
  --primary-darker: #05664a;
  --primary-light: #e6f7f1;
  --primary-glow: rgba(10, 166, 121, .14);

  /* 侧边栏 */
  --sidebar-w: 236px;
  --sidebar-bg: linear-gradient(180deg, #0b7d60 0%, #075f4a 100%);
  --sidebar-text: rgba(255, 255, 255, .72);
  --sidebar-text-active: #ffffff;

  /* 中性色 */
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #1f2937;
  --text-secondary: #4b5563;
  --text-muted: #8b94a3;
  --border: #e5e7eb;
  --border-light: #eef0f3;

  /* 语义色 */
  --danger: #ef4444;
  --danger-light: #fef2f2;
  --warning: #f59e0b;
  --info: #3b82f6;

  /* 圆角 / 阴影 */
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, .08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, .12);

  /* 字体 */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

/* ============ 全局 ============ */
* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg) !important;
  color: var(--text) !important;
  font-family: var(--font) !important;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7ced8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a9b3c0; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 侧边栏 ============ */
.left-side {
  position: fixed !important;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w) !important;
  background: var(--sidebar-bg) !important;
  box-shadow: none !important;
  border-right: none !important;
  z-index: 100;
  overflow-y: auto;
}

.logo {
  position: static !important;
  width: auto !important;
  height: 64px !important;
  margin: 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px !important;
  background: rgba(0, 0, 0, .08) !important;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
/* 覆盖旧 AdminEx 固定定位，避免 logo 与菜单重叠 */
.sticky-header .logo {
  position: static !important;
  top: auto !important;
  left: auto !important;
  width: auto !important;
  background: rgba(0, 0, 0, .08) !important;
}
.logo img {
  height: 36px !important;
  width: 36px !important;
  object-fit: contain;
  background: #fff;
  border-radius: 8px;
  padding: 3px;
  flex-shrink: 0;
}
.logo .logo-text {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 1px;
  white-space: nowrap;
  line-height: 1.2;
}
.logo .logo-sub {
  display: block;
  color: rgba(255, 255, 255, .55);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
  margin-top: 1px;
}

.left-side-inner {
  margin-top: 0 !important;
  padding: 14px 12px !important;
  color: var(--sidebar-text) !important;
}

/* 覆盖旧样式：去掉菜单顶部的 50px 空隙 */
.sticky-left-side .custom-nav,
.nav-stacked.custom-nav {
  margin-top: 0 !important;
}

.custom-nav > li > a {
  color: var(--sidebar-text) !important;
  padding: 11px 14px !important;
  margin-bottom: 3px;
  font-size: 15px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  border-left: 3px solid transparent !important;
  transition: all .18s ease;
}
.custom-nav > li > a .fa {
  margin-right: 11px;
  width: 16px;
  text-align: center;
  color: rgba(255, 255, 255, .6);
  font-size: 16px;
  transition: color .18s;
}
.custom-nav > li > a:hover {
  background: rgba(255, 255, 255, .10) !important;
  color: var(--sidebar-text-active) !important;
}
.custom-nav > li.active > a,
.custom-nav > li.active > a:hover,
.custom-nav > li.active > a:focus {
  background: rgba(255, 255, 255, .16) !important;
  color: var(--sidebar-text-active) !important;
  font-weight: 600;
  border-left-color: #34e0b4 !important;
}
.custom-nav > li.active > a .fa { color: #34e0b4; }

/* ============ 顶栏 ============ */
.header-section {
  position: sticky !important;
  top: 0;
  left: 0 !important;
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  padding: 0 24px;
  background: #ffffff !important;
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.header-section .page-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}
.header-section .header-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  color: var(--text-secondary);
  font-size: 14px;
}
.header-user .user-name {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-user .user-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.35;
}
.header-user .user-account {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-user .user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;
}
.header-user .logout-btn {
  color: var(--text-muted);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 6px;
  transition: all .18s;
}
.header-user .logout-btn:hover { background: var(--danger-light); color: var(--danger); }

/* ============ 主内容区 ============ */
.main-content {
  margin-left: var(--sidebar-w) !important;
  padding: 0 !important;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wrapper {
  flex: 1;
  background: var(--bg) !important;
  padding: 22px 26px 30px;
  min-height: 600px;
}

footer {
  text-align: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 13px;
  background: #ffffff;
  border-top: 1px solid var(--border);
}
footer a { color: var(--text-muted); }

/* ============ 卡片 Panel ============ */
.panel {
  border: none !important;
  border-radius: var(--radius) !important;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  background: var(--card);
  margin-bottom: 18px;
}
.panel-primary, .panel-info, .panel-success, .panel-warning, .panel-default {
  border: none !important;
}
.panel > .panel-heading {
  background: #ffffff !important;
  border-bottom: 1px solid var(--border-light) !important;
  color: var(--text) !important;
  font-size: 16px;
  font-weight: 600;
  padding: 15px 22px;
}
.panel > .panel-body { padding: 22px; }

/* ============ 表格 ============ */
.table {
  background: #fff;
  margin-bottom: 0;
  width: 100%;
}
.table > thead > tr > th {
  background: #f8fafc !important;
  color: var(--text-secondary) !important;
  font-weight: 600;
  border-bottom: 1px solid var(--border) !important;
  border-top: none !important;
  padding: 11px 14px;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
  font-size: 14px;
}
.table > tbody > tr > td {
  border-top: 1px solid var(--border-light) !important;
  padding: 11px 14px;
  color: var(--text-secondary);
  vertical-align: middle;
}
.table-bordered { border: 1px solid var(--border) !important; }
.table-bordered > thead > tr > th,
.table-bordered > tbody > tr > td { border: 1px solid var(--border-light) !important; }
.table-striped > tbody > tr:nth-of-type(odd) { background: #fbfcfe; }
.table > tbody > tr:hover { background: var(--primary-light) !important; }

/* 填报/报表表格中的输入框 */
.table input[type="text"], .table input[type="number"], .table select {
  border: 1px solid transparent;
  border-bottom: 1px solid #d5dbe3;
  background: transparent;
  border-radius: 0;
  transition: all .18s;
  padding: 4px 8px;
}
.table input[type="text"]:focus, .table input[type="number"]:focus {
  border: 1px solid var(--primary);
  border-radius: 5px;
  background: #fff;
  outline: none;
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* ============ 按钮 ============ */
.btn {
  border-radius: var(--radius-sm) !important;
  font-size: 15px;
  padding: 7px 16px;
  font-weight: 500;
  transition: all .18s ease;
  border: none !important;
  box-shadow: none !important;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-success { background: var(--primary) !important; color: #fff !important; }
.btn-success:hover { background: var(--primary-dark) !important; }
.btn-primary { background: var(--info) !important; color: #fff !important; }
.btn-primary:hover { background: #2f6fd0 !important; }
.btn-info { background: #4a90d9 !important; color: #fff !important; }
.btn-info:hover { background: #3a7ec0 !important; }
.btn-warning { background: var(--warning) !important; color: #fff !important; }
.btn-warning:hover { background: #dd8c06 !important; }
.btn-danger { background: var(--danger) !important; color: #fff !important; }
.btn-danger:hover { background: #dc2626 !important; }
.btn-default {
  background: #fff !important;
  color: var(--text-secondary) !important;
  border: 1px solid var(--border) !important;
}
.btn-default:hover { background: #f8fafc !important; border-color: #d5dbe3 !important; }
.btn-xs { padding: 3px 10px; font-size: 13px; border-radius: 5px !important; }
.btn-lg { padding: 10px 24px; font-size: 17px; }

/* ============ 表单控件 ============ */
.form-control {
  border-radius: var(--radius-sm) !important;
  border: 1px solid #d5dbe3 !important;
  height: 38px;
  padding: 6px 12px;
  font-size: 15px;
  box-shadow: none !important;
  transition: border-color .18s, box-shadow .18s;
  color: var(--text);
}
.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px var(--primary-glow) !important;
}
select.form-control { height: 38px; }

/* 筛选表单 */
.form-inline .form-control,
.form-inline select,
.form-inline input[type="text"] {
  margin-right: 6px;
}
.form-inline label {
  color: var(--text-secondary);
  font-weight: 500;
  margin-right: 4px;
  font-size: 14px;
}

/* ============ 筛选区（列表/汇总页） ============ */
.filter-form { margin: 0; }
.filter-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 12px 24px;
  margin-bottom: 12px;
}
.filter-row:last-of-type { margin-bottom: 0; }
.filter-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.filter-item > label {
  flex: 0 0 84px;
  text-align: right;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  margin: 0;
}
.filter-item .form-control {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: 260px;
  display: inline-block;
}
.filter-item .form-control.wide { max-width: 260px; }
@media (max-width: 991px) {
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .filter-row { grid-template-columns: minmax(0, 1fr); }
}
.filter-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding-top: 14px;
  margin-top: 4px;
  border-top: 1px solid var(--border-light);
}
.filter-actions .btn { min-width: 104px; }

/* 填报/详情表格：浅灰细边框（弱化边框，强调底色分界） */
.table-bordered,
.table-bordered > thead > tr > th,
.table-bordered > thead > tr > td,
.table-bordered > tbody > tr > th,
.table-bordered > tbody > tr > td {
  border: 1px solid #C9CDD1;
}

/* 表头三段时间：深色底白字（本季红 / 累计绿 / 上年蓝） */
.th-period-a { background: #A32D2D !important; color: #fff !important; }
.th-period-b { background: #1D9E75 !important; color: #fff !important; }
.th-period-c { background: #378ADD !important; color: #fff !important; }

/* 填报表：separate 布局 + 列间白色间隙（三段时间颜色不重叠） */
.fill-table { border-collapse: separate; border-spacing: 6px 0; }
.fill-table th, .fill-table td { border: 1px solid #C9CDD1; }

/* 数据三列：浅色底（浅红 / 浅绿 / 浅蓝） */
.fill-table th.col-a, .fill-table td.col-a { background: #FAECE7 !important; }
.fill-table th.col-b, .fill-table td.col-b { background: #E1F5EE !important; }
.fill-table th.col-c, .fill-table td.col-c { background: #E6F1FB !important; }

/* 品名行黄框（上下） */
.fill-table tbody td { border-top: 2px solid #F7C948; border-bottom: 2px solid #F7C948; }
.fill-table tbody tr.tr-total td { font-weight: 500; }
.fill-table .td-child { padding-left: 20px !important; color: #6b7280 !important; }

/* 打印：只输出报表数据区（隐藏侧边栏/页头/筛选区/按钮） */
@media print {
  #leftDiv, .header-section, footer,
  .filter-form, .filter-actions, .panel-primary, .btn, .no-print, .form-inline {
    display: none !important;
  }
  .main-content { margin-left: 0 !important; }
  .wrapper, #rightDiv { width: 100% !important; }
}

/* 水平表单（填报页） */
.form-horizontal .control-label {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 14px;
  padding-top: 8px;
}

/* 复选框 / 单选 */
.checkbox-inline, .radio-inline {
  color: var(--text-secondary);
  font-size: 14px;
}
input[type="checkbox"], input[type="radio"] { accent-color: var(--primary); }

/* ============ 分页 ============ */
.pagination > li > a,
.pagination > li > span {
  color: var(--text-secondary);
  border: 1px solid var(--border);
  margin: 0 3px;
  border-radius: var(--radius-sm) !important;
  transition: all .18s;
}
.pagination > li > a:hover { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary); }
.pagination > .active > a,
.pagination > .active > a:hover,
.pagination > .active > span,
.pagination > .active > span:hover {
  background: var(--primary) !important;
  border-color: var(--primary) !important;
  color: #fff !important;
}

/* ============ 提示 / Badge ============ */
.alert { border-radius: var(--radius-sm); border: none; }
.alert-success { background: var(--primary-light); color: var(--primary-darker); }
.alert-danger { background: var(--danger-light); color: #b91c1c; }
.badge { border-radius: 10px; font-weight: 500; }

/* ============ 模态框 ============ */
.modal-content {
  border-radius: var(--radius);
  border: none;
  box-shadow: var(--shadow-lg);
}
.modal-header { border-bottom: 1px solid var(--border-light); }
.modal-footer { border-top: 1px solid var(--border-light); }

/* ============ 面包屑 ============ */
.breadcrumb {
  background: transparent;
  padding: 0;
  margin: 0 0 16px;
  font-size: 14px;
}
.breadcrumb > li + li:before { content: "/\00a0"; color: var(--text-muted); }
.breadcrumb .active { color: var(--text-muted); }

/* ============ 登录页 ============ */
.login-body {
  background: #fff !important;
  margin: 0;
  min-height: 100vh;
  overflow: hidden;
}
.login-wrapper { display: flex; min-height: 100vh; width: 100%; }

/* 左侧品牌区 */
.login-left {
  position: relative;
  flex: 0 0 56%;
  overflow: hidden;
  background: linear-gradient(160deg, #0c8265 0%, #075f4a 55%, #054536 100%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 72px;
}
/* 装饰性循环圆环 */
.login-left::before,
.login-left::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .10);
  pointer-events: none;
}
.login-left::before {
  width: 620px; height: 620px;
  top: -200px; right: -220px;
  border-width: 70px;
}
.login-left::after {
  width: 360px; height: 360px;
  bottom: -140px; left: -140px;
  border-width: 44px;
}
.login-brand { position: relative; z-index: 2; color: #fff; }
.login-brand-head {
  display: flex; align-items: center; gap: 22px; margin-bottom: 30px;
}
.login-brand-icon {
  width: 78px; height: 78px;
  border-radius: 22px;
  background: rgba(255, 255, 255, .14);
  display: flex; align-items: center; justify-content: center;
  font-size: 41px;
  color: #34e0b4;
  margin-bottom: 0;
  animation: spin-slow 28s linear infinite;
}
.login-brand-assoc {
  font-size: 14px; color: #fff; letter-spacing: 1px; opacity: .92;
}
@keyframes spin-slow { to { transform: rotate(360deg); } }
.login-brand-title {
  font-size: 33px; font-weight: 700; letter-spacing: 1px;
  line-height: 1.35; margin-bottom: 40px;
}
.login-brand-tags { display: flex; flex-wrap: wrap; gap: 12px; }
.login-tag {
  padding: 6px 18px;
  border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 20px;
  font-size: 14px;
  opacity: .92;
  letter-spacing: 1px;
}

/* 右侧表单区 */
.login-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px 30px; background: #fff; position: relative;
}
.login-card { width: 100%; max-width: 400px; }
.login-card-logo img { width: 60px; height: 60px; margin: 0 auto 18px; display: block; object-fit: contain; }
.login-card-title { font-size: 27px; font-weight: 700; color: var(--text); text-align: center; margin-bottom: 8px; }
.login-card-sub { font-size: 14px; color: var(--text-muted); text-align: center; margin: 0 0 32px; }
.login-field { position: relative; margin-bottom: 18px; }
.login-field i {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: #9aa5b1; font-size: 16px; z-index: 2; transition: color .2s;
}
.login-field .form-control {
  border-radius: 8px !important;
  height: 48px;
  padding: 10px 14px 10px 42px;
  font-size: 16px;
  border: 1px solid #d5dbe3 !important;
}
.login-field:focus-within i { color: var(--primary); }
.login-card .btn-login {
  background: var(--primary); border: none; color: #fff; width: 100%;
  height: 48px; border-radius: 8px; font-size: 17px; font-weight: 600;
  letter-spacing: 6px; margin-top: 8px; transition: all .2s; cursor: pointer;
}
.login-card .btn-login:hover { background: var(--primary-dark); box-shadow: 0 8px 20px rgba(10, 166, 121, .28); }
.login-error {
  background: var(--danger-light); color: #b91c1c; border: 1px solid #fbdad5;
  border-radius: 6px; padding: 8px 12px; font-size: 14px; margin-bottom: 16px; text-align: center;
}
.login-copyright {
  text-align: center; color: #333333; font-size: 13px; margin-top: 32px;
}
.login-beian {
  margin-top: 8px; font-size: 12px;
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.login-beian .beian-item {
  color: #1E50A2; text-decoration: none; display: inline-flex; align-items: center; gap: 4px;
}
.login-beian .beian-item:hover { color: #0b62c4; text-decoration: underline; }
.login-beian .beian-divider { margin: 0 6px; color: #cbd2d9; }
.login-beian .beian-icon { width: 14px; height: 15px; vertical-align: middle; }

/* ============ 首页 ============ */
.home {
  max-width: 1100px;
  margin: 0 auto;
}
.home-hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0c8265 0%, #075f4a 60%, #054536 100%);
  border-radius: 18px;
  padding: 48px 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  box-shadow: var(--shadow-md);
  margin-bottom: 32px;
}
.home-hero::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -70px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  border: 42px solid rgba(255, 255, 255, .06);
}
.home-hero::after {
  content: "";
  position: absolute;
  right: 160px;
  bottom: -110px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 28px solid rgba(255, 255, 255, .05);
}
.home-hero-left { position: relative; z-index: 2; }
.home-hero-greeting { font-size: 16px; opacity: .85; margin: 0 0 12px; letter-spacing: 1px; }
.home-hero-title { font-size: 31px; font-weight: 700; letter-spacing: 1px; margin: 0 0 12px; }
.home-hero-slogan { font-size: 16px; opacity: .8; letter-spacing: 4px; margin: 0; }
.home-hero-icon {
  position: relative;
  z-index: 2;
  width: 112px;
  height: 112px;
  flex-shrink: 0;
  border-radius: 30px;
  background: rgba(255, 255, 255, .12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 57px;
  color: #34e0b4;
  animation: spin-slow 40s linear infinite;
}
.home-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 16px;
  padding-left: 12px;
  border-left: 3px solid var(--primary);
  line-height: 1.2;
}
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}
.home-card {
  background: var(--card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--text-secondary);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all .18s ease;
}
.home-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary);
  color: var(--text);
}
.home-card-icon {
  width: 46px;
  height: 46px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
}
.home-card-name {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.4;
}

/* ============ 响应式 ============ */
@media (max-width: 1024px) {
  .wrapper { padding: 16px 18px 24px; }
}
@media (max-width: 900px) {
  .left-side { width: 200px !important; }
  .main-content { margin-left: 200px !important; }
  .login-left { display: none; }
  .login-right { padding: 40px 20px; }
}

/* ============ SweetAlert 弹窗标题：一行显示 ============ */
.sweet-alert h2 {
  font-size: 23px;
  line-height: 30px;
  white-space: nowrap;
  margin: 20px 0;
}

/* ============ 字号 +1px 后的自适应兜底（防止文字溢出容器/背景） ============ */
/* 侧边栏 logo：允许收缩 + 超长截断，不再横向溢出 236/200px 侧栏 */
.logo { overflow: hidden; }
.logo .logo-text {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo .logo-sub {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}
/* 菜单：长名称自动换行，图标不压缩 */
.custom-nav > li > a { white-space: normal; word-break: break-word; line-height: 1.35; }
.custom-nav > li > a .fa { flex-shrink: 0; }
/* 顶栏：标题单行截断，用户信息不换行、不被挤出 */
.header-section .page-title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.header-section .header-user { flex-shrink: 0; white-space: nowrap; }
/* 按钮不折行 */
.btn { white-space: nowrap; }
/* 筛选标签留足宽度，避免文字贴边/换行 */
.filter-item > label { flex: 0 0 92px; }
/* 面板内容区横向兜底：表格过宽时出横向滚动条，不撑破页面 */
.panel > .panel-body { overflow-x: auto; }
/* 列表表格：长文本自动换行 */
.table { word-break: break-word; }
/* 报表表格：数值/项目名单行不折行，合并单元格说明文字仍可换行 */
.fill-table th, .fill-table td { white-space: nowrap; }
.fill-table td[colspan], .fill-table th[colspan] { white-space: normal; }
/* 标题类：超长时换行而不是溢出 */
.panel > .panel-heading,
.home-hero-title, .home-section-title, .home-card-name,
.login-brand-title, .login-card-title { word-break: break-word; }
/* 弹窗标题：超长时换行显示（避免省略号截断导致内容显示不全） */
.sweet-alert h2 { max-width: 100%; white-space: normal; word-break: break-word; }

/* ============ 报表正表样式修正（恢复需求2 设计，压过 .table 通用规则） ============ */
/* 背景：theme.css 上方 .table > thead > tr > th（权重 0,1,3，带 !important）会盖住
   .th-period-a/.b/.c（0,1,0）；.table-bordered > tbody > tr > td（带 !important）
   会盖住 .fill-table tbody td 的黄色上下框。此处用 table.rpt-table 前缀提高权重修正。 */
/* 1. 表头三段：本季 深红 / 本季止累计 绿 / 上年同期累计 蓝（白字） */
table.rpt-table > thead > tr > th.th-period-a { background: #A32D2D !important; color: #fff !important; border-color: #A32D2D !important; }
table.rpt-table > thead > tr > th.th-period-b { background: #1D9E75 !important; color: #fff !important; border-color: #1D9E75 !important; }
table.rpt-table > thead > tr > th.th-period-c { background: #378ADD !important; color: #fff !important; border-color: #378ADD !important; }
/* 2. 数据三列浅底：浅红 / 浅绿 / 浅蓝 */
table.rpt-table > thead > tr > th.col-a, table.rpt-table > tbody > tr > td.col-a { background: #FAECE7 !important; }
table.rpt-table > thead > tr > th.col-b, table.rpt-table > tbody > tr > td.col-b { background: #E1F5EE !important; }
table.rpt-table > thead > tr > th.col-c, table.rpt-table > tbody > tr > td.col-c { background: #E6F1FB !important; }
/* 3. 行边框：黑色细线（横线+竖线统一 1px 深灰黑，替代原黄色粗横线） */
table.rpt-table > tbody > tr > td { border: 1px solid #333 !important; }
/* 4. 品名列去底色（白底，不再黄底高亮；三色分列底色保留） */
table.rpt-table > tbody > tr > td:first-child { background: #ffffff !important; }
/* 5. 总计行：灰底加粗（写在 4 之后，同权重后者生效） */
table.rpt-table > tbody > tr.tr-total > td { background: #F1F3F6 !important; font-weight: 600 !important; }
/* 6. 表头细边框统一为黑（三段色块自带同色边框，不受影响） */
table.rpt-table > thead > tr > th { border-color: #333 !important; }


/* ============ 综合情况表：列间隙调整（仅两处分区间保留 6px 空隙） ============
   背景：原 border-spacing:6px 0 使 13 处相邻整列都有 6px 空隙。
   现改为：仅「本季↔本季止累计」「本季止累计↔上年同期累计」保留 6px（由 .rpt-gut
   间隔列实现），其余列贴合；行间距（含 4px 黄色行分隔线）保持不变。
   作用域限定 .gapsep，重点/报废/市政/回收体系报表不受影响。 */
table.rpt-table.gapsep { border-spacing: 0 0 !important; }
/* 相邻单元格只保留一条竖线（否则贴合后出现双线） */
table.rpt-table.gapsep > thead > tr > th,
table.rpt-table.gapsep > tbody > tr > td { border-right: 0 !important; }
table.rpt-table.gapsep > thead > tr > th:last-child,
table.rpt-table.gapsep > tbody > tr > td:last-child { border-right: 1px solid #333 !important; }
/* 重点表（key-table）套用 gapsep 只为消除列间 6px 空白（border-spacing:0），
   并无 rpt-gut 间隔列，故需恢复所有列间竖线，避免「序号」等列之间无分隔线 */
table.rpt-table.gapsep.key-table > thead > tr > th,
table.rpt-table.gapsep.key-table > tbody > tr > td { border-right: 1px solid #333 !important; }
/* 重点表改用 collapse 合并相邻边框：separate+border-spacing:0 会让相邻行的
   border-bottom/border-top 紧贴重叠，部分浏览器打印时丢失行间横线；collapse
   下每行之间稳定只保留一条 1px 分隔线 */
table.rpt-table.key-table { border-collapse: collapse !important; border-spacing: 0 !important; }
/* 两处分区之间的间隔列（需求：三块内容之间不留空白，宽度归零） */
table.rpt-table.gapsep > thead > tr > th.rpt-gut,
table.rpt-table.gapsep > tbody > tr > td.rpt-gut {
  border: 0 !important;
  background: transparent !important;
  width: 0 !important; min-width: 0 !important; max-width: 0 !important;
  padding: 0 !important;
}


/* ============ 综合情况表：废旧有色金属组（废旧有色金属/其中：废铜/其中：废铝）三行按一行标色 ============
   需求：这三行在视觉上按【一行】标记 —— 组内、组上沿、组下沿全部用黑线（1px #333），
   与横线粗细一致，不再使用黄色粗线。品名列白底。
   作用域限定 .grp-metal，只作用于综合表 3 个页面（fill / detail / summary_detail）。 */
table.rpt-table > tbody > tr.grp-metal > td { border-top: 1px solid #333 !important; border-bottom: 0 !important; }
table.rpt-table > tbody > tr.grp-metal.grp-first > td { border-top: 1px solid #333 !important; }
table.rpt-table > tbody > tr.grp-metal.grp-last > td { border-bottom: 1px solid #333 !important; }
/* 重点表（key-table）套用 grp-metal 仅为分组标色，不应去掉组内行间横线，恢复 border-bottom */
table.rpt-table.key-table > tbody > tr.grp-metal > td { border-bottom: 1px solid #333 !important; }
/* 仅打印时显示的元素（屏幕隐藏） */
.print-season { display: none; }

/* ============ 打印：A4 横向，只打印报表数据区（2026-09-18）============
   纸张横向 A4（297mm），JS 会对超出 1040px 的宽表自动等比缩放，避免右侧被裁。
   页面壳（左侧菜单、顶栏、页脚、按钮、筛选区）在打印时全部隐藏。 */
@media print {
  @page { size: A4 landscape; margin: 25.4mm 15mm; }
  html, body { background: #fff !important; }
  body.sticky-header .left-side,
  .header-section,
  footer,
  .no-print,
  .filter-form,
  .filter-actions,
  .btn,
  .form-inline,
  .sweet-alert,
  .sweet-overlay { display: none !important; }
  /* 仅打印时显示（屏幕隐藏）：综合表明细页表格名称下方的「打印年季度」 */
  .print-season { display: block !important; }
  .main-content { margin-left: 0 !important; padding: 0 !important; }
  .wrapper { margin: 0 !important; padding: 0 !important; }
  .row { margin: 0 !important; }
  .panel { border: 0 !important; box-shadow: none !important; margin: 0 0 6px !important; }
  /* 报表页（综合表/重点表详情与汇总明细）打印时收缩到表格宽度并居中，使面板标题左边缘与表格左边缘对齐 */
  .panel-success { width: fit-content !important; max-width: 100% !important; margin-left: auto !important; margin-right: auto !important; }
  .panel > .panel-heading { background: #fff !important; color: #000 !important; border: 0 !important; border-bottom: 0 !important; padding: 2px 0 !important; }
  .panel-body { padding: 0 !important; }
  table { width: auto !important; margin: 0 auto !important; page-break-inside: auto; }
  /* 重点表（key-table，6 列窄表）打印时占满纸宽（列宽均匀拉伸、字体不变），消除左右空白 */
  table.key-table { width: 100% !important; }
  /* 收紧报表表打印行高（bootstrap 默认 td 上下 11px 过松），避免横向打印超出 A4 高度分页，
     并让 zoom 不再被高度限制拖低、宽度得以占满纸宽 */
  table.rpt-table th, table.rpt-table td { padding-top: 3px !important; padding-bottom: 3px !important; }
  /* 含重点表的 panel 不再收缩为内容宽，占满纸宽（否则 table width:100% 仍被 fit-content 限制） */
  .panel-success:has(table.key-table) { width: 100% !important; }
  tr { page-break-inside: avoid; page-break-after: auto; }
  thead { display: table-header-group; }
  /* 打印时「本季/本季止累计/上年同期累计」三段表头字体改黑色（屏幕仍为白字），
     且三段表头三色背景（红/绿/蓝）统一为白底（所有报表） */
  table.rpt-table > thead > tr > th.th-period-a,
  table.rpt-table > thead > tr > th.th-period-b,
  table.rpt-table > thead > tr > th.th-period-c { color: #000 !important; background: #ffffff !important; }
  /* 打印时删除三列数据的三色浅底（浅红/浅绿/浅蓝），统一为白底（所有报表） */
  table.rpt-table > tbody > tr > td.col-a,
  table.rpt-table > tbody > tr > td.col-b,
  table.rpt-table > tbody > tr > td.col-c { background: #ffffff !important; }
}

/* ============ 响应式适配：主流分辨率（2026-09-18）============
   目标：
     ≥1800      保持原样式（原有留白与 70px 输入框）
     1600–1799  压缩留白 → 综合表 / 汇总明细无需横向滚动
     1440–1599  进一步压缩；1536 无需滚动，1440 少量滚动（配合首列冻结）
     1280–1439  仍有滚动 → 冻结「品名」列 + 滚动条常显
     <1280      同上，留白压到最小
   实现：只压缩留白，不动报表字号；输入框宽度仅在 ≤1439 时略减，保证数值可读。
   ============================================================ */

/* --- 1600–1799：目标 = 宽报表不出现横向滚动（投入产出比最高的一档） --- */
@media (max-width: 1799px) and (min-width: 1600px) {
  :root { --sidebar-w: 220px; }
  .wrapper { padding: 16px 20px 22px; }
  .panel > .panel-body { padding: 12px; }
  table.rpt-table > thead > tr > th { padding-left: 4px !important; padding-right: 4px !important; }
  table.rpt-table > tbody > tr > td:not(:first-child) { padding-left: 4px !important; padding-right: 4px !important; }
  table.rpt-table > tbody > tr > td:first-child { padding-right: 4px !important; }
}

/* --- 1440–1599：1536 无滚动；1440 少量滚动 --- */
@media (max-width: 1599px) and (min-width: 1440px) {
  :root { --sidebar-w: 210px; }
  .wrapper { padding: 14px 16px 20px; }
  .panel > .panel-body { padding: 10px; }
  table.rpt-table > thead > tr > th { padding-left: 3px !important; padding-right: 3px !important; }
  table.rpt-table > tbody > tr > td:not(:first-child) { padding-left: 3px !important; padding-right: 3px !important; }
  table.rpt-table > tbody > tr > td:first-child { padding-right: 3px !important; }
}

/* --- 1280–1439：横向滚动 + 首列冻结；输入框略减保数值可读 --- */
@media (max-width: 1439px) and (min-width: 1280px) {
  :root { --sidebar-w: 200px; }
  .wrapper { padding: 12px 14px 18px; }
  .panel > .panel-body { padding: 8px; }
  table.rpt-table > thead > tr > th { padding-left: 2px !important; padding-right: 2px !important; }
  table.rpt-table > tbody > tr > td:not(:first-child) { padding-left: 2px !important; padding-right: 2px !important; }
  table.rpt-table > tbody > tr > td:first-child { padding-right: 2px !important; }
  table.rpt-table input[type="text"], .fill-table input[type="text"] { width: 66px !important; }
}

/* --- <1280：留白压到最小 --- */
@media (max-width: 1279px) {
  :root { --sidebar-w: 190px; }
  .wrapper { padding: 10px 12px 16px; }
  .panel > .panel-body { padding: 6px; }
  table.rpt-table > thead > tr > th { padding-left: 2px !important; padding-right: 2px !important; }
  table.rpt-table > tbody > tr > td:not(:first-child) { padding-left: 2px !important; padding-right: 2px !important; }
  table.rpt-table > tbody > tr > td:first-child { padding-right: 2px !important; }
  table.rpt-table input[type="text"], .fill-table input[type="text"] { width: 64px !important; }
}

/* --- ≤1599：宽报表横向滚动时冻结「品名」首列，避免滚动后认不出是哪行 --- */
@media (max-width: 1599px) {
  table.rpt-table > thead > tr > th:first-child,
  table.rpt-table > tbody > tr > td:first-child {
    position: sticky !important;
    left: 0;
    z-index: 4;
    box-shadow: 2px 0 5px rgba(15, 23, 42, .14);
  }
  /* 滚动条常显：Windows 下默认细且易被忽略，用户常常不知道右边还有内容 */
  .panel > .panel-body::-webkit-scrollbar { height: 11px; }
  .panel > .panel-body::-webkit-scrollbar-thumb { background: #98A2B3; border-radius: 6px; }
  .panel > .panel-body::-webkit-scrollbar-track { background: #E9EDF1; }
  .panel > .panel-body { scrollbar-width: auto; }
}

/* ============ 填报页字段对齐（2026-09-19）============
   「填报单位」与「统一社会信用代码」两个输入框等宽（由模板内 JS 同步为 select 实际宽度），
   这里把两行标签定宽右对齐，使两个框的左右边缘同时对齐（132px = 9 字符 × 14px + 余量）。 */
#fillForm .fill-label {
  display: inline-block;
  min-width: 132px;
  text-align: right;
}
