:root {
  --primary: #00c896;
  --secondary: #0a7cff;
  --bg-soft: #f5faf8;
  --bg-blue: #f2f7ff;
  --text-main: #0f172a;
  --text-soft: #64748b;
  --warning: #f0a030;
  --danger: #f85149;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "PingFang SC", "SF Pro Display", "Microsoft YaHei", sans-serif;
  color: var(--text-main);
}

a {
  color: inherit;
  text-decoration: none;
}

.prototype-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(0, 200, 150, 0.24), transparent 26%),
    radial-gradient(circle at top right, rgba(10, 124, 255, 0.18), transparent 22%),
    linear-gradient(180deg, #edf9f5 0%, #f6f9fc 48%, #eef5ff 100%);
}

.phone-frame {
  width: 393px;
  height: 852px;
  position: relative;
  overflow: hidden;
  border-radius: 54px;
  background: linear-gradient(180deg, #f8fbfd 0%, #f2f7ff 100%);
  box-shadow:
    0 35px 80px rgba(15, 23, 42, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border: 12px solid #0f172a;
}

.phone-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 42px;
  border: 1px solid rgba(15, 23, 42, 0.06);
  pointer-events: none;
}

[data-status-bar] {
  position: absolute;
  inset: 0 0 auto;
  height: 54px;
  z-index: 40;
  pointer-events: none;
}

.dynamic-island {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: 124px;
  height: 34px;
  border-radius: 999px;
  background: #040506;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.status-bar {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 16px 26px 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #0f172a;
}

.status-icons {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
}

.app-header {
  position: absolute;
  top: 54px;
  left: 0;
  right: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  min-height: 56px;
}

.app-content {
  position: absolute;
  top: 110px;
  left: 0;
  right: 0;
  bottom: 96px;
  overflow-y: auto;
  padding: 0 18px 26px;
}

.app-content::-webkit-scrollbar {
  display: none;
}

.icon-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.soft-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.82);
  border-radius: 30px;
  padding: 16px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(20px);
}

.soft-card.tight {
  padding: 14px;
}

.hero-card {
  position: relative;
  min-height: 188px;
  overflow: hidden;
  border-radius: 32px;
  padding: 18px;
  background-position: center;
  background-size: cover;
  box-shadow: 0 24px 44px rgba(15, 23, 42, 0.18);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.1), rgba(15, 23, 42, 0.76));
}

.hero-card > * {
  position: relative;
  z-index: 1;
}

.metric-card {
  padding: 14px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.metric-card.dark {
  background: linear-gradient(180deg, #0f172a, #1e293b);
  color: #fff;
}

.section-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.section-caption {
  font-size: 12px;
  color: var(--text-soft);
}

.metric-label {
  font-size: 12px;
  color: var(--text-soft);
}

.metric-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.metric-sub {
  font-size: 12px;
  color: var(--text-soft);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.pill-success {
  color: #007a5c;
  background: rgba(0, 200, 150, 0.12);
}

.pill-blue {
  color: #0a7cff;
  background: rgba(10, 124, 255, 0.12);
}

.pill-warning {
  color: #a86000;
  background: rgba(240, 160, 48, 0.14);
}

.pill-danger {
  color: #b42318;
  background: rgba(248, 81, 73, 0.14);
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

.chip.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-color: transparent;
  box-shadow: 0 12px 20px rgba(0, 200, 150, 0.22);
}

.info-row + .info-row,
.list-item + .list-item,
.menu-row + .menu-row,
.setting-row + .setting-row {
  border-top: 1px solid rgba(148, 163, 184, 0.14);
  margin-top: 12px;
  padding-top: 12px;
}

.progress-track {
  width: 100%;
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
}

.chart-box {
  position: relative;
  height: 170px;
  margin-top: 12px;
}

.chart-box.tall {
  height: 212px;
}

.chart-box.small {
  height: 120px;
}

.tab-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  height: 72px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(24px);
  border-radius: 28px;
  box-shadow: 0 20px 30px rgba(15, 23, 42, 0.12);
  z-index: 35;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #64748b;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.tab-item i {
  font-size: 16px;
}

.tab-item.active {
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 12px 20px rgba(0, 200, 150, 0.22);
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.action-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
}

.action-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  color: white;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.timeline-item {
  position: relative;
  padding-left: 18px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--primary);
  box-shadow: 0 0 0 6px rgba(0, 200, 150, 0.12);
}

.timeline-item.warning::before {
  background: var(--warning);
  box-shadow: 0 0 0 6px rgba(240, 160, 48, 0.14);
}

.timeline-item.danger::before {
  background: var(--danger);
  box-shadow: 0 0 0 6px rgba(248, 81, 73, 0.14);
}

.battery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.battery-cell {
  padding: 10px 8px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,250,252,0.92));
  text-align: center;
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.battery-cell.good {
  background: linear-gradient(180deg, rgba(0, 200, 150, 0.14), rgba(255,255,255,0.96));
}

.battery-cell.warn {
  background: linear-gradient(180deg, rgba(240, 160, 48, 0.16), rgba(255,255,255,0.96));
}

.battery-cell.danger {
  background: linear-gradient(180deg, rgba(248, 81, 73, 0.16), rgba(255,255,255,0.96));
}

.toggle {
  width: 48px;
  height: 28px;
  position: relative;
  border-radius: 999px;
  background: #cbd5e1;
  transition: all .2s ease;
  flex: 0 0 auto;
}

.toggle::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
  transition: all .2s ease;
}

.toggle.active {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.toggle.active::after {
  left: 23px;
}

.menu-row,
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.avatar-ring {
  width: 74px;
  height: 74px;
  padding: 3px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 999px;
  border: 2px solid #fff;
}

.funnel-bar {
  height: 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(0, 200, 150, 0.18), rgba(10, 124, 255, 0.18));
  overflow: hidden;
}

.funnel-bar > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.order-input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(248, 250, 252, 0.95);
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  color: #0f172a;
}

.cta-btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  box-shadow: 0 16px 26px rgba(0, 200, 150, 0.28);
}

.dark-surface {
  background: linear-gradient(180deg, #102035 0%, #08111d 100%);
  color: #fff;
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.small-metric {
  padding: 12px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

@media (max-width: 430px) {
  .prototype-body {
    padding: 0;
  }

  .phone-frame {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    border-width: 0;
  }

  .phone-frame::after {
    display: none;
  }

  .tab-bar {
    left: 10px;
    right: 10px;
    bottom: 8px;
  }
}
