* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --page: #151515;
  --panel: #242424;
  --panel-deep: #202020;
  --panel-head: #363636;
  --nav: #303030;
  --line: #414141;
  --line-soft: #333333;
  --text: #d3d3d3;
  --muted: #999999;
  --dim: #777777;
  --accent: #c52b46;
  --accent-hover: #e04a63;
  --success: #74bd91;
  --error: #e06b78;
  font-family: Tahoma, Arial, Helvetica, sans-serif;
  font-size: 13px;
}

html { min-width: 320px; background: var(--page); }
body { min-height: 100vh; margin: 0; background: var(--page); color: var(--text); line-height: 1.45; }
button, input, select { font: inherit; }
button { color: inherit; cursor: pointer; }
.hidden { display: none !important; }

.page-shell { width: min(1070px, calc(100% - 32px)); margin: 0 auto; padding: 6px 0 28px; }
.site-header, .forum-panel { border: 1px solid var(--line-soft); border-radius: 3px; background: var(--panel); box-shadow: 0 1px 2px rgba(0, 0, 0, .22); }
.site-header { overflow: hidden; }

.brand { height: 50px; padding: 9px 13px 0; background: #282828; color: #dedede; font-size: 22px; letter-spacing: -.05em; line-height: 32px; }
.brand strong { color: var(--accent); font-weight: 400; }
.primary-nav { min-height: 31px; display: flex; align-items: center; gap: 0; padding: 0 8px; background: var(--nav); }
.nav-link { min-height: 31px; padding: 0 11px; border: 0; background: transparent; color: #c1c1c1; font-size: 12px; text-decoration: none; }
.nav-link:hover, .nav-link:focus-visible { background: #3a3a3a; color: #fff; outline: 0; }
.account-strip { min-height: 34px; padding: 8px 12px; border-top: 1px solid #292929; background: #242424; color: #c4c4c4; font-size: 12px; }

main { margin-top: 11px; }
.view { width: 100%; }
.forum-panel { margin-bottom: 11px; }
.panel-heading { padding: 8px 12px; border-bottom: 1px solid #282828; background: var(--panel-head); color: #ddd; font-size: 12px; font-weight: 700; }
.panel-body { padding: 10px 12px; background: var(--panel); }
.info-body { min-height: 72px; }
.info-body h1 { margin: 0 0 12px; font-size: 13px; font-weight: 400; }
.info-body p { margin: 0 0 5px; }
.inline-links { display: flex; align-items: center; gap: 7px; }

.link-button { padding: 0; border: 0; background: transparent; color: #6db0df; font-size: 12px; text-decoration: none; }
.link-button:hover, .link-button:focus-visible { color: #a6d4f4; text-decoration: underline; outline: 0; }
.page-title { margin: 0 0 3px; color: #e2e2e2; font-size: 17px; font-weight: 400; }
.subheading { margin: 0 0 17px; color: var(--muted); }
.form-body { padding: 18px 20px; }
.narrow-body { max-width: 620px; }
.forum-form { max-width: 100%; }
fieldset { min-width: 0; margin: 0 0 12px; padding: 13px 12px 12px; border: 1px solid #5a5a5a; background: #292929; }
legend { padding: 0 7px; color: #70b2e1; font-size: 11px; }
label { display: block; margin: 0 0 5px; color: #d7d7d7; font-weight: 700; }
input { width: min(100%, 410px); height: 31px; padding: 4px 7px; border: 1px solid #555; border-radius: 2px; background: #202020; color: #eee; outline: 0; }
input:focus, select:focus { border-color: #79a9cb; box-shadow: 0 0 0 1px rgba(121, 169, 203, .2); }
select { width: min(100%, 410px); height: 31px; padding: 4px 7px; border: 1px solid #555; border-radius: 2px; background: #202020; color: #eee; outline: 0; }
.field-help { margin: 7px 0 0; color: #969696; font-size: 11px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.form-grid .field-help { grid-column: 1 / -1; margin-top: -4px; }
.full-width { width: 100%; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 17px; margin: 16px 0 4px; }
.button { min-height: 30px; padding: 0 13px; border: 1px solid #702636; border-radius: 2px; background: #5d1e2c; color: #eee; font-size: 12px; }
.button:hover, .button:focus-visible { border-color: #a64259; background: #79263a; outline: 0; }
.button-small { min-height: 27px; padding: 0 10px; }
.form-status, .site-status { margin: 12px 0 0; color: var(--muted); font-size: 12px; }
.form-status.error, .site-status.error { color: var(--error); }
.form-status.success { color: var(--success); }

.member-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.member-header .subheading { margin-bottom: 0; }
.member-badge { padding: 4px 7px; border: 1px solid #4c6a57; border-radius: 2px; color: var(--success); font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.account-meta { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; padding: 0 12px 12px; background: var(--panel); }
.meta-item { min-width: 0; padding: 9px 10px; border: 1px solid var(--line-soft); background: #292929; }
.meta-item span, .meta-item strong, .meta-item small { display: block; }
.meta-item span { color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.meta-item strong { margin-top: 3px; overflow: hidden; color: #e2e2e2; font-family: Consolas, monospace; font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.meta-item small { margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.member-columns { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 11px; }
.member-columns .forum-panel { min-width: 0; }
.release-list, .key-panel { min-height: 150px; }
.release-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.release-row:first-child { padding-top: 0; }
.release-row:last-of-type { border-bottom: 0; }
.release-row strong, .release-row small { display: block; }
.release-row small { margin-top: 2px; color: var(--muted); font-size: 11px; }
.key-panel .subheading { margin-bottom: 12px; font-size: 12px; }
.redeem-form { margin-bottom: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); }
.redeem-form label { font-size: 11px; }
.inline-form { display: flex; align-items: center; gap: 7px; }
.inline-form input { flex: 1 1 auto; min-width: 0; width: auto; }
.inline-form .button { flex: 0 0 auto; margin: 0; }
.new-key { margin-top: 11px; padding: 8px; overflow-wrap: anywhere; border: 1px solid #4c6a57; background: #24332a; color: var(--success); font-family: Consolas, monospace; font-size: 11px; }
.key-list { margin-top: 12px; }
.key-row { padding: 7px 0; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 11px; }
.key-prefix { color: #d1d1d1; font-family: Consolas, monospace; }
.revoke-key { display: block; margin-top: 10px; color: var(--dim); font-size: 11px; }
.revoke-key:hover, .revoke-key:focus-visible { color: var(--error); }
.button:disabled { cursor: default; opacity: .52; }
.button:disabled:hover { border-color: #702636; background: #5d1e2c; }

@media (max-width: 700px) {
  .page-shell { width: calc(100% - 16px); padding-top: 4px; }
  .form-grid, .member-columns, .account-meta, .admin-grid { grid-template-columns: 1fr; }
  .form-grid .field-help { grid-column: auto; }
  .member-header { display: block; }
  .member-badge { display: inline-block; margin-top: 12px; }
}
.admin-tools-head { display: flex; align-items: center; justify-content: space-between; padding: 0 0 11px; border-bottom: 1px solid var(--line-soft); color: #ddd; }
.admin-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 11px; }
.admin-form { min-width: 0; padding: 12px; border: 1px solid var(--line); background: #292929; }
.admin-form h2 { margin: 0 0 12px; color: #ddd; font-size: 13px; font-weight: 700; }
.admin-form label { margin-top: 9px; }
.admin-form label:first-of-type { margin-top: 0; }
.admin-form input, .admin-form select { width: 100%; }
.admin-form .button { margin-top: 14px; }
.admin-form .new-key { margin-top: 10px; }
.member-search-results { margin-top: 12px; display: grid; gap: 8px; }
.member-result { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px; border: 1px solid var(--line-soft); background: #242424; }
.member-result-info { min-width: 0; }
.member-result-info strong { display: block; color: #ddd; font-size: 12px; }
.member-result-info .member-number { color: var(--accent); }
.member-result-info small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.member-grant { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.member-grant select { width: auto; }
.member-grant .button { margin: 0; }
.member-actions { flex: 0 0 auto; }
.member-actions .link-button { color: var(--dim); font-size: 11px; }
.member-actions .link-button:hover, .member-actions .link-button:focus-visible { color: var(--error); }
.badge-muted { color: var(--dim) !important; }

.staff-link { float: right; margin-left: 10px; color: var(--dim); font-size: 11px; }
.site-footer { margin-top: 11px; padding: 9px 12px; border: 1px solid var(--line-soft); background: #242424; color: #bdbdbd; font-size: 11px; }
.site-footer span { margin: 0 5px; color: #666; }

