/* Account portal — login, dashboard, reset */
.account-page {
  padding: calc(var(--header-h) + 2.5rem) 0 4rem;
  min-height: 60vh;
}

.account-page__back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  text-decoration: none;
}

.account-page__back:hover {
  color: var(--blue);
}

.account-card {
  max-width: 440px;
  margin: 0 auto;
  padding: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.account-page--portal {
  padding-bottom: 3rem;
}

.container--portal {
  max-width: 1200px;
}

/* Login / register auth card */
.account-auth {
  max-width: 440px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.account-card--auth {
  margin: 0;
  padding: 2rem 2rem 1.75rem;
  border: 1px solid rgba(0, 200, 255, 0.22);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.35),
    0 18px 48px rgba(0, 0, 0, 0.45),
    0 0 32px rgba(0, 200, 255, 0.06);
}

.account-card--auth .account-card__title {
  margin-bottom: 0.5rem;
}

.account-card--auth .account-card__lead {
  margin-bottom: 0;
  line-height: 1.55;
}

.account-auth__head {
  margin-bottom: 1.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}

.account-auth__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.account-auth-alerts {
  margin: -0.5rem 0 1.25rem;
}

.account-auth-alerts .account-status {
  margin: 0 0 0.5rem;
  padding: 0.65rem 0.75rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
}

.account-auth-alerts .account-status.is-error {
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.account-auth-alerts .account-status.is-success {
  background: rgba(94, 232, 154, 0.08);
  border: 1px solid rgba(94, 232, 154, 0.22);
}

.account-form--login .account-check,
.account-form--register .account-check {
  margin-bottom: 1.35rem;
}

.account-form__submit {
  margin-top: 0.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.account-auth-oauth {
  margin-top: 0.15rem;
}

.account-auth-divider {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0 0.9rem;
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: lowercase;
}

.account-auth-divider::before,
.account-auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.account-auth-divider span {
  flex-shrink: 0;
  padding: 0 0.2rem;
}

.account-auth-oauth__icon {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-bottom: 0.15rem;
}

.account-discord-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  background: #5865f2;
  color: #fff;
  border: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease;
  text-decoration: none;
  line-height: 0;
}

.account-discord-icon-btn:hover {
  background: #4752c4;
  color: #fff;
  box-shadow: 0 2px 10px rgba(88, 101, 242, 0.35);
}

.account-discord-icon-btn:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 3px;
}

.account-discord-icon-btn__svg {
  display: block;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

.account-form__status {
  margin-top: 1rem;
  text-align: center;
}

.account-form__footer {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--border);
}

.account-card--forgot {
  margin: 0;
}

.portal-link-accounts {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.portal-link-card {
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  padding: 1rem 1.1rem;
}

.portal-link-card--discord {
  border-color: rgba(88, 101, 242, 0.35);
}

.portal-link-card__head {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem 1rem;
  align-items: center;
}

.portal-link-card__brand {
  color: #5865f2;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portal-link-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.portal-link-card__desc {
  margin: 0.25rem 0 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.portal-link-card__desc strong {
  color: var(--text);
}

.portal-link-card__action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.account-forgot[hidden] {
  display: none !important;
}

/* —— Client portal (dark theme — matches site) —— */
.client-portal {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  min-height: 520px;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  box-shadow: 0 0 40px rgba(0, 200, 255, 0.08);
}

.client-portal__sidebar {
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  background: var(--bg-elevated);
  border-right: 1px solid var(--border);
}

.client-portal__sidebar-head {
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.client-portal__eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
}

.client-portal__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
}

.client-portal__meta {
  margin: 0.5rem 0 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.client-portal__meta strong {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.06em;
}

.client-portal__nav {
  flex: 1;
  padding: 1rem 0;
}

.client-portal__nav-label {
  margin: 0.75rem 1.25rem 0.35rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.client-portal__nav-label:first-child {
  margin-top: 0;
}

.client-portal__nav-btn {
  display: block;
  width: 100%;
  padding: 0.55rem 1.25rem;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  text-align: left;
  color: var(--text-muted);
  background: transparent;
  border: none;
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.client-portal__nav-btn:hover {
  background: rgba(0, 200, 255, 0.06);
  color: var(--text);
}

.client-portal__nav-btn.is-active {
  color: var(--blue);
  background: rgba(0, 200, 255, 0.1);
  border-left-color: var(--blue);
  font-weight: 600;
}

.client-portal__nav-btn--muted {
  color: var(--text-muted);
}

.client-portal__nav-btn--muted:hover {
  color: var(--text);
}

.client-portal__sidebar-foot {
  padding: 1rem 0 0;
  border-top: 1px solid var(--border);
}

.client-portal__main {
  position: relative;
  padding: 1.75rem 2rem 5.5rem;
  background: var(--bg-card);
  overflow: hidden;
}

.portal-ip-status {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 20;
  max-width: 16rem;
}

.portal-ip-status__card {
  padding: 0.75rem 1rem;
  background: rgba(8, 10, 18, 0.92);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
}

.portal-ip-status__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.portal-ip-status__ip {
  margin: 0;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--blue);
  word-break: break-all;
}

.portal-ip-status__meta {
  margin: 0.35rem 0 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.portal-ip-status__vpn {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.portal-ip-status__vpn-icon {
  flex-shrink: 0;
  color: #f5c542;
  line-height: 0;
}

.portal-ip-status__vpn-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  font-size: 0.75rem;
  color: var(--text);
}

.portal-ip-status__vpn-text strong {
  color: #f5c542;
  font-weight: 600;
}

.portal-ip-status__vpn-text span {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--blue);
  word-break: break-all;
}

@media (max-width: 768px) {
  .portal-ip-status {
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
    max-width: none;
  }
}

.client-portal__header {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.client-portal__page-title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.client-portal__page-lead {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.client-portal__page-lead strong {
  color: var(--text);
}

.client-portal__panel {
  display: none;
}

.client-portal__panel.is-active {
  display: block;
}

.client-portal__panel[hidden] {
  display: none !important;
}

.portal-rows {
  background: var(--bg);
  border: 1px solid var(--border);
}

.portal-rows--spaced {
  margin-top: 1rem;
}

.portal-rows--dense .portal-row {
  padding: 0.65rem 1.25rem;
}

.portal-row {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr auto;
  gap: 0.75rem 1rem;
  align-items: center;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

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

.portal-row--stack {
  grid-template-columns: minmax(140px, 200px) 1fr auto;
  align-items: start;
}

.portal-row__label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.portal-row__value {
  font-size: 0.92rem;
  color: var(--text);
  word-break: break-word;
}

.portal-row__value code {
  color: var(--blue);
}

.portal-row__value--mono {
  font-family: ui-monospace, monospace;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.portal-row__value--break code {
  font-size: 0.8rem;
  word-break: break-all;
  color: var(--text-muted);
}

.portal-row__hint {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.portal-row__action {
  padding: 0.35rem 0.75rem;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
}

.portal-row__action:hover {
  border-color: var(--blue);
  color: var(--blue);
  background: rgba(0, 200, 255, 0.08);
}

.portal-row__action:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.portal-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.portal-badge--ok {
  color: #5ee89a;
  background: rgba(94, 232, 154, 0.12);
  border: 1px solid rgba(94, 232, 154, 0.25);
}

.portal-badge--warn {
  color: var(--gold-light);
  background: rgba(212, 175, 55, 0.12);
  border: 1px solid rgba(212, 175, 55, 0.28);
}

.portal-drawer {
  margin-top: 1rem;
  padding: 1.25rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 3px solid var(--blue);
}

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

.portal-drawer__title {
  margin: 0 0 1rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text);
}

.portal-drawer__body .account-field label {
  color: var(--text-muted);
}

.portal-drawer__body .account-field input {
  background: var(--bg);
  border-color: var(--border);
  color: var(--text);
}

.portal-drawer__body .account-field input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.portal-panel-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.portal-panel-toolbar__text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.portal-panel-toolbar__text--solo {
  margin-bottom: 1rem;
}

/* —— Subscriptions table (WHMCS-style, dark theme) —— */
.subs-datatable {
  border: 1px solid var(--border);
  background: var(--bg);
}

.subs-datatable__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.subs-datatable__info {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subs-datatable__search input {
  min-width: 180px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-size: 0.88rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.subs-datatable__search input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.subs-datatable__scroll {
  overflow-x: auto;
}

.subs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.subs-table thead tr {
  border-bottom: 2px solid rgba(94, 232, 154, 0.45);
}

.subs-table th {
  padding: 0.75rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  background: var(--bg-card);
  white-space: nowrap;
}

.subs-table__row td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
}

.subs-table__row:hover td {
  background: rgba(0, 200, 255, 0.04);
}

.subs-table__row.is-open td {
  background: rgba(0, 200, 255, 0.06);
  border-bottom-color: transparent;
}

.subs-table__empty td {
  padding: 2rem 1rem;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-card);
}

.subs-table__product-btn {
  display: block;
  width: 100%;
  padding: 0;
  font: inherit;
  text-align: left;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.subs-table__product-btn:hover .subs-table__product-name,
.subs-table__product-btn:focus-visible .subs-table__product-name {
  color: var(--blue);
}

.subs-table__product-name {
  display: block;
  font-weight: 700;
  color: var(--text);
}

.subs-table__product-host {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.82rem;
  color: var(--blue);
}

.subs-table__product-host--muted {
  color: var(--text-muted);
}

.subs-table__plan-primary {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.subs-table__plan-secondary {
  display: block;
  margin-top: 0.1rem;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.subs-table__due {
  color: var(--text);
  white-space: nowrap;
}

.subs-status {
  display: inline-block;
  min-width: 5.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  text-transform: capitalize;
  letter-spacing: 0.02em;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.subs-status--active {
  color: #5ee89a;
  border-color: rgba(94, 232, 154, 0.35);
}

.subs-status--pending {
  color: var(--gold-light);
  border-color: rgba(212, 175, 55, 0.35);
}

.subs-status--inactive {
  color: #ff8a8a;
  border-color: rgba(255, 107, 107, 0.35);
}

.subs-table__detail td {
  padding: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.subs-table__detail[hidden] {
  display: none;
}

.subs-detail {
  padding: 0.5rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.subs-detail__title {
  margin: 0.75rem 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.subs-detail__link {
  color: var(--blue);
  word-break: break-all;
}

.subs-detail__link:hover {
  text-decoration: underline;
}

.subs-datatable__footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.subs-datatable__pagesize select {
  margin: 0 0.25rem;
  padding: 0.25rem 0.4rem;
  font: inherit;
  font-size: 0.85rem;
  color: var(--text);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.subs-pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.subs-pagination__btn {
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.subs-pagination__btn:hover:not(:disabled) {
  color: var(--text);
  border-color: var(--blue);
}

.subs-pagination__btn.is-active {
  color: var(--text);
  background: var(--bg);
  border-color: var(--blue);
  font-weight: 600;
}

.subs-pagination__btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* —— Account details (dense — all fields, side-by-side) —— */
.client-portal__header--compact {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
}

.client-portal__header--compact .client-portal__page-title {
  font-size: 1.35rem;
}

.client-portal__panel--compact {
  padding-top: 0;
}

.client-portal__main:has(#account-panel-profile.is-active) {
  padding-top: 1rem;
  padding-bottom: 1.25rem;
}

.account-breadcrumb {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.account-breadcrumb a {
  color: var(--blue);
  text-decoration: none;
}

.account-breadcrumb a:hover {
  text-decoration: underline;
}

.account-breadcrumb__sep {
  margin: 0 0.25rem;
  opacity: 0.45;
}

.account-details-form--dense .account-field {
  margin-bottom: 0.4rem;
}

.account-details-form--dense .account-field label {
  margin-bottom: 0.15rem;
  font-size: 0.68rem;
}

.account-details-form--dense .account-field input,
.account-details-form--dense .account-field select {
  padding: 0.42rem 0.55rem;
  font-size: 0.84rem;
}

.account-details-form__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.25rem;
  align-items: start;
}

.account-details-form__col {
  min-width: 0;
}

.account-email-prefs--dense {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}

.account-email-prefs--dense .account-email-prefs__title {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.account-email-prefs__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.25rem 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.account-check {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  cursor: pointer;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.3;
}

.account-check input {
  margin-top: 0.15rem;
  flex-shrink: 0;
  accent-color: var(--blue);
}

.account-check__text {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
}

.account-check__text strong {
  color: var(--text);
  font-weight: 600;
  font-size: 0.8rem;
}

.account-check__text span {
  font-size: 0.72rem;
  opacity: 0.85;
}

.account-mailing--dense {
  margin-top: 0.5rem;
  padding: 0.5rem 0.65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
}

.account-check--mailing {
  margin: 0;
}

.account-details-form--dense .account-details-form__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0.65rem;
  margin-top: 0.75rem;
}

.account-details-form--dense #account-details-status {
  margin: 0;
  flex: 1 1 100%;
  text-align: center;
  font-size: 0.82rem;
}

.client-portal .account-status {
  color: var(--text-muted);
}

.client-portal .account-status.is-error {
  color: #ff6b6b;
}

.client-portal .account-status.is-success {
  color: #5ee89a;
}

/* —— Portal dashboard home (WHMCS-style) —— */
.portal-sidebar-panel {
  margin: 0 1rem 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.portal-sidebar-panel__title {
  margin: 0 0 0.5rem;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.portal-sidebar-panel__body {
  margin-bottom: 0.65rem;
}

.portal-sidebar-panel__text {
  margin: 0 0 0.2rem;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text);
}

.portal-sidebar-panel__muted {
  margin: 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.portal-sidebar-panel__btn {
  width: 100%;
}

.portal-shortcuts {
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-shortcuts__link {
  display: block;
  width: 100%;
  padding: 0.35rem 0;
  font-size: 0.82rem;
  color: var(--blue);
  text-align: left;
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
}

.portal-shortcuts__link:hover {
  text-decoration: underline;
}

.portal-shortcuts__link--btn {
  font: inherit;
}

.portal-home__breadcrumb {
  margin-bottom: 0.35rem;
}

.portal-home__welcome {
  margin: 0 0 1rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  color: var(--blue);
}

.portal-home__welcome strong {
  color: var(--text);
  font-weight: 700;
}

.portal-home__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
  margin-bottom: 1rem;
}

.portal-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  font: inherit;
  text-align: left;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.portal-stat:disabled {
  opacity: 0.55;
  cursor: default;
}

.portal-stat:not(:disabled):hover {
  background: rgba(0, 200, 255, 0.06);
}

.portal-stat--services { border-top-color: var(--blue); }
.portal-stat--domains { border-top-color: #5ee89a; }
.portal-stat--tickets { border-top-color: #ff6b6b; }

.portal-nav-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.3rem;
  margin-left: 0.25rem;
  font-size: 0.65rem;
  font-weight: 700;
  background: #ff6b6b;
  color: #fff;
  border-radius: 999px;
  vertical-align: middle;
}

.portal-ticket-thread {
  max-height: 280px;
  overflow-y: auto;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
}

.portal-ticket-msg--staff {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(77, 159, 255, 0.1);
  border-radius: 8px;
}

.portal-ticket-msg--you {
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
}

.portal-tickets-new {
  margin-bottom: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.portal-ticket-form .tox-tinymce {
  border-radius: var(--radius);
  border-color: var(--border);
}

.portal-ticket-form .tox .tox-edit-area__iframe {
  background: #fff;
}

.portal-ticket-msg__meta {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.portal-ticket-msg__body {
  color: var(--text);
}

.rich-html-body {
  word-break: break-word;
}

.rich-html-body p {
  margin: 0 0 0.65rem;
}

.rich-html-body ul,
.rich-html-body ol {
  margin: 0 0 0.65rem;
  padding-left: 1.25rem;
}

.rich-html-body a {
  color: var(--cyan, #00d2ff);
  text-decoration: underline;
}

.rich-html-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
.portal-stat--invoices { border-top-color: var(--gold-light); }

.portal-stat__value {
  font-size: 1.65rem;
  font-weight: 700;
  line-height: 1.1;
}

.portal-stat__label {
  margin-top: 0.15rem;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.portal-home__search {
  display: flex;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}

.portal-home__search input {
  flex: 1;
  padding: 0.55rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text);
  background: transparent;
  border: none;
}

.portal-home__search input:focus {
  outline: none;
}

.portal-home__search-btn {
  padding: 0 0.85rem;
  font-size: 1.1rem;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: none;
  border-left: 1px solid var(--border);
  cursor: pointer;
}

.portal-home__search-btn:hover {
  color: var(--blue);
}

.portal-home__promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold-light);
}

.portal-home__promo-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.portal-home__promo-text {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 42rem;
}

.portal-widget {
  margin-bottom: 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
}

.portal-widget__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.65rem 1rem;
  background: var(--bg-elevated);
  border-bottom: 1px solid var(--border);
}

.portal-widget__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
}

.portal-widget__body {
  padding: 0.75rem 1rem 1rem;
}

.portal-widget__empty {
  margin: 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.portal-widget__more {
  margin: 0.75rem 0 0;
  text-align: center;
}

.portal-service-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-service-list__item {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem 0.75rem;
  align-items: center;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}

.portal-service-list__item:last-child {
  border-bottom: none;
}

.portal-service-list__name {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
}

.portal-service-list__meta {
  margin: 0.1rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.portal-home__columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.portal-quick-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: flex-start;
}

.portal-link-btn {
  padding: 0;
  font: inherit;
  font-size: inherit;
  color: var(--blue);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}

.portal-inner-breadcrumb {
  margin-bottom: 0.75rem;
}

@media (max-width: 768px) {
  .client-portal {
    grid-template-columns: 1fr;
  }

  .client-portal__sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .client-portal__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
  }

  .client-portal__nav-label {
    width: 100%;
    margin: 0.5rem 0 0;
  }

  .client-portal__nav-btn {
    width: auto;
    border-left: none;
    border-radius: var(--radius);
    padding: 0.45rem 0.75rem;
  }

  .client-portal__nav-btn.is-active {
    border-left: none;
    box-shadow: inset 0 0 0 1px rgba(0, 200, 255, 0.25);
  }

  .portal-row {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .portal-row__action {
    justify-self: start;
  }

  .subs-datatable__toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .subs-datatable__search input {
    width: 100%;
    min-width: 0;
  }

  .subs-table th:nth-child(2),
  .subs-table td:nth-child(2) {
    display: none;
  }

  .subs-datatable__footer {
    flex-direction: column;
    align-items: stretch;
  }

  .account-details-form__columns,
  .account-email-prefs__grid {
    grid-template-columns: 1fr;
  }

  .portal-home__stats {
    grid-template-columns: repeat(2, 1fr);
  }

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

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

.account-card__title {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text);
}

.account-card__lead {
  margin: 0 0 1.5rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.account-field {
  margin-bottom: 1rem;
}

.account-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.account-field input[type="text"],
.account-field input[type="password"],
.account-field input[type="email"],
.account-field input[type="tel"],
.account-field select {
  width: 100%;
  padding: 0.65rem 0.75rem;
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
}

.account-field input[readonly] {
  opacity: 0.75;
  cursor: default;
}

.account-field select {
  cursor: pointer;
}

.account-field input:focus,
.account-field select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.account-password-wrap {
  position: relative;
  width: 100%;
}

.account-password-wrap input {
  padding-right: 2.75rem;
}

.account-password-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.account-password-toggle:hover {
  color: var(--blue);
  background: rgba(0, 200, 255, 0.08);
}

.account-password-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.account-password-toggle svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-password-toggle .icon-eye-off {
  display: none;
}

.account-password-toggle.is-visible .icon-eye {
  display: none;
}

.account-password-toggle.is-visible .icon-eye-off {
  display: block;
}

.account-field input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 2px var(--blue-glow);
}

.account-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem 0 1.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
  cursor: pointer;
}

.account-check input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--blue);
}

.account-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
  font-size: 0.88rem;
}

.account-links a {
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-links a:hover {
  color: var(--text);
}

.account-links button.account-link-btn {
  color: var(--blue);
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.account-links a:hover,
.account-links button.account-link-btn:hover {
  color: var(--text);
}

.account-status {
  min-height: 1.25rem;
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.account-status.is-error {
  color: #ff6b6b;
}

.account-status.is-success {
  color: #5ee89a;
}

.account-forgot {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.account-forgot[hidden] {
  display: none !important;
}

.account-forgot__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  font-weight: 600;
}

.account-dash__grid {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.account-dash__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.92rem;
}

.account-dash__row dt {
  margin: 0;
  color: var(--text-muted);
  font-weight: 500;
}

.account-dash__row dd {
  margin: 0;
  text-align: right;
  font-weight: 600;
}

.account-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.account-section h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
}

.account-section p {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.account-logout {
  margin-top: 1.5rem;
}

.account-currency-form__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 0.75rem;
  margin: 1rem 0 1.25rem;
}

.account-currency-option {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.account-currency-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.account-currency-option:hover,
.account-currency-option.is-selected {
  border-color: var(--accent, #00d4ff);
  background: rgba(0, 212, 255, 0.06);
}

.account-currency-option__symbol {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent, #00d4ff);
  min-width: 1.5rem;
  text-align: center;
}

.account-currency-option__body {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.account-currency-option__code {
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.account-currency-option__label {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.subs-table__amount-note {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* —— Billing / invoices —— */
.billing-invoice-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: #7dd3fc;
  cursor: pointer;
  text-align: left;
}

.billing-invoice-link:hover {
  text-decoration: underline;
}

.portal-row__action--btn {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
}

.billing-detail {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: none;
  align-items: stretch;
  justify-content: flex-end;
}

.billing-detail.is-open {
  display: flex;
}

.billing-detail__backdrop {
  flex: 1;
  background: rgba(0, 0, 0, 0.55);
}

.billing-detail__panel {
  width: min(480px, 100%);
  max-width: 100%;
  background: #0c0e16;
  border-left: 1px solid #2a2f3d;
  display: flex;
  flex-direction: column;
  max-height: 100vh;
  overflow: auto;
}

.billing-detail__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid #2a2f3d;
}

.billing-detail__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #d4af37;
}

.billing-detail__title {
  margin: 0;
  font-size: 1.35rem;
}

.billing-detail__close {
  background: none;
  border: none;
  color: #9ca3af;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.billing-detail__body {
  padding: 1rem 1.25rem;
  flex: 1;
}

.billing-detail__meta {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.billing-detail__meta div {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  gap: 0.5rem;
  font-size: 0.875rem;
}

.billing-detail__meta dt {
  margin: 0;
  color: #9ca3af;
}

.billing-detail__meta dd {
  margin: 0;
}

.billing-detail__total {
  margin: 1rem 0 0;
  font-size: 1rem;
}

.billing-detail__discount {
  margin: 0.5rem 0 0;
  font-size: 0.875rem;
  color: #5ee89a;
}

.billing-detail__notes {
  margin: 1rem 0 0;
  padding: 0.85rem 0.95rem;
  border: 1px solid #2a2f3d;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.billing-detail__notes h3 {
  margin: 0 0 0.35rem;
  font-size: 0.85rem;
  color: #dbeafe;
}

.billing-detail__notes p {
  margin: 0;
  color: var(--text-muted, #9ca3af);
  line-height: 1.5;
  white-space: normal;
}

.billing-detail__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid #2a2f3d;
}

body.billing-detail-open {
  overflow: hidden;
}

.billing-pay__grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 768px) {
  .billing-pay__grid {
    grid-template-columns: 1.2fr 1fr;
  }
}

.billing-card {
  background: rgba(12, 14, 22, 0.9);
  border: 1px solid #2a2f3d;
  padding: 1rem 1.15rem;
}

.billing-card__head {
  margin-bottom: 0.75rem;
}

.billing-card__title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 600;
}

.billing-card__lead {
  margin: 0;
  font-size: 0.8125rem;
  color: #9ca3af;
  line-height: 1.45;
}

.billing-card__meta {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-lines {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8125rem;
}

.billing-lines th,
.billing-lines td {
  padding: 0.45rem 0.35rem;
  border-bottom: 1px solid #2a2f3d;
  text-align: left;
}

.billing-lines__amt {
  text-align: right;
  white-space: nowrap;
}

.billing-lines__sub {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
}

.billing-totals {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #2a2f3d;
}

.billing-totals__row--total {
  display: flex;
  justify-content: space-between;
  font-size: 1.05rem;
}

.billing-ref-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem;
  background: rgba(77, 159, 255, 0.08);
  border: 1px solid rgba(77, 159, 255, 0.35);
}

.billing-ref-box__code {
  font-size: 1.05rem;
  font-weight: 600;
  color: #f0f2f8;
  word-break: break-all;
}

.billing-card__hint {
  margin: 0.65rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.billing-card__hint-label {
  color: #cbd5e1;
}

.billing-pay__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.recaptcha-field {
  margin: 1rem 0;
  min-height: 78px;
}

.recaptcha-field .g-recaptcha {
  display: inline-block;
}
