:root {
  color-scheme: dark;
  --bg: #070b12;
  --panel: rgba(18, 25, 39, 0.82);
  --panel-strong: rgba(24, 34, 53, 0.92);
  --stroke: rgba(142, 170, 213, 0.24);
  --text: #edf4ff;
  --muted: #9dacbf;
  --cyan: #35d6ff;
  --mint: #34e2b6;
  --warn: #ffc65a;
  --danger: #ff647c;
  --shadow: rgba(0, 0, 0, 0.36);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 70% -10%, rgba(53, 214, 255, 0.18), transparent 32rem),
    radial-gradient(circle at 8% 12%, rgba(52, 226, 182, 0.12), transparent 24rem),
    linear-gradient(135deg, #070b12 0%, #0e1728 48%, #080c13 100%);
  color: var(--text);
  font: 15px/1.6 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 34px 22px 24px;
  border-right: 1px solid var(--stroke);
  background: rgba(6, 10, 18, 0.72);
  backdrop-filter: blur(24px);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.brand-mark,
.shield,
.icon-preview {
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: linear-gradient(145deg, rgba(53, 214, 255, 0.96), rgba(52, 226, 182, 0.80));
  color: #05111c;
  box-shadow: 0 18px 34px rgba(53, 214, 255, 0.20);
}

.brand-mark {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  font-weight: 950;
}

.brand strong {
  display: block;
  font-size: 20px;
  font-weight: 950;
}

.brand span,
.muted,
small {
  color: var(--muted);
}

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

.nav a,
.ghost,
.primary {
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  font-weight: 850;
  cursor: pointer;
}

.nav a {
  justify-content: flex-start;
  color: var(--muted);
}

.nav a.active {
  background: rgba(53, 214, 255, 0.16);
  color: var(--text);
  border-color: rgba(53, 214, 255, 0.42);
}

.ghost {
  background: transparent;
  color: var(--text);
}

.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--cyan), var(--mint));
  color: #061018;
}

.wide {
  width: 100%;
}

#logoutBtn {
  margin-top: auto;
}

main {
  min-width: 0;
  padding: 36px;
}

.topbar {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--cyan);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 0;
  font-size: clamp(30px, 4vw, 56px);
  line-height: 1;
  font-weight: 950;
}

h2 {
  margin-bottom: 8px;
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.1;
  font-weight: 950;
}

h3 {
  font-size: 20px;
}

.user-box,
.status-text {
  color: var(--muted);
  text-align: right;
}

.login-view {
  min-height: calc(100vh - 160px);
  display: grid;
  place-items: center;
}

.login-panel {
  width: min(520px, 100%);
  padding: 36px;
  border: 1px solid var(--stroke);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 26px 70px var(--shadow);
}

.shield {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  margin-bottom: 26px;
  font-size: 22px;
}

.workspace {
  display: grid;
  gap: 28px;
}

.section {
  border: 1px solid var(--stroke);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: 0 24px 64px var(--shadow);
  padding: 28px;
  backdrop-filter: blur(24px);
}

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

.plans-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.plan {
  min-height: 230px;
  padding: 22px;
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  display: flex;
  flex-direction: column;
}

.plan strong {
  font-size: 24px;
  font-weight: 950;
}

.price {
  margin: 18px 0 14px;
  font-size: 38px;
  font-weight: 950;
}

.price small {
  font-size: 14px;
}

.plan .primary {
  margin-top: auto;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
}

.build-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.build-form label,
fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  color: #c6d3e6;
  font-weight: 800;
}

fieldset {
  grid-column: 1 / -1;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  padding: 14px;
}

legend {
  padding: 0 6px;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 0 13px;
  background: rgba(6, 10, 18, 0.52);
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--cyan);
}

.build-form button {
  grid-column: 1 / -1;
}

.platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pay-methods {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: -4px 0 18px;
}

.platforms label,
.pay-methods label {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.platforms input,
.pay-methods input {
  width: auto;
  min-height: auto;
}

.preview-panel {
  border: 1px solid var(--stroke);
  border-radius: 24px;
  padding: 22px;
  background: var(--panel-strong);
}

.icon-preview {
  width: 120px;
  height: 120px;
  border-radius: 26px;
  overflow: hidden;
  margin-bottom: 22px;
  font-weight: 950;
}

.icon-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.orders-list {
  display: grid;
  gap: 14px;
}

.order {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--stroke);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.order h3 {
  margin-bottom: 4px;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  color: var(--muted);
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(53, 214, 255, 0.12);
  color: var(--cyan);
  font-weight: 850;
}

.downloads {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.downloads a {
  border: 1px solid rgba(53, 214, 255, 0.36);
  border-radius: 10px;
  padding: 8px 11px;
  color: var(--text);
  background: rgba(53, 214, 255, 0.10);
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 44px));
  padding: 14px 16px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: rgba(13, 20, 32, 0.96);
  box-shadow: 0 20px 48px var(--shadow);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    overflow-x: auto;
  }

  .nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
  }

  #logoutBtn {
    margin-top: 0;
    margin-left: auto;
  }

  main {
    padding: 24px;
  }

  .plans-grid,
  .two-column,
  .build-form {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .topbar,
  .section-head,
  .order {
    display: grid;
  }

  .section,
  .login-panel {
    padding: 20px;
    border-radius: 20px;
  }
}
