:root {
  --portal-bg: #0b1114;
  --portal-surface: rgba(17, 26, 31, 0.84);
  --portal-surface-strong: #131d22;
  --portal-line: rgba(255, 255, 255, 0.08);
  --portal-text: #edf2ef;
  --portal-muted: #a6b3b8;
  --portal-brand: #e46701;
  --portal-brand-hot: #ff8e2a;
  --portal-accent: #d9f45c;
  --portal-danger: #f27b7b;
  --portal-warning: #f2c96b;
  --portal-success: #70d0a1;
  --portal-shadow: 0 28px 70px rgba(0, 0, 0, 0.32);
  --portal-radius: 28px;
  --portal-max: 1220px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Sora", "Avenir Next", "Segoe UI", sans-serif;
  color: var(--portal-text);
  background:
    radial-gradient(circle at top left, rgba(228, 103, 1, 0.22), transparent 24%),
    radial-gradient(circle at 84% 8%, rgba(217, 244, 92, 0.08), transparent 18%),
    linear-gradient(180deg, #0a0f12 0%, #10181d 100%);
}

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

code {
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.portal-shell {
  min-height: 100vh;
}

.portal-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--portal-line);
  background:
    linear-gradient(90deg, rgba(12, 18, 21, 0.94), rgba(12, 18, 21, 0.8)),
    radial-gradient(circle at 20% 50%, rgba(228, 103, 1, 0.2), transparent 24%);
}

.portal-header__inner,
.portal-main,
.portal-footer__inner {
  width: min(calc(100% - 2rem), var(--portal-max));
  margin: 0 auto;
}

.portal-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.portal-brand__logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--portal-brand), var(--portal-brand-hot));
  color: #fff;
  font-weight: 800;
  box-shadow: 0 16px 36px rgba(228, 103, 1, 0.28);
}

.portal-brand__copy {
  display: flex;
  flex-direction: column;
  gap: 0.18rem;
}

.portal-brand__copy strong {
  font-size: 1.25rem;
}

