body.portal-body {
  margin: 0;
  min-height: 100vh;
  overflow-y: scroll;
  color: #f4f1e8;
  font-family: Georgia, "Times New Roman", serif;
  background-color: #181a1d;
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: auto, auto, cover;
  background-position: center top, center top, center top;
  background-attachment: fixed;
}

.portal-shell {
  width: 100%;
  padding: 0 0 16px;
}

.portal-content-shell {
  width: 100%;
  max-width: 1162px;
  margin: 14px auto 16px;
}

.portal-card,
.portal-topbar,
.portal-table,
.portal-provider-card,
.portal-callout {
  background: rgba(8, 8, 9, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
}

.portal-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 1162px;
  margin: 0 auto 14px;
}

.portal-brandlock {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
}

.portal-brand {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  color: #f8d98a;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

.portal-brand img {
  display: block;
  max-width: 210px;
  height: auto;
}

.portal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.portal-nav-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}

.portal-nav-wrap ul {
  width: auto;
}

.portal-nav-badge-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.portal-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(244, 241, 232, 0.72);
  font-size: 0.72rem;
  line-height: 1;
}

.portal-nav-badge.has-items {
  background: #d64040;
  color: #fff7f7;
}

.portal-btn,
.portal-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 0;
  border: 0;
  border-bottom: 0 solid rgb(255, 196, 0);
  color: #ffffff;
  text-decoration: none;
  background: transparent;
  line-height: 42px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  transition: 0.4s;
  white-space: nowrap;
  cursor: pointer;
}

.portal-btn:hover {
  color: rgb(255, 196, 0);
  background-color: #3d3f42;
  border-bottom-width: 2px;
}

.portal-btn-primary {
  color: rgb(255, 196, 0);
  background-color: #3d3f42;
  border-bottom-width: 2px;
  font-weight: 700;
}

.portal-btn-subtle,
.portal-btn-subtle:visited {
  color: rgba(255, 255, 255, 0.78);
}

.portal-btn-subtle:hover {
  color: rgb(255, 196, 0);
  background-color: #3d3f42;
}

.portal-btn-support,
.portal-btn-support:visited {
  min-height: 34px;
  padding: 0 12px;
  line-height: 34px;
  font-size: 11px;
  color: #f8d98a;
  background: rgba(248, 217, 138, 0.08);
  border: 1px solid rgba(248, 217, 138, 0.2);
  border-bottom-width: 1px;
}

.portal-btn-support:hover {
  color: #181a1d;
  background: #f8d98a;
  border-color: #f8d98a;
  border-bottom-width: 1px;
}

.portal-hero {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 24px;
  margin-bottom: 24px;
}

.portal-auth-shell {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 24px;
  align-items: start;
}

.portal-auth-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.portal-auth-context {
  margin-top: 0;
}

.portal-auth-context-copy {
  display: grid;
  gap: 14px;
  max-width: 82ch;
}

.portal-auth-context-copy p {
  margin: 0;
}

.portal-auth-intro,
.portal-auth-panel {
  padding-bottom: 24px;
}

.portal-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
}

.portal-overview-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-overview-stat {
  min-width: 120px;
  padding: 14px 16px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-overview-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 1.1rem;
  color: #f4f1e8;
}

.portal-overview-label {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.6);
}

.portal-card {
  padding: 24px 22px 32px;
  background: linear-gradient(180deg, rgba(11, 11, 12, 0.72) 0%, rgba(7, 7, 8, 0.62) 100%);
}

.portal-kicker {
  margin: 0 0 10px;
  color: #f8d98a;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.82rem;
}

.portal-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.05;
}

.portal-muted {
  color: rgba(244, 241, 232, 0.84);
}

.portal-login-grid,
.portal-provider-grid,
.portal-purchase-grid {
  display: grid;
  gap: 18px;
}

.portal-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.portal-list-panel {
  border-radius: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: none;
}

.portal-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 12px 16px;
  color: #f4f1e8;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.portal-list-row:last-child {
  border-bottom: 0;
}

.portal-list-row:hover {
  background: rgba(255, 255, 255, 0.06);
}

.portal-list-row-disabled {
  opacity: 0.5;
}

.portal-list-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.portal-list-action {
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 217, 138, 0.9);
}

.portal-login-grid,
.portal-provider-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.portal-provider-card {
  padding: 18px;
  background: rgba(255, 255, 255, 0.04);
}

.portal-provider-card-minimal {
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.portal-provider-link {
  display: contents;
}

.portal-provider-link:hover {
  color: inherit;
}

.portal-provider-link-disabled {
  opacity: 1;
}

.portal-provider-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #f8d98a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.portal-provider-icon svg {
  width: 28px;
  height: 28px;
}

