/* AI生成 */
/* ============================================================
   温室助手 · 后台管理主题（浅色 / 现代）
   ============================================================ */
:root {
  --wh-primary: #16a34a;
  --wh-primary-2: #22c55e;
  --wh-accent: #0ea5e9;
  --wh-bg: #f4f7fb;
  --wh-panel: #ffffff;
  --wh-text: #1f2937;
  --wh-text-sub: #64748b;
  --wh-border: #e5eaf1;
  --wh-radius: 12px;
  --wh-shadow: 0 6px 24px rgba(15, 23, 42, .06);
  --wh-sidebar-bg: #0f2438;
  --wh-sidebar-active: #16a34a;
  --wh-sidebar-text: #c7d2da;
}

* { box-sizing: border-box; }
html, body, #app { height: 100%; margin: 0; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--wh-bg);
  color: var(--wh-text);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c7d2da; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 登录页（一颗大 · 品牌红 #E71C20） ---------- */
.login-wrap {
  /* 品牌色（取自 Logo 原始色值） */
  --tm-red: #e71c20;
  --tm-red-deep: #b31216;
  --tm-red-soft: #ff4d4a;
  --tm-ink: #080404;
  --tm-sub: #8a7575;
  --tm-line: #f0dede;

  /* Element Plus 跟随品牌色（只作用于登录页，后台其它页不受影响） */
  --el-color-primary: #e71c20;
  --el-color-primary-light-3: #ee5a5d;
  --el-color-primary-light-5: #f48e90;
  --el-color-primary-light-7: #f9bcbd;
  --el-color-primary-light-8: #fbd1d2;
  --el-color-primary-light-9: #fde8e8;
  --el-color-primary-dark-2: #b91619;

  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(880px 500px at 14% 6%, #ffe9e9 0%, transparent 62%),
    radial-gradient(760px 460px at 88% 96%, #ffe1e1 0%, transparent 64%),
    linear-gradient(160deg, #ffffff 0%, #fdf7f7 46%, #fbecec 100%);
}

/* 背景漂浮光斑 */
.login-bg { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; }
.login-bg .orb { position: absolute; border-radius: 50%; filter: blur(62px); }
.login-bg .orb-1 { width: 400px; height: 400px; left: -120px; top: -140px; background: #e71c20; opacity: .13; animation: tmFloat 10s ease-in-out infinite; }
.login-bg .orb-2 { width: 360px; height: 360px; right: -110px; bottom: -130px; background: #e71c20; opacity: .10; animation: tmFloat 13s ease-in-out infinite reverse; }
.login-bg .orb-3 { width: 230px; height: 230px; left: 58%; top: 6%; background: #ff4d4a; opacity: .12; animation: tmFloat 15s ease-in-out infinite; }
@keyframes tmFloat {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(0, -24px, 0) scale(1.05); }
}

.login-card {
  width: 436px;
  max-width: calc(100% - 32px);
  padding: 40px 38px 30px;
  background: #ffffff;
  border: 1px solid rgba(231, 28, 32, .09);
  border-radius: 20px;
  box-shadow: 0 28px 64px rgba(150, 20, 24, .14), 0 3px 10px rgba(150, 20, 24, .05);
  position: relative;
  z-index: 2;
  animation: tmRise .45s cubic-bezier(.22, .8, .3, 1) both;
}
.login-card::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 4px;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(90deg, #ff4d4a 0%, #e71c20 46%, #b31216 100%);
}
@keyframes tmRise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* 品牌 Logo：整块「一颗大 · 高素质番茄」 */
.login-hero { display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-logo-img {
  width: 300px;
  max-width: 100%;
  height: auto;
  display: block;
  margin-bottom: 16px;
  user-select: none;
  -webkit-user-drag: none;
}
.login-title {
  font-size: 22px; font-weight: 800; letter-spacing: 4px;
  color: var(--tm-ink);
}
.login-slogan { color: var(--tm-sub); font-size: 12.5px; margin-top: 6px; letter-spacing: .6px; }
.login-sub {
  color: var(--tm-sub); font-size: 12.5px; text-align: center;
  margin: 18px 0 20px; padding-top: 16px;
  border-top: 1px solid var(--tm-line);
}

/* 表单 */
.login-card .el-form-item { margin-bottom: 20px; }
.login-card .el-input { height: 46px; }
.login-card .el-input__wrapper {
  min-height: 46px;
  border-radius: 11px;
  box-shadow: 0 0 0 1px var(--tm-line) inset;
  background: #fffdfd;
}
.login-card .el-input__wrapper:hover { box-shadow: 0 0 0 1px #e4c4c4 inset; }
.login-card .el-input__wrapper.is-focus {
  box-shadow: 0 0 0 1px var(--tm-red) inset, 0 0 0 3px rgba(231, 28, 32, .12);
}
.login-card .el-input__prefix-inner .el-icon { color: var(--tm-red); font-size: 17px; }

.login-btn {
  width: 100%; height: 46px;
  font-size: 16px; font-weight: 700; letter-spacing: 4px;
  border: none; border-radius: 11px;
  background: linear-gradient(135deg, #ff4d4a 0%, #e71c20 55%, #c2141a 100%);
  box-shadow: 0 10px 22px rgba(231, 28, 32, .28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.login-btn:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 14px 28px rgba(231, 28, 32, .36); }
.login-btn:active { transform: translateY(0); }
.login-btn.is-loading { opacity: .88; }

.login-tip { color: var(--tm-sub); font-size: 12px; margin-top: 16px; text-align: center; }

@media (max-width: 480px) {
  .login-card { padding: 30px 22px 24px; border-radius: 16px; }
  .login-logo-img { width: 236px; margin-bottom: 12px; }
  .login-title { font-size: 19px; letter-spacing: 3px; }
}

/* ---------- 主布局 ---------- */
.layout { display: flex; height: 100%; }
.sidebar {
  width: 224px; flex: 0 0 224px;
  background: var(--wh-sidebar-bg);
  color: var(--wh-sidebar-text);
  display: flex; flex-direction: column;
  transition: width .22s ease, flex-basis .22s ease;
  overflow: hidden;
}
.sidebar.collapsed { width: 64px; flex-basis: 64px; }
.sidebar-logo {
  height: 60px; display: flex; align-items: center; gap: 10px;
  padding: 0 18px; color: #fff; font-weight: 700; font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,.07); white-space: nowrap;
}
.sidebar-logo .dot {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  background: linear-gradient(135deg, var(--wh-primary), var(--wh-accent));
  display: flex; align-items: center; justify-content: center; font-size: 17px;
}
.sidebar-menu { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 8px 0; }
.sidebar-menu .el-menu { border-right: none; background: transparent; }
.sidebar-menu .el-menu-item, .sidebar-menu .el-sub-menu__title {
  color: var(--wh-sidebar-text); height: 46px; line-height: 46px;
  margin: 3px 8px; border-radius: 9px;
}
.sidebar-menu .el-menu-item:hover, .sidebar-menu .el-sub-menu__title:hover {
  background: rgba(255,255,255,.07); color: #fff;
}
.sidebar-menu .el-menu-item.is-active {
  background: linear-gradient(90deg, var(--wh-sidebar-active), #12813c);
  color: #fff; font-weight: 600;
}
.sidebar-menu .el-sub-menu.is-active > .el-sub-menu__title { color: #fff; }
.sidebar-menu .el-menu--inline { background: rgba(0,0,0,.16) !important; border-radius: 9px; margin: 0 8px; }
.sidebar-footer { padding: 12px 16px; font-size: 11.5px; color: #6b8296; border-top: 1px solid rgba(255,255,255,.07); white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 60px; flex: 0 0 60px; background: var(--wh-panel);
  border-bottom: 1px solid var(--wh-border);
  display: flex; align-items: center; padding: 0 18px; gap: 14px;
  box-shadow: 0 1px 4px rgba(15,23,42,.03); z-index: 5;
}
.topbar .collapse-btn { font-size: 20px; cursor: pointer; color: var(--wh-text-sub); }
.topbar .crumb { color: var(--wh-text-sub); font-size: 13px; }
.topbar .spacer { flex: 1; }
.topbar-clock { font-family: "Consolas", monospace; color: var(--wh-text-sub); font-size: 13px; }
.topbar .icon-btn {
  width: 36px; height: 36px; border-radius: 9px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--wh-text-sub); font-size: 18px;
}
.topbar .icon-btn:hover { background: var(--wh-bg); color: var(--wh-primary); }

.tags-bar {
  height: 40px; flex: 0 0 40px; background: var(--wh-panel);
  border-bottom: 1px solid var(--wh-border);
  display: flex; align-items: center; gap: 8px; padding: 0 14px;
  overflow-x: auto; white-space: nowrap;
}
.tag-item {
  padding: 4px 12px; border-radius: 7px; font-size: 12.5px;
  border: 1px solid var(--wh-border); cursor: pointer; color: var(--wh-text-sub);
  display: inline-flex; align-items: center; gap: 6px;
}
.tag-item.active { background: var(--wh-primary); border-color: var(--wh-primary); color: #fff; }

.content { flex: 1; overflow-y: auto; padding: 18px; }
.page-card {
  background: var(--wh-panel); border-radius: var(--wh-radius);
  box-shadow: var(--wh-shadow); padding: 18px;
}
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head h2 { font-size: 18px; margin: 0; }
.page-head .sub { color: var(--wh-text-sub); font-size: 12.5px; }
.page-head .grow { flex: 1; }
.el-card { border-radius: var(--wh-radius) !important; border: 1px solid var(--wh-border) !important; }

/* ---------- 统计卡片 ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.stat-card {
  background: var(--wh-panel); border-radius: var(--wh-radius); padding: 18px 20px;
  box-shadow: var(--wh-shadow); position: relative; overflow: hidden;
  border: 1px solid var(--wh-border);
}
.stat-card .label { color: var(--wh-text-sub); font-size: 13px; }
.stat-card .value { font-size: 27px; font-weight: 700; margin-top: 8px; }
.stat-card .value small { font-size: 13px; font-weight: 400; color: var(--wh-text-sub); margin-left: 4px; }
.stat-card .icon {
  position: absolute; right: 14px; top: 14px; width: 42px; height: 42px;
  border-radius: 11px; display: flex; align-items: center; justify-content: center;
  font-size: 21px; color: #fff;
}
.stat-card .foot { font-size: 12px; color: var(--wh-text-sub); margin-top: 8px; }
.grad-a { background: linear-gradient(135deg,#16a34a,#22c55e); }
.grad-b { background: linear-gradient(135deg,#0ea5e9,#38bdf8); }
.grad-c { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.grad-d { background: linear-gradient(135deg,#ef4444,#f87171); }
.grad-e { background: linear-gradient(135deg,#8b5cf6,#a78bfa); }
.grad-f { background: linear-gradient(135deg,#14b8a6,#2dd4bf); }

/* ---------- 图表卡片 ---------- */
.chart-grid { display: grid; gap: 14px; }
.chart-card { background: var(--wh-panel); border-radius: var(--wh-radius); box-shadow: var(--wh-shadow); padding: 14px 16px; border: 1px solid var(--wh-border); }
.chart-card .chart-title { font-size: 14px; font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.chart-card .chart-title::before { content: ""; width: 4px; height: 15px; border-radius: 2px; background: linear-gradient(var(--wh-primary), var(--wh-accent)); }
.chart-holder { width: 100%; height: 300px; }

/* ---------- 表格工具栏 ---------- */
.table-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.table-toolbar .grow { flex: 1; }
.el-table th.el-table__cell { background: #f7fafc !important; color: #334155; font-weight: 600; }
.el-pagination { margin-top: 16px; justify-content: flex-end; }

/* ---------- 实时状态 ---------- */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.rt-card { background: var(--wh-panel); border-radius: var(--wh-radius); box-shadow: var(--wh-shadow); padding: 16px; border: 1px solid var(--wh-border); position: relative; }
.rt-card .name { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.rt-card .meta { color: var(--wh-text-sub); font-size: 12.5px; margin-top: 8px; line-height: 1.9; }
.rt-card .meta b { color: var(--wh-text); font-weight: 600; }
.rt-state { position: absolute; right: 14px; top: 14px; }
.dot-live { display:inline-block; width:8px; height:8px; border-radius:50%; margin-right:6px; }
.dot-live.on { background:#22c55e; box-shadow:0 0 0 4px rgba(34,197,94,.18); }
.dot-live.busy { background:#f59e0b; box-shadow:0 0 0 4px rgba(245,158,11,.18); }
.dot-live.idle { background:#94a3b8; }
.dot-live.off { background:#cbd5e1; }

/* ---------- 温室平面图（管理端） ---------- */
.gh-map { display: grid; gap: 4px; }
.gh-row-line { display: flex; align-items: center; gap: 6px; }
.gh-row-cell { flex: 1; height: 26px; border-radius: 5px; background: #eef3f8; border: 1px solid #e2eaf3; font-size: 11px; display:flex; align-items:center; justify-content:center; color:#64748b; }
.gh-row-cell.busy { background: #fff3d6; border-color:#fcd34d; color:#b45309; }
.gh-zone-panel { border:1px dashed var(--wh-border); border-radius:10px; padding:10px; }

/* ---------- 通用 ---------- */
.mono { font-family: "Consolas", "Menlo", monospace; }
.text-sub { color: var(--wh-text-sub); }
.mt8 { margin-top: 8px; } .mt14 { margin-top: 14px; } .mb14 { margin-bottom: 14px; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex-wrap { flex-wrap: wrap; }
.hint { color: var(--wh-text-sub); font-size: 12px; }
.badge-perm { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #eef7f1; color: #16a34a; border:1px solid #cdeedd; }
.empty-block { text-align: center; color: var(--wh-text-sub); padding: 40px 0; }