.admin-shell:has([data-view="honors"].active) .topbar-tools .search-box { display: none; }

.admin-honors.tls-panel {
  --honors-ink: #122945;
  --honors-blue: #1754d6;
  --honors-line: #d8e4f2;
  --honors-muted: #4f6580;
  max-width: 1520px;
  min-width: 0;
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--honors-ink);
}

.admin-honors .tls-message:empty { display: none; }
.admin-honors > .tls-message {
  margin: 10px 0;
  padding: 10px 12px;
  border: 1px solid var(--honors-line);
  border-radius: 8px;
  background: #fff;
  color: #145b47;
}
.admin-honors .tls-message.error { border-color: #eed0d4; color: #a3273b; }
.admin-honors h1, .admin-honors h2, .admin-honors h3 { color: var(--honors-ink); }
.honors-heading, .honors-actions, .honors-scope, .honors-filters, .honors-filter-options,
.honors-filter-actions, .honors-list-footer, .honors-pager {
  display: flex;
  align-items: center;
  gap: 10px;
}
.honors-heading { justify-content: space-between; margin-bottom: 16px; gap: 14px; }
.honors-heading h1 { margin: 0; font-size: 30px; line-height: 1.25; }
.admin-honors button {
  border: 1px solid #bcd2ef;
  border-radius: 8px;
  background: #fff;
  color: #154fad;
  font: inherit;
  font-weight: 650;
}
.admin-honors button:hover:not(:disabled) { background: #eaf2ff; }
.admin-honors button.honors-primary, .admin-honors .honors-pager button[aria-current="page"] {
  border-color: var(--honors-blue);
  background: var(--honors-blue);
  color: #fff;
}
.admin-honors button.honors-primary:hover:not(:disabled), .admin-honors .honors-pager button[aria-current="page"]:hover { background: #1547b0; }
.admin-honors :is(button, input, select, textarea):focus-visible { outline: 2px solid var(--honors-blue); outline-offset: 2px; }
.admin-honors svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.honors-scope { flex-wrap: wrap; padding: 0; }
.honors-scope label { display: flex; align-items: center; gap: 8px; max-width: 100%; }
.honors-scope input, .honors-scope select, .honors-filters input, .honors-filters select {
  min-width: 0;
  min-height: 42px;
  border: 1px solid #c9d9eb;
  border-radius: 8px;
  background-color: #fff;
  color: var(--honors-ink);
  font: inherit;
}
.honors-scope select[data-term] { width: clamp(205px, 25vw, 310px); }
.honors-scope select[data-class] { width: clamp(155px, 18vw, 250px); }
.honors-scope button svg { display: none; }

.admin-honors > [data-content] > .tls-cards { margin-block: 16px 21px; }
.admin-honors .tls-cards article {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--honors-line);
  border-top: 2px solid #326edc;
  border-radius: 10px;
  background: #edf4fd;
}
.admin-honors .tls-cards article:nth-child(2) { border-color: #f2dfba; border-top-color: #c27b13; background: #fff7e7; color: #80500c; }
.admin-honors .tls-cards article:nth-child(3) { border-color: #c9e8df; border-top-color: #198d76; background: #eaf8f3; color: #0e664f; }
.admin-honors .tls-cards span { font-size: 14px; font-weight: 650; }
.admin-honors .tls-cards strong { margin: 5px 0 0; font-size: 28px; line-height: 1.18; font-variant-numeric: tabular-nums; }
.admin-honors .tls-cards small { margin-top: 4px; font-size: 12px; color: var(--honors-muted); }

.honors-records h2 { margin: 0 0 9px; font-size: 21px; }
.honors-filters {
  margin-bottom: 11px;
  padding: 10px;
  border: 1px solid var(--honors-line);
  border-radius: 10px;
  background: #fff;
}
.honors-search { position: relative; min-width: 0; flex: 4 1 240px; }
.honors-search svg { position: absolute; left: 10px; top: 12px; color: var(--honors-muted); pointer-events: none; }
.honors-search input { width: 100%; padding-inline-start: 35px; }
.honors-filter-options { flex: 5 1 400px; min-width: 0; }
.honors-filter-options select { flex: 1 1 0; }
.honors-filter-actions { flex: none; gap: 6px; }
.honors-filters .honors-filter-toggle { display: none; }

.honors-table, .honors-mobile-list, .honors-empty {
  border: 1px solid var(--honors-line);
  border-radius: 11px;
  background: #fff;
}
.honors-table { overflow: hidden; }
.honors-table table { width: 100%; min-width: 0; border-collapse: collapse; table-layout: fixed; }
.honors-table :is(th, td) { padding: 8px 11px; text-align: left; border-bottom: 1px solid #e4ecf5; overflow-wrap: anywhere; }
.honors-table th { background: #eaf2fc; color: #3b526e; font-size: 13px; }
.honors-table th:nth-child(1) { width: 26%; }
.honors-table th:nth-child(3) { width: 15%; }
.honors-table th:nth-child(4) { width: 13%; }
.honors-table th:last-child { width: 108px; }
.honors-table tr:last-child td { border-bottom: 0; }
.honors-table tbody tr:hover, .honors-table tbody tr:focus-within { background: #f6faff; }
.honors-table td small { margin-top: 2px; color: var(--honors-muted); }
.honors-table button { min-height: 34px; padding: 4px 8px; font-size: 13px; white-space: nowrap; }
.honors-rank, .honors-status {
  display: inline-block;
  max-width: 100%;
  margin-block: 2px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #edf1f7;
  color: #435973;
  font-size: 12px;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.honors-rank { background: #fff1d7; color: #7b4c0d; }
.honors-status { margin-inline-end: 4px; }
.honors-status.is-active { background: #dcf5e9; color: #126347; }
.honors-status.is-revoked { background: #ffecef; color: #a0293e; }
.honors-net, .honors-records time { font-variant-numeric: tabular-nums; }
.honors-net.is-positive { color: #087052; }
.honors-net.is-negative { color: #a0293e; }
.honors-mobile-list { display: none; }
.honors-empty { margin: 0; padding: 24px 12px; color: var(--honors-muted); text-align: center; }
.honors-list-footer { justify-content: space-between; flex-wrap: wrap; margin-top: 12px; color: var(--honors-muted); font-size: 13px; }
.honors-pager { flex-wrap: wrap; gap: 5px; }
.honors-pager button { min-width: 35px; min-height: 36px; padding: 3px 6px; }
.honors-pager button:disabled { cursor: default; }
.admin-honors .honors-rules-link { display: block; min-height: 40px; margin-top: 11px; padding: 6px 9px; border-color: transparent; background: transparent; font-size: 13px; }

.admin-honor-dialog.tls-dialog { width: min(94vw, 680px); border-inline-start: 1px solid #d8e4f2; padding: 20px 22px; }
.admin-honor-dialog.tls-dialog header { top: -20px; gap: 10px; border-bottom: 1px solid #dae5f0; }
.admin-honor-dialog header h2 { margin: 0; font-size: 23px; }
.admin-honor-dialog .honor-editor-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
  padding: 11px;
  border: 1px solid #d8e4f2;
  border-radius: 9px;
  background: #f1f6fd;
}
.admin-honor-dialog .tls-form, .admin-honor-dialog .honor-import-controls, .admin-honor-detail [data-honor-action] {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
.admin-honor-dialog label { min-width: 0; }
.admin-honor-dialog :is(input:not([type="checkbox"]), select, textarea) {
  width: 100%;
  min-height: 42px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid #cbd9e9;
  border-radius: 7px;
  background: #fff;
  color: #18344d;
  font: inherit;
}
.admin-honor-dialog .honor-note { margin: 10px 0 0; color: #4f6580; font-size: 13px; overflow-wrap: anywhere; }
.admin-honor-dialog .tls-message { padding: 8px; border-radius: 6px; background: #eef7f5; }
.admin-honor-dialog .tls-message.error { background: #fff0f2; }
.admin-honor-dialog :is([data-proof-preview] img,[data-proof-preview] iframe) { max-width: 100%; }

@media (max-width: 760px) {
  .admin-shell:has([data-view="honors"].active) .admin-topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    height: auto;
    min-height: 60px;
    padding: 8px 12px;
  }
  .admin-shell:has([data-view="honors"].active) .admin-topbar strong { font-size: clamp(15px, 4.4vw, 19px); }
  .admin-shell:has([data-view="honors"].active) .admin-topbar small,
  .admin-shell:has([data-view="honors"].active) .topbar-tools > :not(.avatar-button) { display: none; }
  .admin-shell:has([data-view="honors"].active) .topbar-tools { width: auto; margin: 0; }
  .admin-shell:has([data-view="honors"].active) .sidebar-toggle { border-color: #1754d6; color: #fff; background: #1754d6; }
  .admin-shell:has([data-view="honors"].active) .content-area { padding: 11px 12px 20px; }
  .admin-honors.tls-panel {
    display: grid;
    grid-template-areas: "scope" "message" "metrics" "actions" "records" "rules";
  }
  .honors-heading { display: contents; }
  .honors-heading h1, .honors-scope label > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }
  .honors-scope { grid-area: scope; display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr) 42px; gap: 6px; margin-bottom: 10px; }
  .honors-scope select[data-term], .honors-scope select[data-class] { width: 100%; padding-inline: 5px; font-size: 14px; text-overflow: ellipsis; }
  .honors-scope button { padding: 0; min-height: 44px; display: grid; place-items: center; }
  .honors-scope button svg { display: inline-block; }
  .honors-refresh-label { display: none; }
  .admin-honors > .tls-message { grid-area: message; margin: 0 0 10px; padding-block: 6px; }
  .admin-honors > [data-content] { display: contents; }
  .admin-honors > [data-content] > .tls-cards { grid-area: metrics; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; overflow: hidden; margin: 0 0 10px; border: 1px solid var(--honors-line); border-radius: 10px; }
  .admin-honors .tls-cards article { padding: 7px 10px; border: 0; border-radius: 0; }
  .admin-honors .tls-cards article:nth-child(odd) { border-inline-end: 1px solid var(--honors-line); }
  .admin-honors .tls-cards article:nth-child(n+3) { border-top: 1px solid var(--honors-line); }
  .admin-honors .tls-cards span { font-size: 12px; }
  .admin-honors .tls-cards strong { margin-top: 2px; font-size: 21px; }
  .admin-honors .tls-cards small { display: none; }
  .honors-actions { grid-area: actions; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-bottom: 10px; }
  .honors-actions .honors-primary { grid-row: 1; grid-column: 1; }
  .honors-actions button { min-height: 44px; padding-inline: 6px; font-size: 13px; }
  .honors-records, .admin-honors > [data-content] > .honors-empty { grid-area: records; }
  .honors-records h2 { font-size: 16px; margin-bottom: 6px; }
  .honors-filters { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; margin-bottom: 8px; padding: 0; border: 0; background: transparent; }
  .honors-search input { font-size: 16px; }
  .honors-filters .honors-filter-toggle { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding-inline: 8px; white-space: nowrap; }
  .honors-filter-options { display: none; }
  .honors-filters.is-open .honors-filter-options {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 8px;
    padding: 9px;
    border: 1px solid var(--honors-line);
    border-radius: 9px;
    background: #fff;
  }
  .honors-filter-actions { grid-column: 1 / -1; }
  .honors-filter-actions button { flex: 1; }
  .honors-table { display: none; }
  .honors-mobile-list { display: block; list-style: none; margin: 0; padding: 0; }
  .honors-mobile-list > li { padding: 8px 10px; }
  .honors-mobile-list > li + li { border-top: 1px solid #e4ecf5; }
  .honor-row-title, .honor-row-award, .honor-row-details, .honor-row-details > div { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
  .honor-row-title, .honor-row-details { justify-content: space-between; }
  .honor-row-title h3 { min-width: 0; margin: 0; font-size: 15px; }
  .honor-row-title .honors-net { flex: none; font-size: 15px; }
  .honor-row-award { flex-wrap: wrap; color: var(--honors-muted); font-size: 13px; }
  .honor-row-details > div { flex-wrap: wrap; color: var(--honors-muted); font-size: 12px; }
  .honor-row-details button { flex: none; min-height: 44px; padding: 4px 8px; font-size: 13px; }
  .honors-list-footer { margin-top: 7px; gap: 5px; }
  .honors-pager button { min-width: 31px; min-height: 42px; }
  .admin-honors .honors-rules-link { grid-area: rules; justify-self: start; margin-top: 6px; }
  .admin-honor-dialog.tls-dialog { width: 100vw; max-width: 100vw; padding: 14px; }
  .admin-honor-dialog.tls-dialog header { top: -14px; }
  .admin-honor-dialog header h2 { font-size: 20px; }
  .admin-honor-dialog .honor-editor-scope, .admin-honor-dialog .honor-import-controls, .admin-honor-detail [data-honor-action] { grid-template-columns: minmax(0, 1fr); }
  .admin-honor-dialog :is(input:not([type="checkbox"]), select, textarea) { font-size: 16px; }
}

@media (max-width: 460px) {
  .admin-honor-dialog .tls-form { grid-template-columns: minmax(0, 1fr); }
}
