/* v4: quieter surfaces, stronger hierarchy and precise operational states. */
:root {
  --ink: #20273a;
  --muted: #667087;
  --line: #e3e7f0;
  --radius: 14px;
}
body {
  font-size: 14px;
  background: #f4f6fa;
  color: var(--ink);
  letter-spacing: 0.01em;
}
#content {
  max-width: 1520px;
  margin: auto;
  padding: 30px 34px 50px;
}
main > header {
  border-bottom: 1px solid #e6e9f0;
  box-shadow: none;
}
p,
td small,
.muted {
  color: var(--muted);
}
.page-head {
  margin-bottom: 25px;
}
.page-head h1 {
  font-size: 27px;
  letter-spacing: -0.65px;
  font-weight: 680;
}
.page-head p {
  font-size: 14px;
  line-height: 1.75;
  margin-top: 6px;
}
.eyebrow,
.micro-label {
  font-size: 10px !important;
  letter-spacing: 1.65px;
}
.tiny-label,
.metric small,
.product small,
.field small {
  font-size: 12px !important;
}
.mode-tag {
  font-size: 12px;
}
.button {
  border-radius: 9px;
  min-height: 38px;
  font-size: 13px;
  padding: 8px 15px;
  font-weight: 560;
}
.button.small {
  min-height: 31px;
  padding: 6px 11px;
  font-size: 12px;
}
.button.primary {
  background: #6057d9;
  border-color: #6057d9;
  box-shadow: 0 3px 7px #6359dc16;
}
.button:hover {
  transform: none;
  filter: brightness(0.98);
}
.button:focus-visible,
a:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b4abfa;
  outline-offset: 3px;
}
.actions {
  gap: 9px;
}
.panel,
.product,
.stat-strip {
  border: 1px solid var(--line);
  box-shadow: 0 2px 3px #20273a03;
  border-radius: var(--radius);
}
.panel-title {
  padding-bottom: 18px;
}
.panel-title h2 {
  font-size: 16px;
}
.panel p {
  line-height: 1.85;
}
.stat-strip {
  margin-bottom: 25px;
}
.metric strong {
  font-size: 27px;
  letter-spacing: -0.65px;
  font-variant-numeric: tabular-nums;
}
.metric-label {
  font-size: 13px;
}
.metric small {
  margin-top: 7px;
  line-height: 1.5;
}
.badge {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 560;
}
.nav-section {
  padding: 5px 0;
  border-bottom: 1px solid #f0f1f5;
}
.nav-section summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  padding: 12px 14px 8px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.5px;
  color: #7a8193;
  cursor: pointer;
}
.nav-section summary::-webkit-details-marker {
  display: none;
}
.nav-section summary span {
  transition: transform 0.15s;
}
.nav-section:not([open]) summary span {
  transform: rotate(-90deg);
}
#navigation a {
  font-size: 13px;
  margin: 3px 3px;
  padding: 10px 13px;
  border-radius: 8px;
  gap: 12px;
}
.nav-section a.active {
  background: #efedfd !important;
  color: #5a50cf !important;
  box-shadow: none !important;
}
.nav-section a.active:before {
  display: none;
}
.workspace {
  margin-bottom: 10px;
}
.side-footer {
  font-size: 11px;
}
.balance-surface {
  min-height: 250px;
  border-radius: 16px;
  background: linear-gradient(116deg, #272342, #34335a);
  box-shadow: 0 8px 18px #2420340c;
}
.balance-copy {
  padding: 28px 30px;
}
.balance-number {
  font-size: 40px;
}
.physical-card {
  transform: rotate(-7deg) scale(0.91);
  opacity: 0.94;
}
.member-spotlight {
  border-radius: 16px;
}
.overview-top {
  gap: 20px;
  margin-bottom: 22px;
}
.overview-middle {
  gap: 20px;
}
.table-wrap {
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
  overflow: auto;
  background: white;
}
table {
  font-size: 13px;
}
th {
  background: #f8f9fc;
  color: #6c758b;
  font-size: 12px;
  font-weight: 600;
  padding: 14px 18px;
  white-space: nowrap;
}
td {
  padding: 16px 18px;
  border-bottom: 1px solid #edf0f5;
  line-height: 1.5;
  color: #30394c;
  max-width: 340px;
  overflow-wrap: anywhere;
}
td small {
  display: block;
  font-size: 12px !important;
  margin-top: 5px;
  line-height: 1.5;
}
tbody tr:last-child td {
  border-bottom: 0;
}
tbody tr:hover {
  background: #fbfbff;
}
table .actions {
  flex-wrap: nowrap;
}
.table-footer {
  font-size: 12px;
  padding: 14px 3px;
  color: #6b7588;
}
.filters {
  padding: 0;
  margin: 20px 0 12px;
  gap: 9px;
  flex-wrap: wrap;
}
.filters input,
.filters select {
  border: 1px solid #dce1eb;
  border-radius: 8px;
  background: #fff;
  min-height: 39px;
  font-size: 13px;
  padding: 9px 12px;
}
.filters .grow {
  min-width: 210px;
}
.filters input[type="date"] {
  max-width: 155px;
}
.record-ref {
  font-family: ui-monospace, SFMono-Regular, monospace;
  color: #596680;
  font-size: 12px;
  white-space: nowrap;
}
.amount {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}
.card-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 160px;
}
.card-cell > .glyph {
  background: #efedfb;
  color: #675bd7;
  padding: 9px;
  width: 38px;
  height: 32px;
  border-radius: 7px;
}
.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}
.table-actions > span {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.table-actions + .filters {
  margin-top: 14px;
}
input[type="checkbox"] {
  accent-color: #6258d7;
  width: 16px;
  height: 16px;
  vertical-align: middle;
}
.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 25px;
  padding: 19px 22px;
  background: #eceefa;
  border: 1px solid #e0e3f2;
  border-radius: 12px;
  margin: 0 0 23px;
}
.section-intro > div {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 600;
  white-space: nowrap;
}
.section-intro p {
  font-size: 13px;
  line-height: 1.75;
  margin: 0;
  color: #636e86;
  max-width: 530px;
}
.product-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}
.product-refined {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-visual {
  height: 145px;
  flex-shrink: 0;
  background: linear-gradient(112deg, #343551, #4b4c70);
  color: white;
  padding: 22px 26px;
  position: relative;
  overflow: hidden;
}
.product-visual:after {
  content: "";
  position: absolute;
  border: 1px solid #ffffff17;
  border-radius: 50%;
  width: 240px;
  height: 240px;
  right: -45px;
  top: 15px;
  pointer-events: none;
  box-shadow:
    0 0 0 25px #ffffff05,
    0 0 0 50px #ffffff03;
}
.product-visual > div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  letter-spacing: 1.5px;
}
.product-visual b {
  font-size: 15px;
}
.product-visual b span {
  font-weight: 350;
  margin-left: 3px;
  opacity: 0.6;
}
.product-visual > strong {
  display: block;
  margin-top: 23px;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 2px;
}
.product-visual > small {
  display: block;
  margin-top: 7px;
  opacity: 0.7;
  font-size: 11px;
}
.tone-1 {
  background: linear-gradient(112deg, #535e60, #788987);
}
.tone-2 {
  background: linear-gradient(112deg, #65545f, #92777f);
}
.product-body {
  padding: 23px 25px;
}
.product-body .top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.product-body h2 {
  font-size: 18px;
  margin: 0;
  letter-spacing: -0.3px;
}
.product-description {
  font-size: 13px;
  line-height: 1.8;
  min-height: 46px;
  margin: 15px 0 20px;
  color: #748096;
  white-space: pre-wrap;
}
.product-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  padding: 16px 0;
  margin-bottom: 20px;
}
.product-facts span {
  display: block;
  font-size: 12px;
  color: #758096;
  margin-bottom: 7px;
}
.product-facts strong {
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.7px;
}
.product-facts small {
  font-size: 12px;
  font-weight: 400;
  color: #8b92a0;
}
.detail-grid,
.fee-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  margin-bottom: 20px;
}
.detail-row {
  padding: 13px 0;
  border-bottom: 1px solid #e9edf3;
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
}
.detail-row > span {
  color: #6c788d;
}
.detail-row strong {
  font-weight: 600;
  color: #2e384c;
  text-align: right;
  overflow-wrap: anywhere;
  max-width: 68%;
}
.detail-row small {
  display: block;
  font-size: 12px;
  margin-top: 4px;
}
.detail-row:last-child {
  border-bottom: 0;
}
.fee-grid .detail-row:last-child {
  border-bottom: 1px solid #e9edf3;
}
.policy-band {
  padding: 24px 26px;
  border: 1px solid #dfe3f2;
  border-radius: 14px;
  background: #f0f2fa;
  margin: 10px 0 25px;
}
.policy-band h2 {
  font-size: 16px;
  margin: 12px 0;
}
.policy-band p {
  line-height: 1.85;
  font-size: 13px;
  max-width: 960px;
  margin: 8px 0;
}
.policy-band summary {
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 9px 0;
}
.policy-band details[open] {
  border-top: 1px solid #dde2ef;
  margin-top: 14px;
  padding-top: 5px;
}
.notice {
  font-size: 13px;
  line-height: 1.85;
  border-radius: 9px;
  padding: 13px 17px;
}
.tabs {
  gap: 5px;
  flex-wrap: wrap;
  padding-bottom: 13px;
  margin-bottom: 18px;
}
.tabs a {
  font-size: 13px;
  padding: 8px 13px;
  border-radius: 7px;
}
.tabs a.active {
  background: #efedfc;
  border-color: transparent;
  box-shadow: none;
  color: #5f53d6;
}
.empty {
  padding: 42px 20px;
}
.empty b {
  font-size: 15px;
}
.empty small {
  font-size: 13px;
  line-height: 1.75;
}
.empty-orbit {
  width: 49px;
  height: 49px;
  margin-bottom: 15px;
}
dialog {
  max-width: min(840px, calc(100vw - 32px));
  border-radius: 17px;
  box-shadow: 0 24px 80px #1e25403b;
  border: 1px solid #e6e7f0;
}
dialog::backdrop {
  background: #22273c66;
  backdrop-filter: blur(4px);
}
.dialog-head {
  padding: 22px 27px;
  border-bottom: 1px solid #ebedf4;
}
.dialog-head h2 {
  font-size: 18px;
  font-weight: 650;
}
#dialogBody {
  padding: 23px 27px;
  max-height: 70vh;
  overflow: auto;
}
.dialog-foot {
  padding: 17px 27px;
  background: #fafbfe;
  border-top: 1px solid #e8ebf2;
}
.form-grid {
  gap: 19px 21px;
  margin-top: 20px;
}
.field label {
  font-size: 13px;
  color: #384258;
  font-weight: 560;
  margin-bottom: 8px;
}
.field input,
.field select,
.field textarea {
  font-size: 14px;
  padding: 11px 12px;
  border: 1px solid #d8deea;
  border-radius: 8px;
  background: #fff;
  min-height: 42px;
}
.field input[type="checkbox"] {
  min-height: 16px;
  padding: 0;
}
.field small {
  color: #788399;
  line-height: 1.7;
  margin-top: 7px;
}
.field textarea {
  min-height: 95px;
}
.checkout-steps {
  display: flex;
  gap: 19px;
  padding-bottom: 17px;
  border-bottom: 1px solid #e9ecf3;
  font-size: 12px;
  color: #8a93a5;
}
.checkout-steps b {
  color: #6356cf;
}
.checkout-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 25px;
  margin-top: 23px;
}
.checkout-grid h3 {
  font-size: 15px;
  margin: 3px 0 12px;
}
.checkout-terms {
  font-size: 13px;
  line-height: 1.9;
  margin: 22px 0;
  color: #6c788e;
}
.checkout-total {
  background: #f2f2fc;
  border: 1px solid #e4e2f5;
  border-radius: 12px;
  padding: 21px;
}
.checkout-total > span {
  font-size: 12px;
  color: #756c9a;
}
.checkout-total > strong {
  display: block;
  margin: 10px 0 23px;
  font-size: 32px;
  color: #44377b;
  letter-spacing: -1px;
  font-weight: 650;
}
.checkout-total .detail-row {
  font-size: 12px;
}
.checkout-total > small {
  display: block;
  line-height: 1.9;
  font-size: 12px;
  color: #7e7696;
  margin-top: 19px;
}
.positive {
  color: #168366;
}
.order-status-line {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.order-stage {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 20px 0 26px;
  padding: 20px 10px;
  background: #f6f7fb;
  border-radius: 10px;
}
.order-stage > div {
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  color: #8a93a7;
}
.order-stage i {
  display: grid;
  place-items: center;
  font-style: normal;
  width: 25px;
  height: 25px;
  border: 1px solid #d5dbe7;
  border-radius: 50%;
}
.order-stage .done {
  color: #6054c9;
}
.order-stage .done i {
  background: #ebe7ff;
  border-color: #d4cdf8;
}
.summary p {
  line-height: 1.7;
  font-size: 13px;
}
.timeline small {
  font-size: 12px;
}
.timeline p {
  font-size: 13px;
}
.dark {
  --ink: #e5e8f1;
  --muted: #a4adc0;
  --line: #343a50;
  background: #1b1f2e;
  color: var(--ink);
}
.dark .table-wrap,
.dark .product-refined,
.dark .filters input,
.dark .filters select {
  background: #24293c;
  color: var(--ink);
}
.dark th,
.dark tbody tr:hover,
.dark .dialog-foot {
  background: #2a3045;
}
.dark td,
.dark .detail-row strong {
  color: #e0e5ef;
}
.dark .section-intro,
.dark .policy-band,
.dark .checkout-total,
.dark .order-stage {
  background: #2d2d48;
  color: var(--ink);
  border-color: #42425f;
}
.dark .nav-section a.active {
  background: #39304f !important;
  color: #c5baff !important;
}
.dark .field input,
.dark .field select,
.dark .field textarea {
  background: #24293c;
  color: #e5e8f1;
  border-color: #454c65;
}
.dark .checkout-total > strong {
  color: #d4c9ff;
}
.dark .product-description {
  color: #aeb7ca;
}
.dark td {
  border-color: #343a50;
}
.dark .detail-row,
.dark .product-facts {
  border-color: #3b4258;
}
@media (min-width: 1600px) {
  .product-catalog {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 1100px) {
  #content {
    padding: 24px;
  }
  .product-catalog {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .product-body {
    padding: 20px;
  }
  .product-body .actions {
    flex-wrap: wrap;
  }
  .section-intro {
    align-items: flex-start;
  }
  .section-intro > div {
    white-space: normal;
  }
  .physical-card {
    opacity: 0.6;
    right: 0;
  }
  .balance-copy {
    z-index: 1;
  }
  .filters input[type="date"] {
    max-width: 135px;
  }
  .filters .grow {
    flex-basis: 250px;
  }
  .metric strong {
    font-size: 24px;
  }
}
@media (max-width: 760px) {
  #content {
    padding: 20px 16px 32px;
  }
  .page-head {
    gap: 16px;
  }
  .page-head h1 {
    font-size: 24px;
  }
  .page-head .actions {
    gap: 7px;
    flex-wrap: wrap;
  }
  .product-catalog {
    grid-template-columns: 1fr;
  }
  .section-intro {
    display: block;
  }
  .section-intro p {
    margin-top: 12px;
  }
  .product-visual {
    height: 132px;
  }
  .filters {
    display: flex;
  }
  .filters .grow {
    width: 100%;
    flex-basis: 100%;
  }
  .filters input[type="date"] {
    max-width: none;
    flex: 1;
    min-width: 0;
    width: 35%;
  }
  .filters select {
    flex: 1;
  }
  .detail-grid,
  .fee-grid,
  .checkout-grid {
    grid-template-columns: 1fr;
  }
  .checkout-grid {
    gap: 12px;
  }
  .checkout-steps {
    gap: 12px;
    font-size: 11px;
  }
  .table-actions {
    flex-wrap: wrap;
  }
  .table-actions > span {
    margin-left: 0;
  }
  .policy-band {
    padding: 19px;
  }
  .order-stage {
    gap: 5px;
  }
  .order-stage > div {
    font-size: 11px;
  }
  #dialogBody {
    padding: 18px;
  }
  .dialog-head,
  .dialog-foot {
    padding: 17px 18px;
  }
  .balance-surface {
    min-height: 240px;
  }
  .balance-copy {
    padding: 25px;
  }
  .physical-card {
    display: none;
  }
  .metric small {
    font-size: 11px !important;
  }
  .metric strong {
    font-size: 23px;
  }
  .stat-strip .metric {
    padding: 18px 16px;
  }
  .notice {
    font-size: 12px;
  }
  td {
    padding: 13px;
  }
  footer {
    font-size: 11px;
  }
  .table-wrap {
    max-width: 100%;
  }
  header .mode-tag {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

#navigation .nav-section {
  border: 0;
  border-bottom: 1px solid #edf0f5;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  margin: 0 0 5px;
  padding: 5px 0;
}
.dark #navigation .nav-section {
  border-bottom-color: #34394d;
}
.dark .nav-section summary {
  color: #a7aec0;
}
.dark .section-intro p,
.dark .policy-band p {
  color: #b0b8cd;
}
.dark .product-facts span {
  color: #abb4c9;
}
dialog {
  width: min(840px, calc(100vw - 32px));
}
.checkout-total {
  position: static;
  inset: auto;
  width: auto;
  z-index: auto;
  display: block;
  color: var(--ink);
}
.dark .checkout-total > span,
.dark .checkout-total > small {
  color: #b8afd4;
}

#navigation .nav-section {
  border-bottom-color: #ffffff10;
}
#navigation .nav-section a.active {
  background: #373154 !important;
  color: #ddd5ff !important;
}
#navigation .nav-section summary {
  color: #9fa8c0;
}
@media (min-width: 1600px) {
  .product-catalog {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  }
}

[hidden] {
  display: none !important;
}
.order-meta {
  padding: 12px 0 18px;
}
.order-meta p {
  font-size: 13px;
  margin: 8px 0;
  line-height: 1.8;
  color: var(--muted);
}
.order-meta details {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.order-meta summary {
  cursor: pointer;
  font-size: 12px;
}
.order-meta code {
  font-size: 11px;
  overflow-wrap: anywhere;
}

/* Readability on colored card surfaces and the transport-status banner. */
.product-visual > small { color: #eef2ff; opacity: .83; }
#connectionBanner:not(:empty) { font-size: 12px; line-height: 1.7; padding-top: 9px; padding-bottom: 9px; }
