/* 园区管理后台 - 线条风 v2（Element Plus 之上，对齐小程序端薄荷绿主色） */

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body, #app { height: 100%; }

/* ---------- 主题变量：主色对齐小程序 #00B96B，细边框小圆角线条感 ---------- */
:root {
  --brand: #00B96B;
  --brand-deep: #00975A;
  --brand-bg: #F0FAF5;
  --line: #E8EBEE;
  --line-strong: #D9DEE3;
  --ink: #1F2A24;
  --ink-2: #5F6672;
  --ink-3: #98A0AA;
  --el-color-primary: #00B96B;
  --el-color-primary-light-3: #4ED19D;
  --el-color-primary-light-5: #80DCBB;
  --el-color-primary-light-7: #B3EEDA;
  --el-color-primary-light-8: #CCF5E6;
  --el-color-primary-light-9: #F0FAF5;
  --el-color-primary-dark-2: #00975A;
  --el-border-radius-base: 4px;
}

body {
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: #F7F8F9;
  color: var(--ink);
}

/* ---------- 布局：浅色侧栏 + 细分割线 ---------- */

.layout { display: flex; height: 100%; }

.sidebar {
  width: 216px;
  background: #FFFFFF;
  border-right: 1px solid var(--line);
  color: var(--ink-2);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-brand {
  padding: 22px 18px 18px;
  border-bottom: 1px solid var(--line);
}

.sidebar-brand .brand-name {
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  position: relative;
  padding-left: 10px;
}

.sidebar-brand .brand-name::before {
  content: "";
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
}

.sidebar-brand .brand-sub {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 5px;
  padding-left: 10px;
  letter-spacing: 1px;
}

.sidebar-menu { flex: 1; overflow-y: auto; padding: 6px 0 24px; }

.menu-group-title {
  font-size: 11px;
  color: var(--ink-3);
  padding: 16px 20px 6px;
  letter-spacing: 2px;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  margin: 1px 10px;
  border-radius: 4px;
  color: var(--ink-2);
  cursor: pointer;
  font-size: 14px;
  border: 1px solid transparent;
  border-left: 2px solid transparent;
  transition: all 0.15s;
  text-decoration: none;
}

.menu-item .el-icon { font-size: 16px; color: var(--ink-3); transition: color 0.15s; }

.menu-item:hover { color: var(--ink); background: #F4F6F5; }
.menu-item:hover .el-icon { color: var(--brand); }

.menu-item.active {
  color: var(--brand-deep);
  background: var(--brand-bg);
  border-left-color: var(--brand);
}
.menu-item.active .el-icon { color: var(--brand-deep); }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  flex-shrink: 0;
}

.topbar-title { font-size: 15px; font-weight: 600; position: relative; padding-left: 12px; }
.topbar-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
}

.topbar-user { display: flex; align-items: center; gap: 12px; }

.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ---------- 登录页：线条卡片 ---------- */

.login-wrap {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 18% 22%, rgba(0, 185, 107, 0.10) 0%, transparent 42%),
    radial-gradient(circle at 82% 78%, rgba(0, 185, 107, 0.08) 0%, transparent 42%),
    #F4F6F5;
}

.login-card {
  width: 400px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 40px 36px 32px;
  box-shadow: 0 2px 14px rgba(31, 42, 36, 0.05);
}

.login-card h2 { font-size: 20px; margin-bottom: 4px; position: relative; padding-left: 10px; }
.login-card h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  bottom: 5px;
  width: 3px;
  border-radius: 2px;
  background: var(--brand);
}

.login-card .sub { color: var(--ink-3); font-size: 13px; margin-bottom: 28px; padding-left: 10px; }

.login-card .demo-tip {
  margin-top: 18px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.8;
  background: #F7F8F9;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
}

/* ---------- 通用页面元素：细边框卡片，弱化阴影 ---------- */

.page-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
  box-shadow: none;
  transition: border-color 0.2s;
}

