/* 小红书福袋 · 数据监控  样式（参考 iOS 卡片风格） */
:root {
  --bg: #f5f7fa;
  --card: rgba(255, 255, 255, .92);
  --primary: #007AFF;
  --red: #FF2442;
  --green: #34C759;
  --gray: #8E8E93;
  --text: #1c1c1e;
  --line: rgba(60, 60, 67, .12);
  --radius: 16px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .06);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', Segoe UI, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.muted { color: var(--gray); font-size: 13px; }
.red { color: var(--red); }
.green { color: var(--green); }
.strong { font-weight: 600; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.brand .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 3px rgba(255, 36, 66, .15); }
.userbox { display: flex; align-items: center; gap: 12px; }
.userbox .email { color: var(--gray); font-size: 13px; }

/* ---------- 布局 ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 20px; }
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, .6);
}

/* ---------- 统计卡片 ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.cards .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
}
.cards .ico {
  width: 40px; height: 40px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex: 0 0 auto;
}
.ico.blue   { background: rgba(0, 122, 255, .12); }
.ico.green  { background: rgba(52, 199, 89, .14); }
.ico.orange { background: rgba(255, 149, 0, .14); }
.ico.purple { background: rgba(88, 86, 214, .14); }
.ico.red    { background: rgba(255, 36, 66, .12); }
.ico.gray   { background: rgba(142, 142, 147, .14); }
.cards .label { color: var(--gray); font-size: 13px; }
.cards .value { font-size: 22px; font-weight: 700; margin-top: 2px; line-height: 1.1; }

/* ---------- 搜索栏 ---------- */
.searchbar { display: flex; gap: 10px; margin-bottom: 14px; }
.searchbar input { flex: 1; min-width: 0; }
.searchbar select {
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: 14px;
  color: var(--text);
  min-width: 120px;
  outline: none;
}

/* ---------- 表格 ---------- */
.tablecard { padding: 8px 8px 12px; }
.tablehead { display: flex; align-items: baseline; justify-content: space-between; padding: 12px 12px 8px; }
.tablehead h2 { margin: 0; font-size: 17px; }
.tablewrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 12px 12px; text-align: left; font-size: 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--gray); font-weight: 500; font-size: 13px; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: rgba(0, 122, 255, .04); }
.devname { font-weight: 600; }
.devmodel { color: var(--gray); font-size: 12px; margin-top: 2px; }
.empty { text-align: center; color: var(--gray); padding: 36px 0; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.pill.on { color: #0a7d33; background: rgba(52, 199, 89, .14); }
.pill.off { color: #8a8a8e; background: rgba(142, 142, 147, .14); }

/* ---------- 表单/登录注册 ---------- */
body.auth { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.auth-card { width: 100%; max-width: 380px; padding: 26px 24px; }
.auth-card h1 { margin: 0 0 4px; font-size: 22px; }
.auth-card label { display: block; margin: 16px 0 6px; font-size: 13px; color: var(--gray); }
input {
  width: 100%; padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--line); border-radius: 12px;
  background: #fff; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 122, 255, .12); }
.row { display: flex; gap: 8px; }
.row input { flex: 1; }

/* 密码框 + 小眼睛 */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 46px; }
.pwd-wrap .eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; cursor: pointer;
  font-size: 17px; color: var(--gray); border-radius: 10px;
  user-select: none; -webkit-user-select: none;
}
.pwd-wrap .eye:hover { background: rgba(0, 0, 0, .05); }
.pwd-wrap .eye.on { color: var(--primary); }

.btn-primary {
  width: 100%; margin-top: 20px; padding: 13px;
  font-size: 16px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #FF2442, #ff5a72);
  border: none; border-radius: 12px; cursor: pointer;
  box-shadow: 0 8px 18px rgba(255, 36, 66, .25);
}
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost {
  padding: 0 14px; font-size: 13px; color: var(--primary);
  background: rgba(0, 122, 255, .08); border: none; border-radius: 12px;
  cursor: pointer; white-space: nowrap;
}
.btn-ghost:disabled { color: var(--gray); background: rgba(142, 142, 147, .12); }
.auth-foot { margin-top: 18px; text-align: center; font-size: 13px; color: var(--gray); }
.auth-foot a { color: var(--primary); text-decoration: none; }
.msg { margin-top: 12px; font-size: 13px; min-height: 18px; }
.msg.error { color: var(--red); }
.msg.ok { color: var(--green); }

@media (max-width: 760px) {
  .wrap { padding: 12px; }
  .topbar { padding: 12px 14px; }
  .userbox .email { display: none; }
}

@media (max-width: 560px) {
  .cards { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .cards .item { padding: 12px; gap: 10px; }
  .cards .ico { width: 34px; height: 34px; font-size: 16px; border-radius: 10px; }
  .cards .value { font-size: 19px; }
  .searchbar { flex-direction: column; }
  .searchbar select { padding: 11px 12px; }
  th, td { padding: 10px; font-size: 13px; }
}