.portal-provider-name {
  font-size: 1rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.portal-provider-caption {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.58);
}

.portal-login-grid-minimal,
.portal-provider-grid-minimal {
  grid-template-columns: 1fr;
}

.portal-connection-row {
  background: rgba(255, 255, 255, 0.02);
}

.portal-connection-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.portal-connection-side {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.portal-provider-state {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.portal-provider-state.is-connected {
  background: #79d98c;
  box-shadow: 0 0 0 6px rgba(121, 217, 140, 0.12);
}

.portal-provider-state.is-idle {
  background: rgba(255, 255, 255, 0.26);
}

.portal-provider-state.is-warning {
  background: #e2b35a;
  box-shadow: 0 0 0 6px rgba(226, 179, 90, 0.12);
}

.portal-provider-card h3 {
  margin: 0 0 10px;
  color: #f8d98a;
}

.portal-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(248, 217, 138, 0.12);
  color: #f8d98a;
  font-size: 0.82rem;
}

.portal-badge-neutral {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 241, 232, 0.74);
}

.portal-callout {
  margin-bottom: 18px;
  padding: 16px 18px;
  background: rgba(255, 255, 255, 0.04);
}

.portal-callout-error {
  border-color: rgba(231, 88, 88, 0.36);
  color: #ffd0d0;
}

.portal-callout-success {
  border-color: rgba(120, 197, 128, 0.36);
  color: #d8ffd8;
}

.portal-alert-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
}

.portal-alert {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(15, 16, 18, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(10px);
  animation: portal-alert-enter 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
  transform-origin: top right;
}

.portal-alert-success {
  border-color: rgba(120, 197, 128, 0.42);
  background: linear-gradient(180deg, rgba(18, 38, 24, 0.98), rgba(10, 16, 12, 0.98));
}

.portal-alert-error {
  border-color: rgba(231, 88, 88, 0.46);
  background: linear-gradient(180deg, rgba(54, 18, 18, 0.98), rgba(18, 10, 10, 0.98));
}

.portal-alert-copy {
  flex: 1 1 auto;
  color: #fff8ee;
  line-height: 1.6;
  font-size: 14px;
}

.portal-alert-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(244, 241, 232, 0.76);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.portal-alert-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.portal-alert.is-dismissing {
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 0.42s ease,
    transform 0.42s ease;
  pointer-events: none;
}

@keyframes portal-alert-enter {
  from {
    opacity: 0;
    transform: translateY(-12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.portal-login-note {
  display: flex;
  align-items: center;
  min-height: 100%;
  padding: 18px 20px;
  border-radius: 0;
  background: rgba(8, 8, 10, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(244, 241, 232, 0.86);
  font-size: 1rem;
  line-height: 1.7;
}

.portal-bridge-card {
  max-width: 520px;
  margin: 0 auto 18px;
}

.portal-section {
  margin-top: 24px;
}

.portal-ticket-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
  gap: 24px;
}

.portal-ticket-sidebar,
.portal-ticket-detail {
  min-height: 540px;
}

.portal-ticket-sidebar-head,
.portal-ticket-thread-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.portal-ticket-filters {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.portal-ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-ticket-list-item {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 100%;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: #f4f1e8;
  text-align: left;
  text-decoration: none;
  box-sizing: border-box;
}

.portal-ticket-list-item.is-active {
  border-color: rgba(248, 217, 138, 0.32);
  background: rgba(248, 217, 138, 0.08);
}

.portal-ticket-list-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
}

.portal-ticket-list-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.portal-ticket-list-head strong {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.portal-ticket-list-product,
.portal-ticket-list-preview,
.portal-ticket-list-meta {
  color: rgba(244, 241, 232, 0.72);
  font-size: 0.92rem;
}

.portal-ticket-list-preview {
  color: rgba(244, 241, 232, 0.84);
}

.portal-ticket-unread-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #d64040;
  box-shadow: 0 0 0 6px rgba(214, 64, 64, 0.16);
}

.portal-ticket-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-ticket-chip.is-open {
  background: rgba(121, 217, 140, 0.1);
  color: #d3f1da;
  border: 1px solid rgba(121, 217, 140, 0.2);
}

.portal-ticket-chip.is-muted {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 241, 232, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 420px;
  max-height: 420px;
  overflow-y: auto;
  padding: 0 12px 18px 0;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: rgba(248, 217, 138, 0.45) rgba(255, 255, 255, 0.06);
  margin-bottom: 18px;
}

.portal-ticket-thread::-webkit-scrollbar {
  width: 12px;
}

.portal-ticket-thread::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.06);
}

.portal-ticket-thread::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(248, 217, 138, 0.72), rgba(198, 149, 53, 0.78));
  border: 2px solid rgba(15, 16, 18, 0.9);
}

