/* ==========================================================================
   童约 · 俊贤儿童之家 全局统一样式层（TY UI）
   依据《最终指令｜内页统一 PreSkool 版式 v3》第二节，数值逐项照抄视觉母版
   public/ui/preskool-preview.html 的实际 CSS（v3 零.3：出入以母版文件为准）
   ------------------------------------------------------------------------
   接入方式：<link rel="stylesheet" href="/ui/ty-ui.css">
   作用域：全部规则挂在 .ty-app 之下（Logo、用户卡、布局模式除外，见各节注释），
           未被引入的既有页面完全不受影响。
   硬性对齐项：
     · 页面底色 #F7F8FB｜卡片底色 #FFFFFF｜菜单选中 #EEF2FE｜主色 #3D5EE1
     · 卡片三件套：border-radius:16px + 1px solid #E8EAED + 双层阴影（缺 1 项判不合格）
     · 字号层级 23/700 · 16/600 · 14 · 12–13；指标数字 26/700
     · 断点 768px；图标 2px 线条 SVG、圆角端点；全站禁止 Emoji
   ========================================================================== */

/* ==========================================================================
   1. 设计变量（默认布局＝电脑端标准宽屏）
   ========================================================================== */
:root {
  /* --- 1.1 主色板（v3 一节裁决：奶油暖橘作废，改用母版墨蓝） --- */
  --ty-bg:          #F7F8FB;   /* 页面底色 */
  --ty-card:        #FFFFFF;   /* 卡片底色 */
  --ty-nav-active:  #EEF2FE;   /* 菜单选中背景 */
  --ty-accent:      #3D5EE1;   /* 主色（按钮／选中／强调） */

  /* --- 1.2 主色派生（仅用于 hover/按下/描边，不进入主色板） --- */
  --ty-accent-soft: rgba(61, 94, 225, 0.10);  /* 母版 --primary-soft／.si-blue 淡色块 */
  --ty-accent-line: rgba(61, 94, 225, 0.24);
  --ty-accent-deep: #2E46B8;                  /* 主色按下／hover 加深 */
  --ty-accent-ink:  #3D5EE1;   /* 主色文字（淡色块之上、链接、文字按钮） */
  --ty-on-accent:   #FFFFFF;   /* 主色实底之上的文字 */

  /* --- 1.3 文字（母版实测三档，禁止纯黑） --- */
  --ty-ink:    #202C4B;        /* 标题／强调（深墨蓝） */
  --ty-ink-2:  #6A7287;        /* 主正文——母版出现 3288 次 */
  --ty-ink-3:  #838A9B;        /* 辅助小字 */
  --ty-ink-4:  #A6ACBC;        /* 占位符、禁用、分组标题 */

  /* --- 1.4 线与底（母版 --line / --line2 / thead） --- */
  --ty-line:   #E8EAED;        /* 卡片细边、分隔线——不可省 */
  --ty-line-2: #DCE1E9;        /* 控件描边、滚动条 */
  --ty-sunken: #FAFBFD;        /* 只读区、次级底 */
  --ty-th-bg:    #F8FAFC;      /* 表头底——拆解报告官网实测 */
  --ty-btn-2:    #F4F6FA;      /* 次按钮底——拆解报告官网实测 */
  --ty-row-hover: #F8FAFF;     /* 母版 tbody tr:hover */
  --ty-line-row: #F1F2F6;      /* 母版 tbody td 分割线 */
  --ty-scrim:  rgba(15, 23, 42, 0.42);

  /* --- 1.5 语义色（母版 .tg-* 取深色字，圆点取实色）+ 多色点缀 --- */
  --ty-ok:        #16A34A;  --ty-ok-soft:    rgba(26, 190, 23, 0.10);
  --ty-danger:    #DC2626;  --ty-danger-soft:rgba(232, 38, 70, 0.10);
  --ty-warn:      #B45309;  --ty-warn-soft:  rgba(234, 179, 0, 0.14);
  --ty-info:      #0F65CD;  --ty-info-soft:  rgba(15, 101, 205, 0.10);
  --ty-ok-solid:    #1ABE17;
  --ty-danger-solid:#E82646;
  --ty-warn-solid:  #EAB300;
  /* 图表／进度条多色（v3 2.2 图表配色，母版 .si-* / .hero / .track） */
  --ty-c-purple: #7B61FF;  --ty-c-pink:  #E83E8C;  --ty-c-teal: #02A8B5;
  --ty-c-blue2:  #8196EC;  --ty-c-blue3: #B1BEF3;  --ty-c-orange: #D97706;
  --ty-c-teal-ink: #0D9488;
  --ty-c-purple-soft: rgba(123, 97, 255, 0.12);
  --ty-c-pink-soft:   rgba(232, 62, 140, 0.12);
  --ty-c-teal-soft:   rgba(2, 168, 181, 0.12);
  --ty-c-orange-soft: rgba(234, 179, 0, 0.14);
  --ty-track:    #F0F2F7;      /* 进度条轨道 */

  /* --- 1.6 圆角（卡片 16px；按钮与标签按拆解报告官网实测，其余按母版） --- */
  --ty-radius:      16px;      /* 卡片 / 弹窗 */
  --ty-radius-btn:  12px;      /* 报告 .btn */
  --ty-radius-btn-sm: 10px;    /* 报告 .btn-sm */
  --ty-radius-badge: 4px;      /* 报告 .badge 实心／软底；胶囊走 --ty-radius-pill */
  --ty-radius-ctl:  9px;       /* 母版 .search / .nav-item / 输入控件 */
  --ty-radius-sm:   7px;       /* 母版 .pager .p / 分段切换 */
  --ty-radius-ava:  12px;      /* v3 §2.2：头像方形圆角 12px（常规／导航／大图） */
  --ty-radius-ava-table: 4px;  /* v3 §2.2：表格内小头像圆角 4px */
  --ty-radius-pill: 999px;

  /* --- 1.7 投影（母版 --shadow / --shadow-lift / .tool-panel） --- */
  --ty-shadow:      0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  --ty-shadow-pop:  0 14px 34px -14px rgba(15, 23, 42, 0.28);
  --ty-shadow-hover:0 12px 30px -12px rgba(15, 23, 42, 0.28);
  --ty-shadow-btn:   0 1px 2px rgba(15,23,42,.05), 0 6px 12px rgba(15,23,42,.08), 0 12px 24px rgba(15,23,42,.08);
  --ty-shadow-btn-2: 0 1px 2px rgba(15,23,42,.04), 0 4px 12px rgba(15,23,42,.05);
  --ty-lift-y:      -3px;      /* 母版 .card:hover 上浮 */

  /* --- 1.8 间距（v3 §2.1：卡片内边距 22px 24px、卡片间距 20；移动端 16 / 16） --- */
  --ty-pad-card: 24px;
  --ty-pad-card-y: 22px;
  --ty-gap-card: 20px;
  --ty-s1: 4px; --ty-s2: 8px; --ty-s3: 12px; --ty-s4: 16px;
  --ty-s5: 20px; --ty-s6: 24px; --ty-s8: 32px; --ty-s10: 40px;

  /* --- 1.9 字号层级（v3 §2.1：卡片标题 16/600、指标数字 26/700；§2.2：表头 12、表体 13） --- */
  --ty-f-page:   23px;  --ty-w-page:   700;   /* 页面大标题 */
  --ty-f-card:   16px;  --ty-w-card:   600;   /* 卡片标题 */
  --ty-f-body:   14px;                         /* 正文 */
  --ty-f-aux:    13px;                         /* 辅助标签小字 */
  --ty-f-mini:   12px;                         /* 用户卡角色行 / 表头 */
  --ty-f-num:    26px;                         /* 指标大数字 /700 */
  --ty-f-th:     12px;                         /* v3 §2.2 表头 */
  --ty-f-td:     13px;                         /* v3 §2.2 表体 */

  --ty-lh:        1.6;
  --ty-lh-tight:  1.35;

  /* --- 1.10 字体族 --- */
  --ty-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  --ty-font-num: "DIN Alternate", "Bahnschrift", "Helvetica Neue", var(--ty-font);

  /* --- 1.11 控件 / 图标 --- */
  --ty-ctl-h:   38px;          /* 母版 .search 38px */
  --ty-touch:   44px;          /* v3 九.6：所有可点击区域 ≥44px */
  --ty-stroke:  2px;           /* 全站图标线宽 */

  /* --- 1.12 结构尺寸（母版实测） --- */
  --ty-nav-w:      250px;      /* 母版 .sidebar */
  --ty-nav-w-fold: 76px;       /* 母版 #app.mini .sidebar */
  --ty-topbar-h:   66px;       /* 母版 .topbar / .logo */
  --ty-nav-item-h: 38px;       /* 母版 .nav-item */
  --ty-chart-h:    260px;      /* 图表默认高，可用类覆盖；卡片本体不写死高度 */
  --ty-ava-nav:    40px;      /* v3 §2.2：导航头像 */
  --ty-ava-list:   32px;      /* v3 §2.2：表格内头像（圆角走 --ty-radius-ava-table） */
  --ty-ava-side:   42px;      /* v3 §2.2：常规头像 */
  --ty-ava-xl:     64px;      /* v3 §2.2：大图（详情页人物卡） */

  /* --- 1.13 层级 --- */
  --ty-z-topbar: 50;
  --ty-z-nav:    60;
  --ty-z-scrim:  900;
  --ty-z-modal:  910;
  --ty-z-drawer: 920;
  --ty-z-toast:  950;

  /* --- 1.14 动效 --- */
  --ty-ease: cubic-bezier(.4, 0, .2, 1);
  --ty-dur:  .18s;
}

/* ==========================================================================
   2. 五套布局方案（规范分组2）——只切换变量，不复制组件样式
      默认(宽屏) / Mini(平板窄屏) / RTL(反向，国内默认关闭) / 盒子(卡片紧凑) / 黑暗(深色护眼)
   ========================================================================== */
/* 2.1 Mini：蒙氏教室平板、晨检平板——侧栏收成图标栏，密度提高 */
.ty-app[data-layout="mini"] {
  --ty-nav-w: var(--ty-nav-w-fold);
  --ty-pad-card: 16px;
  --ty-pad-card-y: 16px;
  --ty-gap-card: 14px;
  --ty-topbar-h: 52px;
  --ty-chart-h: 200px;
}
.ty-app[data-layout="mini"] .logo-text,
.ty-app[data-layout="mini"] .ty-nav__item__label,
.ty-app[data-layout="mini"] .ty-nav__group__label,
.ty-app[data-layout="mini"] .ty-nav__plus,
.ty-app[data-layout="mini"] .ty-nav__badge { display: none; }
.ty-app[data-layout="mini"] .logo-wrap { padding: 16px 12px; justify-content: center; }
.ty-app[data-layout="mini"] .ty-nav__item,
.ty-app[data-layout="mini"] .ty-nav__group__head { justify-content: center; padding-left: 0; padding-right: 0; }
.ty-app[data-layout="mini"] .sidebar-user-card { justify-content: center; padding: 12px; margin: 12px 8px; }
.ty-app[data-layout="mini"] .sidebar-user-card .name,
.ty-app[data-layout="mini"] .sidebar-user-card .role { display: none; }

/* 2.2 盒子：前台快速查阅——卡片紧凑、圆角收敛、间距压缩 */
.ty-app[data-layout="box"] {
  --ty-radius: 12px;
  --ty-pad-card: 16px;
  --ty-pad-card-y: 16px;
  --ty-gap-card: 12px;
  --ty-f-num: 22px;
}
.ty-app[data-layout="box"] .ty-card__head { margin: -16px -16px 12px; padding: 12px 16px; }

/* 2.3 黑暗：晚间值班护眼——照抄母版 #app.dark 变量组 */
.ty-app[data-layout="dark"] {
  --ty-bg:          #141A2E;
  --ty-card:        #1B2340;
  --ty-nav-active:  rgba(61, 94, 225, 0.20);
  --ty-accent:      #3D5EE1;
  --ty-accent-soft: rgba(61, 94, 225, 0.18);
  --ty-accent-line: rgba(61, 94, 225, 0.36);
  --ty-accent-deep: #5573EA;
  --ty-accent-ink:  #93A6F7;
  --ty-on-accent:   #FFFFFF;
  --ty-ink:         #E8ECF8;
  --ty-ink-2:       #A7B0C8;
  --ty-ink-3:       #7C87A3;
  --ty-ink-4:       #5E6880;
  --ty-line:        rgba(255, 255, 255, 0.08);
  --ty-line-2:      rgba(255, 255, 255, 0.14);
  --ty-line-row:    rgba(255, 255, 255, 0.06);
  --ty-sunken:      #171F38;
  --ty-row-hover:   rgba(61, 94, 225, 0.10);
  --ty-scrim:       rgba(0, 0, 0, 0.58);
  --ty-shadow:      0 1px 2px rgba(0, 0, 0, 0.30);
  --ty-shadow-pop:  0 14px 34px -10px rgba(0, 0, 0, 0.55);
  --ty-track:       rgba(255, 255, 255, 0.10);
  --ty-ok:          #5FD48A;  --ty-ok-soft:    rgba(26, 190, 23, 0.16);
  --ty-danger:      #FF7A8A;  --ty-danger-soft:rgba(232, 38, 70, 0.16);
  --ty-warn:        #F0C060;  --ty-warn-soft:  rgba(234, 179, 0, 0.18);
  --ty-info:        #7FB2F0;  --ty-info-soft:  rgba(15, 101, 205, 0.20);
  --ty-c-purple: #9C88FF;  --ty-c-pink:  #FF7FB5;  --ty-c-teal: #4FC8D4;
  --ty-c-blue2:  #8196EC;  --ty-c-blue3: #5C6FA8;  --ty-c-orange: #E9A94D;
  --ty-c-teal-ink: #4FC8D4;
  color-scheme: dark;
}
/* 深色态下把写死的白底控件收回卡片色（母版 #app.dark .topbar/.search/.btn 同法） */
.ty-app[data-layout="dark"] .ty-topbar,
.ty-app[data-layout="dark"] .ty-btn--secondary,
.ty-app[data-layout="dark"] .ty-btn--danger-ghost,
.ty-app[data-layout="dark"] .ty-input,
.ty-app[data-layout="dark"] .ty-select,
.ty-app[data-layout="dark"] .ty-textarea,
.ty-app[data-layout="dark"] .ty-check input,
.ty-app[data-layout="dark"] .ty-radio input,
.ty-app[data-layout="dark"] .ty-table th,
.ty-app[data-layout="dark"] .ty-table td { background: var(--ty-card); }
/* 黑暗态下白底图片/头像加一层描边，避免边界消失 */
.ty-app[data-layout="dark"] .ty-avatar { border: 1px solid var(--ty-line-2); }

