:root {
  --bg: #f6f7fb;
  --panel: #fff;
  --ink: #1b2339;
  --muted: #7b8297;
  --line: #e8eaf2;
  --accent: #7155e8;
  --purple: #f1edff;
  --green: #14866d;
  --nav: #171d32;
  --shadow: 0 5px 24px #1b233905
}

* {
  box-sizing: border-box
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  line-height: 1.55
}

button,
input,
select {
  font: inherit
}

button,
a,
input,
select {
  outline-offset: 4px
}

button,
a {
  touch-action: manipulation
}

button {
  cursor: pointer
}

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

h1,
h2,
h3,
p {
  margin: 0
}

h1 {
  font-size: 32px;
  letter-spacing: -1.15px;
  line-height: 1.25;
  font-weight: 650
}

h2 {
  font-size: 17px;
  letter-spacing: -.3px
}

h3 {
  font-size: 19px
}

p {
  color: var(--muted)
}

small {
  display: block;
  color: var(--muted);
  font-size: 11px
}

.hidden {
  display: none !important
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 20px;
  font-weight: 750;
  letter-spacing: -.6px
}

.brand small {
  font-size: 9px;
  letter-spacing: 1.6px;
  margin-top: 3px;
  font-weight: 500
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 39px;
  height: 41px;
  background: var(--accent);
  color: white;
  border-radius: 13px 13px 13px 3px;
  font-weight: 900;
  font-size: 29px;
  font-style: italic
}

.sidebar {
  width: 240px;
  position: fixed;
  inset: 0 auto 0 0;
  background: var(--nav);
  color: #edf0ff;
  padding: 32px 22px;
  display: flex;
  flex-direction: column
}

.sidebar .brand {
  padding-left: 6px
}

.sidebar small {
  color: #959bb6
}

.nav-caption {
  font-size: 9px;
  letter-spacing: 1.6px;
  color: #737d9b;
  margin: 48px 12px 15px
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 12px 15px;
  border: 0;
  background: transparent;
  color: #a7afc9;
  border-radius: 9px;
  text-align: left;
  margin-bottom: 6px
}

.nav-item span {
  font-size: 21px;
  line-height: 1
}

.nav-item:hover,
.nav-item.active {
  background: #2a294b;
  color: #ded7ff
}

.sidebar-bottom {
  margin-top: auto
}

.sidebar-bottom p {
  font-size: 12px;
  margin: 12px 8px 22px;
  color: #8c94af
}

.sandbox-label {
  font-size: 12px;
  color: #b0b8cc;
  margin-left: 8px
}

.sandbox-label i,
.pill i,
.store-banner i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #73c8ab;
  margin-right: 6px
}

.identity {
  border-top: 1px solid #ffffff14;
  padding-top: 24px;
  margin-top: 23px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px
}

.identity form {
  margin-left: auto
}

.avatar {
  width: 35px;
  height: 35px;
  background: var(--purple);
  color: var(--accent);
  display: grid;
  place-items: center;
  border-radius: 11px;
  font-weight: 650;
  font-size: 12px;
  flex-shrink: 0
}

.workspace {
  margin-left: 240px;
  padding: 0 42px;
  max-width: 1900px
}

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted)
}

.topbar span {
  margin: 0 14px;
  color: #c3c8d6
}

.pill,
.tag {
  display: inline-block;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 10px;
  letter-spacing: .2px;
  background: #fff;
  color: var(--muted)
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 35px 0 26px;
  gap: 20px
}

.eyebrow {
  font-size: 10px;
  color: var(--accent);
  letter-spacing: 1.7px;
  font-weight: 700;
  margin-bottom: 10px
}

.page-heading p {
  margin-top: 10px
}

.button {
  border: 1px solid var(--accent);
  border-radius: 8px;
  color: white;
  background: var(--accent);
  padding: 10px 17px;
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap
}

.button:hover {
  filter: brightness(.94)
}

