/* ESP-DHT11 站点自定义样式（移动端优先，PC 仪表盘风格） */

:root {
  --iot-bg: #f4f6f9;
}

body {
  background: var(--iot-bg);
  font-size: 15px;
}

main.narrow {
  max-width: 720px;
  margin: 0 auto;
}

/* ---------- 统计卡片 ---------- */
.stat-card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.stat-card .card-body {
  padding: 0.85rem 1rem;
}

.stat-num {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.2;
}

.stat-num-sm {
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}

.stat-label {
  font-size: 0.8rem;
  color: #6c757d;
  white-space: nowrap;
}

@media (min-width: 768px) {
  .stat-num { font-size: 2rem; }
}

/* ---------- 分组标题 ---------- */
.group-title {
  color: #495057;
  font-weight: 600;
  margin: 0 0 0.6rem 0.15rem;
}

/* ---------- 设备卡片 ---------- */
.device-card {
  border: none;
  border-left: 4px solid #198754;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.device-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
}

.device-card.status-alarm {
  border-left-color: #dc3545;
}

.device-card.status-offline {
  border-left-color: #adb5bd;
  opacity: 0.75;
}

.device-card .reading-num {
  font-size: 1.45rem;
  font-weight: 700;
  color: #212529;
}

.device-card.status-offline .reading-num {
  color: #6c757d;
}

.device-card .reading-unit {
  font-size: 0.85rem;
  color: #6c757d;
}

.dot {
  font-size: 0.5em;
  vertical-align: 2px;
}

/* ---------- 登录页 ---------- */
.login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 1rem;
}

.login-card {
  width: 100%;
  max-width: 380px;
  border: none;
  border-radius: 1rem;
}

.login-logo {
  width: 64px;
  height: 64px;
  line-height: 64px;
  margin: 0 auto 0.75rem;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd, #0aa2c0);
  color: #fff;
  font-size: 2rem;
  text-align: center;
}

/* ---------- 表格 ---------- */
.table {
  font-size: 0.9rem;
}

@media (max-width: 575.98px) {
  .table { font-size: 0.82rem; }
  main.container-fluid { padding-left: 0.6rem; padding-right: 0.6rem; }
}

/* ---------- 其它 ---------- */
.card {
  border: none;
  border-radius: 0.75rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.form-label {
  font-weight: 500;
}

.token-text {
  cursor: pointer;
  user-select: all;
}
