:root {
  --brand: #3370ff;
  --brand-hover: #245bdb;
  --ink: #1f2329;
  --muted: #657083;
  --line: #dee0e3;
  --surface: #f5f6f7;
  --radius: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font: 14px/1.55 -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}
a { color: var(--brand); text-decoration: none; }
a:hover, .workspace a:hover { text-decoration: none; }
button, input, textarea, select { font: inherit; }
button {
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  color: white;
  background: var(--brand);
  cursor: pointer;
  transition: background-color .15s, color .15s;
}
button:hover { background: var(--brand-hover); }
button:disabled { opacity: .6; cursor: wait; }
button.secondary { color: var(--ink); background: white; border-color: var(--line); }
button.secondary:hover { background: var(--surface); }
input, select, textarea {
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  color: var(--ink);
}
textarea { width: 100%; min-height: 112px; resize: vertical; }
input:focus, select:focus, textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 20%, transparent);
  border-color: var(--brand);
}
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
label { display: grid; gap: 7px; margin: 16px 0; color: #475467; font-size: 13px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 700; }
h2 { margin-bottom: 0; font-size: 16px; font-weight: 650; }
h3 { font-size: 15px; font-weight: 650; }
small, .muted { color: var(--muted); font-size: 12px; }
.bar { display: flex; gap: 12px; align-items: center; }

.workspace {
  --brand: #315bd8;
  --brand-hover: #2549af;
  --ink: #182335;
  --muted: #606d80;
  --line: #e0e6ef;
  --surface: #f4f6fa;
  --selection: #ebf0ff;
  --sidebar-width: 216px;
  min-height: 100vh;
  background: var(--surface);
  color: var(--ink);
  --tblr-primary: #315bd8;
  --tblr-primary-rgb: 49, 91, 216;
}
.side {
  width: var(--sidebar-width);
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 25px 15px 16px;
  border-right: 1px solid var(--line);
  background: #fbfcfe;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 0 9px; color: var(--ink); font-size: 17px; font-weight: 680; line-height: 1.4; }
.brand span:not(.brand-icon):not(.brand-name) { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; font-weight: 400; letter-spacing: 1px; }
.brand-icon {
  display: grid;
  place-items: center;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: white;
  background: var(--brand);
  font-size: 20px;
}
.side > .brand { margin-bottom: 27px; }
.nav-caption { margin: 15px 10px 8px; color: var(--muted); font-size: 11px; font-weight: 550; }
.sidebar-nav { display: grid; gap: 4px; }
.sidebar-nav .sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: var(--radius);
  color: #445168;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.4;
}
.sidebar-link i { display: grid; flex: 0 0 19px; place-items: center; width: 19px; font-size: 17px; }
.sidebar-nav .sidebar-link:hover { background: #eff2f8; }
.sidebar-nav .sidebar-link.active { color: var(--brand); background: var(--selection); font-weight: 650; }
.sidebar-nav [data-tab="review"] { position: relative; }
.pending-submission-badge {
  min-width: 23px;
  margin-inline-start: auto;
  padding: 1px 6px;
  border-radius: 12px;
  background: #e5edff;
  color: #264eb5;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.65;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.side-bottom { margin-top: auto; padding-top: 24px; }
.account-row { display: flex; align-items: center; gap: 9px; padding: 14px 5px 0; border-top: 1px solid var(--line); }
.account-action { display: flex; flex: 1; align-items: center; gap: 9px; padding: 0 5px 0 0; background: transparent; text-align: start; white-space: nowrap; }
.account-action:hover { background: #eff2f8; }
.avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--brand);
  background: #eaf0ff;
  font-size: 13px;
  font-weight: 650;
}
.account-copy { color: #445168; font-size: 13px; }
.logout-action { display: grid; flex: none; place-items: center; width: 34px; height: 34px; padding: 0; margin-left: auto; border-radius: var(--radius); background: transparent; color: var(--muted); font-size: 18px; }
.logout-action:hover { color: #a83945; background: #fff0f1; }

.work-area { min-width: 0; margin-left: var(--sidebar-width); }
.workspace-main { max-width: 1380px; margin-inline: auto; padding: 38px clamp(22px, 3.3vw, 58px) 46px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 23px; }
.page-heading h1 { margin: 0; font-size: 29px; letter-spacing: -.025em; }
.page-heading-title { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.app-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding-inline: 8px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  white-space: nowrap;
}
.app-switcher img { display: block; border: 1px solid var(--line); border-radius: 6px; }
.app-switcher select {
  field-sizing: content;
  gap: 6px;
  padding: 4px 0;
  border: 0;
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
}
.app-switcher select:focus { outline: none; }
.app-switcher:has(select:focus-visible) { outline: 2px solid var(--brand); outline-offset: 2px; }

@supports (appearance: base-select) and selector(::picker(select)) {
  .workspace select:not([multiple], [size]),
  .workspace select:not([multiple], [size])::picker(select) { appearance: base-select; }
  .workspace select:not([multiple], [size]) { align-items: center; cursor: pointer; }
  .workspace select.form-select:not([multiple], [size]) { background-image: none; }
  .workspace select::picker-icon { color: var(--muted); font-size: 12px; }
  .workspace select::picker(select) {
    min-inline-size: anchor-size(width);
    margin-block: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    color: var(--ink);
    background: white;
    box-shadow: 0 8px 20px #20304e1a;
  }
  .app-switcher { anchor-name: --app-switcher; }
  .app-switcher select::picker(select) { position-anchor: --app-switcher; }
  .workspace select option {
    min-block-size: 34px;
    gap: 12px;
    padding: 6px 9px;
    border-radius: 5px;
    font-size: 13px;
    cursor: pointer;
  }
  .workspace select option:hover { background: var(--surface); }
  .workspace select option:checked { color: var(--brand); background: var(--selection); font-weight: 650; }
  .workspace select option::checkmark { order: 1; margin-inline-start: auto; }
}
.page-refresh { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; font-size: 13px; white-space: nowrap; }
.pill.simulation-mode { padding: 5px 9px; color: #875400; background: #fff2d8; }

.review-panel { border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 2px 6px #23304705; }
.review-panel[data-view="config"] { border: 0; background: transparent; box-shadow: none; }
.review-panel[data-view="overview"],
.review-panel[data-view="system-space"] { border: 0; background: transparent; box-shadow: none; }
.dashboard { display: grid; gap: 16px; }
.dashboard h2 { font-size: 16px; }
.dashboard-card {
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.dashboard-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.dashboard-card-head h2 { margin: 0; }
.dashboard-hint { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.dashboard-metrics, .dashboard-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dashboard-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.dashboard-metrics dt { color: #4d5c72; font-size: 13px; font-weight: 550; }
.dashboard-metrics dd {
  margin: 5px 0 0;
  font-size: clamp(23px, 3vw, 32px);
  font-weight: 690;
  line-height: 1.24;
  font-variant-numeric: tabular-nums;
}
.dashboard-metrics > :first-child { background: #edf2ff; border-color: #dce6ff; }
.dashboard-metrics > :first-child dd { color: var(--brand); }
.dashboard-breakdown { margin: 10px 0 0; }
.dashboard-breakdown > div, .space-disk-meta > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px 12px;
  font-size: 13px;
}
.dashboard-breakdown > div { padding-block: 9px; }
.dashboard-breakdown > div + div { border-top: 1px solid var(--line); }
.dashboard-breakdown dt, .space-disk-meta dt { color: #4d5c72; }
.dashboard-breakdown dd, .space-disk-meta dd { margin: 0; font-weight: 630; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dashboard-breakdown small { display: inline-block; margin-inline-start: 5px; }
.overview-chart-scroll { overflow-x: auto; scrollbar-width: thin; margin-top: 12px; }
.overview-chart {
  display: grid;
  grid-template-columns: repeat(14, minmax(28px, 1fr));
  gap: 6px;
  min-width: 470px;
  margin: 0;
  padding: 0 0 4px;
  list-style: none;
}
.overview-chart > li { display: grid; gap: 5px; min-width: 0; text-align: center; }
.overview-bar-track {
  position: relative;
  height: 132px;
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-start;
  gap: 3px;
  border-bottom: 1px solid var(--line);
}
.overview-bar {
  width: min(65%, 30px);
  height: calc(var(--bar-height) * .83);
  border-radius: 5px 5px 0 0;
  background: #b3c6ff;
}
.overview-bar.today { background: var(--brand); }
.overview-bar-count, .overview-bar-date { color: var(--muted); font-size: 11px; line-height: 1.35; font-variant-numeric: tabular-nums; }
.overview-date-day { display: none; }
.overview-chart > li:last-child .overview-bar-count { color: var(--brand); font-weight: 700; }
.overview-daily { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 11px; font-size: 13px; }
.overview-daily summary { color: var(--brand); cursor: pointer; font-weight: 550; }
.overview-daily table { width: 100%; margin-top: 8px; border-collapse: collapse; }
.overview-daily th, .overview-daily td { padding: 7px 4px; border-bottom: 1px solid var(--line); text-align: end; font-weight: 500; }
.overview-daily tr > :first-child { text-align: start; }
.space-remaining { margin: 9px 0 12px; color: var(--muted); }
.space-remaining strong { margin-inline-end: 3px; color: var(--ink); font-size: clamp(25px, 4vw, 35px); font-weight: 690; }
.space-status.normal { color: #176445; background: #e7f5ee; }
.space-status.warning, .space-stale { color: #875400; background: #fff2d8; }
.space-status.critical { color: #a03545; background: #ffedef; }
.space-meter { height: 10px; overflow: hidden; border-radius: 8px; background: #e9eef6; }
.space-meter > span { display: block; height: 100%; border-radius: inherit; background: var(--brand); }
.space-meter.warning > span { background: #c48a27; }
.space-meter.critical > span { background: #cc4552; }
.space-disk-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 13px 0 0; }
.space-disk-meta > div { justify-content: flex-start; flex-wrap: wrap; }
.space-forecast { margin: 12px 0 0; color: var(--ink); font-size: 20px; font-weight: 660; }
.space-measured, .space-stale { margin: 0; }
.space-stale { padding: 10px 14px; border-radius: var(--radius); }
.queue-toolbar {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  padding: 14px 17px;
  border-bottom: 1px solid var(--line);
}
.queue-status { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 13px; min-width: 0; }
#pending-reward-count { white-space: nowrap; font-variant-numeric: tabular-nums; }
.rewards-toolbar { justify-content: flex-start; }
.tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; min-width: 0; }
.tabs button { min-height: 36px; padding: 5px 9px; border: 0; background: transparent; color: #475467; font-size: 13px; white-space: nowrap; }
.tabs button:hover { background: #f0f3f8; }
.tabs button.active { background: var(--selection); color: var(--brand); font-weight: 650; }
.tab-count { display: inline-block; margin-inline-start: 3px; color: var(--muted); font-size: 11px; font-weight: 500; font-variant-numeric: tabular-nums; }
.tabs .active .tab-count { color: var(--brand); }
.queue-filters { display: flex; flex: 0 1 auto; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.activity-filter { display: flex; align-items: center; gap: 8px; margin: 0; max-width: 100%; white-space: nowrap; }
.activity-filter select { min-width: 0; max-width: 175px; min-height: 37px; padding: 5px 9px; }
.search-input {
  display: flex;
  flex: 1 1 auto;
  width: 270px;
  align-items: center;
  gap: 8px;
  min-width: min(210px, 100%);
  min-height: 37px;
  padding-inline: 10px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  background: white;
}
.search-input input { min-width: 0; width: 100%; padding: 6px 0; border: none; outline: none; background: none; font-size: 13px; }
.search-input:focus-within { border-color: var(--brand); outline: 2px solid #315bd829; }
.search-input input:focus { outline: none; }

.tablebox { overflow-x: auto; scrollbar-width: thin; border-radius: inherit; }
.review-table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; }
.review-table td, .review-table th { padding: 13px 17px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.review-table th { background: #f8f9fc; color: #475467; font-weight: 600; white-space: nowrap; }
.column-sort { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px; margin: -4px 0 -4px -6px; border: 0; border-radius: 5px; background: transparent; color: inherit; font: inherit; white-space: nowrap; }
.column-sort:hover { background: var(--selection); color: var(--brand); }
.column-sort i { color: var(--muted); }
th[aria-sort] .column-sort i { color: var(--brand); }
.review-table td strong { color: var(--ink); font-weight: 620; overflow-wrap: anywhere; }
.review-table td small { display: block; margin-top: 3px; overflow-wrap: anywhere; font-size: 11px; }
.review-table .table-account { min-width: 135px; }
.review-table .table-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
.review-table .table-time small { overflow-wrap: normal; }
.review-table .table-id { max-width: 280px; overflow-wrap: anywhere; }
.review-table tbody tr:hover { background: #fafbff; }
.review-table tbody tr.ledger-target { background: var(--selection); }
.review-table .likes-cell { color: #475467; font-variant-numeric: tabular-nums; }
.review-table .reward-source-link:hover { text-decoration: underline; }
.table-actions { display: flex; align-items: center; gap: 8px; }
.review-table td:last-child { white-space: nowrap; }
.review-panel[data-view="rewards"] .review-table tbody tr:last-child td { border-bottom: 0; }
.activity-list-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 14px 17px; border-bottom: 1px solid var(--line); }
.activity-list-header p { margin: 0; }
.table-actions :is(button, a) { min-height: 30px; }
.current-activity { padding: 5px 8px; font-size: 12px; }
.note-open-link { padding: 3px 6px; margin-inline-start: -6px; background: transparent; color: var(--brand); text-align: left; white-space: nowrap; }
.note-open-link:hover { background: var(--selection); }
.row-action { display: inline-flex; align-items: center; gap: 3px; padding: 5px 8px; border: 1px solid #e1e8fb; border-radius: var(--radius); color: var(--brand); background: #f6f8ff; font-size: 12px; white-space: nowrap; }
.row-action:hover { background: var(--selection); }
.table-summary { display: flex; justify-content: space-between; gap: 8px; padding: 11px 17px; color: var(--muted); font-size: 12px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 6px; color: #4e5d73; background: #eef1f7; font-size: 12px; font-weight: 560; white-space: nowrap; }
.pill.pending, .pill.revocation_pending { color: #875400; background: #fff2d8; }
.pill.approved, .pill.granted, .pill.simulated_granted { color: #176445; background: #e7f5ee; }
.pill.rejected, .pill.simulated_revoked { color: #a03545; background: #ffedef; }
.empty { display: grid; justify-items: center; gap: 10px; padding: 46px 18px; text-align: center; }
.empty > i { color: var(--muted); font-size: 26px; }
.empty h2, .empty p { margin: 0; }
.empty p { color: var(--muted); font-size: 13px; }
.empty-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.toast-message { position: fixed; top: 18px; left: 50%; z-index: 500; max-width: min(400px, 90vw); transform: translateX(-50%); padding: 12px 18px; border: 1px solid var(--line); border-radius: 10px; background: white; box-shadow: 0 8px 24px #20304e1a; }
.submission-notice {
  position: fixed;
  z-index: 490;
  inset: auto clamp(14px, 2vw, 28px) clamp(14px, 2vw, 28px) auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  width: min(350px, calc(100vw - 28px));
  padding: 15px;
  border: 1px solid #dce6fb;
  border-radius: 12px;
  background: white;
  box-shadow: 0 10px 30px #25375720;
}
.submission-notice-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  color: var(--brand);
  background: var(--selection);
  font-size: 18px;
}
.submission-notice-body h2 { margin: 0; font-size: 14px; }
.submission-notice-body p { margin: 3px 0 9px; color: var(--muted); font-size: 12px; }
.submission-notice-links { display: flex; flex-wrap: wrap; gap: 6px; }
.submission-notice-links a { border: 1px solid #e1e8fb; border-radius: 6px; }
.submission-notice-close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 16px;
}
.submission-notice-close:hover { background: var(--surface); color: var(--ink); }

.config-card-head { margin-bottom: 16px; }
.config-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.config-fields { display: grid; gap: 15px; }
.config-fields .grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 14px; }
.config-fields label { min-width: 0; margin: 0; }
.config-fields input, .config-fields select, .account-dialog input { min-width: 0; width: 100%; min-height: 38px; }
.config-fields textarea { width: 100%; min-height: 64px; line-height: 1.6; }
#configform #rules { min-height: 100px; }
#topics-hint { color: var(--muted); font-weight: 400; }
.tier-list { margin: 0; }
.tier-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 9px; border-top: 1px solid var(--line); }
.tier-row:last-child { margin-top: 2px; border-top: 0; border-radius: var(--radius); background: var(--selection); }
.tier-row dt { color: #475467; font-weight: 500; }
.tier-row dd { margin: 0; color: var(--ink); font-weight: 630; text-align: right; }
.tier-row:last-child dd { color: var(--brand); }
.tier-note { margin: 13px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.account-dialog {
  width: min(400px, calc(100% - 32px));
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  box-shadow: 0 12px 36px #20304e26;
}
.account-dialog::backdrop { background: #1f23294d; }
.account-dialog > p, .account-dialog form > p { margin: 8px 0 0; }
.account-dialog > p { overflow-wrap: anywhere; }
.account-dialog label { margin: 14px 0 0; }
.dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 18px; }

.error { color: #a43e47; }
.form-feedback { color: #a43e47; font-size: 12px; line-height: 1.5; }
.review-decision .form-feedback:not([hidden]) { margin-top: 4px; }
input[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: #ca535c; }
.workspace .card { border-color: var(--line); border-radius: 12px; box-shadow: none; }
.record-list > .container-fluid { padding: 0; }
.record-list > .container-fluid > .row { --tblr-gutter-x: 0; }
.record-list .me-2:has(> .card) { margin-inline-end: 0 !important; }
.record-list .card-header { display: none; }
.record-list .card-body .dropdown:has(> #dropdownMenuButton:disabled) { display: none; }
.record-list .card-body .col-md-4 { width: min(100%, 340px); margin-inline-start: auto; }
.record-list .card-footer { flex-wrap: wrap; }
.workspace .btn-primary { border-color: var(--brand); background: var(--brand); }
.workspace .page-header { margin-bottom: 20px; }
.admin-time { white-space: nowrap; font-variant-numeric: tabular-nums; }
#dropdownMenuButton:disabled { display: none; }

/* 登录页沿用独立样式。 */
.login-page{min-height:100vh;display:grid;grid-template-columns:1fr 1fr;background:white}.login-intro{padding:40px 54px;background:linear-gradient(145deg,#f5f8ff,#eef3ff);display:flex;flex-direction:column;min-height:100vh}.login-copy{margin:auto;max-width:420px;padding:45px 0}.eyebrow{font-size:11px;letter-spacing:3px;color:#6b8cd3}.login-copy h1{font-size:44px;line-height:1.45;margin:20px 0;font-weight:650;letter-spacing:1px}.login-copy p{font-size:15px;line-height:1.9;color:#7c8ba6}.login-illustration{position:relative;width:260px;height:210px;margin-top:40px}.illus-sheet{position:absolute;width:220px;left:15px;top:0;background:white;border:1px solid #dbe4f7;border-radius:12px;padding:28px;transform:rotate(-6deg);box-shadow:0 18px 35px #3370ff12}.illus-line{height:5px;border-radius:5px;background:#e4ebfa;margin-bottom:15px}.illus-line.short{width:60%}.illus-block{background:#f1f5ff;color:#527ac5;font-size:12px;padding:12px;margin:20px 0;display:flex;gap:10px;align-items:center}.illus-block span{background:#3370ff;color:white;border-radius:50%;padding:0 4px}.illus-check{position:absolute;right:0;bottom:20px;background:#3370ff;border:5px solid #f0f4ff;width:66px;height:66px;border-radius:50%;display:grid;place-items:center;font-size:30px;color:white;box-shadow:0 12px 20px #3370ff20}.login-form-area{display:grid;place-items:center;padding:40px}.login-form{width:350px;max-width:100%}.login-badge{width:46px;height:46px;border-radius:12px;background:#edf3ff;color:#3370ff;display:grid;place-items:center;font-size:26px;margin-bottom:26px}.login-form h2{font-size:25px;margin-bottom:10px}.login-form>p{margin-bottom:32px}.login-form label{margin:24px 0 0;color:#4e5969;font-size:13px}.login-form input{width:100%;padding:11px 12px}.login-submit{width:100%;margin-top:30px;padding:11px}.login-hint{text-align:center;font-size:11px;color:#a6abb0;margin:18px 0!important}

/* 审核详情、阅读视图与奖励撤回。 */
.review-drawer {
  position: fixed;
  inset: 0 0 0 auto;
  margin: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  width: min(920px, 95vw);
  height: 100dvh;
  max-height: 100dvh;
  padding: 0 28px 30px;
  color: var(--ink);
  box-shadow: -10px 0 40px #1f232918;
}
.review-drawer::backdrop { background: #1f23294d; }
.drawer-header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
  background: white;
}
.drawer-header h2 { margin-top: 6px; font-size: 18px; }
.review-drawer a { overflow-wrap: anywhere; }
.review-drawer .bar { padding-top: 12px; }
.review-drawer:not(.application-drawer) h3 { padding-top: 18px; border-top: 1px solid #eff0f1; }
.review-drawer:not(.application-drawer) .muted { line-height: 1.8; }
.danger-button { background: #d94e57; }
.danger-button:hover { background: #bd3842; }

.application-drawer {
  width: min(900px, 100vw);
  max-width: 100vw;
  padding: 0;
  overflow: hidden;
}
#detail.application-drawer {
  width: min(100vw, 75vw + 150px);
  --drawer-columns: minmax(0, 1fr) clamp(275px, 24%, 360px);
}
.application-drawer[open] { display: flex; flex-direction: column; }
.application-drawer .drawer-header {
  position: static;
  flex: none;
  margin: 0;
  padding: 18px 24px;
}
.application-drawer .drawer-header > div { min-width: 0; }
.application-drawer .drawer-header h2 { margin: 0; font-size: 19px; line-height: 1.4; }
.application-drawer .drawer-header button { flex: none; }
.detail-title, .detail-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.detail-meta { margin: 6px 0 0; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.detail-meta strong { color: var(--ink); }
.drawer-body {
  display: grid;
  grid-template-columns: var(--drawer-columns, minmax(0, 1.6fr) minmax(275px, 1fr));
  align-items: start;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 20px 24px;
  background: var(--surface);
}
.detail-materials { display: grid; gap: 16px; min-width: 0; }
.detail-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: white;
}
.detail-card h3 { margin: 0; font-size: 15px; line-height: 1.45; }
.detail-card p:last-child { margin-bottom: 0; }
.evidence-hint, .note-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.evidence-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.evidence-groups h4 { margin: 12px 0 0; font-size: 13px; }
.images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 125px), 1fr));
  gap: 10px;
  margin-top: 12px;
}
.evidence-groups .images { margin-top: 8px; }
.images a {
  display: block;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.images a:hover { border-color: var(--brand); }
.images img { display: block; width: 100%; height: 178px; object-fit: contain; }
.review-decision label { margin: 14px 0 0; }
.review-decision input { width: 100%; min-width: 0; }
.review-decision textarea { min-height: 84px; }
.review-decision p { margin: 8px 0 0; }
.review-decision .review-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
.review-result { display: grid; gap: 14px; }
.review-result > h3 { font-size: 16px; }
.review-metrics {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 13px;
}
.review-metrics > div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
}
.review-metrics dt, .review-note h4 { color: var(--muted); font-weight: 500; }
.review-metrics dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.review-note h4 { margin: 0; font-size: 13px; }
.review-note p { margin-top: 4px; }
.review-reward {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #dfe7fa;
  border-radius: 10px;
  background: #f6f8ff;
}
.review-reward-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.review-reward-icon {
  display: grid;
  flex: 0 0 36px;
  place-items: center;
  height: 36px;
  border-radius: var(--radius);
  color: var(--brand);
  background: #e8eeff;
  font-size: 20px;
}
.review-reward-tier { flex: 1; min-width: max-content; }
.review-reward-tier > span { display: block; color: var(--muted); font-size: 11px; }
.review-reward-tier > strong { display: block; font-size: 16px; line-height: 1.35; }
.review-reward-action { width: 100%; padding-block: 7px; font-size: 13px; }
.review-account-flag { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.review-result .review-account-flag { margin-top: 0; }
.review-account-flag .review-flag-action {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  width: 100%;
  border-color: transparent;
  color: #445168;
  font-size: 13px;
  text-align: start;
}
.review-flag-action span { flex: 1; }
.review-flag-action .ti-chevron-right { color: var(--muted); }
.pill.blacklist-badge { color: #a03545; background: #ffedef; }
.review-table td .blacklist-badge { margin-inline-start: 6px; }
.blacklist-reason { white-space: pre-wrap; overflow-wrap: anywhere; }
.blacklist-table .blacklist-reason { width: 45%; }
#detail.application-drawer.revocation-drawer {
  width: min(560px, 100vw);
  --drawer-columns: minmax(0, 1fr);
}
.revocation-body { align-content: start; }
.revocation-body .detail-card { padding: 18px; }
.revocation-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}
.revocation-summary > div { min-width: 0; overflow-wrap: anywhere; }
.revocation-summary > div > span, .revocation-meta dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}
.revocation-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 22px;
  font-weight: 680;
  line-height: 1.35;
}
.revocation-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 14px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.revocation-meta dd {
  margin: 3px 0 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}
.revocation-account { grid-column: 1 / -1; }
.revocation-account small { display: block; }
.revocation-reason {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.revocation-form label {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  color: inherit;
  font: inherit;
}
.revocation-form label span, .revocation-effect { color: var(--muted); font-size: 12px; font-weight: 400; }
.revocation-effect { margin: 7px 0 12px; }
.revocation-form textarea { display: block; min-height: 104px; }
.revocation-form .form-feedback { margin: 8px 0 0; }
.drawer-actions {
  display: flex;
  flex: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 24px;
  border-top: 1px solid var(--line);
  background: white;
}
#activity-error { flex: 1 1 220px; align-self: center; margin: 0; font-size: 13px; }

.note-toolbar, .note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.note-toolbar { justify-content: space-between; }
.note-actions > a, .note-actions > button {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 34px;
  padding: 5px 10px;
  border-radius: var(--radius);
  font-size: 13px;
}
.note-actions > a { border: 1px solid #dbe4ff; font-weight: 600; }
.note-frame {
  display: block;
  width: 100%;
  height: clamp(360px, 74dvh, 920px);
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.reward-preview {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid #e5e9f1;
  border-radius: var(--radius);
  background: #f7f9fc;
}
.reward-preview strong { font-size: 13px; }
.reward-preview p { margin: 4px 0 0; font-size: 12px; line-height: 1.6; color: #626d7a; }
.reward-preview[data-state="ready"] { border-color: #d5e4fb; background: #f2f7ff; }
.reward-preview[data-state="ready"] strong { color: #245db2; }
.reward-preview[data-state="error"] { border-color: #f3d7d9; background: #fff7f7; }
.reward-preview[data-state="error"] p { color: #a43e47; }

@media (max-width: 1050px) {
  .queue-filters { flex-grow: 1; }
}

@media (max-width: 760px) {
  .workspace { --sidebar-width: 60px; }
  .side { padding: 16px 7px 11px; }
  .side > .brand { justify-content: center; padding: 0; margin-bottom: 29px; }
  .side .brand-name, .nav-caption, .nav-label, .account-copy { display: none; }
  .sidebar-nav .sidebar-link { justify-content: center; padding-inline: 0; }
  .pending-submission-badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 16px;
    margin: 0;
    padding-inline: 3px;
    font-size: 9px;
  }
  .data-nav { margin-top: 17px; }
  .account-row { flex-direction: column; gap: 4px; padding-inline: 0; }
  .account-action { padding: 0; }
  .logout-action { margin-left: 0; }
  .workspace-main { padding: 22px 14px 34px; }
  .page-heading { flex-wrap: wrap; margin-bottom: 17px; }
  .page-heading h1 { font-size: 25px; }
  .dashboard-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .queue-toolbar { padding: 11px 12px; }
  .queue-filters { flex-basis: 100%; }
  .review-table :is(th, td) { padding-inline: 12px; }
  .login-page { grid-template-columns: 1fr; }
  .login-intro { display: none; }
  .login-form-area { min-height: 100vh; padding: 28px; }
  #detail.application-drawer { width: 100vw; }
  .drawer-body { grid-template-columns: minmax(0, 1fr); align-content: start; }
  .note-frame { height: clamp(300px, 65dvh, 660px); }
}

@media (max-width: 480px) {
  .queue-status { width: 100%; }
  .queue-status .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .queue-status .tabs button { min-height: 34px; text-align: left; }
  .dashboard-pair { grid-template-columns: minmax(0, 1fr); }
  .dashboard-card { padding: 14px; }
  .overview-chart { min-width: 230px; grid-template-columns: repeat(14, minmax(0, 1fr)); gap: 2px; }
  .overview-date-full { display: none; }
  .overview-date-day { display: inline; }
  .overview-bar-track { height: 108px; }
  .overview-bar-count { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .space-disk-meta > div { flex-direction: column; }
  .config-fields .grid { grid-template-columns: 1fr; }
  .review-drawer:not(.application-drawer) { padding-inline: 14px; }
  .application-drawer .drawer-header, .drawer-actions, .drawer-body { padding-inline: 14px; }
  .application-drawer .drawer-header h2 { font-size: 17px; }
  .drawer-body { padding-block: 14px; gap: 12px; }
  .detail-materials { gap: 12px; }
  .detail-card { padding: 12px; }
  .revocation-body .detail-card { padding: 14px; }
  .images img { height: 150px; }
}

/* Independent platform rules and metric conditions. */
.platform-rule-editor > summary { font-size: 1rem; font-weight: 600; cursor: pointer; padding: 8px 0; }
.platform-rule-editor .platform-enabled { display: flex; align-items: center; gap: 8px; }
.platform-rule-editor input[type=checkbox] { width: 18px; height: 18px; min-height: 18px; margin: 0; }
.platform-rule-editor .config-fields { margin-top: 12px; }
.rule-tier { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: grid; gap: 12px; }
.rule-tier-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.rule-condition { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.rule-condition button { margin-bottom: 0; }
#configform { display: grid; gap: 16px; grid-column: 1 / -1; }
#platform-rule-editors { display: grid; gap: 16px; }
@media (max-width: 520px) { .rule-condition { grid-template-columns: 1fr 1fr; } .rule-condition button { grid-column: 1 / -1; justify-self: start; } }
