:root {
  color-scheme: dark;
  --ink: var(--oz-text);
  --muted: var(--oz-muted);
  --edge: var(--oz-border);
  font: 15px/1.5 'Segoe UI', system-ui, sans-serif;
  background: var(--oz-background);
  color: var(--ink);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-height: 100svh; margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--oz-action); outline-offset: 3px; }
.skip-link { position: fixed; top: 8px; left: 12px; transform: translateY(-140%); z-index: 2; padding: 8px 12px; background: #0a1820; }
.skip-link:focus { transform: none; }
.account-header, .account-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 15px max(18px, calc((100% - 1140px) / 2));
  color: var(--muted);
  background: var(--oz-surface);
}
.account-header { border-bottom: 1px solid var(--oz-border); }
.account-header nav, .account-footer nav { display: flex; flex-wrap: wrap; gap: 12px 20px; }
.account-brand { font-size: 18px; font-weight: 800; letter-spacing: .1em; text-decoration: none; color: var(--ink); white-space: nowrap; }
.account-brand span { margin-left: 5px; color: var(--oz-accent); }
.account-header a:not(.account-brand), .account-footer a { font-size: .88rem; }
#account-main { width: min(1140px, calc(100% - 36px)); margin: 28px auto 44px; min-height: 67svh; }
.account-heading {
  display: flex;
  align-items: end;
  min-height: 186px;
  padding: clamp(18px, 4vw, 38px);
  border: 1px solid var(--edge);
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(90deg, #0b1923 8%, #0b1923d9 43%, #0b19231f), var(--oz-company-art-compact) center 46% / cover #0c1720;
}
.account-heading h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.08; text-wrap: balance; overflow-wrap: anywhere; }
.account-heading p { color: #d0e1e8; margin: 9px 0 0; font-variant-numeric: tabular-nums; }
#message { margin: 14px 0 0; color: #d2e7ef; }
#message:empty { margin: 0; }
.account-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.account-grid:has(#email-card[hidden]) { grid-template-columns: minmax(0, 560px); }
.account-sidebar { display: grid; gap: 16px; min-width: 0; }
.account-card { min-width: 0; padding: clamp(16px, 2.8vw, 26px); border: 1px solid var(--edge); border-radius: 10px; background: var(--oz-surface); }
.account-card h2 { margin: 0; font-size: 1.25rem; }
.account-card p { margin: 8px 0 16px; color: var(--muted); overflow-wrap: anywhere; }
.account-card p:empty { display: none; }
.account-card form { display: grid; gap: 13px; align-items: start; max-width: 490px; margin: 16px 0 0; }
.account-card label { display: grid; gap: 5px; color: #e0edf3; }
.account-card input { min-height: 44px; width: 100%; border: 1px solid var(--oz-control-border); border-radius: 5px; padding: 8px 11px; color: var(--ink); background: var(--oz-input); }
.account-card button, .account-action { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 13px; border: 1px solid var(--oz-control-border); border-radius: 5px; color: var(--ink); background: var(--oz-raised); text-decoration: none; }
.account-card button:hover, .account-action:hover { background: var(--oz-hover); }
.account-card form button { justify-self: start; border-color: transparent; color: var(--oz-on-action); font-weight: 700; background: var(--oz-action); background-image: var(--oz-button-sheen); }
.account-card form button:hover { background-color: var(--oz-action-hover); }
.account-card button:disabled { opacity: .55; cursor: wait; }
.account-card small { display: block; margin-top: 13px; color: var(--muted); font-size: .86rem; }
.token-card, .promotion-card, #admin { margin-top: 16px; }
#promotion-balance { color: var(--muted); font-variant-numeric: tabular-nums; }
#promotion-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
#promotion-status:not(:empty) { margin-top: 14px; }
@media (max-width: 420px) {
  #promotion-form { grid-template-columns: minmax(0, 1fr); }
}
.account-section-head, #admin > nav { display: flex; gap: 9px 13px; align-items: center; flex-wrap: wrap; }
.account-section-head { justify-content: space-between; }
#admin > nav { margin-top: 14px; }
.records, #details { overflow: auto; margin-top: 14px; }
.records:empty, #details:empty { display: none; }
.records table, #details table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #304958; }
.account-footer { border-top: 1px solid var(--oz-border); }
@media (max-width: 650px) {
  .account-grid { grid-template-columns: minmax(0, 1fr); }
  #account-main { margin-top: 15px; }
  .account-heading { min-height: 135px; }
}
