:root {
  color-scheme: dark;
  --bg: #070707;
  --panel: #101010;
  --panel-soft: #171717;
  --border: #252525;
  --text: #f4f3ef;
  --muted: #a8a8a8;
  --acid: #d6ff4d;
  --acid-soft: rgba(214, 255, 77, 0.16);
  --ok: #b8ff7f;
  --warn: #ffd06f;
  --danger: #ff9797;
  --radius: 24px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 88% 0%, rgba(214, 255, 77, 0.11), transparent 30%),
    radial-gradient(circle at 0% 0%, rgba(214, 255, 77, 0.05), transparent 28%),
    #090909;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.014) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.014) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at 50% 16%, black, transparent 80%);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 30px));
  margin: 0 auto;
  padding: 20px 0 40px;
}

.topbar,
.panel,
.stat-card,
.license-card,
.plan-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 60%),
    var(--panel);
  box-shadow: 0 36px 90px rgba(0, 0, 0, 0.42);
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(12, 12, 12, 0.86);
  backdrop-filter: blur(12px);
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}

.brand-dot {
  width: 11px;
  height: 11px;
  border-radius: 3px;
  background: var(--acid);
  box-shadow: 0 0 16px rgba(214, 255, 77, 0.45);
}

.brand-text {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: 0.04em;
}

.topbar-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.profile-layout {
  margin-top: 24px;
  display: grid;
  gap: 16px;
}

.panel {
  padding: 20px;
}

.account-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-kicker {
  margin: 0;
  color: var(--acid);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin: 0;
}

.account-panel h1 {
  margin-top: 8px;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  line-height: 1;
  overflow-wrap: anywhere;
}

.panel-copy {
  margin-top: 6px;
  color: var(--muted);
  line-height: 1.55;
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  cursor: pointer;
  text-decoration: none;
  font-weight: 700;
  font: inherit;
}

.btn-acid {
  background: var(--acid);
  color: #111111;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--text);
}

.btn-danger {
  background: transparent;
  border-color: rgba(255, 151, 151, 0.42);
  color: #ffb4b4;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.stat-card {
  padding: 14px;
}

.stat-card span {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.5rem;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head h2 {
  font-size: 1.5rem;
}

.link-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  color: var(--muted);
  font-size: 0.9rem;
}

input {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  color: var(--text);
  padding: 0 14px;
  outline: none;
  font: inherit;
}

input:focus {
  border-color: rgba(214, 255, 77, 0.45);
}

.msg,
.global-msg {
  margin-top: 10px;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.92rem;
}

.msg.is-ok,
.global-msg.is-ok {
  color: var(--ok);
}

.msg.is-error,
.global-msg.is-error {
  color: var(--danger);
}

.announcement {
  border-color: rgba(214, 255, 77, 0.28);
}

.announcement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.announcement-head span {
  color: var(--muted);
  font-size: 0.9rem;
}

.plans-grid,
.licenses-list,
.resources-grid {
  display: grid;
  gap: 10px;
}

.plans-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.plan-card {
  padding: 14px;
  border-radius: 18px;
}

.plan-card h3 {
  font-size: 1.2rem;
}

.plan-price {
  margin-top: 6px;
  color: var(--acid);
  font-weight: 700;
}

.plan-card p {
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.55;
}

.plan-actions {
  margin-top: 12px;
}

.license-card {
  padding: 14px;
  border-radius: 16px;
}

.license-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.license-key {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border-radius: 999px;
  padding: 0 12px;
  border: 1px solid transparent;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.badge.active {
  background: var(--acid-soft);
  color: var(--acid);
}

.badge.expired {
  background: rgba(255, 208, 111, 0.16);
  color: var(--warn);
}

.badge.banned,
.badge.revoked {
  background: rgba(255, 151, 151, 0.16);
  color: #ffb4b4;
}

.badge.default {
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

.license-meta {
  margin-top: 10px;
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.license-actions {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.resource-link {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 700;
  padding: 0 12px;
}

.resource-link.hidden {
  display: none !important;
}

.hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plans-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .page-shell {
    width: calc(100% - 20px);
    padding-top: 12px;
  }

  .topbar {
    padding: 12px 14px;
  }

  .account-panel {
    flex-direction: column;
  }

  .link-form {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
