﻿/* ====== 璁捐鍙橀噺 ====== */
:root {
  --primary: #2563eb;
  --primary-light: #dbeafe;
  --primary-dark: #1e40af;
  --success: #16a34a;
  --success-light: #dcfce7;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --info: #0ea5e9;
  --info-light: #e0f2fe;
  --purple: #8b5cf6;
  --purple-light: #ede9fe;
  --bg: #f5f7fa;
  --card: #ffffff;
  --border: #e5e7eb;
  --text-1: #1f2937;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.12);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --header-h: 52px;
  --tabbar-h: 56px;
}

/* ====== Reset ====== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", "WenQuanYi Micro Hei", "Source Han Sans CN", sans-serif;
  background: var(--bg);
  color: var(--text-1);
  font-size: 14px;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
#app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  position: relative;
  box-shadow: 0 0 40px rgba(0,0,0,.05);
}
svg { display: inline-block; vertical-align: middle; }
.icon-sm { width: 14px; height: 14px; }
.icon-xs { width: 10px; height: 10px; }
.icon-md { width: 22px; height: 22px; }
.icon-lg { width: 28px; height: 28px; }

/* ====== 椤堕儴瀵艰埅鏍� ====== */
.app-header {
  height: var(--header-h);
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(37,99,235,.3);
}
.header-left {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  flex-shrink: 0;
}
.header-left .brand-logo-mini {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.header-left .brand-name {
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}
.header-left .park-name {
  font-size: 13px;
  font-weight: 600;
  max-width: 62px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-title {
  font-size: 17px;
  font-weight: 600;
  flex: 1;
  text-align: center;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.park-switcher {
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  background: rgba(255,255,255,.2);
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
}
.park-switcher .icon-sm {
  width: 14px;
  height: 14px;
}
.park-switcher .icon-xs {
  width: 10px;
  height: 10px;
}
.park-switcher span {
  max-width: 56px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notify-wrap {
  position: relative;
  cursor: pointer;
}
.badge-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  background: var(--danger);
  border-radius: 50%;
  display: none;
}
.badge-dot.show { display: block; }

/* ====== 涓诲唴瀹瑰尯 ====== */
.app-content {
  padding: 12px;
  padding-bottom: calc(var(--tabbar-h) + 16px);
  min-height: calc(100vh - var(--header-h) - var(--tabbar-h));
}

/* ====== 搴曢儴瀵艰埅鏍� ====== */
.tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  height: var(--tabbar-h);
  background: var(--card);
  display: flex;
  box-shadow: 0 -2px 12px rgba(0,0,0,.06);
  z-index: 100;
  border-top: 1px solid var(--border);
}
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-3);
  cursor: pointer;
  transition: color .2s;
}
.tab-item.active { color: var(--primary); }
.tab-icon { width: 22px; height: 22px; }
.tab-label { font-size: 10px; }

/* ====== 鍗＄墖 ====== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}
.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.card-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}
.card-link {
  font-size: 12px;
  color: var(--primary);
  cursor: pointer;
}

/* ====== 缁熻鍗＄墖 ====== */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.stat-grid.col-3 { grid-template-columns: repeat(3, 1fr); }
.stat-grid.col-4 { grid-template-columns: repeat(4, 1fr); }
.stat-item {
  background: var(--card);
  border-radius: var(--radius);
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}
.stat-label {
  font-size: 12px;
  color: var(--text-2);
  margin-top: 4px;
}
.stat-trend {
  font-size: 11px;
  margin-top: 2px;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ====== 蹇嵎鍏ュ彛 ====== */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}
.quick-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.quick-icon svg { width: 24px; height: 24px; color: #fff; }
.quick-label { font-size: 11px; color: var(--text-2); }

/* ====== 鍒楄〃 ====== */
.list-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.list-item:last-child { border-bottom: none; }
.list-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.list-content { flex: 1; min-width: 0; }
.list-title { font-size: 14px; font-weight: 600; }
.list-desc { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.list-arrow { color: var(--text-3); flex-shrink: 0; }

/* ====== 鏍囩 ====== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.tag-success { background: var(--success-light); color: var(--success); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-danger { background: var(--danger-light); color: var(--danger); }
.tag-info { background: var(--info-light); color: var(--info); }
.tag-primary { background: var(--primary-light); color: var(--primary); }
.tag-purple { background: var(--purple-light); color: var(--purple); }
.tag-default { background: #f3f4f6; color: var(--text-2); }

/* ====== 鎸夐挳 ====== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: opacity .2s;
}
.btn:active { opacity: .8; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline { background: transparent; border: 1px solid var(--border); color: var(--text-1); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { width: 100%; }

/* ====== 琛ㄥ崟 ====== */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  margin-bottom: 6px;
}
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: #fff;
  outline: none;
  transition: border-color .2s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
}
.form-textarea { resize: vertical; min-height: 80px; }

