/* 账户管理 */

.account-mgmt-page {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 100%;
}

.account-mgmt-page-header h1 {
  font-size: 18px;
  font-weight: 600;
}

.account-mgmt-page-header p {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

.account-mgmt-card {
  background: var(--color-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}

.account-mgmt-tabs {
  display: flex;
  gap: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--color-border);
}

.account-mgmt-tab {
  padding: 12px 18px;
  font-size: 14px;
  color: var(--color-text-secondary);
  border: none;
  background: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.account-mgmt-tab.is-active {
  color: var(--color-primary);
  font-weight: 500;
  border-bottom-color: var(--color-primary);
}

.account-mgmt-panel {
  padding: 20px 24px 24px;
}

.account-mgmt-panel[hidden] {
  display: none !important;
}

.account-mgmt-section-title {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 6px;
}

.account-mgmt-section-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0 0 18px;
  line-height: 1.6;
}

.account-mgmt-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 20px;
  max-width: 720px;
}

.account-mgmt-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  color: var(--color-text-secondary);
}

.account-mgmt-form-grid label.full-width {
  grid-column: 1 / -1;
}

.account-mgmt-form-grid input,
.account-mgmt-form-grid textarea {
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  background: #fff;
}

.account-mgmt-form-grid textarea {
  min-height: 72px;
  resize: vertical;
}

.account-mgmt-verify-tag {
  font-size: 11px;
  color: #ea580c;
  margin-top: 2px;
}

.account-mgmt-strength {
  margin-top: 8px;
  max-width: 360px;
}

.account-mgmt-strength-bar {
  height: 6px;
  border-radius: 3px;
  background: #e2e8f0;
  overflow: hidden;
  margin-bottom: 6px;
}

.account-mgmt-strength-bar span {
  display: block;
  height: 100%;
  width: 0;
  transition: width 0.2s, background 0.2s;
}

.account-mgmt-strength-bar span.is-weak {
  width: 33%;
  background: #ef4444;
}

.account-mgmt-strength-bar span.is-medium {
  width: 66%;
  background: #f59e0b;
}

.account-mgmt-strength-bar span.is-strong {
  width: 100%;
  background: #22c55e;
}

.account-mgmt-strength-label {
  font-size: 12px;
  color: var(--color-text-secondary);
}

.account-mgmt-strength-tips {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

.account-mgmt-form-actions {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.account-mgmt-link {
  font-size: 13px;
  color: var(--color-primary);
  padding: 0;
}

.account-mgmt-link:hover {
  text-decoration: underline;
}

.account-mgmt-profile-top {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-bottom: 20px;
  max-width: 720px;
}

.account-mgmt-avatar-block label {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 8px;
}

.account-mgmt-avatar-preview {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-border);
  margin-bottom: 8px;
  background: #fde68a;
}

.account-mgmt-avatar-preview img,
.account-mgmt-avatar-preview svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.account-mgmt-avatar-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.account-mgmt-avatar-actions input[type="file"] {
  font-size: 12px;
  max-width: 200px;
}

.account-mgmt-log {
  margin-top: 28px;
  max-width: 720px;
}

.account-mgmt-log h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px;
}

.account-mgmt-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.account-mgmt-log-table th,
.account-mgmt-log-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.account-mgmt-log-table th {
  background: #f8fafc;
  color: var(--color-text-secondary);
  font-weight: 500;
}

.account-mgmt-toast {
  font-size: 13px;
  margin-left: 8px;
}

.account-mgmt-toast.is-ok {
  color: #16a34a;
}

.account-mgmt-toast.is-err {
  color: #dc2626;
}

/* 忘记密码 / 验证弹窗 */
.account-modal[hidden] {
  display: none !important;
}

.account-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
}

.account-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
}

.account-modal-dialog {
  position: relative;
  width: min(440px, calc(100vw - 32px));
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
}

.account-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border);
}

.account-modal-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
}

.account-modal-close {
  font-size: 22px;
  color: var(--color-text-muted);
  padding: 4px 8px;
}

.account-modal-body {
  padding: 20px;
}

.account-modal-body label {
  display: block;
  font-size: 12px;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}

.account-modal-body input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 14px;
}

.account-modal-steps {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--color-text-muted);
}

.account-modal-steps span.is-active {
  color: var(--color-primary);
  font-weight: 500;
}

.account-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--color-border);
}

.account-modal-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
