:root {
  --bg: #f3f5f8;
  --ink: #17212b;
  --muted: #647284;
  --line: #dce3ea;
  --panel: #ffffff;
  --primary: #167d7f;
  --primary-dark: #0e5f61;
  --accent: #f0b441;
  --danger: #c64747;
  --shadow: 0 18px 46px rgba(31, 45, 61, .12);
}

html {
  background: transparent;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: #152735;
  color: #f8fbfd;
  padding: 28px 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 34px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #e7f6f5;
}

.brand-mark svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--primary);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.eyebrow {
  color: var(--muted);
  font-size: 13px;
}

.sidebar .brand span {
  color: #a9bac7;
  margin-top: 4px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #c8d6df;
  cursor: pointer;
  padding: 0 12px;
  text-align: left;
}

.nav-item svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, .1);
  color: #fff;
}

.workspace {
  padding: 30px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.topbar h1,
.store-title h1 {
  margin: 4px 0 0;
  font-size: 32px;
  line-height: 1.16;
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
}

.ghost-link,
.primary,
.secondary,
.danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 0 14px;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.ghost-link,
.secondary {
  border-color: var(--line);
  background: #fff;
}

.primary {
  background: var(--primary);
  color: #fff;
}

.primary:hover {
  background: var(--primary-dark);
}

.danger {
  background: transparent;
  color: var(--danger);
  padding: 0 8px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.metric,
.panel,
.store-status,
.app-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  padding: 20px;
}

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

.metric strong {
  display: block;
  margin-top: 10px;
  font-size: 30px;
}

.split {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  gap: 16px;
}

.wide-left {
  grid-template-columns: minmax(360px, 520px) minmax(0, 1fr);
}

.panel {
  overflow: hidden;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
  padding: 14px 18px;
}

.panel h2 {
  margin: 0;
  font-size: 18px;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.form {
  display: grid;
  gap: 14px;
  align-content: start;
  padding-bottom: 18px;
}

.form .panel-head {
  margin-bottom: 2px;
}

.upload-progress {
  display: grid;
  gap: 8px;
  margin: 2px 18px 0;
  border: 1px solid #b9d9d8;
  border-radius: 8px;
  background: #f1f9f8;
  padding: 12px;
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--primary-dark);
}

.upload-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #dcebea;
}

.upload-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width .18s ease;
}

.upload-progress small,
.data-note {
  color: var(--muted);
}

.upload-progress-inline {
  width: min(270px, 28vw);
  gap: 4px;
  margin: 0;
  padding: 7px 10px;
}

.upload-progress-inline .upload-progress-head {
  gap: 8px;
  font-size: 12px;
}

.upload-progress-inline .upload-progress-head span {
  color: var(--primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
}

.upload-progress-inline .upload-progress-track {
  height: 6px;
}

.upload-progress-inline small {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-note {
  margin: 0 0 16px;
  border-left: 3px solid var(--accent);
  background: #fff9ed;
  padding: 10px 13px;
  font-size: 13px;
  line-height: 1.55;
}

.downloads-split {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
}

label {
  display: grid;
  gap: 7px;
  padding: 0 18px;
  color: #344454;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  padding: 10px 11px;
  outline: none;
}

select[multiple] {
  min-height: 114px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(22, 125, 127, .12);
}

.grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
}

.grid-two label:first-child {
  padding-right: 8px;
}

.grid-two label:last-child {
  padding-left: 8px;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.code {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 6px;
  background: #e7f6f5;
  color: var(--primary-dark);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  padding: 2px 8px;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: #edf7ed;
  color: #347a37;
  padding: 2px 9px;
  font-size: 13px;
}

.status.muted {
  background: #f0f2f4;
  color: var(--muted);
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.flow {
  display: grid;
  gap: 16px;
  margin: 0;
  padding: 20px;
  list-style: none;
}

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

.flow span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f9ecd0;
  color: #856018;
  font-weight: 700;
}

.app-list {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.app-card {
  box-shadow: none;
  padding: 16px;
}

.app-card header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.app-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  border-radius: 8px;
  object-fit: contain;
  background: #eef2f6;
}

.app-icon.placeholder {
  display: block;
  border: 1px solid var(--line);
}

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.app-card h3 {
  margin: 0;
  font-size: 17px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}

.app-card p {
  color: #48586b;
  margin: 10px 0 0;
  line-height: 1.6;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(20px);
  max-width: min(520px, calc(100vw - 32px));
  border-radius: 8px;
  background: #17212b;
  color: #fff;
  opacity: 0;
  pointer-events: none;
  padding: 12px 16px;
  transition: .2s ease;
  z-index: 10;
}

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

.store-body {
  --store-bg: #0d1117;
  --store-panel: rgba(15, 23, 42, .58);
  --store-line: rgba(255, 255, 255, .18);
  --store-text: #f0f4ff;
  --store-muted: #c4cee5;
  --store-primary: #3b82f6;
  position: relative;
  min-height: 100vh;
  background: rgba(8, 13, 22, .10);
  color: var(--store-text);
}

.store-body::before {
  position: fixed;
  z-index: 0;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 13, 22, .22), rgba(8, 13, 22, .08));
  content: "";
  pointer-events: none;
}