.button:disabled {
  opacity: .5;
  cursor: wait
}

.button.secondary {
  background: white;
  border-color: var(--line);
  color: var(--ink)
}

.button.danger {
  color: #b54860;
  background: #fff2f5;
  border-color: #f4d5de
}

.icon-button {
  background: none;
  border: 0;
  color: inherit;
  font-size: 23px
}

.notice {
  display: flex;
  gap: 12px;
  padding: 15px 19px;
  background: #f0edfc;
  border: 1px solid #e4ddf9;
  border-radius: 9px;
  color: #75678f;
  font-size: 12px;
  margin-bottom: 24px
}

.notice strong {
  color: #584877;
  font-weight: 600
}

.notice>span {
  font-size: 19px
}

.filters {
  display: flex;
  gap: 10px;
  align-items: end;
  flex-wrap: wrap;
  margin: 24px 0
}

.filters label {
  flex: 1;
  min-width: 120px
}

.filters input,
.filters select {
  padding: 9px 10px;
  font-size: 11px;
  width: 100%
}

label {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500
}

input,
select {
  display: block;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 11px 12px;
  background: white;
  color: var(--ink);
  width: 100%;
  margin-top: 7px;
  min-width: 0
}

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

.metric {
  padding: 22px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow)
}

.metric.accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent)
}

.metric-label {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 10px
}

.metric strong {
  font-size: 28px;
  display: block;
  margin: 13px 0 4px;
  font-weight: 650;
  letter-spacing: -1px
}

.metric small {
  font-size: 10px
}

.metric.accent small,
.metric.accent .metric-label {
  color: #dfd7ff
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-bottom: 22px
}

.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 23px;
  box-shadow: var(--shadow)
}

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

.panel-heading p {
  font-size: 11px;
  margin-top: 5px
}

.calculation-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f2f7;
  font-size: 12px
}

.calculation-row:last-child {
  border: 0
}

.calculation-row span {
  color: var(--muted)
}

.info-box {
  padding: 13px 15px;
  background: #f7f8fc;
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
  margin-top: 16px;
  line-height: 1.6
}

.status-dot {
  height: 7px;
  width: 7px;
  background: #54b49b;
  border-radius: 50%
}

.status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0
}

.status-line .avatar {
  background: #edf8f4;
  color: var(--green)
}

.status-line p {
  font-size: 11px
}

.status-line strong {
  font-size: 13px
}

.status-line>b {
  margin-left: auto;
  font-size: 19px
}

.orders-panel {
  padding-bottom: 8px
}

.table-scroll {
  overflow-x: auto
}

table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 12px
}

th {
  font-weight: 500;
  color: #959caf;
  font-size: 10px;
  white-space: nowrap;
  padding: 13px 12px;
  background: #fafbfe;
  border-block: 1px solid var(--line)
}

td {
  padding: 17px 12px;
  border-bottom: 1px solid #f0f1f7;
  vertical-align: middle
}

tr:last-child td {
  border-bottom: 0
}

td small {
  font-size: 10px;
  margin-top: 5px
}

.badge {
  font-size: 10px;
  padding: 5px 8px;
  background: #edf8f4;
  color: #3b957d;
  border-radius: 5px;
  display: inline-block;
  white-space: nowrap
}

.badge.warn {
  background: #fff4e5;
  color: #b58439
}

.badge.error {
  background: #fff0f4;
  color: #bd526e
}

.text-link {
  color: var(--accent);
  font-size: 12px;
  font-weight: 600;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer
}

.empty {
  text-align: center;
  color: var(--muted);
  padding: 45px 20px
}

.reseller-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px
}

.reseller-card h3 {
  margin: 16px 0 5px
}

.reseller-card .avatar {
  height: 48px;
  width: 48px;
  font-size: 18px
}

.reseller-card .card-bottom {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  padding-top: 17px;
  margin-top: 22px;
  color: var(--muted);
  font-size: 12px
}