.portal-ticket-thread::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 236, 185, 0.88), rgba(230, 180, 75, 0.92));
}

.portal-ticket-thread-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.portal-ticket-user-link,
.portal-ticket-user-link:visited {
  color: #f8d98a;
  text-decoration: none;
  font-weight: 700;
}

.portal-ticket-user-link:hover {
  color: #fff1c2;
  text-decoration: underline;
}

.portal-ticket-message {
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.portal-ticket-message.is-admin {
  border-color: rgba(248, 217, 138, 0.2);
  background: rgba(248, 217, 138, 0.06);
}

.portal-ticket-message-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: rgba(244, 241, 232, 0.74);
  font-size: 0.86rem;
}

.portal-ticket-message-body {
  word-break: break-word;
  line-height: 1.7;
}

.portal-ticket-message-body > *:first-child {
  margin-top: 0;
}

.portal-ticket-message-body > *:last-child {
  margin-bottom: 0;
}

.portal-ticket-message-body p,
.portal-ticket-message-body ul,
.portal-ticket-message-body ol,
.portal-ticket-message-body pre,
.portal-ticket-message-body blockquote,
.portal-ticket-message-body h1,
.portal-ticket-message-body h2,
.portal-ticket-message-body h3 {
  margin: 0 0 14px;
}

.portal-ticket-message-body ul,
.portal-ticket-message-body ol {
  padding-left: 22px;
}

.portal-ticket-message-body code {
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8d98a;
  font-size: 0.92em;
}

.portal-ticket-message-body pre {
  overflow-x: auto;
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.34);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-ticket-message-body pre code {
  padding: 0;
  background: transparent;
  color: #f4f1e8;
}

.portal-ticket-message-body blockquote {
  padding-left: 16px;
  border-left: 3px solid rgba(248, 217, 138, 0.4);
  color: rgba(244, 241, 232, 0.8);
}

.portal-ticket-message-body a,
.portal-ticket-message-body a:visited {
  color: #f8d98a;
  text-decoration: none;
}

.portal-ticket-message-body a:hover {
  color: #fff1c2;
  text-decoration: underline;
}

.portal-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 24px;
}

.portal-profile-note {
  margin: 0;
}

.portal-profile-note a,
.portal-profile-note a:visited {
  color: #f8d98a;
  text-decoration: none;
}

.portal-profile-note a:hover {
  color: #fff1c2;
  text-decoration: underline;
}

.portal-ticket-compose {
  display: grid;
  gap: 16px;
}

.portal-ticket-reply-form {
  margin-top: 16px;
}

.portal-ticket-inline-compose {
  margin-bottom: 18px;
}

.portal-ticket-compose-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

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