.store-body [hidden] {
  display: none !important;
}

.store-body button:focus-visible,
.store-body input:focus-visible {
  outline: 3px solid rgba(91, 141, 239, .55);
  outline-offset: 2px;
}

.store-shell {
  position: relative;
  z-index: 1;
  width: min(1240px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 14px 0 24px;
}

.store-topbar,
.store-brand,
.store-contact,
.vehicle-strip,
.update-strip,
.store-tools,
.store-tools > div,
.store-app-card,
.store-app-heading {
  display: flex;
  align-items: center;
}

.store-topbar {
  min-height: 54px;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .88);
}

.store-brand {
  gap: 12px;
}

.store-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.store-brand h1 {
  margin: 0;
  color: var(--store-text);
  font-size: 18px;
  line-height: 1.25;
}

.store-brand p {
  margin: 3px 0 0;
  color: #c1cce5;
  font-size: 12px;
}

.store-contact {
  gap: 18px;
  color: #d3dcf0;
  font-size: 13px;
}

.activation-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 470px);
  align-items: center;
  gap: 24px;
  min-height: 104px;
  border: 1px solid var(--store-line);
  border-radius: 8px;
  background: var(--store-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 16px 36px rgba(0, 0, 0, .18);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 18px 22px;
}

.welcome-copy {
  display: grid;
  gap: 7px;
}

.welcome-copy strong {
  font-size: 18px;
}

.welcome-copy span {
  color: var(--store-muted);
  font-size: 13px;
  line-height: 1.55;
}

.code-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.code-search input {
  min-height: 46px;
  border-color: var(--store-line);
  border-radius: 8px;
  background: rgba(8, 13, 22, .62);
  color: #fff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 16px;
}

.code-search input::placeholder {
  color: #7f8aa8;
}

.store-body .primary,
.install-button {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
}

.store-body .primary:active,
.install-button:active,
.icon-button:active {
  transform: scale(.95);
}

.store-body button:disabled {
  cursor: wait;
  opacity: .58;
}

.vehicle-strip,
.update-strip {
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  border-bottom: 1px solid var(--store-line);
  color: var(--store-muted);
  padding: 10px 4px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .92);
}

.vehicle-strip > div,
.update-strip > div {
  display: grid;
  gap: 4px;
}

.vehicle-strip > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.vehicle-strip strong,
.update-strip strong {
  color: var(--store-text);
  font-size: 14px;
}

.vehicle-strip span,
.update-strip span {
  font-size: 12px;
}

.online-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #42d392;
  box-shadow: 0 0 12px rgba(66, 211, 146, .8);
}

.update-strip {
  border: 1px solid rgba(91, 141, 239, .35);
  border-radius: 8px;
  background: rgba(37, 99, 235, .12);
  margin-top: 12px;
  padding: 12px 14px;
}