.page-card:hover { border-color: var(--line-strong); }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 14px; align-items: center; }

.toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.table-title {
  font-size: 14px;
  font-weight: 600;
  position: relative;
  padding-left: 10px;
}
.table-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 3px;
  bottom: 3px;
  width: 2px;
  background: var(--brand);
}

.pager { display: flex; justify-content: flex-end; margin-top: 14px; }

/* 看板统计卡：线条描边图标 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }

.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: none;
  transition: border-color 0.2s;
}

.stat-card:hover { border-color: var(--brand); }

.stat-card .stat-num { font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -0.5px; }

.stat-card .stat-label { font-size: 13px; color: var(--ink-3); margin-top: 4px; }

.stat-icon {
  width: 46px; height: 46px;
  border-radius: 8px;
  border: 1px solid currentColor;
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}

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

.todo-item {
  display: flex; justify-content: space-between;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}

.todo-item:last-child { border-bottom: none; }

/* 详情抽屉 */
.detail-section { margin-bottom: 22px; }

.detail-section h4 {
  font-size: 14px; color: var(--brand-deep); margin-bottom: 10px;
  border-left: 2px solid var(--brand); padding-left: 8px;
}

.detail-kv { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-size: 13px; }

.detail-kv .k { color: var(--ink-3); }

.timeline-item-content { font-size: 13px; }

/* 文章编辑器 */
.article-editor textarea { font-family: Consolas, Monaco, monospace; }

.article-preview {
  border: 1px solid var(--line); border-radius: 6px; padding: 16px;
  max-height: 320px; overflow-y: auto; line-height: 1.8; font-size: 14px;
}

/* 状态标签微调 */
.status-tag { margin-right: 0; }

/* ---------- 数据驾驶舱（全屏大屏，独立于布局） ---------- */

