/* 用户认证 / 个人中心页 — 莫兰迪 */
body.user-page {
  margin: 40px auto;
  padding: 0 16px;
}

body.user-page .card button,
body.user-page .card input:not([type]),
body.user-page .card input[type="text"],
body.user-page .card input[type="email"],
body.user-page .card input[type="password"],
body.user-page .card select {
  width: 100%;
  padding: 10px;
  margin: 6px 0;
}

body.user-page .card .row button {
  width: auto;
  white-space: nowrap;
}

body.user-page .card .auth-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  flex-wrap: nowrap;
  margin: 8px 0 0;
}

body.user-page .card .auth-links button {
  width: auto;
  margin: 0;
  padding: 0;
  white-space: nowrap;
}

body.user-page .card .auth-links-sep {
  color: var(--color-text-muted);
  user-select: none;
  flex-shrink: 0;
}

body.user-page .field-label {
  display: block;
  margin: 10px 0 4px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-text, #222);
}

body.user-page #register-panel .field-label:first-of-type {
  margin-top: 0;
}

body.user-page #avatar-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.user-page #avatarInput {
  padding: 0;
  border: none;
}

body.user-page .card--wide {
  max-width: 780px;
}

.review-pending {
  color: var(--color-flash-warning-text);
  background: var(--color-flash-warning-bg);
  border: 1px solid var(--color-flash-warning-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.review-warn {
  color: var(--color-flash-error-text);
  background: var(--color-flash-error-bg);
  border: 1px solid var(--color-flash-error-border);
  padding: 8px 10px;
  border-radius: var(--radius-sm);
}

.membership-action {
  margin: 8px 0 20px;
}

.instructions {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  font-size: 0.92rem;
  line-height: 1.55;
}

.instructions ol {
  margin: 0;
  padding-left: 1.25rem;
}

.instructions li + li {
  margin-top: 8px;
}

.membership-qr-block {
  margin: 0 0 16px;
}

.membership-qr-lead {
  margin: 0 0 12px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--color-text, #222);
}

.membership-qr-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.membership-qr-card {
  margin: 0;
  padding: 12px 10px 10px;
  text-align: center;
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
}

.membership-qr-card img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: 0 auto 10px;
  border-radius: var(--radius-sm);
  background: #fff;
}

.membership-qr-card figcaption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.membership-qr-card figcaption span {
  color: var(--color-text-muted, #666);
  font-size: 0.82rem;
}

@media (max-width: 720px) {
  .membership-qr-grid {
    grid-template-columns: 1fr;
  }
}

.nav-row {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-row a,
.nav-row button {
  display: block;
  width: 100%;
  padding: 10px;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  box-sizing: border-box;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  background: var(--color-bg-surface);
  color: var(--color-text);
}

.nav-row a:hover {
  background: var(--color-bg-muted);
  text-decoration: none;
}

body.user-page.edit-user-page .card {
  max-width: 600px;
}

body.user-page.import-bills-page .card {
  max-width: 820px;
}

body.user-page.import-bills-page textarea {
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 12px;
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.4;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  resize: vertical;
  background: var(--color-bg-surface);
}

body.user-page.import-bills-page .hint {
  color: var(--color-text-muted, #666);
  line-height: 1.5;
  margin: 0 0 10px;
}

body.user-page.import-bills-page .import-section {
  margin: 0 0 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--color-border-light);
}

body.user-page.import-bills-page .import-section h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
}

body.user-page.import-bills-page .manual-import-form label {
  display: block;
  margin: 10px 0 4px;
}

body.user-page.import-bills-page .manual-import-form input[type="text"] {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
}

body.user-page.import-bills-page .import-preview-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-size: 0.9rem;
}

body.user-page.import-bills-page .import-preview-table th,
body.user-page.import-bills-page .import-preview-table td {
  border-bottom: 1px solid var(--color-border-light);
  padding: 6px 4px;
  text-align: left;
  word-break: break-all;
  vertical-align: top;
}

body.user-page.import-bills-page .import-new-rows {
  margin: 8px 0 16px;
}

.profile-view {
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: var(--color-bg-muted);
  display: none;
}

.profile-view h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.profile-view table {
  width: 100%;
  border-collapse: collapse;
}

.profile-view td {
  padding: 6px 4px;
  border-bottom: 1px solid var(--color-border-light);
  border-left: none;
  border-right: none;
  border-top: none;
}

.profile-view tr:last-child td {
  border-bottom: none;
}

.btn-row {
  display: flex;
  gap: 8px;
}

.btn-row button {
  flex: 1;
}