.search-form {
  display: flex;
  gap: 15px;
  align-items: end
}

.search-form label:first-child {
  flex: 1
}

.search-result {
  padding: 18px 0;
  border-bottom: 1px solid var(--line)
}

.search-result h3 {
  font-size: 14px;
  margin-bottom: 6px
}

.search-result p {
  font-size: 12px
}

.search-result .text-link {
  margin-top: 9px
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  word-break: break-all
}

.audit-item {
  border-bottom: 1px solid var(--line);
  padding: 15px 0;
  font-size: 12px
}

.audit-item small {
  margin-top: 5px
}

footer {
  padding: 30px 0;
  font-size: 10px;
  color: #979eb0;
  display: flex;
  justify-content: space-between;
  gap: 16px
}

dialog {
  width: min(880px, 95vw);
  max-height: 90vh;
  border: 1px solid var(--line);
  border-radius: 17px;
  padding: 27px;
  box-shadow: 0 30px 120px #15172b40;
  color: var(--ink)
}

dialog::backdrop {
  background: #151a3859;
  backdrop-filter: blur(3px)
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between
}

.dialog-head .eyebrow {
  margin: 0
}

.detail-title {
  margin: 17px 0 22px
}

.detail-title p {
  font-size: 12px;
  margin-top: 8px
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px
}

.detail-field {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  overflow-wrap: anywhere
}

.detail-field small {
  margin-bottom: 5px
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 20px
}

.step {
  padding: 12px;
  background: #f7f8fc;
  border-radius: 7px;
  font-size: 12px
}

.step small {
  margin-bottom: 8px
}

.timeline {
  border-left: 2px solid #e8e2fc;
  padding-left: 20px;
  margin: 20px 0
}

.timeline>div {
  padding: 8px 0;
  font-size: 12px
}

.timeline small {
  margin-top: 4px
}

.detail-section {
  margin-top: 24px
}

.detail-section h2 {
  margin-bottom: 12px
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 20px 0
}

.login-shell {
  max-width: 470px;
  margin: 9vh auto;
  padding: 20px
}

.login-shell>.brand {
  margin-bottom: 30px
}

.login-shell .panel {
  padding: 30px;
  margin-bottom: 24px
}

.login-shell h1 {
  font-size: 27px
}

.login-shell p {
  margin: 14px 0 22px;
  font-size: 13px
}

.login-shell label {
  margin-bottom: 16px
}

.login-shell .button {
  width: 100%;
  margin-top: 8px
}

.store-shell {
  max-width: 940px;
  margin: auto;
  padding: 0 28px
}

.store-header {
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: space-between
}

.store-banner {
  background: #eaf5ef;
  color: #4d8571;
  border: 1px solid #daede2;
  border-radius: 7px;
  padding: 10px 15px;
  font-size: 11px
}

.store-hero {
  padding: 50px 0 30px
}

.store-hero h1 {
  font-size: 46px;
  letter-spacing: -2px;
  line-height: 1.15;
  margin-bottom: 20px
}

.store-hero h1 span {
  color: var(--accent)
}

.store-hero p {
  max-width: 500px;
  font-size: 14px
}

.store-context {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 26px
}

.store-context small {
  font-size: 9px;
  letter-spacing: 1px
}

.store-context strong {
  font-size: 12px
}

.store-tabs {
  display: flex;
  gap: 25px;
  border-bottom: 1px solid var(--line);
  margin: 5px 0 25px
}

.store-tabs button {
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  padding: 14px 0;
  font-size: 13px
}

.store-tabs button.active {
  color: var(--accent);
  border-color: var(--accent)
}

.product-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px
}

.product {
  position: relative;
  overflow: hidden;
  padding: 27px
}

.product-icon {
  width: 55px;
  height: 55px;
  display: grid;
  place-items: center;
  background: var(--purple);
  color: var(--accent);
  border-radius: 15px;
  font-size: 28px;
  margin-bottom: 24px
}

