/* ============================================================================
   CONTA V3 — modal de perfil/conta/segurança no shell .pk-modal.

   Carregado DEPOIS de menu-v3.css e mobile.css para poder ajustar só a conta
   sem mexer no CONFIG. Tudo é escopado em .acct-modal/.acct-*.
   ========================================================================== */

.acct-modal {
  width: min(880px, 100%);
  max-height: min(92dvh, 860px);
}
.acct-modal .pk-modal-head {
  padding: 16px 18px;
}
.acct-modal .pk-modal-body {
  padding: 0 18px 14px;
}
.acct-modal .pk-modal-foot {
  padding: 12px 18px;
}
.acct-modal .pk-modal-x .pk-i {
  width: 15px;
  height: 15px;
}
.acct-modal .pk-i {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}
.acct-body {
  display: block;
}

/* ── Hero da conta/treinador ────────────────────────────────────────────── */
.acct-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 14px 0 2px;
  padding: 15px 16px;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 15px;
  background:
    radial-gradient(420px 130px at 0% 0%, rgba(56, 189, 248, 0.12), transparent 70%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.acct-avatar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 17px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(139, 92, 246, 0.2));
  color: #dff4ff;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.04em;
  box-shadow: 0 8px 22px rgba(8, 15, 30, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.acct-avatar::after {
  content: '';
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 13px;
  height: 13px;
  border: 3px solid #0c1528;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 9px rgba(52, 211, 153, 0.8);
}
.acct-identity {
  min-width: 0;
  flex: 1;
}
.acct-name-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.acct-name-line b {
  color: #f3f7ff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.acct-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  padding: 0 8px;
  border: 1px solid rgba(52, 211, 153, 0.28);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: #86efac;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}
.acct-chip::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.acct-chip.neutral {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(148, 163, 184, 0.07);
  color: #9fb3c8;
}
.acct-chip.neutral::before {
  box-shadow: none;
}
.acct-email {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  color: #9fb3c8;
  font-size: 11.5px;
  overflow-wrap: anywhere;
}
.acct-email .pk-i {
  width: 14px;
  height: 14px;
  color: #7b8bab;
}
.acct-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 9px;
}
.acct-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #8fa3bb;
  font-size: 10.5px;
  font-weight: 600;
}
.acct-meta .pk-i {
  width: 14px;
  height: 14px;
  color: #6f81a3;
}