/* ====== 鎼滅储鏍� ====== */
.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border-radius: 20px;
  padding: 8px 14px;
  margin-bottom: 12px;
  gap: 8px;
}
.search-bar input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 14px;
  background: transparent;
}

/* ====== 绛涢€夋爣绛炬爮 ====== */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.filter-tabs::-webkit-scrollbar { display: none; }
.filter-tab {
  padding: 6px 14px;
  border-radius: 16px;
  font-size: 13px;
  white-space: nowrap;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  border: 1px solid var(--border);
}
.filter-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ====== 杩涘害鏉� ====== */
.progress-bar {
  width: 100%;
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .3s;
}

/* ====== 鍥捐〃瀹瑰櫒 ====== */
.chart-wrap {
  position: relative;
  width: 100%;
}
.chart-wrap canvas { max-height: 240px; }

/* ====== 寮圭獥 ====== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.5);
  z-index: 200;
  display: none;
}
.modal-overlay.show { display: block; }
.modal-container {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 380px;
  max-height: 80vh;
  overflow-y: auto;
  background: #fff;
  border-radius: var(--radius-lg);
  z-index: 201;
  display: none;
}
.modal-container.show { display: block; }
.modal-header {
  padding: 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close { font-size: 20px; cursor: pointer; color: var(--text-3); }
.modal-body { padding: 16px; }
.modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}

/* ====== 搴曢儴寮瑰嚭灞� ====== */
.bottom-sheet {
  position: fixed;
  bottom: 0; left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 430px;
  background: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  z-index: 201;
  transition: transform .3s ease;
  max-height: 70vh;
  overflow-y: auto;
}
.bottom-sheet.show { transform: translateX(-50%) translateY(0); }
.sheet-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 700;
}
.sheet-close { font-size: 13px; color: var(--primary); cursor: pointer; }
.sheet-body { padding: 8px 0; }

/* ====== Toast ====== */
.toast-container {
  position: fixed;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  pointer-events: none;
}
.toast {
  background: rgba(0,0,0,.8);
  color: #fff;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  text-align: center;
  animation: toastIn .3s;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ====== 閫氱敤 ====== */
.section-title {
  font-size: 15px;
  font-weight: 700;
  margin: 16px 0 10px;
  padding-left: 8px;
  border-left: 3px solid var(--primary);
}
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--text-3); }
.text-sm { font-size: 12px; }
.text-lg { font-size: 16px; }
.text-xl { font-size: 20px; }
.text-bold { font-weight: 700; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-center { display: flex; align-items: center; gap: 6px; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }
.pb-12 { padding-bottom: 12px; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.text-center { text-align: center; }

/* 绌虹姸鎬� */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-3);
}
.empty-state svg { width: 60px; height: 60px; margin-bottom: 12px; opacity: .3; }

/* 鍒嗗壊绾� */
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* 淇℃伅琛� */
.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 13px;
}
.info-label { color: var(--text-2); }
.info-value { font-weight: 600; }

/* 鍔熻兘缃戞牸 */
.func-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.func-grid.col-3 { grid-template-columns: repeat(3, 1fr); }
.func-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 8px 4px;
}
.func-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}
.func-label { font-size: 12px; color: var(--text-1); text-align: center; }

