.problem-labels{display:flex;flex-wrap:wrap;gap:6px;max-width:440px}.problem-label{display:inline-block;border-radius:7px;padding:4px 9px;font-size:12px;line-height:1.5;background:#eef5fc;color:#4b6e90;border:1px solid #dfebf7;overflow-wrap:anywhere}.problem-label.source{background:#eaf3ff;color:#2563a4;border-color:#cfdef5}.problem-label.algorithm{background:#edf9f7;color:#26766e;border-color:#cdece6}.problem-label.difficulty{font-weight:650;background:#f5f2ff;color:#7454a3;border-color:#e5dcf7}.problem-label.level-1{color:#a02443;background:#fff0f4}.problem-label.level-2{color:#874200;background:#fff2e3}.problem-label.level-3{color:#715100;background:#fff9cf}.problem-label.level-4{color:#216036;background:#e6f6e8}.problem-label.level-5{color:#00666c;background:#e0f7f7}.problem-label.level-6{color:#15539b;background:#e7f1ff}.problem-label.level-7{color:#683599;background:#f3eaff}.problem-label.level-8{color:#303242;background:#ebedf3}.legacy-tags{font-size:11px;color:#8699ab;margin-top:7px}.bank-label-filters{display:flex;gap:12px;flex-wrap:wrap;margin:14px 0}.bank-label-filters label{flex:1;min-width:150px;margin:0}.bank-label-filters select{width:100%;max-width:340px}.problem-label-dialog{width:min(650px,calc(100vw - 40px));max-height:90vh;overflow:auto;padding:28px;border:1px solid #cfe1f4;border-radius:20px;color:#244b70;background:#fafdff;box-shadow:0 24px 80px #123c6b33}.problem-label-dialog::backdrop{background:#173c6055;backdrop-filter:blur(3px)}.problem-label-dialog h2{margin:6px 0}.label-state{color:#b24b42;min-height:24px}.label-actions{justify-content:flex-end}.preview-labels{margin:14px 0 22px}.preview-labels .problem-labels{max-width:none}
.bank-table-wrap th:nth-child(3),.bank-table-wrap td:nth-child(3){min-width:130px}.bank-table-wrap td:nth-child(5){min-width:260px}.bank-table-wrap th:nth-child(1),.bank-table-wrap th:nth-child(2){min-width:70px}

.bank-label-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 215px), 1fr));
  gap: 12px 18px;
}
.bank-label-filters .bank-facet,
.bank-label-filters > label {
  min-width: 0;
  position: relative;
}
.bank-label-filters .bank-facet > label { min-width: 0; }
.bank-facet-control,
.bank-label-filters > label > select {
  display: block;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 6px 0 0;
}
.bank-facet-control input {
  width: 100%;
  height: 42px;
  margin: 0;
  padding-right: 42px;
  text-overflow: ellipsis;
}
.bank-label-filters > label > select { height: 42px; }
.bank-facet-control .bank-facet-toggle {
  position: absolute;
  right: 2px;
  top: 2px;
  bottom: 2px;
  width: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 8px;
  color: #52799d;
  background: transparent;
  box-shadow: none;
}
.bank-facet-control .bank-facet-toggle:not(:disabled):hover {
  color: #235e98;
  background: #eaf4ff;
  box-shadow: none;
}
.bank-facet-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border: solid currentColor;
  border-width: 0 1.5px 1.5px 0;
  transform: translateY(-2px) rotate(45deg);
}
.bank-facet-control:has(input[aria-expanded="true"]) .bank-facet-toggle::after {
  transform: translateY(2px) rotate(225deg);
}
.bank-facet-menu {
  position: absolute;
  z-index: 5;
  inset: calc(100% + 4px) 0 auto;
  max-height: min(17rem, 44vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px;
  border: 1px solid #c7dcf1;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 8px 24px #234a7526;
}
.bank-facet-menu [role="option"],
.bank-facet-empty {
  padding: 8px 10px;
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.bank-facet-menu [role="option"] { border-radius: 6px; cursor: pointer; }
.bank-facet-menu [aria-selected="true"] { color: #175e9c; font-weight: 600; }
.bank-facet-menu [role="option"]:hover { background: #edf5fd; }
.bank-facet-menu [role="option"][data-active] {
  color: #154d83;
  background: #e2effd;
  box-shadow: inset 3px 0 #3683cc;
}
.bank-facet-empty { color: var(--muted); }