.store-tools {
  justify-content: space-between;
  gap: 16px;
  min-height: 58px;
  padding: 8px 0;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .9);
}

.store-title-row {
  gap: 10px;
  white-space: nowrap;
}

.store-tools h2 {
  margin: 0;
  font-size: 16px;
}

.store-tools > div span {
  color: #c1cce5;
  font-size: 12px;
}

.category-tabs {
  display: flex;
  flex: 1;
  gap: 4px;
  overflow-x: auto;
}

.store-search {
  position: relative;
  width: 190px;
  flex: 0 0 190px;
}

.store-search span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.store-search input {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--store-line);
  border-radius: 8px;
  background: rgba(8, 13, 22, .54);
  color: var(--store-text);
  padding: 0 12px;
}

.store-search input::placeholder {
  color: #77829d;
}

.category-tabs button {
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--store-muted);
  padding: 0 13px;
  white-space: nowrap;
  cursor: pointer;
}

.category-tabs button.active,
.category-tabs button:hover {
  background: rgba(91, 141, 239, .18);
  color: #8fb3ff;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--store-line);
  border-radius: 8px;
  background: var(--store-panel);
  color: #b0c4e8;
  font-size: 22px;
  cursor: pointer;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.store-app-card {
  align-items: flex-start;
  gap: 14px;
  min-height: 158px;
  border: 1px solid var(--store-line);
  border-radius: 8px;
  background: var(--store-panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 14px 30px rgba(0, 0, 0, .24);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  padding: 16px;
}

.store-app-icon {
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
  object-fit: contain;
}

.store-app-content {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 7px;
}

.store-app-heading {
  justify-content: space-between;
  gap: 8px;
}

.store-app-heading h3 {
  min-width: 0;
  overflow: hidden;
  margin: 0;
  color: #fff;
  text-shadow: 0 2px 7px rgba(0, 0, 0, .9);
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-app-heading span {
  flex: 0 0 auto;
  border-radius: 5px;
  background: rgba(91, 141, 239, .17);
  color: #9bb9f4;
  padding: 3px 7px;
  font-size: 11px;
}

.store-app-meta {
  color: #c1cce5;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.store-app-content p {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  color: var(--store-muted);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.55;
  margin: 0;
  font-size: 12px;
}

.install-button {
  justify-self: end;
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

.store-body button.download-progress-button {
  min-width: 120px;
  background: linear-gradient(
    90deg,
    #2563eb 0,
    #2563eb var(--download-progress),
    rgba(37, 99, 235, .42) var(--download-progress),
    rgba(37, 99, 235, .42) 100%
  );
  opacity: 1;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 210px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 8px;
  border-top: 1px solid var(--store-line);
  border-bottom: 1px solid var(--store-line);
  background: rgba(255, 255, 255, .018);
  color: #8892b0;
  text-align: center;
}

.empty-state img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
  margin-bottom: 4px;
}

.empty-state strong {
  color: var(--store-text);
  font-size: 16px;
}

.empty-state span {
  color: #8892b0;
  font-size: 12px;
}

.store-body .toast {
  background: rgba(8, 13, 22, .94);
  border: 1px solid var(--store-line);
}

@media (max-width: 900px) {
  .shell,
  .split,
  .wide-left {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 18px;
  }

  .workspace {
    padding: 18px;
  }

  .metrics {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .upload-progress-inline {
    width: min(100%, 360px);
  }

  .activation-band {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .grid-two,
  .code-search {
    grid-template-columns: 1fr;
  }

  .grid-two label:first-child,
  .grid-two label:last-child {
    padding-left: 18px;
    padding-right: 18px;
  }

  .topbar h1 {
    font-size: 26px;
  }

  .store-contact {
    display: none;
  }

  .store-tools {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .store-search {
    width: calc(100% - 54px);
    flex-basis: calc(100% - 54px);
  }

  .category-tabs {
    order: 3;
    flex-basis: 100%;
  }
}