/* ── Seções, cartões e linhas ───────────────────────────────────────────── */
.acct-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 2px 8px;
  color: #6f81a3;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.acct-label::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(148, 163, 184, 0.1);
}
.acct-card {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.022);
}
.acct-entry {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 54px;
  padding: 9px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.acct-entry:first-child {
  border-top: 0;
}
.acct-entry:hover {
  background: rgba(255, 255, 255, 0.018);
}
.acct-entry-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.045);
  color: #9fb0cc;
}
.acct-entry-ico .pk-i {
  width: 17px;
  height: 17px;
}
.acct-entry-ico.google {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.07);
}
.acct-entry-ico.key {
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.09);
  color: #7dd3fc;
}
.acct-entry-ico.passkey {
  border-color: rgba(139, 92, 246, 0.24);
  background: rgba(139, 92, 246, 0.1);
  color: #c4b5fd;
}
.acct-entry-ico.shield {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.08);
  color: #86efac;
}
.acct-entry-ico.swap {
  border-color: rgba(56, 189, 248, 0.22);
  background: rgba(56, 189, 248, 0.09);
  color: #7dd3fc;
}
.acct-entry-ico.danger {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.09);
  color: #fca5a5;
}
.acct-entry-main {
  min-width: 0;
  flex: 1;
}
.acct-entry-main b {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #dfe8fb;
  font-size: 12.5px;
  font-weight: 650;
}
.acct-entry-main small {
  display: block;
  margin-top: 2px;
  color: #7b8bab;
  font-size: 10.5px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.acct-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border: 1px solid rgba(52, 211, 153, 0.22);
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  color: #86efac;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.acct-badge.neutral {
  border-color: rgba(148, 163, 184, 0.16);
  background: rgba(148, 163, 184, 0.07);
  color: #9fb3c8;
}
.acct-badge.warn {
  border-color: rgba(250, 204, 21, 0.24);
  background: rgba(250, 204, 21, 0.08);
  color: #fde68a;
}
.acct-badge.err {
  border-color: rgba(239, 68, 68, 0.26);
  background: rgba(239, 68, 68, 0.08);
  color: #fca5a5;
}
.acct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  height: 29px;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
  color: #b9c8e8;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.acct-btn .pk-i {
  width: 13px;
  height: 13px;
}
.acct-btn:hover:not(:disabled) {
  border-color: rgba(56, 189, 248, 0.34);
  background: rgba(56, 189, 248, 0.09);
  color: #bae6fd;
}
.acct-btn.primary {
  border-color: rgba(56, 189, 248, 0.3);
  background: rgba(56, 189, 248, 0.1);
  color: #bae6fd;
}
.acct-btn.danger {
  border-color: rgba(239, 68, 68, 0.24);
  background: rgba(239, 68, 68, 0.055);
  color: #fca5a5;
}
.acct-btn.danger:hover:not(:disabled) {
  border-color: rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
}
.acct-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Subpainel de passkeys/senha ────────────────────────────────────────── */
.acct-subpanel {
  border-top: 1px solid rgba(255, 255, 255, 0.045);
  background: rgba(4, 8, 18, 0.18);
  padding: 2px 12px 10px 57px;
}
.acct-passkey {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.acct-passkey:last-of-type {
  border-bottom: 0;
}
.acct-passkey > .pk-i {
  width: 16px;
  height: 16px;
  color: #8fa1c0;
}
.acct-passkey > div {
  min-width: 0;
  flex: 1;
}
.acct-passkey b {
  display: block;
  color: #d8e6f2;
  font-size: 11.5px;
  font-weight: 650;
}
.acct-passkey small {
  display: block;
  color: #6f81a3;
  font-size: 9.5px;
  line-height: 1.3;
}
.acct-passkey .acct-btn {
  height: 26px;
  padding: 0 8px;
  font-size: 9.5px;
}
.acct-add {
  display: flex;
  gap: 7px;
  padding-top: 9px;
}
.acct-input {
  min-width: 0;
  flex: 1;
  height: 31px;
  box-sizing: border-box;
  padding: 0 10px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 8px;
  background: rgba(4, 8, 18, 0.4);
  color: #e7edfd;
  font: inherit;
  font-size: 11px;
}
.acct-input::placeholder {
  color: #5f708e;
}
.acct-input:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.08);
}
.acct-add .acct-btn {
  height: 31px;
}
.acct-form {
  display: grid;
  gap: 7px;
  padding-top: 9px;
}
.acct-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

/* ── Linha da segurança (switch) ────────────────────────────────────────── */
.acct-row {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  padding: 11px 12px;
}
.acct-row-main {
  min-width: 0;
  flex: 1;
}
.acct-row-main b {
  display: block;
  color: #dfe8fb;
  font-size: 12.5px;
  font-weight: 650;
}
.acct-row-main small {
  display: block;
  margin-top: 3px;
  color: #7b8bab;
  font-size: 10.5px;
  line-height: 1.4;
}
.acct-modal .pk-switch:disabled {
  opacity: 0.5;
  cursor: default;
}

/* ── Avisos, notas e estados ────────────────────────────────────────────── */
.acct-notice,
.acct-note {
  margin: 10px 0;
  padding: 8px 10px;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.08);
  color: #cbeaff;
  font-size: 11.5px;
  line-height: 1.45;
}
.acct-notice.ok {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(74, 222, 128, 0.1);
  color: #bbf7d0;
}
.acct-notice.err {
  border-color: rgba(239, 68, 68, 0.42);
  background: rgba(239, 68, 68, 0.1);
  color: #fca5a5;
}
.acct-note {
  margin: 7px 0 4px;
  border-color: rgba(148, 163, 184, 0.12);
  background: rgba(255, 255, 255, 0.025);
  color: #8fa3bb;
}
.acct-note.err {
  border-color: rgba(239, 68, 68, 0.32);
  background: rgba(239, 68, 68, 0.07);
  color: #fca5a5;
}
.acct-empty {
  padding: 18px 10px;
  border: 1px dashed rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  color: #7b8bab;
  font-size: 11.5px;
  text-align: center;
}
.acct-retry {
  display: flex;
  justify-content: flex-start;
  margin-top: 8px;
}

