.center-page {
  background: #ffffff;
}

.center-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  min-height: 48px;
}

.center-header h1 {
  margin: 0;
  text-align: center;
  font-size: 22px;
}

.center-hero {
  margin: 24px 0 18px;
  padding: 18px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(31, 122, 22, 0.12), transparent 52%),
    #f6f6f6;
}

.center-hero h2 {
  margin: 0 0 8px;
  font-size: 24px;
}

.center-hero p {
  margin: 0;
  color: #777777;
  font-size: 13px;
  line-height: 1.6;
}

.center-filter-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 16px;
  padding: 2px 0;
}

.center-filter-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  border: 0;
  border-radius: 17px;
  background: #f2f2f2;
  color: #666666;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 800;
  transition: background-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.center-filter-tabs button.active {
  background: #111111;
  color: #ffffff;
}

.center-list {
  display: grid;
  gap: 10px;
}

.center-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, auto);
  align-items: center;
  gap: 14px;
  padding: 14px;
  border-radius: 16px;
  background: #f7f7f7;
}

.center-card > div {
  min-width: 0;
}

.center-card > div:last-child {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.center-card strong {
  display: block;
  font-size: 15px;
}

.center-card span,
.center-card small {
  display: block;
  margin-top: 4px;
  color: #777777;
  font-size: 12px;
}

.center-card b {
  display: grid;
  justify-items: end;
  gap: 1px;
  max-width: 132px;
  text-align: right;
  font-size: 14px;
  line-height: 1.15;
}

.center-card b span {
  max-width: 132px;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.center-card b small {
  margin-top: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 900;
}

.center-card em {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  min-height: 26px;
  margin-top: 0;
  padding: 0 8px;
  border-radius: 999px;
  background: #e8f7ee;
  color: #239055;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.center-card em.pending {
  background: #fff5df;
  color: #b07a15;
}

.center-card em.process {
  background: #e7f0ff;
  color: #3167d6;
}

.center-card em.danger {
  background: #fff0f3;
  color: #e24961;
}

/* 2026 UI refresh */
.center-page {
  background: transparent;
}

.center-hero,
.center-card {
  border: 1px solid var(--line);
  background: #ffffff;
  box-shadow: var(--shadow-soft);
}

.center-hero {
  border-radius: 24px;
  background:
    radial-gradient(circle at 88% 14%, rgba(37, 99, 235, 0.18), transparent 28%),
    linear-gradient(135deg, rgba(15, 143, 111, 0.11), rgba(245, 158, 11, 0.08)),
    #ffffff;
}

.center-hero p,
.center-card span,
.center-card small {
  color: var(--muted);
}

.center-filter-tabs button {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #ffffff;
  color: var(--muted);
}

.center-filter-tabs button.active {
  border-color: #0f172a;
  background: #0f172a;
}

.center-card {
  border-radius: 18px;
}

/* Tech blue refinement */
.center-hero {
  background:
    radial-gradient(circle at 88% 14%, rgba(84, 184, 255, 0.24), transparent 28%),
    linear-gradient(135deg, rgba(36, 124, 255, 0.1), rgba(172, 221, 255, 0.18)),
    #ffffff;
}

.center-filter-tabs button.active {
  border-color: #1b65d8;
  background: #1b65d8;
}

/* Oh bits order center and ledger */
.center-page {
  padding-bottom: calc(122px + env(safe-area-inset-bottom));
}

.center-header {
  min-height: 58px;
}

.center-header h1 {
  color: var(--text);
  font-size: 24px;
}

.center-filter-tabs {
  display: flex;
  gap: 8px;
  margin: 20px 0 18px;
  padding: 8px;
  border: 1px solid #303741;
  border-radius: 22px;
  background: linear-gradient(180deg, #101720 0%, #0b1017 100%);
  overflow-x: auto;
  scrollbar-width: none;
}

.center-filter-tabs::-webkit-scrollbar {
  display: none;
}

body[data-center-page="ledger"] .center-filter-tabs {
  padding: 0;
  border: 0;
  background: transparent;
}

.center-filter-tabs button {
  flex: 0 0 auto;
  min-width: 66px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.center-filter-tabs button.active,
body[data-center-page="ledger"] .center-filter-tabs button.active {
  border-color: var(--brand);
  background: linear-gradient(180deg, #ffbe1a 0%, #f7a707 100%);
  color: #080b10;
  box-shadow: none;
}

body[data-center-page="orders"] .center-filter-tabs button.active {
  background: transparent;
  color: var(--brand);
}

.center-list {
  gap: 12px;
}

.center-card {
  border-color: #303741;
  background: linear-gradient(180deg, #101720 0%, #0b1017 100%);
  box-shadow: var(--shadow-soft);
}

.order-card {
  display: block;
  padding: 16px 14px;
  overflow: hidden;
  border-radius: 16px;
}

.order-card-top {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.order-card-title {
  min-width: 0;
}

.center-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #ffffff;
}

.center-icon.teal,
.center-icon.green {
  background: linear-gradient(135deg, #35d875, #158c52);
}

.center-icon.orange {
  background: linear-gradient(135deg, #ffbe1a, #f7a707);
}

.center-icon.blue {
  background: linear-gradient(135deg, #7585ff, #4e5cf3);
}

.order-card strong,
.ledger-card strong {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 17px;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-id-label,
.order-card small,
.order-card-primary span,
.order-card-meta span,
.ledger-card span,
.ledger-card small {
  color: var(--muted);
}

.order-id-label {
  display: block;
  margin-top: 7px;
  font-size: 12px;
  font-weight: 700;
}

.order-card code {
  display: inline-block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  margin-top: 3px;
  color: var(--text);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-line {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
}

.copy-line button,
.order-card-meta b button {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin-left: 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
}

.copy-line button.copied,
.order-card-meta b button.copied {
  color: var(--brand);
  background: rgba(247, 167, 7, 0.12);
}

.order-card .order-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 126px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid rgba(34, 199, 97, 0.35);
  border-radius: 8px;
  background: rgba(34, 199, 97, 0.1);
  color: var(--green-2);
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.order-card .order-status.pending {
  border-color: rgba(247, 167, 7, 0.35);
  background: rgba(247, 167, 7, 0.1);
  color: var(--brand);
}

.order-card .order-status.danger {
  border-color: rgba(255, 77, 87, 0.38);
  background: rgba(255, 77, 87, 0.1);
  color: var(--red);
}

.order-card .order-status svg {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
}

.order-chevron {
  display: none;
  color: var(--muted);
}

.order-card-primary,
.order-card-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  justify-items: stretch;
}

.order-card-primary {
  margin-top: 16px;
  padding: 14px 0;
  border-top: 1px solid #252b33;
  border-bottom: 1px solid #252b33;
  justify-items: stretch;
}

.order-card-meta {
  padding-top: 13px;
}

.order-card-primary div,
.order-card-meta div {
  display: grid;
  min-width: 0;
  gap: 5px;
}

.order-card-primary b,
.order-card-meta b {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: none;
  overflow: hidden;
  color: var(--text);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-card-primary div:nth-child(2),
.order-card-primary div:nth-child(2) b,
.order-card-meta div:nth-child(2),
.order-card-meta div:nth-child(2) b {
  text-align: right;
  justify-content: end;
}

.center-empty-card {
  display: grid;
  place-items: center;
  min-height: 132px;
  padding: 28px 18px;
  border-style: dashed;
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background:
    radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--brand) 9%, transparent), transparent 38%),
    linear-gradient(180deg, var(--card), var(--card-soft));
  text-align: center;
}

.center-empty-card strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 900;
}

.center-empty-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.ledger-summary-card {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0 20px;
  padding: 22px 8px;
  border: 1px solid rgba(247, 167, 7, 0.34);
  border-radius: 18px;
  background: linear-gradient(180deg, #101720 0%, #0b1017 100%);
}

.ledger-summary-card article {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-width: 0;
  padding: 0 6px;
  border-right: 1px solid #3a414b;
}

.ledger-summary-card article:last-child {
  border-right: 0;
}

.ledger-summary-card span,
.ledger-summary-card small {
  color: var(--muted);
}

.ledger-summary-card strong {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: clamp(17px, 5.1vw, 22px);
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ledger-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto);
  gap: 14px;
  align-items: start;
  min-height: auto;
  padding: 15px 16px;
  border-radius: 14px;
}

.ledger-card .ledger-main {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.ledger-card small {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.25;
}

.ledger-values {
  display: grid;
  justify-items: end;
  gap: 6px;
  min-width: 0;
  text-align: right;
}

.ledger-card b,
.ledger-card em {
  display: block;
  max-width: none;
  font-style: normal;
  overflow-wrap: anywhere;
  font-weight: 800;
  text-align: right;
}

.ledger-card b {
  font-size: 15px;
  line-height: 1.18;
}

.ledger-card em {
  font-size: 13px;
  line-height: 1.2;
  opacity: 0.96;
}

.ledger-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 380px) {
  .ledger-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .ledger-values,
  .ledger-card b,
  .ledger-card em {
    justify-items: start;
    text-align: left;
  }

  .order-card-top {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .order-card .order-status {
    grid-column: 2;
    justify-self: start;
    max-width: 100%;
    margin-top: 8px;
  }

  .order-card-primary,
  .order-card-meta {
    grid-template-columns: 1fr;
  }

  .order-card-primary div:nth-child(2),
  .order-card-primary div:nth-child(2) b,
  .order-card-meta div:nth-child(2),
  .order-card-meta div:nth-child(2) b {
    text-align: left;
    justify-content: start;
  }
}

/* Text-first order cards: no asset icon, cleaner record hierarchy. */
body[data-center-page="orders"] .order-card {
  padding: 15px 16px;
}

body[data-center-page="orders"] .order-card-top {
  grid-template-columns: minmax(0, 1fr) auto 18px;
  gap: 10px;
  align-items: center;
}

body[data-center-page="orders"] .order-card-title {
  display: grid;
  gap: 5px;
}

body[data-center-page="orders"] .order-card-title strong {
  font-size: 18px;
  white-space: normal;
}

body[data-center-page="orders"] .order-id-label {
  margin-top: 0;
}

body[data-center-page="orders"] .copy-line code {
  margin-top: 0;
  max-width: 190px;
}

body[data-center-page="orders"] .order-card .order-status {
  max-width: 140px;
  min-height: 32px;
  padding-inline: 9px;
  font-size: 13px;
}

body[data-center-page="orders"] .order-chevron {
  display: block;
  width: 18px;
  height: 18px;
}

body[data-center-page="orders"] .order-card-primary,
body[data-center-page="orders"] .order-card-meta {
  gap: 10px 16px;
}

body[data-center-page="orders"] .order-card-primary {
  margin-top: 14px;
  padding: 12px 0;
}

body[data-center-page="orders"] .order-card-primary b,
body[data-center-page="orders"] .order-card-meta b {
  font-size: 14px;
}

body[data-center-page="orders"] .center-empty-card {
  min-height: 140px;
  justify-items: center;
  text-align: center;
}

@media (max-width: 380px) {
  body[data-center-page="orders"] .order-card-top {
    grid-template-columns: minmax(0, 1fr);
  }

  body[data-center-page="orders"] .order-card .order-status {
    justify-self: start;
    max-width: 100%;
  }

  body[data-center-page="orders"] .order-chevron {
    display: none;
  }
}

/* Final record hierarchy pass */
.center-filter-tabs.ui-scroll-tabs {
  margin: 18px 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, var(--card), var(--card-soft));
}

body[data-center-page="ledger"] .center-filter-tabs.ui-scroll-tabs {
  padding: 8px;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--card), var(--card-soft));
}

.center-filter-tabs.ui-scroll-tabs button {
  min-width: auto;
  min-height: 40px;
  padding: 0 15px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
}

.center-filter-tabs.ui-scroll-tabs button.active,
body[data-center-page="orders"] .center-filter-tabs.ui-scroll-tabs button.active,
body[data-center-page="ledger"] .center-filter-tabs.ui-scroll-tabs button.active {
  border-color: color-mix(in srgb, var(--brand) 38%, var(--line));
  background: color-mix(in srgb, var(--brand) 14%, transparent);
  color: var(--brand);
}

.ledger-summary-card {
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 0;
  padding: 18px 10px;
}

.ledger-summary-card article:nth-child(3) {
  order: -1;
  justify-items: start;
  padding-left: 8px;
}

.ledger-summary-card article:nth-child(3) strong {
  font-size: clamp(22px, 6.8vw, 30px);
}

.ledger-summary-card strong {
  max-width: none;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.order-card {
  position: relative;
}

body[data-center-page="orders"] .order-card-top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

body[data-center-page="orders"] .order-chevron {
  display: none;
}

.order-card .order-status {
  max-width: 160px;
  white-space: nowrap;
}

.order-card-primary b,
.order-card-meta b,
.ledger-card b,
.ledger-card em {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ledger-usd-pill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid color-mix(in srgb, var(--green-2) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--green-2) 10%, transparent);
}

.ledger-usd-pill.red {
  border-color: color-mix(in srgb, var(--red) 38%, var(--line));
  background: color-mix(in srgb, var(--red) 9%, transparent);
}
