/* 平台端管理台样式:完全复用 styles.css 的设计令牌与既有组件质感 */
.admin-tabs { background: var(--surface); border-bottom: 1px solid var(--line); }
.admin-tabs[hidden] { display: none; }
.admin-tabs-inner { max-width: 1480px; margin: 0 auto; padding: 0 4vw; display: flex; gap: 26px; }
.admin-tab { padding: 13px 2px 11px; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: color .15s, border-color .15s; }
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--teal); border-bottom-color: var(--teal); }

.admin-view[hidden] { display: none; }
.admin-panel { padding: 24px 26px 22px; margin-bottom: 18px; }
.admin-toolbar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin: 20px 0 16px; }
.admin-inline-field { flex: 0 1 260px; }
.admin-toolbar-right { margin-left: auto; }

select { width: 100%; margin-top: 6px; border: 1px solid var(--line); border-radius: 5px; padding: 10px 11px; color: var(--ink); background: #fbfcfc; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s; }
select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(8, 127, 122, .1); }

.admin-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 10px 12px; background: #f8faf9; color: var(--muted); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 11px 12px; color: var(--ink); white-space: nowrap; border-bottom: 1px solid #edf0f1; }
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr { transition: background .15s, box-shadow .15s; }
.admin-table tbody tr:hover td { background: #f6faf9; }
.admin-table tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--teal); }
.admin-table .cell-id { color: var(--muted); }
.admin-table .cell-strong { font-weight: 600; }
.admin-table .cell-action { text-align: right; }
.cell-muted { color: var(--muted); }

.admin-badge { display: inline-block; border-radius: 3px; padding: 3px 7px; font-size: 11px; font-weight: 600; }
.badge-green { background: #e7f5ee; color: #237b5c; }
.badge-teal { background: #eaf5f3; color: var(--teal-dark); }
.badge-gray { background: #eef1f2; color: var(--muted); }
.badge-red { background: #fbeae7; color: var(--danger); }

.admin-empty { min-height: 160px; }
.button-small { min-height: 30px; padding: 0 10px; font-size: 12px; }

.stats-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { padding: 22px 24px; }
.stat-value { color: var(--ink); font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { margin-top: 6px; color: var(--muted); font-size: 12px; }
.stat-link { padding: 0; border: 0; background: transparent; color: var(--teal-dark); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.stat-link:hover { text-decoration: underline; }

.admin-dialog { width: min(520px, 100%); height: auto; max-height: min(760px, 92vh); overflow: auto; }
.admin-form { display: grid; gap: 2px; }
.field-error { min-height: 16px; margin-bottom: 8px; color: var(--danger); font-size: 12px; }
.admin-modal-note { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
.admin-modal-note strong { color: var(--ink); }

.admin-toast { position: fixed; top: 84px; right: 4vw; z-index: 30; max-width: 360px; padding: 10px 16px; background: var(--surface); border: 1px solid var(--line); border-left: 3px solid #237b5c; border-radius: 5px; box-shadow: 0 10px 28px rgba(25, 36, 45, .16); color: var(--ink); font-size: 13px; }
.admin-toast.error { border-left-color: var(--danger); }
.admin-toast[hidden] { display: none; }

.search-form--platform { grid-template-columns: 1fr 1fr 1.25fr 1.1fr auto auto; }

@media (max-width: 700px) {
  .admin-tabs-inner { gap: 18px; padding: 0 18px; }
  .admin-tab { padding: 11px 1px 10px; font-size: 12px; }
  .admin-panel { padding: 20px 16px; }
  .admin-toolbar .admin-inline-field { flex: 1 1 100%; }
  .admin-toolbar-right { width: 100%; margin-left: 0; }
  .stats-cards { grid-template-columns: 1fr; gap: 10px; }
  .search-form--platform { grid-template-columns: 1fr 1fr; }
  .search-form--platform label:nth-child(4) { grid-column: 1 / -1; }
}
