/* ============================================================
   Flexus Portal — single navbar layout
   ============================================================ */

.fx-portal-active {
  --portal-accent: var(--color-notion-blue, #2563eb);
  --portal-accent-soft: color-mix(in srgb, var(--color-notion-blue, #2563eb) 12%, transparent);
  --portal-canvas: var(--surface-page, var(--color-paper-warmth, #f8f9fb));
  --portal-card: var(--surface-card, var(--color-pure-white, #ffffff));
  --portal-radius: 18px;
  --portal-shadow: 0 14px 32px -24px rgba(15, 23, 42, 0.45);
  --portal-nav-offset: 12px;
  --portal-nav-height: 56px;
  --portal-content-gap: 28px;
  --portal-header-clearance: calc(var(--portal-nav-offset) + var(--portal-nav-height) + var(--portal-content-gap));
  scroll-padding-top: var(--portal-header-clearance);
}

.fx-portal-active.bg-canvas {
  background: var(--portal-canvas);
}

/* Wider navbar when in client area */
.fx-navwrap--portal {
  top: var(--portal-nav-offset);
  padding-inline: var(--spacing-16);
  margin-bottom: var(--portal-content-gap);
  max-width: 1232px;
  margin-inline: auto;
}

.fx-navbar--portal {
  max-width: 100%;
}

.fx-navbar--portal .fx-nm {
  gap: 2px;
}

.fx-navbar--portal .fx-nm-trigger {
  font-size: 13px;
  padding: 8px 12px;
}

.fx-navbar--portal .fx-nm-trigger.is-active {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  border-radius: 999px;
}

.fx-navbar__cluster .fx-btn-logout {
  padding: 8px 12px;
  color: var(--color-fog);
}

.fx-navbar__cluster .fx-btn-logout:hover {
  color: var(--color-charcoal);
}

.fx-btn-logout__text {
  margin-left: 4px;
}

/* Navbar locale dropdowns */
.fx-navbar-locale-form .fx-locale-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fx-navbar-locale-form .fx-locale-picker__field {
  min-width: 0;
}

.fx-navbar-locale-form .fx-locale-picker__label {
  display: none;
}

.fx-navbar-locale-form .fx-locale-picker__trigger {
  width: auto;
  min-width: 168px;
  max-width: none;
  height: 36px;
  border-radius: 999px;
  padding-left: 10px;
  padding-right: 10px;
  font-size: 12px;
}

.fx-navbar-locale-form .fx-locale-picker__field:last-child .fx-locale-picker__trigger {
  min-width: 120px;
  max-width: none;
}

.fx-navbar-locale-form .fx-locale-picker__value {
  overflow: visible;
  text-overflow: clip;
}

@media (max-width: 900px) {
  .fx-navbar-locale-form .fx-locale-picker__trigger {
    min-width: 144px;
  }
  .fx-navbar-locale-form .fx-locale-picker__field:last-child .fx-locale-picker__trigger {
    min-width: 106px;
    max-width: none;
  }
}

@media (max-width: 1023px) {
  .fx-navbar-locale-form { display: none !important; }
}

@media (max-width: 1100px) {
  .fx-navbar--portal .fx-nm { display: none; }
}

@media (max-width: 1023px) {
  .fx-btn-logout__text { display: none; }
}

/* ============================================================
   Portal app shell — sidebar + content (droplet model)
   ============================================================ */
.fx-portal-active {
  --fx-app-max: 1400px;
  --fx-side-width: 248px;
}

.fx-navwrap--portal {
  max-width: var(--fx-app-max);
}

.fx-app {
  display: grid;
  grid-template-columns: var(--fx-side-width) minmax(0, 1fr);
  gap: var(--spacing-24);
  align-items: start;
  max-width: var(--fx-app-max);
  margin-inline: auto;
  padding-inline: var(--spacing-16);
}

.fx-app__aside {
  position: sticky;
  top: var(--portal-header-clearance);
  max-height: calc(100vh - var(--portal-header-clearance) - 16px);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.fx-app #main-body.fx-portal__main,
.fx-app .fx-portal__main {
  max-width: none;
  margin: 0;
  padding: 0 0 var(--spacing-48);
}

@media (max-width: 1100px) {
  .fx-app { display: block; }
  .fx-app__aside { display: none; }
  .fx-app #main-body.fx-portal__main,
  .fx-app .fx-portal__main {
    padding-top: var(--spacing-8);
  }
}

/* ---- Sidebar ---- */
.fx-side {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-20);
  padding: 2px 2px var(--spacing-24);
}

.fx-side__profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--color-pure-white);
  border: 1px solid var(--color-ash);
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.fx-side__profile:hover {
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 2px 12px rgba(28,25,23,.06);
}

.fx-side__profile-meta {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
  flex: 1;
}

.fx-side__profile-meta b {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-side__profile-meta small {
  font-size: 11px;
  color: var(--color-fog);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-side__profile-caret {
  font-size: 10px;
  color: var(--color-silver);
  flex-shrink: 0;
}

.fx-side__label {
  margin: 0 0 4px;
  padding-left: 10px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--portal-accent);
}

.fx-side__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.fx-side__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-charcoal);
  text-decoration: none;
  transition: background .12s ease, color .12s ease;
}

.fx-side__link i {
  width: 16px;
  font-size: 13px;
  color: var(--color-fog);
  text-align: center;
  transition: color .12s ease;
}

.fx-side__link:hover {
  background: var(--color-pure-white);
}

.fx-side__link.is-active {
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
}

.fx-side__link.is-active i {
  color: var(--portal-accent);
}

/* ============================================================
   Dashboard (clientareahome) — droplet-style content
   ============================================================ */
.fx-dash__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--spacing-16);
  flex-wrap: wrap;
}

.fx-dash__title {
  margin: 0;
  font-size: clamp(24px, 2.8vw, 30px);
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--color-charcoal);
  line-height: 1.1;
}

.fx-dash__sub {
  margin: 4px 0 0;
  font-size: 13px;
  color: var(--color-fog);
}

.fx-dash__tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-dash__date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-pure-white);
  border: 1px solid var(--color-ash);
  border-radius: 10px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--color-charcoal);
  white-space: nowrap;
}

