/* ==================================================================
   海顺优选 · 管理后台 样式
   ------------------------------------------------------------------
   零依赖静态后台。配色沿用小程序：主色 #F45B4D，主文字 #1A1A1A。
   布局：左侧 200 菜单 + 顶部 56 面包屑 + 内容区（白卡片）
   ================================================================== */

:root {
  --primary: #f45b4d;
  --primary-light: #fdecea;
  --text-1: #1a1a1a;
  --text-2: #666666;
  --text-3: #999999;
  --border: #ededed;
  --bg: #f5f6f8;
  --success: #1aac4b;
  --danger: #f45b4d;
  --radius: 6px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text-1);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.hs-admin {
  display: flex;
  height: 100%;
}

/* ============ 左侧菜单 ============ */
.hs-aside {
  width: 200px;
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
}

.hs-aside__logo {
  height: 56px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-1);
  border-bottom: 1px solid var(--border);
}

.hs-aside__logo span {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.hs-menu {
  flex: 1;
  overflow-y: auto;
  padding: 8px 0;
}

/* —— 一级菜单（可折叠；默认收起，只展开当前页所在的那一组） —— */
.hs-menu__group {
  height: 42px;
  margin: 2px 8px;
  padding: 0 10px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
}

.hs-menu__group:hover {
  background: #f7f8fa;
}

.hs-menu__group.is-active {
  color: var(--primary);
  font-weight: 500;
}

.hs-menu__icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8a8f99;
}

.hs-menu__group.is-active .hs-menu__icon {
  color: var(--primary);
}

.hs-menu__icon .hs-i {
  width: 16px;
  height: 16px;
  display: block;
}

.hs-menu__name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hs-menu__arrow {
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  color: #b4b8bf;
  transition: transform 0.18s;
}

.hs-menu__group.is-open .hs-menu__arrow {
  transform: rotate(90deg);
}

/* —— 二级菜单（挂在一级下面，展开才显示） —— */
.hs-menu__sub {
  display: none;
  padding-bottom: 2px;
}

.hs-menu__sub.is-open {
  display: block;
}

.hs-menu__item {
  height: 38px;
  margin: 2px 8px;
  padding: 0 10px 0 35px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
  user-select: none;
}

.hs-menu__item .hs-menu__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
}

.hs-menu__item .hs-menu__icon .hs-i {
  width: 15px;
  height: 15px;
}

.hs-menu__item:hover {
  background: #f7f8fa;
}

.hs-menu__item.is-active {
  background: var(--primary-light);
  color: var(--primary);
  font-weight: 500;
}

.hs-menu__item.is-active .hs-menu__icon {
  color: var(--primary);
}

/* 「建设中」小标 */
.hs-menu__badge {
  flex: 0 0 auto;
  font-size: 11px;
  color: #b4b8bf;
}

/* ============ 右侧主体 ============ */
.hs-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.hs-top {
  height: 56px;
  flex-shrink: 0;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.hs-top__crumb {
  font-size: 14px;
  color: var(--text-2);
}

.hs-top__crumb b {
  color: var(--text-1);
  font-weight: 600;
}

/* 右上角账户（点开下拉：修改密码 / 退出登录） */
.hs-top__user {
  position: relative;
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.hs-top__user:hover {
  background: #f7f8fa;
}

.hs-top__caret {
  width: 12px;
  height: 12px;
  margin-left: 4px;
  color: #b4b8bf;
}

.hs-user-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 46px;
  min-width: 180px;
  padding: 6px 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  z-index: 90;
}

.hs-user-menu.is-show {
  display: block;
}

.hs-user-menu__head {
  padding: 6px 14px 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.hs-user-menu__head b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
}

.hs-user-menu__head span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.hs-user-menu__item {
  height: 34px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  font-size: 13px;
  color: var(--text-1);
  cursor: pointer;
}

.hs-user-menu__item:hover {
  background: #f7f8fa;
  color: var(--primary);
}

.hs-top__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary-light);
  margin-right: 8px;
}

.hs-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ============ 卡片 ============ */
.hs-card {
  background: #ffffff;
  border-radius: var(--radius);
  padding: 20px;
}

.hs-card + .hs-card {
  margin-top: 16px;
}

.hs-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.hs-card__title {
  font-size: 16px;
  font-weight: 600;
}