.product:nth-child(2) .product-icon {
  background: #e9f6f2;
  color: #299e83
}

.product p {
  font-size: 12px;
  margin-top: 6px
}

.product ul {
  list-style: none;
  padding: 0;
  color: var(--muted);
  font-size: 12px;
  margin: 20px 0 28px
}

.product li {
  margin: 9px 0
}

.product li:before {
  content: '✓';
  color: #35a083;
  margin-right: 8px
}

.product-price {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -1px;
  margin-bottom: 20px
}

.product-price small {
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0
}

.product .button {
  width: 100%
}

.store-note {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  padding: 24px 30px
}

.demo-context {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  align-items: center
}

.demo-context p {
  font-size: 11px
}

.demo-context label {
  min-width: 210px
}

#toast {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--ink);
  color: white;
  max-width: 400px;
  padding: 15px 22px;
  border-radius: 10px;
  box-shadow: 0 10px 30px #0002;
  z-index: 1000;
  font-size: 13px
}

.error {
  color: #b44b64
}

.skeleton {
  height: 100px;
  background: #eff0f7;
  border-radius: 8px
}

@media(min-width:1500px) {
  .workspace {
    padding: 0 60px
  }

  .metrics {
    gap: 22px
  }

  .metric strong {
    font-size: 34px
  }
}

@media(max-width:1150px) {
  .sidebar {
    width: 205px;
    padding: 25px 14px
  }

  .workspace {
    margin-left: 205px;
    padding: 0 25px
  }

  .metrics {
    grid-template-columns: repeat(2, 1fr)
  }

  .two-columns {
    grid-template-columns: 1fr
  }

  .search-form {
    flex-wrap: wrap
  }

  .search-form label {
    min-width: 180px
  }
}

@media(max-width:700px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px
  }

  .sidebar .brand {
    font-size: 18px
  }

  .nav-caption,
  .sidebar-bottom {
    display: none
  }

  .sidebar nav {
    display: flex;
    gap: 4px;
    margin-top: 17px;
    overflow-x: auto
  }

  .nav-item {
    width: auto;
    white-space: nowrap;
    padding: 9px;
    font-size: 11px;
    margin: 0
  }

  .nav-item span {
    font-size: 16px
  }

  .workspace {
    margin: 0;
    padding: 0 17px
  }

  .topbar {
    height: 55px
  }

  .page-heading {
    margin: 26px 0 20px
  }

  .page-heading h1 {
    font-size: 26px
  }

  .page-heading p {
    font-size: 12px
  }

  .page-heading .button {
    padding: 8px 10px
  }

  .filters {
    gap: 8px
  }

  .filters label {
    min-width: 100px
  }

  .metric {
    padding: 16px
  }

  .metric strong {
    font-size: 25px
  }

  .metrics {
    gap: 10px
  }

  .metric-label {
    font-size: 10px
  }

  .panel {
    padding: 18px
  }

  .reseller-grid,
  .product-grid {
    grid-template-columns: 1fr
  }

  .detail-grid {
    grid-template-columns: 1fr
  }

  .steps {
    grid-template-columns: 1fr 1fr
  }

  footer {
    flex-direction: column;
    gap: 5px
  }

  .store-shell {
    padding: 0 20px
  }

  .store-header {
    height: 84px
  }

  .store-header .text-link {
    font-size: 10px
  }

  .store-hero {
    padding-top: 35px
  }

  .store-hero h1 {
    font-size: 36px
  }

  .store-tabs {
    gap: 22px
  }

  .demo-context {
    flex-direction: column;
    align-items: stretch
  }

  .search-form {
    display: block
  }

  .search-form label {
    margin-bottom: 12px
  }

  .search-form button {
    width: 100%
  }

  dialog {
    padding: 18px
  }

  .login-shell {
    margin: 3vh auto
  }

  .product {
    padding: 25px
  }
}
