/* 跳绳打卡系统 · UI 设计规范 V2.2 */
:root {
  --brand: #1d4ed8;
  --brand-dark: #1e40af;
  --brand-soft: #dbeafe;
  --brand-glow: rgba(29, 78, 216, 0.18);
  --action: #f97316;
  --action-dark: #ea580c;
  --action-soft: #ffedd5;
  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --bg: #f1f5f9;
  --bg-warm: linear-gradient(165deg, #eff6ff 0%, #f8fafc 45%, #f1f5f9 100%);
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --line: #e2e8f0;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
  --font: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --phone-w: 390px;
  --phone-h: 844px;
}

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

body {
  font-family: var(--font);
  background: var(--bg-warm);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* 手机外框 */
.demo-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: center;
  align-items: flex-start;
  padding: 40px 20px 80px;
}

.phone {
  width: var(--phone-w);
  max-width: 100%;
  height: var(--phone-h);
  background: var(--bg);
  border-radius: 48px;
  border: 11px solid #0f172a;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 126px;
  height: 28px;
  background: #0f172a;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 60;
}

.status-bar {
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10;
}

.screen-area {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 4px 16px 88px;
  display: none;
  scrollbar-width: none;
}
.screen::-webkit-scrollbar { width: 0; }
.screen.active { display: block; }

/* 企业微信顶栏 */
.wx-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px 12px;
  font-size: 12px;
  color: var(--muted);
}
.wx-header .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

.page-title {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.card-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  font-size: 15px;
  font-weight: 700;
}
.card-hd .sub { font-size: 12px; color: var(--muted); font-weight: 500; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 20px;
}
.badge-blue { background: var(--brand-soft); color: var(--brand); }
.badge-green { background: var(--success-soft); color: var(--success); }
.badge-orange { background: var(--action-soft); color: var(--action-dark); }
.badge-gray { background: #f1f5f9; color: var(--muted); }
.badge-red { background: var(--danger-soft); color: var(--danger); }

.btn {
  display: block;
  width: 100%;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  padding: 14px 20px;
  border-radius: 14px;
  transition: transform 0.12s, box-shadow 0.12s;
}
.btn:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff;
  box-shadow: 0 8px 24px var(--brand-glow);
}
.btn-action {
  background: linear-gradient(135deg, var(--action), var(--action-dark));
  color: #fff;
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.35);
}
.btn-ghost {
  background: #fff;
  color: var(--brand);
  border: 1.5px solid var(--line);
  box-shadow: none;
  margin-top: 8px;
}
.btn-sm {
  display: inline-block;
  width: auto;
  padding: 8px 16px;
  font-size: 13px;
  border-radius: 10px;
}

.progress {
  height: 8px;
  background: var(--line);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 10px;
}
.progress > i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), #3b82f6);
  border-radius: 99px;
}
.progress.orange > i { background: linear-gradient(90deg, var(--action), #fb923c); }

.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.list-row:last-child { border-bottom: none; }

.tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 72px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: flex;
  z-index: 50;
  padding-bottom: 8px;
}
.tabbar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  border: none;
  background: none;
  font-family: var(--font);
}
.tabbar .tab.active { color: var(--brand); font-weight: 700; }
.tabbar .tab .ic { font-size: 20px; line-height: 1; }
.tabbar .tab.center .ic {
  width: 52px;
  height: 52px;
  margin-top: -20px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--action), var(--action-dark));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(249, 115, 22, 0.45);
  border: 3px solid #fff;
}

.pill-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.pill-tabs .pill {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--muted);
  cursor: pointer;
}
.pill-tabs .pill.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.label-tag {
  text-align: center;
  width: var(--phone-w);
  max-width: 100%;
}
.label-tag h2 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.label-tag p { font-size: 13px; color: var(--muted); }

/* PC 后台通用 */
.pc-layout {
  display: flex;
  min-height: 100vh;
  background: #0f172a;
}
.pc-sidebar {
  width: 220px;
  background: #0f172a;
  color: #94a3b8;
  padding: 24px 16px;
  flex-shrink: 0;
}
.pc-sidebar .logo {
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  margin-bottom: 28px;
  padding: 0 8px;
}
.pc-sidebar .logo span { color: #60a5fa; }
.pc-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: #94a3b8;
  text-decoration: none;
  font-size: 14px;
  margin-bottom: 4px;
}
.pc-nav a:hover, .pc-nav a.active {
  background: rgba(59, 130, 246, 0.15);
  color: #fff;
}
.pc-main {
  flex: 1;
  background: var(--bg);
  border-radius: 20px 0 0 0;
  padding: 28px 32px;
  min-width: 0;
}
.pc-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.stat-card .val {
  font-size: 28px;
  font-weight: 800;
  color: var(--brand);
  line-height: 1.1;
}
.stat-card .lbl { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stat-card .delta { font-size: 12px; color: var(--success); margin-top: 4px; }

.table-wrap {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid var(--line);
}
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table-wrap th {
  background: #f8fafc;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.table-wrap td { padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table-wrap tr:last-child td { border-bottom: none; }

@media (max-width: 900px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pc-sidebar { width: 64px; padding: 16px 8px; }
  .pc-sidebar .logo, .pc-nav a span { display: none; }
}
