.account-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.48);
}

.account-modal {
  display: flex;
  width: min(920px, 100%);
  min-height: 560px;
  max-height: min(84vh, 760px);
  border-radius: 20px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 32px 64px rgba(15, 23, 42, 0.18);
}

.account-modal__sidebar {
  flex: none;
  width: 220px;
  padding: 28px 18px;
  background: #f3f4f6;
  border-right: 1px solid rgba(15, 23, 42, 0.06);
}

.account-modal__sidebar-title {
  margin: 0 0 22px;
  padding: 0 12px;
  font-family: var(--vech-font-ui);
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.account-modal__nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-modal__nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: #4b5563;
  font-family: var(--vech-font-ui);
  font-size: 0.9375rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition:
    background 0.18s ease,
    color 0.18s ease;
}

.account-modal__nav-item:hover {
  background: rgba(255, 255, 255, 0.72);
  color: #111827;
}

.account-modal__nav-item--active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

.account-modal__main {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: auto;
  background: #fff;
}

.account-modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.18s ease;
}

.account-modal__close:hover {
  background: #f3f4f6;
  color: #111827;
}

.account-modal__close svg {
  width: 18px;
  height: 18px;
  display: block;
}

.account-modal__panel {
  padding: 32px 36px 36px;
}

.account-modal__panel-head {
  margin-bottom: 24px;
  padding-right: 40px;
}

.account-modal__panel-title {
  margin: 0;
  font-family: var(--vech-font-ui);
  font-size: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #111827;
}

.account-modal__profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  margin-bottom: 24px;
  border-radius: 16px;
  background: #f9fafb;
  border: 1px solid rgba(15, 23, 42, 0.05);
}

.account-modal__profile-avatar {
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.account-modal__profile-copy {
  flex: 1;
  min-width: 0;
}

.account-modal__profile-name {
  margin: 0 0 4px;
  font-family: var(--vech-font-ui);
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
}

.account-modal__profile-meta {
  margin: 0;
  font-size: 0.875rem;
  color: #6b7280;
}

.account-modal__member-badge {
  flex: none;
  padding: 0.45rem 0.75rem;
  border: none;
  border-radius: 999px;
  background: #eef2ff;
  color: #4b5563;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.account-modal__member-badge--active {
  background: rgba(26, 47, 251, 0.08);
  color: #1a2ffb;
  cursor: default;
  pointer-events: none;
}

.account-modal__member-badge--action {
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.account-modal__member-badge--action:hover {
  background: rgba(26, 47, 251, 0.12);
  color: #1a2ffb;
}

.account-modal__member-badge--action:focus-visible {
  outline: 2px solid #1a2ffb;
  outline-offset: 2px;
}

.account-modal__section {
  margin-bottom: 24px;
}

.account-modal__section-title {
  margin: 0 0 12px;
  font-family: var(--vech-font-ui);
  font-size: 0.9375rem;
  font-weight: 600;
  color: #374151;
}

.account-modal__rows {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
  background: #fff;
}

.account-modal__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
}

.account-modal__row + .account-modal__row {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.account-modal__row-main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.account-modal__row-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.account-modal__row-value {
  font-size: 0.875rem;
  color: #6b7280;
}

.account-modal__row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.account-modal__row-action {
  padding: 0.45rem 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
  transition:
    background 0.18s ease,
    border-color 0.18s ease;
}

.account-modal__row-action:hover {
  background: #f9fafb;
  border-color: rgba(15, 23, 42, 0.16);
}

.account-modal__logout-card {
  padding: 4px 0 0;
}

.account-modal__logout-btn {
  width: 100%;
  padding: 16px;
  border: none;
  border-radius: 16px;
  background: #f9fafb;
  color: #ef4444;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
}

.account-modal__logout-btn:hover {
  background: #fef2f2;
}

.account-modal__billing-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 16px;
  padding: 4px;
  border-radius: 999px;
  background: #f3f4f6;
}

.account-modal__billing-tab {
  padding: 8px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: #6b7280;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.account-modal__billing-tab:hover {
  color: #111827;
}

.account-modal__billing-tab--active {
  background: #fff;
  color: #111827;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.account-modal__billing-table-wrap {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  overflow: hidden;
}

.account-modal__billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.account-modal__billing-table thead {
  background: #f9fafb;
}

.account-modal__billing-table th,
.account-modal__billing-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.account-modal__billing-table th {
  font-weight: 600;
  color: #374151;
}

.account-modal__billing-table tbody td {
  color: #111827;
}

.account-modal__billing-row--clickable {
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.account-modal__billing-row--clickable:hover {
  background: rgba(94, 106, 210, 0.06);
}

.account-modal__billing-link {
  color: #5e6ad2;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.account-modal__billing-link:hover {
  color: #4450b8;
}

.account-modal__billing-table tbody tr:last-child td {
  border-bottom: none;
}

.account-modal__billing-empty {
  padding: 48px 16px !important;
  text-align: center !important;
  color: #6b7280;
}

.account-modal__billing-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.account-modal__billing-page-btn {
  padding: 8px 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease, opacity 0.18s ease;
}

.account-modal__billing-page-btn:hover:not(:disabled) {
  background: #f9fafb;
}

.account-modal__billing-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.account-modal__billing-page-info {
  flex: 1;
  text-align: center;
  font-size: 0.8125rem;
  color: #6b7280;
}

.account-modal__phone-bind {
  padding: 32px 36px 36px;
}

.account-modal__phone-bind-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 40px;
}

.account-modal__phone-bind-back {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.account-modal__phone-bind-back:hover {
  background: #f9fafb;
}

.account-modal__phone-bind-title {
  margin: 0;
  font-family: var(--vech-font-ui);
  font-size: 1.375rem;
  font-weight: 600;
  color: #111827;
}

.account-modal__phone-bind-desc {
  margin: 0 0 24px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #6b7280;
}

.account-modal__phone-bind-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 420px;
}

.account-modal__phone-bind-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.account-modal__phone-bind-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
}