/* ============ 按钮 ============ */
.hs-btn {
  height: 32px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #ffffff;
  color: var(--text-1);
  font-size: 13px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hs-btn:hover {
  border-color: #dcdcdc;
}

.hs-btn--primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.hs-btn--primary:hover {
  opacity: 0.9;
}

.hs-btn--text {
  border: none;
  background: none;
  padding: 0 6px;
  color: var(--primary);
}

.hs-btn--danger {
  background: var(--danger);
  border-color: var(--danger);
  color: #ffffff;
}

/* 文字型危险按钮（表格操作列的「删除」）：
   ⚠️ 必须显式清掉 hs-btn--danger 的红底 —— 两者特异性相同、danger 在后面定义，
   不加这段就会「红底 + 红字」= 看起来是一个没有文字的红方块 */
.hs-btn--text.hs-btn--danger,
.hs-btn--danger.hs-btn--text {
  background: none;
  border-color: transparent;
  color: var(--danger);
}

.hs-btn--text.hs-btn--danger:hover,
.hs-btn--danger.hs-btn--text:hover {
  background: var(--primary-light);
}

.hs-btn--sm {
  height: 28px;
  padding: 0 12px;
}

.hs-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ============ 工具栏（搜索 + 新增） ============ */
.hs-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.hs-toolbar__spacer {
  flex: 1;
}

.hs-input,
.hs-select,
.hs-textarea {
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-1);
  background: #ffffff;
  font-family: inherit;
}

.hs-textarea {
  height: auto;
  padding: 8px 10px;
  line-height: 1.6;
  resize: vertical;
}

.hs-input:focus,
.hs-select:focus,
.hs-textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.hs-input--w200 {
  width: 200px;
}

/* ============ 表格 ============ */
.hs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.hs-table th {
  background: #f7f8fa;
  color: var(--text-2);
  font-weight: 500;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.hs-table td {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}

.hs-table tr:hover td {
  background: #fafbfc;
}

.hs-table__empty {
  padding: 40px;
  text-align: center;
  color: var(--text-3);
}

.hs-table__ops {
  white-space: nowrap;
}

/* 日期/时间列不换行（否则 2026-09-05 会被拆成两行） */
.hs-table td.hs-nowrap {
  white-space: nowrap;
}

/* 标签 */
.hs-tag {
  display: inline-block;
  padding: 1px 8px;
  margin: 0 6px 4px 0;
  border-radius: 3px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 12px;
}

.hs-tag--gray {
  background: #f2f3f5;
  color: var(--text-2);
}

/* 状态点 */
.hs-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  margin-right: 6px;
  vertical-align: 1px;
}

.hs-dot--off {
  background: #c9ccd1;
}

/* ============ 分页 ============ */
.hs-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  font-size: 13px;
  color: var(--text-2);
}

/* ============ 表单 ============ */
.hs-form {
  max-width: 720px;
}

.hs-field {
  display: flex;
  margin-bottom: 18px;
  align-items: flex-start;
}

.hs-field__label {
  width: 96px;
  flex-shrink: 0;
  padding-top: 7px;
  font-size: 13px;
  color: var(--text-2);
}

.hs-field__label i {
  color: var(--danger);
  font-style: normal;
  margin-right: 2px;
}

.hs-field__body {
  flex: 1;
  min-width: 0;
}