.portal-field span {
  color: rgba(244, 241, 232, 0.76);
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-field input,
.portal-field select,
.portal-field textarea {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f4f1e8;
  padding: 12px 14px;
  border-radius: 0;
}

.portal-field select {
  appearance: none;
  background-color: rgba(255, 255, 255, 0.04);
  color: #f4f1e8;
}

.portal-field select option {
  background: #181a1d;
  color: #f4f1e8;
}

.portal-field textarea {
  resize: vertical;
  min-height: 120px;
}

.portal-char-counter {
  color: rgba(244, 241, 232, 0.58);
  font-size: 0.82rem;
  text-align: right;
}

.portal-empty-state-compact {
  min-height: 160px;
}

.portal-admin-user-row {
  align-items: center;
}

.portal-admin-user-stats {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.portal-admin-info-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.portal-admin-info-grid .portal-callout {
  min-width: 0;
}

.portal-admin-info-grid .portal-callout p,
.portal-admin-info-grid .portal-callout div,
.portal-admin-info-grid .portal-callout strong,
.portal-admin-identity {
  word-break: break-word;
}

.portal-admin-identity {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-admin-identity:first-of-type {
  padding-top: 0;
  margin-top: 12px;
}

.portal-diagnostic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.portal-diagnostic-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.portal-diagnostic-card .portal-muted,
.portal-diagnostic-card .portal-small {
  line-height: 1.08;
}

.portal-diagnostic-head,
.portal-diagnostic-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.portal-diagnostic-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.portal-diagnostic-item {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 5px;
}

.portal-diagnostic-summary {
  font-size: 0.84rem;
  line-height: 1.02;
  opacity: 0.82;
}

.portal-provider-state-chip--subtle {
  padding: 3px 8px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  opacity: 0.86;
}

.portal-admin-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-admin-actions .portal-ticket-compose {
  margin: 0;
}

.portal-controller {
  margin-top: 24px;
  border-radius: 0;
  background: linear-gradient(180deg, rgba(11, 11, 12, 0.72) 0%, rgba(7, 7, 8, 0.62) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
  overflow: hidden;
}

.portal-controller-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 18px 0;
}

.portal-tabs {
  display: inline-flex;
  flex: 1 1 auto;
  gap: 8px;
  padding: 8px 0 0;
  margin-top: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.portal-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 0;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(244, 241, 232, 0.7);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.4s;
  text-decoration: none;
}

.portal-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  font-size: 0.74rem;
  letter-spacing: 0;
}

.portal-tab.is-active {
  background: #3d3f42;
  color: rgb(255, 196, 0);
  box-shadow: none;
  border-bottom-color: rgb(255, 196, 0);
}

.portal-tab-panel {
  margin-top: 0;
}

.portal-controller-body {
  padding: 0 18px 18px;
}

.portal-tab-loading,
.portal-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 320px;
  text-align: center;
}

.portal-tab-loading[hidden] {
  display: none;
}

.portal-tab-loading .portal-section-title,
.portal-empty-state .portal-section-title {
  margin-bottom: 0;
}

.portal-tab-loading .portal-muted,
.portal-empty-state .portal-muted {
  max-width: 48ch;
  margin: 0;
}

.portal-tab-loading-spinner {
  width: 42px;
  height: 42px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: #f8d98a;
  border-radius: 999px;
  animation: portal-spin 0.9s linear infinite;
}

.portal-controller-note {
  flex: 0 0 auto;
  margin: 0 0 10px auto;
  color: rgba(244, 241, 232, 0.66);
  font-size: 0.92rem;
  text-align: right;
}

.portal-tab-shell,
.portal-purchases-panel {
  padding: 22px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.portal-panel-head {
  display: block;
  margin-bottom: 18px;
}

.portal-panel-note {
  margin-top: 8px;
  max-width: 64ch;
}

.portal-legal-note {
  font-size: 0.95rem;
  line-height: 1.7;
}

.portal-legal-note b,
.portal-legal-note strong,
.portal-legal-note a,
.portal-legal-note a:visited {
  color: #f8d98a;
}

.portal-sync-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 8, 0.72);
  backdrop-filter: blur(10px);
}

.portal-sync-overlay[hidden] {
  display: none !important;
}

.portal-sync-dialog {
  width: min(520px, 100%);
  padding: 28px 24px;
  background: linear-gradient(180deg, rgba(18, 18, 20, 0.96), rgba(10, 10, 12, 0.94));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
}

.portal-diagnostic-dialog {
  width: min(1220px, 100%);
  max-height: min(84vh, 920px);
  overflow-y: auto;
  position: relative;
}

.portal-diagnostic-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  background: transparent;
  border: 0;
  color: rgba(244, 241, 232, 0.75);
  font-size: 1.2rem;
  cursor: pointer;
}

.portal-sync-spinner {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border: 3px solid rgba(255, 255, 255, 0.14);
  border-top-color: #f8d98a;
  border-radius: 999px;
  animation: portal-spin 0.9s linear infinite;
}

.portal-sync-dialog .portal-kicker,
.portal-sync-dialog .portal-section-title,
.portal-sync-dialog .portal-muted {
  text-align: center;
}

.portal-sync-provider-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 18px;
}