.account-modal__phone-bind-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: 0.9375rem;
  outline: none;
  transition: border-color 0.18s ease;
}

.account-modal__phone-bind-input:focus {
  border-color: rgba(26, 47, 251, 0.45);
}

.account-modal__phone-bind-code-row {
  display: flex;
  gap: 10px;
}

.account-modal__phone-bind-code-row .account-modal__phone-bind-input {
  flex: 1;
  min-width: 0;
}

.account-modal__phone-bind-send {
  flex: none;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 12px;
  background: #f9fafb;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
}

.account-modal__phone-bind-send:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.account-modal__phone-bind-send:not(:disabled):hover {
  background: #f3f4f6;
}

.account-modal__phone-bind-debug {
  margin: 0;
  font-size: 0.8125rem;
  color: #6b7280;
}

.account-modal__phone-bind-error {
  margin: 0;
  font-size: 0.875rem;
  color: #ef4444;
}

.account-modal__phone-bind-submit {
  margin-top: 4px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s ease;
}

.account-modal__phone-bind-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.account-modal__phone-bind-submit:not(:disabled):hover {
  background: #1f2937;
}

.account-modal__wechat-bind {
  padding: 32px 36px 36px;
}

.account-modal__wechat-bind-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  padding-right: 40px;
}

.account-modal__wechat-bind-back {
  padding: 0.35rem 0.65rem;
  border: 1px solid rgba(15, 23, 42, 0.1);
  border-radius: 999px;
  background: #fff;
  color: #374151;
  font-size: 0.8125rem;
  font-weight: 500;
  cursor: pointer;
}

.account-modal__wechat-bind-back:hover {
  background: #f9fafb;
}

.account-modal__wechat-bind-title {
  margin: 0;
  font-family: var(--vech-font-ui);
  font-size: 1.375rem;
  font-weight: 600;
  color: #111827;
}

.account-modal__wechat-bind-desc {
  margin: 0 0 24px;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #6b7280;
}

.account-modal__wechat-bind-panel {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
}

.account-modal__wechat-bind-panel .vechoool-login-qr-wrap {
  min-height: 250px;
}

.account-modal__wechat-bind-mock {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
}

.account-modal__wechat-bind-mock-hint {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #6b7280;
}

.account-modal__wechat-bind-mock-btn {
  align-self: flex-start;
  padding: 12px 16px;
  border: none;
  border-radius: 12px;
  background: #111827;
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  cursor: pointer;
}

.account-modal__wechat-bind-mock-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.account-modal__wechat-bind-error {
  margin: 16px 0 0;
  font-size: 0.875rem;
  color: #ef4444;
}

@media (max-width: 768px) {
  .account-modal-backdrop {
    padding: 12px;
  }

  .account-modal {
    flex-direction: column;
    min-height: auto;
    max-height: calc(100vh - 24px);
  }

  .account-modal__sidebar {
    width: 100%;
    padding: 18px 16px 12px;
    border-right: none;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  }

  .account-modal__sidebar-title {
    margin-bottom: 12px;
  }

  .account-modal__nav {
    flex-direction: row;
  }

  .account-modal__nav-item {
    flex: 1;
    justify-content: center;
  }

  .account-modal__panel {
    padding: 24px 18px 28px;
  }

  .account-modal__phone-bind {
    padding: 24px 18px 28px;
  }

  .account-modal__wechat-bind {
    padding: 24px 18px 28px;
  }

  .account-modal__profile-card {
    flex-wrap: wrap;
  }

  .account-modal__member-badge {
    width: 100%;
    text-align: center;
  }

  .account-modal__billing-table-wrap {
    overflow-x: auto;
  }

  .account-modal__billing-table {
    min-width: 480px;
  }
}