.portal-brand__copy span {
  color: var(--portal-muted);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.portal-nav__link {
  padding: 0.8rem 1rem;
  border-radius: 999px;
  color: var(--portal-muted);
  transition: 180ms ease;
}

.portal-nav__link:hover,
.portal-nav__link.is-active {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.portal-user {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.portal-user__meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.12rem;
}

.portal-user__meta span {
  color: var(--portal-muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-main {
  padding: 2rem 0 3rem;
}

.portal-footer {
  border-top: 1px solid var(--portal-line);
  background: rgba(7, 11, 13, 0.72);
}

.portal-footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0 1.4rem;
  color: var(--portal-muted);
  font-size: 0.92rem;
}

.portal-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.2rem;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.portal-button:hover {
  transform: translateY(-1px);
}

.portal-button--primary {
  background: linear-gradient(135deg, var(--portal-brand), var(--portal-brand-hot));
  color: #fff;
  box-shadow: 0 18px 42px rgba(228, 103, 1, 0.24);
}

.portal-button--ghost {
  border: 1px solid var(--portal-line);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.eyebrow,
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  color: var(--portal-brand-hot);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before,
.kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  background: currentColor;
}

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

h1 {
  font-size: clamp(2.5rem, 5vw, 4.8rem);
  line-height: 0.98;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 2vw, 2rem);
  line-height: 1.08;
  margin-bottom: 0.9rem;
}

p,
li,
td,
th,
label span {
  line-height: 1.7;
}

p,
li {
  color: var(--portal-muted);
}

.portal-hero,
.portal-section-head,
.portal-grid,
.portal-note-grid,
.login-grid {
  display: grid;
  gap: 1.25rem;
}

.portal-hero {
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  align-items: stretch;
  margin-bottom: 1.5rem;
}

.portal-hero__copy,
.portal-hero__status,
.portal-card,
.portal-tile,
.login-card,
.portal-form,
.status-card {
  border: 1px solid var(--portal-line);
  border-radius: var(--portal-radius);
  background:
    linear-gradient(180deg, rgba(22, 32, 38, 0.94), rgba(15, 24, 29, 0.9)),
    radial-gradient(circle at top right, rgba(228, 103, 1, 0.12), transparent 34%);
  box-shadow: var(--portal-shadow);
}

.portal-hero__copy,
.portal-card,
.login-card {
  padding: 1.8rem;
}

.portal-hero__status {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.status-card {
  padding: 1.2rem;
}

.status-card span {
  display: block;
  color: var(--portal-muted);
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.status-card strong {
  display: block;
  margin-top: 0.4rem;
  font-size: 1.15rem;
}

.portal-grid--summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 1.5rem;
}

.portal-grid--double,
.portal-note-grid,
.login-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portal-card--accent {
  background:
    linear-gradient(160deg, rgba(228, 103, 1, 0.18), rgba(16, 22, 25, 0.94)),
    radial-gradient(circle at top right, rgba(217, 244, 92, 0.14), transparent 36%);
}

.portal-link {
  display: inline-flex;
  margin-top: 1rem;
  color: #fff;
  font-weight: 700;
}

.portal-link::after {
  content: ">";
  margin-left: 0.55rem;
  color: var(--portal-brand-hot);
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.portal-steps,
.portal-list {
  margin: 0;
  padding-left: 1.2rem;
}

.portal-alert {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 20px;
  border: 1px solid var(--portal-line);
}

.portal-alert--warning {
  background: rgba(242, 201, 107, 0.12);
  color: #ffe2a0;
}

.portal-alert--danger {
  background: rgba(242, 123, 123, 0.12);
  color: #ffc1c1;
}

.portal-alert--success {
  background: rgba(112, 208, 161, 0.12);
  color: #c3ffd8;
}

.portal-form {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  margin: 1.2rem 0 1.4rem;
}

.portal-form--compact {
  margin-bottom: 0;
}

.portal-form label {
  display: grid;
  gap: 0.45rem;
}

.portal-form input {
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
}

.portal-form select {
  width: 100%;
  min-height: 52px;
  padding: 0 1rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font: inherit;
}

.portal-form input:focus {
  outline: 2px solid rgba(255, 142, 42, 0.46);
  outline-offset: 2px;
}

.portal-form select:focus {
  outline: 2px solid rgba(255, 142, 42, 0.46);
  outline-offset: 2px;
}

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

.login-card {
  width: min(100%, 960px);
}

.login-lead {
  max-width: 62ch;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
}

.portal-table-wrap {
  overflow-x: auto;
  margin-top: 1rem;
}

.portal-table th,
.portal-table td {
  padding: 0.9rem 0.75rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
}

.portal-table th {
  color: #fff;
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.portal-table__empty {
  color: var(--portal-muted);
  text-align: center;
}

.portal-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 0.72rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-help {
  margin: 1rem 0 0;
}

.portal-code {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--portal-line);
  border-radius: 18px;
  background: rgba(0, 0, 0, 0.24);
  color: #fff;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 1080px) {
  .portal-hero,
  .portal-grid--summary,
  .portal-grid--double,
  .portal-note-grid,
  .login-grid {
    grid-template-columns: 1fr 1fr;
  }

  .portal-header__inner {
    flex-wrap: wrap;
  }

  .portal-nav {
    order: 3;
    width: 100%;
  }
}

@media (max-width: 820px) {
  .portal-hero,
  .portal-grid--summary,
  .portal-grid--double,
  .portal-note-grid,
  .login-grid {
    grid-template-columns: 1fr;
  }

  .portal-user,
  .portal-footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-user__meta {
    align-items: flex-start;
  }
}

@media (max-width: 560px) {
  .portal-header__inner,
  .portal-main,
  .portal-footer__inner {
    width: min(calc(100% - 1rem), var(--portal-max));
  }

  .portal-brand__logo {
    width: 50px;
    height: 50px;
    border-radius: 16px;
  }

  .portal-brand__copy strong {
    font-size: 1.05rem;
  }

  .portal-brand__copy span {
    font-size: 0.68rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .portal-nav__link,
  .portal-button {
    width: 100%;
  }
}
