:root {
  --ink: #263238;
  --muted: #78858a;
  --paper: #fbfaf7;
  --line: #e8e5de;
  --blue: #356b78;
  --coral: #ef8f7b;
  --mint: #a7d5c4;
  --lilac: #c9bbdf;
  --yellow: #f1d482;
  --shadow: 0 10px 28px rgba(47, 61, 65, .07);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  background: #edece7;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
}
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; color: inherit; }
.app-shell { width: min(100%, 480px); min-height: 100vh; margin: auto; background: var(--paper); position: relative; padding-bottom: 84px; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 28px 22px 16px; }
.eyebrow { font-size: 10px; letter-spacing: 2px; font-weight: 800; color: var(--muted); margin: 0 0 7px; }
.topbar h1 { margin: 0; font-size: 29px; letter-spacing: 3px; font-weight: 850; }
.icon-button { width: 34px; height: 34px; border-radius: 50%; background: #f1eee7; font-size: 22px; color: var(--blue); }
main { padding: 0 18px; }
.view { display: none; }
.view.active { display: block; }
.greeting { display: flex; justify-content: space-between; align-items: center; padding: 18px 4px 24px; }
.greeting h2 { margin: 0; font-size: 24px; max-width: 275px; line-height: 1.3; }
.avatar { width: 43px; height: 43px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; font-weight: 800; }
.muted { color: var(--muted); font-size: 12px; }
.overview-grid { display: grid; gap: 11px; }
.feature-entry { display: grid; grid-template-columns: 45px 1fr auto; align-items: center; text-align: left; padding: 17px; border-radius: 8px; min-height: 83px; box-shadow: var(--shadow); }
.feature-entry.coral { background: var(--coral); }
.feature-entry.mint { background: var(--mint); }
.feature-entry.lilac { background: var(--lilac); }
.feature-entry.yellow { background: var(--yellow); }
.entry-icon { font-size: 25px; font-weight: 700; }
.feature-entry strong, .feature-entry small { display: block; }
.feature-entry strong { font-size: 17px; }
.feature-entry small { font-size: 12px; margin-top: 4px; opacity: .7; }
.entry-arrow { font-size: 21px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin: 29px 2px 13px; }
.section-heading h3 { font-size: 18px; margin: 0; }
.quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.mini-card { padding: 16px; background: #fff; border: 1px solid var(--line); border-radius: 8px; min-height: 116px; display: flex; flex-direction: column; justify-content: space-between; }
.mini-label { font-size: 11px; color: var(--muted); }
.mini-card strong { font-size: 15px; }
.mini-card small { font-size: 11px; color: var(--muted); line-height: 1.4; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 17px 2px 20px; }
.page-heading h2 { margin: 0; font-size: 26px; letter-spacing: 1px; }
.heading-actions { display: flex; gap: 6px; align-items: center; }
.primary-button, .secondary-button { padding: 11px 14px; border-radius: 6px; font-weight: 700; font-size: 12px; white-space: nowrap; }
.primary-button { background: var(--blue); color: #fff; }
.secondary-button { background: #fff; border: 1px solid var(--line); color: var(--blue); display: inline-block; }
.full { width: 100%; margin-top: 8px; }
.week-switcher { display: flex; justify-content: space-between; align-items: center; background: #fff; border: 1px solid var(--line); padding: 7px; border-radius: 7px; margin-bottom: 12px; }
.week-switcher button { width: 32px; height: 32px; background: #f4f1eb; border-radius: 5px; font-size: 22px; }
.week-switcher strong { font-size: 13px; }
.import-box { display: flex; justify-content: space-between; gap: 12px; align-items: center; border: 1px dashed #c9c4ba; padding: 13px; border-radius: 7px; margin-bottom: 16px; }
.import-box strong { font-size: 13px; }
.import-box p { font-size: 11px; color: var(--muted); margin: 5px 0 0; line-height: 1.4; }
.timetable { overflow-x: auto; padding-bottom: 8px; }
.time-grid { display: grid; grid-template-columns: 52px repeat(7, minmax(76px, 1fr)); min-width: 610px; gap: 5px; }
.day-head { font-size: 11px; text-align: center; color: var(--muted); padding: 8px 2px; }
.time-label { font-size: 10px; color: var(--muted); padding-top: 10px; text-align: right; padding-right: 5px; }
.time-label strong, .time-label small { display: block; }
.time-label strong { font-size: 10px; color: var(--ink); margin-bottom: 3px; }
.time-label small { line-height: 1.35; }
.course-cell { min-height: 87px; background: #f3f1eb; border-radius: 6px; padding: 7px; font-size: 10px; }
.course-card { background: #d7e8e4; border-left: 3px solid var(--blue); padding: 8px; border-radius: 5px; min-height: 72px; transition: opacity .2s, filter .2s, box-shadow .2s; }
.course-card:nth-child(3n) { background: #f5dfd7; border-color: var(--coral); }
.course-card:nth-child(4n) { background: #e8e0f0; border-color: #8b70a4; }
.course-card.past { opacity: .38; filter: grayscale(.35); }
.course-card.current { box-shadow: 0 0 0 2px var(--blue), 0 5px 14px rgba(53, 107, 120, .2); opacity: 1; }
.course-card strong { display: block; font-size: 11px; margin-bottom: 5px; }
.course-card small { display: block; line-height: 1.5; color: #536368; }
.course-card em { display: inline-block; color: var(--blue); font-size: 10px; font-style: normal; font-weight: 800; margin-top: 5px; }
.course-card.past em { color: var(--muted); }
.progress-card { background: #fff; border: 1px solid var(--line); padding: 16px; border-radius: 8px; }
.progress-card > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.progress-card strong { font-size: 20px; }
.progress-track { height: 8px; border-radius: 9px; background: #efeee9; margin-top: 13px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--blue); transition: .3s; }
.todo-list, .date-list, .budget-list { display: grid; gap: 9px; margin-top: 15px; }
.todo-item, .date-item, .budget-item, .expense-item { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 14px; }
.todo-item { display: grid; grid-template-columns: 25px 1fr auto; gap: 10px; align-items: center; }
.todo-check { width: 20px; height: 20px; border: 1.5px solid #aeb8b7; border-radius: 4px; background: #fff; }
.todo-item.done .todo-check { background: var(--blue); color: #fff; }
.todo-item.done .todo-copy strong { text-decoration: line-through; color: #9da5a5; }
.todo-copy strong, .todo-copy small { display: block; }
.todo-copy small { font-size: 11px; color: var(--muted); margin-top: 4px; }
.delete-button, .text-button { background: transparent; color: var(--muted); font-size: 12px; }
.money-hero { background: var(--blue); color: #fff; border-radius: 8px; padding: 21px; margin-bottom: 24px; }
.money-hero .muted, .money-hero small { color: #d2e1e2; }
.money-hero strong { display: block; font-size: 32px; margin: 6px 0; }
.money-hero small { font-size: 11px; }
.budget-item { display: grid; gap: 8px; }
.budget-top { display: flex; justify-content: space-between; font-size: 13px; }
.budget-top small { color: var(--muted); }
.budget-track { height: 7px; background: #efeee9; border-radius: 6px; overflow: hidden; }
.budget-track span { display: block; height: 100%; background: var(--coral); }
.budget-actions { display: flex; gap: 12px; }
.budget-item.over .budget-track span { background: #c45858; }
.expense-item { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.expense-item strong { display: block; font-size: 13px; }
.expense-item small { color: var(--muted); font-size: 11px; }
.expense-amount { font-weight: 800; color: #c45858; }
.bottom-nav { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: min(100%, 480px); display: grid; grid-template-columns: repeat(6, 1fr); background: rgba(255, 255, 255, .96); border-top: 1px solid var(--line); padding: 9px 8px 10px; z-index: 5; }
.nav-item { background: transparent; color: #9aa3a3; font-size: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nav-item > span { height: 22px; display: flex; align-items: center; justify-content: center; line-height: 0; }
.nav-item > span svg { display: block; }
.nav-item small { display: block; font-size: 10px; line-height: 13px; height: 13px; margin-top: 4px; white-space: nowrap; }
.chat-msg, .ticket-card, .faq-item p, .chat-kbexcerpt p { overflow-wrap: anywhere; }
body { overflow-x: hidden; }
.nav-item.active { color: var(--blue); }
dialog { border: 0; border-radius: 10px; padding: 0; width: min(92%, 380px); box-shadow: 0 22px 60px rgba(31, 42, 45, .2); }
dialog::backdrop { background: rgba(24, 33, 35, .35); }
.dialog-form { padding: 20px; }
.dialog-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.dialog-title h3 { margin: 0; font-size: 19px; }
.close-button { background: transparent; font-size: 24px; color: var(--muted); }
.dialog-hint { margin: 0 0 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
textarea { display: block; width: 100%; resize: vertical; border: 1px solid var(--line); background: #fbfaf7; border-radius: 5px; padding: 11px; margin-top: 6px; outline: none; color: var(--ink); line-height: 1.5; }
textarea:focus { border-color: var(--blue); }
.ocr-preview { display: block; width: 100%; max-height: 180px; object-fit: contain; background: #f3f1eb; border-radius: 6px; margin-bottom: 10px; }
.batch-dialog-form { max-height: 86vh; overflow-y: auto; }
.ocr-batch-list { display: grid; gap: 10px; margin-top: 12px; }
.batch-list-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.batch-list-heading strong { font-size: 13px; }
.batch-list-heading .secondary-button { padding: 8px 10px; font-size: 11px; }
.ocr-batch-row { border: 1px solid var(--line); border-radius: 7px; padding: 12px; background: #fbfaf7; }
.batch-row-title { display: flex; justify-content: space-between; align-items: center; color: var(--blue); font-size: 12px; font-weight: 800; }
.ocr-batch-row label { margin: 9px 0; }
label { display: block; font-size: 12px; font-weight: 700; margin: 12px 0; color: #526166; }
input, select { display: block; width: 100%; border: 1px solid var(--line); background: #fbfaf7; border-radius: 5px; padding: 11px; margin-top: 6px; outline: none; color: var(--ink); }
input:focus, select:focus { border-color: var(--blue); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.time-setting-row { display: grid; grid-template-columns: 55px 1fr 14px 1fr; gap: 6px; align-items: center; margin: 9px 0; }
.time-setting-row strong { font-size: 11px; }
.time-setting-row span { font-size: 11px; color: var(--muted); text-align: center; }
.time-setting-row input { margin-top: 0; padding: 8px; font-size: 12px; }
.toast { position: fixed; bottom: 92px; left: 50%; transform: translateX(-50%) translateY(15px); background: #263238; color: #fff; padding: 10px 15px; border-radius: 5px; font-size: 12px; opacity: 0; pointer-events: none; transition: .25s; z-index: 10; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.empty { color: var(--muted); font-size: 13px; padding: 20px 4px; text-align: center; }
@media (max-width: 390px) {
  .topbar h1 { font-size: 24px; letter-spacing: 2px; }
  .heading-actions .secondary-button { display: none; }
  .page-heading h2 { font-size: 23px; }
  .batch-dialog-form { width: 100%; }
}
@media (min-width: 481px) { .app-shell { box-shadow: 0 0 35px rgba(0, 0, 0, .08); } }
.expense-side { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.ai-import { border-color: var(--blue); background: #f5f9fa; }
.ocr-import { opacity: .85; border-style: solid; margin-bottom: 16px; }
.ai-steps { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.ai-steps p { margin: 8px 0; }
.prompt-box { background: #f3f1eb; border: 1px solid var(--line); border-radius: 6px; padding: 12px; margin: 10px 0; }
.prompt-box pre { font-size: 11px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow-y: auto; margin: 0 0 10px; color: #444; font-family: "SF Mono", "Cascadia Code", "PingFang SC", monospace; }
.prompt-box .secondary-button { font-size: 11px; padding: 8px 12px; }
.ai-import-preview { min-height: 18px; margin: 8px 0 0; color: #b06c38; font-size: 12px; line-height: 1.5; }
.ai-import-preview.success { color: var(--blue); }
.ai-import-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.ai-import-actions button { width: 100%; }
.review-advice { margin: 0; padding: 10px; background: #f3f1eb; border-radius: 6px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.color-picker { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }
.color-picker button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; }
.color-picker button.active { border-color: var(--ink); box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--ink); }
.course-card { cursor: pointer; min-height: 52px; padding: 6px; }
.course-cell { min-height: 0; height: 100%; }
/* 周次选择器 */
.week-switcher select { flex: 1; font-size: 14px; font-weight: 700; border: 0; background: transparent; padding: 0 8px; outline: none; color: var(--ink); }
.week-switcher .secondary-button { padding: 8px 12px; font-size: 11px; }

/* 今天高亮 */
.day-head.today { color: var(--blue); }
.day-head.today .day-number { background: var(--blue); color: #fff; border-radius: 50%; width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; margin-top: 4px; }

/* 课程块跨行定位 */
.time-grid { position: relative; grid-auto-flow: row; align-items: stretch; }
.course-card { grid-column: auto; grid-row: auto; z-index: 2; cursor: pointer; padding: 6px; border-radius: 5px; border-left: 3px solid; font-size: 10px; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }
.course-card strong { font-size: 11px; margin-bottom: 3px; }
.course-card small { font-size: 10px; line-height: 1.4; color: #536368; }
.course-card em { font-size: 9px; font-style: normal; font-weight: 700; color: var(--muted); margin-top: 3px; }
.course-card.non-week { opacity: .45; filter: grayscale(.6); }
.grid-corner { min-height: 1px; }
.week-title { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.week-title small { color: var(--muted); font-size: 10px; padding-left: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 底部详情面板 */
.bottom-sheet { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%) translateY(100%); width: min(100%, 480px); background: #fff; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,.12); z-index: 20; transition: transform .3s ease; max-height: 70vh; overflow-y: auto; }
.bottom-sheet.active { transform: translateX(-50%) translateY(0); }
.sheet-header { display: flex; justify-content: center; align-items: center; padding: 12px 16px 0; position: relative; }
.sheet-drag { width: 36px; height: 4px; background: #d0d0d0; border-radius: 2px; }
.sheet-header .close-button { position: absolute; right: 16px; top: 8px; font-size: 22px; }
.sheet-content { padding: 16px 20px 28px; }
.detail-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.detail-color-bar { width: 4px; height: 28px; border-radius: 2px; flex-shrink: 0; }
.detail-title h3 { margin: 0; font-size: 18px; flex: 1; }
.detail-row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.detail-row span:first-child { color: var(--muted); }
.detail-row span:last-child { color: var(--ink); font-weight: 600; }

/* 校历设置 toggle */
.toggle-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13px; }
.toggle-row input[type="checkbox"] { width: 44px; height: 24px; appearance: none; background: #ccc; border-radius: 12px; position: relative; cursor: pointer; transition: .2s; }
.toggle-row input[type="checkbox"]::after { content: ""; position: absolute; width: 20px; height: 20px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle-row input[type="checkbox"]:checked { background: var(--blue); }
.toggle-row input[type="checkbox"]:checked::after { left: 22px; }

/* ========== 帮助中心 ========== */
.hidden { display: none !important; }
.help-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #f1eee7; padding: 5px; border-radius: 8px; margin-bottom: 14px; }
.help-tab { padding: 9px 4px; border-radius: 6px; font-size: 12px; font-weight: 700; color: var(--muted); background: transparent; }
.help-tab.active { background: #fff; color: var(--blue); box-shadow: var(--shadow); }

/* 智能客服聊天 */
.chat-box { background: #f3f1eb; border: 1px solid var(--line); border-radius: 10px; padding: 14px; height: 46vh; min-height: 300px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; padding: 11px 13px; border-radius: 12px; font-size: 13px; line-height: 1.6; }
.chat-msg p { margin: 0; }
.chat-msg.bot { background: transparent; border: 0; padding: 0; max-width: 100%; align-self: flex-start; display: flex; gap: 8px; align-items: flex-start; }
.chat-bubble-col { display: flex; flex-direction: column; max-width: 82%; }
.chat-name { font-size: 10px; color: var(--muted); margin: 0 0 3px 3px; }
.chat-avatar { width: 54px; height: 54px; object-fit: contain; flex-shrink: 0; margin-top: 12px; }
.chat-bubble { background: #fff; border: 1px solid var(--line); border-radius: 12px; border-top-left-radius: 3px; padding: 11px 13px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
@keyframes yxz-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.chat-msg.bot.thinking .chat-avatar { animation: yxz-bob 1s ease-in-out infinite; }
.thinking-dots i { display: inline-block; font-style: normal; animation: yxz-dot 1.2s infinite; }
.thinking-dots i:nth-child(2) { animation-delay: .2s; }
.thinking-dots i:nth-child(3) { animation-delay: .4s; }
@keyframes yxz-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .35; } 30% { transform: translateY(-3px); opacity: 1; } }
.chat-msg.user { background: var(--blue); color: #fff; border-top-right-radius: 3px; align-self: flex-end; }
.chat-msg .msg-source { display: block; margin-top: 7px; font-size: 10px; color: var(--muted); }
.chat-msg.user .msg-source { color: #cfe0e2; }
.chat-kbref { margin-top: 7px; padding-top: 7px; border-top: 1px dashed var(--line); font-size: 11px; color: var(--muted); }
.chat-kbref .chat-kbexcerpt { margin-top: 5px; }
.chat-kbexcerpt summary { cursor: pointer; color: var(--blue); font-size: 11px; }
.chat-kbexcerpt p { margin-top: 6px; padding: 8px 10px; background: #f7f5ef; border-radius: 8px; font-size: 11px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; }
.chat-rate { display: flex; gap: 8px; margin-top: 9px; }
.chat-rate button { padding: 5px 12px; border-radius: 14px; font-size: 11px; background: #f1eee7; color: var(--ink); }
.chat-rate button:hover { background: var(--blue); color: #fff; }
.chat-rate button.rated { background: var(--blue); color: #fff; }
.chat-rate button.rated.bad { background: #c45858; }
.chat-input-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.chat-input-row input { margin-top: 0; }
.typing { color: var(--muted); font-size: 12px; font-style: normal; }
.chat-ticket-btn { margin-top: 8px; padding: 7px 12px; border-radius: 6px; background: var(--coral); color: #fff; font-size: 12px; font-weight: 700; }

/* 常见问题 */
.faq-list { display: grid; gap: 9px; }
.faq-item { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.faq-item summary { font-weight: 700; font-size: 14px; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.faq-item summary::after { content: "＋"; color: var(--muted); font-size: 16px; }
.faq-item[open] summary::after { content: "－"; }
.faq-item .faq-cat { display: inline-block; font-size: 10px; font-weight: 800; color: var(--blue); background: #d7e8e4; padding: 2px 8px; border-radius: 10px; margin-bottom: 7px; }
.faq-item p { margin: 10px 0 0; font-size: 13px; line-height: 1.7; color: #45535a; }
.faq-meta { margin-top: 9px; font-size: 10px; color: var(--muted); }

/* 我的反馈 / 投稿卡片 */
.ticket-list { display: grid; gap: 10px; }
.ticket-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px; }
.ticket-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ticket-head strong { font-size: 14px; }
.ticket-status { font-size: 10px; font-weight: 800; padding: 3px 9px; border-radius: 10px; white-space: nowrap; }
.ticket-status.pending, .ticket-status.returned { background: #f9e2e2; color: #c45858; }
.ticket-status.processing { background: #fdf3d7; color: #a5821f; }
.ticket-status.replied { background: #d7e8e4; color: var(--blue); }
.ticket-status.resolved { background: #e3efe7; color: #3d7a52; }
.ticket-card > p { margin: 0 0 8px; font-size: 12px; color: #526166; line-height: 1.6; }
.ticket-reply { margin-top: 10px; padding: 11px; background: #f5f9fa; border-left: 3px solid var(--blue); border-radius: 5px; font-size: 12px; line-height: 1.7; }
.ticket-reply strong { color: var(--blue); font-size: 11px; }
.ticket-actions { display: flex; gap: 10px; margin-top: 10px; }
.ticket-cat-tag { font-size: 10px; color: var(--muted); margin-right: 6px; }
.anon-row { display: flex !important; justify-content: space-between; align-items: center; }
.anon-row input[type="checkbox"] { width: 44px; height: 24px; appearance: none; background: #ccc; border-radius: 12px; position: relative; cursor: pointer; transition: .2s; }
.anon-row input[type="checkbox"]::after { content: ""; position: absolute; width: 20px; height: 20px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: .2s; }
.anon-row input[type="checkbox"]:checked { background: var(--blue); }
.anon-row input[type="checkbox"]:checked::after { left: 22px; }

/* ---- 日程模块 v2：积分卡片 / 收纳箱 / 双列表 ---- */
.points-card { width: 100%; display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 13px 16px; margin-bottom: 10px; cursor: pointer; font-family: inherit; text-align: left; }
.points-flame { font-size: 22px; }
.points-line { display: flex; flex-direction: column; }
.points-line strong { font-size: 17px; }
.points-line small { color: var(--muted); font-size: 11px; margin-top: 2px; }
.points-hint { margin-left: auto; font-size: 11px; color: var(--muted); text-align: right; max-width: 130px; line-height: 1.5; }
.inbox-entry { width: 100%; display: flex; align-items: center; gap: 8px; background: #fff7ed; border: 1px solid #f0c9a0; border-radius: 8px; padding: 12px 16px; margin-bottom: 10px; cursor: pointer; font-family: inherit; font-size: 14px; color: #7a4a1f; }
.inbox-entry.quiet { opacity: .62; }
.inbox-badge { background: #ef8f7b; color: #fff; font-size: 11px; border-radius: 9px; padding: 1px 8px; }
.inbox-entry .entry-arrow { margin-left: auto; color: #b08050; }
.todo-item { grid-template-columns: 25px 1fr auto auto !important; }
.todo-tag { font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 9px; padding: 2px 8px; white-space: nowrap; }
.todo-tag.permanent { color: #8b70a4; border-color: #d9cdea; background: #f4f0fa; }
.todo-tag.plain { color: #aeb8b7; }
.todo-item.done .todo-tag { opacity: .55; }
.todo-type-picker { display: grid; gap: 8px; margin-bottom: 4px; }
.todo-type-option { display: flex; justify-content: flex-start; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.todo-type-option:has(input:checked) { border-color: var(--blue); background: #f2f7fc; }
.todo-type-option input[type="radio"] { width: auto; flex: 0 0 auto; margin: 3px 0 0; }
.todo-type-option > span { flex: 1; text-align: left; }
.todo-type-option strong, .todo-type-option small { display: block; }
.todo-type-option small { color: var(--muted); font-size: 11px; margin-top: 2px; line-height: 1.5; }
.inbox-list { display: grid; gap: 9px; margin: 6px 0 4px; }
.inbox-item { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 12px; display: grid; gap: 10px; }
.inbox-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.secondary-button.small { padding: 6px 10px; font-size: 12px; }
.points-hero { display: flex; gap: 30px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; margin-bottom: 4px; }
.points-hero span, .points-hero strong { display: block; }
.points-hero span { font-size: 11px; color: var(--muted); }
.points-hero strong { font-size: 22px; margin-top: 2px; }
.month-row { display: grid; grid-template-columns: 78px 1fr 46px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: 12px; }
.month-track { height: 8px; background: #efeee9; border-radius: 9px; overflow: hidden; }
.month-track span { display: block; height: 100%; background: var(--blue); }
.month-row strong { text-align: right; }
.ledger-list { display: grid; gap: 8px; max-height: 260px; overflow-y: auto; }
.ledger-row { display: grid; grid-template-columns: 42px 1fr; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px; }
.ledger-row > span { font-weight: 700; font-size: 13px; }
.ledger-row .plus { color: #3a9b6e; }
.ledger-row .minus { color: #d06a6a; }
#todoView .section-heading { margin-top: 16px; }

/* ---- 记账模块 v2：周期战报 / 小金库 / 月度总结 ---- */
.cycle-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px; margin-bottom: 10px; }
.cycle-top { display: flex; align-items: center; gap: 10px; }
.cycle-mode { font-size: 10px; background: #263238; color: #fff; border-radius: 9px; padding: 3px 10px; }
.cycle-name { color: var(--muted); font-size: 13px; }
.cycle-top .text-button { margin-left: auto; }
.cycle-nums { display: flex; gap: 10px; margin-top: 14px; }
.cycle-nums > div { flex: 1; background: #f7f6f2; border-radius: 7px; padding: 10px; }
.cycle-nums small, .cycle-nums strong { display: block; }
.cycle-nums small { font-size: 10px; color: var(--muted); }
.cycle-nums strong { font-size: 15px; margin-top: 3px; }
.cycle-nums strong.over { color: #d06a6a; }
.cycle-track { margin-top: 12px; }
.progress-track span.over { background: #e07070; }
.savings-card { display: flex; align-items: center; gap: 12px; background: #fff7dc; border: 1px solid #f0dda0; border-radius: 8px; padding: 13px 16px; margin-bottom: 10px; }
.savings-icon { font-size: 22px; }
.savings-main { flex: 1; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; font-family: inherit; }
.savings-main small, .savings-main strong { display: block; }
.savings-main small { font-size: 11px; color: #8a6d2f; }
.savings-main strong { font-size: 21px; color: #6b5210; margin-top: 2px; }
.savings-actions { display: flex; gap: 6px; }
.settle-hint { background: #eaf3fb; border-color: #bcd7ee; color: #2c5d8a; }
.money-quick { display: flex; gap: 8px; margin-bottom: 10px; }
.money-quick .secondary-button { flex: 1; text-align: center; }
.month-grid { display: flex; gap: 10px; }
.month-grid > div { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 12px; }
.month-grid small, .month-grid strong { display: block; }
.month-grid small { font-size: 10px; color: var(--muted); }
.month-grid strong { font-size: 15px; margin-top: 3px; }
.month-grid strong.saved { color: #3a9b6e; }
.settle-report { background: #f7f6f2; border-radius: 8px; padding: 14px; margin-bottom: 6px; }
.settle-cycle-name { margin: 0 0 10px; font-weight: 700; }
.settle-rows { display: flex; gap: 10px; }
.settle-rows > div { flex: 1; }
.settle-rows span, .settle-rows strong { display: block; font-size: 12px; }
.settle-rows span { color: var(--muted); font-size: 10px; }
.settle-rows strong { margin-top: 2px; }
.settle-result { text-align: center; font-weight: 800; font-size: 18px; margin-top: 12px; padding: 10px; border-radius: 7px; }
.settle-result.plus { background: #e3efe7; color: #3d7a52; }
.settle-result.minus { background: #f9e2e2; color: #c05555; }
.settle-choices { display: grid; gap: 8px; margin-top: 8px; }

/* ========== 学生端视觉刷新：轻松校园工作台 ========== */
:root {
  --ink: #18322f;
  --muted: #71817f;
  --paper: #f7faf8;
  --line: #dfe9e5;
  --blue: #176b59;
  --coral: #f28a54;
  --mint: #d8efe6;
  --lilac: #dcecf5;
  --yellow: #fff1bd;
  --shadow: 0 10px 26px rgba(24, 50, 47, .07);
}

body {
  background: #edf3f0;
  color: var(--ink);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app-shell,
.login-shell,
.profile-shell {
  background: var(--paper);
}

.app-shell {
  padding-bottom: 88px;
}

.topbar {
  padding: 25px 20px 12px;
}

.eyebrow {
  color: var(--muted);
  letter-spacing: 1.6px;
  line-height: 1.2;
}

.topbar h1 {
  font-size: 26px;
  letter-spacing: 0;
  line-height: 1.15;
}

.icon-button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
  font-size: 20px;
}

main {
  padding: 0 16px;
}

.greeting {
  padding: 17px 4px 20px;
}

.greeting h2 {
  max-width: 280px;
  font-size: 23px;
  line-height: 1.3;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--blue);
  box-shadow: 0 6px 14px rgba(23, 107, 89, .18);
}

.overview-grid {
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.feature-entry {
  position: relative;
  grid-template-columns: 1fr auto;
  min-height: 128px;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.feature-entry::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: currentColor;
  opacity: .9;
}

.feature-entry.coral {
  background: #fff0e5;
  color: #d96b35;
}

.feature-entry.mint {
  background: #d8efe6;
  color: var(--blue);
}

.feature-entry.lilac {
  background: #dcecf5;
  color: #2e78a0;
}

.feature-entry.yellow {
  background: #fff1bd;
  color: #a57712;
}

.entry-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: rgba(255, 255, 255, .78);
  font-size: 20px;
  grid-column: 1;
  grid-row: 1;
}

.feature-entry > span:nth-child(2) {
  grid-column: 1 / -1;
  align-self: end;
}

.feature-entry strong {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.25;
}

.feature-entry small {
  color: var(--muted);
  margin-top: 5px;
  opacity: 1;
}

.entry-arrow {
  align-self: start;
  color: currentColor;
  font-size: 18px;
  grid-column: 2;
  grid-row: 1;
}

.section-heading {
  margin: 27px 2px 11px;
}

.section-heading h3 {
  font-size: 18px;
  line-height: 1.2;
}

.quick-grid {
  grid-template-columns: 1fr;
  gap: 9px;
}

.mini-card {
  position: relative;
  min-height: 76px;
  padding: 13px 14px 13px 52px;
  border-radius: 11px;
  box-shadow: none;
}

.mini-card::before {
  content: "→";
  position: absolute;
  left: 14px;
  top: 50%;
  width: 27px;
  height: 27px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #fff0e5;
  color: var(--coral);
  font-size: 15px;
  font-weight: 800;
}

.mini-card:nth-child(2)::before {
  content: "!";
  background: #d8efe6;
  color: var(--blue);
}

.mini-card strong {
  font-size: 14px;
}

.page-heading {
  align-items: flex-end;
  margin: 17px 2px 18px;
}

.page-heading h2 {
  font-size: 25px;
  letter-spacing: 0;
}

.heading-actions {
  gap: 5px;
}

.primary-button,
.secondary-button {
  min-height: 38px;
  padding: 10px 13px;
  border-radius: 8px;
  font-size: 12px;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}

.primary-button {
  background: var(--blue);
  box-shadow: 0 5px 12px rgba(23, 107, 89, .14);
}

.secondary-button {
  background: #fff;
  border-color: var(--line);
  color: var(--blue);
}

.primary-button:active,
.secondary-button:active,
.feature-entry:active,
.nav-item:active {
  transform: translateY(1px);
}

.week-switcher {
  min-height: 54px;
  padding: 7px 8px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(24, 50, 47, .04);
}

.week-switcher button {
  background: #e8f2ee;
  color: var(--blue);
  border-radius: 8px;
}

.import-box {
  align-items: flex-start;
  padding: 13px;
  border-radius: 10px;
  margin-bottom: 10px;
}

.ai-import {
  border: 1px solid #b8ded1;
  background: #edf8f3;
}

.ocr-import {
  background: #fff;
  border-color: var(--line);
}

.import-box strong {
  color: var(--ink);
}

.time-grid {
  gap: 4px;
}

.day-head {
  padding: 8px 2px;
  font-weight: 700;
}

.day-head.today {
  color: var(--blue);
}

.time-label {
  padding-right: 4px;
}

.course-cell {
  background: #eef4f1;
  border-radius: 8px;
}

.course-card {
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(24, 50, 47, .05);
}

.course-card.current {
  box-shadow: 0 0 0 2px var(--blue), 0 5px 14px rgba(23, 107, 89, .18);
}

.progress-card,
.points-card,
.cycle-card,
.savings-card,
.todo-item,
.date-item,
.budget-item,
.expense-item {
  border-radius: 11px;
  box-shadow: none;
}

.progress-card {
  padding: 15px;
}

.progress-track {
  height: 8px;
  background: #e8efec;
}

.progress-track span {
  background: var(--blue);
}

.todo-item,
.date-item,
.budget-item,
.expense-item {
  padding: 13px;
}

.todo-check {
  border-color: #9bb5ac;
  border-radius: 7px;
}

.todo-item.done .todo-check {
  background: var(--blue);
}

.date-item {
  border-left: 4px solid var(--coral);
}

.budget-track {
  background: #e8efec;
}

.budget-track span {
  background: var(--coral);
}

.bottom-nav {
  width: min(100%, 480px);
  padding: 9px 7px 10px;
  background: rgba(255, 255, 255, .98);
  border-top-color: var(--line);
  box-shadow: 0 -6px 18px rgba(24, 50, 47, .05);
}

.nav-item {
  color: #9aa9a7;
  font-size: 19px;
}

.nav-item.active {
  color: var(--blue);
}

dialog {
  width: min(92%, 390px);
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(24, 50, 47, .2);
}

dialog::backdrop {
  background: rgba(18, 38, 35, .38);
}

.dialog-form {
  padding: 20px;
}

.dialog-title {
  margin-bottom: 16px;
}

.dialog-title h3 {
  font-size: 19px;
}

.close-button {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: #eef4f1;
  color: var(--muted);
  font-size: 21px;
}

input,
select,
textarea {
  border-color: var(--line);
  border-radius: 8px;
  background: #fbfdfc;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 107, 89, .1);
}

textarea {
  min-height: 92px;
}

.toast {
  bottom: 96px;
  border-radius: 9px;
  background: var(--ink);
  box-shadow: 0 8px 18px rgba(24, 50, 47, .18);
}

.bottom-sheet {
  border-radius: 18px 18px 0 0;
}

.sheet-drag {
  background: #b9cbc4;
}

.help-tabs {
  background: #eaf2ee;
  border-radius: 10px;
}

.help-tab {
  border-radius: 8px;
}

.help-tab.active {
  color: var(--blue);
}

.chat-box {
  background: #eef4f1;
  border-radius: 12px;
}

.chat-msg {
  border-radius: 14px;
}

.chat-msg.user {
  background: var(--blue);
}

.faq-item,
.ticket-card,
.inbox-item,
.ledger-row {
  border-radius: 10px;
}

.faq-item .faq-cat,
.ticket-status,
.todo-tag {
  border-radius: 8px;
}

.points-card {
  padding: 13px 14px;
  background: #fff;
}

.points-flame {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #fff0e5;
  font-size: 18px;
}

.inbox-entry {
  border-radius: 10px;
}

.cycle-card {
  padding: 15px;
}

.cycle-mode {
  border-radius: 8px;
  background: var(--ink);
}

.cycle-nums > div {
  background: #f0f5f2;
  border-radius: 9px;
}

.savings-card {
  background: #fff7dc;
  border-color: #f0dda0;
}

.settle-hint {
  background: #eaf2f8;
  border-color: #c8dce9;
  color: #2e6685;
}

.login-shell,
.profile-shell {
  width: min(100%, 480px);
  padding-left: 22px;
  padding-right: 22px;
}

body:has(.login-shell),
body:has(.profile-shell) {
  background: #edf3f0 !important;
}

.login-hero {
  padding: 66px 0 31px !important;
}

.login-hero h1 {
  letter-spacing: 0 !important;
  font-size: 29px !important;
}

.login-button {
  border-radius: 9px !important;
  background: var(--blue) !important;
  box-shadow: 0 6px 14px rgba(23, 107, 89, .16);
}

.login-tip {
  background: #edf5f1 !important;
  border: 1px solid #d9e9e2;
  border-radius: 10px !important;
}

.role-badge {
  border-radius: 8px !important;
  background: #d8efe6 !important;
  color: var(--blue) !important;
}

.profile-head {
  padding-top: 28px !important;
}

.profile-head h1 {
  letter-spacing: 0 !important;
}

.profile-note {
  background: #fff7dc !important;
  border-color: #f0dda0 !important;
  border-radius: 10px !important;
  color: #806a2a !important;
}

.locked-field,
.current-card,
.history-item {
  border-radius: 10px !important;
}

.locked-field {
  background: #edf3f0 !important;
}

.current-card {
  box-shadow: none;
}

@media (max-width: 390px) {
  .topbar h1 {
    font-size: 23px;
  }

  .page-heading h2 {
    font-size: 23px;
  }

  .feature-entry {
    min-height: 116px;
    padding: 12px;
  }

  .feature-entry strong {
    font-size: 15px;
  }

  .heading-actions .secondary-button {
    display: none;
  }
}

/* ---- 老师回复闭环（V2.4） ---- */
.chat-scope-hint { font-size: 12px; line-height: 1.6; color: #8a6a3a; background: #fdf6e8; border: 1px solid #f2e3bd; border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.reply-bell { font-size: 16px; }
.reply-dot { position: absolute; top: -4px; right: -6px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #e5484d; color: #fff; font-size: 10px; font-weight: 800; line-height: 16px; text-align: center; box-sizing: border-box; }
.chat-escalate { display: flex; gap: 6px; margin-top: 8px; }
.chat-escalate input { flex: 1; border: 1px solid #e3e8e6; border-radius: 8px; padding: 7px 10px; font-size: 12px; }
.chat-rate button[data-escalate] { border: 1px dashed #d8a24a; color: #a86a12; }
.chat-reply-q { font-size: 12px; color: #8a6a3a; background: #fdf6e8; border-radius: 6px; padding: 4px 8px; margin-bottom: 6px; }
.chat-reply-card { border-left: 3px solid #2f9e6e; }

/* ---- 公告栏 + 消息中心（V2.5） ---- */
.topbar { position: relative; }
.announce-bar { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #e3e8e6; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.announce-tag { font-size: 11px; font-weight: 800; color: #356b78; background: #d7e8e4; border-radius: 8px; padding: 3px 8px; white-space: nowrap; }
.announce-tag.important { color: #b3372e; background: #fde3e3; }
.announce-tag.inline { margin-right: 6px; }
.announce-text { flex: 1; border: 0; background: none; text-align: left; font-size: 13px; color: #22332e; cursor: pointer; padding: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.announce-more { border: 0; background: none; color: #8aa09a; font-size: 12px; cursor: pointer; white-space: nowrap; }
.announce-list { display: flex; flex-direction: column; gap: 12px; max-height: 60vh; overflow-y: auto; }
.announce-item { border: 1px solid #e3e8e6; border-radius: 10px; padding: 12px; }
.announce-item.important { border-color: #f2c4c0; background: #fdf6f5; }
.announce-item.unread { border-left: 3px solid #e5484d; }
.announce-item-head { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.announce-item-head strong { font-size: 14px; flex: 1; }
.announce-item-head small { color: #8aa09a; font-size: 11px; white-space: nowrap; }
.announce-item p { font-size: 13px; line-height: 1.7; color: #40514b; margin: 0; white-space: pre-wrap; }
.notify-panel { position: absolute; top: 46px; right: 0; width: 220px; background: #fff; border: 1px solid #e3e8e6; border-radius: 12px; box-shadow: 0 8px 24px rgba(23, 52, 46, .14); z-index: 60; overflow: hidden; }
.notify-row { display: flex; justify-content: space-between; align-items: center; width: 100%; border: 0; background: none; padding: 12px 14px; font-size: 13px; color: #22332e; cursor: pointer; border-bottom: 1px solid #eef2f0; }
.notify-row:last-child { border-bottom: 0; }
.notify-row:hover { background: #f6f8f7; }
.notify-row.read { color: #8aa09a; }
.notify-n { background: #e5484d; color: #fff; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; line-height: 18px; border-radius: 999px; text-align: center; padding: 0 5px; }
.notify-row small { font-size: 11px; }
