/* Dados da Conta redesenhada (account-data-client-v1.js). Cores pelos tokens --fx-*
   do sistema visual v2 (temas claro e escuro). */

.account-data-panel.adx-on > :not(.adx-root) {
  display: none !important;
}

.account-data-panel.adx-on {
  width: min(820px, calc(100vw - 48px)) !important;
  max-width: none !important;
  max-height: min(92dvh, 880px) !important;
  padding: 26px 28px 24px !important;
  background: var(--fx-surface) !important;
  border: 1px solid var(--fx-line-2) !important;
  border-radius: 24px !important;
  box-shadow: var(--fx-pop), var(--fx-hair) !important;
}

.adx-root {
  --adx-tone: var(--fx-faint);
  --adx-tone-soft: var(--fx-surface-3);
  display: flex;
  flex-direction: column;
  gap: 18px;
  color: var(--fx-text);
}

.adx-root svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.adx-root button {
  font: inherit;
  cursor: pointer;
}

.adx-root button:focus-visible {
  outline: 2px solid var(--fx-accent);
  outline-offset: 2px;
}

/* ── Cabeçalho ── */
.adx-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.adx-head .af-page-heading h2 {
  font-size: clamp(22px, 2.4vw, 30px) !important;
}

.adx-head-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.adx-ghost,
.adx-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--fx-line-2);
  background: var(--fx-surface-2);
  color: var(--fx-text);
}

.adx-ghost {
  padding: 0 14px;
  font-size: 12.5px !important;
  font-weight: 600 !important;
}

.adx-close {
  width: 36px;
  color: var(--fx-muted);
}

.adx-ghost:hover:not(:disabled),
.adx-close:hover {
  background: var(--fx-surface-3);
  border-color: var(--fx-line-3);
  color: var(--fx-text);
}

.adx-ghost:disabled {
  opacity: 0.55;
  cursor: wait;
}

.adx-ghost svg,
.adx-close svg {
  width: 16px;
  height: 16px;
}

/* ── Perfil ── */
.adx-tone-ok { --adx-tone: var(--fx-ok); --adx-tone-soft: var(--fx-ok-soft); --adx-tone-text: var(--fx-ok-text); }
.adx-tone-warn { --adx-tone: var(--fx-warn); --adx-tone-soft: var(--fx-warn-soft); --adx-tone-text: var(--fx-warn-text); }
.adx-tone-crit { --adx-tone: var(--fx-crit); --adx-tone-soft: var(--fx-crit-soft); --adx-tone-text: var(--fx-crit-text); }

.adx-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 22px 24px;
  border-radius: 20px;
  border: 1px solid var(--fx-line);
  background:
    radial-gradient(420px 200px at 0% 0%, var(--fx-accent-soft), transparent 70%),
    radial-gradient(360px 180px at 100% 100%, var(--adx-tone-soft), transparent 70%),
    var(--fx-surface-2);
}

.adx-avatar {
  position: relative;
  flex: none;
  width: 104px;
  height: 104px;
  padding: 4px;
  border-radius: 50%;
  background: conic-gradient(from 210deg, var(--fx-accent), var(--fx-accent-deep), var(--fx-accent));
}

.adx-avatar img,
.adx-avatar > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--fx-surface-2);
  object-fit: cover;
  background: var(--fx-surface-3);
  color: var(--fx-text);
  font-size: 30px;
  font-weight: 300;
}

.adx-avatar::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 6px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--adx-tone);
  border: 3px solid var(--fx-surface-2);
}

.adx-hero-copy {
  min-width: 0;
}

.adx-hero-copy h3 {
  margin: 0;
  font-size: clamp(22px, 2.6vw, 30px);
  font-weight: 300;
  letter-spacing: 0.01em;
  line-height: 1.15;
  color: var(--fx-text);
  overflow-wrap: break-word;
}

.adx-hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}

.adx-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  background: var(--adx-tone-soft);
  color: var(--adx-tone-text, var(--fx-muted));
  font-size: 12px;
  font-weight: 600;
}

.adx-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--adx-tone);
}

.adx-id {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 12px 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--fx-line-2);
  background: var(--fx-surface);
  font-size: 12px;
  color: var(--fx-faint);
}

.adx-id svg {
  width: 14px;
  height: 14px;
  flex: none;
}

.adx-id b {
  min-width: 0;
  overflow-wrap: break-word;
  color: var(--fx-text);
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* ── Grupos ── */
.adx-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.adx-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--fx-line);
  background: var(--fx-surface-2);
}

.adx-card h4 {
  margin: 0 0 2px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fx-faint);
}

.adx-field {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.adx-ficon {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--fx-accent-soft);
  color: var(--fx-accent);
}

.adx-ficon svg {
  width: 18px;
  height: 18px;
}

.adx-fbody {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  padding-top: 1px;
}

.adx-fbody span {
  font-size: 11.5px;
  color: var(--fx-faint);
}

.adx-fbody strong {
  font-size: 14.5px;
  font-weight: 500;
  line-height: 1.4;
  color: var(--fx-text);
  overflow-wrap: break-word;
}

.adx-note {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--fx-muted);
}

.adx-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  margin-top: auto;
  padding: 0 14px;
  border-radius: 11px;
  border: 1px solid var(--fx-line-2);
  background: var(--fx-surface);
  color: var(--fx-text);
  font-size: 13px !important;
  font-weight: 600 !important;
}

.adx-action:hover:not(:disabled) {
  border-color: var(--fx-accent-line);
  background: var(--fx-accent-soft);
}

.adx-action:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.adx-action svg {
  width: 16px;
  height: 16px;
  color: var(--fx-accent);
}

.adx-card .adx-action + .adx-action {
  margin-top: 0;
}

.adx-source {
  margin: 0;
  text-align: center;
  font-size: 11.5px;
  color: var(--fx-faint);
}

/* ── Celular: janela vem de baixo, uma coluna ── */
@media (max-width: 640px) {
  .account-data-panel.adx-on {
    width: 100% !important;
    max-height: 92dvh !important;
    padding: 18px 16px calc(20px + var(--mobile-safe-bottom, 0px)) !important;
    border-bottom: 0 !important;
    border-radius: 24px 24px 0 0 !important;
  }

  .adx-root {
    gap: 14px;
  }

  .adx-ghost span {
    display: none;
  }

  .adx-ghost {
    width: 36px;
    padding: 0;
  }

  .adx-hero {
    flex-direction: column;
    text-align: center;
    gap: 14px;
    padding: 20px 16px;
  }

  .adx-hero-meta {
    justify-content: center;
  }

  .adx-avatar {
    width: 92px;
    height: 92px;
  }

  .adx-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .adx-card {
    padding: 16px;
  }
}

/* Título no padrão das páginas: rótulo com traço e título fino em caixa alta.
   (A janela fica fora da área principal, então o estilo é repetido aqui.) */
.adx-head .af-page-heading {
  display: grid;
  gap: 10px;
  justify-items: start;
}

.adx-head .af-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  color: var(--fx-accent-text) !important;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.adx-head .af-eyebrow::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--fx-accent);
  opacity: 0.7;
}

.adx-head .af-page-heading h2 {
  margin: 0;
  color: var(--fx-text);
  font-size: clamp(20px, 2.4vw, 28px) !important;
  font-weight: 200;
  letter-spacing: 0.14em;
  line-height: 1.1;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .adx-head .af-page-heading h2 {
    font-size: 19px !important;
    letter-spacing: 0.08em;
  }
}
