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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  color: #1c1c1e;
  background: #f7f7f5;
  -webkit-font-smoothing: antialiased;
}

.wrapper {
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
  padding: 18px 20px 40px;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #888;
  margin-bottom: 20px;
}

.age-label {
  color: #aaa;
}

.stale-plaque {
  background: #fff4e5;
  border: 1px solid #f5c27c;
  color: #7a3e00;
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 20px;
  text-align: center;
}

.stale-plaque.hidden {
  display: none;
}

.stale-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.stale-sub {
  font-size: 12px;
  color: #94520c;
}

.hero {
  text-align: center;
  margin-bottom: 24px;
}

.source-badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 6px 16px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid #e5e5e0;
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  display: inline-block;
}

.mode-grid .dot {
  background: #1ca64c;
  box-shadow: 0 0 0 4px rgba(28, 166, 76, 0.16);
}

.mode-battery .dot {
  background: #e67e22;
  box-shadow: 0 0 0 4px rgba(230, 126, 34, 0.18);
}

.subline {
  margin-top: 10px;
  font-size: 14px;
  color: #555;
}

.soc-block {
  margin: 24px 0 16px;
}

.soc-number {
  font-size: 72px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.soc-number .pct {
  font-size: 36px;
  font-weight: 500;
  color: #666;
  margin-left: 2px;
}

.soc-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  margin-top: 4px;
}

.bar-track {
  position: relative;
  height: 14px;
  background: #e6e6e2;
  border-radius: 7px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 7px;
  transition: width 0.3s ease;
}

.mode-grid .bar-fill {
  background: #1ca64c;
}

.mode-battery .bar-fill {
  background: #e67e22;
}

.bar-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(0, 0, 0, 0.22);
  z-index: 2;
}

.bar-legend {
  position: relative;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #999;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.bar-legend .m10 {
  position: absolute;
  left: 10%;
  transform: translateX(-50%);
}

.bar-legend .m50 {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.card {
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 16px;
}

.card-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: #888;
  margin-bottom: 10px;
}

.eta-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-top: 1px solid #f0f0ec;
  font-variant-numeric: tabular-nums;
}

.eta-row:first-of-type {
  border-top: none;
  padding-top: 2px;
}

.eta-row.single {
  padding: 2px 0;
}

.eta-target {
  font-size: 15px;
  color: #444;
}

.eta-val {
  font-size: 16px;
  text-align: right;
}

.eta-val .clock {
  color: #666;
  font-size: 14px;
}

.eta-val .muted {
  color: #999;
}

.card-foot {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0ec;
  font-size: 12px;
  color: #888;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.tag-warn {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fff4e5;
  color: #94520c;
  font-size: 10px;
}

.overdue {
  color: #c0392b;
  font-size: 14px;
}

.dtek-reason {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
  margin-bottom: 4px;
}

.schedule-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #f0f0ec;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.sched-label {
  color: #777;
}

.sched-slots {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.slot {
  padding: 2px 8px;
  border-radius: 6px;
  background: #f2f2ee;
  color: #333;
  font-size: 12px;
}

.slot-active {
  background: #fdebd0;
  color: #935116;
  font-weight: 600;
}

.slot-past {
  color: #aaa;
  background: #f7f7f5;
}

.metrics {
  display: flex;
  gap: 10px;
}

.metric {
  flex: 1;
  background: #fff;
  border: 1px solid #e5e5e0;
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.m-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #888;
  margin-bottom: 4px;
}

.m-val {
  font-size: 16px;
  font-weight: 600;
}

.m-sub {
  margin-top: 3px;
  font-size: 12px;
  color: #666;
}

.m-macd {
  margin-top: 2px;
  font-size: 11px;
  color: #999;
}
