/* Uploaded teacher UI adapted to the existing application's DOM and actions. */
html[data-theme="light"] { --bg:#f3f7ff; --text:#17263f; --text-2:#657b9d; --text-3:#8295b3; --line:#e6edf9; --primary:#2463ff; --primary-weak:#e7efff; --r-l:18px; --shadow-s:0 4px 22px #284f9d04; }
.main:has(#home-grid) { max-width:1920px; padding:22px; }
/* 公共侧栏：所有一级页面共用同一套品牌区、导航、工作台设置和个人入口。
   之前只在 :has(#home-grid) 时套用，导致首页与学习/日常页面的侧栏外观不一致。 */
.sidebar { background:#f5f8ff; border-color:#e5edfb; width:232px; flex-basis:232px; padding:22px 12px; }
.sidebar .brand { padding:0 0 28px; gap:12px; }
.sidebar .brand-logo { font-size:0; width:50px; height:50px; border-radius:16px; background:url('../assets/teacher-ui/brand-avatar.png') center/cover; }

/* 工作台品牌图标：固定正方形，避免 flex-basis 与 width/height 不一致导致图片被压成椭圆。 */
.sidebar .brand-static .brand-logo {
  flex: 0 0 50px;
  width: 50px;
  height: 50px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.sidebar .brand-static .brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}
.sidebar .brand-name { font-size:16px; }
.sidebar .brand-sub { margin-top:7px; }
.sidebar .nav-item { min-height:46px; margin:3px 0; color:#526b94; }
.sidebar .nav-item.active { color:var(--primary); background:#e7f0ff; box-shadow:inset 0 0 0 1px #d8e5ff; }
.sidebar-foot .side-user-entry { min-height:58px; margin:8px 0 0; padding:8px 10px; border-top:1px solid #e5edfb; border-radius:10px; }
.sidebar-foot .side-user-entry.active { color:var(--primary); background:#e7f0ff; box-shadow:inset 0 0 0 1px #d8e5ff; }
.sidebar-foot .side-user-entry .side-user-avatar { background:#e7efff; color:var(--primary); }
.sidebar-foot .side-user-entry .side-user-label small { color:#8295b3; }
.teacher-toolbar { display:flex; align-items:center; gap:12px; margin-bottom:24px; padding:6px 8px 6px 16px; background:var(--card); border:1px solid var(--line); border-radius:18px; min-height:58px; }
.teacher-toolbar .searchbar { flex:1; min-width:0; margin:0; border:0; background:transparent; box-shadow:none; }
.teacher-toolbar input { font-size:14px; }
.teacher-toolbar .sb-go { background:var(--primary); color:white; border-radius:13px; width:46px; height:42px; }
.teacher-toolbar > .btn { flex-shrink:0; min-height:42px; border:1px solid var(--line); background:var(--card); }
.main:has(#home-grid) .topbar { grid-template-columns:minmax(0,1.35fr) minmax(0,1fr); gap:20px; margin-bottom:20px; }
.main:has(#home-grid) .topbar > .card { min-height:275px; border:1px solid var(--line); border-radius:18px; }
.main:has(#home-grid) .clk-card { position:relative; padding:28px; background:#d8e6ff url('../assets/teacher-ui/hero-scene.webp') center/cover no-repeat; color:#17263f; display:grid; grid-template-columns:minmax(0,1.3fr) minmax(160px,1fr); grid-template-rows:auto 1fr auto; gap:12px 20px; }
.clk-card .clk-hello { grid-column:1; margin:0; align-items:flex-start; }
.clk-card .ah-btn { width:36px!important; height:36px!important; }
.clk-card .clk-greet { color:#17263f; font-size:clamp(18px,1.7vw,28px); white-space:normal; }
.clk-card .clk-greet-sub { color:#637fa9; margin-top:12px; white-space:normal; line-height:1.6; }
.clk-card #theme-btn { position:absolute; right:10px; top:10px; color:#486998; }
.clk-card .quote-top { grid-column:1; grid-row:2/4; padding:0; margin:0; border:0; background:none; box-shadow:none; align-self:start; }
.clk-card .qt-head { justify-content:flex-end; }
.clk-card .qt-head .card-title { display:none; }
.clk-card .quote-en { color:#305c98; font-size:15px; line-height:1.6; }
.clk-card .quote-zh { color:#6784ad; font-size:13px; }
.clk-card .quote-by { color:#617b9f; font-size:11px; }
.clk-card .clock-row { grid-column:2; grid-row:2; align-self:center; flex-wrap:wrap; gap:4px; }
.clk-card .clock { font-family:inherit; font-size:clamp(36px,4vw,64px); color:#14233c; font-weight:750; letter-spacing:-2px; }
.clk-card .clock .sec { color:#243e62; }
.clk-card .clock-date { grid-column:2; grid-row:1; color:#375b8d; align-self:center; font-size:13px; }
.clk-card .clk-foot { grid-column:2; grid-row:3; align-self:start; color:#54739e; padding:10px; margin:0; background:#ffffff50; border-radius:24px; flex-wrap:wrap; font-size:11px; }
.clk-card .clk-foot b { color:#243e62; }
.main:has(#home-grid) .wx-card { background:var(--card); padding:22px; }
.wx-card .wx-body { flex-direction:row; gap:16px; align-items:flex-start; }
.wx-card .wx-body > #wx-brief { min-width:0; flex:1; }
.wx-card .wx-aside { display:block; flex:0 0 125px; border-left:1px dashed var(--line); padding-left:14px; }
.wx-card .wx-aside .wx-days { display:flex; flex-direction:column; gap:4px; }
.wx-card .wx-aside .wx-day { display:flex; justify-content:space-between; padding:2px 0; background:none; gap:4px; font-size:10px; }
.wx-card .wx-aside .wx-day .wx-bar { display:none; }
.wx-card .wx-aside .wx-day .e { font-size:14px; }
.wx-card .wx-aside .wx-day > span { font-size:10px; }
.wx-card .wx-aside .wx-day > span:nth-last-child(2) { display:none; }
.main:has(#home-grid) .cd-bar { margin:0 0 18px; border-radius:14px; }
.main:has(#home-grid) .home-grid { gap:18px; grid-template-columns:minmax(0,1.45fr) minmax(0,1fr); }
.main:has(#home-grid) .home-col { gap:18px; }
.main:has(#home-grid) .home-card { border:1px solid var(--line); border-radius:18px; box-shadow:var(--shadow-s); overflow:hidden; }
.home-card .hc-head { padding:20px 18px 14px; }
.home-card .card-title { font-size:19px; font-weight:700; }
.home-card .card-title > svg { color:var(--primary); background:#edf3ff; box-sizing:content-box; padding:8px; border-radius:50%; }
.home-card .card-title .more { color:var(--primary); font-size:12px; }
.home-card .quick-inline { background:none; }
.home-card .qi-row { background:var(--bg); border:1px solid var(--line); padding:8px 10px; border-radius:12px; }
.home-card .list-item { border:1px solid var(--line); border-radius:14px; margin:8px 0; padding:14px 12px; }
.home-card .cal-head { flex-wrap:wrap; gap:5px; }
.home-card .cal-grid { gap:7px 2px; }
.home-card .cal-week { color:#8295b3; }
.home-card .cal-legend { flex-wrap:wrap; gap:12px; }
.teacher-layout-edit .home-card { outline:2px dashed var(--primary); outline-offset:3px; }
@media(min-width:1450px) {
 .main:has(#home-grid) .home-grid { grid-template-columns:minmax(0,1.4fr) minmax(0,.8fr) minmax(0,1.05fr); align-items:stretch; }
 .main:has(#home-grid) .home-col { display:contents; }
 .home-grid #today-courses .empty { min-height:260px; display:flex; flex-direction:column; justify-content:center; background:var(--bg); border-radius:14px; }
}
@media(max-width:1150px) {
 .main:has(#home-grid) .topbar { grid-template-columns:1fr; }
 .main:has(#home-grid) .topbar > .card { min-height:235px; }
 .wx-card .wx-aside { flex-basis:40%; }
}
@media(max-width:780px) {
 .main:has(#home-grid) { padding:12px 12px calc(84px + env(safe-area-inset-bottom)); }
 /* 侧栏在所有页面统一由 app.css 的移动端断点隐藏，改用同一套底部导航。 */
 .teacher-toolbar { padding:4px; gap:3px; margin-bottom:14px; }
 .teacher-toolbar input { font-size:12px; }
 .teacher-toolbar > .btn { font-size:11px; padding:7px; }
 .main:has(#home-grid) .clk-card { padding:20px; grid-template-columns:1fr; gap:12px; }
 .clk-card .clk-hello,.clk-card .quote-top,.clk-card .clock-row,.clk-card .clock-date,.clk-card .clk-foot { grid-column:1; grid-row:auto; }
 .clk-card .clock-date { order:2; }
 .clk-card .clock { font-size:48px; }
 .main:has(#home-grid) .wx-card { padding:16px; }
 .wx-card .wx-aside { flex-basis:100px; padding-left:8px; }
 .main:has(#home-grid) .home-grid { grid-template-columns:1fr; }
 .home-card .card-title { font-size:17px; }
}
html[data-theme="dark"] .sidebar { background:var(--card); border-color:var(--line); }
html[data-theme="dark"] .sidebar-foot .side-user-entry { border-top-color:var(--line); }

/* ==========================================================================
   首页栅格布局（12 列）
   卡片位置由 homegrid.js 直接写 style（grid-column / grid-row），
   这里只负责「格子长什么样」和编辑态的手柄。
   ========================================================================== */

/* 特异性要压过上面那些 .main:has(#home-grid) .home-grid 的两列/三列规则，
   所以这里也用 #home-grid 本身，并且写在文件最后。 */
.main:has(#home-grid) #home-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 64px;
  gap: 14px;
  align-items: stretch;
  margin: 0;
}

.hg-item { position: relative; min-width: 0; min-height: 0; }
.hg-item[hidden] { display: none; }
.hg-item > .card { height: 100%; margin: 0; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.hg-item > .quote.quote-top { margin-bottom: 0; }

/* 个人信息卡：原来在顶栏里是「左问候 + 右时钟」两列大卡，
   现在只占 1/3 宽，两列会挤成一团，改成单列竖排。
   字号也要跟着收 —— 64px 的时钟在窄卡里会把数字顶出右边界。 */
.hg-item > .clk-card {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 18px 14px;
}
.hg-item > .clk-card .clk-hello { align-items: flex-start; gap: 10px; }
.hg-item > .clk-card .clk-hello .ah-btn { width: 42px !important; height: 42px !important; }
.hg-item > .clk-card .clk-greet { font-size: 17px; line-height: 1.35; white-space: normal; }
.hg-item > .clk-card .clk-greet-sub { margin-top: 6px; font-size: 12px; white-space: normal; line-height: 1.5; }
.hg-item > .clk-card .clock { font-size: clamp(26px, 2.4vw, 34px); letter-spacing: -1px; }
.hg-item > .clk-card .clock .sec { font-size: .46em; }
.hg-item > .clk-card .clock-row { margin-top: 4px; gap: 6px; }
.hg-item > .clk-card .clock-date { margin-top: 2px; font-size: 12px; }
.hg-item > .clk-card .clk-foot {
  margin-top: auto; padding: 7px 9px; font-size: 10.5px; line-height: 1.5;
  border-radius: 12px; flex-wrap: wrap; gap: 4px 8px;
}

/* 天气卡：内容顶到上沿，详细按钮贴底 */
.hg-item > .wx-card { display: flex; flex-direction: column; }
.hg-item > .wx-card .wx-body { flex: 1 1 auto; min-height: 0; }
.hg-item > .wx-card .wx-more { margin-top: auto; }

/* 日历卡内部自带宽高，容器变窄时让内容自己滚，别硬挤 */
.hg-item > .calendar-card { display: flex; flex-direction: column; }
.hg-item > .calendar-card .cal-grid { flex: 0 0 auto; }

/* ---------- 编辑模式的手柄 / 角标 ---------- */

.hg-grip, .hg-hide, .hg-resize { display: none; }

body.hg-edit .hg-grip {
  display: inline-flex; position: absolute; z-index: 6;
  top: -11px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 22px; border-radius: 11px;
  align-items: center; justify-content: center;
  background: var(--primary); color: #fff; cursor: grab;
  box-shadow: 0 3px 10px rgba(36, 99, 255, .35);
  touch-action: none;
}
body.hg-edit .hg-grip:active { cursor: grabbing; }

body.hg-edit .hg-hide {
  display: inline-flex; position: absolute; z-index: 6;
  top: -10px; right: 4px; width: 22px; height: 22px; padding: 0;
  border-radius: 50%; align-items: center; justify-content: center;
  background: var(--card); color: var(--red, #dc2626);
  border: 1px solid var(--line); cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}

body.hg-edit .hg-resize {
  display: block; position: absolute; z-index: 6;
  right: 2px; bottom: 2px; width: 18px; height: 18px;
  cursor: nwse-resize; touch-action: none;
  background: linear-gradient(135deg, transparent 48%, var(--primary) 48%);
  border-radius: 0 0 14px 0; opacity: .85;
}

/* 编辑态给每张卡片一个明显的边框，告诉用户「这块是可以动的」 */
body.hg-edit .hg-item > .card { outline: 2px dashed rgba(36, 99, 255, .45); outline-offset: 2px; }
body.hg-edit .hg-item > .card:hover { outline-color: var(--primary); }
body.hg-gesture { user-select: none; -webkit-user-select: none; }
body.hg-gesture .hg-item > .card { pointer-events: none; }
body.hg-gesture .hg-item.hg-dragging > .card,
body.hg-gesture .hg-item.hg-resizing > .card {
  pointer-events: auto;
  box-shadow: 0 16px 40px rgba(20, 40, 90, .22);
  outline: 2px solid var(--primary);
}

/* ---------- 编辑工具条 ---------- */
.hg-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 16px; padding: 10px 14px;
  background: var(--card); border: 1px solid var(--primary);
  border-radius: 14px; box-shadow: 0 6px 20px rgba(36, 99, 255, .1);
}
.hg-toolbar[hidden] { display: none; }
.hg-tb-hint { font-size: 12.5px; color: var(--text-2); }

/* ---------- 卡片管理面板 ---------- */
.hg-mlist { display: flex; flex-direction: column; gap: 8px; }
.hg-mrow {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px;
}
.hg-mname { flex: 1; font-weight: 600; font-size: 14px; }
.hg-mstate { font-size: 12px; padding: 2px 8px; border-radius: 999px; }
.hg-mstate.on { color: #166534; background: #dcfce7; }
.hg-mstate.off { color: #92400e; background: #fef3c7; }

/* ---------- 天气详情抽屉 ---------- */
.wx-drawer { display: flex; flex-direction: column; gap: 14px; }
.wxd-title { font-size: 13px; font-weight: 700; color: var(--text-2); }

/* ---------- 手机：单列 ---------- */
@media (max-width: 780px) {
  .main:has(#home-grid) #home-grid { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .hg-item > .card { height: auto; }
  .hg-item > .clk-card { min-height: 200px; }
  .hg-toolbar { padding: 8px 10px; gap: 6px; }
  .hg-tb-hint { width: 100%; }
  body.hg-edit .hg-grip { top: -9px; height: 20px; }
}

/* 手机单列：拖拽和缩放都不支持（一拖就和页面滚动抢手势），
   手柄/角标一律藏起来，只留「隐藏」按钮 —— 不显示用不了的控件。 */
.hg-grid.hg-mobile .hg-grip,
.hg-grid.hg-mobile .hg-resize { display: none !important; }


/* ==========================================================================
   Teacher Workbench · 科技教育风首页视觉升级
   仅覆盖首页视觉，不改动业务数据、接口、路由与交互逻辑。
   ========================================================================== */
html[data-theme="light"] {
  --bg: #f3f7ff;
  --card: #ffffff;
  --text: #172b4d;
  --text-2: #637b9d;
  --text-3: #8da0bc;
  --line: #e5edf9;
  --primary: #2563eb;
  --primary-weak: #eaf1ff;
  --shadow-s: 0 8px 26px rgba(35, 75, 140, .055);
}
.app:has(#home-grid) .main {
  background:
    radial-gradient(ellipse at 8% 0%, rgba(219, 234, 254, .58), transparent 34%),
    radial-gradient(ellipse at 96% 10%, rgba(224, 231, 255, .42), transparent 30%),
    var(--bg);
}
.main:has(#home-grid) {
  padding: 22px clamp(16px, 2vw, 30px) 34px;
}
.teacher-toolbar {
  min-height: 60px;
  margin-bottom: 18px;
  padding: 7px 9px 7px 18px;
  border: 1px solid rgba(220, 231, 248, .95);
  border-radius: 17px;
  box-shadow: 0 5px 20px rgba(36, 72, 130, .035);
  transition: box-shadow .2s ease, border-color .2s ease;
}
.teacher-toolbar:focus-within {
  border-color: #b9d0ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .07);
}
.teacher-toolbar .searchbar input::placeholder { color: #91a2bc; }
.teacher-toolbar .sb-go {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .18);
}
.teacher-toolbar > .btn {
  min-height: 42px;
  border-radius: 12px;
  font-weight: 650;
}
.main:has(#home-grid) .cd-bar {
  position: relative;
  min-height: 68px;
  margin: 0 0 18px;
  padding: 14px 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 17px;
  background: linear-gradient(105deg, #1677f9 0%, #3567e8 58%, #675fe4 100%);
  box-shadow: 0 10px 24px rgba(39, 103, 224, .16);
}
.main:has(#home-grid) .cd-bar::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: 7%;
  top: -155px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(255,255,255,.045), 0 0 0 46px rgba(255,255,255,.035);
  pointer-events: none;
}
.main:has(#home-grid) #home-grid {
  gap: 16px;
  grid-auto-rows: 66px;
}
.hg-item > .card,
.main:has(#home-grid) .topbar > .card {
  border: 1px solid rgba(225, 234, 248, .98);
  border-radius: 19px;
  box-shadow: 0 7px 24px rgba(34, 68, 125, .045);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.hg-item > .card:hover {
  border-color: #d5e3fb;
  box-shadow: 0 12px 30px rgba(34, 68, 125, .075);
}
.hg-item > .clk-card {
  background-color: #e6efff;
  background-position: center;
  background-size: cover;
  border-color: #dce8fb;
}
.hg-item > .clk-card .clk-greet { letter-spacing: -.35px; }
.hg-item > .clk-card .clock { letter-spacing: -1.5px; }
.hg-item > .quote.quote-top {
  padding: 20px 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(232, 240, 255, .75), transparent 42%),
    #fff;
}
.hg-item > .quote .qt-head { margin-bottom: 16px; }
.hg-item > .quote .quote-en {
  color: #1d3558;
  font-size: clamp(15px, 1.1vw, 18px);
  font-weight: 650;
  line-height: 1.65;
}
.hg-item > .quote .quote-zh { margin-top: 9px; line-height: 1.7; }
.hg-item > .wx-card { padding: 20px 22px; }
.hg-item > .wx-card .wxb-temp { font-size: 42px; font-weight: 650; letter-spacing: -1.5px; }
.home-card .hc-head { padding: 19px 20px 12px; }
.home-card .card-title { color: #1b3153; letter-spacing: -.2px; }
.home-card .card-title > svg {
  width: 18px;
  height: 18px;
  padding: 8px;
  background: #edf3ff;
  color: #2563eb;
  border-radius: 12px;
}
.home-card .hc-body { padding-left: 18px; padding-right: 18px; }
.home-card .list-item {
  border-color: #edf1f8;
  border-radius: 13px;
  background: #fff;
  transition: background .18s ease, border-color .18s ease;
}
.home-card .list-item:hover { background: #f8fbff; border-color: #dce8fb; }
.home-card .qi-row {
  min-height: 46px;
  border-radius: 13px;
  background: #f5f8ff;
  border-color: #e5edfb;
}
.home-card .qi-row input { min-width: 0; }
.home-card .cal-title { color: #1b3153; font-weight: 750; }
.home-card .cal-day {
  border-top: 1px solid #edf1f8;
  margin-top: 10px;
  padding-top: 10px;
}
.hg-toolbar {
  border-color: #d7e5ff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, .08);
}
.hg-toolbar .btn { border-radius: 10px; }
button, .btn, a { -webkit-tap-highlight-color: transparent; }
:where(button, input, select, textarea, a):focus-visible {
  outline: 3px solid rgba(37, 99, 235, .22);
  outline-offset: 2px;
}
@media (min-width: 1450px) {
  .main:has(#home-grid) #home-grid { gap: 18px; }
}
@media (max-width: 1150px) {
  .main:has(#home-grid) { padding: 16px; }
  .main:has(#home-grid) #home-grid { gap: 14px; }
}
@media (max-width: 780px) {
  .main:has(#home-grid) { padding: 12px 12px calc(88px + env(safe-area-inset-bottom)); }
  .teacher-toolbar { border-radius: 14px; }
  .main:has(#home-grid) .cd-bar { min-height: 58px; padding: 12px 14px; }
  .hg-item > .card { border-radius: 16px; }
  .home-card .hc-head { padding: 16px 15px 10px; }
}
html[data-theme="dark"] .app:has(#home-grid) .main {
  background: radial-gradient(ellipse at 10% 0%, rgba(37, 99, 235, .09), transparent 38%), var(--bg);
}
html[data-theme="dark"] .hg-item > .quote.quote-top { background: var(--card); }
html[data-theme="dark"] .home-card .list-item { background: var(--card); border-color: var(--line); }
html[data-theme="dark"] .home-card .list-item:hover { background: rgba(80, 120, 190, .1); }
html[data-theme="dark"] .home-card .qi-row { background: var(--bg); border-color: var(--line); }


/* ==========================================================================
   考勤工作台 · 科技教育风交互视觉
   仅调整布局与呈现；数据读写、表格编辑和确认逻辑仍走原业务模块。
   ========================================================================== */
.agl { gap: 22px; }
.agl-page-head, .agl-section-head, .att-section-heading {
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
}
.agl-page-head { padding: 4px 2px 2px; }
.agl-eyebrow { color:#4776c8; font-size:10px; font-weight:800; letter-spacing:1.35px; margin-bottom:7px; }
.agl-page-head h2 { margin:0; color:#172b4d; font-size:26px; line-height:1.2; font-weight:780; }
.agl-page-head p, .agl-section-head p, .att-section-heading p { margin:6px 0 0; color:#7185a5; font-size:13px; }
.agl-head-actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.agl-live { display:inline-flex; align-items:center; gap:7px; padding:7px 11px; border-radius:99px; background:#effaf4; color:#198754; font-size:11px; font-weight:650; }
.agl-live i { width:7px; height:7px; border-radius:50%; background:#20b26b; box-shadow:0 0 0 3px #20b26b20; }
.agl-stat-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; }
.agl-stat { min-width:0; display:flex; align-items:center; gap:13px; padding:17px 18px; border:1px solid #e6edf8; border-radius:16px; background:#fff; box-shadow:0 5px 20px rgba(31,70,130,.045); }
.agl-stat-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; flex:0 0 auto; }
.agl-stat-icon.blue { background:#eaf2ff; color:#2563eb; }
.agl-stat-icon.violet { background:#f1edff; color:#7957d5; }
.agl-stat-icon.green { background:#e8f8ef; color:#15945b; }
.agl-stat-icon.amber { background:#fff4e4; color:#d78a13; }
.agl-stat div { display:flex; flex-direction:column; gap:3px; min-width:0; }
.agl-stat b { color:#172b4d; font-size:24px; line-height:1; font-weight:780; font-variant-numeric:tabular-nums; }
.agl-stat small { color:#7b8eaa; font-size:12px; }
.agl-section-head { margin-top:2px; }
.agl-section-head h3, .att-section-heading h3 { margin:0; color:#1b3153; font-size:17px; font-weight:760; }
.agl-date, .att-grade-caption { color:#7185a5; font-size:12px; }
.agl-grid { max-width:none; grid-template-columns:repeat(auto-fit,minmax(min(100%,330px),1fr)); gap:16px; }
.agl-card { padding:18px; gap:12px; border-color:#e4ecf8; border-radius:18px; box-shadow:0 5px 20px rgba(31,70,130,.035); }
.agl-card:hover { transform:translateY(-2px); border-color:#b9d0ff; box-shadow:0 12px 28px rgba(37,99,235,.09); }
.agl-c-name { font-size:19px; color:#1b3153; }
.agl-c-meta { color:#7488a7; font-size:12px; }
.agl-c-meta b { color:#20395f; font-size:16px; }
.agl-c-bar { height:6px; background:#edf2fa; }
.agl-c-bar i { background:linear-gradient(90deg,#3285ff,#665fe6); }
.agl-status-list { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.agl-status-item { min-width:0; display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:9px 10px; border-radius:11px; background:#f7f9fd; }
.agl-status-item i { font-style:normal; color:#7286a5; font-size:11px; }
.agl-status-item .att-badge { white-space:nowrap; max-width:100%; }
.agl-c-foot { padding-top:2px; font-size:11px; }
.agl-new { min-height:190px; border:1.5px dashed #cbd9ef; background:rgba(255,255,255,.65); }
.agl-new .agl-plus { width:42px; height:42px; border-radius:14px; background:#edf4ff; color:#3475e8; }
.agl-new-t { font-size:14px; color:#49668f; }
.agl-foot { padding-top:8px; border-top:1px solid #e8eef8; }
.att-head { padding:4px 0 15px; border-bottom:1px solid #e8eef8; margin-bottom:16px; }
.att-cur b { font-size:23px; color:#172b4d; }
.att-day { padding:17px 18px; border-color:#e3ebf8; border-radius:17px; box-shadow:0 5px 20px rgba(31,70,130,.035); }
.ad-t { font-size:15px; color:#1b3153; }
.ad-slot { min-width:120px; padding:9px 13px; border-radius:12px; background:#f9fbff; }
.att-ops { padding:12px; margin:0 0 18px; border:1px solid #e6edf8; border-radius:15px; background:#fff; box-shadow:0 4px 16px rgba(31,70,130,.035); }
.att-groups-shell { padding:18px; border:1px solid #e4ecf8; border-radius:18px; background:#fff; box-shadow:0 5px 20px rgba(31,70,130,.035); }
.att-section-heading { margin-bottom:15px; }
.att-type-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:9px; padding:5px; margin-bottom:16px; border-radius:14px; background:#f3f6fc; }
.att-type-tab { display:flex; align-items:center; justify-content:center; gap:9px; min-width:0; padding:12px 14px; border:1px solid transparent; border-radius:11px; background:transparent; color:#617895; font:inherit; font-size:13px; font-weight:700; transition:.16s; }
.att-type-tab b { min-width:23px; padding:2px 6px; border-radius:99px; background:#e7edf7; color:#7386a2; font-size:10px; text-align:center; }
.att-type-tab:hover { color:#2563eb; background:#fff; }
.att-type-tab.on { color:#245ed6; background:#fff; border-color:#dce8fb; box-shadow:0 3px 10px rgba(37,99,235,.07); }
.att-type-tab.on b { color:#fff; background:#3475ed; }
.att-type-icon { display:grid; place-items:center; }
.att-group-panel[hidden] { display:none !important; }
.att-panel-intro { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:13px; }
.att-panel-intro > div { display:flex; flex-direction:column; gap:4px; }
.att-panel-intro b { color:#263c5d; font-size:14px; }
.att-panel-intro span { color:#8495ae; font-size:11px; }
.att-group-panel .asg-list { grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); }
.att-group-panel .att-card { padding:16px; border-radius:14px; border-color:#e8eef8; }
.att-group-panel .att-slot { min-height:150px; border-color:#cbd9ef; background:#f9fbff; }
@media (max-width: 1050px) {
  .agl-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 680px) {
  .agl-page-head h2 { font-size:22px; }
  .agl-head-actions { width:100%; }
  .agl-head-actions .btn { flex:1; justify-content:center; }
  .agl-stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; }
  .agl-stat { padding:12px; gap:9px; }
  .agl-stat-icon { width:36px; height:36px; }
  .agl-stat b { font-size:21px; }
  .agl-grid { grid-template-columns:1fr; }
  .agl-status-list { gap:5px; }
  .agl-status-item { padding:8px 7px; }
  .agl-status-item .att-badge { font-size:9px; }
  .att-groups-shell { padding:12px; }
  .att-type-tabs { gap:4px; padding:4px; }
  .att-type-tab { flex-direction:column; gap:4px; padding:9px 4px; font-size:11px; }
  .att-type-icon svg { width:16px; height:16px; }
}


/* ==========================================================================
   首页精修 · 个人信息 / 天气 / 课程状态 / 日历收起
   ========================================================================== */
.main:has(#home-grid) .teacher-toolbar .sb-go {
  width: 46px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg,#2877f5,#2059dc);
  box-shadow: 0 5px 12px rgba(37,99,235,.2);
}
.main:has(#home-grid) .teacher-toolbar .sb-go svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.5;
}

/* 个人信息卡：问候、日期、时钟分区，避免窄卡里文字和时间互相挤压 */
.hg-item > .clk-card {
  position: relative;
  gap: 0;
  padding: 19px 20px 15px;
  background:
    radial-gradient(ellipse at 92% 5%,rgba(255,255,255,.88),transparent 42%),
    linear-gradient(145deg,#edf4ff 0%,#dceaff 54%,#c9ddfb 100%);
  color: #17365f;
}
.hg-item > .clk-card .clk-head {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.hg-item > .clk-card .clk-hello {
  flex:1;
  min-width:0;
  align-items:center;
  gap:12px;
  margin:0;
}
.hg-item > .clk-card .clk-hello .ah-btn {
  width:48px!important;
  height:48px!important;
  border:3px solid rgba(255,255,255,.9);
  box-shadow:0 5px 16px rgba(45,91,160,.16);
}
.hg-item > .clk-card .clk-greet {
  color:#19375e;
  font-size:clamp(16px,1.25vw,20px);
  font-weight:800;
  white-space:normal;
}
.hg-item > .clk-card .clk-greet-sub {
  color:#6782a7;
  font-size:12px;
  line-height:1.55;
  white-space:normal;
}
.hg-item > .clk-card #theme-btn {
  position:static;
  flex:0 0 auto;
  margin:-4px -6px 0 0;
  color:#6c86aa;
  background:rgba(255,255,255,.48);
}
.hg-item > .clk-card .clk-main {
  display:flex;
  flex:1;
  min-height:0;
  flex-direction:column;
  justify-content:center;
  gap:9px;
  padding:14px 0 8px 60px;
}
.hg-item > .clk-card .clock-row {
  align-items:center;
  margin:0;
  gap:8px;
}
.hg-item > .clk-card .clock {
  color:#142f53;
  font-size:clamp(31px,2.4vw,43px);
  font-weight:800;
  letter-spacing:-1.7px;
}
.hg-item > .clk-card .clock .sec { color:#5678a8; }
.hg-item > .clk-card .msg-bell {
  margin:0;
  color:#6b85a8;
  background:rgba(255,255,255,.48);
}
.hg-item > .clk-card .clk-date-panel {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  gap:8px;
}
.hg-item > .clk-card .clock-date {
  margin:0;
  color:#48698f;
  font-size:12px;
}
.hg-item > .clk-card .wd-badge {
  border-radius:999px;
  padding:3px 9px;
  background:#2768e9;
  color:#fff;
  font-size:11px;
  font-weight:700;
}
.hg-item > .clk-card .clk-date-caption {
  color:#7b92b2;
  font-size:10.5px;
}
.hg-item > .clk-card .clk-foot {
  margin:0;
  padding:8px 11px;
  border:1px solid rgba(255,255,255,.62);
  border-radius:13px;
  background:rgba(255,255,255,.48);
  color:#607da4;
  font-size:11px;
}
.hg-item > .clk-card .clk-foot b { color:#254d80; }

/* 名言作者署名保留，去掉「点喇叭听英文」这类操作说明 */
.hg-item > .quote .quote-by { gap:0; }
.hg-item > .quote .quote-by #q-author { color:#8295b0; font-size:11.5px; }
.hg-item > .quote .quote-by #speak-tip { display:none; }

/* 天气图标本身可点开未来一周，不再把详细天气入口藏在文字里 */
.wxb-emoji-btn {
  display:inline-grid;
  place-items:center;
  flex:0 0 auto;
  padding:0;
  border:0;
  border-radius:50%;
  background:transparent;
  cursor:pointer;
  transition:transform .18s ease,filter .18s ease;
}
.wxb-emoji-btn:hover { transform:translateY(-2px) scale(1.08); filter:drop-shadow(0 5px 8px rgba(37,99,235,.18)); }
.wxb-emoji-btn:focus-visible { outline:3px solid rgba(37,99,235,.28); outline-offset:4px; }
.hg-item > .wx-card .wxb-emoji { font-size:30px; }

/* 今日课程：三种状态清楚区分，按钮放在每行右侧 */
#today-courses .course-row {
  min-height:72px;
  gap:11px;
  padding:11px 2px;
}
#today-courses .course-bar { align-self:stretch; width:4px; min-height:42px; border-radius:6px; }
#today-courses .course-time {
  flex:0 0 55px;
  font-size:12px;
  line-height:1.55;
  font-variant-numeric:tabular-nums;
}
#today-courses .course-main { flex:1; min-width:0; }
#today-courses .course-name { color:#263d5e; font-size:13px; font-weight:750; line-height:1.45; }
#today-courses .course-meta { display:flex; flex-wrap:wrap; align-items:center; gap:5px 8px; margin-top:5px; }
#today-courses .course-room { color:#8a9bb4; font-size:11.5px; }
#today-courses .course-state {
  display:inline-flex;
  align-items:center;
  min-height:19px;
  padding:2px 8px;
  border-radius:999px;
  font-size:10.5px;
  font-weight:700;
  white-space:nowrap;
}
#today-courses .state-upcoming { color:#4771a7; background:#edf3fb; }
#today-courses .state-ongoing { color:#137a53; background:#e4f7ee; }
#today-courses .state-done { color:#8492a6; background:#f0f2f6; }
#today-courses .course-action {
  flex:0 0 auto;
  min-width:78px;
  min-height:34px;
  padding:6px 9px;
  border:1px solid #dce6f5;
  border-radius:10px;
  background:#fff;
  color:#52709a;
  font-size:11.5px;
  font-weight:650;
  white-space:nowrap;
}
#today-courses .course-ongoing .course-action {
  border-color:#ccebdc;
  background:#f0fbf5;
  color:#16845b;
}
#today-courses .course-done .course-action { color:#687d9a; }

/* 日历：顶部月/周切换用方向图标，底部独立控制整张卡片收起 */
.cal-collapse-row {
  display:flex;
  justify-content:center;
  padding:9px 0 0;
  margin-top:auto;
}
.cal-collapse-row .btn {
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:5px 12px;
  border-radius:999px;
  color:#7186a5;
  background:#f5f8fd;
  font-size:11.5px;
}
.hg-item[data-hcard="calendar"].is-collapsed {
  grid-row:auto!important;
  min-height:0;
  align-self:start;
}
.hg-item[data-hcard="calendar"].is-collapsed > .calendar-card {
  height:auto;
  min-height:0;
  overflow:hidden;
  padding:14px 18px;
}
.hg-item[data-hcard="calendar"].is-collapsed > .calendar-card > :not(.hc-head):not(.cal-collapse-row) {
  display:none!important;
}
.hg-item[data-hcard="calendar"].is-collapsed .hc-head {
  padding:0;
}
.hg-item[data-hcard="calendar"].is-collapsed .cal-collapse-row {
  padding:5px 0 0;
}
.hg-item[data-hcard="calendar"].is-collapsed .cal-collapse-row .btn {
  padding:2px 9px;
  min-height:25px;
}

@media(max-width:1100px) {
  .hg-item > .clk-card .clk-main { padding-left:0; }
}
@media(max-width:780px) {
  .hg-item > .clk-card { min-height:220px; }
  .hg-item > .clk-card .clk-main { padding:12px 0 8px; }
  #today-courses .course-row { gap:7px; }
  #today-courses .course-time { flex-basis:48px; font-size:11px; }
  #today-courses .course-action { min-width:70px; padding:5px 7px; font-size:10.5px; }
}


/* 左上角品牌入口：点击「我的工作台」进入工作台设置 */
.brand-settings-entry {
  width: 100%; border: 0; background: transparent; color: inherit; font: inherit;
  text-align: left; cursor: pointer; border-radius: 12px; transition: background .15s ease;
}
.brand-settings-entry:hover,
.brand-settings-entry.is-current { background: var(--bg-sunken); }
.brand-settings-entry:focus-visible { outline: 3px solid rgba(37, 99, 235, .22); outline-offset: 2px; }
.brand-copy { display: flex; flex-direction: column; min-width: 0; }
.brand-settings-icon {
  width: 24px; height: 24px; flex: 0 0 24px; margin-left: auto; display: grid; place-items: center;
  border-radius: 8px; color: var(--text-3); opacity: .72; transition: .15s ease;
}
.brand-settings-entry:hover .brand-settings-icon,
.brand-settings-entry.is-current .brand-settings-icon {
  color: var(--primary); opacity: 1; background: var(--primary-weak);
}
/* 首页欢迎卡片同时展示工作台品牌文案与个人资料；个人资料由「我的-个人信息」维护 */
.hg-item > .clk-card .clk-profile-meta {
  margin-top: 5px; color: var(--text-2); opacity: .88; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere;
}
.hg-item > .clk-card .clk-profile-meta:empty { display: none; }
.hg-item > .clk-card.wb-brand-card.has-brand-image .clk-profile-meta { color: rgba(255,255,255,.84); }


/* ==========================================================================
   首页 UI 精修 · 布局编辑 / 个人资料 / 日期安排独立折叠
   ========================================================================== */

/* 顶部编辑布局入口：在普通状态和编辑状态之间给出清晰反馈 */
.teacher-toolbar .teacher-layout-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 118px;
  padding: 0 15px;
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 12px;
  background: linear-gradient(135deg, #347df4 0%, #245bdc 100%);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(37, 99, 235, .2);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.teacher-toolbar .teacher-layout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 9px 19px rgba(37, 99, 235, .25);
}
.teacher-toolbar .teacher-layout-btn.is-active {
  background: linear-gradient(135deg, #244fb9 0%, #4338a8 100%);
  box-shadow: 0 5px 14px rgba(49, 65, 160, .2);
}
.teacher-toolbar .teacher-layout-btn svg { width: 16px; height: 16px; }

/* 编辑工具条采用独立标题 + 操作分组，避免和普通搜索栏混在一起 */
.hg-toolbar {
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 15px;
  background: linear-gradient(120deg, var(--card), var(--primary-weak));
}
.hg-tb-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--primary);
  font-size: 13px;
  white-space: nowrap;
}
.hg-tb-title svg { width: 15px; height: 15px; }
.hg-tb-spacer { flex: 1 1 auto; }
.hg-toolbar .btn {
  min-height: 35px;
  padding: 7px 12px;
  border-radius: 10px;
  font-weight: 650;
}

/* 欢迎卡片：学校/学科与职务/年级分层呈现，资料较长时允许自然换行 */
.hg-item > .clk-card .clk-hello-t { flex: 1; min-width: 0; }
.hg-item > .clk-card .clk-profile-meta,
.hg-item > .clk-card .clk-profile-role {
  overflow-wrap: anywhere;
  line-height: 1.4;
}
.hg-item > .clk-card .clk-profile-meta {
  margin-top: 5px;
  color: #54749d;
  font-size: 10.5px;
}
.hg-item > .clk-card .clk-profile-role {
  margin-top: 2px;
  color: #7890b0;
  font-size: 10px;
}
.hg-item > .clk-card .clk-profile-role:empty { display: none; }

/* 选中日期信息栏独立折叠，不影响日历网格及整张日历卡片的收起状态 */
.cal-day-head { flex-wrap: wrap; align-items: center; }
.cal-day-head-spacer { flex: 1 1 auto; }
.cal-day-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 0 0 auto;
  min-height: 29px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-sunken);
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  transition: color .18s ease, background .18s ease, border-color .18s ease;
}
.cal-day-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-weak);
}
.cal-day-toggle svg { width: 13px; height: 13px; }
.cal-day-content {
  max-height: 360px;
  overflow: hidden;
  opacity: 1;
  transform: translateY(0);
  transition: max-height .25s ease, opacity .18s ease, transform .25s ease;
}
.cal-day.is-collapsed .cal-day-content {
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
}
.cal-day.is-collapsed .cal-day-head { margin-bottom: 0; }

@media (max-width: 780px) {
  .hg-toolbar { gap: 8px; padding: 10px; }
  .hg-tb-title { flex: 1 0 100%; }
  .hg-tb-spacer { display: none; }
  .hg-toolbar .btn { flex: 1 1 calc(50% - 8px); }
  .cal-day-head { gap: 6px; }
  .cal-day-head-spacer { display: none; }
  .cal-day-toggle { margin-left: auto; }
}

html[data-theme="dark"] .hg-item > .clk-card {
  border-color: #304b6d;
  background: linear-gradient(145deg, #172b46 0%, #203d61 100%);
  color: #edf4ff;
}
html[data-theme="dark"] .hg-item > .clk-card .clk-greet,
html[data-theme="dark"] .hg-item > .clk-card .clock { color: #edf4ff; }
html[data-theme="dark"] .hg-item > .clk-card .clk-greet-sub,
html[data-theme="dark"] .hg-item > .clk-card .clk-profile-meta,
html[data-theme="dark"] .hg-item > .clk-card .clk-profile-role { color: #a9bfdc; }
html[data-theme="dark"] .hg-item > .clk-card .clk-foot {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
  color: #b8cbe4;
}


/* 个人信息卡验收修订：资料与时钟分栏，身份信息独立成组 */
.hg-item > .clk-card {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(168px, .88fr);
  grid-template-rows: minmax(0, 1fr) auto;
  align-items: stretch;
  column-gap: 18px;
  row-gap: 10px;
  padding: 18px 20px 14px;
  overflow: hidden;
}
.hg-item > .clk-card .clk-head {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  align-items: flex-start;
  gap: 8px;
}
.hg-item > .clk-card .clk-hello {
  align-items: flex-start;
  gap: 11px;
}
.hg-item > .clk-card .clk-hello .ah-btn {
  flex: 0 0 46px;
  width: 46px !important;
  height: 46px !important;
}
.hg-item > .clk-card .clk-hello-t {
  min-width: 0;
}
.hg-item > .clk-card .clk-greet {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.hg-item > .clk-card .clk-greet-sub {
  margin-top: 5px;
  font-size: 11.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
.hg-item > .clk-card .clk-profile-details {
  margin-top: 9px;
  padding: 8px 10px;
  border: 1px solid rgba(255,255,255,.72);
  border-radius: 12px;
  background: rgba(255,255,255,.48);
  box-shadow: 0 3px 12px rgba(55, 91, 143, .06);
}
.hg-item > .clk-card .clk-profile-label {
  margin-bottom: 4px;
  color: #7890b0;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
}
.hg-item > .clk-card .clk-profile-meta,
.hg-item > .clk-card .clk-profile-role {
  margin: 0;
  color: #45668f;
  font-size: 10.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.hg-item > .clk-card .clk-profile-role {
  margin-top: 2px;
  color: #7189aa;
}
.hg-item > .clk-card #theme-btn {
  margin: -4px -5px 0 0;
}
.hg-item > .clk-card .clk-main {
  grid-column: 2;
  grid-row: 1;
  min-width: 0;
  align-self: center;
  justify-content: center;
  gap: 10px;
  padding: 0;
}
.hg-item > .clk-card .clock-row {
  flex-wrap: nowrap;
  gap: 6px;
}
.hg-item > .clk-card .clock {
  font-size: clamp(29px, 2.35vw, 42px);
  letter-spacing: -1.4px;
  white-space: nowrap;
}
.hg-item > .clk-card .msg-bell {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
}
.hg-item > .clk-card .clk-date-panel {
  gap: 6px;
}
.hg-item > .clk-card .clock-date {
  font-size: 11.5px;
}
.hg-item > .clk-card .wd-badge {
  padding: 3px 7px;
  font-size: 10px;
}
.hg-item > .clk-card .clk-foot {
  grid-column: 1 / -1;
  grid-row: 2;
  justify-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 7px 10px;
  border-radius: 11px;
  font-size: 10.5px;
}
html[data-theme="dark"] .hg-item > .clk-card .clk-profile-details {
  border-color: rgba(255,255,255,.12);
  background: rgba(255,255,255,.07);
}
html[data-theme="dark"] .hg-item > .clk-card .clk-profile-label {
  color: #9bb4d4;
}
html[data-theme="dark"] .hg-item > .clk-card .clk-profile-meta,
html[data-theme="dark"] .hg-item > .clk-card .clk-profile-role {
  color: #b8cbe4;
}
@media (max-width: 780px) {
  .hg-item > .clk-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    row-gap: 12px;
    padding: 17px;
  }
  .hg-item > .clk-card .clk-head {
    grid-column: 1;
    grid-row: 1;
  }
  .hg-item > .clk-card .clk-main {
    grid-column: 1;
    grid-row: 2;
    padding: 0;
  }
  .hg-item > .clk-card .clock {
    font-size: clamp(34px, 9vw, 46px);
  }
  .hg-item > .clk-card .clk-foot {
    grid-column: 1;
    grid-row: 3;
    flex-wrap: wrap;
  }
}


/* 首页截图验收修订：主题按钮置右上、消息铃铛置右下，个人资料左对齐 */
.hg-item > .clk-card .clk-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: start;
  min-width: 0;
}
.hg-item > .clk-card .clk-hello {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}
.hg-item > .clk-card .clk-profile-details {
  grid-column: 1;
  grid-row: 2;
  width: 100%;
  margin: 10px 0 0;
  box-sizing: border-box;
  text-align: left;
}
.hg-item > .clk-card #theme-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 3;
  margin: 0;
}
.hg-item > .clk-card .clk-main {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  align-self: stretch;
  min-height: 0;
  padding: 0 0 40px;
}
.hg-item > .clk-card .msg-bell {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 2;
  margin: 0;
}
@media (max-width: 780px) {
  .hg-item > .clk-card .clk-head {
    grid-column: 1;
    grid-row: 1;
  }
  .hg-item > .clk-card .clk-main {
    grid-column: 1;
    grid-row: 2;
    min-height: 112px;
    padding: 0 0 40px;
  }
  .hg-item > .clk-card .clk-foot {
    grid-column: 1;
    grid-row: 3;
  }
}


/* Teacher dashboard redesign — scoped to the home route only */
.home-redesign-app { min-height:100vh; background:#edf5fb; }
.home-redesign-app > .sidebar.home-sidebar {
 width:296px; flex:0 0 296px; min-height:100vh; height:100vh; padding:0 14px 14px; gap:8px; overflow:hidden;
 background:#f3f7fc; background-image:linear-gradient(180deg,rgba(244,249,255,.08),rgba(245,249,255,.2) 48%,rgba(244,249,255,.88) 74%,#f4f8fd),url('../assets/teacher-ui/hero-scene.webp');
 background-repeat:no-repeat; background-size:100% 100%,auto 100%; background-position:center; border-right:1px solid #dbe7f2;
}
.home-sidebar .brand.home-side-profile { display:flex; flex:0 0 auto; flex-direction:column; align-items:center; gap:0; min-height:264px; margin:0 -14px 6px; padding:42px 18px 18px; background:linear-gradient(180deg,rgba(255,255,255,.08),rgba(255,255,255,.18) 58%,rgba(245,249,255,.88)); border-bottom:1px solid rgba(190,211,232,.55); text-align:center; }
.home-side-avatar { display:grid; place-items:center; width:104px; height:104px; margin-bottom:12px; border-radius:50%; background:rgba(255,255,255,.7); border:3px solid rgba(255,255,255,.95); box-shadow:0 7px 24px rgba(49,92,140,.18); }
.home-side-avatar .ah-btn { display:grid; place-items:center; width:92px!important; height:92px!important; overflow:hidden; border:0; border-radius:50%; background:linear-gradient(135deg,#dceeff,#aac8e8); }
.home-side-avatar .ah-btn img { width:100%; height:100%; object-fit:cover; }
.home-side-name { color:#142d4b; font-family:"STSong","Songti SC","Noto Serif SC",serif; font-size:25px; font-weight:700; letter-spacing:.08em; }
.home-side-motto { margin-top:7px; color:#536b8b; font-family:"STSong","Songti SC","Noto Serif SC",serif; font-size:14px; letter-spacing:.08em; }
.home-side-meta,.home-side-role { max-width:100%; margin-top:8px; color:#58718e; font-size:10.5px; line-height:1.4; overflow-wrap:anywhere; }
.home-side-role { margin-top:2px; color:#7890aa; }
.home-sidebar .side-nav { padding:0 1px; margin:0; flex:1 1 auto; }
.home-sidebar .nav-item { min-height:46px; margin:3px 0; padding:10px 14px; border-radius:12px; color:#455f7d; font-size:14px; font-weight:550; }
.home-sidebar .nav-item:hover { color:#1769ca; background:rgba(221,237,255,.72); }
.home-sidebar .nav-item.active { color:#fff; background:linear-gradient(100deg,#1479e8,#1764d5); box-shadow:0 5px 14px rgba(28,106,207,.2); }
.home-sidebar .nav-item.active .ni { color:#fff; }
.home-sidebar .nav-sub { border-color:rgba(112,147,183,.28); }
.home-sidebar .sidebar-foot { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:5px; padding-top:9px; border-top:1px solid rgba(178,202,225,.55); }
.home-sidebar .sidebar-foot .nav-item { min-height:36px; margin:0; padding:7px 8px; gap:6px; background:rgba(255,255,255,.52); border:1px solid rgba(206,220,236,.7); border-radius:10px; font-size:11.5px; white-space:nowrap; }
.home-sidebar .sidebar-foot #side-user {
  grid-column:1 / -1; display:flex; align-items:center; min-height:48px;
  margin:0; padding:7px 10px; gap:10px; justify-content:flex-start;
  border:1px solid rgba(206,220,236,.78); border-radius:10px;
  background:rgba(255,255,255,.68); color:#405a78;
}
.home-sidebar .sidebar-foot #side-user .side-user-avatar {
  display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px;
  border:0; border-radius:50%; background:#e0edff; color:#176bd4;
  font-size:12px; font-weight:750;
}
.home-sidebar .sidebar-foot #side-user .side-user-label {
  display:flex; flex:1; min-width:0; flex-direction:column; gap:2px; line-height:1.25;
}
.home-sidebar .sidebar-foot #side-user .side-user-label strong { color:inherit; font-size:12px; font-weight:750; }
.home-sidebar .sidebar-foot #side-user .side-user-label small { overflow:hidden; color:#71869f; font-size:10px; text-overflow:ellipsis; white-space:nowrap; }
.home-sidebar .sidebar-foot #side-user.active { color:#176bd4; background:#eaf3ff; border-color:#c9def9; }

.home-redesign-app > .main.home-redesign { width:calc(100% - 296px); max-width:none; min-width:0; margin:0; padding:0 18px 28px; background:radial-gradient(ellipse at 18% 0%,rgba(211,231,249,.6),transparent 38%),#edf5fb; }
.home-redesign .home-topbar { position:sticky; top:0; z-index:35; display:flex; align-items:center; gap:16px; min-height:62px; margin:0 -18px 14px; padding:10px 22px; background:rgba(255,255,255,.88); border-bottom:1px solid rgba(216,228,240,.9); box-shadow:0 3px 16px rgba(39,77,119,.04); backdrop-filter:blur(18px) saturate(150%); }
.home-redesign .home-topbar .searchbar { flex:1 1 300px; max-width:430px; min-width:180px; height:42px; border:1px solid #d5dfeb; border-radius:11px; background:rgba(255,255,255,.84); }
.home-top-actions { display:flex; flex:1 1 auto; justify-content:flex-end; align-items:center; gap:8px; min-width:0; }
.home-action { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:0 12px; border:1px solid transparent; border-radius:10px; font-size:12px; font-weight:650; white-space:nowrap; box-shadow:0 2px 6px rgba(34,76,122,.07); }
.home-action svg { width:16px; height:16px; }
.home-action-outline { color:#1765d4; background:#fff; border-color:#2c75ee; }
.home-action-primary { color:#fff; background:linear-gradient(120deg,#176fe2,#0758c8); }
.home-action-blue { color:#1266d4; background:#e4f0ff; border-color:#c7dcfb; }
.home-action-orange { color:#d65d13; background:#fff0e4; border-color:#ffd7bd; }
.home-action-green { color:#18834c; background:#e5f6eb; border-color:#c8ebd4; }
.home-redesign .home-layout-toolbar { display:flex; flex-wrap:wrap; margin:0 0 12px; padding:10px 14px; border:1px solid #d8e5f2; border-radius:14px; background:rgba(255,255,255,.92); }
.home-redesign .home-layout-toolbar[hidden] { display:none; }
.home-redesign .home-dashboard-grid { display:grid; grid-template-columns:repeat(12,minmax(0,1fr)); grid-auto-rows:68px; gap:14px; align-items:stretch; min-width:0; }
.home-redesign .home-dashboard-grid > .hg-item { position:relative; min-width:0; min-height:0; height:100%; }
.home-redesign .home-dashboard-grid > .hg-item > .card { position:relative; display:flex; flex-direction:column; width:100%; height:100%; min-width:0; min-height:0; margin:0; padding:15px 17px; overflow:hidden; border:1px solid rgba(214,227,240,.96); border-radius:18px; background:rgba(255,255,255,.94); box-shadow:0 4px 16px rgba(38,76,117,.07); }
.home-redesign .home-dashboard-grid > .hg-item > .hg-grip,.home-redesign .home-dashboard-grid > .hg-item > .hg-hide,.home-redesign .home-dashboard-grid > .hg-item > .hg-resize { z-index:8; }
.home-redesign .home-card-head,.home-redesign .home-mini-head { display:flex; align-items:center; gap:10px; min-height:26px; margin-bottom:8px; }
.home-redesign .home-card-title { display:inline-flex; align-items:center; gap:9px; min-width:0; color:#152b45; font-size:16px; font-weight:750; }
.home-redesign .home-card-title>svg { color:#176be0; flex:0 0 auto; }
.home-redesign .home-card-link { display:inline-flex; align-items:center; gap:3px; margin-left:auto; padding:4px 0; color:#2467bd; background:transparent; font-size:12px; font-weight:600; white-space:nowrap; }
.home-redesign .home-count-chip { display:inline-grid; place-items:center; min-width:23px; height:22px; padding:0 6px; border-radius:99px; color:#1474ca; background:#e6f3fb; font-size:11px; font-weight:750; }

.home-redesign .home-timeline-card { padding:11px 16px 8px!important; }
.home-timeline-times { display:grid; grid-template-columns:repeat(11,minmax(0,1fr)); margin:0 3px 4px; color:#7b8ba1; font-size:10px; font-variant-numeric:tabular-nums; }
.home-timeline-times span { text-align:center; white-space:nowrap; }
.home-timeline-times span:first-child { text-align:left; }.home-timeline-times span:last-child { text-align:right; }
.home-timeline-track { position:relative; flex:1 1 auto; min-height:64px; border:1px dashed #d7e2ef; border-radius:11px; overflow:hidden; background-color:#fbfdff; background-image:repeating-linear-gradient(to right,transparent 0,transparent calc(10% - 1px),rgba(197,213,230,.55) calc(10% - 1px),rgba(197,213,230,.55) 10%); }
.timeline-event { position:absolute; top:calc(4px + var(--event-lane)*30px); left:var(--event-left); width:var(--event-width); min-width:52px; height:25px; display:flex; flex-direction:column; justify-content:center; padding:2px 6px; overflow:hidden; border:0; border-radius:7px; color:#fff; text-align:left; }
.timeline-event b { font-size:9.5px; }.timeline-event span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:10px; font-weight:650; }
.timeline-event.course { background:linear-gradient(120deg,#1975e8,#438be8); }.timeline-event.invig { background:linear-gradient(120deg,#f27b2f,#f39b4d); }.timeline-event.task { background:linear-gradient(120deg,#3189bd,#56a7c8); }.timeline-event.meeting { background:linear-gradient(120deg,#31a66b,#52b883); }
.timeline-now { position:absolute; top:0; bottom:0; z-index:5; width:2px; background:#2563eb; pointer-events:none; }.timeline-now i { position:absolute; top:-3px; left:-4px; width:8px; height:8px; border-radius:50%; background:#2563eb; }
.timeline-empty { position:absolute; inset:0; display:grid; place-items:center; color:#91a1b5; font-size:12px; }
.home-timeline-legend { display:flex; align-items:center; gap:16px; padding:5px 3px 0; color:#526b87; font-size:10px; }.home-timeline-legend span { display:inline-flex; align-items:center; gap:6px; }.timeline-dot { width:8px; height:8px; border-radius:50%; display:inline-block; }.timeline-dot.course { background:#1877e8; }.timeline-dot.invig { background:#f18a36; }.timeline-dot.task { background:#3197c5; }.timeline-dot.meeting { background:#35aa70; }

.home-redesign .home-welcome-card { justify-content:space-between; padding:11px 14px 9px!important; background:linear-gradient(100deg,rgba(234,244,255,.94),rgba(255,255,255,.83) 55%,rgba(255,255,255,.5)),url('../assets/teacher-ui/hero-scene.webp') center/cover; }
.home-welcome-top { display:flex; align-items:flex-start; gap:10px; }.home-welcome-copy { min-width:0; }
.home-welcome-card .clk-greet { color:#102d4b; font-family:"STSong","Songti SC","Noto Serif SC",serif; font-size:clamp(18px,1.35vw,22px); font-weight:800; line-height:1.2; }
.home-welcome-card .clk-greet-sub { margin-top:4px; color:#59728e; font-size:10px; line-height:1.25; }
.home-welcome-date { display:flex; align-items:center; gap:8px; margin-top:3px; color:#526b86; font-size:10.5px; }.home-date-full { font-variant-numeric:tabular-nums; font-weight:650; }.home-week-badge { color:#266bc4; }
.home-welcome-clock-row { display:flex; align-items:center; gap:10px; margin-top:-2px; }.home-welcome-card .clock { color:#102d4b; font-size:clamp(26px,1.9vw,32px); font-weight:800; letter-spacing:-1.2px; line-height:1; font-variant-numeric:tabular-nums; }.home-welcome-card .clock .sec { margin-left:4px; color:#7290ae; font-size:.42em; }.home-welcome-card .msg-bell { margin-left:auto; flex:0 0 30px; }
.home-welcome-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:5px; margin-top:4px; }.home-welcome-stats>button { display:flex; align-items:center; gap:5px; min-width:0; min-height:29px; padding:4px 5px; border:1px solid rgba(255,255,255,.88); border-radius:9px; background:rgba(255,255,255,.76); text-align:left; }
.welcome-stat-icon { display:grid; place-items:center; flex:0 0 22px; width:22px; height:22px; border-radius:7px; }.welcome-stat-icon.blue { color:#176de0; background:#e4f0ff; }.welcome-stat-icon.orange { color:#e97825; background:#fff0e4; }.welcome-stat-icon.green { color:#239c62; background:#e5f7ed; }.welcome-stat-icon.red { color:#db4b4b; background:#fff0ef; }
.welcome-stat-copy { display:flex; flex-direction:column; min-width:0; }.welcome-stat-copy small { color:#6b8098; font-size:8.5px; white-space:nowrap; }.welcome-stat-copy b { color:#193653; font-size:11px; white-space:nowrap; }.home-welcome-card .clk-foot { display:none; }

.home-redesign .home-course-card { padding:15px 18px 12px!important; }.home-course-card #today-courses { flex:1 1 auto; min-height:0; padding:0!important; overflow:auto; }.home-course-card .course-row { min-height:52px; padding:7px 5px; border-bottom:1px solid #e7edf4; }.home-course-card .course-time { width:74px; color:#213c5a; font-size:12px; font-weight:700; }.home-course-card .course-name { color:#182d47; font-size:13px; font-weight:700; }.home-course-footer { display:flex; align-items:center; gap:8px; padding-top:8px; border-top:1px solid #edf1f6; }
.home-redesign .home-weather-card { padding:14px 17px 11px!important; background:linear-gradient(110deg,rgba(255,255,255,.96),rgba(237,247,255,.84)),url('../assets/teacher-ui/hero-scene.webp') center/cover; }.home-weather-card .wx-body { flex:1; min-height:0; }.home-weather-card .wxb-temp { color:#18334f; font-size:37px; font-weight:800; }.home-weather-card .wx-more { align-self:flex-end; margin-top:auto; }
.home-redesign .home-todo-card { padding:14px 17px 12px!important; }.home-todo-card #today-items { flex:1 1 auto; min-height:0; padding:0 2px 5px!important; overflow:auto; }.home-todo-card .task-row { min-height:36px; padding:6px 2px; border-bottom:1px solid #edf1f5; }.home-todo-card .quick-inline { padding:8px 0 0!important; }.home-todo-card .qi-row { min-height:40px; padding:3px 7px; border:1px solid #e2eaf4; border-radius:11px; background:#f8fbff; }
.home-redesign .home-quote-card { justify-content:flex-start; padding:14px 16px!important; background:linear-gradient(180deg,rgba(255,255,255,.94),rgba(245,250,255,.83) 65%,rgba(236,245,252,.56)),url('../assets/teacher-ui/hero-scene.webp') center bottom/cover; }.home-quote-card .quote-en { color:#1c3c66; font-family:Georgia,serif; font-size:17px; font-style:italic; line-height:1.45; }.home-quote-card .quote-zh { margin-top:8px; color:#385775; font-size:12px; }
.home-redesign .home-calendar-card { padding:14px 16px 11px!important; }.home-calendar-card .cal-title { color:#152f4b; font-size:17px; font-weight:750; }.home-calendar-card .cal-grid { gap:4px 2px; }
.home-redesign .home-mini-card { justify-content:flex-start; padding:13px 15px!important; background:linear-gradient(145deg,rgba(255,255,255,.96),rgba(247,250,253,.96)); }.home-mini-head b { color:#1b334d; font-size:15px; font-weight:750; }.home-mini-icon { display:grid; place-items:center; flex:0 0 30px; width:30px; height:30px; border-radius:9px; }.home-mini-icon.blue { color:#176de0; background:#e7f1ff; }.home-mini-icon.orange { color:#e76f1e; background:#fff0e4; }.home-mini-body { min-width:0; color:#405875; }
.mini-number-row { display:flex; align-items:baseline; gap:15px; color:#516985; font-size:12px; }.mini-number-row b { color:#176bd9; font-size:21px; font-weight:800; }.mini-progress { height:6px; margin:8px 0 5px; border-radius:99px; overflow:hidden; background:#e8eff6; }.mini-progress i { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#287ce7,#4b9be9); }.mini-foot { color:#7b8da2; font-size:10.5px; line-height:1.45; }.mini-primary-line { overflow:hidden; color:#294765; font-size:13px; font-weight:750; text-overflow:ellipsis; white-space:nowrap; }.mini-empty,.mini-loading { color:#8b9db1; font-size:11px; }
.recent-note-row { display:flex; align-items:center; gap:7px; width:100%; padding:3px 0; overflow:hidden; color:#49627d; background:transparent; text-align:left; font-size:11px; }.recent-note-row b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:550; }
html[data-theme="dark"] .home-redesign-app { background:#111b2a; } html[data-theme="dark"] .home-redesign-app>.sidebar.home-sidebar { background-color:#182b42; border-color:#2d4661; }
html[data-theme="dark"] .home-side-name,html[data-theme="dark"] .home-welcome-card .clk-greet,html[data-theme="dark"] .home-welcome-card .clock { color:#eef5ff; }
html[data-theme="dark"] .home-redesign-app>.main.home-redesign { background:#111b2a; } html[data-theme="dark"] .home-redesign .home-dashboard-grid>.hg-item>.card { background-color:#1b2a3e; border-color:#314963; color:#e6eef8; }
html[data-theme="dark"] .home-redesign .home-card-title,html[data-theme="dark"] .home-redesign .home-mini-head b { color:#e7f0fb; }
@media(max-width:1380px){.home-redesign-app>.sidebar.home-sidebar{width:250px;flex-basis:250px}.home-redesign-app>.main.home-redesign{width:calc(100% - 250px);padding-left:14px;padding-right:14px}.home-redesign .home-topbar{margin-left:-14px;margin-right:-14px;padding-left:16px;padding-right:16px;gap:10px}.home-action{padding:0 8px;font-size:11px}}
@media(max-width:1100px){.home-redesign-app>.main.home-redesign{width:100%}.home-redesign .home-topbar{flex-wrap:wrap}.home-redesign .home-topbar .searchbar{max-width:none;flex-basis:100%}.home-top-actions{justify-content:flex-start;overflow-x:auto;padding-bottom:2px}}
@media(max-width:860px){.home-redesign-app>.main.home-redesign{width:100%;padding:0 10px 24px}.home-redesign .home-topbar{margin:0 -10px 12px;padding:10px}.home-redesign .home-dashboard-grid{grid-auto-rows:auto;gap:11px}.home-redesign .home-dashboard-grid>.hg-item{min-height:180px}.home-redesign .home-dashboard-grid>.hg-item>.card{min-height:180px}.home-redesign .home-welcome-card{min-height:220px!important}.home-redesign .home-course-card{min-height:300px!important}.home-redesign .home-calendar-card{min-height:380px!important}.home-redesign .home-mini-card{min-height:150px!important}.home-redesign .home-timeline-card{min-height:170px!important}}
@media(max-width:520px){.home-redesign .home-top-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.home-action{width:100%}.home-welcome-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.home-timeline-times{font-size:8px}}