/* 琛ㄦ牸 */
.table-wrap { overflow-x: auto; }
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table th, table.data-table td {
  padding: 10px 8px;
  text-align: center;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
table.data-table th {
  background: #f9fafb;
  font-weight: 600;
  color: var(--text-2);
  position: sticky;
  top: 0;
}

/* 杩涘害鐜� */
.ring-progress {
  width: 80px;
  height: 80px;
  position: relative;
}
.ring-progress svg { transform: rotate(-90deg); }
.ring-progress .ring-text {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
}

/* 婊氬姩鍏憡 */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--warning-light);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  margin-bottom: 12px;
  overflow: hidden;
}
.notice-bar .notice-text {
  flex: 1;
  font-size: 12px;
  color: var(--warning);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 娓愬彉鑳屾櫙 */
.gradient-blue { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.gradient-green { background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%); }
.gradient-orange { background: linear-gradient(135deg, #f6d365 0%, #fda085 100%); }
.gradient-cyan { background: linear-gradient(135deg, #2193b0 0%, #6dd5ed 100%); }
.gradient-pink { background: linear-gradient(135deg, #ee9ca7 0%, #ffdde1 100%); }
.gradient-purple { background: linear-gradient(135deg, #8E2DE2 0%, #4a00e0 100%); }
.gradient-red { background: linear-gradient(135deg, #eb3349 0%, #f45c43 100%); }

/* 瑙掕壊鏉冮檺寰界珷 */
.role-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}
.role-super { background: linear-gradient(135deg, #8E2DE2, #4a00e0); color: #fff; }
.role-admin { background: var(--primary); color: #fff; }
.role-manager { background: var(--info); color: #fff; }
.role-staff { background: var(--text-3); color: #fff; }

/* ====== 鐧诲綍椤� ====== */
.login-page {
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
}
.login-card {
  width: 100%;
  max-width: 340px;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: 0 4px 24px rgba(0,0,0,.08);
  text-align: center;
}
.login-logo { margin-bottom: 16px; }
.login-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 4px;
}
.login-subtitle {
  font-size: 13px;
  color: var(--text-3);
  margin-bottom: 24px;
}
.login-error {
  background: var(--danger-light);
  color: var(--danger);
  font-size: 13px;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.login-demo {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--bg);
  padding: 8px;
  border-radius: var(--radius-sm);
}

/* ====== Loading ====== */
.loading-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  color: var(--text-3);
}
.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ====== 鍔犺浇/閿欒鐘舵€� ====== */
.loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: var(--text-3);
  gap: 12px;
}
.loading-state .spinner {
  margin-right: 0;
}
.loading-state p {
  font-size: 13px;
}
.error-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--danger);
}
.error-state p {
  font-size: 14px;
  margin-bottom: 12px;
}

/* =====================================================
 * 第9大模块美化样式 · Hero Banner · 分组参数面板 · 精致卡片
 * ===================================================== */

/* ----- Hero Banner 顶部渐变大卡片 ----- */
.ea-hero {
  position: relative;
  margin: 12px;
  border-radius: 20px;
  padding: 22px 20px 20px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.ea-hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(circle at 0% 100%, rgba(255,255,255,.12), transparent 50%);
  pointer-events: none;
}
.ea-hero-content { position: relative; z-index: 1; }
.ea-hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.ea-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.22);
  backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 600;
}
.ea-hero-badge span:first-child { font-size: 14px; }
.ea-hero-meta {
  font-size: 12px;
  opacity: .85;
  background: rgba(255,255,255,.15);
  padding: 4px 10px;
  border-radius: 100px;
}
.ea-hero-title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 6px;
  text-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.ea-hero-desc {
  font-size: 12px;
  opacity: .9;
  margin-bottom: 18px;
  line-height: 1.6;
}
.ea-hero-stats {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.2);
}
.ea-hero-stat { flex: 1; text-align: center; }
.ea-hero-stat-label {
  font-size: 11px;
  opacity: .85;
  margin-bottom: 6px;
}
.ea-hero-stat-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
}
.ea-hero-stat-value small {
  font-size: 11px;
  opacity: .8;
  font-weight: 400;
  margin-left: 2px;
}
.ea-hero-divider {
  width: 1px;
  background: rgba(255,255,255,.25);
  margin: 0 14px;
}

/* ----- 子页面顶部 hero ----- */
.ea-sub-hero {
  position: relative;
  margin: 12px 12px 0;
  border-radius: 18px;
  padding: 14px 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.ea-sub-hero-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(255,255,255,.16), transparent 60%);
}
.ea-sub-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
}
.ea-sub-back {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.22);
  border-radius: 12px;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform .15s;
  backdrop-filter: blur(8px);
}
.ea-sub-back:hover { transform: scale(1.05); }
.ea-sub-back:active { transform: scale(0.95); }
.ea-sub-hero-text { flex: 1; min-width: 0; }
.ea-sub-hero-title {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}
.ea-sub-hero-sub {
  font-size: 11px;
  opacity: .88;
  margin-top: 3px;
}
.ea-sub-hero-tag {
  background: rgba(255,255,255,.25);
  padding: 6px 12px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

/* ----- 分组参数面板 ----- */
.ea-panel-shell {
  margin: 12px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}
.ea-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid var(--border);
  user-select: none;
}
.ea-panel-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ea-panel-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2563eb15, #06b6d415);
  border-radius: 10px;
  font-size: 18px;
}
.ea-panel-title {
  font-weight: 700;
  font-size: 14px;
  color: var(--text-1);
}
.ea-panel-sub {
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}
.ea-panel-head-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ea-panel-reset {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 100px;
  background: var(--primary-light);
  transition: transform .15s;
}
.ea-panel-reset:hover { transform: scale(1.05); }
.ea-panel-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: transform .25s ease;
}

/* 面板内容区 */
.ea-panel-body { padding: 14px; }
.ea-group + .ea-group { margin-top: 14px; }
.ea-group-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.ea-group-bar {
  width: 3px;
  height: 14px;
  border-radius: 2px;
}
.ea-group-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}
.ea-group-tip {
  font-size: 10px;
  color: var(--text-3);
  margin-left: auto;
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 100px;
}
.ea-group-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* 单个字段 */
.ea-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}
.ea-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ea-field-head {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ea-field-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.ea-field-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.ea-field-input-wrap {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  transition: all .15s ease;
  position: relative;
}
.ea-field-input-wrap:focus-within {
  border-color: var(--field-color, var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--field-color, var(--primary)) 15%, transparent);
}
.ea-field-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  text-align: right;
  padding: 0;
  font-variant-numeric: tabular-nums;
  -moz-appearance: textfield;
}
.ea-field-input::-webkit-outer-spin-button,
.ea-field-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.ea-field-unit {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 600;
  margin-left: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* 租户表格内联输入 */
.ea-tenant-input {
  width: 100%;
  min-width: 56px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 12px;
  text-align: right;
  font-weight: 600;
  background: #fff;
  outline: none;
  transition: all .15s;
}
.ea-tenant-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37,99,235,.12);
}