/* 2.4 RTL：反向布局（多语备用，国内园默认关闭）——显式覆盖物理方向，不依赖逻辑属性 */
.ty-app[dir="rtl"] .ty-nav { border-right: 0; border-left: 1px solid var(--ty-line); }
.ty-app[dir="rtl"] .ty-nav__item.is-active::before { left: auto; right: 0; border-radius: var(--ty-radius-sm) 0 0 var(--ty-radius-sm); }
.ty-app[dir="rtl"] .ty-nav__plus { transform: scale(-1, 1); }
.ty-app[dir="rtl"] .ty-nav__item.is-open .ty-nav__plus { transform: scale(-1, 1) rotate(45deg); }
.ty-app[dir="rtl"] .ty-select { padding-right: var(--ty-s3); padding-left: 30px; background-position: left 10px center; }
.ty-app[dir="rtl"] .ty-search svg { left: auto; right: 10px; }
.ty-app[dir="rtl"] .ty-search .ty-input { padding-left: var(--ty-s3); padding-right: 32px; }
.ty-app[dir="rtl"] .ty-feature-card, .ty-app[dir="rtl"] .ty-timeline__item { border-left: 0; border-right: 4px solid var(--ty-accent); }
.ty-app[dir="rtl"] .ty-modal, .ty-app[dir="rtl"] .ty-card { direction: rtl; }
.ty-app[dir="rtl"] .ty-drawer { left: auto; right: 0; }

/* ==========================================================================
   3. 基线（仅作用于 .ty-app，未改造页面不受影响）
   ========================================================================== */
.ty-app {
  background: var(--ty-bg);
  color: var(--ty-ink);
  font-family: var(--ty-font);
  font-size: var(--ty-f-body);
  line-height: var(--ty-lh);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  min-height: 100vh;
  overflow-x: hidden;
}
.ty-app *, .ty-app *::before, .ty-app *::after { box-sizing: border-box; }
.ty-app img, .ty-app svg { max-width: 100%; }
.ty-app [hidden] { display: none !important; }
.ty-app ::selection { background: var(--ty-accent); color: var(--ty-on-accent); }
.ty-app button, .ty-app input, .ty-app select, .ty-app textarea { font-family: inherit; }
.ty-app a { color: var(--ty-accent-ink); text-decoration: none; }
.ty-app ::-webkit-scrollbar { width: 8px; height: 8px; }
.ty-app ::-webkit-scrollbar-thumb { background: var(--ty-line-2); border-radius: var(--ty-radius-pill); }
.ty-app ::-webkit-scrollbar-track { background: transparent; }
/* 键盘可达性：iOS14 无 :focus-visible，两级都写 */
.ty-app button:focus, .ty-app a:focus, .ty-app input:focus,
.ty-app select:focus, .ty-app textarea:focus { outline: none; }
.ty-app :focus-visible { box-shadow: 0 0 0 2px var(--ty-card), 0 0 0 4px var(--ty-accent); }

/* ==========================================================================
   4. 文字层级（规范 4.1.3）
   ========================================================================== */
