:root {
  color-scheme: dark;
  color: #f4f1eb;
  background: #08090a;
  --brand: #f7931e;
  --deep: #f4f1eb;
  --line: #292c2f;
  --muted: #a4a5a4;
  --display: "Arial Narrow", "Aptos Display", "Helvetica Neue", Arial, sans-serif;
  --body: Aptos, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--body);
}

body {
  min-height: 100vh;
  background:
    linear-gradient(rgb(41 44 47 / 18%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(41 44 47 / 18%) 1px, transparent 1px),
    radial-gradient(circle at 88% 18%, rgb(247 147 30 / 9%) 0, transparent 34rem),
    #08090a;
  background-size: 68px 68px, 68px 68px, auto;
  letter-spacing: -0.005em;
}

header {
  background: rgb(8 9 10 / 94%);
  border-color: var(--line);
  backdrop-filter: blur(18px);
  padding-inline: clamp(20px, 4vw, 56px);
}

.brand-mark { display: block; width: 42px; height: 42px; background: none; border-radius: 0; }
.product-label, .header-actions span, .muted, .status, .footer, .subline { color: var(--muted); }
.eyebrow { color: #ffac3d; letter-spacing: .14em; }

button { min-height: 46px; border-radius: 2px; background: #f7931e; color: #08090a; transition: background-color 150ms ease, border-color 150ms ease, transform 150ms ease; }
button:hover { background: #ffac3d; }
button:active:not(:disabled) { transform: translateY(1px); }
button.secondary { background: #151719; color: #f4f1eb; border-color: #3a3e42; }
button.secondary:hover { background: #222528; }
button.danger { background: #a84338; color: #fff; }
button.danger:hover { background: #c15549; }

input, select { min-height: 46px; color: #f4f1eb; background: #101214; border-color: #3a3e42; border-radius: 2px; }
input::placeholder { color: #777a7c; opacity: 1; }
input:focus-visible, select:focus-visible, button:focus-visible, a:focus-visible { outline-color: #ffac3d; }
label { color: #d4d1cb; }

.card, .stat, .table-wrap { background: rgb(21 23 25 / 96%); border-color: var(--line); box-shadow: 0 16px 48px rgb(0 0 0 / 20%); }
.login-card { max-width: 420px; width: 100%; justify-self: end; box-shadow: 0 28px 90px rgb(0 0 0 / 36%); }
.login-shell { max-width: 1080px; gap: clamp(44px, 8vw, 96px); }
.intro h1 { max-width: 560px; font-family: var(--display); font-size: clamp(36px, 4.4vw, 54px); letter-spacing: -0.055em; line-height: .98; }
.workspace { max-width: 1220px; padding-top: 42px; }
.page-heading h1, h2 { font-family: var(--display); letter-spacing: -0.035em; }
.stat { min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; }
.card, .table-wrap { border-radius: 2px; }
.toolbar > div:first-child { width: min(100%, 380px); }
.footer { padding-block: 32px; }
.footer::after { content: "Copyright © 2026 PT. Callysta Mitra Enjiniring."; display: block; margin-top: 8px; color: #777a7c; }
.intro-note, .tabs, .info-row { border-color: var(--line); }
.tab { color: #a4a5a4; }
.tab:hover { background: #151719; }
.tab[aria-selected=true] { color: #ffac3d; border-bottom-color: #f7931e; }
th { background: #101214; color: #a4a5a4; border-color: var(--line); }
td { border-color: #292c2f; }
.badge { background: #27362f; color: #9ed2b2; }
.badge.pending { background: #3b2b17; color: #ffbf66; }
.badge.neutral { background: #292c2f; color: #c6c6c2; }
.notice { background: #17191b; border-color: #3a3e42; color: #cbc9c4; }
dialog { color: #f4f1eb; background: #151719; border-color: #3a3e42; border-radius: 2px; box-shadow: 0 30px 100px #0009; }
dialog::backdrop { background: #030405d9; backdrop-filter: blur(4px); }
.purchase-icon { background: #2b2115; color: #ffac3d; border-radius: 2px; }
a { color: #ffac3d; }

.android-download { margin-top: 12px; }
.android-download a { display: flex; align-items: center; justify-content: flex-start; min-height: 44px; padding: 8px 0; font-size: 14px; font-weight: 650; text-underline-offset: 4px; }
.android-download p { margin: 4px 0 0; font-size: 12px; }
.token-value code { color: #ffac3d; }
.status.error { color: #ff8f83; }
.status.success { color: #91d3ad; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}

@media (max-width: 800px) {
  .login-card { max-width: none; justify-self: stretch; }
  .workspace { padding-top: 28px; }
}

/* Keep the newest token in view on the customer dashboard. */
.workspace:has(.customer-layout) { padding-top: 16px; }
.workspace:has(.customer-layout) .page-heading { margin-bottom: 16px; }
.customer-layout { gap: 16px; }
.customer-layout .card, .token-history { padding: 16px; }
.customer-layout .eyebrow { margin-bottom: 6px; }
.customer-layout .customer-id { margin-bottom: 8px; line-height: 1.3; }
.customer-layout .info-row { padding-block: 10px; }
.customer-layout .card > .muted:last-child { margin: 8px 0 0; }
.purchase-card > .muted { margin-bottom: 12px; }
.purchase-card { display: flex; flex-direction: column; }
#purchase-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: auto; }
#purchase-form .field { margin: 0; min-width: 0; }
#purchase-form button { grid-column: 1 / -1; margin: 0; }
#purchase-status { grid-column: 1 / -1; margin: 0; }
#purchase-status:empty, .workspace:has(.customer-layout) > .status:empty { display: none; }
.token-history { margin-top: 16px; }
.token-history-heading { margin-bottom: 8px; }
.token-entry { padding: 0 0 12px; }
.token-entry + .token-entry { padding-top: 12px; }
.token-entry .info-row { padding-block: 8px; }
.token-entry:last-child { padding-bottom: 0; }
.token-tid { margin: 4px 0 0; }

@media (min-width: 601px) and (max-width: 800px) {
  .customer-layout { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  /* Put the purchase and its result together before account details. */
  .workspace:has(.customer-layout) { display: flex; flex-direction: column; }
  .customer-layout { display: contents; }
  .customer-layout > .card:first-child { order: 3; margin-top: 16px; }
  .workspace:has(.customer-layout) > .status { order: 4; }
}

/* Keep administration tabs and confirmation dialogs inside narrow viewports. */
.tabs { overflow-x: auto; }
#editor { width: calc(100vw - 32px); max-width: 510px; }