.fx-dash__date i {
  font-size: 12px;
  color: var(--color-fog);
}

/* Systems status chip (hosting product cue) */
.fx-sys-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--color-vivid-green, #16a34a) 28%, transparent);
  background: var(--color-soft-mint, #edfbf5);
  color: var(--color-vivid-green, #00966e);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .15s ease, transform .15s ease;
}
.fx-sys-status:hover {
  border-color: var(--color-vivid-green, #10b981);
  color: var(--color-vivid-green, #00966e);
  transform: translateY(-1px);
}
.fx-sys-status i { font-size: 10px; }
.fx-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--color-vivid-green, #10b981);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-vivid-green, #10b981) 22%, transparent);
}
.fx-dot--ok { background: var(--color-vivid-green, #10b981); }
.fx-dash-pill--live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-soft-mint, #edfbf5);
  color: var(--color-vivid-green, #00966e);
  border: 1px solid color-mix(in srgb, var(--color-vivid-green, #16a34a) 28%, transparent);
}

/* ---- Stat cards ---- */
.fx-stat {
  position: relative;
  grid-column: span 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--portal-card, var(--surface-card, var(--color-pure-white)));
  border: 1px solid var(--color-ash);
  border-radius: var(--portal-radius);
  box-shadow: var(--portal-shadow);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  min-width: 0;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

a.fx-stat:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--portal-accent) 28%, var(--color-ash));
  box-shadow: 0 18px 36px -22px rgba(15, 23, 42, 0.4);
}

.fx-stat__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fx-stat__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--portal-accent);
}

.fx-stat__mark {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: var(--portal-accent-soft);
  border: 1px solid color-mix(in srgb, var(--portal-accent) 18%, transparent);
  color: var(--portal-accent);
  font-size: 13px;
}

.fx-stat__value {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--color-charcoal);
}

.fx-stat__value--money {
  font-family: var(--font-geist-mono, ui-monospace, monospace);
  font-weight: 500;
}

.fx-stat.is-warn .fx-stat__value { color: #c2410c; }

.fx-stat__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.fx-stat__hint {
  font-size: 12px;
  color: var(--color-fog);
}

.fx-stat__updated,
.fx-stat__foot {
  margin: auto 0 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-graphite);
}

.fx-stat__updated {
  font-weight: 500;
  font-size: 11px;
  color: var(--color-silver);
}

