:root {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1.5;
  color: #292524;
  background: #f5f5f4;
  font-variant-numeric: tabular-nums;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { min-width: 320px; margin: 0; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
a { color: #0369a1; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 15px; font-weight: 600; }
h3 { font-size: 14px; }
p + p { margin-top: 8px; }
:focus-visible { outline: 2px solid #0284c7; outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.muted, label small { color: #78716c; font-size: 12px; }
.error { margin: 8px 0; color: #b91c1c; overflow-wrap: anywhere; }

.card {
  min-width: 0;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid #e7e5e4;
  border-radius: 6px;
  background: #fff;
}
.card > :last-child { margin-bottom: 0; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.panel-title h2 { margin: 0; }
.toolbar, .inline-actions, .action-grid, .check-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.toolbar { align-items: flex-end; margin: 0 0 12px; }
.toolbar .field { flex: 0 1 168px; }
.inline-actions, .action-grid, .check-row { margin-top: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid #d6d3d1;
  border-radius: 4px;
  background: #fff;
  color: #44403c;
  font-weight: 600;
  white-space: nowrap;
  text-decoration: none;
}
.btn:hover { background: #f5f5f4; }
.btn.primary { border-color: #292524; background: #292524; color: #fff; }
.btn.primary:hover { background: #44403c; }
.btn.danger { border-color: #fecaca; color: #b91c1c; }
.btn.danger:hover { background: #fef2f2; }
.copy-text { display: inline-block; max-width: 9ch; padding: 0; overflow: hidden; border: 0; background: none; color: inherit; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; cursor: copy; }
.account-email { max-width: none; }
.copy-text:hover { color: #0369a1; text-decoration: underline; text-underline-offset: 3px; }

.table-wrap { width: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: thin; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
th, td { padding: 8px; border-bottom: 1px solid #f0eeec; text-align: left; white-space: nowrap; }
th { position: sticky; z-index: 1; top: 0; background: #fafaf9; color: #78716c; font-weight: 600; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafaf9; }
td .btn { min-height: 26px; padding: 3px 7px; font-size: 12px; }
td.conv-id { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 16px; margin-top: 12px; }
.pagination-buttons, .pagination-page, .pagination-size { display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.pagination-buttons { flex-wrap: wrap; }
.pagination-page input { width: 64px; text-align: center; }
.pagination .btn { padding: 5px 9px; font-size: 12px; }
.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; background: #f5f5f4; font-size: 12px; white-space: nowrap; }
.ok { color: #15803d; background: #f0fdf4; }
.bad { color: #b91c1c; background: #fef2f2; }
.badge.blue { color: #0369a1; background: #f0f9ff; }
.empty { padding: 32px 16px; color: #78716c; text-align: center; }
.images > .empty { grid-column: 1 / -1; }
pre { overflow: auto; padding: 12px; border-radius: 4px; background: #292524; color: #fafaf9; font-size: 12px; }
#toast { position: fixed; z-index: 100; top: 16px; left: 50%; display: none; max-width: calc(100vw - 24px); padding: 9px 14px; transform: translateX(-50%); border-radius: 5px; background: #292524; color: #fff; overflow-wrap: anywhere; box-shadow: 0 4px 16px #0002; }

@media (max-width: 520px) {
  .card { padding: 10px; }
  .toolbar .field { flex: 1 1 140px; }
  .panel-title { flex-wrap: wrap; }
}
