.material-page-head h1 {
  margin: 0;
}
.material-page-head .head-actions {
  display: flex;
  gap: 12px;
}
.material-space {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #edf3ff;
  border: 1px solid #b8c9eb;
  border-radius: 14px;
  padding: 18px 22px;
  margin: 20px 0;
}
.material-space > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.material-space strong {
  font-size: 16px;
  color: #203f7b;
}
.material-space span {
  color: #4c5f7d;
}
.material-tabs {
  display: flex;
  gap: 8px;
  margin: 22px 0 18px;
  border-bottom: 1px solid #bfd0ed;
  padding-bottom: 10px;
}
.material-tabs button {
  background: transparent;
  border: 0;
  color: #465978;
  padding: 9px 15px;
  min-height: 42px;
}
.material-tabs button.is-active {
  background: #e6edff;
  color: #23468b;
  border-radius: 9px;
  font-weight: 650;
}
.material-search {
  display: flex;
  align-items: end;
  gap: 14px;
  margin: 20px 0;
}
.material-search label {
  display: grid;
  gap: 7px;
  flex: 1;
}
.material-search label:first-child {
  flex: 2;
}
.material-search input,
.material-search select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #a6bce1;
  border-radius: 9px;
  padding: 10px 12px;
  background: #fff;
  color: #243b63;
}
.material-search label > span {
  font-size: 13px;
  color: #405573;
}
.material-selection {
  display: flex;
  position: sticky;
  top: 72px;
  z-index: 20;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: #edf2ff;
  border: 1px solid #a9bde4;
  border-radius: 12px;
}
.material-selection[hidden] {
  display: none;
}
.material-selection > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.material-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 18px 0;
  color: #4a5c78;
  font-size: 14px;
}
.material-grid {
  display: grid;
  gap: 14px;
}
.teaching-material-card {
  display: grid;
  grid-template-columns: 28px 50px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  border: 1px solid #b6c8e7;
  border-radius: 14px;
  padding: 20px;
  background: white;
}
.material-card-content {
  min-width: 0;
}
.material-card-content h2 {
  font-size: 17px;
  line-height: 1.55;
  margin: 0 0 7px;
  font-weight: 650;
  overflow-wrap: anywhere;
  color: #193b70;
}
.material-card-content p {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.7;
  color: #4d607b;
}
.material-kind {
  display: grid;
  place-items: center;
  background: #edf2fc;
  color: #2f5592;
  border-radius: 10px;
  min-height: 52px;
  font-size: 12px;
  font-weight: 650;
}
.material-check {
  display: grid;
  place-items: center;
  min-height: 44px;
}
.material-check input {
  width: 18px;
  height: 18px;
  accent-color: #23468b;
}
html[data-theme='bridge'] #app[data-view='materials'] .material-card-content h2 {
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 550;
  margin: 0 0 5px;
}
@media (min-width: 701px) {
  html[data-theme='bridge'] #app .teaching-material-card {
    padding: 14px 18px;
  }
}
@media (max-width: 760px) {
  .material-selection {
    top: 68px;
  }
}
.material-empty {
  text-align: center;
  padding: 42px 16px;
  color: #52647e;
}
.material-empty h2,
.material-empty h3 {
  font-size: 18px;
  color: #244574;
}
.material-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 24px 0;
}
.teaching-upload-drawer {
  inset: 0 0 0 auto;
  margin: 0;
  height: 100dvh;
  max-height: 100dvh;
  width: min(520px, 100%);
  max-width: 100%;
  box-sizing: border-box;
  padding: 0;
  border: 0;
  border-left: 1px solid #b8c8e5;
  border-radius: 18px 0 0 18px;
  background: #fff;
  box-shadow: -12px 0 48px #18346224;
}
.teaching-upload-drawer::backdrop {
  background: #15345b40;
}
.teaching-upload-drawer[open] {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.material-drawer-head {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 26px;
  border-bottom: 1px solid #c6d3e8;
}
.material-drawer-head h2 {
  font-size: 23px;
  margin: 0;
  color: #1b3f77;
}
.material-drawer-body {
  overflow-y: auto;
  min-height: 0;
  flex: 1;
  padding: 22px 26px;
}
.material-drop-zone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 10px;
  border: 1px dashed #7d9bc9;
  border-radius: 13px;
  padding: 25px 14px;
  background: #f3f7ff;
  color: #23468b;
  cursor: pointer;
}
.material-drop-zone span {
  font-size: 13px;
  color: #4e6484;
}
.material-drop-zone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.material-drawer-tip {
  font-size: 13px;
  color: #4b607f;
  line-height: 1.8;
  margin: 16px 0 22px;
}
.material-upload-item {
  border: 1px solid #bbcbe5;
  border-radius: 12px;
  padding: 17px;
  margin: 14px 0;
}
.material-upload-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.material-upload-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.material-status {
  font-size: 12px;
  color: #49618a;
  white-space: nowrap;
  padding: 3px 7px;
  background: #edf2fc;
  border-radius: 5px;
}
.material-status.is-ready {
  color: #176b63;
  background: #e6f5ef;
}
.material-upload-item p {
  font-size: 13px;
  color: #50617c;
  line-height: 1.7;
  margin: 8px 0;
}
.material-upload-item progress {
  width: 100%;
  height: 8px;
  accent-color: #315696;
}
.material-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.material-error {
  color: #a13938 !important;
}
.material-history-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 0;
  border-bottom: 1px solid #c9d5e8;
}
.material-history-row p {
  font-size: 13px;
  margin: 5px 0;
  color: #536581;
}
.material-history-detail {
  padding: 10px 0 16px;
  border-bottom: 1px solid #c9d5e8;
}
.material-history-detail h3 {
  font-size: 17px;
}
.material-history-detail p {
  font-size: 14px;
  line-height: 1.9;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .material-page-head {
    align-items: start !important;
    gap: 14px !important;
  }
  .material-page-head h1 {
    font-size: 25px !important;
  }
  .material-page-head .head-actions {
    gap: 7px;
  }
  .material-page-head button {
    padding: 9px 12px !important;
    font-size: 13px;
  }
  .material-space {
    padding: 14px;
  }
  .material-space > div {
    display: grid;
    gap: 7px;
  }
  .material-space strong {
    font-size: 14px;
  }
  .material-search {
    flex-wrap: wrap;
    gap: 10px;
  }
  .material-search label:first-child {
    flex-basis: 100%;
  }
  .material-search label {
    flex: 1;
    min-width: 0;
  }
  .material-selection {
    align-items: start;
    flex-direction: column;
  }
  .teaching-material-card {
    grid-template-columns: 22px 40px minmax(0, 1fr);
    gap: 11px;
    padding: 15px;
  }
  .teaching-material-card > button {
    grid-column: 3;
    justify-self: start;
    padding-left: 0 !important;
  }
  .material-kind {
    font-size: 10px;
    min-height: 44px;
  }
  .material-card-content h2 {
    font-size: 15px;
  }
  .material-tabs {
    gap: 3px;
  }
  .material-tabs button {
    padding: 8px 12px;
    font-size: 13px;
  }
  .material-drawer-head,
  .material-drawer-body {
    padding: 18px;
  }
  .teaching-upload-drawer {
    border-radius: 0;
  }
  .material-upload-heading {
    display: grid;
    gap: 7px;
  }
  .material-status {
    justify-self: start;
  }
}

.md-library-resources {
  min-width: 0;
}
.md-library-resources p,
.md-library-resources label > span,
.material-history-detail h3,
.material-history-row > div {
  overflow-wrap: anywhere;
  min-width: 0;
}
