.portal-shell {
  position: relative;
  min-height: 100svh;
  width: min(calc(100% - 48px), 1180px);
  margin: 0 auto;
  padding: calc(var(--header) + 90px) 0 110px;
  display: grid;
  place-items: center;
}
.portal-shell::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 640px;
  height: 460px;
  border-radius: 50%;
  background: rgba(56, 108, 151, .13);
  filter: blur(90px);
}
.auth-panel {
  width: min(520px, 100%);
  padding: 54px;
  border-radius: 34px 34px 76px 34px;
  background: linear-gradient(145deg, rgba(15, 25, 39, .92), rgba(4, 7, 12, .96));
  box-shadow: inset 0 0 0 1px rgba(210, 230, 250, .11), 0 38px 105px rgba(0, 0, 0, .38);
}
.auth-panel h1 { margin: 20px 0 16px; font-size: clamp(44px, 5vw, 64px); font-weight: 510; line-height: 1.02; letter-spacing: -.055em; }
.auth-panel > p:not(.section-label):not(.field-help) { margin: 0 0 34px; color: var(--text-soft); font-size: 15px; line-height: 1.7; }
.auth-panel label { margin-top: 20px; display: grid; gap: 9px; color: var(--text-soft); font-size: 12px; }
.auth-panel input {
  width: 100%;
  min-height: 50px;
  padding: 0 15px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: rgba(2, 5, 9, .72);
  color: var(--text);
  font: inherit;
}
.auth-panel input:focus { outline: 2px solid rgba(169, 237, 248, .45); outline-offset: 2px; border-color: var(--border-glow); }
.auth-panel .button { width: 100%; margin-top: 28px; border: 0; cursor: pointer; }
.field-help { margin: 10px 0 0; color: var(--text-faint); font-size: 11px; line-height: 1.55; }
.auth-links { margin-top: 24px; display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.auth-links a { color: var(--text-soft); font-size: 12px; }
.auth-links a:hover { color: var(--text); }

.account-page { width: min(calc(100% - 48px), 1180px); margin: 0 auto; padding: calc(var(--header) + 90px) 0 130px; }
.account-heading { padding: 70px 0 80px; display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: end; }
.account-heading h1 { margin: 20px 0 12px; font-size: clamp(56px, 7vw, 92px); font-weight: 510; letter-spacing: -.06em; }
.account-heading > div > p:last-child { color: var(--text-soft); }
.quiet-action { min-height: 42px; padding: 0 16px; border: 1px solid var(--border); border-radius: 12px; background: transparent; color: var(--text-soft); cursor: pointer; }
.account-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 34px; align-items: start; }
.account-section-head { margin-bottom: 24px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.account-section-head a { color: var(--accent-strong); font-size: 12px; }
.portal-license {
  margin-bottom: 28px;
  padding: 38px;
  border-radius: 28px 28px 64px 28px;
  background: linear-gradient(145deg, rgba(15, 25, 39, .88), rgba(4, 7, 12, .94));
  box-shadow: inset 0 0 0 1px rgba(210, 230, 250, .1), 0 28px 80px rgba(0, 0, 0, .26);
}
.portal-license-top { display: flex; justify-content: space-between; gap: 24px; align-items: start; }
.portal-license h2 { margin: 12px 0 0; font-size: 38px; font-weight: 510; letter-spacing: -.045em; }
.license-state, .perpetual { color: var(--accent-strong); font-family: "JetBrains Mono", monospace; font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.license-key-v2 { margin-top: 30px; padding: 18px; border: 1px solid rgba(210, 230, 250, .08); border-radius: 16px; background: rgba(2, 5, 9, .55); display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; }
.license-key-v2 span { grid-column: 1 / -1; color: var(--text-faint); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.license-key-v2 code { overflow-wrap: anywhere; color: var(--text-soft); }
.license-key-v2 button, .device-row-v2 button { border: 0; background: transparent; color: var(--accent-strong); cursor: pointer; }
.device-heading { margin: 32px 0 12px; display: flex; justify-content: space-between; }
.device-heading h3 { margin: 0; font-size: 17px; font-weight: 520; }
.device-heading span { color: var(--text-faint); font-size: 12px; }
.device-row-v2 { padding: 16px 0; display: grid; grid-template-columns: 1fr auto auto; gap: 18px; align-items: center; border-top: 1px solid rgba(210, 230, 250, .08); }
.device-row-v2 strong { display: block; font-size: 14px; }
.device-row-v2 small { color: var(--text-faint); }
.device-status { color: var(--text-faint); font-size: 11px; text-transform: uppercase; }
.portal-license-actions { margin-top: 28px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.portal-license-actions span { color: var(--text-faint); font-size: 11px; }
.orders-panel-v2 { position: sticky; top: calc(var(--header) + 24px); padding: 28px; border: 1px solid rgba(210, 230, 250, .09); border-radius: 24px; background: rgba(8, 13, 21, .72); }
.order-row-v2 { padding: 18px 0; display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid rgba(210, 230, 250, .08); }
.order-row-v2:first-of-type { margin-top: 18px; }
.order-row-v2 strong, .order-row-v2 small { display: block; }
.order-row-v2 small { margin-top: 5px; color: var(--text-faint); font-size: 10px; }
.order-row-v2 b { white-space: nowrap; }
.empty-state-v2 { padding: 70px 38px; text-align: center; border: 1px solid rgba(210, 230, 250, .09); border-radius: 32px 32px 72px 32px; }
.empty-state-v2 h2 { margin: 18px 0; font-size: 40px; font-weight: 510; }
.empty-state-v2 p { color: var(--text-soft); }
.empty-state-v2 .button { margin-top: 20px; }
.portal-toast { position: fixed; z-index: 100; left: 50%; bottom: 28px; transform: translateX(-50%); padding: 13px 18px; border: 1px solid var(--border); border-radius: 12px; background: rgba(8, 14, 22, .96); }

.result-shell-v2 { min-height: 100svh; width: min(calc(100% - 48px), 760px); margin: 0 auto; padding: calc(var(--header) + 110px) 0 120px; display: grid; align-content: center; text-align: center; }
.result-mark { width: 92px; height: 92px; margin: 0 auto 28px; display: grid; place-items: center; border: 1px solid var(--border-glow); border-radius: 50%; color: var(--accent); font-size: 40px; box-shadow: 0 0 60px rgba(86, 153, 198, .16); }
.result-shell-v2 h1 { margin: 20px 0; font-size: clamp(50px, 7vw, 78px); font-weight: 510; letter-spacing: -.055em; }
.result-shell-v2 > p:not(.section-label):not(.result-fineprint) { color: var(--text-soft); font-size: 17px; line-height: 1.7; }
.result-meta-v2 { margin: 30px auto; width: min(420px, 100%); padding: 20px; display: flex; justify-content: space-between; border: 1px solid rgba(210, 230, 250, .09); border-radius: 16px; }
.result-fineprint { margin-top: 24px; color: var(--text-faint); font-size: 11px; }

.legal-page-v2 { width: min(calc(100% - 48px), 860px); margin: 0 auto; padding: calc(var(--header) + 110px) 0 140px; }
.legal-page-v2 h1 { margin: 20px 0 36px; font-size: clamp(50px, 7vw, 82px); font-weight: 510; line-height: 1; letter-spacing: -.055em; }
.legal-page-v2 h2 { margin: 56px 0 16px; font-size: 30px; font-weight: 520; letter-spacing: -.035em; }
.legal-page-v2 p { color: var(--text-soft); font-size: 16px; line-height: 1.78; }
.legal-status-v2 { padding: 16px 18px; border: 1px solid rgba(169, 237, 248, .13); border-radius: 14px; background: rgba(10, 17, 27, .7); }
.legal-page-v2 hr { margin: 60px 0; border: 0; border-top: 1px solid rgba(210, 230, 250, .09); }

@media (max-width: 820px) {
  .account-layout { grid-template-columns: 1fr; }
  .orders-panel-v2 { position: static; }
}
@media (max-width: 640px) {
  .portal-shell, .account-page, .result-shell-v2, .legal-page-v2 { width: min(calc(100% - 32px), 1180px); }
  .auth-panel { padding: 42px 24px; border-radius: 26px 26px 58px 26px; }
  .auth-panel h1 { font-size: 44px; }
  .account-page { padding-top: calc(var(--header) + 48px); }
  .account-heading { padding: 50px 0; grid-template-columns: 1fr; }
  .account-heading h1 { font-size: 58px; }
  .portal-license { padding: 28px 20px; }
  .portal-license-top, .portal-license-actions { flex-direction: column; align-items: flex-start; }
  .portal-license h2 { font-size: 32px; }
  .license-key-v2 { grid-template-columns: 1fr; }
  .license-key-v2 button { justify-self: start; padding: 0; }
  .device-row-v2 { grid-template-columns: 1fr auto; }
  .device-row-v2 button { grid-column: 1 / -1; justify-self: start; padding: 0; }
  .result-shell-v2 h1 { font-size: 50px; }
  .legal-page-v2 h1 { font-size: 52px; }
}
