@font-face {
  font-family: 'SimpleFont';
  src: url('/_portal/fonts/simplefont-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SimpleFont';
  src: url('/_portal/fonts/simplefont-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'SimpleFont';
  src: url('/_portal/fonts/simplefont-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0b0b0d;
  --panel: #131315;
  --panel-2: #19191c;
  --line: #2a2a2e;
  --text: #f5f5f6;
  --muted: #a0a0a7;
  --accent: #f5c542;
  --accent-2: #e0ad25;
  --accent-ink: #1a1505;
  --danger: #e5484d;
  --ok: #4ade80;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1100px 520px at 50% -15%, #17171a 0%, var(--bg) 60%), var(--bg);
  color: var(--text);
  font: 15px/1.5 'SimpleFont', 'Segoe UI', system-ui, -apple-system, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.page { display: flex; flex-direction: column; min-height: 100vh; }

header.top {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 11, 13, .94);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--accent);
  display: grid; place-items: center;
  color: var(--accent-ink); font-size: 17px; font-weight: 800;
}
.logo span { font-size: 15px; }

.spacer { flex: 1; }

.who { color: var(--muted); font-size: 13px; }

main { width: 100%; max-width: 1180px; margin: 0 auto; padding: 24px 24px 40px; flex: 1; }

.grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: stretch; }
@media (max-width: 920px) { .grid { grid-template-columns: 1fr; } }

.panel {
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px;
}

.panel h2 {
  margin: 0 0 16px;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.steam-row { display: flex; gap: 16px; align-items: center; flex: 1 1 auto; }

.avatar-col { display: flex; flex-direction: column; gap: 4px; flex: 0 0 auto; }
.avatar-caption { font-size: 12px; line-height: 14px; color: var(--muted); }

.avatar {
  width: 150px; height: 150px; border-radius: 12px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 26px; color: var(--muted);
  overflow: hidden; flex: 0 0 auto;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
button.avatar { padding: 0; cursor: pointer; font: inherit; color: var(--muted); }
button.avatar:hover { border-color: var(--accent); }

.fields { display: flex; flex-direction: column; gap: 8px; flex: 1; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }

input[type="text"], input[type="number"], input[type="password"], input[type="search"], select {
  background: #0d0d0f;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  padding: 8px 12px;
  font: inherit;
  outline: none;
  width: 100%;
}
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 197, 66, .15); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid transparent;
  border-radius: 8px;
  height: 38px;
  padding: 0 16px;
  font: inherit; font-weight: 600; font-size: 14px;
  cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--accent-2); text-decoration: none; }
.btn.ghost {
  background: transparent; color: var(--text); border-color: var(--line);
}
.btn.ghost:hover { background: #1c1c20; border-color: #3a3a40; }
.btn.small { height: 34px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn.danger { background: var(--danger); color: #fff; border-color: transparent; }
.btn.danger:hover { background: #c93a3f; }

.hint { color: var(--muted); font-size: 12px; margin: 14px 0; }

.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; flex: 1 1 auto; align-content: stretch; }
@media (max-width: 920px) { .cards { grid-template-columns: 1fr; } }

.card {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  justify-content: space-between;
}
.card .name { font-weight: 700; font-size: 16px; }
.card .desc { color: var(--muted); font-size: 12px; flex: 1; }
.card .actions { display: flex; gap: 8px; flex-wrap: wrap; }

.center { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.box { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.box h1 { margin: 0 0 6px; font-size: 22px; font-weight: 700; }
.box p.sub { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.box .row { display: flex; flex-direction: column; gap: 12px; }
.error { color: var(--danger); font-size: 13px; min-height: 18px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 600; }
code.key { font-family: Consolas, ui-monospace, monospace; font-size: 14px; letter-spacing: .06em; color: var(--text); }

.badge { display: inline-block; padding: 3px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.active { background: rgba(74, 222, 128, .14); color: var(--ok); }
.badge.expired, .badge.revoked { background: rgba(229, 72, 77, .14); color: var(--danger); }

footer.bottom { border-top: 1px solid var(--line); padding: 14px 24px; color: var(--muted); font-size: 12px; }

.toast {
  position: fixed; right: 20px; bottom: 20px;
  background: #1a1a1e; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px 16px; font-size: 13px; color: var(--text);
  opacity: 0; transition: opacity .2s; pointer-events: none;
}
.toast.show { opacity: 1; }

@media (max-width: 640px) {
  header.top { padding: 0 14px; gap: 10px; }
  main { padding: 18px 14px 36px; }
}

.card .name .card-logo,
.card .name img.card-logo {
  display: block;
  height: 24px;
  width: auto;
}
.card .name.name--upgrader {
  display: flex;
  align-items: center;
  gap: 8px;
}
.card .name.name--upgrader img.card-logo--icon {
  display: block;
  height: 24px;
  width: 24px;
}
.card .name.name--upgrader span {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .06em;
}

.card .name img.card-logo--caser { height: 30px; }
.btn.btn-play {
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
}
.btn.btn-play svg { display: block; width: 16px; height: 16px; fill: currentColor; }

.card .name img.card-logo--steam { height: 36px; }