.ck {
  height: 100%;
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 15% 0%, rgba(46, 230, 168, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 85% 100%, rgba(55, 198, 255, 0.07) 0%, transparent 45%),
    linear-gradient(180deg, #0A1420 0%, #0C1A2C 100%);
  color: #E8F4EE;
  font-family: "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  padding: 28px 32px 18px;
}

.ck-head {
  display: flex;
  align-items: baseline;
  gap: 18px;
  border-bottom: 1px solid rgba(46, 230, 168, 0.25);
  padding-bottom: 16px;
  margin-bottom: 20px;
}

.ck-title { font-size: 26px; font-weight: 700; letter-spacing: 2px; color: #FFFFFF; }
.ck-title em { font-style: normal; color: #2EE6A8; }

.ck-sub { font-size: 12px; letter-spacing: 3px; color: #6E8899; text-transform: uppercase; }

.ck-clock { margin-left: auto; text-align: right; }
.ck-clock .t { font-size: 22px; font-weight: 600; color: #2EE6A8; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.ck-clock .d { font-size: 12px; color: #6E8899; margin-top: 2px; }

/* v1.0.45.5 KPI 行与面板行合并为统一网格，三分天下（杨总比划版）：
   左组（在管房源/已出租/认证企业 + 出租率）· 中列宣传视频通高 · 右组（线索/预约/累计服务 + 企服项目）
   每组上排 3 张 KPI 等宽；中列 3fr ≈ 两侧组同宽（总计 9fr） */
.ck-mega {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr) 3fr repeat(3, 1fr);
  grid-template-rows: auto minmax(230px, 1fr) minmax(210px, auto);
  gap: 14px;
  min-height: 0;
}

/* 面板落位（列线 / 行线） */
.ck-p-occ   { grid-column: 1 / 4; grid-row: 2; }
.ck-video   { grid-column: 4;     grid-row: 1 / 3; }
.ck-p-svc   { grid-column: 5 / 8; grid-row: 2; }
.ck-p-index { grid-column: 1 / 6; grid-row: 3; }
.ck-p-todo  { grid-column: 6 / 8; grid-row: 3; }

.ck-kpi {
  border: 1px solid rgba(46, 230, 168, 0.18);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}

.ck-kpi::after {
  content: "";
  position: absolute;
  left: 0; top: 0;
  width: 3px; height: 100%;
  background: linear-gradient(180deg, #2EE6A8, rgba(46, 230, 168, 0.15));
}

.ck-kpi .k { font-size: 13px; color: #7F97A8; letter-spacing: 1px; }
.ck-kpi .v { font-size: 34px; font-weight: 700; margin-top: 6px; line-height: 1.1; color: #FFFFFF; font-variant-numeric: tabular-nums; }
.ck-kpi .v small { font-size: 13px; font-weight: 400; color: #6E8899; margin-left: 4px; }
.ck-kpi .s { font-size: 12px; color: #6E8899; margin-top: 6px; }


/* v1.0.45 楼宇切换 tab */
.ck-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ck-tabs { display: flex; gap: 10px; }
.ck-tab {
  padding: 7px 22px;
  border-radius: 17px;
  border: 1px solid rgba(46, 230, 168, 0.25);
  color: #7F97A8;
  font-size: 14px;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.25s ease;
  user-select: none;
}
.ck-tab:hover { color: #BFE8D8; border-color: rgba(46, 230, 168, 0.55); }
.ck-tab.active {
  color: #06281C;
  background: linear-gradient(135deg, #2EE6A8, #37C6FF);
  border-color: transparent;
  font-weight: 600;
}
.ck-scope { font-size: 12px; color: #55707F; letter-spacing: 1px; }

/* v1.0.45 楼宇企业索引（v1.0.45.1 起内容超高自动滚动，悬停暂停） */
.ck-index { flex: 1; overflow: hidden; min-height: 0; padding-right: 4px; }
.ck-index-track { display: flex; flex-direction: column; }
.ck-index-track.scroll { animation: ckMarquee linear infinite; will-change: transform; }
.ck-index:hover .ck-index-track.scroll { animation-play-state: paused; }
@keyframes ckMarquee {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
.ck-floor { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 18px; }
.ck-floor .floor-label {
  flex-shrink: 0;
  width: 56px;
  font-size: 30px;
  font-weight: 700;
  color: #2EE6A8;
  font-style: italic;
  letter-spacing: 1px;
  line-height: 1.1;
  text-shadow: 0 0 14px rgba(46, 230, 168, 0.35);
}
.ck-floor .floor-items {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
}
.ck-floor .ent {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 17px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  padding-bottom: 6px;
  min-width: 0;
}
.ck-floor .ent .no {
  color: #37C6FF;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
  min-width: 46px;
}
.ck-floor .ent .nm {
  color: #D7EAE0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ck-index-empty {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #55707F;
  font-size: 16px;
  letter-spacing: 1px;
}

/* v1.0.45.2 宣传视频面板（驾驶舱右下角） */
.ck-panel-title .ck-video-mgr {
  font-size: 12px;
  font-weight: 400;
  color: #37C6FF;
  cursor: pointer;
  letter-spacing: 1px;
}
.ck-panel-title .ck-video-mgr:hover { color: #7FDCFF; }
.ck-video-box {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #04120C;
  border: 1px solid rgba(46, 230, 168, 0.12);
  border-radius: 8px;
  overflow: hidden;
}
/* v1.0.45.4 视频 fill 拉伸铺满面板，不留黑边 */
.ck-video-box video { width: 100%; height: 100%; object-fit: fill; display: block; }
.ck-video-empty { color: #55707F; font-size: 13px; text-align: center; line-height: 2; letter-spacing: 1px; }
.ck-video-empty small { font-size: 11px; color: #3F5666; }
/* 视频管理弹窗（Element 弹窗为浅色底） */
.ck-vmgr-tip { font-size: 12px; color: #64748b; margin-bottom: 10px; line-height: 1.6; }
.ck-vmgr-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed #e2e8f0;
}
.ck-vmgr-empty { font-size: 12px; color: #94a3b8; padding: 8px 0; }

/* v1.0.45.3 企业服务项目展示面板（右中） */
.svc-item {
  padding: 9px 0 8px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.07);
  min-width: 0;
}
.svc-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.svc-line .svc-tag {
  flex-shrink: 0;
  font-size: 12px;
  color: #2EE6A8;
  border: 1px solid rgba(46, 230, 168, 0.45);
  border-radius: 10px;
  padding: 0 8px;
  line-height: 19px;
  letter-spacing: 1px;
}
.svc-line .svc-name {
  font-size: 17px;
  font-weight: 600;
  color: #BFE8D8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.svc-line .svc-price {
  flex-shrink: 0;
  margin-left: auto;
  font-size: 15px;
  color: #37C6FF;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.svc-intro {
  font-size: 14px;
  color: #6E8899;
  margin-top: 4px;
  padding-left: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ck-panel {
  border: 1px solid rgba(46, 230, 168, 0.14);
  background: rgba(255, 255, 255, 0.025);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.ck-panel-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: #BFE8D8;
  padding-left: 10px;
  border-left: 2px solid #2EE6A8;
  margin-bottom: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ck-panel-title .hint { font-size: 11px; color: #55707F; font-weight: 400; letter-spacing: 0; }

/* 出租率环形图 */
.ck-ring { display: flex; align-items: center; gap: 22px; flex: 1; }
.ck-ring svg { flex-shrink: 0; }
.ck-ring .num { font-size: 30px; font-weight: 700; fill: #FFFFFF; font-variant-numeric: tabular-nums; }
.ck-ring .pct { font-size: 12px; fill: #6E8899; }
.ck-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.ck-legend .row { display: flex; justify-content: space-between; font-size: 13px; color: #9FB6C6; }
.ck-legend .row b { color: #FFFFFF; font-size: 15px; font-variant-numeric: tabular-nums; }
.ck-legend .sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 8px; vertical-align: 1px; }

/* 横向条形图 */
.ck-bars { display: flex; flex-direction: column; gap: 14px; flex: 1; justify-content: center; }
.ck-bar .lab { display: flex; justify-content: space-between; font-size: 13px; color: #9FB6C6; margin-bottom: 6px; }
.ck-bar .lab b { color: #FFFFFF; font-variant-numeric: tabular-nums; }
.ck-bar .track { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.06); overflow: hidden; }
.ck-bar .fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; }

/* 待办 / 列表 */
.ck-todo { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.ck-todo .row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 17px; color: #9FB6C6;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 10px;
}
.ck-todo .row:last-child { border-bottom: none; }
.ck-todo .n { font-size: 21px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ck-todo .n.ok { color: #2EE6A8; }
.ck-todo .n.warn { color: #FFB54D; }

.ck-list { flex: 1; overflow: hidden; display: flex; flex-direction: column; gap: 8px; }
.ck-list .row {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; color: #9FB6C6;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
}
.ck-list .row .name { color: #E8F4EE; }
.ck-list .row .time { margin-left: auto; font-size: 12px; color: #55707F; white-space: nowrap; }
.ck-tag {
  font-size: 11px; padding: 1px 8px; border-radius: 3px;
  border: 1px solid currentColor; white-space: nowrap;
}

.ck-foot {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #55707F;
}

.ck-foot .blink { color: #2EE6A8; }
.ck-foot .blink::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: #2EE6A8;
  margin-right: 7px;
  animation: ckBlink 1.6s ease infinite;
}

@keyframes ckBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .ck-mega { grid-template-columns: repeat(2, 1fr); grid-template-rows: auto; }
  .ck-kpi { grid-column: auto !important; grid-row: auto !important; }
  .ck-p-occ, .ck-video, .ck-p-svc, .ck-p-index, .ck-p-todo { grid-column: 1 / -1; grid-row: auto; }
  .ck-floor .floor-items { grid-template-columns: 1fr; }
}
