/* 公共控件：公开页面、个人中心和后台共用。布局由各页面负责。 */

.btn,
.acct-btn,
:where(.acct-content, .admin-page) button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  text-decoration: none;
  vertical-align: middle;
  cursor: pointer;
}

.btn:hover:not(:disabled),
.acct-btn:hover:not(:disabled),
:where(.acct-content, .admin-page) button:hover:not(:disabled) {
  border-color: var(--gold-ink);
}

.btn--solid,
.acct-btn {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--white);
}

.btn--light {
  border-color: var(--paper);
  background: var(--paper);
  color: var(--ink);
}

.btn--outline,
.btn--outline-light,
.acct-btn--secondary {
  background: transparent;
  color: var(--gold-ink);
}

.btn--small,
.acct-btn--small {
  min-height: 36px;
  padding: 8px 14px;
  font-size: 12px;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gold-ink);
  font-size: 13px;
  text-underline-offset: 4px;
}

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

:where(.field, .acct-form, .admin-page) label {
  display: block;
  color: var(--ink-soft);
  font-size: 13px;
}

:where(.field, .acct-form, .admin-page) :is(input:not([type=checkbox]):not([type=radio]), select, textarea) {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 42px;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

:where(.field, .acct-form, .admin-page) select {
  appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%238a6a2f' stroke-width='1.5' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

:where(.field, .acct-form, .admin-page) :is(input, select, textarea):focus-visible {
  border-color: var(--gold-ink);
}

:where(.field, .acct-form, .admin-page) :is(input, select, textarea):disabled {
  opacity: .5;
  cursor: not-allowed;
}

:where(.field, .acct-form, .admin-page) textarea {
  min-height: 100px;
  resize: vertical;
}

.ui-card {
  min-width: 0;
  padding: var(--card-padding);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--white);
}

.acct-pagination,
.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}

.acct-pagination button,
.admin-pagination button {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 12px;
}

.acct-pagination span,
.admin-pagination span {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.acct-pagination button:disabled,
.admin-pagination button:disabled {
  background: var(--paper-deep);
}

.acct-notice,
.admin-notice {
  padding: 12px 16px;
  border-left: 3px solid var(--gold);
  background: var(--white);
  font-size: 13px;
}

.acct-empty,
.admin-empty {
  padding: 32px 16px;
  color: var(--muted);
  text-align: center;
}

.acct-empty__icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: var(--gold-wash);
  color: var(--gold-ink);
}

.acct-empty__icon svg {
  width: 28px;
  height: 28px;
}

.acct-empty h3 {
  margin-bottom: 8px;
  color: var(--ink-soft);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 500;
}

.acct-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.acct-empty__action {
  margin-top: 18px;
}

.acct-empty__action :is(a, button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  margin: 0;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--gold-ink);
  font-size: 12px;
}

.admin-table {
  overflow-x: auto;
}

.admin-table :is(th, td) {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.admin-table th {
  color: var(--muted);
  font-weight: 500;
  white-space: nowrap;
}

/* 表格宽于手机时，仅表格容器滚动，不撑宽正文。 */

.table-wrap,
.join-table {
  max-width: 100%;
  overflow-x: auto;
}

.admin-table table,
:where(.table-wrap, .join-table) table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

:where(.table-wrap, .join-table) :is(th, td) {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}

:where(.table-wrap, .join-table) th {
  color: var(--muted);
  font-weight: 500;
}

.toast {
  z-index: 90;
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transition: opacity .3s ease, transform .3s var(--ease);
  pointer-events: none;
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 13px;
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translate(-50%,14px);
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%);
}

/* Shared design primitives; page styles retain layout and content-specific details. */
.ui-card--dark {
  border-color: #b8913f66;
  background: var(--ink);
  color: var(--paper);
}

.ui-section-title {
  font-family: var(--font-sans);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: 0;
}

.ui-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.ui-faq {
  margin-top: 30px;
  border-top: 1px solid var(--line-soft);
}

.ui-faq > div,
.ui-faq > details {
  border-bottom: 1px solid var(--line-soft);
}

.ui-faq > div {
  padding-block: 20px;
}

.ui-faq :is(dt, summary) {
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.5;
}

.ui-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 20px;
  list-style: none;
  cursor: pointer;
}

.ui-faq summary::-webkit-details-marker {
  display: none;
}

.ui-faq summary::after {
  content: "+";
  flex: none;
  color: var(--gold-ink);
  font-family: var(--font-sans);
}

.ui-faq details[open] summary::after {
  content: "−";
}

.ui-faq :is(dd, p) {
  max-width: 62ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.8;
}

.ui-faq dd {
  margin: 8px 0 0;
}

.ui-faq p {
  margin: 0;
  padding-bottom: 20px;
}