/* ── Diamantes ──────────────────────────────────────────────────────────── */
.acct-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}
.acct-metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 11px;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.022);
}
.acct-metric-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7b8bab;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.acct-metric-top .pk-i {
  width: 14px;
  height: 14px;
}
.acct-metric b {
  color: #eef2ff;
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.acct-tx {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.045);
}
.acct-tx:first-child {
  border-top: 0;
}
.acct-tx-ico {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border: 1px solid rgba(148, 163, 184, 0.13);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  color: #8fa1c0;
}
.acct-tx-ico .pk-i {
  width: 15px;
  height: 15px;
}
.acct-tx-ico.pos {
  border-color: rgba(52, 211, 153, 0.22);
  background: rgba(52, 211, 153, 0.07);
  color: #86efac;
}
.acct-tx-ico.neg {
  border-color: rgba(239, 68, 68, 0.22);
  background: rgba(239, 68, 68, 0.07);
  color: #fca5a5;
}
.acct-tx-main {
  min-width: 0;
  flex: 1;
}
.acct-tx-main b {
  display: block;
  color: #d8e6f2;
  font-size: 11.5px;
  font-weight: 650;
}
.acct-tx-main small {
  display: block;
  margin-top: 1px;
  color: #6f81a3;
  font-size: 9.5px;
  line-height: 1.3;
}
.acct-tx-right {
  flex: 0 0 auto;
  text-align: right;
}
.acct-tx-amount {
  display: block;
  color: #dfe8fb;
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.acct-tx-amount.pos {
  color: #86efac;
}
.acct-tx-amount.neg {
  color: #fca5a5;
}
.acct-tx-balance {
  display: block;
  color: #6f81a3;
  font-size: 9.5px;
  font-variant-numeric: tabular-nums;
}

/* ── Privacidade ────────────────────────────────────────────────────────── */
.acct-privacy-actions .acct-entry {
  min-height: 50px;
}

/* ── Rodapé ─────────────────────────────────────────────────────────────── */
.acct-foot-note {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #6f81a3;
  font-size: 10px;
}
.acct-foot-note .pk-i {
  width: 14px;
  height: 14px;
  color: #5f708e;
}
.acct-modal .pk-modal-foot {
  gap: 8px;
}

/* ── Mobile: abas em grade, sem rolagem horizontal ──────────────────────── */
@media (max-width: 760px) {
  .acct-modal .pk-modal-side {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    overflow: visible;
  }
  .acct-modal .pk-side-tab {
    width: 100%;
    justify-content: flex-start;
    padding: 0 10px;
  }
  .acct-modal .pk-modal-head {
    padding: 11px 12px;
  }
  .acct-modal .acct-hero {
    margin-top: 10px;
  }
  .acct-modal .acct-subpanel {
    padding-left: 57px;
  }
  .acct-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .acct-entry {
    gap: 9px;
    padding: 8px 10px;
  }
  .acct-entry-ico {
    width: 31px;
    height: 31px;
  }
  .acct-entry-main b {
    font-size: 12px;
  }
  .acct-entry-main small {
    font-size: 10px;
  }
  .acct-btn {
    height: 28px;
    padding: 0 8px;
    font-size: 9.5px;
  }
  .acct-btn .pk-i {
    width: 12px;
    height: 12px;
  }
  .acct-passkey {
    gap: 7px;
  }
  .acct-add {
    flex-wrap: wrap;
  }
  .acct-add .acct-input {
    flex: 1 1 160px;
  }
  .acct-add .acct-btn {
    flex: 0 0 auto;
  }
  .acct-metric {
    padding: 8px;
  }
  .acct-metric b {
    font-size: 15px;
  }
  .acct-tx {
    padding: 8px 10px;
  }
}


/* No celular o shell é sempre uma coluna, inclusive no landscape (844px),
   onde a media query de 760px do menu-v3 não chega. */
html.pokeidle-mobile body.authed .acct-modal {
  flex-direction: column;
}
html.pokeidle-mobile body.authed .acct-modal .pk-modal-side {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: calc(6px + env(safe-area-inset-top, 0px)) 10px 6px;
  overflow: visible;
}
html.pokeidle-mobile body.authed .acct-modal .pk-modal-brand,
html.pokeidle-mobile body.authed .acct-modal .pk-modal-side-foot {
  display: none;
}
html.pokeidle-mobile body.authed .acct-modal .pk-side-tab {
  width: 100%;
  justify-content: flex-start;
}
@media (min-width: 620px) {
  html.pokeidle-mobile body.authed .acct-modal .pk-modal-side {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
