:root {
  color-scheme: dark;
  --surface: #151515;
  --line: #333;
  --secondary: #bdbdbd;
  --gap: clamp(16px, 2vw, 24px);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #090909;
  color: #fafafa;
  font: 15px/1.5 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-variant-numeric: tabular-nums;
}
header {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px max(5%, (100% - 1120px) / 2);
  background: #101010;
  border-bottom: 1px solid var(--line);
}
header strong { display: flex; align-items: center; gap: 14px; letter-spacing: -.04em; font-size: 17px; }
header strong::before {
  content: "";
  width: 6px;
  height: 23px;
  background: white;
  box-shadow: 9px 0 #aaa, 18px 0 #666;
  transform: skew(-16deg);
  margin: 0 20px 0 4px;
}
#area { color: var(--secondary); font-size: 13px; border-left: 1px solid #444; padding-left: 20px; overflow-wrap: anywhere; }
#logout { margin-left: auto; padding: 7px 14px; background: transparent; font-size: 13px; white-space: nowrap; }
main { width: min(90%, 1120px); margin: auto; padding: clamp(30px,5vw,64px) 0 80px; }
h1, h2 { margin: 0; line-height: 1.15; }
h1 { font-size: clamp(32px,4vw,46px); letter-spacing: -.055em; margin-bottom: 30px; }
h2 { font-size: 21px; letter-spacing: -.035em; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.grid { display: grid; gap: var(--gap); grid-template-columns: repeat(2,minmax(0,1fr)); }
.reseller { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.wide { grid-column: 1 / -1; }
section, .metric { min-width: 0; background: var(--surface); padding: clamp(20px,3vw,32px); border: 1px solid var(--line); }
.signin { max-width: 420px; margin: 8vh auto 0; padding: clamp(24px,4vw,40px); border-top: 3px solid white; }
.signin h1 { font-size: 36px; }
.metric { background: #212121; display: flex; flex-direction: column; }
.metric > span, th { color: var(--secondary); text-transform: uppercase; font-size: 11px; letter-spacing: .11em; font-weight: 600; }
.metric strong { font-size: clamp(38px,5vw,62px); letter-spacing: -.06em; overflow-wrap: anywhere; margin: 10px 0 32px; }
.metric p { margin: auto 0 0; padding-top: 18px; border-top: 1px solid #444; }
.metric p, .quote span { display: flex; justify-content: space-between; gap: 12px; color: var(--secondary); }
b { color: white; text-align: right; }
form { display: grid; gap: 17px; grid-template-columns: minmax(0,1fr); }
label { font-weight: 500; font-size: 13px; color: #ddd; min-width: 0; }
input, select, button { border-radius: 0; font: inherit; color: white; }
input, select {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  margin-top: 7px;
  background: #0c0c0c;
  border: 1px solid #505050;
  font-size: 15px;
}
input::placeholder { color: #999; }
button { padding: 11px 18px; font-size: 14px; background: #393939; border: 1px solid #606060; font-weight: 600; cursor: pointer; }
button:enabled:hover, #logout:hover { background: #505050; border-color: #888; }
button:disabled { color: #aaa; background: #242424; cursor: default; }
:focus-visible { outline: 2px solid white; outline-offset: 3px; }
.signin button, .reseller form button { margin-top: 6px; }
.signin button::after, .reseller form button::after { content: " →"; margin-left: 6px; }
small, .muted { color: var(--secondary); font-size: 13px; margin: 0; }
small { margin-top: -10px; }
.quote { display: grid; gap: 6px; margin: 0; font-size: 14px; }
.result { margin-top: 24px; }
.result code, #notice { display: block; background: #252525; padding: 14px 16px; margin: 12px 0; border-left: 3px solid white; }
#notice[hidden] { display: none; }
#notice { margin: 0 0 24px; }
.scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { padding: 13px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #202020; }
tbody tr:hover { background: #1c1c1c; }
code { overflow-wrap: anywhere; white-space: pre-wrap; }
td button { padding: 5px 10px; font-size: 12px; margin: 4px; }
@media (min-width: 761px) {
  .admin { align-items: start; }
  .admin > section:first-child { grid-row: span 2; }
  .admin > section:has(form[data-action="admin/discount"]) { grid-column: 1/-1; }
  form[data-action="admin/discount"] { grid-template-columns: 2fr 1fr auto; align-items: end; }
}
@media (max-width: 760px) {
  .grid { grid-template-columns: minmax(0,1fr); }
  header { flex-wrap: wrap; gap: 10px; }
  #area { order: 3; width: 100%; border: 0; padding: 0; }
  input, select { font-size: 16px; }
  .metric strong { margin: 4px 0 16px; }
  .signin { margin-top: 4vh; }
}
