/* ============================================================
   出租房用电管控平台 - 首页样式
   政务风格，深蓝（藏青蓝）主色调，亮蓝色点缀，白色背景
   CSS REM 布局，根 100px，最小文字 0.22rem
   ============================================================ */

/* ---------- 全局 ---------- */
html { font-size: 100px; }
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: #f0f2f5;
  min-height: 100vh;
  color: #333;
  font-size: 0.22rem;
}
a { text-decoration: none; color: inherit; }

/* ---------- 头部（政务风格） ---------- */
.header {
  background: linear-gradient(135deg, #0d2137 0%, #1a3a5c 40%, #1e4a6e 100%);
  padding: 0.3rem 0.2rem 0.35rem;
  position: relative; overflow: hidden;
}
.header::after {
  content: ''; position: absolute; top: -50%; right: -20%;
  width: 2rem; height: 2rem;
  background: rgba(255,255,255,0.04); border-radius: 50%;
}
.header::before {
  content: ''; position: absolute; bottom: -40%; left: -10%;
  width: 1.6rem; height: 1.6rem;
  background: rgba(255,255,255,0.03); border-radius: 50%;
}
.header .header-icon {
  width: 0.44rem; height: 0.44rem;
  background: rgba(255,255,255,.12); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.1rem; font-size: 0.22rem;
}
.header-title {
  position: relative; z-index: 1;
  font-size: 0.28rem; font-weight: 700; color: #fff;
  letter-spacing: 0.02rem; text-align: center;
}
.header-sub {
  position: relative; z-index: 1;
  font-size: 0.24rem; color: rgba(255,255,255,0.6);
  text-align: center; margin-top: 0.06rem; letter-spacing: 0.04rem;
}
.header-line {
  width: 0.4rem; height: 0.02rem;
  background: linear-gradient(90deg, #2196F3, #64B5F6);
  margin: 0.08rem auto 0; border-radius: 0.01rem;
}

/* ---------- 用户信息卡 ---------- */
.user-card {
  margin: -0.15rem 0.15rem 0.1rem;
  padding: 0.18rem 0.2rem;
  background: #fff; border-radius: 0.12rem;
  box-shadow: 0 0.02rem 0.1rem rgba(26,58,92,0.08);
  display: flex; align-items: center; gap: 0.12rem;
  position: relative; z-index: 2;
}
.user-avatar {
  width: 0.52rem; height: 0.52rem; border-radius: 50%;
  background: linear-gradient(135deg, #1a3a5c, #2b6cb0);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.26rem; font-weight: 700; flex-shrink: 0;
}
.user-info { flex: 1; }
.user-name { font-size: 0.28rem; font-weight: 600; color: #1a3a5c; }
.user-account { font-size: 0.24rem; color: #78909c; margin-top: 0.03rem; }
.user-roles { font-size: 0.24rem; color: #78909c; margin-top: 0.03rem; }
.user-roles .badge {
  display: inline-block; padding: 0.04rem 0.1rem;
  border-radius: 0.1rem; font-size: 0.24rem; margin-right: 0.04rem;
}
.badge-fangdong { background: #e3f2fd; color: #1565C0; }
.badge-paichushuo { background: #e0f2f1; color: #00695c; }
.logout-btn {
  font-size: 0.24rem; color: #c62828; white-space: nowrap;
  padding: 0.04rem 0.1rem; border-radius: 0.04rem;
  transition: background .2s ease;
}
.logout-btn:active { background: #ffebee; }

/* ---------- 统计看板 ---------- */
.stats-row {
  display: flex; margin: 0 0.15rem 0.15rem; gap: 0.1rem;
}
.stat-card {
  flex: 1; background: #fff; border-radius: 0.1rem;
  padding: 0.15rem 0.1rem; text-align: center;
  box-shadow: 0 0.01rem 0.04rem rgba(0,0,0,0.04);
}
.stat-card .num {
  font-size: 0.3rem; font-weight: 700; color: #1a3a5c; line-height: 1.2;
}
.stat-card .num.warn { color: #e65100; }
.stat-card .num.success { color: #2e7d32; }
.stat-card .label {
  font-size: 0.24rem; color: #90a4ae; margin-top: 0.04rem;
}

/* ---------- 功能面板 ---------- */
.panel { margin: 0 0.15rem 0.15rem; }
.panel-title {
  font-size: 0.26rem; font-weight: 600; color: #1a3a5c;
  padding: 0.06rem 0 0.1rem;
  display: flex; align-items: center; gap: 0.06rem;
}
.panel-title::before {
  content: ''; width: 0.03rem; height: 0.18rem;
  background: linear-gradient(180deg, #2196F3, #1565C0);
  border-radius: 0.02rem; display: inline-block;
}
.menu-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.1rem;
}
.menu-card {
  display: flex; flex-direction: column; align-items: center;
  padding: 0.18rem 0.06rem;
  background: #fff; border-radius: 0.1rem;
  color: #333; box-shadow: 0 0.01rem 0.04rem rgba(0,0,0,0.04);
  transition: all .15s ease; position: relative;
}
.menu-card:active { transform: scale(0.97); box-shadow: 0 0.02rem 0.08rem rgba(26,58,92,0.1); }
.menu-icon {
  width: 0.46rem; height: 0.46rem; border-radius: 0.1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.22rem; margin-bottom: 0.08rem;
}
.menu-icon .fa { font-size: 0.32rem; line-height: 1; }
.menu-icon.blue { background: #e3f2fd; color: #1565C0; }
.menu-icon.green { background: #e8f5e9; color: #2e7d32; }
.menu-icon.orange { background: #fff3e0; color: #e65100; }
.menu-icon.red { background: #ffebee; color: #c62828; }
.menu-icon.purple { background: #f3e5f5; color: #6a1b9a; }
.menu-icon.teal { background: #e0f2f1; color: #00695c; }
.menu-label {
  font-size: 0.26rem; font-weight: 500; text-align: center; line-height: 1.3;
}
.menu-card .badge-num {
  position: absolute; top: 0.06rem; right: 0.06rem;
  background: #c62828; color: #fff;
  font-size: 0.24rem; min-width: 0.2rem; height: 0.2rem;
  line-height: 0.2rem; text-align: center;
  border-radius: 0.1rem; padding: 0 0.06rem;
}

/* ---------- 未登录状态 ---------- */
.login-panel {
  margin: 0 0.15rem; text-align: center; padding: 0.4rem 0.2rem;
}
.login-logo {
  width: 0.8rem; height: 0.8rem; border-radius: 50%;
  background: linear-gradient(135deg, #1a3a5c, #2b6cb0);
  margin: 0 auto 0.2rem;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 0.36rem;
}
.login-title {
  font-size: 0.28rem; font-weight: 600; color: #1a3a5c; margin-bottom: 0.08rem;
}
.login-msg {
  font-size: 0.24rem; color: #78909c; margin-bottom: 0.25rem; line-height: 1.6;
}
.login-btn {
  display: inline-block; padding: 0.12rem 0.4rem;
  background: linear-gradient(135deg, #1565C0, #2196F3);
  color: #fff; border-radius: 0.25rem;
  font-size: 0.26rem; font-weight: 500; letter-spacing: 0.02rem;
  box-shadow: 0 0.04rem 0.12rem rgba(25,118,210,0.3);
}
.platform-desc {
  background: #fff; margin: 0.2rem 0.15rem;
  border-radius: 0.12rem; padding: 0.2rem;
  text-align: center; box-shadow: 0 0.01rem 0.04rem rgba(0,0,0,0.04);
}
.platform-desc .desc-title {
  font-size: 0.26rem; color: #1a3a5c; font-weight: 600; margin-bottom: 0.1rem;
}
.platform-desc .feature {
  display: inline-block; padding: 0.06rem 0.14rem;
  background: #e3f2fd; color: #1565C0;
  border-radius: 0.15rem; font-size: 0.24rem; margin: 0.03rem;
}

/* ---------- 底部 ---------- */
.footer-bar {
  text-align: center; padding: 0.2rem 0.15rem 0.3rem;
  font-size: 0.24rem; color: #90a4ae; line-height: 1.6;
}
