.table-wrap {
  position: relative;
  width: 100%;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  border-radius: 10px;
  background:
    linear-gradient(90deg, #fff 30%, rgba(255, 255, 255, 0)) left center / 28px 100% no-repeat,
    linear-gradient(270deg, #fff 30%, rgba(255, 255, 255, 0)) right center / 28px 100% no-repeat,
    linear-gradient(90deg, rgba(15, 23, 42, 0.11), rgba(15, 23, 42, 0)) left center / 12px 100% no-repeat,
    linear-gradient(270deg, rgba(15, 23, 42, 0.11), rgba(15, 23, 42, 0)) right center / 12px 100% no-repeat;
  background-attachment: local, local, scroll, scroll;
}

.report-board {
  margin-top: 16px;
}

.report-summary {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.report-header-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  min-width: 0;
}

.field-settings-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  border: 1px solid #dbe7f4;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.field-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  color: var(--ink);
}

.field-settings-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-settings-head > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.field-mode-actions,
.field-bulk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.field-bulk-actions span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.field-choice {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.field-choice input {
  width: 18px;
  min-height: 18px;
}

.field-choice.selected {
  border-color: rgba(37, 99, 235, 0.34);
  background: #eef5ff;
  color: var(--ink);
}

.field-order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink);
}

.field-order-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.field-order-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px;
}

.field-order-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
}

.field-order-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
}

.field-order-row div {
  display: flex;
  gap: 6px;
}

.table-wrap table,
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 16px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: #fafafa;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  box-shadow: inset 0 -1px 0 var(--line);
}

tbody tr:hover {
  background: #f9fafb;
}

.detail-report-table tbody tr {
  cursor: pointer;
}

.detail-report-table tbody tr:has(button, select) {
  cursor: default;
}

.detail-report-table th[data-field="child"],
.detail-report-table td[data-field="child"] {
  min-width: 76px;
  white-space: nowrap;
}

.detail-report-table th[data-field="institution"],
.detail-report-table td[data-field="institution"],
.detail-report-table th[data-field="subject"],
.detail-report-table td[data-field="subject"] {
  min-width: 92px;
  white-space: nowrap;
}

.detail-report-table th[data-field="teacher"],
.detail-report-table td[data-field="teacher"] {
  min-width: 82px;
  white-space: nowrap;
}

.detail-report-table th[data-field="status"],
.detail-report-table td[data-field="status"] {
  min-width: 96px;
  white-space: nowrap;
}

.status-badge {
  display: inline-flex;
  min-width: 56px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  background: #f2f4f7;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.status-badge.tone-blue {
  color: var(--blue);
  background: #edf4ff;
}

.status-badge.tone-green {
  color: var(--green);
  background: #ecf8f2;
}

.status-badge.tone-amber {
  color: #c2410c;
  background: #fff4e5;
}

.status-badge.tone-red {
  color: var(--red);
  background: #fff0ef;
}

.empty {
  display: grid;
  place-items: center;
  min-height: 360px;
  margin: 0;
  border: 1px dashed rgba(148, 163, 184, 0.48);
  border-radius: 14px;
  padding: 28px 18px;
  color: var(--muted);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(248, 250, 252, 0.88) 100%);
  text-align: center;
  font-weight: 900;
}

.empty-stack {
  align-content: center;
  gap: 10px;
}

.empty-stack strong {
  color: var(--ink);
  font-size: 18px;
}

.empty-stack span {
  max-width: 460px;
  font-size: 14px;
  line-height: 1.45;
}

.empty-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, max-content));
  justify-content: center;
  gap: 8px;
  margin-top: 10px;
}

.empty-actions button {
  justify-content: center;
  min-height: 38px;
}

.empty.compact {
  min-height: 84px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
}

.scroll-top-button {
  position: fixed;
  right: 16px;
  bottom: calc(92px + var(--safe-bottom));
  z-index: 35;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(228, 231, 236, 0.92);
  border-radius: 50%;
  color: #fff;
  background: rgba(17, 19, 24, 0.88);
  box-shadow: 0 12px 32px rgba(16, 24, 40, 0.22);
  font-size: 18px;
  font-weight: 950;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.scroll-top-button.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
