:root {
    color-scheme: light;
    --ink: #263445;
    --muted: #738094;
    --line: #e3e8ef;
    --surface: #ffffff;
    --soft: #f3f6f9;
    --primary: #1677ff;
    --primary-soft: #eaf3ff;
    --danger: #cf3f4f;
    --danger-soft: #fff0f2;
    --success: #17864b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
    margin: 0;
    background: #f5f7fa;
    color: var(--ink);
    font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }

.moderation-shell {
    width: min(720px, 100%);
    min-height: 100vh;
    margin: 0 auto;
    padding: 12px;
}

.moderation-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 2px 12px;
}

.eyebrow {
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
}

h1 { margin: 2px 0 3px; font-size: 25px; line-height: 1.2; }
.identity { min-height: 18px; color: var(--muted); font-size: 12px; }

.back-link {
    flex: 0 0 auto;
    margin-top: 4px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    color: #425267;
    font-size: 13px;
    text-decoration: none;
}

.moderation-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 10px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.tab-button {
    min-width: 0;
    min-height: 42px;
    padding: 8px 4px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #66758a;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
}

.tab-button.active { background: var(--primary-soft); color: var(--primary); }
.tab-count { margin-left: 2px; font-size: 11px; font-weight: 600; }

.page-notice {
    margin-bottom: 10px;
    padding: 9px 11px;
    border: 1px solid #c8e7d5;
    border-radius: 10px;
    background: #effaf4;
    color: var(--success);
    font-size: 13px;
}

.page-notice.error { border-color: #f1c7cc; background: var(--danger-soft); color: var(--danger); }

.tab-panel {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 13px;
    border-bottom: 1px solid var(--line);
}

.panel-heading h2 { margin: 0; font-size: 17px; }
.panel-heading p { margin: 3px 0 0; color: var(--muted); font-size: 11px; }

.refresh-button {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--soft);
    color: #536277;
    cursor: pointer;
    font-size: 12px;
}

.record-list { padding: 0 12px; }
.row-main { min-width: 0; }
.row-main > .row-title,
.row-main > .row-detail,
.row-main > .row-meta { display: block; }

.ban-row,
.log-row,
.team-row {
    display: grid;
    gap: 8px;
    align-items: center;
    min-height: 68px;
    padding: 10px 0;
    border-bottom: 1px solid #edf0f4;
}

.record-list > :last-child { border-bottom: 0; }
.ban-row { grid-template-columns: minmax(0, 1fr) auto; }
.log-row { grid-template-columns: 32px minmax(0, 1fr); }
.team-row { grid-template-columns: 40px minmax(0, 1fr) auto; }
.team-row { color: inherit; text-decoration: none; }

.row-title {
    overflow: hidden;
    margin-bottom: 3px;
    font-size: 14px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-meta,
.row-detail {
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.55;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.row-detail { color: #536277; }

.unban-button {
    min-height: 36px;
    padding: 7px 10px;
    border: 1px solid #f0bdc4;
    border-radius: 9px;
    background: var(--danger-soft);
    color: var(--danger);
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.unban-button:disabled { cursor: wait; opacity: .55; }

.action-icon {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 9px;
    background: var(--soft);
    font-size: 15px;
}

.team-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--soft);
    object-fit: cover;
}

.level-pill {
    padding: 4px 7px;
    border-radius: 999px;
    background: #fff1c7;
    color: #7a3a00;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.empty-state { padding: 42px 8px; color: #8995a5; text-align: center; font-size: 13px; }

.pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 8px;
    align-items: center;
    padding: 10px 12px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12px;
    text-align: center;
}

.pager button {
    min-height: 36px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--soft);
    color: #4b5a6e;
    cursor: pointer;
}

.pager button:disabled { opacity: .4; }

@media (max-width: 420px) {
    .moderation-shell { padding: 10px 8px; }
    h1 { font-size: 22px; }
    .back-link { padding: 7px 8px; }
    .panel-heading { padding: 11px; }
    .record-list { padding: 0 10px; }
}