.hs-field__tip {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.hs-field__body .hs-input,
.hs-field__body .hs-select,
.hs-field__body .hs-textarea {
  width: 100%;
}

/* —— 表单两列栅格（第 39 轮 C200：「新增股票」大弹窗用）——
   默认一个字段占半行，写 full:true 的字段独占一整行。
   ⚠️ 用 column-gap 而不是 :nth-child 的 margin 写法：后者一旦中间插入
   .hs-field--full，偶数项判断就会错位 */
.hs-form--grid {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  max-width: none;
}

.hs-form--grid .hs-field {
  width: calc(50% - 12px);
}

.hs-form--grid .hs-field--full {
  width: 100%;
}

/* 系统带出的字段（股票代码 / 股票价格）：灰底不可改 */
.hs-input--locked {
  background: #f5f5f5;
  color: var(--text-1);
  cursor: default;
}

.hs-input--locked:focus {
  border-color: var(--border);
  box-shadow: none;
}

/* 百分数：数字框 + 固定 % 后缀 */
.hs-percent {
  position: relative;
  display: flex;
  align-items: center;
}

.hs-percent .hs-input {
  padding-right: 34px;
}

.hs-percent__unit {
  position: absolute;
  right: 12px;
  font-size: 13px;
  color: var(--text-2);
  pointer-events: none;
}

/* 价格区间：两个框 + 中间短横 */
.hs-range2 {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hs-range2 .hs-input {
  flex: 1;
  min-width: 0;
}

.hs-range2__sep {
  flex-shrink: 0;
  color: var(--text-3);
}

/* 多选标签（标签/类目勾选） */
.hs-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 4px;
}

.hs-check {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
}

.hs-check.is-on {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

/* ============ 弹窗 ============ */
.hs-mask {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
}

.hs-mask.is-show {
  display: block;
}

.hs-dialog {
  display: none;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 560px;
  max-width: 92vw;
  max-height: 86vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 8px;
  z-index: 101;
  padding: 20px 24px;
}

.hs-dialog.is-show {
  display: block;
}

.hs-dialog__title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hs-dialog__text {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.7;
}

.hs-dialog__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}

/* ============ Toast ============ */
.hs-toast {
  position: fixed;
  left: 50%;
  top: 40%;
  transform: translateX(-50%);
  background: rgba(32, 32, 32, 0.9);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

.hs-toast.is-show {
  opacity: 1;
}

/* ============ 其他 ============ */
.hs-placeholder {
  padding: 60px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 14px;
}

.hs-placeholder b {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text-2);
  font-weight: 500;
}

.hs-muted {
  color: var(--text-3);
}

.hs-required-note {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
}


/* 页面顶部说明条（第 2 批账户/权限页面用） */
.hs-tip {
  margin: 0 0 14px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #FFF7F6;
  border: 1px solid #FBD5D1;
  color: #8A5A54;
  font-size: 13px;
  line-height: 1.7;
}

/* —— 图片上传（老师头像 / 封面 / 轮播图） —— */
.hs-imgpick { display: flex; align-items: center; gap: 8px; }
.hs-imgpick .hs-input { flex: 1; }
.hs-imgpreview { display: none; margin-top: 8px; }
.hs-imgpreview.is-show { display: block; }
.hs-imgpreview img { max-width: 160px; max-height: 90px; border: 1px solid #E6E8EB; border-radius: 4px; display: block; }

/* —— 多图选择器（type:'images'，如轮播图一次上传多张） —— */
.hs-imgthumbs { display: none; margin-top: 8px; flex-wrap: wrap; gap: 8px; }
.hs-imgthumbs.is-show { display: flex; }
.hs-imgthumb { position: relative; width: 104px; height: 59px; border: 1px solid var(--border); border-radius: 4px; overflow: hidden; background: #fff; }
.hs-imgthumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hs-imgthumb__x {
  position: absolute; top: 0; right: 0;
  width: 18px; height: 18px; line-height: 17px; text-align: center;
  background: rgba(0, 0, 0, .5); color: #fff; font-size: 14px; cursor: pointer;
}

/* —— 只读字段（由系统生成/计算的值） —— */
.hs-readonly {
  padding: 7px 10px;
  background: #F5F6F8;
  border: 1px solid #E6E8EB;
  border-radius: 4px;
  color: #8A8A8A;
  font-size: 13px;
}

/* —— 服务周期多段编辑 —— */
.hs-period { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.hs-period .hs-input { width: 150px; }
.hs-period-item { display: flex; align-items: center; gap: 6px; padding: 6px 8px; background: #F7F8FA; border-radius: 4px; margin-bottom: 6px; }
.hs-period-item span { font-size: 13px; }
.hs-period-item__no { color: var(--text-2); font-size: 12px !important; }
.hs-period-cell { font-size: 12px; color: var(--text-2); line-height: 1.6; }
.hs-period-cell b { color: var(--text-1); font-weight: 500; }
.hs-period-add { display: flex; align-items: center; gap: 8px; margin: 12px 0 6px; }
.hs-period-add__label { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.hs-period-add .hs-daterange { max-width: 320px; }

/* —— 日期区间控件（只读框 + 双月日历） —— */
.hs-daterange { display: inline-block; width: 100%; max-width: 440px; }
.hs-daterange__box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-1);
}
.hs-daterange__box:hover { border-color: #d6d6d6; }
.hs-daterange__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-daterange__box.is-empty .hs-daterange__text { color: var(--text-3); }
.hs-daterange__icon { display: flex; align-items: center; flex-shrink: 0; }

/* ⚠️ z-index 必须高于表单弹窗（.hs-mask 100 / .hs-dialog 101），
   否则从表单里打开日历时会被弹窗遮罩盖住（截图复核时踩过） */
.hs-cal-mask { position: fixed; left: 0; top: 0; right: 0; bottom: 0; background: rgba(0, 0, 0, 0.45); z-index: 200; }
.hs-cal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 620px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  z-index: 201;
  overflow: hidden;
}
.hs-cal__head { display: flex; align-items: baseline; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.hs-cal__head b { font-size: 15px; color: var(--text-1); }
.hs-cal__hint { font-size: 12px; color: var(--text-3); }
.hs-cal__panels { display: flex; }
.hs-cal__panel { flex: 1; padding: 8px 14px 14px; }
.hs-cal__panel + .hs-cal__panel { border-left: 1px solid var(--border); }
.hs-cal__ph { display: flex; align-items: center; justify-content: center; gap: 2px; height: 34px; }
.hs-cal__title2 { min-width: 104px; text-align: center; font-size: 14px; color: var(--text-1); }
.hs-cal__nav {
  width: 24px;
  height: 24px;
  border: 0;
  background: none;
  color: #b6b6b6;
  font-size: 14px;
  line-height: 1;
  border-radius: 4px;
  cursor: pointer;
}
.hs-cal__nav:hover { background: var(--bg); color: var(--text-1); }
.hs-cal__week,
.hs-cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.hs-cal__week span { height: 26px; line-height: 26px; text-align: center; font-size: 12px; color: var(--text-2); }
.hs-cal__grid { row-gap: 2px; }
.hs-cal__day {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  font-size: 13px;
  color: var(--text-1);
  border-radius: 4px;
  cursor: pointer;
}
.hs-cal__day:hover { background: var(--bg); }
.hs-cal__day.is-out { color: #cfcfcf; cursor: default; }
.hs-cal__day.is-out:hover { background: none; }
.hs-cal__day.is-today { box-shadow: inset 0 0 0 1px var(--primary); }
.hs-cal__day.is-in { background: var(--primary-light); border-radius: 0; }
.hs-cal__day.is-in:hover { background: var(--primary-light); }
.hs-cal__day.is-sel { background: var(--primary); color: #fff; }
.hs-cal__day.is-sel:hover { background: var(--primary); }
.hs-cal__day.is-sel.is-today { box-shadow: none; }
.hs-cal__foot { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--border); }
.hs-cal__value { flex: 1; font-size: 13px; color: var(--text-2); }

/* —— 用户组权限矩阵（菜单可见 + 操作按钮 + 数据范围 三合一） —— */
.hs-perm {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.hs-perm__bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  background: #FAFBFC;
  border-bottom: 1px solid var(--border);
}

.hs-perm__count {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-3);
}

.hs-perm__count b {
  color: var(--primary);
  font-weight: 600;
}

/* 四列网格：菜单 | 可见 | 操作权限 | 数据范围(单选) */
.hs-perm__head,
.hs-perm__group,
.hs-perm__row {
  display: grid;
  grid-template-columns: 178px 58px 1fr 132px;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
}

.hs-perm__head {
  font-size: 12px;
  color: var(--text-3);
  background: #fff;
  border-bottom: 1px solid var(--border);
}

.hs-perm__group {
  background: #F7F8FA;
  border-top: 1px solid var(--border);
  font-size: 13px;
  font-weight: 500;
}

.hs-perm__row {
  border-top: 1px dashed #EEEFF1;
}

.hs-perm__row.is-off .hs-perm__name {
  color: var(--text-3);
}

.hs-perm__name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-1);
  min-width: 0;
}

.hs-perm__name .hs-menu__icon {
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  color: #8a8f99;
}

.hs-perm__name .hs-menu__icon .hs-i {
  width: 15px;
  height: 15px;
}

.hs-perm__vis {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.hs-perm__vis input {
  margin: 0;
  cursor: pointer;
}

.hs-perm__ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* 小号勾选块（操作按钮权限） */
.hs-mini {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 11px;
  font-size: 12px;
  color: var(--text-3);
  cursor: pointer;
  user-select: none;
}

.hs-mini.is-on {
  border-color: var(--primary);
  background: var(--primary-light);
  color: var(--primary);
}

.hs-perm__na {
  font-size: 12px;
  color: var(--text-3);
}

/* 数据范围：两个单选竖排更省宽度，也好点 */
.hs-perm__scope .hs-perm__radio {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hs-radio {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  cursor: pointer;
  line-height: 18px;
  white-space: nowrap;
}

.hs-radio input {
  margin: 0;
  width: 13px;
  height: 13px;
  accent-color: var(--primary);
  cursor: pointer;
}

.hs-radio input:disabled {
  cursor: not-allowed;
}

/* 未勾选「可见」的行：细分项置灰不可点 */
.hs-perm__ops.is-dis,
.hs-perm__scope.is-dis {
  opacity: 0.4;
  pointer-events: none;
}

/* 加宽弹窗（权限矩阵列多，560px 挤不下） */
.hs-dialog--wide {
  width: 880px;
}

.hs-dialog--wide .hs-form {
  max-width: none;
}

/* 超宽弹窗（第 49 轮 C219：老师发布资讯表单字段多 + 两列栅格，880px 还是挤） */
.hs-dialog--xl {
  width: 1060px;
  max-width: calc(100vw - 48px);
}

.hs-dialog--xl .hs-form {
  max-width: none;
}

/* 音视频文件选择后的提示行（type:'file'）
   只显示文件名 + 大小，不放 <video>/<audio> 播放器 ——
   演示环境下拿到的是占位地址，播不出来，放个黑框更像是坏了 */
.hs-mediabox {
  display: none;
  margin-top: 8px;
}

.hs-mediabox.is-show {
  display: block;
}

.hs-mediabox__name {
  padding: 6px 10px;
  background: #F5F6F8;
  border: 1px solid #E6E8EB;
  border-radius: 4px;
  font-size: 12px;
  color: #8A8A8A;
  word-break: break-all;
}

/* 置顶标签（红） */
.hs-tag--red { background: #F45B4D; color: #fff; }

/* ==================================================================
   第 21 轮新增：列表页操作行 / 登录页
   ================================================================== */

/* —— 列表页操作行 ——
   所有页面的功能按钮（新增 / 批量删除 / 我的·查看所有）统一放在这一行，
   靠左排列，顺序 = 数据范围 → 主操作 → 危险操作 */
.hs-toolbar--ops {
  margin-bottom: 12px;
}

.hs-toolbar--ops .hs-btn {
  height: 34px;
  padding: 0 18px;
}

/* —— 登录页（右上角「退出登录」后回来这里） —— */
.hs-login {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--bg);
  align-items: center;
  justify-content: center;
}

.hs-login.is-show {
  display: flex;
}

.hs-login__card {
  width: 340px;
  padding: 32px 28px 26px;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.hs-login__logo {
  margin-bottom: 22px;
  text-align: center;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-1);
}

.hs-login__logo span {
  margin-left: 6px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.hs-login__field {
  margin-bottom: 12px;
}

.hs-login__field .hs-input {
  width: 100%;
  height: 38px;
}

.hs-login__err {
  min-height: 18px;
  font-size: 12px;
  color: var(--danger);
}

.hs-login__btn {
  width: 100%;
  height: 38px;
  margin-top: 2px;
}

.hs-login__tip {
  margin-top: 14px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* ==================================================================
   富文本编辑（我的管理 · 用户协议 / 隐私政策）
   ------------------------------------------------------------------
   编辑器本体是本地 Quill（vendor/quill），这里只做「外壳」：
   把 Quill 自带的灰边框去掉，融进后台的白卡片版式，底部留一条保存栏。
   ================================================================== */
.hs-legal {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.hs-legal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: #fafafa;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
}

.hs-legal__meta code {
  background: #f2f2f3;
  padding: 1px 6px;
  border-radius: 4px;
  font-family: Consolas, monospace;
  font-size: 12px;
  color: var(--text-1);
}

.hs-legal__sep {
  margin: 0 8px;
  color: #dcdcdc;
}

.hs-legal__editor {
  min-height: 420px;
}

/* Quill 外壳：只用后台自己的边框，编辑器内部不加第二层框 */
.hs-legal__editor .ql-toolbar.ql-snow {
  border: 0;
  border-bottom: 1px solid var(--border);
  background: #fcfcfd;
  padding: 8px 12px;
}

.hs-legal__editor .ql-container.ql-snow {
  border: 0;
  font-size: 14px;
  font-family: inherit;
}

.hs-legal__editor .ql-editor {
  min-height: 420px;
  max-height: 62vh;
  overflow-y: auto;
  line-height: 1.85;
  color: var(--text-1);
  padding: 16px 18px;
}

.hs-legal__editor .ql-editor h1,
.hs-legal__editor .ql-editor h2,
.hs-legal__editor .ql-editor h3 {
  font-weight: 600;
}

.hs-legal__editor .ql-editor h2 {
  font-size: 16px;
  margin: 18px 0 8px;
}

.hs-legal__editor .ql-editor p {
  margin: 0 0 10px;
}

.hs-legal__editor .ql-editor img {
  max-width: 100%;
}

.hs-legal__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: #fff;
}

.hs-legal__hint {
  font-size: 12.5px;
  color: var(--text-3);
}

.hs-legal__hint.is-dirty {
  color: #e6a23c;
}

.hs-legal__hint.is-ok {
  color: var(--success);
}

.hs-legal__fallback-tip {
  padding: 10px 14px;
  margin-bottom: 8px;
  background: #fffbea;
  border: 1px solid #ffe7a8;
  border-radius: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}