/* ----- 盈亏总览卡片 ----- */
.ea-overview {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
}
.ea-overview.is-loss {
  background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}
.ea-overview.is-profit {
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}
.ea-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.ea-overview-pill {
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 100px;
}
.ea-pill-loss {
  background: linear-gradient(135deg, #ef4444, #f97316);
  color: #fff;
}
.ea-pill-profit {
  background: linear-gradient(135deg, #10b981, #06b6d4);
  color: #fff;
}
.ea-pill-pv {
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: #fff;
}
.ea-overview-tag {
  font-size: 11px;
  color: var(--text-3);
  background: rgba(255,255,255,.6);
  padding: 3px 10px;
  border-radius: 100px;
}
.ea-overview-body {
  display: flex;
  gap: 16px;
  align-items: stretch;
}
.ea-overview-main { flex: 1.4; }
.ea-overview-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ea-overview-label {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 6px;
}
.ea-overview-value {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, var(--danger), #f97316);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.is-profit .ea-overview-value {
  background: linear-gradient(135deg, var(--success), #06b6d4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.ea-overview-status {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 600;
}
.ea-overview-mini {
  background: rgba(255,255,255,.65);
  border-radius: 10px;
  padding: 8px 10px;
  backdrop-filter: blur(4px);
}
.ea-overview-mini-label {
  font-size: 10px;
  color: var(--text-3);
}
.ea-overview-mini-value {
  font-size: 16px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.ea-overview-mini-value small {
  font-size: 10px;
  color: var(--text-3);
  font-weight: 400;
  margin-left: 2px;
}
.ea-overview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}
.ea-overview-item {
  text-align: center;
  background: rgba(255,255,255,.6);
  border-radius: 8px;
  padding: 8px 4px;
}
.ea-overview-item > div:first-child {
  font-size: 10px;
  color: var(--text-3);
}
.ea-overview-item > div:last-child {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* 光伏总览卡 */
.ea-overview-pv {
  background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}
.ea-pv-row {
  display: flex;
  gap: 14px;
  align-items: stretch;
}
.ea-pv-meta {
  width: 90px;
  background: rgba(255,255,255,.7);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ea-pv-cap {
  font-size: 26px;
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #f59e0b, #eab308);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-variant-numeric: tabular-nums;
}
.ea-pv-cap small {
  font-size: 12px;
  font-weight: 600;
  -webkit-text-fill-color: var(--warning);
  margin-left: 1px;
}
.ea-pv-cap-label {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
}
.ea-pv-stats {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ea-pv-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,.6);
  border-radius: 8px;
  padding: 7px 10px;
}
.ea-pv-stat-label {
  font-size: 11px;
  color: var(--text-3);
}
.ea-pv-stat-value {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ea-pv-stat-value small {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 3px;
}
.ea-pv-payback {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-radius: 10px;
}
.ea-pv-payback span {
  font-size: 12px;
  opacity: .9;
}
.ea-pv-payback strong {
  font-size: 16px;
  font-weight: 800;
}

/* ----- 六大功能入口（彩色） ----- */
.ea-func-card {
  padding: 8px;
}

/* ----- 成本构成图例 ----- */
.ea-cost-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ea-cost-legend-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
}
.ea-cost-legend-item + .ea-cost-legend-item {
  border-top: 1px dashed var(--border);
}
.ea-cost-legend-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
}
.ea-cost-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
}
.ea-cost-flag {
  font-size: 10px;
  background: var(--danger-light);
  color: var(--danger);
  padding: 2px 6px;
  border-radius: 100px;
  font-weight: 700;
}
.ea-cost-legend-right {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}
.ea-cost-amount {
  font-size: 14px;
  font-weight: 700;
}
.ea-cost-pct {
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg);
  padding: 2px 8px;
  border-radius: 100px;
  min-width: 36px;
  text-align: center;
}

/* ----- 亏损根源定位 ----- */
.ea-loss-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px !important;
}
.ea-loss-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
}
.ea-loss-red {
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border-left: 3px solid var(--danger);
}
.ea-loss-orange {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border-left: 3px solid var(--warning);
}
.ea-loss-green {
  background: linear-gradient(135deg, #f0fdf4, #dcfce7);
  border-left: 3px solid var(--success);
}
.ea-loss-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 1px;
}
.ea-loss-text { flex: 1; min-width: 0; }
.ea-loss-title {
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 3px;
}
.ea-loss-desc {
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ----- 规则卡片 ----- */
.ea-rules-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 16px !important;
}
.ea-rule {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.6;
}
.ea-rule.ok { color: var(--success); font-weight: 500; }
.ea-rule.err { color: var(--danger); }

