[data-view="adminTaskStatistics"].active { max-width: 1520px; margin-inline: auto; }
.admin-shell:has([data-view="adminTaskStatistics"].active) .topbar-tools .search-box { display: none; }

.ats {
  --ats-ink: #153450;
  --ats-muted: #536b85;
  --ats-blue: #145bc2;
  --ats-line: #d9e5f2;
  color: var(--ats-ink);
  font-size: 14px;
  line-height: 1.55;
  min-width: 0;
}
.ats :is(h1, h2, h3, h4, p) { margin: 0; }
.ats-heading h1 { font-size: 28px; line-height: 1.25; }
.ats-heading { margin-bottom: 16px; }
.ats h2 { font-size: 18px; }
.ats h3 { font-size: 15px; }
.ats :is(button, input, select) { font: inherit; }
.ats button {
  cursor: pointer;
  min-height: 38px;
  background: #fff;
  color: var(--ats-blue);
  border: 1px solid #c5d8ef;
  border-radius: 8px;
  padding: 6px 12px;
}
.ats button:hover:not(:disabled) { background: #edf5ff; }
.ats button:disabled { opacity: .5; cursor: default; }
.ats button.ats-primary, .ats nav button[aria-current="page"] { background: var(--ats-blue); border-color: var(--ats-blue); color: #fff; font-weight: 700; }
.ats button.ats-primary:hover:not(:disabled) { background: #124eae; }
.ats :is(button, input, select, summary, .ats-table):focus-visible { outline: 2px solid var(--ats-blue); outline-offset: 2px; }
.ats :is(input, select) {
  min-height: 42px;
  width: 100%;
  min-width: 0;
  border: 1px solid #c9d9ec;
  border-radius: 8px;
  background: #fff;
  color: var(--ats-ink);
  padding: 6px 9px;
}
.ats-filters, .ats-panel, .ats-waiting {
  border: 1px solid var(--ats-line);
  border-radius: 12px;
  background: #fff;
}
.ats-filters, .ats-extra-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.ats-filters { padding: 14px; margin-bottom: 14px; }
.ats-extra-filters { grid-column: 1 / -1; padding-top: 2px; }
.ats-filters label { display: grid; gap: 5px; color: var(--ats-muted); font-size: 13px; font-weight: 600; min-width: 0; }
.ats-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 8px; }
.ats-actions button { white-space: nowrap; }
.ats-actions [aria-expanded="true"] { background: #eef5fd; }

.ats-waiting { padding: 25px 12px; color: var(--ats-muted); text-align: center; }
.ats-waiting svg { width: 37px; height: 37px; margin-bottom: 5px; fill: none; stroke: #7b94b2; stroke-width: 1.65; stroke-linejoin: round; stroke-linecap: round; }
.ats-panel { padding: 14px; margin: 13px 0; min-width: 0; }
.ats-panel-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 6px 13px; margin-bottom: 10px; }
.ats-panel-head :is(span, p) { color: var(--ats-muted); font-size: 12px; overflow-wrap: anywhere; }
.ats-panel-head [data-ats-sort] { width: auto; max-width: 100%; min-height: 38px; font-size: 13px; }
.ats-overview .ats-panel-head { justify-content: flex-start; }
.ats-overview .ats-panel-head p { flex: 1; min-width: 160px; }
.ats-cards { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-block: 11px; }
.ats-cards article { padding: 9px 11px; min-width: 0; border: 1px solid var(--ats-line); border-radius: 8px; background: #f8fbff; }
.ats-cards article span { display: block; font-size: 12px; color: var(--ats-muted); }
.ats-cards strong { display: block; margin-top: 1px; font-size: 24px; color: var(--ats-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ats-cards article.ats-rate { border-color: #cbece2; background: #e8f8f1; }
.ats-rate :is(span, strong) { color: #09634f; }
.ats-extra-metrics { display: contents; }
.ats-more-metrics, .ats-publications-mobile { display: none; }
.ats-note { color: var(--ats-muted); font-size: 12px; margin-block: 9px !important; overflow-wrap: anywhere; }

.ats-table { max-width: 100%; overflow-x: auto; overscroll-behavior-inline: contain; margin-top: 8px; }
.ats table { width: 100%; min-width: 830px; border-collapse: collapse; font-size: 13px; }
.ats th { background: #edf4fc; color: #3b5878; text-align: left; font-weight: 650; padding: 7px 8px; }
.ats td { border-bottom: 1px solid #e6eef7; padding: 8px; vertical-align: middle; overflow-wrap: anywhere; }
.ats td small { display: block; color: var(--ats-muted); font-size: 11px; margin-top: 2px; }
.ats td button { white-space: nowrap; }
.ats-publications-desktop table { table-layout: fixed; min-width: 0; }
.ats-publications-desktop th:nth-child(1) { width: 17%; }
.ats-publications-desktop th:nth-child(2) { width: 14%; }
.ats-publications-desktop th:nth-child(3) { width: 14%; }
.ats-publications-desktop th:nth-child(4) { width: 16%; }
.ats-publications-desktop th:nth-child(9) { width: 76px; }
.ats-publications-desktop th:last-child { width: 92px; }
.ats-publications-desktop button { min-height: 34px; padding-inline: 7px; font-size: 12px; }
.ats-badge { display: inline-block; padding: 2px 7px; border-radius: 99px; font-size: 11px; white-space: nowrap; }
.ats-publication-status-published { color: #16634c; background: #e7f8f2; }
.ats-publication-status-expired { color: #a12632; background: #fff0f1; }
.ats-publication-status-scheduled { color: #875709; background: #fff4d8; }
.ats-publication-status-closed { color: #405b86; background: #eaf0fa; }
.ats-publication-status-withdrawn, .ats-publication-status-draft { color: #536176; background: #edf2f7; }
.ats-empty { text-align: center; padding: 22px 8px; color: var(--ats-muted); }
.ats-pages { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; color: var(--ats-muted); font-size: 13px; }
.ats-pages nav { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.ats-pages button { min-width: 33px; min-height: 35px; padding: 2px 5px; }
.ats-definitions { color: var(--ats-muted); background: #edf4fb; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin: 13px 0; }
.ats-definitions p { margin: 8px 0; }
.ats summary { cursor: pointer; }
.ats .ats-error { color: #a22c3c; background: #fff1f3; border: 1px solid #f2d2d6; border-radius: 9px; padding: 10px 12px; margin-bottom: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

.ats-detail-head { display: flex; justify-content: space-between; gap: 9px; flex-wrap: wrap; }
.ats-detail-head > div { display: flex; gap: 7px; flex-wrap: wrap; }
.ats-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.ats-meta > div { border-radius: 8px; background: #f5f9fd; padding: 9px; min-width: 0; }
.ats-meta span { display: block; font-size: 12px; color: var(--ats-muted); }
.ats-meta b { display: block; font-size: 13px; margin-top: 2px; overflow-wrap: anywhere; }
.ats-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ats-charts > .ats-panel { margin: 0; }
.ats-bars { display: grid; gap: 12px; margin-top: 12px; }
.ats-bars > div { display: grid; grid-template-columns: 105px minmax(0, 1fr) 30px; align-items: center; gap: 8px; color: var(--ats-muted); font-size: 12px; }
.ats-bars i { background: #eaf2fb; height: 10px; border-radius: 5px; overflow: hidden; }
.ats-bars b { display: block; height: 100%; background: #2380cb; border-radius: 5px; }
.ats-bars strong { text-align: right; }
.ats-student-filter { display: flex; gap: 9px; max-width: 650px; margin-bottom: 10px; }
.ats-student-filter input { flex: 1; }
.ats-student-filter select { width: 170px; }
.ats-dialog { width: min(1000px, 94vw); max-height: 85vh; border: 0; border-radius: 13px; padding: 18px; color: var(--ats-ink); overflow: auto; }
.ats-dialog::backdrop { background: #0b284a88; }
.ats-dialog > header { display: flex; align-items: center; justify-content: space-between; position: sticky; top: -18px; background: #fff; padding: 8px 0; z-index: 1; }
.ats-dialog table { min-width: 620px; }
@media (max-width: 1200px) {
  .ats-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ats-publications-desktop :is(th, td) { padding-inline: 5px; font-size: 12px; }
}
@media (max-width: 760px) {
  .admin-shell:has([data-view="adminTaskStatistics"].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="adminTaskStatistics"].active) .admin-topbar strong { font-size: clamp(14px,4.45vw,19px); }
  .admin-shell:has([data-view="adminTaskStatistics"].active) .admin-topbar small,
  .admin-shell:has([data-view="adminTaskStatistics"].active) .topbar-tools > :not(.avatar-button) { display: none; }
  .admin-shell:has([data-view="adminTaskStatistics"].active) .topbar-tools { width: auto; margin: 0; }
  .admin-shell:has([data-view="adminTaskStatistics"].active) .sidebar-toggle { background: #145bc2; border-color: #145bc2; color: #fff; }
  .admin-shell:has([data-view="adminTaskStatistics"].active) .content-area { padding: 12px; }
  .ats-heading { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .ats-filters, .ats-extra-filters, .ats-meta, .ats-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .ats-filters, .ats-panel { padding: 10px; margin-block: 0 10px; }
  .ats-filters:not(.is-expanded) .ats-filter-secondary { display: none; }
  .ats-filters select { text-overflow: ellipsis; }
  .ats :is(input, select) { font-size: 16px; }
  .ats-filters select[name="termId"] { padding-inline: 5px; font-size: 14px; }
  .ats-actions .ats-primary { margin-inline-start: auto; flex: 1; }
  .ats button, .ats-actions button { min-height: 44px; }
  .ats h2 { font-size: 16px; }
  .ats-cards strong { font-size: 21px; }
  .ats-extra-metrics, .ats-publications-desktop { display: none; }
  .ats-more-metrics, .ats-publications-mobile { display: block; }
  .ats-more-metrics { padding: 5px 8px; border: 1px solid var(--ats-line); border-radius: 7px; color: var(--ats-blue); }
  .ats-more-metrics .ats-cards { margin-block: 5px 2px; }
  .ats-publications-mobile { border: 1px solid var(--ats-line); border-radius: 9px; }
  .ats-publication { padding: 8px 9px; overflow-wrap: anywhere; }
  .ats-publication + .ats-publication { border-top: 1px solid var(--ats-line); }
  .ats-publication p { font-size: 13px; color: var(--ats-muted); }
  .ats-publication-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px; }
  .ats-publication-footer button { font-size: 13px; }
  .ats-pages { justify-content: center; }
  .ats-pages nav { justify-content: center; }
  .ats-pages button { min-height: 41px; min-width: 29px; }
  .ats-detail-head { margin-bottom: 10px; }
  .ats-charts { grid-template-columns: minmax(0, 1fr); margin-bottom: 10px; }
  .ats-student-filter { flex-direction: column; }
  .ats-student-filter select { width: 100%; }
}