/* Dark "signature" card (account balance) */
.fx-stat--dark {
  background: var(--color-midnight-brand, #02093a);
  border-color: transparent;
}

.fx-stat--dark .fx-stat__kicker { color: rgba(255,255,255,.75); }
.fx-stat--dark .fx-stat__value { color: #fff; }
.fx-stat--dark .fx-stat__hint { color: rgba(255,255,255,.55); }
.fx-stat--dark .fx-stat__updated,
.fx-stat--dark .fx-stat__foot { color: rgba(255,255,255,.55); }

.fx-stat--dark .fx-stat__mark {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.14);
  color: #fff;
}

.fx-stat__glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(90% 70% at 100% 0%, color-mix(in srgb, var(--portal-accent) 50%, transparent), transparent 60%),
    radial-gradient(70% 60% at 0% 100%, color-mix(in srgb, var(--portal-accent) 22%, transparent), transparent 55%);
  pointer-events: none;
}

.fx-stat--dark > *:not(.fx-stat__glow) { position: relative; }

/* Badge pills (droplet "+30%" style) */
.fx-dash-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: none;
  white-space: nowrap;
  background: var(--portal-accent-soft, #dbeafe);
  color: var(--portal-accent, #2563eb);
}

.fx-dash-pill i { font-size: 9px; }

.fx-dash-pill--ok {
  background: var(--color-soft-mint, #ecfdf3);
  color: var(--color-vivid-green, #15803d);
  border: 1px solid color-mix(in srgb, var(--color-vivid-green, #16a34a) 22%, transparent);
}
.fx-dash-pill--warn {
  background: color-mix(in srgb, var(--color-saffron, #e89d01) 18%, var(--surface-card, var(--color-pure-white)));
  color: var(--color-saffron, #b45309);
  border: 1px solid color-mix(in srgb, var(--color-saffron, #e89d01) 32%, transparent);
}

.fx-dash-pill--invert {
  background: rgba(255,255,255,.16);
  color: #fff;
  transition: background .12s ease;
}

.fx-dash-pill--invert:hover {
  background: rgba(255,255,255,.26);
  color: #fff;
}

/* ---- Billing activity chart card ---- */
.fx-dash-chart {
  grid-column: span 7;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 300px;
}

.fx-dash-chart__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.fx-dash-chart__value {
  margin: 4px 0 2px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 600;
  letter-spacing: -.03em;
  line-height: 1;
  color: var(--color-charcoal);
  font-family: var(--font-geist-mono, ui-monospace, monospace);
}

.fx-dash-chart__hint {
  margin: 0;
  font-size: 12px;
  color: var(--color-fog);
}

.fx-dash-chart__hint a {
  color: var(--portal-accent);
  text-decoration: none;
}

.fx-dash-chart__hint a:hover { text-decoration: underline; }

.fx-dash-chart__plot {
  flex: 1;
  min-height: 200px;
}

.fx-dash-chart__plot svg { display: block; }

.fx-dash-chart__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.fx-chartline {
  fill: none;
  stroke: var(--portal-accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fx-chartgrid { stroke: var(--color-ash); stroke-width: 1; }
.fx-chartdot { fill: var(--portal-accent); }
.fx-chartlabel {
  font-size: 10px;
  font-family: var(--font-inter, sans-serif);
  fill: var(--color-fog);
}

/* Services card sits beside the chart */
.fx-dash-svc { grid-column: span 5; }

/* Domain band spans the full grid now that the pulse tile is gone */
.fx-dash-domain { grid-column: span 12; }

@media (max-width: 1100px) {
  .fx-dash-chart,
  .fx-dash-svc,
  .fx-dash-domain { grid-column: span 12; }
  .fx-stat { grid-column: span 6; }
}

@media (max-width: 560px) {
  .fx-stat { grid-column: span 12; }
  .fx-dash__head { align-items: flex-start; flex-direction: column; }
}

/* Main content */
#main-body.fx-portal__main,
.fx-portal__main {
  max-width: 1200px;
  width: 100%;
  margin-inline: auto;
  padding: var(--spacing-8) var(--spacing-16) var(--spacing-48);
  min-width: 0;
}

.fx-portal__page {
  min-width: 0;
  padding-top: var(--spacing-4);
}

/* Banners between navbar and main (verify email, network issues) */
.fx-portal-active .flexus-container.pt-4 {
  max-width: var(--fx-app-max, 1200px);
  margin: 0 auto var(--spacing-12);
  padding-inline: var(--spacing-16);
  padding-top: 0 !important;
}

.fx-portal-active .fx-portal__page > .fx-alert:first-child {
  margin-bottom: var(--spacing-16);
}


.fx-breadcrumb-wrap {
  margin-top: 4px;
  margin-bottom: 0;
}

/* Cards & panels */
.fx-portal-active .fx-portal-panel,
.fx-portal-active .fx-dash-card,
.fx-portal-active .fx-service-hero,
.fx-portal-active .fx-card,
.fx-portal-active .fx-ca-home__panel,
.fx-portal-active .fx-ca-home__domain,
.fx-portal-active .fx-ca-home__rail-card {
  border: 1px solid var(--color-ash);
  border-radius: var(--portal-radius);
  box-shadow: none;
}

.fx-portal-active .fx-btn-primary {
  background: var(--portal-accent);
  border-color: var(--portal-accent);
}

.fx-portal-active .fx-btn-primary:hover {
  background: var(--color-deep-sapphire, #1d4ed8);
  border-color: var(--color-deep-sapphire, #1d4ed8);
}

/* ============================================================
   Store page
   ============================================================ */
.fx-store {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
  padding-bottom: var(--spacing-32);
}

.fx-store-hero {
  padding: var(--spacing-24) 0 var(--spacing-16);
  text-align: center;
}

.fx-store-hero .fx-lead {
  max-width: 520px;
  margin: 0 auto var(--spacing-16);
}

.fx-store-hero__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-8);
  flex-wrap: wrap;
}

.fx-store-hero__glow {
  position: absolute;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  width: min(600px, calc(100% - 32px));
  max-width: 100%;
  height: 300px;
  background: radial-gradient(ellipse, rgba(0,117,222,.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.fx-store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--spacing-16);
}

@media (max-width: 1100px) {
  .fx-store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .fx-store-grid { grid-template-columns: 1fr; }
}

.fx-store-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-8);
  padding: var(--spacing-20);
  background: var(--color-pure-white);
  border: 1px solid var(--color-ash);
  border-radius: var(--radius-cards);
  text-decoration: none;
  color: inherit;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  overflow: hidden;
}

.fx-store-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.fx-store-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px rgba(28,25,23,.1);
  border-color: transparent;
}

.fx-store-card:hover::before {
  opacity: 1;
}

.fx-store-card--hosting::before { background: linear-gradient(135deg, rgba(0,117,222,.06), transparent 60%); }
.fx-store-card--vps::before { background: linear-gradient(135deg, rgba(124,58,237,.06), transparent 60%); }
.fx-store-card--wordpress::before { background: linear-gradient(135deg, rgba(33,117,155,.06), transparent 60%); }
.fx-store-card--game::before { background: linear-gradient(135deg, rgba(249,115,22,.08), transparent 60%); }
.fx-store-card--email::before { background: linear-gradient(135deg, rgba(220,38,38,.06), transparent 60%); }
.fx-store-card--apps::before { background: linear-gradient(135deg, rgba(22,163,74,.06), transparent 60%); }
.fx-store-card--domain::before { background: linear-gradient(135deg, rgba(234,179,8,.08), transparent 60%); }

.fx-store-card__icon {
  position: relative;
  z-index: 1;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  font-size: 20px;
  margin-bottom: 4px;
}

.fx-store-card--hosting .fx-store-card__icon { background: #dbeafe; color: #1d4ed8; }
.fx-store-card--vps .fx-store-card__icon { background: #ede9fe; color: #7c3aed; }
.fx-store-card--wordpress .fx-store-card__icon { background: #e0f2fe; color: #0369a1; }
.fx-store-card--game .fx-store-card__icon { background: #ffedd5; color: #ea580c; }
.fx-store-card--email .fx-store-card__icon { background: #fee2e2; color: #dc2626; }
.fx-store-card--apps .fx-store-card__icon { background: #dcfce7; color: #16a34a; }
.fx-store-card--domain .fx-store-card__icon { background: #fef9c3; color: #ca8a04; }

.fx-store-card__name {
  position: relative;
  z-index: 1;
  font-size: 17px;
  font-weight: 600;
  color: var(--color-charcoal);
  margin: 0;
  letter-spacing: -.01em;
}

.fx-store-card__desc {
  position: relative;
  z-index: 1;
  font-size: 13px;
  color: var(--color-slate);
  margin: 0;
  flex: 1;
  line-height: 1.5;
}

.fx-store-card__arrow {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  color: var(--color-silver);
  font-size: 13px;
  transition: transform .2s ease, color .2s ease;
}

.fx-store-card:hover .fx-store-card__arrow {
  transform: translate(2px, -2px);
  color: var(--color-notion-blue);
}

.fx-store-card__badge {
  position: relative;
  z-index: 1;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--portal-accent-soft);
  color: var(--portal-accent);
  font-size: 11px;
  font-weight: 600;
  align-self: flex-start;
}

.fx-store-section {
  padding: var(--spacing-24) 0;
}

.fx-store-section--tight {
  padding-top: var(--spacing-8);
}

.fx-store-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-24);
  flex-wrap: wrap;
  padding: var(--spacing-16) 0;
  font-size: 13px;
  color: var(--color-fog);
}

.fx-store-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fx-store-trust i {
  color: var(--color-vivid-green);
  font-size: 12px;
}

/* Profile dropdown */
.fx-profile {
  position: relative;
}

.fx-profile:has(.fx-profile__menu[data-open="true"]) {
  z-index: 120;
}

.fx-profile__trigger {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 10px 4px 4px;
  border: 1px solid var(--color-ash);
  border-radius: 999px;
  background: var(--color-pure-white);
  cursor: pointer;
  transition: box-shadow .15s ease, border-color .15s ease;
}

.fx-profile__trigger:hover,
.fx-profile__trigger[aria-expanded="true"] {
  border-color: rgba(0,0,0,.14);
  box-shadow: 0 2px 12px rgba(28,25,23,.08);
}

.fx-profile__avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.fx-profile__avatar-wrap--lg {
  width: 48px;
  height: 48px;
}

.fx-profile__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--color-paper-warmth);
  display: block;
}

.fx-profile__avatar--lg {
  width: 48px;
  height: 48px;
}

.fx-profile__initials {
  display: none;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f97316, #fb923c);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
}

.fx-profile__avatar-wrap.is-fallback .fx-profile__avatar {
  display: none;
}

.fx-profile__avatar-wrap.is-fallback .fx-profile__initials {
  display: inline-flex;
}

.fx-profile__avatar-wrap--lg .fx-profile__initials {
  font-size: 14px;
}

.fx-profile__meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
  max-width: 140px;
}

.fx-profile__meta b {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-charcoal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-profile__meta small {
  font-size: 11px;
  color: var(--color-fog);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fx-profile__caret {
  font-size: 10px;
  color: var(--color-fog);
  transition: transform .2s ease;
}

.fx-profile__trigger[aria-expanded="true"] .fx-profile__caret {
  transform: rotate(180deg);
}

.fx-profile__menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 280px;
  background: var(--color-pure-white);
  border: 1px solid var(--color-ash);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(28,25,23,.12);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
  z-index: 80;
}

.fx-profile__menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.fx-profile__head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--color-ash);
  margin-bottom: 4px;
}

.fx-profile__head-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  padding-top: 2px;
}

.fx-profile__head-name {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-charcoal);
  line-height: 1.3;
}

.fx-profile__head-company {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-slate);
  line-height: 1.3;
}

.fx-profile__head-email {
  display: block;
  font-size: 12px;
  color: var(--color-fog);
  line-height: 1.35;
  word-break: break-word;
}

.fx-profile__links {
  list-style: none;
  margin: 0;
  padding: 4px;
}

.fx-profile__link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-charcoal);
  text-decoration: none;
  transition: background .12s ease;
}

.fx-profile__link i {
  width: 16px;
  font-size: 13px;
  color: var(--color-fog);
}

.fx-profile__link:hover {
  background: var(--color-paper-mist);
}

.fx-profile__link.is-active {
  background: var(--portal-accent-soft, rgba(37, 99, 235, .12));
  color: var(--portal-accent, #2563eb);
}

.fx-profile__link.is-active i {
  color: var(--portal-accent, #2563eb);
}

.fx-profile__foot {
  padding: 4px;
  border-top: 1px solid var(--color-ash);
  margin-top: 4px;
}

.fx-profile__logout {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 500;
  color: #dc2626;
  text-decoration: none;
  transition: background .12s ease;
}

.fx-profile__logout:hover {
  background: #fef2f2;
}

@media (max-width: 900px) {
  .fx-profile__meta,
  .fx-profile__caret { display: none; }
  .fx-profile__trigger { padding: 3px; }
  .fx-profile__menu {
    z-index: 120;
    width: min(280px, calc(100vw - 32px));
  }
}

@media (max-width: 640px) {
  .fx-portal-active {
    --portal-nav-offset: 8px;
    --portal-content-gap: 20px;
  }

  .fx-portal__main {
    padding-inline: var(--spacing-12);
  }
}

.fx-sheet-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px 8px;
}

.fx-sheet-profile img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.fx-sheet-profile b {
  display: block;
  font-size: 14px;
  color: var(--color-charcoal);
}

.fx-sheet-profile small {
  display: block;
  font-size: 12px;
  color: var(--color-fog);
}

/* Deploy band — hosting product upsell (Classic port of Studio sto-deploy) */
.fx-deploy {
  grid-column: 1 / -1;
}
.fx-deploy__kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--portal-accent);
  margin: 0 0 10px;
}
.fx-deploy__row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.fx-deploy__card {
  display: grid;
  gap: 2px;
  padding: 16px 18px;
  border: 1px dashed var(--color-ash);
  border-radius: 18px;
  background: transparent;
  text-decoration: none;
  color: var(--color-charcoal);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.fx-deploy__card i {
  font-size: 16px;
  color: var(--color-fog);
  margin-bottom: 6px;
  transition: color 0.15s ease;
}
.fx-deploy__card b {
  font-size: 13px;
  font-weight: 600;
}
.fx-deploy__card small {
  font-size: 11px;
  color: var(--color-fog);
}
.fx-deploy__card:hover {
  border: 1px solid color-mix(in srgb, var(--portal-accent) 45%, var(--color-ash));
  background: var(--color-pure-white, #ffffff);
  box-shadow: var(--portal-shadow);
  transform: translateY(-2px);
}
.fx-deploy__card:hover i {
  color: var(--portal-accent);
}

@media (max-width: 1100px) {
  .fx-deploy__row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .fx-deploy__row { grid-template-columns: 1fr; }
  .fx-sys-status { height: 32px; padding: 0 12px; font-size: 11px; }
}

/* ============================================================
   Classic CA — dark / palette-aware surfaces
   body.fx-palette-dark is set from ThemeTokens when preset mode=dark.
   ============================================================ */
body.fx-palette-dark.fx-portal-active {
  --portal-shadow: 0 14px 32px -24px rgba(0, 0, 0, 0.65);
  color: var(--color-charcoal, #f5f5f5);
}
body.fx-palette-dark.fx-portal-active .fx-app__aside,
body.fx-palette-dark.fx-portal-active .fx-side {
  background: var(--surface-card, var(--color-pure-white));
  border-color: var(--color-ash);
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-ca-tile,
body.fx-palette-dark.fx-portal-active .fx-stat:not(.fx-stat--dark),
body.fx-palette-dark.fx-portal-active .fx-portal-panel,
body.fx-palette-dark.fx-portal-active .fx-dash__date,
body.fx-palette-dark.fx-portal-active .fx-deploy__card:hover {
  background: var(--surface-card, var(--color-pure-white));
  border-color: var(--color-ash);
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-ca-tile__kicker,
body.fx-palette-dark.fx-portal-active .fx-stat__kicker,
body.fx-palette-dark.fx-portal-active .fx-side__label,
body.fx-palette-dark.fx-portal-active .fx-portal-panel .fx-table thead th,
body.fx-palette-dark.fx-portal-active .fx-deploy__kicker {
  color: var(--portal-accent);
}
body.fx-palette-dark.fx-portal-active .fx-ca-tile__title,
body.fx-palette-dark.fx-portal-active .fx-ca-tile__mega,
body.fx-palette-dark.fx-portal-active .fx-ca-tile__heading,
body.fx-palette-dark.fx-portal-active .fx-dash__title,
body.fx-palette-dark.fx-portal-active .fx-stat__value,
body.fx-palette-dark.fx-portal-active .fx-ca-home__domain-title {
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-ca-home__domain-visual {
  background: linear-gradient(
    160deg,
    color-mix(in srgb, var(--color-peach, #365314) 35%, var(--surface-card)) 0%,
    color-mix(in srgb, var(--color-saffron, #facc15) 12%, var(--color-paper-mist)) 100%
  );
  border-color: var(--color-ash);
}
body.fx-palette-dark.fx-portal-active .fx-ca-home__domain-ui,
body.fx-palette-dark.fx-portal-active .fx-ca-home__domain-tlds li {
  background: color-mix(in srgb, var(--surface-card) 88%, transparent);
  border-color: var(--color-ash);
}
body.fx-palette-dark.fx-portal-active .fx-ca-tile--stat-mint,
body.fx-palette-dark.fx-portal-active .fx-ca-tile--mint {
  background: color-mix(in srgb, var(--color-soft-mint, #0b3a2a) 80%, var(--surface-card));
  border-color: color-mix(in srgb, var(--color-vivid-green, #34d399) 25%, transparent);
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-ca-tile--stat-sky,
body.fx-palette-dark.fx-portal-active .fx-ca-tile--sky {
  background: color-mix(in srgb, var(--color-sky-tint, #1a1528) 70%, var(--surface-card));
  border-color: color-mix(in srgb, var(--portal-accent) 22%, transparent);
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-ca-tile--peach {
  background: color-mix(in srgb, var(--color-peach, #365314) 28%, var(--surface-card));
  border-color: var(--color-ash);
}
body.fx-palette-dark.fx-portal-active .fx-status--pending,
body.fx-palette-dark.fx-portal-active .fx-status--payment-pending,
body.fx-palette-dark.fx-portal-active .fx-dash-pill--warn {
  background: #3b2110;
  border-color: #7c3f12;
  color: #fdba74;
}
body.fx-palette-dark.fx-portal-active .fx-status--unpaid,
body.fx-palette-dark.fx-portal-active .fx-status--overdue,
body.fx-palette-dark.fx-portal-active .fx-status--collections,
body.fx-palette-dark.fx-portal-active .fx-status--suspended {
  background: #3b1219;
  border-color: #7f1d1d;
  color: #fecdd3;
}
body.fx-palette-dark.fx-portal-active .fx-status--active,
body.fx-palette-dark.fx-portal-active .fx-status--paid,
body.fx-palette-dark.fx-portal-active .fx-status--completed,
body.fx-palette-dark.fx-portal-active .fx-dash-pill--ok {
  background: #0b3a2a;
  border-color: #14532d;
  color: #86efac;
}
body.fx-palette-dark.fx-portal-active .fx-deploy__card {
  border-color: var(--color-ash);
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-ca-home__pill {
  background: var(--surface-card, var(--color-pure-white));
  border-color: var(--color-ash);
  color: var(--color-fog);
}
body.fx-palette-dark.fx-portal-active .fx-navbar,
body.fx-palette-dark.fx-portal-active .fx-navbar--portal {
  background: var(--surface-card, var(--color-pure-white));
  border-color: var(--color-ash);
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-sys-status,
body.fx-palette-dark.fx-portal-active .fx-dash-pill--live {
  background: var(--color-soft-mint, #0b3a2a);
  border-color: color-mix(in srgb, var(--color-vivid-green, #34d399) 35%, transparent);
  color: var(--color-vivid-green, #86efac);
}
body.fx-palette-dark.fx-portal-active .fx-portal-panel__toolbar,
body.fx-palette-dark.fx-portal-active .fx-portal-panel .fx-table thead th,
body.fx-palette-dark.fx-portal-active .fx-ca-tile--stack .fx-ca-tile__head {
  background: var(--color-paper-mist, var(--surface-card));
  color: var(--color-charcoal);
}
body.fx-palette-dark.fx-portal-active .fx-dash__date,
body.fx-palette-dark.fx-portal-active .fx-deploy__card {
  background: transparent;
}
body.fx-palette-dark.fx-portal-active .fx-ca-home__alert {
  background: color-mix(in srgb, var(--color-saffron, #facc15) 14%, var(--surface-card));
  border-color: color-mix(in srgb, var(--color-saffron, #facc15) 32%, transparent);
  color: var(--color-charcoal);
}