.ty-page-title { font-size: var(--ty-f-page); font-weight: var(--ty-w-page); color: var(--ty-ink); line-height: var(--ty-lh-tight); margin: 0; }
.ty-card-title { font-size: var(--ty-f-card); font-weight: var(--ty-w-card);   color: var(--ty-ink); line-height: var(--ty-lh-tight); margin: 0; }
.ty-text     { font-size: var(--ty-f-body); font-weight: 400; color: var(--ty-ink); }
.ty-text-2   { font-size: var(--ty-f-body); color: var(--ty-ink-2); }
.ty-aux      { font-size: var(--ty-f-aux);  color: var(--ty-ink-3); }
.ty-mini     { font-size: var(--ty-f-mini); color: var(--ty-ink-3); }
.ty-placeholder-color { color: var(--ty-ink-4); }
.ty-strong   { font-weight: 600; color: var(--ty-ink); }
.ty-accent-text { color: var(--ty-accent-ink); }
.ty-num {
  font-family: var(--ty-font-num); font-size: var(--ty-f-num); font-weight: 700;
  color: var(--ty-ink); line-height: 1.15; font-variant-numeric: tabular-nums;
  white-space: nowrap;                    /* 规范 5.2-7：指标数字完整不截断 */
  word-break: keep-all;
}
.ty-num--lg  { font-size: calc(var(--ty-f-num) + 4px); }
.ty-num--sm  { font-size: calc(var(--ty-f-num) - 6px); }
.ty-money    { font-family: var(--ty-font-num); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ty-ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ty-clamp-2  { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ty-clamp-3  { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* ==========================================================================
   5. Logo 全局组件（规范 4.2：仅侧边栏顶部 + 登录卡片顶部两处；顶栏禁止放 Logo）
      样式按文档原样落地：容器透明，不加色块、阴影、描边
   ========================================================================== */
.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 24px 24px;
}
.logo-text {
  font-size: 20px;
  font-weight: 600;
  color: var(--ty-ink);        /* 母版 .logo-txt 用 --ink，旧奶油值 #3A3A3A 作废 */
  white-space: nowrap;
}
/* 图形 Logo：PC 侧边栏 32×32（展开/收起同尺寸），容器保持透明 */
.logo-mark { width: 32px; height: 32px; flex: none; display: block; background: transparent; border: 0; box-shadow: none; }
.logo-mark svg { width: 100%; height: 100%; display: block; }
/* 侧边栏顶部：图形 + 文字横向并排，切换按钮放在 Logo 右侧 */
.ty-nav .logo-wrap { flex: none; padding: var(--ty-s6) var(--ty-s6) var(--ty-s4); }
.ty-nav .logo-wrap .logo-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ty-nav__fold {
  appearance: none; flex: none; width: 28px; height: 28px; margin-left: auto;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--ty-line); border-radius: var(--ty-radius-sm);
  color: var(--ty-ink-3); cursor: pointer; transition: all var(--ty-dur) var(--ty-ease);
}
.ty-app[dir="rtl"] .ty-nav__fold { margin-left: 0; margin-right: auto; }
.ty-nav__fold:hover { background: var(--ty-accent-soft); color: var(--ty-accent-ink); border-color: var(--ty-accent-line); }
.ty-nav__fold svg { width: 16px; height: 16px; }
/* 收起窄栏：仅保留图形 Logo，文字隐藏（规范 4.2.1） */
.ty-nav.is-folded .logo-text, .ty-nav.is-folded .ty-nav__fold { display: none; }
.ty-nav.is-folded .logo-wrap { padding: var(--ty-s6) 0 var(--ty-s4); justify-content: center; }
/* 登录页：40×40 图形 + 22px/600 文字，居中横向 */
.login-logo-wrap { display: flex; align-items: center; justify-content: center; gap: 12px; }
.login-logo-wrap .logo-mark { width: 40px; height: 40px; }
.login-logo-wrap .logo-text { font-size: 22px; font-weight: 600; }
/* 移动端滑出侧边栏：32×32 + 18px 文字 */
@media (max-width: 768px) {
  .ty-nav .logo-text { font-size: 18px; }
  .ty-nav .logo-wrap { padding: var(--ty-s5) var(--ty-s5) var(--ty-s4); }
}

/* ==========================================================================
   6. 卡片（规范 4.1.1 / 4.1.2 固定结构模板）
   ========================================================================== */
.ty-card {
  background: var(--ty-card);
  border: 1px solid var(--ty-line);   /* 母版细边——v3 三件套，缺即不合格 */
  border-radius: var(--ty-radius);
  box-shadow: var(--ty-shadow);
  padding: var(--ty-pad-card-y) var(--ty-pad-card);
  min-width: 0;                 /* 卡片本体不写死高度 */
  transition: box-shadow var(--ty-dur) var(--ty-ease), transform var(--ty-dur) var(--ty-ease),
              border-color var(--ty-dur) var(--ty-ease);
}
/* Safari 经典 bug：border-radius + overflow:hidden 同元素时子元素溢出——用 mask 兜底 */
.ty-card--clip { overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(#fff, #000); }
.ty-card__head {
  display: flex; align-items: center; gap: var(--ty-s3);
  margin: calc(var(--ty-pad-card-y) * -1) calc(var(--ty-pad-card) * -1) var(--ty-s5);
  padding: var(--ty-pad-card-y) var(--ty-pad-card);
  border-bottom: 1px solid var(--ty-line);
  border-radius: var(--ty-radius) var(--ty-radius) 0 0;
}
.ty-card__title { flex: 1; min-width: 0; font-size: var(--ty-f-card); font-weight: var(--ty-w-card); color: var(--ty-ink); }
.ty-card__sub   { font-size: var(--ty-f-aux); color: var(--ty-ink-3); font-weight: 400; }
/* 右上角：设置齿轮 / 查看完整报告（规范 4.1.2 卡片顶部右侧动作位） */
.ty-card__actions { display: flex; align-items: center; gap: var(--ty-s2); flex: none; }
.ty-card__body { min-width: 0; }
.ty-card__foot { margin-top: var(--ty-s5); padding-top: var(--ty-s4); border-top: 1px solid var(--ty-line); font-size: var(--ty-f-aux); color: var(--ty-ink-3); }

/* 标题下方横向迷你指标组（规范 4.1.2 可选行） */
.ty-card__mini {
  display: flex; align-items: center; gap: var(--ty-s6); flex-wrap: wrap;
  margin: calc(var(--ty-s5) * -1) 0 var(--ty-s5); padding: var(--ty-s3) 0 0;
  border-bottom: 1px solid var(--ty-line);
}

/* 左侧强调竖线卡（异动/风险列表复用） */
.ty-feature-card {
  background: var(--ty-card); border: 1px solid var(--ty-line); border-radius: var(--ty-radius); box-shadow: var(--ty-shadow);
  padding: var(--ty-s5); border-left: 4px solid var(--ty-accent); min-width: 0;
}

/* ==========================================================================
   7. 指标组件三种固定形态（规范 4.1.6）
   ========================================================================== */
/* 7.1 迷你横向指标组：大数字 + 同比标签 */
.ty-metric {
  display: flex; align-items: flex-end; gap: var(--ty-s2);
  flex-wrap: wrap; min-width: 0;         /* 横向自动换行，不挤压 */
}
.ty-metric__label { font-size: var(--ty-f-aux); color: var(--ty-ink-3); width: 100%; order: -1; }
.ty-metric__value { font-family: var(--ty-font-num); font-size: var(--ty-f-num); font-weight: 700; color: var(--ty-ink); line-height: 1.15; white-space: nowrap; }
.ty-metric__unit  { font-size: var(--ty-f-aux); color: var(--ty-ink-3); }
.ty-metric__row   { display: flex; align-items: center; gap: var(--ty-s2); flex-wrap: wrap; }
/* KPI 卡（= 迷你横向指标的卡片形态，供仪表盘 6 卡位 / 10 卡位复用） */
.ty-kpi {
  background: var(--ty-card); border: 1px solid var(--ty-line); border-radius: var(--ty-radius); box-shadow: var(--ty-shadow);
  padding: 18px 20px; display: flex; align-items: flex-start; gap: 13px; min-width: 0;
  transition: box-shadow var(--ty-dur) var(--ty-ease), transform var(--ty-dur) var(--ty-ease);
}
.ty-kpi__ico {
  width: 42px; height: 42px; border-radius: var(--ty-radius-ava); flex: none;
  display: flex; align-items: center; justify-content: center;
  background: var(--ty-accent-soft); color: var(--ty-accent-ink);
}
.ty-kpi__ico svg { width: 21px; height: 21px; stroke-width: var(--ty-stroke); }
.ty-kpi__body { flex: 1; min-width: 0; }
.ty-kpi__label { font-size: 11.5px; font-weight: 500; color: var(--ty-ink-3); }
.ty-kpi__foot { margin-top: 6px; }
/* 母版 .si-*：多色淡色图标块 */
.ty-kpi__ico--accent { background: var(--ty-accent-soft); color: var(--ty-accent-ink); }
.ty-kpi__ico--info   { background: var(--ty-info-soft);   color: var(--ty-info); }
.ty-kpi__ico--warn   { background: var(--ty-warn-soft);   color: var(--ty-warn); }
.ty-kpi__ico--purple { background: var(--ty-c-purple-soft); color: var(--ty-c-purple); }
.ty-kpi__ico--pink   { background: var(--ty-c-pink-soft);   color: var(--ty-c-pink); }
.ty-kpi__ico--teal   { background: var(--ty-c-teal-soft);   color: var(--ty-c-teal-ink); }
.ty-kpi__ico--orange { background: var(--ty-c-orange-soft); color: var(--ty-c-orange); }
.ty-kpi__ico--ok     { background: var(--ty-ok-soft);       color: var(--ty-ok); }
.ty-kpi__ico--danger { background: var(--ty-danger-soft);   color: var(--ty-danger); }

/* 涨跌标签：↑绿、↓红、平稳灰（箭头用 2px 线条 SVG，禁止字符符号与 Emoji） */
.ty-trend {
  display: inline-flex; align-items: center; gap: 3px;
  height: 20px; padding: 0 7px; border-radius: var(--ty-radius-badge);
  font-size: var(--ty-f-mini); font-weight: 600; line-height: 1; white-space: nowrap;
  background: var(--ty-sunken); color: var(--ty-ink-3);       /* 平稳＝灰 */
}
.ty-trend svg { width: 12px; height: 12px; flex: none; }
.ty-trend--up   { background: var(--ty-ok-soft);     color: var(--ty-ok); }      /* ↑绿 */
.ty-trend--down { background: var(--ty-danger-soft); color: var(--ty-danger); }  /* ↓红 */
.ty-trend--flat { background: var(--ty-sunken);      color: var(--ty-ink-3); }   /* 平稳灰 */
/* 指标卡内可用宽度窄：涨跌标签允许折行，避免撑破卡片造成横向滚动 */
.ty-kpi .ty-trend { white-space: normal; height: auto; min-height: 20px; padding: 3px 7px; line-height: 1.3; }

/* 7.2 环形进度卡：中心大数字 + 说明 + 同比，细环形 */
.ty-ring { position: relative; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ty-ring__svg { transform: rotate(-90deg); display: block; }
.ty-ring__track { fill: none; stroke: var(--ty-line); stroke-width: 4; }   /* 细环形 */
.ty-ring__bar   { fill: none; stroke: var(--ty-accent); stroke-width: 4; stroke-linecap: round; transition: stroke-dasharray .3s var(--ty-ease); }
.ty-ring--ok   .ty-ring__bar { stroke: var(--ty-ok); }
.ty-ring--danger .ty-ring__bar { stroke: var(--ty-danger); }
.ty-ring__center { position: absolute; top: 0; right: 0; bottom: 0; left: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ty-ring__value  { font-family: var(--ty-font-num); font-size: 20px; font-weight: 700; color: var(--ty-ink); line-height: 1.1; }
.ty-ring__label  { font-size: var(--ty-f-mini); color: var(--ty-ink-3); margin-top: 2px; }
.ty-ring-wrap { display: flex; align-items: center; gap: var(--ty-s4); flex-wrap: wrap; min-width: 0; }

/* 7.3 排行列表卡：序号 + 圆形图标 + 名称 + 标签 + 进度条 + 数值 */
.ty-rank { display: flex; flex-direction: column; }
.ty-rank__item {
  display: flex; align-items: center; gap: var(--ty-s3);
  padding: var(--ty-s3) 0; border-bottom: 1px solid var(--ty-line); min-width: 0;
}
.ty-rank__item:last-child { border-bottom: 0; }
.ty-rank__no { width: 20px; flex: none; font-family: var(--ty-font-num); font-size: var(--ty-f-aux); font-weight: 700; color: var(--ty-ink-4); text-align: center; }
.ty-rank__item:nth-child(1) .ty-rank__no { color: var(--ty-accent-deep); }
.ty-rank__ico { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--ty-accent-soft); color: var(--ty-accent-ink); }
.ty-rank__ico svg { width: 15px; height: 15px; }
.ty-rank__name { flex: 1; min-width: 0; font-size: var(--ty-f-body); color: var(--ty-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-rank__bar  { flex: 1.2; min-width: 60px; height: 6px; border-radius: var(--ty-radius-pill); background: var(--ty-line); overflow: hidden; }
.ty-rank__fill { display: block; height: 100%; border-radius: var(--ty-radius-pill); background: var(--ty-accent); }
.ty-rank__fill--danger { background: var(--ty-danger); }
.ty-rank__fill--ok     { background: var(--ty-ok); }
.ty-rank__value { flex: none; font-family: var(--ty-font-num); font-size: var(--ty-f-body); font-weight: 600; color: var(--ty-ink); white-space: nowrap; }

/* ==========================================================================
   8. 时间线 / 消息组件（规范 4.1.7）
   ========================================================================== */
.ty-timeline { display: flex; flex-direction: column; }
.ty-timeline__item {
  display: flex; align-items: flex-start; gap: var(--ty-s3);
  padding: var(--ty-s4) 0; border-bottom: 1px solid var(--ty-line); min-width: 0;
}
.ty-timeline__item:last-child { border-bottom: 0; }
.ty-timeline__ico { width: 28px; height: 28px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; background: var(--ty-ok-soft); color: var(--ty-ok); }
.ty-timeline__ico svg { width: 15px; height: 15px; }
.ty-timeline__ico--danger { background: var(--ty-danger-soft); color: var(--ty-danger); }
.ty-timeline__ico--warn   { background: var(--ty-warn-soft);   color: var(--ty-warn); }
.ty-timeline__ico--accent { background: var(--ty-accent-soft); color: var(--ty-accent-ink); }
.ty-timeline__body { flex: 1; min-width: 0; }
.ty-timeline__title { font-size: var(--ty-f-body); font-weight: 600; color: var(--ty-ink); }
.ty-timeline__desc  { font-size: var(--ty-f-aux); color: var(--ty-ink-3); margin-top: 2px; }
.ty-timeline__side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ty-timeline__time { font-size: var(--ty-f-mini); color: var(--ty-ink-4); white-space: nowrap; }
/* 软底状态标签（拆解报告实测：圆角 4px、同色淡底 + 深字 + 左侧 6px 小圆点） */
.ty-badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--ty-radius-badge); font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: var(--ty-accent-soft); color: var(--ty-accent-ink); border: 0;
}
.ty-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; flex: none; background: currentColor; }
.ty-badge--red,
.ty-badge--danger { background: var(--ty-danger-soft); color: var(--ty-danger); }
.ty-badge--green,
.ty-badge--ok     { background: var(--ty-ok-soft);     color: var(--ty-ok); }
.ty-badge--grey   { background: var(--ty-sunken);      color: var(--ty-ink-3); }
.ty-badge--warn,
.ty-badge--orange { background: var(--ty-warn-soft);   color: var(--ty-warn); }
.ty-badge--blue   { background: var(--ty-accent-soft); color: var(--ty-accent); }
.ty-badge--purple { background: var(--ty-c-purple-soft); color: var(--ty-c-purple); }
.ty-badge--cyan   { background: var(--ty-c-teal-soft); color: var(--ty-c-teal-ink); }

/* 消息行（家园消息、待回复列表复用） */
.ty-msg {
  display: flex; align-items: center; gap: var(--ty-s3);
  padding: var(--ty-s3) 0; border-bottom: 1px solid var(--ty-line); min-width: 0;
}
.ty-msg:last-child { border-bottom: 0; }
.ty-msg__body { flex: 1; min-width: 0; }
.ty-msg__from { font-size: var(--ty-f-body); font-weight: 600; color: var(--ty-ink); }
.ty-msg__text { font-size: var(--ty-f-aux); color: var(--ty-ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-msg__time { font-size: var(--ty-f-mini); color: var(--ty-ink-4); flex: none; }

/* ==========================================================================
   9. 图表容器（规范 4.1.8）——禁止写死 px 高度，比例容器兜底
   ========================================================================== */
.ty-chart { position: relative; width: 100%; height: var(--ty-chart-h); min-width: 0; overflow: hidden; }
.ty-chart--ratio { height: 0; padding-bottom: 56.25%; }        /* 16:9 自适应，不用固定 px */
.ty-chart--ratio > canvas, .ty-chart--ratio > .ty-chart__inner { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
/* 图例：优先卡片右侧，空间不足自动下移 */
.ty-chart-wrap { display: flex; align-items: stretch; gap: var(--ty-s5); flex-wrap: wrap; min-width: 0; }
.ty-chart-wrap .ty-chart { flex: 1 1 320px; min-width: 0; }
.ty-legend { display: flex; flex-direction: column; gap: var(--ty-s2); flex: 0 1 150px; min-width: 120px; align-self: center; }
.ty-legend__item { display: flex; align-items: center; gap: var(--ty-s2); font-size: var(--ty-f-aux); color: var(--ty-ink-2); }
.ty-legend__dot { width: 10px; height: 10px; border-radius: 3px; flex: none; background: var(--ty-accent); }
/* tooltip：圆角 */
.ty-chart__tip {
  position: absolute; z-index: 2; pointer-events: none; opacity: 0;
  background: var(--ty-ink); color: #fff; font-size: var(--ty-f-mini); line-height: 1.5;
  padding: 7px 10px; border-radius: var(--ty-radius-sm); box-shadow: var(--ty-shadow-pop);
  transform: translate(-50%, -100%); white-space: nowrap; transition: opacity var(--ty-dur) var(--ty-ease);
}
.ty-chart__tip.is-on { opacity: 1; }
/* 图表周期筛选 + 右上齿轮（规范：图表自带周期筛选与设置入口） */
.ty-chart__tools { display: flex; align-items: center; gap: var(--ty-s2); flex: none; }

/* ==========================================================================
   10. 头像（v3 §2.2：常规 42／导航 40／表格内 32（圆角 4）／大图 64；方形圆角，禁止 50% 圆形）
   ========================================================================== */
.ty-avatar {
  width: var(--ty-ava-nav); height: var(--ty-ava-nav); border-radius: var(--ty-radius-ava); flex: none;
  overflow: hidden; background: var(--ty-accent-soft); color: var(--ty-accent-ink);
  display: flex; align-items: center; justify-content: center; font-weight: 600;
}
.ty-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ty-avatar svg { width: 55%; height: 55%; }
.ty-avatar--list { width: var(--ty-ava-list); height: var(--ty-ava-list); border-radius: var(--ty-radius-ava-table); font-size: 13px; }
.ty-avatar--side { width: var(--ty-ava-side); height: var(--ty-ava-side); font-size: 14px; }
.ty-avatar--sm { width: 28px; height: 28px; border-radius: var(--ty-radius-ava-table); }
.ty-avatar--xl { width: var(--ty-ava-xl); height: var(--ty-ava-xl); border-radius: var(--ty-radius-ava); font-size: 20px; }
.ty-avatar--xl svg { width: 50%; height: 50%; }
.ty-avatar--stacked { border: 2px solid var(--ty-card); }

/* ==========================================================================
   11. 顶部导航栏（规范 4.1.5）
      顺序：周期/学年下拉 → 快捷图标组（暗色、加号、通知、消息、九宫格）→ 头像下拉
      纯白背景、通知小圆角红点、禁止放置 Logo
   ========================================================================== */
.ty-topbar {
  display: flex; align-items: center; gap: var(--ty-s3);
  height: var(--ty-topbar-h); padding: 0 var(--ty-s6);
  background: #FFFFFF; border-bottom: 1px solid var(--ty-line);
  position: sticky; top: 0; z-index: var(--ty-z-topbar); flex: none;
}
.ty-topbar__period { flex: none; }
.ty-topbar__page   { flex: 1; min-width: 0; font-size: var(--ty-f-page); font-weight: var(--ty-w-page); color: var(--ty-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ty-topbar__tools  { display: flex; align-items: center; gap: var(--ty-s1); flex: none; margin-left: auto; }
.ty-topbar__user   { display: flex; align-items: center; gap: var(--ty-s2); flex: none; cursor: pointer; background: transparent; border: 0; padding: 4px; border-radius: var(--ty-radius-ctl); }
.ty-topbar__user:hover { background: var(--ty-accent-soft); }
.ty-topbar__user .ty-avatar { width: var(--ty-ava-nav); height: var(--ty-ava-nav); border-radius: var(--ty-radius-ava); }
.ty-topbar__menu {
  position: absolute; top: calc(100% - 6px); right: var(--ty-s6); min-width: 200px; z-index: var(--ty-z-nav);
  background: var(--ty-card); border: 1px solid var(--ty-line); border-radius: var(--ty-radius);
  box-shadow: var(--ty-shadow-pop); padding: var(--ty-s2); display: none;
}
.ty-topbar__menu.is-open { display: block; }
.ty-topbar__menu button { display: flex; align-items: center; gap: var(--ty-s2); width: 100%; text-align: left; appearance: none; border: 0; background: transparent; font: inherit; font-size: var(--ty-f-body); color: var(--ty-ink-2); padding: 10px var(--ty-s3); border-radius: var(--ty-radius-sm); cursor: pointer; min-height: var(--ty-touch); }
.ty-topbar__menu button:hover { background: var(--ty-accent-soft); color: var(--ty-ink); }
.ty-topbar__menu svg { width: 16px; height: 16px; }
/* 图标按钮 + 通知小圆角红点 */
.ty-icon-btn {
  appearance: none; width: var(--ty-touch); height: var(--ty-touch); position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px solid transparent; border-radius: var(--ty-radius-ctl);
  color: var(--ty-ink-2); cursor: pointer; transition: all var(--ty-dur) var(--ty-ease);
}
.ty-icon-btn:hover { background: var(--ty-accent-soft); color: var(--ty-accent-ink); }
.ty-icon-btn svg { width: 20px; height: 20px; stroke-width: var(--ty-stroke); }
.ty-dot {
  position: absolute; top: 8px; right: 8px; min-width: 8px; height: 8px;
  border-radius: var(--ty-radius-sm); background: var(--ty-danger); border: 1px solid #FFFFFF;
}
.ty-dot--num { top: 4px; right: 2px; min-width: 16px; height: 16px; border-radius: var(--ty-radius-pill); font-size: 10px; font-weight: 700; color: #fff; line-height: 16px; text-align: center; font-family: var(--ty-font-num); }
.ty-hamburger { display: none; }

/* ==========================================================================
   12. 侧边导航菜单（规范 4.1.4）
      分组标题浅色小字 · 2px 线条 SVG 图标 · 折叠展开「+」号
      选中态：#EEF2FE 背景 + 左侧 3px #3D5EE1 竖线 · 底部固定独立用户卡片
   ========================================================================== */
.ty-nav {
  width: var(--ty-nav-w); flex: none; display: flex; flex-direction: column;
  background: var(--ty-card); border-right: 1px solid var(--ty-line);
  height: 100vh; position: sticky; top: 0; z-index: var(--ty-z-nav); min-height: 0;
}
.ty-nav__scroll { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0 var(--ty-s3) var(--ty-s4); }
.ty-nav__foot { flex: none; }

/* 分组标题：浅色小字，可点折叠 */
.ty-nav__group { margin-top: var(--ty-s1); }
.ty-nav__group__head {
  appearance: none; width: 100%; display: flex; align-items: center; gap: var(--ty-s2);
  background: transparent; border: 0; cursor: pointer; font: inherit; text-align: left;
  padding: var(--ty-s2) var(--ty-s3); border-radius: var(--ty-radius-sm);
  color: var(--ty-ink-3); min-height: 36px;
}
.ty-nav__group__head:hover { background: var(--ty-sunken); color: var(--ty-ink-2); }
.ty-nav__group__label { flex: 1; min-width: 0; font-size: var(--ty-f-aux); font-weight: 600; letter-spacing: .2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 折叠展开「+」号：展开后旋转 45° 成 ×，符合"加号折叠"交互且不引入字符图标 */
.ty-nav__plus { width: 14px; height: 14px; flex: none; color: var(--ty-ink-4); transition: transform var(--ty-dur) var(--ty-ease); }
.ty-nav__group__head.is-open .ty-nav__plus { transform: rotate(45deg); color: var(--ty-accent-deep); }
.ty-nav__items { display: none; flex-direction: column; gap: 2px; padding: 2px 0 var(--ty-s1); }
.ty-nav__group__head.is-open + .ty-nav__items { display: flex; }

.ty-nav__item {
  appearance: none; width: 100%; position: relative;
  display: flex; align-items: center; gap: var(--ty-s3); text-align: left;
  background: transparent; border: 0; cursor: pointer; font: inherit;
  padding: 0 var(--ty-s3); min-height: 40px; border-radius: var(--ty-radius-sm);
  color: var(--ty-ink-2); font-size: var(--ty-f-body);
  transition: background-color var(--ty-dur) var(--ty-ease), color var(--ty-dur) var(--ty-ease);
}
.ty-nav__item:hover { background: var(--ty-sunken); color: var(--ty-ink); }
.ty-nav__item.is-active { background: var(--ty-nav-active); color: var(--ty-accent-ink); font-weight: 600; }
.ty-nav__item.is-active::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px;
  background: var(--ty-accent); border-radius: 0 var(--ty-radius-sm) var(--ty-radius-sm) 0;
}
.ty-nav__ico { width: 18px; height: 18px; flex: none; stroke-width: var(--ty-stroke); color: var(--ty-ink-3); }
.ty-nav__item.is-active .ty-nav__ico { color: var(--ty-accent-ink); }
.ty-nav__item__label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 菜单右侧：数字徽标 / 圆点（禁止 Emoji） */
.ty-nav__badge {
  flex: none; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--ty-radius-pill);
  background: var(--ty-accent); color: var(--ty-on-accent); font-size: var(--ty-f-mini);
  font-weight: 700; line-height: 20px; text-align: center; font-family: var(--ty-font-num);
}
.ty-nav__badge.is-alert { background: var(--ty-danger); color: #fff; }
.ty-nav__badge.is-todo  { background: var(--ty-sunken); color: var(--ty-ink-4); font-weight: 500; }
.ty-nav__dot { flex: none; width: 6px; height: 6px; border-radius: 50%; background: var(--ty-accent-deep); }
/* 布局模式分组内的单选（默认/Mini/RTL/盒子/黑暗） */
.ty-nav__item .ty-nav__radio { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--ty-line-2); flex: none; }
.ty-nav__item.is-active .ty-nav__radio { border-color: var(--ty-accent); background: var(--ty-accent); box-shadow: inset 0 0 0 3px var(--ty-card); }
/* PC 侧栏收起窄栏 */
.ty-nav.is-folded { width: var(--ty-nav-w-fold); }
.ty-nav.is-folded .ty-nav__item__label,
.ty-nav.is-folded .ty-nav__group__label,
.ty-nav.is-folded .ty-nav__plus,
.ty-nav.is-folded .ty-nav__badge,
.ty-nav.is-folded .ty-nav__dot { display: none; }
.ty-nav.is-folded .ty-nav__item,
.ty-nav.is-folded .ty-nav__group__head { justify-content: center; padding-left: 0; padding-right: 0; }
.ty-nav.is-folded .sidebar-user-card { justify-content: center; margin: var(--ty-s4) var(--ty-s2); padding: var(--ty-s3); }
.ty-nav.is-folded .sidebar-user-card .name,
.ty-nav.is-folded .sidebar-user-card .role { display: none; }

/* 侧边栏最底部固定独立用户卡片——照抄母版 .user（原奶油规范 48px 圆头像版作废） */
.sidebar-user-card {
  background: var(--ty-card);
  border: 1px solid var(--ty-line);
  border-radius: var(--ty-radius-ava);
  padding: 11px;
  margin: 0 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: none;
}
.sidebar-user-card .avatar {
  width: var(--ty-ava-side);
  height: var(--ty-ava-side);
  border-radius: var(--ty-radius-ava);
}
.sidebar-user-card .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--ty-ink);
}
.sidebar-user-card .role {
  font-size: 11px;
  color: var(--ty-ink-3);
}
.sidebar-user-card .ty-nav__body { flex: 1; min-width: 0; }
.sidebar-user-card .name, .sidebar-user-card .role { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-card .ty-nav__foldout { flex: none; }
.ty-app[data-layout="dark"] .sidebar-user-card, .ty-app[data-layout="dark"] .ty-topbar { background: var(--ty-card); }
@media (max-width: 768px) {
  .sidebar-user-card { margin: var(--ty-s4); }
}

/* 移动端滑出抽屉 + 遮罩 */
.ty-nav__scrim {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; background: var(--ty-scrim);
  z-index: calc(var(--ty-z-scrim)); opacity: 0; pointer-events: none;
  transition: opacity var(--ty-dur) var(--ty-ease);
}
.ty-nav__scrim.is-open { opacity: 1; pointer-events: auto; }

/* ==========================================================================
   13. 按钮 & 控件（规范 4.4）
   ========================================================================== */
.ty-btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: var(--ty-s2);
  padding: 11px 14px;                 /* 拆解报告：高度靠 padding 撑，不写死 */
  font-size: var(--ty-f-body); font-weight: 600; line-height: 1; white-space: nowrap;
  border-radius: var(--ty-radius-btn); border: 1px solid transparent; background: transparent; color: var(--ty-ink);
  cursor: pointer; user-select: none;
  transition: background-color var(--ty-dur) var(--ty-ease), border-color var(--ty-dur) var(--ty-ease),
              color var(--ty-dur) var(--ty-ease), box-shadow var(--ty-dur) var(--ty-ease), transform var(--ty-dur) var(--ty-ease);
}
.ty-btn svg { width: 16px; height: 16px; flex: none; stroke-width: var(--ty-stroke); }
.ty-btn:active { transform: translateY(1px); }
/* 主按钮：主色 #3D5EE1，三层阴影（拆解报告实测） */
.ty-btn--primary { background: var(--ty-accent); color: var(--ty-on-accent); border-color: var(--ty-accent);
  box-shadow: var(--ty-shadow-btn); }
.ty-btn--primary:hover { background: var(--ty-accent-deep); border-color: var(--ty-accent-deep); }
/* 次要按钮：淡灰底 #F4F6FA + 深墨蓝字 + 双层淡阴影 */
.ty-btn--secondary { background: var(--ty-btn-2); color: var(--ty-ink); border-color: transparent; box-shadow: var(--ty-shadow-btn-2); }
.ty-btn--secondary:hover { background: var(--ty-sunken); color: var(--ty-ink); border-color: var(--ty-accent-line); }
/* 文字按钮 */
.ty-btn--text { background: transparent; color: var(--ty-accent-ink); padding: 11px var(--ty-s2); border-color: transparent; }
.ty-btn--text:hover { background: var(--ty-accent-soft); }
/* 危险 / 危险次级 */
.ty-btn--danger { background: var(--ty-danger); color: #fff; border-color: var(--ty-danger); }
.ty-btn--danger:hover { filter: brightness(.95); }
.ty-btn--danger-ghost { background: #FFFFFF; color: var(--ty-danger); border-color: var(--ty-line-2); }
.ty-btn--danger-ghost:hover { background: var(--ty-danger-soft); border-color: var(--ty-danger); }
/* 尺寸 */
.ty-btn--sm { padding: 8px 12px; font-size: var(--ty-f-aux); border-radius: var(--ty-radius-btn-sm); }.ty-btn--sm svg { width: 14px; height: 14px; }
.ty-btn--lg { height: var(--ty-touch); padding: 0 var(--ty-s6); }

/* ==========================================================================
   13.5 状态标记（契约 §12 三端状态可视化 / §14 图表规格：状态类只在这里定义，页面不写内联配色）
   ========================================================================== */
.ty-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: var(--ty-f-mini, 12px); font-weight: 600; border: 1px solid var(--ty-line, #E8EAED); background: var(--ty-sunken, #FAFBFD); color: var(--ty-ink-2, #6A7287); }
.ty-chip b { font-weight: 700; }
.ty-chip--ok { background: rgba(22, 163, 74, .10); border-color: rgba(22, 163, 74, .28); color: #15803D; }
.ty-chip--warn { background: rgba(180, 83, 9, .10); border-color: rgba(180, 83, 9, .28); color: #B45309; }
.ty-chip--bad { background: rgba(220, 38, 38, .09); border-color: rgba(220, 38, 38, .26); color: #B91C1C; }
.ty-chip--none { background: #FFFFFF; border-color: var(--ty-line, #E8EAED); color: var(--ty-ink-4, #A6ACBC); }
.ty-chip--pend { background: rgba(61, 94, 225, .09); border-color: rgba(61, 94, 225, .24); color: var(--ty-accent, #3D5EE1); }
.ty-btn--block { display: flex; width: 100%; }
.ty-btn--icon { width: var(--ty-ctl-h); height: var(--ty-ctl-h); padding: 0; }
.ty-btn--icon.ty-btn--sm { width: 32px; height: 32px; }
.ty-btn:disabled, .ty-btn[disabled], .ty-btn.is-disabled { opacity: .55; cursor: not-allowed; transform: none; background: var(--ty-sunken); color: var(--ty-ink-4); border-color: var(--ty-line); }
.ty-btn-group { display: inline-flex; align-items: center; gap: var(--ty-s2); flex-wrap: wrap; }
/* 点击热区：视觉尺寸不变，可点范围补足到 44px（规范：所有可点击区域 ≥44px） */
.ty-btn, .ty-seg > button, .ty-pager button, .ty-nav__item, .ty-nav__group__head { position: relative; }
.ty-btn::after, .ty-seg > button::after, .ty-pager button::after,
.ty-nav__item::after, .ty-nav__group__head::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%; height: var(--ty-touch);
  transform: translateY(-50%);
}
.ty-btn:disabled::after, .ty-btn.is-disabled::after, .ty-pager button[disabled]::after { display: none; }
.ty-topbar__period .ty-select { height: var(--ty-touch); min-height: var(--ty-touch); }
/* 分段切换（周期/学年等） */
.ty-seg { display: inline-flex; align-items: center; gap: 3px; padding: 3px; background: var(--ty-sunken); border: 1px solid var(--ty-line); border-radius: var(--ty-radius-ctl); flex-wrap: wrap; }
.ty-seg > button { appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit; font-size: var(--ty-f-aux); color: var(--ty-ink-2); padding: 0 var(--ty-s3); height: 30px; border-radius: var(--ty-radius-sm); min-height: 30px; }
.ty-seg > button.is-active { background: var(--ty-card); color: var(--ty-accent-ink); font-weight: 600; box-shadow: var(--ty-shadow); }

/* 输入框 / 下拉 / 日期 / 单选 / 复选 / 开关（全站统一） */
.ty-input, .ty-select, .ty-textarea {
  width: 100%; font-size: var(--ty-f-body); color: var(--ty-ink);
  background: #FFFFFF; border: 1px solid var(--ty-line-2); border-radius: var(--ty-radius-ctl);
  height: var(--ty-ctl-h); min-height: var(--ty-ctl-h); padding: 0 var(--ty-s3);
  transition: border-color var(--ty-dur) var(--ty-ease), box-shadow var(--ty-dur) var(--ty-ease), background-color var(--ty-dur) var(--ty-ease);
  -webkit-appearance: none; appearance: none;
}
.ty-textarea { height: auto; min-height: 92px; padding: var(--ty-s3); line-height: var(--ty-lh); resize: vertical; }
.ty-input::-webkit-input-placeholder, .ty-textarea::-webkit-input-placeholder { color: var(--ty-ink-4); }
.ty-input::placeholder, .ty-textarea::placeholder { color: var(--ty-ink-4); }
.ty-input:hover, .ty-select:hover, .ty-textarea:hover { border-color: var(--ty-accent-line); }
.ty-input:focus, .ty-select:focus, .ty-textarea:focus { border-color: var(--ty-accent); box-shadow: 0 0 0 3px var(--ty-accent-soft); }
.ty-select {
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23838A9B' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.ty-input[type="date"], .ty-input[type="time"] { min-width: 0; }
.ty-input.is-error, .ty-select.is-error, .ty-textarea.is-error { border-color: var(--ty-danger); }
.ty-input:disabled, .ty-select:disabled, .ty-textarea:disabled { background: var(--ty-sunken); color: var(--ty-ink-4); cursor: not-allowed; }
.ty-input--sm { height: 32px; min-height: 32px; font-size: var(--ty-f-aux); }
.ty-readonly { min-height: var(--ty-ctl-h); padding: 9px var(--ty-s3); background: var(--ty-sunken); border: 1px solid var(--ty-line); border-radius: var(--ty-radius-ctl); color: var(--ty-ink); font-size: var(--ty-f-body); }

.ty-check, .ty-radio { display: inline-flex; align-items: center; gap: var(--ty-s2); font-size: var(--ty-f-body); color: var(--ty-ink-2); cursor: pointer; min-height: var(--ty-touch); }
.ty-check input, .ty-radio input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; flex: none; border: 1px solid var(--ty-line-2); background: #FFFFFF; cursor: pointer; transition: all var(--ty-dur) var(--ty-ease); }
.ty-check input { border-radius: 5px; }
.ty-radio input { border-radius: 50%; }
.ty-check input:checked {
  background-color: var(--ty-accent); border-color: var(--ty-accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23FFFFFF' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: center;
}
.ty-radio input:checked { border-color: var(--ty-accent); border-width: 5px; }
.ty-check input:disabled, .ty-radio input:disabled { opacity: .5; cursor: not-allowed; }

.ty-switch { display: inline-flex; align-items: center; gap: var(--ty-s2); cursor: pointer; font-size: var(--ty-f-body); color: var(--ty-ink-2); min-height: var(--ty-touch); }
.ty-switch input {
  appearance: none; -webkit-appearance: none; width: 44px; height: 24px; margin: 0; flex: none; position: relative;
  border-radius: var(--ty-radius-pill); background: var(--ty-line-2); cursor: pointer; border: 0;
  transition: background-color var(--ty-dur) var(--ty-ease);
}
.ty-switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #FFFFFF; box-shadow: var(--ty-shadow); transition: transform var(--ty-dur) var(--ty-ease); }
.ty-switch input:checked { background: var(--ty-accent); }
.ty-switch input:checked::after { transform: translateX(20px); }

.ty-search { position: relative; display: inline-flex; align-items: center; flex: 1 1 180px; min-width: 0; max-width: 320px; }
.ty-search svg { position: absolute; left: 11px; width: 16px; height: 16px; color: var(--ty-ink-4); pointer-events: none; stroke-width: var(--ty-stroke); }
.ty-search .ty-input { padding-left: 34px; }

/* 标签 / 状态点（拆解报告实测圆角 4px） */
.ty-tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: var(--ty-radius-badge); font-size: 11px; font-weight: 600; line-height: 1.2; white-space: nowrap;
  background: var(--ty-sunken); color: var(--ty-ink-3); border: 0;
}
/* 母版 .tag i：左侧 6px 同色小圆点 */
.ty-tag__dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: currentColor; }
.ty-tag--accent { background: var(--ty-accent-soft); color: var(--ty-accent-ink); border-color: var(--ty-accent-line); }
.ty-tag--ok     { background: var(--ty-ok-soft);     color: var(--ty-ok);     border-color: transparent; }
.ty-tag--warn   { background: var(--ty-warn-soft);   color: var(--ty-warn);   border-color: transparent; }
.ty-tag--danger { background: var(--ty-danger-soft); color: var(--ty-danger); border-color: transparent; }
.ty-tag--info   { background: var(--ty-info-soft);   color: var(--ty-info);   border-color: transparent; }
.ty-tag svg { width: 12px; height: 12px; }

/* Toast：全站统一（禁止 Emoji，成功/失败用线条 SVG + 色底） */
.ty-toast {
  position: fixed; left: 50%; bottom: 28px; z-index: var(--ty-z-toast);
  transform: translate(-50%, 8px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: var(--ty-s2); max-width: 90vw;
  background: var(--ty-ink); color: #fff; font-size: var(--ty-f-aux);
  padding: 11px var(--ty-s5); border-radius: var(--ty-radius-pill); box-shadow: var(--ty-shadow-pop);
  transition: opacity var(--ty-dur) var(--ty-ease), transform var(--ty-dur) var(--ty-ease);
}
.ty-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ty-toast svg { width: 16px; height: 16px; flex: none; }
.ty-toast--ok    { background: var(--ty-ok); }
.ty-toast--error { background: var(--ty-danger); }
.ty-toast--warn  { background: var(--ty-warn); }

/* 空态 / 骨架 / 分割（空态用线条 SVG 占位图，禁止 Emoji） */
.ty-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--ty-s2); padding: var(--ty-s10) var(--ty-s4); text-align: center; color: var(--ty-ink-3); }
.ty-empty svg { width: 48px; height: 48px; color: var(--ty-line-2); stroke-width: var(--ty-stroke); }
.ty-empty__title { font-size: var(--ty-f-body); color: var(--ty-ink-2); }
.ty-empty__hint  { font-size: var(--ty-f-aux); color: var(--ty-ink-4); }
/* 上传占位图标：独立于空态，跟随强调色 */
.ty-empty__ico { width: 34px; height: 34px; color: var(--ty-accent-ink); }
.ty-skeleton { background: linear-gradient(90deg, var(--ty-sunken) 30%, var(--ty-line) 50%, var(--ty-sunken) 70%); background-size: 200% 100%; animation: ty-skeleton 1.2s infinite linear; border-radius: var(--ty-radius-sm); height: 14px; }
.ty-divider { height: 1px; background: var(--ty-line); border: 0; margin: var(--ty-s5) 0; }
@keyframes ty-skeleton { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@keyframes ty-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ty-pop  { from { opacity: 0; transform: translateY(8px) scale(.985); } to { opacity: 1; transform: none; } }

/* 面包屑 */
.ty-crumb { display: flex; align-items: center; gap: 6px; font-size: var(--ty-f-aux); color: var(--ty-ink-3); flex-wrap: wrap; }
.ty-crumb svg { width: 13px; height: 13px; color: var(--ty-ink-4); }
.ty-crumb__cur { color: var(--ty-ink); font-weight: 600; }

/* ==========================================================================
   14. 布局骨架 + 栅格（Grid 为主，Flex 降级兜底——规范 5.3-1）
   ========================================================================== */
.ty-shell { display: flex; align-items: stretch; min-height: 100vh; background: var(--ty-bg); }
.ty-main  { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ty-content { flex: 1; min-width: 0; padding: var(--ty-s6); }
.ty-two-col { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: var(--ty-gap-card); align-items: start; }
.ty-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: var(--ty-gap-card); }
.ty-grid--kpi { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.ty-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ty-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ty-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ty-grid--6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.ty-grid--7 { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--ty-s2); }
.ty-grid > * { min-width: 0; }
.ty-col { display: flex; flex-direction: column; gap: var(--ty-gap-card); min-width: 0; }
.ty-flex { display: flex; align-items: center; gap: var(--ty-s3); flex-wrap: wrap; min-width: 0; }
.ty-flex--tight { gap: var(--ty-s2); }
.ty-flex--between { justify-content: space-between; }
.ty-flex--end { justify-content: flex-end; }
.ty-flex--top { align-items: flex-start; }
.ty-flex--col { flex-direction: column; align-items: stretch; }
.ty-spacer { flex: 1; min-width: 0; }
/* Grid 不可用时的 Flex 降级（老内核 Safari / 微信内置浏览器兜底） */
@supports not (display: grid) {
  .ty-grid, .ty-grid--2, .ty-grid--3, .ty-grid--4, .ty-grid--6, .ty-grid--7, .ty-grid--kpi, .ty-two-col { display: flex; flex-wrap: wrap; }
  .ty-grid > *, .ty-grid--2 > *, .ty-grid--3 > *, .ty-grid--4 > *, .ty-grid--kpi > * { flex: 1 1 220px; margin-bottom: var(--ty-gap-card); }
  .ty-grid--6 > * { flex: 1 1 140px; }
  .ty-grid--7 > * { flex: 1 1 90px; }
  .ty-two-col > * { flex: 1 1 320px; }
}
/* flex gap 在 Safari 14.1 之前无效：关键容器补一层子元间距 */
@supports not (gap: 1px) {
  .ty-flex > * + *, .ty-btn-group > * + *, .ty-topbar > * + *, .ty-topbar__tools > * + * { margin-left: var(--ty-s3); }
  .ty-grid > *, .ty-col > * + * { margin-top: var(--ty-gap-card); }
}

/* ==========================================================================
   15. 页面类型统一布局（规范 4.3）
   ========================================================================== */
/* 15.1 列表页：面包屑+标题左，筛选/搜索/新增/导出右；表格裹卡；分页右下 */
.ty-page-head { display: flex; align-items: flex-end; gap: var(--ty-s4); flex-wrap: wrap; margin-bottom: var(--ty-s5); }
.ty-page-head__main { min-width: 0; flex: 1; }
.ty-page-head__actions { display: flex; align-items: center; gap: var(--ty-s2); flex-wrap: wrap; flex: none; }
.ty-toolbar { display: flex; align-items: center; gap: var(--ty-s3); flex-wrap: wrap; margin-bottom: var(--ty-s4); }
.ty-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ty-table { width: 100%; border-collapse: collapse; font-size: var(--ty-f-td); }
.ty-table th {
  text-align: left; font-size: var(--ty-f-th); font-weight: 600; color: var(--ty-ink-4); white-space: nowrap;
  padding: 14px 16px; background: var(--ty-th-bg); border-bottom: 1px solid var(--ty-line);
}
/* 纵向 10px 按 v3 §2.2；横向跟 th 保持同值，否则同一列文字左右起点错位 */
.ty-table td { padding: 10px 16px; border-bottom: 1px solid var(--ty-line-row); color: var(--ty-ink-2); vertical-align: middle; }
.ty-table tbody tr { transition: background-color var(--ty-dur) var(--ty-ease); }
.ty-table tbody tr:hover { background: var(--ty-row-hover); }
.ty-table tbody tr:last-child td { border-bottom: 0; }
.ty-table .ty-table__name { color: var(--ty-ink); font-weight: 600; white-space: nowrap; }
.ty-table--min { min-width: 720px; }         /* 横向滚动时保证列不被挤压 */
/* 表格必须包在卡片内（v3 2.3.6）：卡片内边距交给单元格，卡片自身不再加 padding */
.ty-card--table { padding: 0; overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(#fff, #000); }
.ty-card--table > .ty-card__head { margin: 0; padding: 19px var(--ty-pad-card) 16px; border-bottom: 1px solid var(--ty-line); }
.ty-card--table > .ty-pager { margin-top: 0; padding: 14px 20px; border-top: 1px solid var(--ty-line); }
.ty-pager { display: flex; align-items: center; justify-content: flex-end; gap: var(--ty-s2); margin-top: var(--ty-s4); flex-wrap: wrap; }
.ty-pager__info { font-size: var(--ty-f-aux); color: var(--ty-ink-3); margin-right: auto; }
.ty-pager button { appearance: none; min-width: 32px; height: 32px; border: 1px solid var(--ty-line-2); background: var(--ty-card); border-radius: var(--ty-radius-sm); color: var(--ty-ink-2); font: inherit; font-size: var(--ty-f-aux); cursor: pointer; }
.ty-pager button.is-active { background: var(--ty-accent); border-color: var(--ty-accent); color: var(--ty-on-accent); font-weight: 700; }
.ty-pager button:disabled { opacity: .45; cursor: not-allowed; }

/* 15.2 新增/编辑表单页：卡片内、PC 双列、字段分组小标题、按钮右下 */
.ty-form { display: flex; flex-direction: column; gap: var(--ty-s5); }
.ty-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ty-s5); }
.ty-form__grid > .ty-field--full { grid-column: 1 / -1; }
.ty-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.ty-field__label { display: flex; align-items: center; gap: 4px; font-size: var(--ty-f-aux); font-weight: 600; color: var(--ty-ink-2); }
.ty-field__req { color: var(--ty-danger); }
.ty-field__tip { font-size: var(--ty-f-mini); color: var(--ty-ink-3); }
.ty-field__error { display: flex; align-items: center; gap: 4px; font-size: var(--ty-f-mini); color: var(--ty-danger); }
.ty-field__error svg { width: 13px; height: 13px; }
.ty-form__section { font-size: var(--ty-f-card); font-weight: 600; color: var(--ty-ink); padding-top: var(--ty-s2); border-top: 1px solid var(--ty-line); margin-top: var(--ty-s2); }
.ty-form__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--ty-s3); padding-top: var(--ty-s5); border-top: 1px solid var(--ty-line); }

/* 15.3 详情页：顶部摘要卡 + Tab 子卡；Tab 选中为主色文字，无厚重色块 */
.ty-tabs { display: flex; align-items: center; gap: var(--ty-s6); border-bottom: 1px solid var(--ty-line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.ty-tabs__item {
  appearance: none; border: 0; background: transparent; cursor: pointer; font: inherit;
  font-size: var(--ty-f-body); color: var(--ty-ink-3); padding: 0 0 var(--ty-s3);
  position: relative; white-space: nowrap; min-height: 40px;
}
.ty-tabs__item:hover { color: var(--ty-ink); }
.ty-tabs__item.is-active { color: var(--ty-accent); font-weight: 600; }
.ty-tabs__item.is-active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; border-radius: var(--ty-radius-pill); background: var(--ty-accent); }
.ty-detail-head { display: flex; align-items: center; gap: var(--ty-s5); flex-wrap: wrap; }
.ty-detail-head__main { display: flex; align-items: center; gap: var(--ty-s4); min-width: 0; flex: 1; }
/* v3 §2.2 彩色人物大卡（母版 .hero）：渐变底 + 虚线圆环 + 半透明数据块；重点展示位用，不带星级（§9 禁排名） */
.ty-person {
  position: relative; overflow: hidden; color: #FFFFFF; min-height: 212px;
  display: flex; align-items: flex-start; gap: var(--ty-s5); flex-wrap: wrap;
  padding: 20px 22px; border-radius: var(--ty-radius); background: linear-gradient(135deg, #4260E8, #2B47C4);
  box-shadow: var(--ty-shadow);
}
.ty-person--green { background: linear-gradient(135deg, #1DB448, #0E8F36); }
.ty-person::after {
  content: ''; position: absolute; right: -30px; top: 24px; width: 150px; height: 150px;
  border: 1.5px dashed rgba(255, 255, 255, .28); border-radius: 50%;
}
.ty-person__main { display: flex; align-items: center; gap: var(--ty-s4); min-width: 0; flex: 1; position: relative; z-index: 2; }
.ty-person__name { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.ty-person__sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.ty-person__chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 11px;
  background: rgba(255, 255, 255, .2); border-radius: var(--ty-radius-pill);
  font-size: 12px; font-weight: 600;
}
.ty-person__chips { display: flex; gap: var(--ty-s2); flex-wrap: wrap; }
.ty-person__stats { display: flex; gap: var(--ty-s8); margin-top: var(--ty-s6); position: relative; z-index: 2; flex-wrap: wrap; }
.ty-person__stats .n { display: block; font-size: 21px; font-weight: 700; }
.ty-person__stats .l { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }
.ty-person__ops { display: flex; align-items: center; gap: var(--ty-s2); flex-wrap: wrap; position: relative; z-index: 2; margin-left: auto; }
.ty-person .ty-avatar { background: rgba(255, 255, 255, .22); color: #FFFFFF; }
.ty-person .ty-btn--text { color: #FFFFFF; }
.ty-info { display: flex; flex-wrap: wrap; gap: var(--ty-s4) var(--ty-s8); }
.ty-info__item { min-width: 0; }
.ty-info__label { font-size: var(--ty-f-mini); color: var(--ty-ink-3); }
.ty-info__value { font-size: var(--ty-f-body); color: var(--ty-ink); font-weight: 600; }
/* 详情页 Tab 面板：纯前端切换，切换不发请求 */
.ty-tabpanel { display: none; }
.ty-tabpanel.is-active { display: block; }
/* 细进度条（课包剩余、缴费完成度） */
.ty-bar { height: 6px; border-radius: var(--ty-radius-pill); background: var(--ty-track); overflow: hidden; }
.ty-bar__fill { display: block; height: 100%; border-radius: var(--ty-radius-pill); background: var(--ty-accent); }
.ty-bar__fill--ok { background: var(--ty-ok-solid); }
.ty-bar__fill--warn { background: var(--ty-warn-solid); }
.ty-bar__fill--danger { background: var(--ty-danger-solid); }

/* 15.4 报表页：顶部筛选 → 上排指标 → 下排图表 + 明细（复用仪表盘组件） */
.ty-report__filters { margin-bottom: var(--ty-s5); }
.ty-report__kpis { margin-bottom: var(--ty-gap-card); }

/* 15.5 设置页：每组配置单独一张卡，开关控件统一 */
.ty-setting-group { display: flex; align-items: center; gap: var(--ty-s4); padding: var(--ty-s4) 0; border-bottom: 1px solid var(--ty-line); }
.ty-setting-group:last-child { border-bottom: 0; }
.ty-setting-group__main { flex: 1; min-width: 0; }
.ty-setting-group__title { font-size: var(--ty-f-body); font-weight: 600; color: var(--ty-ink); }
.ty-setting-group__desc { font-size: var(--ty-f-aux); color: var(--ty-ink-3); }

/* 15.6 弹窗：居中、圆角 16px、内边距 24px；标题左上、关闭右上、操作右下 */
.ty-mask {
  position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: var(--ty-z-scrim);
  background: var(--ty-scrim); display: flex; align-items: center; justify-content: center;
  padding: var(--ty-s6); animation: ty-fade var(--ty-dur) var(--ty-ease);
}
.ty-modal {
  position: relative; z-index: var(--ty-z-modal);
  background: var(--ty-card); border-radius: var(--ty-radius); box-shadow: var(--ty-shadow-pop);
  width: min(560px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  overflow: hidden; -webkit-mask-image: -webkit-radial-gradient(#fff, #000);
  animation: ty-pop var(--ty-dur) var(--ty-ease);
}
.ty-modal--sm { width: min(420px, 100%); }
.ty-modal--lg { width: min(880px, 100%); }
.ty-modal__head { display: flex; align-items: center; gap: var(--ty-s3); padding: var(--ty-s6) var(--ty-s6) var(--ty-s4); }
.ty-modal__title { flex: 1; min-width: 0; font-size: var(--ty-f-card); font-weight: var(--ty-w-card); color: var(--ty-ink); }
.ty-modal__x {
  appearance: none; flex: none; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 0; border-radius: var(--ty-radius-sm); color: var(--ty-ink-3); cursor: pointer;
}
.ty-modal__x:hover { background: var(--ty-sunken); color: var(--ty-ink); }
.ty-modal__x svg { width: 16px; height: 16px; }
.ty-modal__body { padding: 0 var(--ty-s6) var(--ty-s4); overflow-y: auto; flex: 1; min-height: 0; -webkit-overflow-scrolling: touch; }
.ty-modal__foot { display: flex; align-items: center; justify-content: flex-end; gap: var(--ty-s3); padding: var(--ty-s4) var(--ty-s6) var(--ty-s6); flex-wrap: wrap; }
.ty-modal__note { margin-right: auto; font-size: var(--ty-f-aux); color: var(--ty-ink-3); }

/* 抽屉（右侧滑出，长表单/详情用） */
.ty-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: var(--ty-z-drawer);
  width: min(440px, 90vw); background: var(--ty-card); box-shadow: var(--ty-shadow-pop);
  display: flex; flex-direction: column; animation: ty-slide var(--ty-dur) var(--ty-ease);
}
.ty-drawer--left { right: auto; left: 0; }
@keyframes ty-slide { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ==========================================================================
   16. 响应式（规范 5：768px 为 PC/移动端分界）
   ========================================================================== */
@media (max-width: 768px) {
  /* 侧边栏隐藏，汉堡按钮唤起侧滑菜单；样式与 PC 完全一致（规范 5.2-5） */
  .ty-nav {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(280px, 84vw); height: 100%;
    transform: translateX(-100%); transition: transform .22s var(--ty-ease);
    box-shadow: var(--ty-shadow-pop); z-index: calc(var(--ty-z-nav) + 2);
  }
  .ty-app[dir="rtl"] .ty-nav { left: auto; right: 0; transform: translateX(100%); }
  .ty-nav.is-open { transform: none; }
  .ty-hamburger { display: inline-flex; }
  .ty-nav__fold { display: none; }
  /* 移动端不保留窄栏折叠形态，一律全量展示 */
  .ty-nav.is-folded { width: min(280px, 84vw); }
  .ty-nav.is-folded .ty-nav__item__label,
  .ty-nav.is-folded .ty-nav__group__label,
  .ty-nav.is-folded .ty-nav__plus,
  .ty-nav.is-folded .ty-nav__badge,
  .ty-nav.is-folded .logo-text,
  .ty-nav.is-folded .sidebar-user-card .name,
  .ty-nav.is-folded .sidebar-user-card .role { display: block; }
  .ty-nav.is-folded .logo-text { display: inline; }
  .ty-nav.is-folded .sidebar-user-card .role { display: block; }
  .ty-nav.is-folded .ty-nav__item,
  .ty-nav.is-folded .ty-nav__group__head { justify-content: flex-start; padding-left: var(--ty-s3); padding-right: var(--ty-s3); }
  .ty-nav.is-folded .logo-wrap { padding: var(--ty-s5) var(--ty-s5) var(--ty-s4); justify-content: flex-start; }
  .ty-nav.is-folded .sidebar-user-card { justify-content: flex-start; margin: var(--ty-s4); padding: 16px; }
  .ty-app[data-layout="mini"] .logo-text,
  .ty-app[data-layout="mini"] .ty-nav__item__label,
  .ty-app[data-layout="mini"] .ty-nav__group__label,
  .ty-app[data-layout="mini"] .ty-nav__badge,
  .ty-app[data-layout="mini"] .sidebar-user-card .name,
  .ty-app[data-layout="mini"] .sidebar-user-card .role { display: block; }
  .ty-app[data-layout="mini"] .sidebar-user-card { justify-content: flex-start; }
  .ty-app[data-layout="mini"] .ty-nav__item,
  .ty-app[data-layout="mini"] .ty-nav__group__head { justify-content: flex-start; padding-left: var(--ty-s3); padding-right: var(--ty-s3); }

  /* 卡片：内边距最小 16，间距最小 16，100% 宽度堆叠（规范 5.2-1） */
  .ty-app { --ty-pad-card: 16px; --ty-pad-card-y: 16px; --ty-gap-card: 16px; --ty-f-num: 24px; }
  .ty-content { padding: var(--ty-s4) var(--ty-s4) var(--ty-s8); }
  .ty-topbar { height: 52px; padding: 0 var(--ty-s4); gap: var(--ty-s2); }
  .ty-topbar__page { display: none; }   /* 页名已在内容区面包屑里，窄屏不重复占位 */
  /* 390px 顶栏只保留：抽屉按钮 + 学年下拉 + 通知/消息 + 头像，其余按窄屏收起 */
  .ty-hide-sm, .ty-topbar__uname { display: none; }
  .ty-topbar__period, .ty-topbar__period .ty-select { max-width: 104px; }

  /* 多列栅格自动垂直单列堆叠；横向指标组自动纵向排列 */
  .ty-grid, .ty-grid--2, .ty-grid--3, .ty-grid--4, .ty-grid--6, .ty-two-col { grid-template-columns: 1fr; }
  .ty-grid--kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ty-metric, .ty-ring-wrap, .ty-detail-head { flex-direction: column; align-items: flex-start; }
  .ty-person { min-height: 0; gap: var(--ty-s4); }
  .ty-person__stats { margin-top: var(--ty-s4); gap: var(--ty-s6); }
  .ty-metric__row { width: 100%; }
  .ty-chart { height: 200px; }
  .ty-legend { flex-direction: row; flex-wrap: wrap; width: 100%; flex: 1 1 100%; }  /* 图例自动下移 */
  .ty-form__grid { grid-template-columns: 1fr; }

  /* 触控目标 ≥44px（v3 §11.4：移动端可点击区域 ≥44px） */
  .ty-btn { min-height: var(--ty-touch); height: var(--ty-touch); font-size: var(--ty-f-body); }
  .ty-btn--sm { min-height: var(--ty-touch); height: var(--ty-touch); font-size: var(--ty-f-aux); }
  .ty-input, .ty-select { height: var(--ty-touch); min-height: var(--ty-touch); font-size: var(--ty-f-body); }
  .ty-textarea { min-height: 96px; }
  .ty-seg > button, .ty-tabs__item { min-height: var(--ty-touch); }
  .ty-pager button { min-width: var(--ty-touch); height: var(--ty-touch); }
  .ty-modal__x { min-width: var(--ty-touch); min-height: var(--ty-touch); }

  /* 列表页：标题在上，筛选按钮换行堆叠，表格横向滚动 */
  .ty-page-head { flex-direction: column; align-items: stretch; }
  .ty-page-head__actions { width: 100%; }
  .ty-page-head__actions .ty-btn { flex: 1 1 auto; }
  .ty-card__head { margin: -16px -16px var(--ty-s4); padding: var(--ty-s4) var(--ty-s4); }
  .ty-card__mini { gap: var(--ty-s4); }
  .ty-table { font-size: var(--ty-f-aux); }
  .ty-table th, .ty-table td { padding: 10px var(--ty-s2); }

  /* 弹窗：移动端左右留边，不全屏铺满（规范 4.3-6） */
  .ty-mask { padding: var(--ty-s4); align-items: center; }
  .ty-modal, .ty-modal--lg { width: 100%; max-height: calc(100vh - 32px); }
  .ty-modal__head, .ty-modal__body, .ty-modal__foot { padding-left: var(--ty-s4); padding-right: var(--ty-s4); }
  .ty-drawer, .ty-drawer--left { width: 100%; }
  .ty-toast { bottom: calc(20px + constant(safe-area-inset-bottom)); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

  /* 键盘/安全区：底部预留，不被浏览器工具栏遮挡（规范 5.2-7） */
  .ty-content { padding-bottom: calc(var(--ty-s8) + constant(safe-area-inset-bottom)); padding-bottom: calc(var(--ty-s8) + env(safe-area-inset-bottom, 0px)); }
}

/* 触屏无悬停：去掉 hover 残留态 */
@media (hover: none) {
  .ty-nav__item:hover, .ty-btn--secondary:hover, .ty-btn--text:hover,
  .ty-table tbody tr:hover, .ty-icon-btn:hover { background: transparent; }
  .ty-nav__item.is-active:hover { background: var(--ty-nav-active); }
  .ty-table tbody tr:active { background: var(--ty-accent-soft); }
}

/* ==========================================================================
   17. 报表 PDF / 打印模板（@page 控制边距，卡片不跨页断开）
   ========================================================================== */
@media print {
  .ty-nav, .ty-topbar, .ty-toolbar, .ty-pager, .ty-btn, .ty-icon-btn, .ty-modal__foot, .ty-toast, .ty-mask, .ty-hamburger { display: none !important; }
  .ty-app, .ty-shell, .ty-content { background: #FFFFFF !important; padding: 0 !important; }
  .ty-card, .ty-kpi, .ty-feature-card { box-shadow: none !important; border: 1px solid #DDDDDD !important; page-break-inside: avoid; break-inside: avoid; }
  .ty-grid--2, .ty-grid--3, .ty-grid--4, .ty-grid--6, .ty-two-col { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .ty-table th { background: #F5F5F5 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .ty-print-title { display: block !important; font-size: 18px; font-weight: 600; margin-bottom: 12px; }
  .ty-print-only { display: block !important; }
  @page { margin: 14mm; }
}
.ty-print-only { display: none; }

/* ==== 2026-11-25 园长裁定·按钮统一：teacher/admin 页面内联样式迁入 ==== */
.ty-h-ico { display: flex; align-items: center; gap: 6px; }
.ty-h-ico svg { width: 1em; height: 1em; flex: none; stroke-width: 2; }
.ty-qgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 10px; }
.ty-qcard { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 16px; border-radius: 10px; color: #FFFFFF; text-align: center; text-decoration: none; cursor: pointer; transition: transform .15s; }
.ty-qcard:hover { transform: translateY(-2px); }
.ty-qcard__ico svg { width: 24px; height: 24px; stroke-width: 2; }
.ty-qcard__lb { font-size: 13px; font-weight: 500; }
.ty-qcard--a { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); }
.ty-qcard--b { background: linear-gradient(135deg, #3D5EE1 0%, #5B79E8 100%); }
.ty-qcard--c { background: linear-gradient(135deg, #059669 0%, #10B981 100%); }
.ty-qcard--d { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%); }
.ty-act-row { display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px dashed #F5E0B8; }
.ty-act-main { flex: 1; min-width: 0; }
.ty-act-t { font-size: 13.5px; font-weight: 600; }
.ty-act-s { font-size: 11.5px; color: #838A9B; }
.ty-mt-1 { margin-top: 6px; }
.ty-mt-2 { margin-top: .5rem; }

/* ==== 2026-11-25 园长裁定·按钮统一：admin/parent 按钮内联样式迁入的工具类 ==== */
.ty-ml-auto { margin-left: auto; }
.ty-danger-ink { color: #DC2626; }
.ty-ok-ink { color: #16A34A; }
.ty-warn-ink { color: #B45309; }
.ty-pad-1 { padding: 6px 10px; }
.ty-pad-2 { padding: 6px 8px; }
.ty-pad-3 { padding: 3px 8px; font-size: 12px; margin-left: 2px; }
.ty-pad-4 { padding: 3px 6px; font-size: 12px; }
.ty-inline-flex-6 { display: inline-flex; align-items: center; gap: 6px; }
.ty-btn-row { display: flex; gap: 9px; }
.ty-btn-row > button { flex: 1; min-width: 0; }
.ty-action-flex { flex: 1; min-width: 120px; }
.ty-mt-3 { margin-top: 10px; }
.ty-pf-eng { background: #F1F4F9; color: #3D5EE1; }
.ty-pf-res { background: #EEF2FE; color: #3D5EE1; }
.btns button.pf.ty-pf-eng { background: #F1F4F9; color: #3D5EE1; }
.btns button.pf.ty-pf-res { background: #EEF2FE; color: #3D5EE1; }
.ty-ico-in-btn svg { width: 1em; height: 1em; vertical-align: -0.15em; stroke-width: 2; }
.ty-ico-inline { width: 1em; height: 1em; vertical-align: -0.15em; stroke-width: 2; flex: none; }
.ty-ico-host { display: inline-flex; align-items: center; gap: 4px; }
.ty-ico-host svg { width: 1em; height: 1em; stroke-width: 2; flex: none; }
.ty-ico-lg { display: block; width: 30px; height: 30px; margin: 0 auto 8px; stroke-width: 2; }
.ty-pw-field { position: relative; display: block; width: 100%; }
.ty-pw-eye { position: absolute; right: 8px; top: 50%; z-index: 1; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; min-height: 0; padding: 0; border: 0; background: transparent; color: inherit; cursor: pointer; user-select: none; opacity: .55; transform: translateY(-50%); }
body.ty-admin .login button.ty-pw-eye{width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;border-radius:8px;z-index:10;opacity:.7;transform:translateY(-50%)!important}
body.ty-admin .ty-pw-eye:hover,body.ty-admin .ty-pw-eye:focus-visible{opacity:1}
body.ty-admin .ty-pw-eye:focus-visible{outline:2px solid #3D5EE1;outline-offset:1px}
.ty-pw-eye svg { width: 18px; height: 18px; stroke-width: 2; }

/* 页面旧 act/ghost 规则后加载，需提高优先级才能让统一按钮生效。 */
button.ty-btn.ty-btn { padding: 11px 14px; font-size: var(--ty-f-body); border-radius: var(--ty-radius-btn); }
button.ty-btn.ty-btn--primary { background: var(--ty-accent); color: var(--ty-on-accent); border-color: var(--ty-accent); box-shadow: var(--ty-shadow-btn); }
button.ty-btn.ty-btn--secondary { background: var(--ty-btn-2); color: var(--ty-ink); border-color: transparent; box-shadow: var(--ty-shadow-btn-2); }
button.ty-btn.ty-btn--danger { background: var(--ty-danger); color: #fff; border-color: var(--ty-danger); }
button.ty-btn.ty-btn--danger-ghost { background: #fff; color: var(--ty-danger); border-color: var(--ty-line-2); }
button.ty-btn.ty-btn--text { background: transparent; color: var(--ty-accent-ink); border-color: transparent; }
button.ty-btn.ty-btn--sm { padding: 8px 12px; font-size: var(--ty-f-aux); border-radius: var(--ty-radius-btn-sm); }
button.ty-btn.ty-btn--block { display: flex; width: 100%; }
button.ty-btn.ty-ml-auto { margin-left: auto; }

/* 管理后台与数据看板共用视觉系统；仅作用于显式标记的页面。 */
body.ty-admin {
  --ty-bg: #F8FAFC;
  --ty-card: #FFFFFF;
  --ty-accent: #3D5EE1;
  --ty-accent-hover: #314FBE;
  --ty-accent-soft: #EEF2FE;
  --ty-ink: #202C4B;
  --ty-ink-2: #64748B;
  --ty-line: #E9EDF4;
  --ty-line-strong: #DCE3EC;
  --ty-radius: 16px;
  --ty-radius-btn: 12px;
  --ty-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --ty-shadow-btn: 0 1px 2px rgba(15,23,42,.05);
  --ms-primary: #3D5EE1 !important;
  --ms-accent-soft: #EEF2FE !important;
  --cream-accent: #3D5EE1 !important;
  --theme: #3D5EE1 !important;
  --ty-warn: #6D28D9;
  --ty-warn-soft: rgba(109,40,217,.12);
  --ty-warn-solid: #7C3AED;
  --ty-c-orange: #7C3AED;
  --ty-c-orange-soft: rgba(124,58,237,.12);
  background: var(--ty-bg);
  color: var(--ty-ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.5;
  background-image: none !important;
}
body.ty-admin h1, body.ty-admin h2, body.ty-admin h3, body.ty-admin h4 { color: var(--ty-ink); line-height: 1.4; }
body.ty-admin h2 { font-size: 18px; font-weight: 650; margin-bottom: 14px; }
body.ty-admin h3 { font-size: 15px; font-weight: 650; }
body.ty-admin .muted, body.ty-admin .meta { color: var(--ty-ink-2); }
body.ty-admin a { color: var(--ty-accent); }
body.ty-admin .top {
  min-height: 64px;
  padding: 11px 22px;
  gap: 12px;
  background: #3D5EE1 !important;
  color: #fff !important;
  border-bottom: 1px solid #3452CC !important;
  box-shadow: 0 2px 8px rgba(61,94,225,.24) !important;
}
body.ty-admin .top .brand { color: #fff !important; font-size: 16px; font-weight: 650; min-width: 0; }
body.ty-admin .top .brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ty-admin .top .me { color: #fff !important; opacity: 1; }
body.ty-admin .top-controls { display: flex; flex: 1; align-items: center; gap: 12px; min-width: 0; }
body.ty-admin .top-actionrow { display: flex; align-items: center; gap: 6px; min-width: 0; }
body.ty-admin .topright { position: relative; flex: 0 0 auto; }
body.ty-admin .top button,
body.ty-admin .top .fonts button,
body.ty-admin .font-select {
  min-height: 38px;
  padding: 8px 12px;
  background: rgba(255,255,255,.12);
  color: #fff;
  border: 1px solid rgba(255,255,255,.28);
  border-radius: 10px;
  box-shadow: none;
  font-size: 13px;
  font-weight: 500;
}
body.ty-admin .top button:hover,
body.ty-admin .top .fonts button:hover { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.45); color: #fff; }
body.ty-admin .top .fonts button.on { background: #fff; border-color: #fff; color: #3D5EE1; }
body.ty-admin .font-select { width: auto; margin: 0; }
body.ty-admin .top .av { border-color: #fff; box-shadow: 0 0 0 1px var(--ty-line); }
body.ty-admin .top-workbench { display: inline-flex; align-items: center; min-height: 38px; padding: 0 10px; border-radius: 10px; color: #fff; font-size: 13px; text-decoration: none; white-space: nowrap; }
body.ty-admin .top-workbench:hover { background: rgba(255,255,255,.14); color: #fff; }
body.ty-admin .searchbox { background: var(--ty-bg); border: 1px solid var(--ty-line); border-radius: 10px; min-height: 40px; margin-bottom: 0; }
body.ty-admin .searchbox:focus { background: #fff; border-color: #A9B9EE; box-shadow: 0 0 0 3px rgba(61,94,225,.10); }
body.ty-admin .searchres, body.ty-admin .campusmenu, body.ty-admin .usermenu {
  background: #fff;
  border: 1px solid var(--ty-line);
  border-radius: 12px;
  box-shadow: var(--ty-shadow);
}
body.ty-admin .searchres .sr-item:hover, body.ty-admin .campusmenu .ci:hover, body.ty-admin .usermenu .umi:hover { background: var(--ty-accent-soft); }
body.ty-admin .side {
  width: 248px;
  flex: 0 0 248px;
  padding: 14px 12px;
  background: #fff;
  border-right: 1px solid var(--ty-line);
}
body.ty-admin .side button,
body.ty-admin .side .side-direct,
body.ty-admin .side-group-hd {
  min-height: 42px;
  margin-bottom: 3px;
  padding: 10px 13px;
  color: #475569;
  border: 0;
  border-left: 3px solid transparent;
  border-radius: 9px;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
}
body.ty-admin .side button:hover,
body.ty-admin .side .side-direct:hover,
body.ty-admin .side-group-hd:hover { background: #F1F5F9; color: var(--ty-ink); }
body.ty-admin .side button.on,
body.ty-admin .side .side-direct.on,
body.ty-admin .side-group-hd.on,
body.ty-admin .side-group-children button.on {
  background: #3D5EE1 !important;
  color: #fff !important;
  border-left: 3px solid #fff !important;
  font-weight: 650;
}
body.ty-admin :is(.kn,.n,.num,.card .n,.stat-num,.ov-money) { font-variant-numeric: tabular-nums; }
body.ty-admin .side-group { border-bottom-color: var(--ty-line); }
body.ty-admin .side-group-children button { margin-bottom: 2px; padding: 9px 12px 9px 34px; color: var(--ty-ink-2); }
body.ty-admin .main { min-width: 0; padding: 24px; }
body.ty-admin .pgtabs {
  gap: 4px;
  padding: 0 22px;
  background: #fff;
  border-bottom: 1px solid var(--ty-line);
}
body.ty-admin .pgtab {
  min-height: 44px;
  padding: 10px 14px;
  color: var(--ty-ink-2);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
  font-size: 13px;
}
body.ty-admin .pgtab:hover { background: var(--ty-bg); color: var(--ty-ink); }
body.ty-admin .pgtab.on { background: #fff; color: var(--ty-accent); border-bottom-color: var(--ty-accent); box-shadow: none; }
body.ty-admin :is(.panel, .card, .todo-card, .kpi-card, .birthday-card, .cc-card, .cdp-card, .cchip-card, .feature-card, .feature-class-card, .sched-card, .ev-item, .ov-panel, .detail-box, .modal .box, .modal-box, .cdp-top, .skel-card) {
  background: #fff !important;
  border: 1px solid var(--ty-line) !important;
  border-radius: var(--ty-radius) !important;
  box-shadow: var(--ty-shadow) !important;
}
body.ty-admin :is(.panel, .card, .todo-card, .kpi-card, .birthday-card, .cc-card, .cchip-card, .feature-card, .feature-class-card):hover { box-shadow: 0 2px 4px rgba(15,23,42,.04), 0 10px 28px rgba(15,23,42,.08) !important; }
body.ty-admin .workbench { gap: 20px; align-items: stretch; }
body.ty-admin .wb-left { width: 100%; max-width: 100%; min-width: 0; }
body.ty-admin .wb-todo { width: 300px; }
body.ty-admin .wb-charts { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
body.ty-admin .wb-charts .panel { min-width: 0; padding: 20px; }
body.ty-admin .season-banner {
  height: 132px;
  margin: 0 0 20px;
  background: linear-gradient(115deg, #EEF2FE 0%, #F8FAFC 72%);
  border: 1px solid #DEE5FA;
  border-radius: var(--ty-radius);
  box-shadow: none;
}
body.ty-admin .season-banner .slogan { font-size: 19px; font-weight: 600; color: var(--ty-ink); }
body.ty-admin .quickgrid { gap: 12px; }
body.ty-admin .qtile {
  min-height: 90px;
  padding: 14px 8px;
  background: var(--ty-bg);
  border: 1px solid var(--ty-line);
  border-radius: 12px;
  box-shadow: none;
}
body.ty-admin .qtile:hover { background: var(--ty-accent-soft); border-color: #D7E0FA; box-shadow: none; transform: none; }
body.ty-admin .qtile .ic { color: var(--ty-accent); }
body.ty-admin .qtile .lb { color: #475569; font-size: 13px; font-weight: 550; }
body.ty-admin .period-tabs { padding: 4px; background: var(--ty-bg); border: 1px solid var(--ty-line); border-radius: 10px; width: fit-content; }
body.ty-admin .period-tabs .ptab { min-height: 34px; padding: 6px 14px; background: transparent; border: 0; border-radius: 8px; color: var(--ty-ink-2); box-shadow: none; }
body.ty-admin .period-tabs .ptab.on { background: #fff; color: var(--ty-accent); box-shadow: 0 1px 3px rgba(15,23,42,.08); }
body.ty-admin .kpi-row { grid-template-columns: repeat(auto-fit, minmax(210px,1fr)); gap: 16px; }
body.ty-admin .kpi-card { min-height: 98px; padding: 18px; gap: 14px; }
body.ty-admin .kpi-card .kicon { width: 46px; height: 46px; background: var(--ty-accent-soft); color: var(--ty-accent); border-radius: 12px; }
body.ty-admin .kpi-card .kn { min-width: 0; color: var(--ty-ink); font-size: 27px; font-weight: 700; letter-spacing: -.4px; }
body.ty-admin .kpi-card .kl { color: var(--ty-ink-2); font-size: 13px; }
body.ty-admin .kpi-card .kedit { width: 24px; height: 24px; padding: 0; background: transparent; color: #94A3B8; border-radius: 6px; font-size: 0; }
body.ty-admin .kpi-card .kedit::after { content: "⋯"; font-size: 18px; line-height: 20px; }
body.ty-admin .kpi-card .kedit:hover { background: var(--ty-accent-soft); color: var(--ty-accent); }
body.ty-admin .todo-row .lab { color: var(--ty-ink-2); }
body.ty-admin .todo-row .num { color: var(--ty-ink); font-size: 24px; }
body.ty-admin .todo-row .num.warn { color: #DC2626; }
body.ty-admin .todo-row .go { min-height: 32px; padding: 5px 11px; background: var(--ty-accent-soft); color: var(--ty-accent); border: 0; border-radius: 8px; font-weight: 600; }
body.ty-admin .breadcrumb { background: #fff; border: 1px solid var(--ty-line); border-radius: 10px; color: var(--ty-ink-2); }
body.ty-admin button.act,
body.ty-admin .cdp-addbtn,
body.ty-admin .cc-main,
body.ty-admin .ov-btn:not(.ghost),
body.ty-admin .exp-btn,
body.ty-admin .login button,
body.ty-admin .feature-enter {
  min-height: 40px;
  padding: 9px 14px;
  background: var(--ty-accent) !important;
  color: #fff !important;
  border: 1px solid var(--ty-accent) !important;
  border-radius: var(--ty-radius-btn) !important;
  box-shadow: var(--ty-shadow-btn) !important;
  font-size: 14px;
  font-weight: 550;
}
body.ty-admin button.act:hover,
body.ty-admin .cdp-addbtn:hover,
body.ty-admin .cc-main:hover,
body.ty-admin .ov-btn:not(.ghost):hover,
body.ty-admin .exp-btn:hover,
body.ty-admin .login button:hover,
body.ty-admin .feature-enter:hover { background: var(--ty-accent-hover) !important; border-color: var(--ty-accent-hover) !important; box-shadow: 0 2px 4px rgba(15,23,42,.08) !important; }
body.ty-admin button.ghost,
body.ty-admin .cdp-back,
body.ty-admin .ov-btn.ghost,
body.ty-admin .detail-hd button,
body.ty-admin .ov-pager button,
body.ty-admin .stu-page button {
  min-height: 38px;
  padding: 8px 13px;
  background: #fff;
  color: var(--ty-ink);
  border: 1px solid var(--ty-line-strong);
  border-radius: 10px;
  box-shadow: none;
  font-size: 13px;
}
body.ty-admin button.ghost:hover,
body.ty-admin .cdp-back:hover,
body.ty-admin .ov-btn.ghost:hover,
body.ty-admin .ov-pager button:hover,
body.ty-admin .stu-page button:hover { background: var(--ty-bg); border-color: #C6D2E4; color: var(--ty-accent); }
body.ty-admin .detail-hd button { background: #fff; color: #DC2626; border-color: #F3C9CF; }
body.ty-admin input, body.ty-admin select, body.ty-admin textarea {
  min-height: 40px;
  padding: 9px 11px;
  background: #fff;
  color: var(--ty-ink);
  border: 1px solid var(--ty-line-strong);
  border-radius: 8px;
  box-shadow: none;
  font-family: inherit;
  font-size: 14px;
}
body.ty-admin input:focus, body.ty-admin select:focus, body.ty-admin textarea:focus { border-color: #93A7EB; box-shadow: 0 0 0 3px rgba(61,94,225,.10); }
body.ty-admin input[type="checkbox"], body.ty-admin input[type="radio"] { min-height: 0; width: 16px; height: 16px; accent-color: var(--ty-accent); }
body.ty-admin label { color: #475569; font-size: 13px; }
body.ty-admin table { font-size: 13px; }
body.ty-admin th, body.ty-admin td { padding: 11px 12px; border-bottom: 1px solid var(--ty-line) !important; }
body.ty-admin th { background: var(--ty-bg); color: var(--ty-ink-2); font-size: 12px; font-weight: 600; }
body.ty-admin tbody tr:hover { background: #FAFBFD; }
body.ty-admin .tag, body.ty-admin .ov-tag { border-radius: 6px; }
body.ty-admin .modal .box, body.ty-admin .modal-box { box-shadow: 0 24px 64px rgba(15,23,42,.22) !important; }
body.ty-admin .modal-x { background: var(--ty-bg); color: var(--ty-ink-2); border-radius: 10px; }
body.ty-admin .toast { background: var(--ty-ink); border-radius: 10px; box-shadow: var(--ty-shadow); }
body.ty-admin .ring-grid { gap: 10px; }
body.ty-admin .ring-item { padding: 10px 4px; }
body.ty-admin .ring-item .rlbl { color: var(--ty-ink-2); font-size: 12px; }
body.ty-admin .ty-chip--warn { background: rgba(109,40,217,.10); border-color: rgba(109,40,217,.28); color: #6D28D9; }
body.ty-admin .ty-warn-ink, body.ty-admin button.ty-btn.ty-warn-ink { color: #6D28D9; }
body.ty-admin .ty-act-row { border-top-color: var(--ty-line); }
body.ty-admin .ty-qcard--a { background: #6D5BD0; }
body.ty-admin .ty-qcard--b { background: #3D5EE1; }
body.ty-admin .ty-qcard--c { background: #059669; }
body.ty-admin .ty-qcard--d { background: #7C3AED; }
body.ty-admin .kpi-card .kn, body.ty-admin .card .n, body.ty-admin .tile .n, body.ty-admin .bt-stat-card b { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
body.ty-admin .chart-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
body.ty-admin .chart-scroll .chart-svg { min-width: 520px; }
body.ty-admin .chart-svg { font-family: inherit; }
body.ty-admin .chart-att { width: 100%; min-width: 560px; }
body.ty-admin .hbar-list { display: flex; flex-direction: column; gap: 14px; max-height: 390px; overflow-y: auto; padding: 4px; }
body.ty-admin .hbar-row { display: grid; grid-template-columns: minmax(90px,150px) minmax(120px,1fr) 48px; align-items: center; gap: 12px; }
body.ty-admin .hbar-row .att-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.ty-admin .hbar-fill { display: block; height: 100%; background: var(--ty-accent); border-radius: 5px; }
body.ty-admin .funnel-list { display: flex; flex-direction: column; gap: 14px; padding: 6px 0; }
body.ty-admin .funnel-row { display: grid; grid-template-columns: 64px minmax(100px,1fr) 38px; align-items: center; gap: 12px; }
body.ty-admin .funnel-label { color: #475569; font-size: 13px; }
body.ty-admin .funnel-track { height: 18px; overflow: hidden; background: #F1F5F9; border-radius: 5px; }
body.ty-admin .funnel-bar { display: block; height: 100%; min-width: 0; border-radius: 5px; }
body.ty-admin .funnel-value { color: var(--ty-ink); font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
body.ty-admin .chart-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 16px; color: var(--ty-ink-2); font-size: 12px; }
body.ty-admin .chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
body.ty-admin .chart-legend i { width: 9px; height: 9px; border-radius: 3px; }
body.ty-admin .att-list { display: flex; flex-direction: column; gap: 15px; max-height: 390px; overflow-y: auto; padding-right: 4px; }
body.ty-admin .att-row { display: grid; grid-template-columns: minmax(180px,280px) minmax(160px,1fr) 48px; align-items: center; gap: 12px; }
body.ty-admin .att-row .att-name { color: #475569; font-size: 13px; line-height: 1.45; white-space: normal; overflow-wrap: anywhere; }
body.ty-admin .att-track { display: flex; height: 14px; overflow: hidden; background: #F1F5F9; border-radius: 5px; }
body.ty-admin .att-seg { height: 100%; min-width: 0; }
body.ty-admin .att-seg.present { background: var(--ty-accent); }
body.ty-admin .att-seg.late { background: #7C3AED; }
body.ty-admin .att-seg.absent { background: #EF4444; }
body.ty-admin .att-rate { color: var(--ty-ink); font-size: 13px; font-weight: 650; text-align: right; font-variant-numeric: tabular-nums; }
body.ty-admin .dashboard-top .brand { color: var(--ty-ink); }
body.ty-admin .dashboard-top button { background: #fff; color: var(--ty-ink); border: 1px solid var(--ty-line-strong); }
body.ty-admin .dashboard-top button:hover { background: var(--ty-bg); }
body.ty-admin .wrap { width: 100%; max-width: 1680px; margin: 22px auto; padding: 0 24px; }
body.ty-admin .cards { gap: 16px; }
body.ty-admin .dashboard-top + .wrap .card { min-height: 104px; }
body.ty-admin .detail-overlay { background: rgba(15,23,42,.45); }
body.ty-admin .detail-hd { background: #fff; }
body.ty-admin .detail-hd h3 { font-size: 16px; }
body.ty-admin .detail-body { padding: 18px 20px; }
body.ty-admin .ov-filter { background: var(--ty-bg); border-radius: 10px; }
body.ty-admin .ov-table thead th { background: #F8FAFC; }
body.ty-admin .ov-table td.cD { background: #F5F7FE; }
body.ty-admin .ov-table thead tr.ov-grp th.gD { background: #EEF2FE; color: var(--ty-accent); }
@media (max-width: 1180px) {
  body.ty-admin .side { width: 220px; flex-basis: 220px; }
  body.ty-admin .wb-todo { width: 270px; }
  body.ty-admin .wb-charts { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  body.ty-admin .workbench { flex-direction: column; }
  body.ty-admin .wb-todo { width: 100%; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  body.ty-admin .wb-todo > * { margin: 0; }
}
@media (max-width: 768px) {
  body.ty-admin { font-size: 14px; }
  body.ty-admin .top { min-height: 60px; padding: 10px 12px; gap: 8px; }
  body.ty-admin .top button, body.ty-admin .top .fonts button { min-height: 40px; padding: 8px 10px; font-size: 12px; }
  body.ty-admin .main { padding: 14px 14px calc(96px + env(safe-area-inset-bottom)); }
  body.ty-admin .pgtabs { padding: 0 12px; }
  body.ty-admin .pgtab { min-height: 42px; padding: 8px 12px; font-size: 12px; }
  body.ty-admin .side { width: 250px; flex-basis: 250px; padding: 14px 12px; background: var(--ty-bg); }
  body.ty-admin .side button, body.ty-admin .side .side-direct, body.ty-admin .side-group-hd { min-height: 44px; font-size: 14px; }
  body.ty-admin .wb-todo { grid-template-columns: 1fr; }
  body.ty-admin .wb-charts { gap: 14px; }
  body.ty-admin .wb-charts .panel { padding: 16px; }
  body.ty-admin .kpi-row { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
  body.ty-admin .kpi-card { min-height: 96px; padding: 14px; gap: 10px; }
  body.ty-admin .kpi-card .kicon { width: 40px; height: 40px; border-radius: 10px; }
  body.ty-admin .kpi-card .kn { font-size: 23px; }
  body.ty-admin .quickgrid { display: grid !important; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
  body.ty-admin .qtile { min-height: 84px; }
  body.ty-admin .season-banner { height: 118px; margin: 0 0 14px; }
  body.ty-admin .season-banner .slogan { font-size: 16px; }
  body.ty-admin .period-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  body.ty-admin .period-tabs .ptab { flex: 1 0 auto; }
  body.ty-admin .wrap { margin: 14px auto; padding: 0 14px; }
  body.ty-admin .att-row { grid-template-columns: minmax(160px,220px) minmax(140px,1fr) 42px; gap: 8px; }
  body.ty-admin .att-row .att-name, body.ty-admin .att-rate { font-size: 12px; }
  body.ty-admin .att-track { height: 12px; }
  body.ty-admin input, body.ty-admin select, body.ty-admin textarea { min-height: 44px; font-size: 16px; }
  body.ty-admin button.act, body.ty-admin button.ghost { min-height: 44px; }
}
@media (max-width: 680px) {
  body.ty-admin .top { flex-wrap: wrap; gap: 8px; padding: 10px 12px !important; }
  body.ty-admin .top-actionrow > * { flex: 0 0 auto; white-space: nowrap; }
  body.ty-admin #side_btn { order: 0; flex: 0 0 40px; }
  body.ty-admin #t29_back { order: 0; flex: 0 0 auto; }
  body.ty-admin .campusdd { order: 1; flex: 1 1 auto; min-width: 0; }
  body.ty-admin .top-controls { order: 2; flex: 1 1 100%; flex-direction: column; align-items: stretch; gap: 8px; }
  body.ty-admin .top-actionrow { width: 100%; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; scrollbar-width: thin; }
  body.ty-admin .topright { max-width: none; overflow: visible; padding-bottom: 0; }
  body.ty-admin .searchwrap { flex: 0 0 100%; width: 100%; max-width: none; margin: 0; }
  body.ty-admin .usermenu { position: fixed; top: 116px; right: 12px; max-height: calc(100vh - 130px); overflow: auto; }
  body.ty-admin .top .brand { max-width: none; }
  body.ty-admin .top button, body.ty-admin .top .fonts button, body.ty-admin .font-select, body.ty-admin .top-workbench { min-height: 44px; }
}
@media (max-width: 600px) {
  body.ty-admin .cards { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 12px; }
  body.ty-admin .cards > :last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  body.ty-admin .kpi-row { grid-template-columns: 1fr; }
  body.ty-admin .kpi-card { min-height: 88px; }
  body.ty-admin .quickgrid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  body.ty-admin .qtile { padding: 12px 4px; }
  body.ty-admin .qtile .lb { font-size: 12px; }
  body.ty-admin .top .brand { max-width: 210px; font-size: 14px; }
  body.ty-admin .searchwrap { flex-basis: 100%; order: 5; max-width: none; margin: 2px 0 0; }
  body.ty-admin .topright { max-width: none; overflow: visible; padding-bottom: 0; }
  body.ty-admin .att-row { grid-template-columns: minmax(150px,210px) minmax(130px,1fr) 40px; gap: 8px; }
}
button.ty-btn.ty-danger-ink { color: #DC2626; }
button.ty-btn.ty-ok-ink { color: #16A34A; }
button.ty-btn.ty-warn-ink { color: #B45309; }
button.ty-btn.ty-pad-1 { padding: 6px 10px; }
button.ty-btn.ty-pad-2 { padding: 6px 8px; }
button.ty-btn.ty-pad-3 { padding: 3px 8px; font-size: 12px; margin-left: 2px; }
button.ty-btn.ty-pad-4 { padding: 3px 6px; font-size: 12px; }
