/* ===== 打卡签到系统 · 暖色清新主题 ===== */
:root {
  --primary: #FF8A5C;        /* 暖橙 */
  --primary-dark: #F26B3A;
  --primary-light: #FFE8DC;
  --accent: #FFB86B;         /* 蜜橙 */
  --green: #4CB782;
  --green-light: #E4F5EC;
  --red: #E5604D;
  --red-light: #FDE8E5;
  --yellow: #F5A623;
  --yellow-light: #FDF3E0;
  --blue: #5B9BD5;
  --blue-light: #E8F1FA;
  --bg: #FFF8F2;             /* 暖白底 */
  --card: #FFFFFF;
  --text: #4A3728;           /* 深暖棕 */
  --text-light: #9B8B7D;
  --border: #F3E6DA;
  --shadow: 0 2px 12px rgba(242, 107, 58, 0.08);
  --radius: 14px;
}

/* ===== 全局动态特效（明显活泼） ===== */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  font-size: 15px;
  animation: pageFade .4s ease;
}
@keyframes pageFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* 页面切换淡入 */
#main > * { animation: slideIn .35s ease both; }
@keyframes slideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
#main > *:nth-child(2) { animation-delay: .05s; }
#main > *:nth-child(3) { animation-delay: .1s; }

/* 按钮按压 + 涟漪 */
.btn { position: relative; overflow: hidden; }
.btn:active { transform: scale(.93); }
.btn::after {
  content: ''; position: absolute; top: 50%; left: 50%; width: 0; height: 0;
  background: rgba(255,255,255,.45); border-radius: 50%;
  transform: translate(-50%,-50%); opacity: 0;
}
.btn:active::after { animation: ripple .45s ease; }
@keyframes ripple { to { width: 240px; height: 240px; opacity: 0; } }

/* 卡片悬浮 */
.card { transition: transform .2s ease, box-shadow .2s ease; }
.card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(242, 107, 58, .14); }

/* 图标跳动 */
.logo .dot { animation: pulse 2s ease infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.stat-card .num { animation: countPop .5s ease; display: inline-block; }
@keyframes countPop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* 头像微微晃动 */
.avatar { transition: transform .2s ease; }
.list-item:hover .avatar { transform: scale(1.1) rotate(-3deg); }

/* 点名状态按钮弹跳 */
.status-btn { transition: all .15s ease; }
.status-btn:active { transform: scale(.85); }
.status-btn.active-present, .status-btn.active-late, .status-btn.active-leave, .status-btn.active-absent { animation: popIn .3s ease; }
@keyframes popIn { 0% { transform: scale(.7); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }

/* 日历日期悬浮 */
.cal-day { transition: background .15s, transform .15s; }
.cal-day:active { transform: scale(.92); }

/* 底部导航激活弹跳 */
.bottom-nav .nav-item.active .ico { animation: navBounce .4s ease; }
@keyframes navBounce { 0% { transform: translateY(0); } 40% { transform: translateY(-6px); } 100% { transform: none; } }

/* toast 滑入 */
#toast { transform: translateX(-50%) translateY(-14px); transition: opacity .3s, transform .3s; }
#toast.show { transform: translateX(-50%) translateY(0); }

/* 登录页渐变流动 */
.login-wrap {
  background: linear-gradient(160deg, #FFE8DC, #FFF8F2, #FFF3E6, #FFE3CF);
  background-size: 300% 300%;
  animation: bgFlow 8s ease infinite;
}
@keyframes bgFlow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.login-card { animation: cardFloat 3s ease-in-out infinite; }
@keyframes cardFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.login-logo .icon { display: inline-block; animation: wave 2.5s ease-in-out infinite; }
@keyframes wave { 0%,100% { transform: rotate(0); } 25% { transform: rotate(-12deg); } 75% { transform: rotate(12deg); } }

/* 加载中动画 */
.loading-dots { display: inline-flex; gap: 4px; align-items: center; }
.loading-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--primary); animation: dotJump .9s ease infinite; }
.loading-dots span:nth-child(2) { animation-delay: .15s; }
.loading-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dotJump { 0%,100% { transform: translateY(0); opacity: .5; } 50% { transform: translateY(-6px); opacity: 1; } }

/* 学生日志时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px; background: var(--border); }
.tl-item { position: relative; padding: 8px 0 8px 12px; animation: slideIn .3s ease both; }
.tl-item::before {
  content: ''; position: absolute; left: -20px; top: 14px; width: 10px; height: 10px;
  border-radius: 50%; background: var(--primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--primary-light);
}
.tl-item.tl-green::before { background: var(--green); box-shadow: 0 0 0 2px var(--green-light); }
.tl-item.tl-blue::before { background: var(--blue); box-shadow: 0 0 0 2px var(--blue-light); }
.tl-item.tl-yellow::before { background: var(--yellow); box-shadow: 0 0 0 2px var(--yellow-light); }
.tl-item.tl-red::before { background: var(--red); box-shadow: 0 0 0 2px var(--red-light); }
.tl-date { font-size: 12px; color: var(--text-light); }
.tl-main { font-size: 14px; margin-top: 2px; }
.tl-sub { font-size: 12px; color: var(--text-light); margin-top: 1px; }

/* 搜索框 */
.search-box { position: relative; margin-bottom: 14px; }
.search-box input { padding-left: 36px; }
.search-box .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 15px; opacity: .6; }

