.filter-control { position: relative; }
.filter-trigger {
  min-width: 122px;
  height: 42px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--color-text);
  padding: 0 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-align: left;
}
.filter-trigger:hover, .filter-control.is-open .filter-trigger { border-color: #f1b989; background: #fffaf6; }
.filter-trigger.is-active { border-color: #f1b989; background: var(--color-primary-soft); color: var(--color-primary-hover); }
.filter-trigger__copy { min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.filter-trigger__copy small { color: var(--color-text-tertiary); font-size: 9px; font-weight: 650; }
.filter-trigger__copy strong { max-width: 92px; overflow: hidden; text-overflow: ellipsis; font-size: 12px; white-space: nowrap; }
.chevron { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 160ms; }
.filter-control.is-open .chevron { transform: rotate(225deg) translate(-1px, -1px); }
.filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  width: 360px;
  max-height: 380px;
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  background: #fff;
  padding: 10px;
  box-shadow: var(--shadow-popup);
}
.filter-menu--compact { width: 220px; }
.filter-menu__search { width: 100%; height: 36px; margin-bottom: 8px; border: 1px solid var(--color-border); border-radius: 7px; padding: 0 10px; }
.filter-group { display: grid; grid-template-columns: 76px 1fr; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--color-border); }
.filter-group:first-of-type { border-top: 0; }
.filter-group__label { padding-top: 5px; color: var(--color-text-tertiary); font-size: 10px; font-weight: 700; }
.filter-options { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-option { min-height: 28px; border: 1px solid transparent; border-radius: 6px; background: var(--color-surface-soft); color: var(--color-text-secondary); padding: 4px 8px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.filter-option:hover { border-color: #f1c9a7; color: var(--color-primary-hover); }
.filter-option.is-selected { border-color: #f1b989; background: var(--color-primary-soft); color: var(--color-primary-hover); font-weight: 700; }
.filter-option__check { width: 13px; height: 13px; display: inline-flex; align-items: center; justify-content: center; }
.filter-option__check .icon { width: 13px; height: 13px; }
.sort-control { position: relative; }
.sort-trigger {
  min-width: 132px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-control);
  background: #fff;
  color: var(--color-text-secondary);
  padding: 0 11px 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 12px;
  font-weight: 650;
  text-align: left;
}
.sort-trigger:hover { border-color: #f1b989; color: var(--color-text); }
.sort-trigger:focus-visible { border-color: var(--color-primary); box-shadow: 0 0 0 3px var(--color-primary-soft); }
.sort-control.is-open .sort-trigger { border-color: #f1b989; color: var(--color-text); }
.sort-control.is-open .chevron { transform: rotate(225deg) translate(-1px, -1px); }
.sort-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 30;
  width: 188px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: #fff;
  padding: 5px;
  box-shadow: var(--shadow-popup);
}
.sort-option {
  width: 100%;
  min-height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--color-text-secondary);
  padding: 0 9px 0 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  text-align: left;
}
.sort-option:hover, .sort-option:focus-visible { outline: 0; background: var(--color-surface-soft); color: var(--color-text); }
.sort-option[aria-selected="true"] { background: var(--color-primary-soft); color: var(--color-primary-hover); font-weight: 700; }
.sort-option__check { width: 16px; height: 16px; flex: 0 0 16px; color: var(--color-primary); }
.sort-option__check .icon { width: 16px; height: 16px; }
.teacher-card {
  position: relative;
  min-width: 0;
  height: 100%;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  background: #fff;
  padding: 16px;
  display: flex;
  flex-direction: column;
  transition: border-color 160ms, box-shadow 160ms, transform 160ms;
}
.teacher-card:hover { border-color: #f1bd91; box-shadow: 0 10px 22px rgba(32, 40, 50, 0.07); transform: translateY(-1px); }
.teacher-card__head { min-width: 0; padding-right: 38px; display: flex; align-items: center; gap: 11px; }
.avatar { width: 46px; height: 46px; flex: 0 0 46px; overflow: hidden; border-radius: 12px; background: #f3e1d2; display: grid; place-items: center; color: var(--color-primary-hover); font-size: 17px; font-weight: 800; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar img + span { display: none; }
.teacher-card__identity { min-width: 0; }
.teacher-name { min-width: 0; display: flex; align-items: center; gap: 7px; font-size: 15px; font-weight: 800; }
.teacher-name__text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.presence { position: relative; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 3px var(--color-success-soft); }
.presence:not(.is-offline)::after { content: ""; position: absolute; inset: -4px; border: 1px solid rgba(21, 149, 104, 0.55); border-radius: 50%; animation: presence-pulse 1.8s ease-out infinite; }
.presence.is-offline { background: #c2c8d0; box-shadow: 0 0 0 3px #f1f3f5; }
@keyframes presence-pulse {
  0% { opacity: 0.9; transform: scale(0.55); }
  72%, 100% { opacity: 0; transform: scale(1.45); }
}
.teacher-org-inline { min-width: 0; overflow: hidden; color: var(--color-text-tertiary); font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.teacher-meta { margin-top: 3px; overflow: hidden; color: var(--color-text-secondary); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.favorite-button { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 8px; background: var(--color-surface-soft); color: #a4acb5; display: grid; place-items: center; }
.favorite-button:hover { border-color: #ffc99d; background: #fffaf6; color: var(--color-primary-hover); }
.favorite-button.is-active { border-color: #ffd0ad; background: var(--color-primary-soft); color: var(--color-primary-hover); }
.teacher-card__facts { position: relative; margin-top: 14px; display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.subject-tags { min-width: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.subject-tag { min-height: 24px; padding: 3px 8px; border-radius: 6px; background: var(--color-surface-soft); color: var(--color-text-secondary); display: inline-flex; align-items: center; font-size: 11px; font-weight: 650; }
.credential-summary { position: relative; flex: 0 0 auto; }
.summary-trigger { min-height: 24px; border: 0; border-radius: 6px; background: #fff; color: var(--color-text-secondary); padding: 3px 4px; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; }
.summary-trigger:hover, .summary-trigger[aria-expanded="true"] { background: var(--color-surface-soft); color: var(--color-primary-hover); }
.summary-trigger .icon { color: var(--color-text-tertiary); }
.mini-popover {
  position: absolute;
  right: 0;
  bottom: calc(100% + 8px);
  z-index: 25;
  width: 220px;
  border: 1px solid var(--color-border);
  border-radius: 9px;
  background: #fff;
  padding: 12px;
  box-shadow: var(--shadow-popup);
}
.mini-popover h4 { margin: 0 0 8px; font-size: 12px; }
.mini-popover ul { margin: 0; padding: 0; list-style: none; }
.mini-popover li { padding: 6px 0; border-top: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: 11px; }
.mini-popover li:first-child { border-top: 0; }
.teacher-intro { min-height: 42px; margin: 12px 0 0; overflow: hidden; color: var(--color-text-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 1.7; }
.teacher-card__footer { position: relative; margin-top: auto; padding-top: 13px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; }
.time-cycle { position: relative; min-width: 0; }
.time-trigger { max-width: 100%; min-height: 34px; border: 0; border-radius: 7px; background: transparent; color: var(--color-success); padding: 0 4px 0 0; display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 750; }
.time-trigger:hover, .time-trigger[aria-expanded="true"] { color: #087951; }
.time-trigger__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: opacity 180ms, transform 180ms; }
.time-trigger__label.is-changing { opacity: 0; transform: translateY(3px); }
.time-trigger__index { flex: 0 0 auto; color: var(--color-text-tertiary); font-size: 9px; font-variant-numeric: tabular-nums; }
.time-popover { left: 0; right: auto; }
.card-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; }
.card-actions .button { min-width: 88px; padding: 0 11px; }
.empty-state { grid-column: 1 / -1; padding: 64px 20px 76px; text-align: center; color: var(--color-text-secondary); }
.empty-state strong { display: block; margin-bottom: 6px; color: var(--color-text); font-size: 16px; }
.list-header, .teacher-row { display: grid; grid-template-columns: minmax(210px, 1fr) minmax(250px, 1.3fr) minmax(105px, 0.48fr) minmax(165px, 0.76fr) minmax(254px, auto); gap: 18px; align-items: center; }
.list-header { position: relative; z-index: 12; padding: 11px 16px; border-bottom: 1px solid var(--color-border); background: var(--color-surface-soft); color: var(--color-text-secondary); font-size: 12px; font-weight: 700; }
.list-header span:last-child { text-align: right; }
.teacher-row { position: relative; min-height: 96px; padding: 14px 16px; border-bottom: 1px solid var(--color-border); background: #fff; transition: background 160ms; }
.teacher-row:last-child { border-bottom: 0; }
.teacher-row:hover { background: #fafbfc; }
.teacher-row > [role="cell"] { min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; }
.teacher-row__identity { min-width: 0; }
.teacher-row__identity .teacher-card__head { padding: 0; }
.teacher-row__scope { min-width: 0; }
.teacher-row__scope .subject-tags { margin-bottom: 7px; }
.text-tooltip { position: relative; min-width: 0; }
.teacher-row__intro { margin: 0; min-height: 37px; overflow: hidden; color: var(--color-text-secondary); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; font-size: 12px; line-height: 1.55; }
.text-tooltip.has-overflow .teacher-row__intro { cursor: help; }
.text-tooltip__content { position: absolute; left: 0; top: calc(100% + 8px); z-index: 35; width: min(360px, 72vw); visibility: hidden; opacity: 0; pointer-events: none; transform: translateY(-4px); border: 1px solid var(--color-border); border-radius: 8px; background: #fff; color: var(--color-text-secondary); padding: 10px 12px; font-size: 12px; line-height: 1.65; box-shadow: var(--shadow-popup); transition: opacity 140ms, transform 140ms, visibility 140ms; }
.text-tooltip.has-overflow:hover .text-tooltip__content, .text-tooltip.has-overflow:focus-visible .text-tooltip__content, .text-tooltip.has-overflow:focus-within .text-tooltip__content { visibility: visible; opacity: 1; transform: translateY(0); }
.credential-summary--list .summary-trigger { background: var(--color-surface-soft); padding: 3px 7px; }
.teacher-row__credentials .credential-summary { align-self: flex-start; }
.teacher-row__credentials .mini-popover { top: calc(100% + 8px); bottom: auto; left: 0; right: auto; }
.teacher-row__schedule { min-width: 0; }
.time-cycle--list .time-trigger { min-height: 28px; padding: 0; }
.time-cycle__hint { display: block; margin-top: 2px; color: var(--color-text-secondary); font-size: 11px; }
.teacher-row__schedule .time-popover { top: calc(100% + 8px); bottom: auto; }
.teacher-row > .teacher-row__actions { position: static; min-width: 0; display: flex; flex-direction: row; align-items: center; justify-content: flex-end; gap: 7px; }
.teacher-row__actions .favorite-button { position: static; flex: 0 0 34px; width: 34px; height: 34px; }
.teacher-row__actions .button { min-width: 84px; padding: 0 10px; }
.teacher-list-shell { scroll-margin-top: calc(var(--header-height) + 12px); }
.pagination { padding: 16px 18px 20px; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px; }
.pagination__summary { margin-right: 2px; color: var(--color-text-tertiary); font-size: 11px; }
.pagination__pages { display: flex; align-items: center; gap: 6px; }
.pagination__button { width: 32px; height: 32px; border: 1px solid var(--color-border); border-radius: 7px; background: #fff; color: var(--color-text-secondary); display: inline-grid; place-items: center; font-size: 12px; font-weight: 700; }
.pagination__button:hover:not(:disabled) { border-color: #f1b989; color: var(--color-primary-hover); }
.pagination__button.is-active { border-color: var(--color-primary); background: var(--color-primary); color: #fff; }
.pagination__button:disabled { cursor: not-allowed; opacity: 0.42; }
.pagination__button--arrow .icon { transform: rotate(180deg); }
.pagination__button--next .icon { transform: none; }
.page-size-control { position: relative; }
.page-size-trigger { height: 32px; min-width: 92px; padding: 0 10px; border: 1px solid var(--color-border); border-radius: 7px; background: #fff; color: var(--color-text-secondary); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 650; }
.page-size-trigger:hover, .page-size-trigger[aria-expanded="true"] { border-color: #f1b989; color: var(--color-primary-hover); }
.page-size-trigger .icon { width: 15px; height: 15px; transition: transform 160ms; }
.page-size-trigger[aria-expanded="true"] .icon { transform: rotate(180deg); }
.page-size-menu { position: absolute; right: 0; bottom: calc(100% + 7px); z-index: 24; width: 112px; padding: 5px; border: 1px solid var(--color-border); border-radius: 8px; background: #fff; box-shadow: var(--shadow-popup); }
.page-size-option { width: 100%; height: 32px; padding: 0 8px; border: 0; border-radius: 6px; background: transparent; color: var(--color-text-secondary); display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; text-align: left; }
.page-size-option:hover { background: var(--color-surface-soft); color: var(--color-text); }
.page-size-option.is-active { color: var(--color-primary-hover); font-weight: 700; }
.page-size-option .icon { width: 15px; height: 15px; }
.page-jump { display: flex; align-items: center; gap: 6px; color: var(--color-text-tertiary); font-size: 11px; }
.page-jump input { width: 42px; height: 32px; padding: 0 6px; border: 1px solid var(--color-border); border-radius: 7px; background: #fff; color: var(--color-text); text-align: center; }
.page-jump input:focus { border-color: var(--color-primary); outline: 0; }
.page-jump button { height: 32px; padding: 0 11px; border: 1px solid var(--color-border); border-radius: 7px; background: #fff; color: var(--color-text-secondary); font-size: 12px; font-weight: 650; }
.page-jump button:hover { border-color: #f1b989; color: var(--color-primary-hover); }
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(20, 27, 35, 0.34); display: grid; place-items: center; padding: 18px; }
.dialog { width: min(430px, 100%); border-radius: 14px; background: #fff; padding: 24px; box-shadow: var(--shadow-popup); }
.dialog__head { margin-bottom: 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.dialog__head h2 { margin: 0; font-size: 18px; }
.dialog__head p { margin: 5px 0 0; color: var(--color-text-secondary); font-size: 12px; }
.icon-button { width: 32px; height: 32px; border: 0; border-radius: 7px; background: var(--color-surface-soft); color: var(--color-text-secondary); display: grid; place-items: center; }
.dialog__actions { margin-top: 20px; display: flex; justify-content: flex-end; gap: 8px; }
.notice { padding: 12px 13px; border: 1px solid #f6d0b2; border-radius: 9px; background: var(--color-primary-soft); color: #8f4a16; font-size: 12px; line-height: 1.7; }
.drawer-mask { position: fixed; inset: 0; z-index: 40; background: rgba(20, 27, 35, 0.28); }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 45; width: min(520px, 100%); background: #fff; box-shadow: -18px 0 44px rgba(32, 40, 50, 0.16); display: flex; flex-direction: column; }
.drawer__head { padding: 24px; border-bottom: 1px solid var(--color-border); display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.drawer__teacher { display: flex; align-items: center; gap: 12px; }
.drawer__teacher h2 { margin: 0; font-size: 20px; }
.drawer__teacher p { margin: 4px 0 0; color: var(--color-text-secondary); font-size: 12px; }
.drawer__body { flex: 1; overflow: auto; padding: 24px; }
.drawer__body > p { margin: 0 0 20px; color: var(--color-text-secondary); line-height: 1.8; }
.detail-section { padding: 18px 0; border-top: 1px solid var(--color-border); }
.detail-section h3 { margin: 0 0 12px; font-size: 14px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.detail-grid div { padding: 10px; border-radius: 8px; background: var(--color-surface-soft); }
.detail-grid dt { color: var(--color-text-tertiary); font-size: 10px; }
.detail-grid dd { margin: 4px 0 0; color: var(--color-text); font-size: 12px; font-weight: 650; }
.detail-list { margin: 0; padding: 0; list-style: none; }
.detail-list li { padding: 8px 0; border-top: 1px solid var(--color-border); color: var(--color-text-secondary); font-size: 12px; }
.detail-list li:first-child { border-top: 0; }
.drawer__foot { padding: 14px 24px; border-top: 1px solid var(--color-border); display: flex; justify-content: flex-end; gap: 8px; }
.drawer__foot .button { min-width: 108px; }
.toast { position: fixed; top: calc(var(--header-height) + 18px); left: 50%; z-index: 70; max-width: min(360px, calc(100vw - 56px)); opacity: 0; pointer-events: none; transform: translate(-50%, -12px); border-radius: 9px; background: #202832; color: #fff; padding: 10px 16px; font-size: 12px; box-shadow: var(--shadow-popup); transition: opacity 180ms, transform 180ms; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
