:root {
  --nav: #101b2f;
  --nav-2: #17263d;
  --blue: #2878ff;
  --blue-2: #255cf2;
  --green: #06c66b;
  --cyan: #00c9d8;
  --purple: #8b52ff;
  --pink: #e7007a;
  --orange: #ff8b00;
  --red: #f40a00;
  --text: #061126;
  --muted: #647086;
  --line: #e5e9ef;
  --bg: #edf3fa;
  --card: #ffffff;
  --shadow: 0 2px 8px rgba(7, 17, 35, 0.14);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: start center;
  padding: 18px 16px 20px;
  background: linear-gradient(118deg, #2468f6 0%, #b20dff 54%, #e60076 100%);
  color: white;
}

.login-shell {
  width: min(560px, 100%);
  text-align: center;
}

.login-logo {
  width: 100px;
  height: 100px;
  margin: 0 auto 24px;
  border-radius: 28px;
  background: #fff;
  display: grid;
  place-items: center;
  color: #1768ff;
  box-shadow: 0 20px 45px rgba(27, 24, 97, 0.25);
}

.login-logo svg {
  width: 52px;
  height: 52px;
}

.login-title {
  font-size: 42px;
  line-height: 1;
  margin: 0 0 12px;
  font-weight: 800;
}

.login-subtitle {
  margin: 0 0 42px;
  font-size: 21px;
}

.auth-card {
  text-align: left;
  background: #fff;
  color: var(--text);
  border-radius: 28px;
  padding: 44px 40px 34px;
  box-shadow: 0 22px 60px rgba(19, 16, 85, 0.18);
}

.auth-card h2 {
  margin: 0 0 34px;
  font-size: 29px;
}

.field {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
  color: #1f2b45;
  font-weight: 700;
}

.input-wrap {
  height: 64px;
  border: 1px solid #cbd2df;
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  color: #96a0b2;
  background: white;
}

.input-wrap input {
  border: 0;
  outline: 0;
  width: 100%;
  min-width: 0;
  color: var(--text);
  font-size: 18px;
}

.password-tools {
  display: flex;
  justify-content: flex-end;
  margin: -4px 0 22px;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #075fff;
  font-weight: 700;
  padding: 0;
}

.primary-auth {
  width: 100%;
  height: 60px;
  border: 0;
  border-radius: 18px;
  color: white;
  font-weight: 800;
  font-size: 20px;
  background: linear-gradient(100deg, #2468f6, #b40cff);
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  color: #667287;
  margin: 38px 0 32px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #dfe4eb;
}

.social-btn {
  width: 100%;
  height: 62px;
  border: 1px solid #cbd2df;
  border-radius: 16px;
  background: white;
  color: #1b2940;
  font-weight: 700;
  font-size: 20px;
  margin-bottom: 14px;
}

.auth-switch {
  text-align: center;
  margin: 24px 0 8px;
  color: #2f3b52;
  font-size: 19px;
}

.login-footer {
  margin: 34px 0 0;
  color: rgba(255, 255, 255, 0.9);
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 322px 1fr;
}

.sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  background: var(--nav);
  color: #d9e1ef;
  display: flex;
  flex-direction: column;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  min-height: 114px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 28px 30px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
}

.brand-mark,
.small-mark {
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #05c978, #1a7cff);
}

.brand-mark {
  width: 52px;
  height: 52px;
}

.brand-copy strong {
  display: block;
  font-size: 23px;
  color: #fff;
  margin-bottom: 6px;
}

.brand-copy span {
  color: #b5c1d2;
  font-size: 15px;
}

.nav {
  overflow-y: auto;
  padding: 20px 0 0;
  flex: 1;
  scrollbar-color: #8f9297 transparent;
  scrollbar-width: auto;
}

.nav-item {
  height: 60px;
  border: 0;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 31px;
  background: transparent;
  color: #d9e1ef;
  text-align: left;
  font-weight: 800;
  font-size: 20px;
}

.nav-item.active {
  background: var(--blue);
  color: white;
}

.nav-icon {
  width: 24px;
  display: inline-flex;
  justify-content: center;
  flex: 0 0 auto;
}

.nav-icon svg,
.icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2.4;
}

.input-wrap > svg,
.link-btn svg,
.soft-icon svg,
.bubble svg,
.tile-icon svg,
.small-mark svg,
.brand-mark svg,
.square-btn svg,
.download-btn svg {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  stroke-width: 2.4;
}

.login-logo svg {
  width: 52px;
  height: 52px;
}

.nav-item:nth-child(1) .nav-icon,
.icon-blue {
  color: #2878ff;
}

.nav-item:nth-child(2) .nav-icon,
.icon-purple {
  color: #a845ff;
}

.nav-item:nth-child(3) .nav-icon {
  color: #6658ff;
}

.nav-item:nth-child(4) .nav-icon,
.icon-cyan {
  color: #00c8c8;
}

.nav-item:nth-child(5) .nav-icon,
.icon-green {
  color: #00cf6c;
}

.nav-item:nth-child(6) .nav-icon,
.icon-orange {
  color: #ff6500;
}

.nav-item:nth-child(7) .nav-icon {
  color: #ffae00;
}

.nav-item:nth-child(8) .nav-icon,
.icon-pink {
  color: #ff2aa0;
}

.nav-item:nth-child(9) .nav-icon,
.icon-gold {
  color: #ffbf00;
}

.nav-item:nth-child(10) .nav-icon {
  color: #00c7ee;
}

.nav-item:nth-child(11) .nav-icon {
  color: #ffffff;
}

.nav-item:nth-child(12) .nav-icon {
  color: #9ca7b8;
}

.nav-item.active .nav-icon {
  color: white;
}

.co2-card {
  margin: 20px;
  min-height: 96px;
  border-radius: 14px;
  background: var(--green);
  color: white;
  display: grid;
  place-items: center;
  text-align: center;
  font-weight: 800;
}

.co2-card span {
  display: block;
  font-size: 30px;
  margin-top: 4px;
}