/* 学生卡片 */
.stu-card {
  background: var(--card); border-radius: var(--radius); border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 14px; margin-bottom: 10px;
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}
.stu-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(242,107,58,.15); }
.stu-card:active { transform: scale(.98); }
.stu-card .info { flex: 1; min-width: 0; }
.stu-card .name { font-weight: 700; font-size: 15px; }
.stu-card .meta { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.stu-card .badges { display: flex; gap: 5px; margin-top: 6px; flex-wrap: wrap; }

/* ===== 登录页 ===== */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%; max-width: 380px; background: var(--card); border-radius: 20px;
  box-shadow: 0 8px 40px rgba(242, 107, 58, 0.15); padding: 36px 32px;
}
.login-logo { text-align: center; margin-bottom: 8px; }
.login-logo .icon { font-size: 44px; }
.login-title { text-align: center; font-size: 22px; font-weight: 700; color: var(--primary-dark); margin-bottom: 4px; }
.login-sub { text-align: center; font-size: 13px; color: var(--text-light); margin-bottom: 28px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 13px; color: var(--text-light); margin-bottom: 6px; font-weight: 500; }
.input {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: 15px; background: #FFFDFB; color: var(--text); outline: none; transition: border-color .2s;
}
.input:focus { border-color: var(--primary); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 10px; padding: 12px 20px; font-size: 15px; font-weight: 600;
  cursor: pointer; transition: all .15s; text-decoration: none;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 14px rgba(242, 107, 58, .35); }
.btn-primary:hover { filter: brightness(1.05); }
.btn-ghost { background: var(--primary-light); color: var(--primary-dark); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-danger { background: var(--red-light); color: var(--red); }
.btn-green { background: var(--green-light); color: var(--green); }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 15px 20px; font-size: 16px; border-radius: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ===== 应用框架 ===== */
.app-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: 760px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; gap: 10px;
}
.logo { font-weight: 800; font-size: 17px; color: var(--primary-dark); display: flex; align-items: center; gap: 6px; }
.logo .dot { width: 10px; height: 10px; border-radius: 50%; background: linear-gradient(135deg, var(--primary), var(--accent)); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.user-chip { font-size: 13px; color: var(--text-light); background: var(--bg); padding: 6px 12px; border-radius: 20px; }
.role-badge { font-size: 11px; background: var(--primary-light); color: var(--primary-dark); padding: 2px 8px; border-radius: 10px; font-weight: 600; }

.app-main { max-width: 760px; margin: 0 auto; padding: 16px; padding-bottom: 90px; }
.app-foot { max-width: 760px; margin: 0 auto; padding: 0 16px 20px; color: var(--text-light); font-size: 12px; }

/* 底部导航（手机） */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: rgba(255,255,255,.95); backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-around; padding: 6px 0 calc(6px + env(safe-area-inset-bottom));
}
.bottom-nav .nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  font-size: 11px; color: var(--text-light); text-decoration: none; padding: 4px 12px;
}
.bottom-nav .nav-item .ico { font-size: 20px; }
.bottom-nav .nav-item.active { color: var(--primary-dark); font-weight: 600; }