.portal-sync-provider {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-sync-provider.is-active {
  border-color: rgba(248, 217, 138, 0.28);
  background: rgba(248, 217, 138, 0.08);
}

.portal-sync-provider.is-success {
  border-color: rgba(121, 217, 140, 0.22);
  background: rgba(121, 217, 140, 0.08);
}

.portal-sync-provider.is-error {
  border-color: rgba(231, 88, 88, 0.24);
  background: rgba(231, 88, 88, 0.08);
}

.portal-sync-provider-name {
  color: #f4f1e8;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.portal-sync-provider-state {
  color: rgba(244, 241, 232, 0.72);
  font-size: 0.82rem;
  text-align: right;
}

@keyframes portal-spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.portal-section h2 {
  margin: 0 0 14px;
  color: #f8d98a;
}

.portal-purchase-grid {
  grid-template-columns: 1fr;
}

.portal-purchase-card {
  display: grid;
  grid-template-columns: 116px minmax(0, 1fr);
  gap: 18px;
  padding: 18px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-purchase-card img {
  width: 116px;
  height: 116px;
  object-fit: cover;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.05);
}

.portal-purchase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.portal-purchase-head h3 {
  margin: 0;
  color: #f4f1e8;
}

.portal-provider-tag {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(248, 217, 138, 0.1);
  border: 1px solid rgba(248, 217, 138, 0.2);
  color: #f8d98a;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-provider-tag-link,
.portal-provider-tag-link:visited {
  display: inline-flex;
  align-items: center;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  line-height: inherit;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.portal-provider-tag-link:hover {
  background: rgba(248, 217, 138, 0.18);
  border-color: rgba(248, 217, 138, 0.32);
  color: #fff4d3;
}

.portal-provider-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.portal-provider-tag-platform {
  min-height: 30px;
  font-size: 0.7rem;
}

.portal-purchase-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0;
}

.portal-purchase-platform-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.portal-purchase-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 16px;
}

.portal-purchase-platform {
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-purchase-platform:first-child {
  padding-top: 0;
  border-top: 0;
}

.portal-purchase-platform-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.portal-purchase-platform-label {
  display: inline-block;
  color: rgba(242, 213, 136, 0.92);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}

.portal-purchase-meta div {
  padding: 12px 14px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-purchase-meta dt {
  margin: 0 0 4px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.54);
}

.portal-purchase-meta dd {
  margin: 0;
  color: #f4f1e8;
  word-break: break-word;
}

.portal-provider-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 0;
  padding: 0;
}

.portal-provider-actions-inline {
  justify-content: flex-end;
}

.portal-form-inline {
  display: inline;
}

.portal-btn[aria-disabled='true'] {
  cursor: default;
}

.portal-small {
  font-size: 0.9rem;
}

.portal-account-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.portal-account-meta span {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(244, 241, 232, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-purchases-panel {
  padding: 22px;
}

.portal-section-heading {
  margin-bottom: 16px;
}

.portal-section-title {
  margin: 0;
  color: #f4f1e8;
  font-size: 1.5rem;
}

.portal-topbar-account {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  min-height: 42px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-topbar-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(244, 241, 232, 0.58);
}

.portal-topbar-user {
  font-size: 0.95rem;
  color: #f4f1e8;
}

.portal-provider-state-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(244, 241, 232, 0.86);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.portal-provider-state-chip.is-connected {
  color: #cdeed5;
  border-color: rgba(121, 217, 140, 0.18);
  background: rgba(121, 217, 140, 0.08);
}

.portal-provider-state-chip.is-warning {
  color: #f4deae;
  border-color: rgba(226, 179, 90, 0.2);
  background: rgba(226, 179, 90, 0.08);
}

.portal-body .wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.portal-body .publisher-shell {
  max-width: 1120px;
}

.portal-body .portal-shell {
  width: 100%;
  flex: 1 0 auto;
}

.portal-body .footer {
  flex: 0 0 auto;
  margin-top: 0;
}

.portal-tab-panel {
  min-height: 320px;
}

@media (max-width: 900px) {
  .portal-hero,
  .portal-auth-shell,
  .portal-overview {
    grid-template-columns: 1fr;
  }

  .portal-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-brandlock {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .portal-actions,
  .portal-nav-wrap {
    justify-content: flex-start;
  }

  .portal-purchase-meta {
    grid-template-columns: 1fr;
  }

  .portal-controller-head {
    flex-direction: column;
    align-items: stretch;
    padding: 14px 14px 0;
  }

  .portal-alert-stack {
    top: 16px;
    right: 16px;
    left: 16px;
    width: auto;
  }

  .portal-list-row,
  .portal-connection-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-connection-side {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .portal-controller-body {
    padding: 0 14px 14px;
  }

  .portal-controller-note {
    margin: 0;
    text-align: left;
  }

  .portal-purchase-card {
    grid-template-columns: 1fr;
  }

  .portal-ticket-layout,
  .portal-admin-info-grid,
  .portal-profile-grid {
    grid-template-columns: 1fr;
  }

  .portal-ticket-sidebar-head,
  .portal-ticket-thread-head {
    flex-direction: column;
  }

  .portal-admin-user-stats {
    justify-content: flex-start;
  }

  .portal-purchase-card img {
    width: 100%;
    max-width: 180px;
    height: auto;
  }

  .portal-purchase-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-provider-tags {
    justify-content: flex-start;
  }
}