.main {
  min-width: 0;
  padding: 38px 38px 34px;
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.content {
  max-width: 990px;
  margin: 0 auto;
}

.hero {
  border-radius: 21px;
  color: white;
  padding: 34px 30px;
  margin-bottom: 30px;
  background: linear-gradient(105deg, #236df6 0%, #aa10f7 52%, #e40074 100%);
  box-shadow: 0 18px 35px rgba(73, 42, 180, 0.14);
}

.hero.green {
  background: linear-gradient(105deg, #08c75e, #039e62);
}

.hero.blue {
  background: linear-gradient(105deg, #236df6, #563df0);
}

.hero.pink {
  background: linear-gradient(105deg, #e50077, #a510ff);
}

.hero.orange {
  background: linear-gradient(105deg, #f2bd00, #ff5b00);
}

.hero.dark {
  background: #141f31;
}

.hero h1 {
  margin: 0 0 14px;
  font-size: 38px;
  line-height: 1.06;
}

.hero p {
  margin: 0;
  font-size: 20px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.metric {
  border-radius: 20px;
  color: white;
  padding: 32px 30px;
  min-height: 175px;
}

.metric.green {
  background: linear-gradient(115deg, #06c85b, #019d6a);
}

.metric.blue {
  background: linear-gradient(115deg, #287eff, #5543ef);
}

.metric.pink {
  background: linear-gradient(115deg, #b849f4, #e80078);
}

.metric.red {
  background: linear-gradient(115deg, #ff7600, #f00000);
}

.metric-label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  margin-bottom: 16px;
}

.metric-value {
  font-size: 46px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 8px;
}

.metric-note {
  font-size: 17px;
}

.card {
  background: white;
  border-radius: 18px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(5, 15, 35, 0.06);
  padding: 30px;
  margin-bottom: 28px;
}

.card h2,
.section-title {
  margin: 0 0 26px;
  font-size: 24px;
}

.battery-top {
  display: flex;
  justify-content: space-between;
  color: #344057;
  font-size: 18px;
  margin-bottom: 10px;
}

.bar {
  height: 15px;
  background: #e1e4e8;
  border-radius: 99px;
  overflow: hidden;
}

.fill {
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: var(--c, #06c66b);
}

.fill.gradient {
  background: linear-gradient(100deg, #247cff, #b222ff);
}

.battery-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  margin-top: 28px;
}

.stat-label {
  color: #526079;
  font-size: 17px;
  margin-bottom: 6px;
}

.stat-value {
  font-size: 24px;
  font-weight: 400;
}

.mini-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 30px;
}

.mini-card {
  min-height: 166px;
  display: grid;
  place-items: center;
  text-align: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.bubble {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}

.bubble.green {
  background: #d8fae4;
  color: #05b65e;
}

.bubble.blue {
  background: #dbe9ff;
  color: #1b68ff;
}

.bubble.gold {
  background: #fff3ba;
  color: #d18800;
}

.mini-value {
  font-size: 28px;
  font-weight: 800;
}

.mini-label {
  color: #53627a;
  margin-top: 4px;
}

.tip {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 30px;
  border-radius: 17px;
  background: #edf5ff;
  border: 1px solid #d3e4ff;
  margin-bottom: 30px;
}

.tip .small-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
}

.tip strong {
  display: block;
  font-size: 21px;
  margin-bottom: 8px;
}

.tip span {
  color: #26324a;
  font-size: 18px;
}

.actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 28px;
}

.action-btn,
.wide-btn {
  height: 70px;
  border: 0;
  border-radius: 17px;
  color: white;
  font-weight: 800;
  font-size: 19px;
  background: linear-gradient(100deg, #08c75d, #04ad75);
}

.action-btn.blue,
.wide-btn.blue {
  background: linear-gradient(100deg, #287cff, #6255f9);
}

.wide-btn.purple {
  background: linear-gradient(100deg, #236df6, #b10cff);
}

.chart-card {
  padding: 32px 30px 38px;
}

.chart {
  width: 100%;
  height: 280px;
  display: block;
}

.chart text {
  font-size: 14px;
  fill: #8c99b4;
}

.chart .grid {
  stroke: #e7ebf0;
  stroke-dasharray: 4 4;
}

.chart .axis {
  stroke: #9eacc2;
}

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

.month-stat {
  border-radius: 17px;
  padding: 24px 20px;
  background: #eef6ff;
}

.month-stat:nth-child(2) {
  background: #eefaef;
}

.month-stat:nth-child(3) {
  background: #faf2ff;
}

.month-stat:nth-child(4) {
  background: #fff6ed;
}

.month-stat span {
  color: #526079;
  font-size: 18px;
}

.month-stat strong {
  display: block;
  margin: 10px 0 8px;
  font-size: 30px;
}

.search-card {
  padding: 20px;
  display: flex;
  gap: 14px;
}

.search-card input {
  height: 52px;
  flex: 1;
  min-width: 0;
  border: 1px solid #d9dfe8;
  border-radius: 13px;
  padding: 0 20px;
  font-size: 18px;
}

.square-btn {
  border: 0;
  width: 54px;
  height: 46px;
  border-radius: 13px;
  color: white;
  background: #327cff;
}

.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card {
  background: #fff;
  border-radius: 17px;
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 15px;
}

.station-top,
.trip-top,
.challenge-top,
.achievement-row,
.post-head,
.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.station-card h2,
.trip-card h2,
.challenge-card h2,
.achievement-card h2,
.post-card h2 {
  margin: 0 0 10px;
  font-size: 24px;
}

.muted {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  background: #d9fae7;
  color: #009c51;
  padding: 8px 15px;
  font-weight: 800;
  white-space: nowrap;
}

.pill.warn {
  background: #ffeccf;
  color: #e14500;
}

.pill.blue {
  background: #dceaff;
  color: #145dff;
}

.station-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  border-top: 1px solid #edf0f4;
  margin-top: 16px;
  padding-top: 20px;
}

.meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.soft-icon {
  width: 39px;
  height: 39px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #f7efff;
  color: #a10dff;
  flex: 0 0 auto;
}

.route-btn {
  border: 0;
  width: 100%;
  height: 50px;
  margin-top: 18px;
  border-radius: 12px;
  color: white;
  background: #2e7cff;
  font-weight: 800;
  font-size: 18px;
}

.community-card {
  border-radius: 19px;
  padding: 34px 30px;
  color: white;
  background: linear-gradient(115deg, #5b2eff, #af11ff);
  margin-bottom: 30px;
}

.community-card h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 24px;
  font-size: 26px;
}

.progress-box {
  background: rgba(255, 255, 255, 0.13);
  border-radius: 19px;
  padding: 22px 20px;
  margin: 20px 0;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
  font-size: 18px;
}

.challenge-card {
  display: grid;
  grid-template-columns: 74px 1fr;
  gap: 16px;
}

.tile-icon {
  width: 70px;
  height: 70px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: white;
  background: linear-gradient(135deg, #07c86b, #00b68c);
}

.tile-icon.orange {
  background: linear-gradient(135deg, #ffae00, #ff5200);
}

.tile-icon.purple {
  background: linear-gradient(135deg, #347cff, #b33fff);
}

.tile-icon.gray {
  background: #9a9a9a;
}

.daily {
  color: white;
  border-radius: 18px;
  padding: 34px 30px;
  background: linear-gradient(115deg, #ff7500, #ec2e91);
  margin-bottom: 28px;
}

.daily h2 {
  margin: 0 0 18px;
}

.daily-row {
  height: 60px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.13);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  margin-top: 10px;
}

.achievement-summary,
.community-summary,
.profile-stats,
.share-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.summary-card {
  background: #fff;
  border-radius: 17px;
  box-shadow: var(--shadow);
  min-height: 160px;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 20px;
}

.summary-card strong {
  display: block;
  font-size: 31px;
  margin: 10px 0 4px;
}

.achievement-card {
  display: grid;
  grid-template-columns: 80px 1fr auto;
  align-items: center;
  gap: 20px;
  min-height: 134px;
}

.locked {
  opacity: 0.64;
}

.post-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 18px;
}

.avatar {
  font-size: 38px;
  line-height: 1;
}

.post-meta {
  color: #617086;
  display: flex;
  gap: 18px;
  margin-top: 20px;
}

.share-impact {
  color: white;
  border-radius: 18px;
  padding: 34px 30px 30px;
  background: linear-gradient(130deg, #236df6, #a80fff 54%, #e40077);
  text-align: center;
  margin-bottom: 30px;
}

.share-impact h2 {
  margin: 0 0 12px;
  font-size: 31px;
}

.impact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 30px 0;
}

.impact-box {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 24px 16px;
}

.impact-box strong {
  display: block;
  font-size: 40px;
  line-height: 1;
}

.download-btn {
  width: 100%;
  height: 70px;
  border: 0;
  border-radius: 17px;
  background: white;
  box-shadow: var(--shadow);
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 34px;
}

.share-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.share-btn {
  height: 90px;
  border: 0;
  border-radius: 17px;
  box-shadow: var(--shadow);
  background: white;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  font-size: 19px;
  font-weight: 800;
}

.refer {
  border: 2px solid #ffc400;
  background: #fffdea;
  border-radius: 18px;
  padding: 34px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 30px;
}

.yellow-btn {
  border: 0;
  height: 50px;
  padding: 0 20px;
  border-radius: 13px;
  background: #ffc400;
  font-weight: 800;
  font-size: 18px;
}

.profile {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 20px;
  align-items: center;
  padding-bottom: 28px;
  border-bottom: 1px solid #edf0f4;
}

.initials {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #347cff, #613cff);
  color: white;
  font-size: 30px;
  font-weight: 800;
}

.profile h2 {
  margin: 0 0 8px;
}

.profile-stats {
  margin: 30px 0 0;
}

.profile-stats .month-stat {
  text-align: center;
}

.setting-row {
  align-items: center;
  padding: 22px 6px;
}

.setting-left {
  display: flex;
  gap: 16px;
  align-items: center;
}

.setting-left h3 {
  margin: 0 0 6px;
  font-size: 21px;
}

.chev {
  color: #9aa5b5;
  font-size: 38px;
  font-weight: 200;
}

.eco-row {
  background: #effdf4;
  border: 1px solid #d8f6e4;
}

.switch {
  width: 60px;
  height: 31px;
  border-radius: 99px;
  background: #c7ccd4;
  position: relative;
  border: 0;
}

.switch::after {
  content: "";
  position: absolute;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: white;
  top: 3.5px;
  left: 4px;
  transition: transform 0.2s ease;
}

.switch.on {
  background: var(--green);
}

.switch.on::after {
  transform: translateX(28px);
}

.logout-btn {
  width: 100%;
  height: 58px;
  border: 0;
  border-radius: 14px;
  background: #fff0f0;
  color: #ef0000;
  font-weight: 800;
  font-size: 18px;
  margin-bottom: 30px;
}

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

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid #d7dfe9;
  border-radius: 14px;
  min-height: 54px;
  padding: 12px 16px;
  outline: 0;
}

.form-grid textarea {
  min-height: 110px;
  grid-column: 1 / -1;
  resize: vertical;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%) translateY(20px);
  background: #111d31;
  color: #fff;
  border-radius: 999px;
  padding: 13px 20px;
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 50;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.help {
  position: fixed;
  right: 10px;
  bottom: 14px;
  width: 43px;
  height: 43px;
  border: 0;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow);
  font-size: 24px;
  z-index: 20;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.44);
  backdrop-filter: blur(5px);
  display: grid;
  place-items: center;
  padding: 30px 16px;
  z-index: 40;
}

.modal {
  width: min(820px, 100%);
  max-height: 91vh;
  overflow: auto;
  background: white;
  border-radius: 24px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.32);
  position: relative;
}

.modal-head {
  color: white;
  text-align: center;
  padding: 30px 40px 34px;
  background: linear-gradient(105deg, #236df6, #553ef0);
}

.modal-head .small-mark {
  width: 80px;
  height: 80px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.modal-head h2 {
  margin: 0 0 14px;
  font-size: 38px;
}

.close-modal {
  position: absolute;
  top: 18px;
  right: 18px;
  border: 0;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  color: white;
  background: rgba(255, 255, 255, 0.18);
  font-size: 32px;
}

.modal-body {
  padding: 30px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-radius: 999px;
  background: #f0f1f4;
  padding: 5px;
  margin-bottom: 30px;
}

.tab {
  height: 48px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 800;
  font-size: 18px;
}

.tab.active {
  background: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.16);
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

.plan {
  border: 2px solid #e0e3e8;
  border-radius: 18px;
  padding: 30px;
  min-height: 170px;
  position: relative;
}

.plan.active {
  border-color: #2878ff;
  background: #edf5ff;
}

.popular {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(100deg, #a31cff, #e00076);
  color: white;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 800;
}

.price {
  margin-top: 18px;
  font-size: 40px;
  font-weight: 800;
}

.features {
  display: grid;
  gap: 16px;
  font-size: 20px;
  margin-bottom: 32px;
}

.features div {
  display: flex;
  gap: 14px;
}

.trial {
  background: #effdf4;
  border: 1px solid #b7f4d0;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  gap: 16px;
  margin-bottom: 30px;
}

.route-modal .modal-head {
  background: linear-gradient(105deg, #08c75d, #039c69);
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
    max-height: none;
    padding-bottom: 8px;
  }

  .co2-card {
    display: none;
  }

  .main {
    padding: 22px 16px;
  }

  .metric-grid,
  .mini-grid,
  .month-grid,
  .achievement-summary,
  .community-summary,
  .profile-stats,
  .share-grid,
  .actions-row,
  .impact-grid,
  .plans,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .achievement-card,
  .challenge-card,
  .post-card {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 32px;
  }
}

/* Visual refresh: more rounded, vivid, and stacked for MVP review. */
:root {
  --bg: #eaf4ff;
  --nav: #0b1530;
  --blue: #1768ff;
  --green: #00d46f;
  --purple: #8a19ff;
  --pink: #ff007f;
  --orange: #ffb000;
  --red: #ff2500;
  --shadow: 0 18px 42px rgba(22, 55, 110, 0.16);
}

body {
  background:
    radial-gradient(circle at 20% 5%, rgba(0, 212, 111, 0.15), transparent 26rem),
    radial-gradient(circle at 88% 8%, rgba(255, 0, 127, 0.14), transparent 24rem),
    linear-gradient(135deg, #eef8ff 0%, #eef3ff 48%, #f9f1ff 100%);
}

.content {
  max-width: 860px;
}

.main {
  padding: 40px 44px;
}

.sidebar {
  background: linear-gradient(180deg, #09142d 0%, #132540 100%);
}

.brand-mark,
.small-mark,
.login-logo {
  border-radius: 22px;
  background: linear-gradient(135deg, #00d46f 0%, #00c5ff 52%, #1768ff 100%);
}

.nav {
  padding: 18px 14px 0;
}

.nav-item {
  border-radius: 18px;
  margin: 6px 0;
  padding: 0 18px;
}

.nav-item.active {
  background: linear-gradient(100deg, #1768ff 0%, #7b35ff 100%);
  box-shadow: 0 14px 24px rgba(23, 104, 255, 0.28);
}

.co2-card {
  border-radius: 26px;
  background: linear-gradient(135deg, #00d46f, #00b983);
  box-shadow: 0 18px 35px rgba(0, 212, 111, 0.28);
}

.hero,
.card,
.metric,
.mini-card,
.tip,
.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card,
.community-card,
.daily,
.share-impact,
.download-btn,
.share-btn,
.refer,
.auth-card,
.modal,
.plan,
.trial {
  border-radius: 30px;
}

.hero {
  padding: 38px 34px;
  background: linear-gradient(115deg, #1768ff 0%, #8a19ff 50%, #ff007f 100%);
  box-shadow: 0 24px 55px rgba(138, 25, 255, 0.22);
}

.hero.green {
  background: linear-gradient(115deg, #00d46f, #00a8ff);
}

.hero.blue {
  background: linear-gradient(115deg, #1768ff, #7442ff);
}

.hero.pink {
  background: linear-gradient(115deg, #ff007f, #8a19ff);
}

.hero.orange {
  background: linear-gradient(115deg, #ffb000, #ff2500);
}

.hero.dark {
  background: linear-gradient(115deg, #0b1530, #263d68);
}

.metric-grid,
.mini-grid,
.month-grid,
.achievement-summary,
.community-summary,
.profile-stats,
.share-grid,
.actions-row,
.impact-grid,
.plans,
.form-grid,
.station-meta,
.battery-stats {
  grid-template-columns: 1fr;
}

.metric-grid,
.mini-grid,
.month-grid,
.achievement-summary,
.community-summary,
.profile-stats,
.share-grid,
.actions-row,
.impact-grid {
  gap: 18px;
}

.metric {
  min-height: 150px;
  box-shadow: 0 20px 38px rgba(30, 50, 120, 0.18);
}

.metric.green {
  background: linear-gradient(115deg, #00d46f, #00a864);
}

.metric.blue {
  background: linear-gradient(115deg, #1768ff, #5e4cff);
}

.metric.pink {
  background: linear-gradient(115deg, #b845ff, #ff007f);
}

.metric.red {
  background: linear-gradient(115deg, #ff8a00, #ff2500);
}

.card,
.mini-card,
.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card,
.download-btn,
.share-btn {
  border: 1px solid rgba(23, 104, 255, 0.08);
  box-shadow: var(--shadow);
}

.mini-card,
.summary-card,
.month-stat {
  border-radius: 28px;
  justify-items: start;
  text-align: left;
  min-height: 132px;
}

.mini-card:nth-child(1),
.summary-card:nth-child(1),
.month-stat:nth-child(1) {
  background: linear-gradient(135deg, #e7fff2, #ffffff);
}

.mini-card:nth-child(2),
.summary-card:nth-child(2),
.month-stat:nth-child(2) {
  background: linear-gradient(135deg, #e8f2ff, #ffffff);
}

.mini-card:nth-child(3),
.summary-card:nth-child(3),
.month-stat:nth-child(3) {
  background: linear-gradient(135deg, #fff7d7, #ffffff);
}

.month-stat:nth-child(4) {
  background: linear-gradient(135deg, #fff0e7, #ffffff);
}

.bubble,
.soft-icon,
.tile-icon {
  border-radius: 20px;
}

.bubble {
  margin-bottom: 14px;
}

.bar {
  height: 17px;
  background: #dfe5ee;
}

.route-btn,
.action-btn,
.wide-btn,
.primary-auth,
.social-btn,
.square-btn,
.yellow-btn,
.logout-btn {
  border-radius: 22px;
}

.route-btn,
.square-btn {
  background: linear-gradient(100deg, #1768ff, #00a8ff);
}

.wide-btn,
.action-btn {
  background: linear-gradient(100deg, #00d46f, #00a8ff);
  box-shadow: 0 16px 30px rgba(0, 168, 255, 0.24);
}

.wide-btn.blue,
.action-btn.blue,
.wide-btn.purple {
  background: linear-gradient(100deg, #1768ff, #8a19ff);
}

.tip {
  background: linear-gradient(135deg, #eaf4ff, #f6efff);
  border-color: #cfe1ff;
}

.community-card {
  background: linear-gradient(115deg, #7040ff, #b000ff);
}

.daily {
  background: linear-gradient(115deg, #ff8a00, #ff007f);
}

.share-impact {
  background: linear-gradient(130deg, #1768ff, #8a19ff 52%, #ff007f);
}

.impact-box {
  border-radius: 24px;
}

.search-card input,
.input-wrap,
.form-grid input,
.form-grid select,
.form-grid textarea {
  border-radius: 22px;
}

.achievement-card {
  grid-template-columns: 80px 1fr;
}

.achievement-card .pill {
  grid-column: 1 / -1;
  width: max-content;
}

.challenge-card {
  grid-template-columns: 74px 1fr;
}

.post-card {
  grid-template-columns: 54px 1fr;
}

/* Multi-color item treatment: each option/card gets its own accent. */
.nav-item {
  position: relative;
  overflow: hidden;
  background: linear-gradient(100deg, var(--item-color, #1768ff), var(--item-color-2, #7b35ff));
  color: white;
  box-shadow: 0 12px 24px var(--item-shadow, rgba(23, 104, 255, 0.2));
  opacity: 0.92;
  transition: transform 0.16s ease, opacity 0.16s ease, box-shadow 0.16s ease;
}

.nav-item::before {
  content: none;
}

.nav-item:hover,
.nav-item.active {
  opacity: 1;
  transform: translateX(4px);
  box-shadow: 0 16px 30px var(--item-shadow, rgba(23, 104, 255, 0.34));
}

.nav-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.18), transparent 42%);
  pointer-events: none;
}

.nav-item:nth-child(1) {
  --item-color: #1768ff;
  --item-color-2: #00a8ff;
  --item-shadow: rgba(23, 104, 255, 0.36);
}

.nav-item:nth-child(2) {
  --item-color: #a845ff;
  --item-color-2: #d926ff;
  --item-shadow: rgba(168, 69, 255, 0.36);
}

.nav-item:nth-child(3) {
  --item-color: #6658ff;
  --item-color-2: #2a7fff;
  --item-shadow: rgba(102, 88, 255, 0.36);
}

.nav-item:nth-child(4) {
  --item-color: #00d1c7;
  --item-color-2: #00a8ff;
  --item-shadow: rgba(0, 209, 199, 0.34);
}

.nav-item:nth-child(5) {
  --item-color: #00d46f;
  --item-color-2: #00b983;
  --item-shadow: rgba(0, 212, 111, 0.34);
}

.nav-item:nth-child(6) {
  --item-color: #ff6500;
  --item-color-2: #ff2500;
  --item-shadow: rgba(255, 101, 0, 0.34);
}

.nav-item:nth-child(7) {
  --item-color: #ffae00;
  --item-color-2: #ff7a00;
  --item-shadow: rgba(255, 174, 0, 0.34);
}

.nav-item:nth-child(8) {
  --item-color: #ff2aa0;
  --item-color-2: #ff007f;
  --item-shadow: rgba(255, 42, 160, 0.34);
}

.nav-item:nth-child(9) {
  --item-color: #ffd000;
  --item-color-2: #ff9d00;
  --item-shadow: rgba(255, 208, 0, 0.32);
}

.nav-item:nth-child(10) {
  --item-color: #00c7ee;
  --item-color-2: #1768ff;
  --item-shadow: rgba(0, 199, 238, 0.34);
}

.nav-item:nth-child(11) {
  --item-color: #ff006e;
  --item-color-2: #8a19ff;
  --item-shadow: rgba(255, 0, 110, 0.34);
}

.nav-item:nth-child(12) {
  --item-color: #9ca7b8;
  --item-color-2: #536070;
  --item-shadow: rgba(156, 167, 184, 0.28);
}

.nav-item.active {
  outline: 2px solid rgba(255, 255, 255, 0.36);
  outline-offset: 2px;
}

.card,
.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card,
.mini-card,
.summary-card,
.download-btn,
.share-btn {
  position: relative;
  overflow: hidden;
}

.card::before,
.station-card::before,
.trip-card::before,
.challenge-card::before,
.achievement-card::before,
.post-card::before,
.setting-card::before,
.mini-card::before,
.summary-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 9px;
  background: var(--accent, #1768ff);
}

.card > *,
.station-card > *,
.trip-card > *,
.challenge-card > *,
.achievement-card > *,
.post-card > *,
.setting-card > *,
.mini-card > *,
.summary-card > * {
  position: relative;
}

.metric:nth-child(4n + 1),
.card:nth-of-type(4n + 1),
.station-card:nth-child(4n + 1),
.trip-card:nth-child(4n + 1),
.challenge-card:nth-of-type(4n + 1),
.achievement-card:nth-of-type(4n + 1),
.post-card:nth-of-type(4n + 1),
.setting-card:nth-of-type(4n + 1),
.mini-card:nth-child(4n + 1),
.summary-card:nth-child(4n + 1) {
  --accent: #1768ff;
}

.metric:nth-child(4n + 2),
.card:nth-of-type(4n + 2),
.station-card:nth-child(4n + 2),
.trip-card:nth-child(4n + 2),
.challenge-card:nth-of-type(4n + 2),
.achievement-card:nth-of-type(4n + 2),
.post-card:nth-of-type(4n + 2),
.setting-card:nth-of-type(4n + 2),
.mini-card:nth-child(4n + 2),
.summary-card:nth-child(4n + 2) {
  --accent: #00d46f;
}

.metric:nth-child(4n + 3),
.card:nth-of-type(4n + 3),
.station-card:nth-child(4n + 3),
.trip-card:nth-child(4n + 3),
.challenge-card:nth-of-type(4n + 3),
.achievement-card:nth-of-type(4n + 3),
.post-card:nth-of-type(4n + 3),
.setting-card:nth-of-type(4n + 3),
.mini-card:nth-child(4n + 3),
.summary-card:nth-child(4n + 3) {
  --accent: #ffb000;
}

.metric:nth-child(4n),
.card:nth-of-type(4n),
.station-card:nth-child(4n),
.trip-card:nth-child(4n),
.challenge-card:nth-of-type(4n),
.achievement-card:nth-of-type(4n),
.post-card:nth-of-type(4n),
.setting-card:nth-of-type(4n),
.mini-card:nth-child(4n),
.summary-card:nth-child(4n) {
  --accent: #ff007f;
}

.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card,
.mini-card,
.summary-card,
.card {
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--accent, #1768ff) 12%, white 88%), #ffffff 36%);
}

.station-card .route-btn,
.trip-card .route-btn,
.download-btn,
.share-btn {
  border: 1px solid color-mix(in srgb, var(--accent, #1768ff) 32%, transparent);
}

.bubble.green,
.bubble.blue,
.bubble.gold,
.soft-icon,
.tile-icon {
  background: var(--accent, #1768ff);
  color: white;
}

.station-card:nth-child(4n + 1) .soft-icon,
.trip-card:nth-child(4n + 1) .soft-icon,
.challenge-card:nth-of-type(4n + 1) .tile-icon,
.achievement-card:nth-of-type(4n + 1) .tile-icon,
.post-card:nth-of-type(4n + 1) .avatar {
  color: #1768ff;
}

.station-card:nth-child(4n + 2) .soft-icon,
.trip-card:nth-child(4n + 2) .soft-icon,
.challenge-card:nth-of-type(4n + 2) .tile-icon,
.achievement-card:nth-of-type(4n + 2) .tile-icon,
.post-card:nth-of-type(4n + 2) .avatar {
  color: #00a960;
}

.station-card:nth-child(4n + 3) .soft-icon,
.trip-card:nth-child(4n + 3) .soft-icon,
.challenge-card:nth-of-type(4n + 3) .tile-icon,
.achievement-card:nth-of-type(4n + 3) .tile-icon,
.post-card:nth-of-type(4n + 3) .avatar {
  color: #d18a00;
}

.station-card:nth-child(4n) .soft-icon,
.trip-card:nth-child(4n) .soft-icon,
.challenge-card:nth-of-type(4n) .tile-icon,
.achievement-card:nth-of-type(4n) .tile-icon,
.post-card:nth-of-type(4n) .avatar {
  color: #ff007f;
}

/* Final sidebar polish: stronger separated colors and fully colored bars. */
.nav {
  gap: 10px;
}

.nav-item {
  min-height: 64px;
  border-radius: 26px;
  opacity: 1;
  color: #ffffff;
  background: linear-gradient(105deg, var(--bar-a), var(--bar-b));
  box-shadow: 0 14px 26px var(--bar-shadow);
}

.nav-item .nav-icon {
  color: #ffffff !important;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.18));
}

.nav-item:nth-child(1) {
  --bar-a: #0f6bff;
  --bar-b: #00c2ff;
  --bar-shadow: rgba(15, 107, 255, 0.28);
}

.nav-item:nth-child(2) {
  --bar-a: #ff8a00;
  --bar-b: #ffca00;
  --bar-shadow: rgba(255, 138, 0, 0.28);
}

.nav-item:nth-child(3) {
  --bar-a: #7c2dff;
  --bar-b: #c026ff;
  --bar-shadow: rgba(124, 45, 255, 0.28);
}

.nav-item:nth-child(4) {
  --bar-a: #00b894;
  --bar-b: #00e676;
  --bar-shadow: rgba(0, 184, 148, 0.28);
}

.nav-item:nth-child(5) {
  --bar-a: #ff006e;
  --bar-b: #ff4d9d;
  --bar-shadow: rgba(255, 0, 110, 0.28);
}

.nav-item:nth-child(6) {
  --bar-a: #ff3d00;
  --bar-b: #ff7a00;
  --bar-shadow: rgba(255, 61, 0, 0.28);
}

.nav-item:nth-child(7) {
  --bar-a: #00a6a6;
  --bar-b: #00d4d4;
  --bar-shadow: rgba(0, 166, 166, 0.28);
}

.nav-item:nth-child(8) {
  --bar-a: #d600ff;
  --bar-b: #ff2aa0;
  --bar-shadow: rgba(214, 0, 255, 0.28);
}

.nav-item:nth-child(9) {
  --bar-a: #f5b700;
  --bar-b: #ffdd33;
  --bar-shadow: rgba(245, 183, 0, 0.28);
}

.nav-item:nth-child(10) {
  --bar-a: #00c853;
  --bar-b: #64dd17;
  --bar-shadow: rgba(0, 200, 83, 0.28);
}

.nav-item:nth-child(11) {
  --bar-a: #304ffe;
  --bar-b: #7c4dff;
  --bar-shadow: rgba(48, 79, 254, 0.28);
}

.nav-item:nth-child(12) {
  --bar-a: #546e7a;
  --bar-b: #90a4ae;
  --bar-shadow: rgba(84, 110, 122, 0.24);
}

.nav-item.active {
  outline: 3px solid rgba(255, 255, 255, 0.72);
  outline-offset: 2px;
  transform: translateX(5px);
}

.hero,
.card,
.metric,
.mini-card,
.summary-card,
.tip,
.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card,
.community-card,
.daily,
.share-impact,
.download-btn,
.share-btn,
.refer,
.auth-card,
.modal,
.plan,
.trial,
.route-btn,
.action-btn,
.wide-btn,
.primary-auth,
.social-btn,
.square-btn,
.yellow-btn,
.logout-btn,
.input-wrap,
.form-grid input,
.form-grid select,
.form-grid textarea {
  border-radius: 28px;
}

.brand-mark,
.small-mark,
.bubble,
.soft-icon,
.tile-icon {
  border-radius: 24px;
}

/* Keep menu bars the same color after click, focus, and hover. */
.nav-item,
.nav-item:hover,
.nav-item:focus,
.nav-item:active,
.nav-item.active {
  background: var(--bar-solid) !important;
  color: #ffffff;
  opacity: 1;
  transform: none;
}

.nav-item.active {
  outline: none;
  box-shadow: 0 14px 26px var(--bar-shadow);
}

.nav-item:nth-child(1) {
  --bar-solid: #0f6bff;
}

.nav-item:nth-child(2) {
  --bar-solid: #ff8a00;
}

.nav-item:nth-child(3) {
  --bar-solid: #7c2dff;
}

.nav-item:nth-child(4) {
  --bar-solid: #00b894;
}

.nav-item:nth-child(5) {
  --bar-solid: #ff006e;
}

.nav-item:nth-child(6) {
  --bar-solid: #ff3d00;
}

.nav-item:nth-child(7) {
  --bar-solid: #00a6a6;
}

.nav-item:nth-child(8) {
  --bar-solid: #d600ff;
}

.nav-item:nth-child(9) {
  --bar-solid: #f5b700;
}

.nav-item:nth-child(10) {
  --bar-solid: #00c853;
}

.nav-item:nth-child(11) {
  --bar-solid: #304ffe;
}

.nav-item:nth-child(12) {
  --bar-solid: #8b5cf6;
}

.nav-item:nth-child(13) {
  --bar-solid: #546e7a;
}

.hero.vehicle {
  background: linear-gradient(120deg, #06b6d4, #2563eb 48%, #8b5cf6);
}

.connected-card,
.vehicle-panel,
.empty-card {
  overflow: hidden;
}

.vehicle-form {
  grid-template-columns: 1fr 1.4fr auto;
  align-items: center;
}

.vehicle-form .wide-btn {
  min-height: 56px;
}

.vehicle-form .wide-btn svg {
  width: 22px;
  height: 22px;
  margin-right: 8px;
  vertical-align: middle;
}

.metric-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 22px;
}

.metric-grid.compact .metric {
  min-height: 150px;
}

.telemetry-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0;
}

.telemetry-strip div {
  background: #f5f8ff;
  border: 1px solid #dce7ff;
  border-radius: 22px;
  padding: 18px;
}

.telemetry-strip strong,
.telemetry-strip span {
  display: block;
}

.telemetry-strip strong {
  color: #0f172a;
  font-size: 15px;
  margin-bottom: 6px;
}

.telemetry-strip span {
  color: #58677e;
}

.action-btn.danger {
  background: linear-gradient(120deg, #ff3d00, #e11d48);
}

.empty-card {
  text-align: center;
}

.empty-card .soft-icon {
  margin: 0 auto 14px;
}

@media (max-width: 900px) {
  .vehicle-form,
  .metric-grid.compact,
  .telemetry-strip {
    grid-template-columns: 1fr;
  }
}

/* Bootstrap pass: mobile UX, touch targets, and link reset without changing the original visual identity. */
a,
a:visited,
a:hover,
a:active,
button,
.link-btn,
.link-btn:hover,
.link-btn:focus,
.link-btn:active {
  text-decoration: none !important;
}

.link-btn {
  color: inherit;
  font-weight: 600;
}

.password-tools .link-btn,
.auth-switch .link-btn,
.post-meta .link-btn,
.chev.link-btn {
  color: #334155;
}

.auth-switch .link-btn {
  padding: 4px 2px;
}

.post-meta .link-btn {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
}

.legal-inline {
  margin: 14px 0 0;
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.92);
}

.legal-inline a,
.legal-inline a:visited {
  color: inherit;
  font-weight: 700;
}

.legal-row,
.legal-row:visited,
.legal-row:hover,
.legal-row:active {
  color: inherit;
}

.legal-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 6%, rgba(0, 212, 111, 0.18), transparent 28rem),
    radial-gradient(circle at 90% 10%, rgba(23, 104, 255, 0.16), transparent 26rem),
    linear-gradient(135deg, #eef8ff 0%, #eef3ff 50%, #f8f1ff 100%);
}

.legal-shell {
  width: min(920px, calc(100% - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.legal-back,
.legal-back:visited {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.legal-hero {
  margin: 24px 0;
  padding: 36px;
  border-radius: 28px;
  color: #ffffff;
  background: linear-gradient(120deg, #1768ff, #8a19ff 54%, #e7007a);
  box-shadow: var(--shadow);
}

.legal-mark {
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
}

.legal-mark svg {
  width: 32px;
  height: 32px;
}

.legal-hero h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 7vw, 54px);
  line-height: 1;
}

.legal-hero p {
  margin: 0;
  font-size: 19px;
  color: rgba(255, 255, 255, 0.9);
}

.legal-card {
  padding: 34px;
  border-radius: 28px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.legal-card h2 {
  margin: 30px 0 10px;
  font-size: 24px;
}

.legal-card h2:first-of-type {
  margin-top: 8px;
}

.legal-card p,
.legal-card li {
  color: #334155;
  font-size: 17px;
  line-height: 1.65;
}

.legal-card a,
.legal-card a:visited {
  color: #1768ff;
  font-weight: 800;
}

.legal-note {
  padding: 16px 18px;
  border-radius: 18px;
  background: #eef6ff;
  border: 1px solid #d7e8ff;
}

button,
[data-page],
[data-action] {
  -webkit-tap-highlight-color: transparent;
}

img,
svg,
canvas,
video {
  max-width: 100%;
}

input,
select,
textarea,
button {
  max-width: 100%;
}

.chart {
  width: 100%;
  min-width: 0;
}

@media (max-width: 760px) {
  html {
    -webkit-text-size-adjust: 100%;
  }

  body {
    overflow-x: hidden;
  }

  .layout {
    display: block;
    min-height: 100vh;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 50;
    height: auto;
    max-height: 54vh;
    overflow: auto;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 34px rgba(9, 20, 45, 0.18);
  }

  .brand {
    min-height: 84px;
    padding: 16px 18px;
  }

  .brand-mark {
    width: 46px;
    height: 46px;
    flex: 0 0 46px;
  }

  .brand-copy strong {
    font-size: 20px;
    margin-bottom: 3px;
  }

  .brand-copy span {
    font-size: 13px;
  }

  .nav {
    padding: 10px 12px 12px;
    display: grid;
    gap: 8px;
  }

  .nav-item {
    width: 100%;
    min-height: 54px;
    height: auto;
    margin: 0;
    padding: 12px 14px;
    border-radius: 18px;
    justify-content: flex-start;
    font-size: 16px;
    line-height: 1.2;
    white-space: normal;
  }

  .nav-icon {
    flex: 0 0 26px;
  }

  .main {
    padding: 18px 12px 28px;
  }

  .content {
    width: 100%;
    max-width: 100%;
  }

  .hero,
  .card,
  .metric,
  .mini-card,
  .station-card,
  .trip-card,
  .challenge-card,
  .achievement-card,
  .post-card,
  .setting-card,
  .community-card,
  .daily,
  .share-impact,
  .refer {
    border-radius: 22px;
  }

  .hero {
    padding: 26px 22px;
    margin-bottom: 18px;
  }

  .hero h1 {
    font-size: clamp(26px, 8vw, 34px);
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .hero p,
  .tip span,
  .muted,
  .station-card p,
  .trip-card p,
  .post-card p {
    font-size: 15px;
    line-height: 1.45;
  }

  .metric-grid,
  .mini-grid,
  .month-grid,
  .achievement-summary,
  .community-summary,
  .profile-stats,
  .share-grid,
  .actions-row,
  .impact-grid,
  .plans,
  .form-grid,
  .station-meta,
  .telemetry-strip,
  .metric-grid.compact {
    grid-template-columns: 1fr !important;
    gap: 14px;
  }

  .metric {
    min-height: 148px;
    padding: 24px 22px;
  }

  .metric-value {
    font-size: clamp(34px, 12vw, 48px);
    line-height: 1;
  }

  .mini-card {
    min-height: 132px;
  }

  .battery-stats,
  .station-top,
  .trip-top,
  .progress-head,
  .setting-row {
    gap: 12px;
  }

  .station-top,
  .trip-top {
    align-items: flex-start;
  }

  .station-top h2,
  .trip-top h2,
  .setting-row h2,
  .challenge-card h2,
  .achievement-card h2,
  .post-card h2 {
    font-size: 21px;
    line-height: 1.15;
    overflow-wrap: anywhere;
  }

  .challenge-card,
  .achievement-card,
  .post-card {
    grid-template-columns: 1fr !important;
    padding: 22px;
  }

  .post-card {
    gap: 14px;
  }

  .post-card p {
    font-size: 16px !important;
  }

  .post-head,
  .post-meta {
    align-items: flex-start;
    gap: 10px;
    flex-wrap: wrap;
  }

  .share-btn,
  .download-btn,
  .route-btn,
  .action-btn,
  .wide-btn,
  .primary-auth,
  .social-btn,
  .yellow-btn,
  .logout-btn {
    min-height: 54px;
    border-radius: 18px;
    font-size: 16px;
    line-height: 1.2;
    white-space: normal;
  }

  .form-grid input,
  .form-grid select,
  .form-grid textarea,
  .input-wrap {
    min-height: 54px;
    border-radius: 18px;
    font-size: 16px;
  }

  .login-page {
    place-items: start center;
    padding: 18px 12px 28px;
  }

  .login-logo {
    width: 78px;
    height: 78px;
    margin-bottom: 16px;
  }

  .login-title {
    font-size: 36px;
  }

  .login-subtitle {
    font-size: 18px;
    margin-bottom: 24px;
  }

  .auth-card {
    padding: 28px 20px 24px;
    border-radius: 24px;
  }

  .auth-card h2 {
    font-size: 26px;
    margin-bottom: 24px;
  }

  .modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    border-radius: 24px;
  }

  .modal-head {
    padding: 28px 18px;
  }

  .modal-body {
    padding: 20px 16px 24px;
  }

  .tabs,
  .plans {
    gap: 12px;
  }

  .plan {
    min-height: 190px;
  }

  .help {
    right: 14px;
    bottom: 14px;
    width: 46px;
    height: 46px;
  }

  .legal-shell {
    width: min(100% - 20px, 920px);
    padding-top: 18px;
  }

  .legal-hero,
  .legal-card {
    border-radius: 22px;
    padding: 24px 20px;
  }
}

@media (max-width: 430px) {
  .main {
    padding-inline: 10px;
  }

  .hero,
  .card,
  .metric,
  .station-card,
  .trip-card,
  .challenge-card,
  .achievement-card,
  .post-card,
  .setting-card,
  .community-card,
  .daily,
  .share-impact,
  .refer {
    padding: 20px;
  }

  .brand-copy span {
    display: none;
  }

  .nav-item {
    font-size: 15px;
    min-height: 50px;
  }
}

/* Final mobile polish for market preview. */
img,
svg,
canvas {
  max-width: 100%;
}

.chart-card {
  overflow: hidden;
}

.chart-card .chart {
  min-height: 220px;
}

.station-card,
.trip-card,
.challenge-card,
.achievement-card,
.post-card,
.setting-card,
.metric,
.mini-card {
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .sidebar {
    max-height: 46vh;
    scrollbar-width: thin;
  }

  .nav {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .content > *:last-child {
    margin-bottom: 72px;
  }

  .chart-card {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .chart-card .chart {
    min-width: 520px;
  }

  .battery-stats {
    display: grid;
    grid-template-columns: 1fr;
  }

  .route-btn,
  .wide-btn,
  .download-btn,
  .share-btn {
    width: 100%;
  }

  .setting-row,
  .station-top,
  .trip-top,
  .post-head {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .setting-row .chev,
  .station-top .pill,
  .trip-top .pill,
  .post-head .muted {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .modal {
    overflow-y: auto;
  }
}

@media (max-width: 430px) {
  .login-page {
    padding-inline: 10px;
  }

  .auth-card {
    padding-inline: 18px;
  }

  .sidebar {
    max-height: 42vh;
  }

  .brand {
    min-height: 76px;
  }

  .nav {
    gap: 7px;
  }

  .chart-card .chart {
    min-width: 470px;
  }

  .help {
    right: 10px;
    bottom: 10px;
  }
}