/* ===== 卡片 ===== */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; margin-bottom: 14px; border: 1px solid var(--border);
}
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.card-title .sub { font-size: 12px; color: var(--text-light); font-weight: 400; }
.page-title { font-size: 20px; font-weight: 800; margin: 6px 0 14px; }
.page-desc { font-size: 13px; color: var(--text-light); margin-bottom: 14px; }

/* 统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.stat-card {
  background: var(--card); border-radius: var(--radius); padding: 14px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
}
.stat-card .num { font-size: 26px; font-weight: 800; line-height: 1.2; }
.stat-card .label { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.stat-orange .num { color: var(--primary-dark); }
.stat-green .num { color: var(--green); }
.stat-red .num { color: var(--red); }
.stat-blue .num { color: var(--blue); }
.stat-yellow .num { color: var(--yellow); }

/* ===== 列表 ===== */
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 4px;
  border-bottom: 1px solid var(--border); position: relative;
}
.list-item:last-child { border-bottom: none; }
.avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--primary), var(--accent));
}
.avatar.green { background: linear-gradient(135deg, #66C79B, #4CB782); }
.avatar.blue { background: linear-gradient(135deg, #7AB8E8, #5B9BD5); }
.list-main { flex: 1; min-width: 0; }
.list-title { font-size: 15px; font-weight: 600; }
.list-sub { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.list-right { text-align: right; flex-shrink: 0; }

/* 徽章/标签 */
.tag { display: inline-block; font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 600; }
.tag-orange { background: var(--primary-light); color: var(--primary-dark); }
.tag-green { background: var(--green-light); color: var(--green); }
.tag-red { background: var(--red-light); color: var(--red); }
.tag-yellow { background: var(--yellow-light); color: var(--yellow); }
.tag-blue { background: var(--blue-light); color: var(--blue); }
.tag-gray { background: #F2EDE8; color: var(--text-light); }

/* 课时预警 */
.lessons-low { color: var(--red); font-weight: 800; }
.lessons-ok { color: var(--green); font-weight: 700; }

/* ===== 日历 ===== */
.calendar { background: var(--card); border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); overflow: hidden; }
.cal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.cal-head .month { font-size: 17px; font-weight: 800; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 16px; cursor: pointer;
}
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: var(--text-light); padding: 6px 0; border-bottom: 1px solid var(--border); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-day {
  position: relative; aspect-ratio: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; cursor: pointer;
  border: none; background: none; font-size: 14px; color: var(--text);
  border-radius: 10px; transition: background .15s;
}
.cal-day:hover { background: var(--primary-light); }
.cal-day.other { color: #D8CCC2; }
.cal-day.today { background: var(--primary-light); font-weight: 800; color: var(--primary-dark); }
.cal-day .dots { position: absolute; bottom: 5px; display: flex; gap: 3px; }
.cal-day .dot { width: 5px; height: 5px; border-radius: 50%; }
.cal-day .dot.course { background: var(--primary); }
.cal-day .dot.holiday { background: var(--red); }
.cal-day.holiday-day { color: var(--red); text-decoration: line-through; }

/* ===== 点名页 ===== */
.roll-call-bar {
  display: flex; gap: 8px; margin-bottom: 14px; align-items: center; flex-wrap: wrap;
}
.roll-summary { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.roll-summary .tag { font-size: 12px; padding: 5px 12px; }
.stu-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  margin-bottom: 8px;
}
.stu-item .name { font-weight: 600; font-size: 15px; }
.stu-item .lessons { font-size: 12px; color: var(--text-light); margin-top: 2px; }
.stu-item .status-btns { margin-left: auto; display: flex; gap: 5px; flex-wrap: wrap; justify-content: flex-end; }
.status-btn {
  border: 1.5px solid var(--border); background: var(--card); color: var(--text-light);
  border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer; transition: all .15s; min-width: 44px; text-align: center;
}
.status-btn.active-present { background: var(--green); border-color: var(--green); color: #fff; font-weight: 700; }
.status-btn.active-late { background: var(--yellow); border-color: var(--yellow); color: #fff; font-weight: 700; }
.status-btn.active-leave { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 700; }
.status-btn.active-absent { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }

/* ===== 表格（报表/打印） ===== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 9px 8px; text-align: center; border-bottom: 1px solid var(--border); }
table.data th { background: var(--bg); font-weight: 600; color: var(--text-light); font-size: 12px; white-space: nowrap; }
table.data td { white-space: nowrap; }

/* ===== 弹窗 ===== */
.modal-mask {
  position: fixed; inset: 0; background: rgba(74, 55, 40, .4); z-index: 200;
  display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: var(--card); width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto;
  border-radius: 20px 20px 0 0; padding: 22px 20px 26px;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-title { font-size: 17px; font-weight: 700; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 18px; justify-content: flex-end; }
@media (min-width: 600px) {
  .modal-mask { align-items: center; }
  .modal { border-radius: 20px; box-shadow: 0 20px 60px rgba(74,55,40,.3); }
}

/* ===== 表单内联 ===== */
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.row .col { flex: 1; min-width: 120px; }
.check-group { display: flex; gap: 10px; flex-wrap: wrap; }
.check-chip {
  padding: 8px 14px; border-radius: 20px; border: 1.5px solid var(--border);
  font-size: 13px; cursor: pointer; background: var(--card); color: var(--text-light); user-select: none;
}
.check-chip.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); font-weight: 700; }

/* ===== 提示 toast ===== */
#toast {
  position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 300;
  background: rgba(74,55,40,.92); color: #fff; padding: 10px 22px; border-radius: 30px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .3s; max-width: 90vw; text-align: center;
}
#toast.show { opacity: 1; }
#toast.error { background: rgba(229, 96, 77, .95); }
#toast.success { background: rgba(76, 183, 130, .95); }

/* ===== 空状态 ===== */
.empty { text-align: center; padding: 40px 20px; color: var(--text-light); }
.empty .ico { font-size: 46px; margin-bottom: 10px; opacity: .6; }
.empty p { font-size: 14px; }

/* ===== 打印 ===== */
.print-area { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-area, .print-area * { visibility: visible; }
  .print-area { display: block; position: absolute; inset: 0; padding: 20px; }
  .no-print { display: none !important; }
}
.print-header { text-align: center; margin-bottom: 16px; }
.print-header h2 { font-size: 20px; margin-bottom: 4px; }
.print-header p { font-size: 13px; color: #666; }
.print-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.print-table th, .print-table td { border: 1px solid #333; padding: 8px; text-align: center; }
.print-table th { background: #f0f0f0; }

/* 详情头 */
.detail-head {
  background: linear-gradient(135deg, var(--primary-light), #FFF3E6);
  border-radius: var(--radius); padding: 18px; margin-bottom: 14px;
  border: 1px solid var(--border);
}
.detail-head h1 { font-size: 19px; margin-bottom: 6px; }
.detail-head .meta { font-size: 13px; color: var(--text-light); }

/* 分段控件 */
.seg { display: flex; background: #F2EDE8; border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.seg button { flex: 1; border: none; background: none; padding: 9px; border-radius: 8px; font-size: 14px; color: var(--text-light); cursor: pointer; }
.seg button.on { background: var(--card); color: var(--primary-dark); font-weight: 700; box-shadow: var(--shadow); }

/* 折叠/隐藏 */
.hidden { display: none !important; }
.muted { color: var(--text-light); }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; }
.mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.text-center { text-align: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }

/* ===== 老师登录欢迎弹窗 ===== */
.welcome-mask {
  position: fixed; inset: 0; z-index: 250;
  background: rgba(74, 55, 40, .45); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  animation: fadeIn .3s ease; padding: 20px;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.welcome-card {
  width: 100%; max-width: 360px; border-radius: 24px; padding: 34px 26px 28px;
  background: linear-gradient(160deg, #FFFFFF 0%, #FFF4EA 100%);
  border: 1.5px solid var(--primary-light);
  box-shadow: 0 20px 60px rgba(242, 107, 58, .25);
  text-align: center; position: relative; overflow: hidden;
  animation: welcomePop .5s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes welcomePop { from { transform: scale(.7) translateY(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.welcome-card::before {
  content: ''; position: absolute; top: -60px; right: -60px; width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(255, 184, 107, .35), transparent 70%); border-radius: 50%;
}
.welcome-card::after {
  content: ''; position: absolute; bottom: -50px; left: -40px; width: 130px; height: 130px;
  background: radial-gradient(circle, rgba(242, 107, 58, .18), transparent 70%); border-radius: 50%;
}
.welcome-avatar {
  width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 38px; font-weight: 800; color: #fff;
  box-shadow: 0 8px 24px rgba(242, 107, 58, .4);
  animation: avatarWave 2.5s ease-in-out infinite;
}
@keyframes avatarWave { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.welcome-greet { font-size: 20px; font-weight: 800; color: var(--text); margin-bottom: 4px; }
.welcome-greet .name { color: var(--primary-dark); }
.welcome-time { font-size: 13px; color: var(--text-light); margin-bottom: 16px; }
.welcome-quote {
  background: var(--primary-light); border-radius: 14px; padding: 14px 16px;
  font-size: 14px; color: var(--text); line-height: 1.7; position: relative; z-index: 1;
}
.welcome-quote .q-ico { font-size: 16px; }
.welcome-tip { margin-top: 14px; font-size: 12px; color: var(--text-light); position: relative; z-index: 1; }

/* 导航角标（约课待处理） */
.nav-badge {
  position: absolute; top: -2px; right: -8px;
  min-width: 16px; height: 16px; border-radius: 9px;
  background: var(--red); color: #fff; font-size: 10px;
  align-items: center; justify-content: center; padding: 0 4px;
  font-weight: 700; animation: popIn .4s ease;
}
.nav-item { position: relative; }

/* ===== 周视图 ===== */
.week-grid { overflow-x: auto; padding: 12px; }
.week-row { display: flex; gap: 8px; min-width: 700px; }
.week-col { flex: 1; min-width: 92px; background: var(--card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.week-col.today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-light); }
.week-col-head { text-align: center; padding: 8px 4px; font-weight: 700; font-size: 13px; background: var(--bg); border-bottom: 1px solid var(--border); }
.week-col.today .week-col-head { background: var(--primary-light); color: var(--primary-dark); }
.week-date { font-weight: 400; color: var(--text-light); font-size: 11px; }
.week-col-body { padding: 6px; min-height: 140px; }
.week-lesson {
  background: var(--primary-light); border-radius: 8px; padding: 6px 8px; margin-bottom: 6px;
  cursor: pointer; transition: transform .15s;
}
.week-lesson:active { transform: scale(.95); }
.wl-time { font-weight: 800; font-size: 12px; color: var(--primary-dark); }
.wl-name { font-size: 12px; font-weight: 600; margin-top: 2px; }
.wl-loc { font-size: 10px; color: var(--text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.week-empty { color: var(--text-light); font-size: 11px; text-align: center; padding: 10px 0; }
.week-holiday { background: var(--red-light); color: var(--red); font-size: 11px; text-align: center; padding: 6px; border-radius: 8px; margin-bottom: 6px; font-weight: 600; }
