/* Archive list only: keep the surrounding school workspace unchanged. */
body.archive-list-active #archiveToolbar {
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  margin-bottom: 16px;
}

body.archive-list-active #archiveToolbar > a,
body.archive-list-active #archiveToolbar > button {
  min-height: 44px;
}

#listView {
  min-width: 0;
}

#listView > .card {
  border-color: #e7e8ee;
  box-shadow: 0 2px 8px rgb(30 34 60 / 3%);
}

#listView .archive-list-body {
  padding: 22px;
  overflow: visible;
}

#listView .archive-list-filters {
  display: grid;
  gap: 12px;
}

#listView .archive-list-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 72px 72px;
  gap: 8px;
  width: 100%;
  max-width: 660px;
}

#listView .archive-list-selects {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 180px));
  gap: 10px;
}

#listView .archive-list-filters input,
#listView .archive-list-filters select {
  width: 100%;
  min-width: 0;
  height: 44px;
  margin: 0;
  border: 1px solid #dedfe7;
  border-radius: 9px;
  padding: 0 13px;
  background-color: #fff;
  color: var(--ink, #1a1a1a);
  font: inherit;
  font-size: 14px;
  line-height: normal;
}

#listView .archive-list-filters input::placeholder {
  color: #8a8d9b;
}

#listView .archive-list-filters select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='m4.5 6 3.5 3.5L11.5 6' stroke='%236e6e76' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: right 11px center;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
  cursor: pointer;
}

#listView .archive-list-filters input:focus,
#listView .archive-list-filters select:focus {
  outline: none;
  border-color: var(--brand, #5e5ce6);
  box-shadow: 0 0 0 3px rgb(94 92 230 / 10%);
}

#listView .btn {
  min-width: 0;
  min-height: 44px;
  height: 44px;
  width: auto;
  padding: 0 16px;
  border-radius: 9px;
  font-size: 14px;
  line-height: 1.25;
  white-space: nowrap;
  word-break: keep-all;
}

#listView .btn-ghost {
  border-color: #e0e2e9;
  background: #fff;
  color: #454957;
}

#listView .btn-ghost:hover:not(:disabled) {
  border-color: #c9c9e7;
  background: #f7f7fd;
  color: var(--brand, #5e5ce6);
}

#listView .btn:focus-visible {
  outline: 2px solid var(--brand, #5e5ce6);
  outline-offset: 3px;
}

#listView .btn:disabled {
  cursor: default;
  opacity: .48;
}

#listView .archive-list-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding: 18px 0;
  border-top: 1px solid var(--line, #ececef);
}

#listView #archivePhotoTools,
#listView #archivePhotoTools.archive-photo-tools {
  display: contents;
}

#listView .archive-list-table {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid var(--line, #ececef);
  border-radius: 10px;
}

#listView .archive-list-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

#listView .archive-list-table th {
  height: 44px;
  padding: 10px 16px;
  background: #f7f8fb;
  color: #6e7382;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
}

#listView .archive-list-table th:first-child {
  width: 64%;
}

#listView #listTable td {
  height: 64px;
  padding: 8px 16px;
  font-size: 14px;
  line-height: 1.5;
  vertical-align: middle;
}

#listView #listTable td:last-child {
  color: #6a6f7e;
  white-space: normal;
  overflow-wrap: anywhere;
}

#listView .archive-photo-name {
  display: flex;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
}

#listView .archive-student-open {
  min-width: 0;
  max-width: 100%;
  gap: 10px;
  font-weight: 500;
}

#listView .archive-student-open > span:last-child {
  min-width: 0;
  max-width: none;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
}

#listView .archive-photo-name > input,
#listView .archive-photo-select-header input {
  accent-color: var(--brand, #5e5ce6);
  cursor: pointer;
}

#listView .student-photo {
  width: 32px;
  height: 36px;
  border-radius: 7px;
  background: #f0f0fa;
  color: #7672a8;
}

#listView #listTable .empty {
  height: auto;
  padding: 48px 16px;
  color: var(--ink-3, #9c9ca6);
  text-align: center;
}

#listView .pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 18px;
  min-width: 0;
}

#listView #pageInfo {
  color: #737887;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 639px) {
  body.archive-list-active #archiveToolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    padding: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.archive-list-active #archiveToolbar > a,
  body.archive-list-active #archiveToolbar > button {
    min-width: max-content;
    flex: none;
    height: 44px;
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
  }

  body.archive-list-active #archiveToolbar .ico {
    display: none;
  }

  #listView .archive-list-body {
    padding: 14px;
  }

  #listView .archive-list-search {
    grid-template-columns: minmax(0, 1fr) 58px 58px;
    gap: 7px;
  }

  #listView .archive-list-search .btn {
    padding: 0 8px;
  }

  #listView .archive-list-selects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
  }

  #listView .archive-list-filters input,
  #listView .archive-list-filters select {
    padding-left: 9px;
    font-size: 16px;
  }

  #listView .archive-list-filters select {
    padding-right: 24px;
    background-position: right 6px center;
    background-size: 13px 13px;
  }

  #listView .archive-list-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
    padding: 16px 0;
  }

  #listView .archive-list-actions .btn {
    width: 100%;
    padding: 0 8px;
  }

  #listView .archive-list-table th,
  #listView #listTable td {
    padding-left: 10px;
    padding-right: 10px;
  }

  #listView .archive-list-table th:first-child {
    width: 65%;
  }

  #listView .archive-photo-name,
  #listView .archive-student-open,
  #listView .archive-photo-select-header {
    gap: 8px;
  }

  #listView #listTable td:last-child {
    min-width: 0;
    font-size: 13px;
  }

  #listView .pager {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr) 76px;
    gap: 8px;
    margin-top: 16px;
  }

  #listView .pager .btn {
    padding: 0 8px;
  }
}

@media (max-width: 359px) {
  #listView .archive-list-body {
    padding: 10px;
  }

  #listView .archive-list-selects {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #listView .archive-list-selects select:last-child {
    grid-column: 1 / -1;
  }

  #listView .archive-list-table th:first-child {
    width: 68%;
  }

  #listView .archive-list-table th,
  #listView #listTable td {
    padding-left: 8px;
    padding-right: 8px;
  }
}

body.archive-list-active #archiveToolbar::-webkit-scrollbar{display:none}
@media(max-width:768px){body.archive-list-active .topbar{flex-direction:row;align-items:center;gap:12px;margin-bottom:18px}body.archive-list-active .topbar>div:first-child{min-width:0}body.archive-list-active .topbar .btn{flex:none}body.archive-list-active #pageCrumb{font-size:12px}}
@media(min-width:520px) and (max-width:639px){#listView .archive-list-actions{grid-template-columns:repeat(3,minmax(0,1fr))}}