/* ----- 容量费分摊租户表 ----- */
.ea-tenant-card {
  padding: 12px !important;
}
.ea-tenant-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 8px;
  padding: 6px 8px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  margin-bottom: 6px;
}
.ea-tenant-head > div { text-align: center; }
.ea-tenant-head > div:first-child { text-align: left; }
.ea-tenant-row {
  padding: 10px 8px;
  border-bottom: 1px solid var(--border);
}
.ea-tenant-row:last-child { border-bottom: none; }
.ea-tenant-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1fr;
  gap: 8px;
  align-items: center;
}
.ea-tenant-name {
  font-size: 13px;
  font-weight: 600;
}
.ea-tenant-split {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 6px;
  margin-top: 6px;
}
.ea-split-item {
  background: var(--bg);
  border-radius: 6px;
  padding: 5px 6px;
  text-align: center;
}
.ea-split-item span {
  font-size: 10px;
  color: var(--text-3);
  display: block;
}
.ea-split-item strong {
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ----- 三套分摊模型卡片 ----- */
.ea-model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.ea-model-card {
  text-align: center;
  padding: 14px 8px !important;
  border-radius: 12px;
  position: relative;
  border-top: 3px solid;
}
.ea-model-kwh { border-color: #2563eb; background: linear-gradient(180deg, #dbeafe, #fff); }
.ea-model-peak { border-color: #f59e0b; background: linear-gradient(180deg, #fef3c7, #fff); }
.ea-model-area { border-color: #8b5cf6; background: linear-gradient(180deg, #ede9fe, #fff); }
.ea-model-icon {
  font-size: 24px;
  margin-bottom: 6px;
}
.ea-model-name {
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 3px;
}
.ea-model-desc {
  font-size: 10px;
  color: var(--text-3);
  margin-bottom: 8px;
  line-height: 1.4;
}
.ea-model-total {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.ea-model-tip {
  font-size: 10px;
  color: var(--text-2);
  font-weight: 600;
  background: rgba(255,255,255,.6);
  padding: 2px 6px;
  border-radius: 100px;
  display: inline-block;
}

/* ----- 公式推导卡片 ----- */
.ea-formula-card {
  padding: 16px !important;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ea-formula-line {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-2);
}
.ea-formula-eq {
  font-weight: 600;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  color: var(--text-1);
}
.ea-formula-result {
  text-align: right;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
}
.ea-formula-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}
.ea-formula-highlight {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #f59e0b, #eab308);
  color: #fff;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  margin-top: 4px;
}
.ea-formula-highlight span:last-child {
  font-size: 18px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ----- 自用 vs 上网模式对比 ----- */
.ea-mode-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.ea-mode-card {
  padding: 14px !important;
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.ea-mode-good {
  background: linear-gradient(180deg, #f0fdf4 0%, #ffffff 100%);
  border: 1.5px solid #bbf7d0;
}
.ea-mode-bad {
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 100%);
  border: 1.5px solid #fecaca;
}
.ea-mode-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--text-1);
}
.ea-mode-badge {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 100px;
  font-weight: 700;
}
.ea-mode-badge.good {
  background: var(--success);
  color: #fff;
}
.ea-mode-badge.bad {
  background: var(--danger);
  color: #fff;
}
.ea-mode-cal {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.ea-mode-line {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-2);
}
.ea-mode-line span:last-child {
  font-weight: 600;
  color: var(--text-1);
}
.ea-mode-save {
  color: var(--success) !important;
  font-weight: 800 !important;
}
.ea-mode-lose {
  color: var(--danger) !important;
  font-weight: 800 !important;
}
.ea-mode-result {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ea-mode-result > div {
  text-align: center;
}
.ea-mode-result span {
  display: block;
  font-size: 10px;
  color: var(--text-3);
  margin-bottom: 2px;
}
.ea-mode-result strong {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.ea-mode-good-text { color: var(--success); }
.ea-mode-bad-text { color: var(--danger); }
.ea-mode-tip {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ----- 自用率健康评分环 ----- */
.ea-health-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px !important;
  border-left: 4px solid var(--c, var(--primary));
}
.ea-health-ring {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}
.ea-health-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(0deg);
}
.ea-health-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.ea-health-num {
  font-size: 28px;
  font-weight: 800;
  color: var(--c, var(--primary));
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.ea-health-level {
  font-size: 13px;
  font-weight: 700;
  color: var(--c, var(--primary));
  margin-top: 2px;
}
.ea-health-text { flex: 1; }
.ea-health-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-1);
}
.ea-health-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}

/* ----- 优化建议 ----- */
.ea-tip-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ea-tip-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 4px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.6;
}
.ea-tip-item + .ea-tip-item { border-top: 1px dashed var(--border); }

/* ----- 联动回本拆解 ----- */
.ea-payback-sum {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 14px !important;
}
.ea-pb-item {
  background: var(--bg);
  border-radius: 10px;
  padding: 10px 12px;
}
.ea-pb-bonus { background: linear-gradient(135deg, #fef3c7, #fde68a); }
.ea-pb-minus { background: linear-gradient(135deg, #fee2e2, #fecaca); }
.ea-pb-total {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
}
.ea-pb-label {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 3px;
}
.ea-pb-total .ea-pb-label { color: rgba(255,255,255,.85); }
.ea-pb-value {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.ea-pb-value small {
  font-size: 10px;
  font-weight: 400;
  margin-left: 3px;
  color: var(--text-3);
}
.ea-pb-total .ea-pb-value small { color: rgba(255,255,255,.8); }
.ea-pb-sub {
  font-size: 10px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ----- 调价方案卡片 ----- */
.ea-plan-card {
  border-left: 4px solid var(--plan-color, var(--primary));
}
.ea-plan-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.ea-plan-name {
  font-size: 14px;
  font-weight: 700;
}
.ea-plan-target {
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg);
  padding: 3px 8px;
  border-radius: 100px;
}
.ea-plan-desc {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.ea-plan-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 5px 0;
  color: var(--text-2);
}
.ea-plan-row + .ea-plan-row { border-top: 1px dotted var(--border); }
.ea-plan-row strong {
  color: var(--text-1);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.ea-plan-result {
  margin-top: 4px;
  padding-top: 8px;
  border-top: 1.5px solid var(--border) !important;
}

