.account-dashboard-page {
  background: var(--soft);
}

.account-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 0 4.2vw;
  border-bottom: 1px solid var(--line);
  background: #fff;
}

.account-dashboard-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-dashboard-nav a,
.account-buy-coins,
.account-settings-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 8px 12px;
  background: #fff;
  color: var(--ink);
  font: 600 12px 'Noto Sans SC', sans-serif;
}

.account-dashboard-nav a:hover {
  border-color: var(--ink);
}

@media (max-width: 520px) {
  .account-dashboard-header { align-items: flex-start; padding-top: 14px; padding-bottom: 14px; }
  .account-dashboard-nav a { padding: 7px 9px; }
}

.account-dashboard-shell {
  width: min(1120px, 100%);
  min-height: calc(100vh - 68px);
  margin: 0 auto;
  padding: 48px 4.2vw 76px;
}

.account-dashboard-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.account-profile-card,
.account-wallet-card,
.account-panel {
  border: 1px solid var(--line);
  background: #fff;
}

.account-profile-card {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 30px;
}

.account-avatar {
  display: grid;
  width: 84px;
  height: 84px;
  flex: 0 0 84px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--lime);
  color: var(--ink);
  font: 700 32px Georgia, serif;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.account-eyebrow {
  margin: 0 0 7px;
  color: var(--orange);
  font: 500 10px 'DM Mono', monospace;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.account-profile-copy h1,
.account-wallet-card h2,
.account-panel h2 {
  margin: 0;
  letter-spacing: -1px;
}

.account-profile-copy h1 {
  font-size: 30px;
}

.account-display-name {
  margin: 10px 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.account-email,
.account-profile-note,
.account-panel > p:last-child {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.account-profile-note {
  margin-top: 9px;
}

.account-wallet-card {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 28px 30px;
  background: var(--ink);
  color: #fff;
}

.account-wallet-card .account-eyebrow {
  color: var(--lime);
}

.account-wallet-card h2 {
  font-size: 18px;
}

.account-balance {
  margin: 8px 0 0;
  color: var(--lime);
  font: 700 clamp(34px, 5vw, 54px) 'DM Mono', monospace;
  letter-spacing: -3px;
}

.account-buy-coins {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--ink);
  white-space: nowrap;
}

.account-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.account-panel {
  min-height: 180px;
  padding: 26px;
}

.account-panel h2 {
  font-size: 21px;
}

.account-panel .account-eyebrow {
  margin-bottom: 9px;
}

.account-transactions {
  grid-column: 1 / -1;
  min-width: 0;
  min-height: 0;
}

.account-projects {
  grid-column: 1 / -1;
  min-width: 0;
}

.account-projects-intro {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.account-projects-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 12px;
  border: 1px solid var(--ink);
  padding: 8px 12px;
  background: var(--lime);
  color: var(--ink);
  font: 700 12px 'Noto Sans SC', sans-serif;
  text-decoration: none;
}

.account-projects-state {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.account-projects-state.is-error {
  color: var(--orange);
}

.account-projects-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.account-project-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-width: 0;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.account-project-details,
.account-project-actions,
.account-project-metadata {
  min-width: 0;
}

.account-project-name {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 15px;
}

.account-project-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.account-project-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.account-project-status.is-draft {
  color: #2c7b56;
}

.account-project-status.is-locked,
.account-project-status.is-unavailable {
  color: var(--muted);
}

.account-project-actions,
.account-project-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.account-project-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid var(--line);
  padding: 7px 10px;
  background: #fff;
  color: var(--ink);
  font: 600 12px 'Noto Sans SC', sans-serif;
  text-decoration: none;
  cursor: pointer;
}

.account-project-action:hover:not(:disabled) {
  border-color: var(--ink);
  box-shadow: 2px 2px 0 var(--lime);
}

.account-project-action:focus-visible,
.account-project-rename-form input:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 2px;
}

.account-project-action:disabled {
  cursor: not-allowed;
  opacity: .56;
}

.account-project-action.is-danger {
  color: #a33b2b;
}

.account-project-rename-form,
.account-project-delete-confirmation {
  display: grid;
  gap: 8px;
  min-width: min(100%, 320px);
}

.account-project-rename-form label,
.account-project-delete-confirmation p,
.account-project-action-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.account-project-rename-form label {
  color: var(--ink);
  font-weight: 700;
}

.account-project-rename-form input {
  width: 100%;
  min-width: 0;
  min-height: 38px;
  border: 1px solid var(--line);
  padding: 7px 9px;
  background: #fff;
  color: var(--ink);
  font: 14px 'Noto Sans SC', sans-serif;
}

.wallet-transactions-status,
.wallet-transactions-state {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.wallet-transactions-status[hidden],
.wallet-transactions-state[hidden],
.wallet-transactions-list[hidden],
.wallet-transactions-load-more[hidden] {
  display: none;
}

.wallet-transactions-list {
  display: grid;
  gap: 0;
  margin: 16px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
  list-style: none;
}

.wallet-transaction-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-width: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.wallet-transaction-details {
  min-width: 0;
}

.wallet-transaction-type,
.wallet-transaction-date {
  margin: 0;
}

.wallet-transaction-type {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.wallet-transaction-date {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.wallet-transaction-amount {
  font: 700 14px 'DM Mono', monospace;
  white-space: nowrap;
}

.wallet-transaction-amount.is-credit {
  color: #2c7b56;
}

.wallet-transaction-amount.is-debit {
  color: var(--orange);
}

.wallet-transactions-load-more {
  width: 100%;
  min-height: 40px;
  margin-top: 16px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: 600 12px 'Noto Sans SC', sans-serif;
  cursor: pointer;
}

.wallet-transactions-load-more:hover:not(:disabled) {
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--lime);
}

.wallet-transactions-load-more:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.account-settings-actions {
  display: grid;
  gap: 9px;
  margin-top: 18px;
}

.account-settings-actions button {
  width: 100%;
  cursor: pointer;
}

.account-settings-actions button:disabled {
  cursor: not-allowed;
  opacity: .52;
}

.display-name-edit-form {
  display: grid;
  gap: 8px;
}

.display-name-edit-form[hidden] {
  display: none;
}

.display-name-edit-form label {
  font-size: 12px;
  font-weight: 700;
}

.display-name-edit-form input {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: 14px 'Noto Sans SC', sans-serif;
}

.display-name-edit-form input:focus {
  outline: 2px solid var(--lime);
  outline-offset: 1px;
}

.display-name-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.account-settings-actions .display-name-cancel-button {
  background: #fff;
  color: var(--ink);
}

.display-name-edit-status {
  min-height: 1.65em;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.avatar-edit-panel {
  display: grid;
  gap: 8px;
}

.avatar-edit-panel[hidden] {
  display: none;
}

.avatar-edit-panel label {
  font-size: 12px;
  font-weight: 700;
}

.avatar-edit-panel input[type="file"] {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  font: 12px 'Noto Sans SC', sans-serif;
}

.avatar-file-hint,
.avatar-upload-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.avatar-upload-status {
  min-height: 1.65em;
}

.avatar-preview {
  width: min(160px, 100%);
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--soft);
}

.avatar-edit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.account-settings-actions .avatar-cancel-button {
  background: #fff;
  color: var(--ink);
}

.account-settings-actions .account-logout-button {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

@media (max-width: 700px) {
  .account-dashboard-header {
    padding: 0 5vw;
  }

  .account-dashboard-shell {
    padding: 30px 5vw 54px;
  }

  .account-profile-card,
  .account-wallet-card {
    padding: 22px;
  }

  .account-dashboard-grid {
    grid-template-columns: 1fr;
  }

  .account-transactions {
    grid-column: auto;
  }

  .account-projects {
    grid-column: auto;
  }

  .account-project-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .account-project-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 440px) {
  .account-dashboard-home-link {
    padding-inline: 8px;
    font-size: 11px;
  }

  .account-profile-card,
  .account-wallet-card {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .account-avatar {
    width: 68px;
    height: 68px;
    flex-basis: 68px;
    font-size: 26px;
  }

  .account-buy-coins {
    width: 100%;
  }

  .wallet-transaction-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }
}
