/* ===========================================================
   托管班管家 · 样式表
   设计基调：暖橙（孩子 / 温度） + 墨绿（靠谱 / 安心） + 米白底
   全部相对路径、零外部依赖，断网也能完整渲染
   =========================================================== */

* { box-sizing: border-box; }

:root {
  --bg: #f6f4f1;
  --card: #ffffff;
  --ink: #1f2a2e;
  --ink2: #566a70;
  --ink3: #8b979b;
  --line: #ece6df;
  --line2: #f4efe9;

  --orange: #ff6b35;
  --orange-d: #e8551f;
  --orange-soft: #fff2ec;
  --teal: #2f9e8f;
  --teal-soft: #e8f6f3;
  --gold: #d99a12;
  --gold-soft: #fdf5e2;
  --red: #d9534f;
  --red-soft: #fdeeee;
  --blue: #4a7fe0;
  --blue-soft: #eef3fd;

  --sidebar: #17262b;
  --sidebar2: #1d3138;
  --radius: 16px;
  --shadow-sm: 0 1px 2px rgba(24, 36, 40, .05);
  --shadow: 0 1px 2px rgba(24, 36, 40, .05), 0 12px 28px -18px rgba(24, 36, 40, .35);
}

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

button { font-family: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--ink); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.2px; }
p { margin: 0; }
a { color: var(--teal); text-decoration: none; }

/* ---------------- 布局 ---------------- */
.app {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
}

/* ---------------- 侧边栏 ---------------- */
.sidebar {
  width: 236px;
  flex: 0 0 236px;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar2) 100%);
  color: #cfdadc;
  display: flex;
  flex-direction: column;
  padding: 20px 14px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 18px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px;
  background: linear-gradient(140deg, #ff8a5c, var(--orange));
  color: #fff; font-weight: 800; font-size: 19px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px -6px rgba(255, 107, 53, .8);
  flex: 0 0 38px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { color: #fff; font-size: 15px; letter-spacing: .2px; }
.brand-text span { color: #7e949a; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 11px;
  color: #b6c6c9; font-size: 13.5px; font-weight: 500;
  transition: background .18s, color .18s;
  text-align: left; width: 100%;
}
.nav-item svg { flex: 0 0 18px; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 107, 53, .22), rgba(255, 107, 53, .06));
  color: #fff;
  box-shadow: inset 2px 0 0 var(--orange);
}
.nav-item .nav-badge {
  margin-left: auto; background: var(--orange); color: #fff;
  font-size: 10.5px; font-weight: 700; min-width: 18px; height: 18px;
  border-radius: 9px; display: flex; align-items: center; justify-content: center;
  padding: 0 5px;
}

.side-foot { margin-top: auto; padding: 14px 8px 4px; border-top: 1px solid rgba(255, 255, 255, .07); }
.side-note { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: #7e949a; }
.dot-live {
  width: 6px; height: 6px; border-radius: 50%; background: #3ecf8e;
  box-shadow: 0 0 0 3px rgba(62, 207, 142, .16);
}
.side-tip { margin-top: 8px; font-size: 11.5px; color: #6a8086; line-height: 1.65; }

/* ---------------- 主区 ---------------- */
.main {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 14px 26px;
  background: rgba(246, 244, 241, .88);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line2);
}
.menu-btn { display: none; width: 36px; height: 36px; border-radius: 10px; align-items: center; justify-content: center; color: var(--ink2); }
.topbar-left { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.topbar-left h2 { font-size: 17px; }
.topbar-date { font-size: 12.5px; color: var(--ink3); white-space: nowrap; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.ghost-btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 13px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff;
  color: var(--ink2); font-size: 13px; font-weight: 500;
  box-shadow: var(--shadow-sm);
  transition: .18s;
}
.ghost-btn:hover { border-color: #dfd6cc; color: var(--ink); }

.avatar {
  width: 34px; height: 34px; border-radius: 12px;
  background: linear-gradient(140deg, #ffb08c, #ff7a45);
  color: #fff; font-weight: 700; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 34px;
}

.view { padding: 22px 26px 40px; flex: 1; }
.view-inner { max-width: 1180px; margin: 0 auto; }

.foot {
  padding: 18px 26px 26px; color: var(--ink3); font-size: 11.5px;
  text-align: center; line-height: 1.8;
}
.foot-sep { margin: 0 6px; opacity: .5; }

/* ---------------- 首屏 Hero ---------------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(120% 140% at 100% 0%, #fff3ec 0%, rgba(255, 243, 236, 0) 58%),
    linear-gradient(135deg, #ffffff 0%, #fdfaf7 100%);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px 26px;
  display: flex; align-items: center; gap: 26px;
  box-shadow: var(--shadow);
}
.hero::after {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, .12), transparent 68%);
  pointer-events: none;
}
.hero-main { flex: 1; min-width: 0; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .4px;
  color: var(--orange-d); background: var(--orange-soft);
  border-radius: 20px; padding: 3px 10px; margin-bottom: 10px;
}
.hero h1 {
  font-size: 26px; line-height: 1.32; letter-spacing: -.6px;
}
.hero h1 em { font-style: normal; color: var(--orange-d); }
.hero p { margin-top: 8px; color: var(--ink2); font-size: 13.5px; max-width: 560px; }

.hero-side { display: flex; gap: 10px; flex: 0 0 auto; }
.mini-stat {
  width: 108px; padding: 12px 12px 11px;
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line); border-radius: 14px;
}
.mini-stat .ms-label { font-size: 11.5px; color: var(--ink3); }
.mini-stat .ms-val { font-size: 21px; font-weight: 800; letter-spacing: -.6px; margin-top: 2px; }
.mini-stat .ms-val small { font-size: 12px; font-weight: 600; color: var(--ink3); margin-left: 1px; }
.ms-bar { height: 4px; border-radius: 3px; background: #efe9e3; margin-top: 8px; overflow: hidden; }
.ms-bar i { display: block; height: 100%; border-radius: 3px; background: var(--orange); transition: width .4s ease; }
.mini-stat.t-teal .ms-bar i { background: var(--teal); }
.mini-stat.t-gold .ms-bar i { background: var(--gold); }

/* ---------------- 通用卡片 ---------------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: 18px 20px; }
.card-head {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 18px; border-bottom: 1px solid var(--line2);
}
.card-head h3 { font-size: 14.5px; }
.card-head .sub { font-size: 12px; color: var(--ink3); }
.card-head .head-act { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.section { margin-top: 20px; }
.section-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.section-head h3 { font-size: 15px; }
.section-head .sub { font-size: 12px; color: var(--ink3); }
.section-head .head-act { margin-left: auto; }

.grid { display: grid; gap: 14px; }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
.grid.align-start { align-items: start; }

/* 统计卡 */
.stat {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 16px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.stat .st-top { display: flex; align-items: center; gap: 8px; color: var(--ink2); font-size: 12.5px; }
.stat .st-icon {
  width: 26px; height: 26px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: var(--orange-d); flex: 0 0 26px;
}
.stat .st-num { font-size: 27px; font-weight: 800; letter-spacing: -1px; margin-top: 8px; line-height: 1.1; }
.stat .st-num small { font-size: 13px; color: var(--ink3); font-weight: 600; margin-left: 2px; }
.stat .st-foot { font-size: 11.5px; color: var(--ink3); margin-top: 4px; }
.stat.s-teal .st-icon { background: var(--teal-soft); color: var(--teal); }
.stat.s-gold .st-icon { background: var(--gold-soft); color: var(--gold); }
.stat.s-red .st-icon { background: var(--red-soft); color: var(--red); }

/* 待处理提醒 */
.alerts { display: flex; flex-direction: column; gap: 9px; }
.alert {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 14px; border-radius: 13px;
  border: 1px solid var(--line); background: #fff;
  text-align: left; width: 100%;
  transition: .18s;
}
.alert:hover { border-color: #e3d9cf; transform: translateY(-1px); }
.alert .al-ico {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
  background: var(--orange-soft); color: var(--orange-d); font-size: 15px;
}
.alert .al-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; text-align: left; }
.alert .al-title { font-size: 13.5px; font-weight: 600; display: block; }
.alert .al-desc { font-size: 11.5px; color: var(--ink3); margin-top: 0; display: block; }
.alert .al-go { color: var(--ink3); font-size: 12px; white-space: nowrap; display: flex; align-items: center; gap: 3px; }
.alert.a-red { background: linear-gradient(90deg, #fff7f7, #fff); border-color: #f6dcdc; }
.alert.a-red .al-ico { background: var(--red-soft); color: var(--red); }
.alert.a-gold { background: linear-gradient(90deg, #fffaf0, #fff); border-color: #f6e8c9; }
.alert.a-gold .al-ico { background: var(--gold-soft); color: var(--gold); }
.alert.a-teal { background: linear-gradient(90deg, #f4fbfa, #fff); border-color: #d8ece8; }
.alert.a-teal .al-ico { background: var(--teal-soft); color: var(--teal); }

/* 时间轴 */
.timeline { padding: 6px 18px 14px; }
.tl-item { display: flex; gap: 12px; padding: 11px 0; position: relative; }
.tl-item:not(:last-child)::before {
  content: ""; position: absolute; left: 6px; top: 24px; bottom: -6px; width: 2px;
  background: var(--line);
}
.tl-item.done:not(:last-child)::before { background: #cfe8e3; }
.tl-dot {
  width: 13px; height: 13px; border-radius: 50%; flex: 0 0 13px; margin-top: 5px;
  border: 2px solid #dcd4cb; background: #fff; position: relative; z-index: 1;
}
.tl-item.done .tl-dot { border-color: var(--teal); background: var(--teal); box-shadow: 0 0 0 3px var(--teal-soft); }
.tl-item.now .tl-dot { border-color: var(--orange); background: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.tl-body { flex: 1; min-width: 0; }
.tl-title { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tl-time { font-size: 11.5px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.tl-desc { font-size: 11.5px; color: var(--ink3); margin-top: 1px; }

/* 学生速览行 */
.mini-list { padding: 4px 0; }
.mini-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 18px;
}
.mini-row:hover { background: #fdfbf9; }
.mini-row .nm { font-size: 13px; font-weight: 500; width: 62px; flex: 0 0 62px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mini-row .bar { flex: 1; height: 6px; border-radius: 4px; background: #f1ece6; overflow: hidden; }
.mini-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #7ecfc2, var(--teal)); border-radius: 4px; }
.mini-row .pct { font-size: 11.5px; color: var(--ink3); width: 34px; text-align: right; font-variant-numeric: tabular-nums; }

/* 标签 pill */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  height: 22px; padding: 0 9px; border-radius: 11px;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  background: #f3efea; color: var(--ink2);
}
.pill.p-orange { background: var(--orange-soft); color: var(--orange-d); }
.pill.p-teal { background: var(--teal-soft); color: #1f7d70; }
.pill.p-gold { background: var(--gold-soft); color: #a9740a; }
.pill.p-red { background: var(--red-soft); color: #b83b37; }
.pill.p-blue { background: var(--blue-soft); color: #3364b8; }
.pill.p-gray { background: #f1f0ee; color: #8b979b; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 15px; border-radius: 11px;
  font-size: 13px; font-weight: 600;
  background: var(--orange); color: #fff;
  box-shadow: 0 6px 14px -8px rgba(255, 107, 53, .9);
  transition: .16s;
}
.btn:hover { background: var(--orange-d); }
.btn:active { transform: translateY(1px); }
.btn.b-teal { background: var(--teal); box-shadow: 0 6px 14px -8px rgba(47, 158, 143, .9); }
.btn.b-teal:hover { background: #26877a; }
.btn.b-ghost { background: #fff; color: var(--ink2); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.btn.b-ghost:hover { color: var(--ink); border-color: #dfd6cc; background: #fff; }
.btn.b-soft { background: var(--orange-soft); color: var(--orange-d); box-shadow: none; }
.btn.b-soft:hover { background: #ffe6da; }
.btn.b-danger { background: #fff; color: var(--red); border: 1px solid #f0d5d5; box-shadow: none; }
.btn.b-danger:hover { background: var(--red-soft); }
.btn.b-sm { height: 30px; padding: 0 11px; font-size: 12px; border-radius: 9px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.icon-btn {
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink3); transition: .16s;
}
.icon-btn:hover { background: #f4f1ed; color: var(--ink); }

/* ---------------- 接送看板 ---------------- */
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.board-col { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.board-col-head {
  display: flex; align-items: center; gap: 8px; padding: 13px 15px;
  border-bottom: 1px solid var(--line2);
}
.board-col-head .bc-dot { width: 8px; height: 8px; border-radius: 50%; }
.board-col-head h4 { font-size: 13.5px; }
.board-col-head .cnt {
  margin-left: auto; font-size: 12px; font-weight: 700; color: var(--ink2);
  background: #f4f1ed; border-radius: 9px; padding: 1px 8px;
}
.board-col.c-pending .bc-dot { background: var(--gold); }
.board-col.c-in .bc-dot { background: var(--orange); }
.board-col.c-out .bc-dot { background: var(--teal); }
.board-list { padding: 10px; display: flex; flex-direction: column; gap: 9px; min-height: 80px; }

.stu-card {
  border: 1px solid var(--line); border-radius: 13px; background: #fff;
  padding: 11px 12px; transition: .18s;
}
.stu-card:hover { border-color: #e2d8ce; box-shadow: var(--shadow-sm); }
.sc-top { display: flex; align-items: center; gap: 9px; }
.sc-ava {
  width: 30px; height: 30px; border-radius: 10px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.sc-name { font-size: 13.5px; font-weight: 600; }
.sc-meta { font-size: 11px; color: var(--ink3); margin-top: -1px; }
.sc-time { margin-left: auto; font-size: 11px; color: var(--ink3); font-variant-numeric: tabular-nums; text-align: right; }
.sc-time b { display: block; color: var(--ink); font-size: 12.5px; font-weight: 700; }
.sc-warn { margin-top: 8px; font-size: 11.5px; color: #b83b37; background: var(--red-soft); border-radius: 8px; padding: 4px 8px; }
.sc-act { display: flex; gap: 7px; margin-top: 9px; }
.sc-act .btn { flex: 1; height: 32px; font-size: 12.5px; }
.empty-hint { text-align: center; color: var(--ink3); font-size: 12px; padding: 18px 8px; }

/* 移动端接送看板筛选 */
.board-filter { display: none; gap: 7px; margin-bottom: 12px; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; }
.board-filter .chip { flex: 0 0 auto; }
@media (max-width: 900px) {
  .board-filter { display: flex; }
  .board.bf-pending .board-col.c-in,
  .board.bf-pending .board-col.c-out,
  .board.bf-in .board-col.c-pending,
  .board.bf-in .board-col.c-out,
  .board.bf-out .board-col.c-pending,
  .board.bf-out .board-col.c-in { display: none; }
}

/* ---------------- 表格 ---------------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; min-width: 620px; }
table.tbl th {
  text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink3);
  padding: 10px 12px; border-bottom: 1px solid var(--line2); white-space: nowrap;
}
table.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line2); font-size: 13px; vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: #fdfbf9; }
.cell-name { display: flex; align-items: center; gap: 9px; white-space: nowrap; }
.cell-name .sc-ava { width: 26px; height: 26px; flex: 0 0 26px; font-size: 12px; border-radius: 9px; }

.tick {
  width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid #e0d8d0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; color: transparent; transition: .15s;
}
.tick:hover { border-color: var(--teal); }
.tick.on { background: var(--teal); border-color: var(--teal); color: #fff; }
.tick.on.fix { background: var(--gold); border-color: var(--gold); }

/* 进度条（大） */
.bar-lg { height: 10px; border-radius: 6px; background: #f1ece6; overflow: hidden; }
.bar-lg i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #ffb18f, var(--orange)); transition: width .45s ease; }
.bar-lg.b-teal i { background: linear-gradient(90deg, #86d6c9, var(--teal)); }
.bar-lg.b-gold i { background: linear-gradient(90deg, #f5d489, var(--gold)); }

/* ---------------- 学生档案 ---------------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.search-box {
  display: flex; align-items: center; gap: 7px; height: 36px; padding: 0 12px;
  background: #fff; border: 1px solid var(--line); border-radius: 11px; min-width: 220px;
  color: var(--ink3);
}
.search-box input { border: 0; outline: 0; background: transparent; flex: 1; min-width: 0; }
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  height: 32px; padding: 0 12px; border-radius: 9px; font-size: 12.5px; font-weight: 500;
  background: #fff; border: 1px solid var(--line); color: var(--ink2); transition: .16s;
}
.chip:hover { border-color: #dfd6cc; color: var(--ink); }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.stu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px; }
.stu-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 16px; box-shadow: var(--shadow-sm); transition: .18s; display: flex; flex-direction: column; }
.stu-item:hover { border-color: #e2d8ce; box-shadow: var(--shadow); transform: translateY(-1px); }
.si-top { display: flex; align-items: center; gap: 10px; }
.si-ava { width: 38px; height: 38px; border-radius: 13px; flex: 0 0 38px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; }
.si-name { font-size: 14.5px; font-weight: 700; }
.si-sub { font-size: 11.5px; color: var(--ink3); }
.si-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 11px; align-content: flex-start; }
.si-info { margin-top: 11px; font-size: 12.5px; color: var(--ink2); display: flex; flex-direction: column; gap: 4px; }
.si-info div { display: flex; gap: 6px; }
.si-info span:first-child { color: var(--ink3); flex: 0 0 46px; }
.si-act { display: flex; gap: 7px; margin-top: auto; padding-top: 12px; }
.si-act .btn { flex: 1; height: 30px; font-size: 12px; }

/* ---------------- 午餐 ---------------- */
.menu-card { background: linear-gradient(135deg, #fff8f2, #fff); border: 1px solid #f6e2d5; border-radius: var(--radius); padding: 16px 18px; }
.menu-title { font-size: 12px; color: var(--orange-d); font-weight: 700; letter-spacing: .4px; }
.menu-dishes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dish { background: #fff; border: 1px solid #f3e2d6; border-radius: 10px; padding: 6px 11px; font-size: 13px; font-weight: 600; color: #7a4a2d; }
.dish.soup { background: #f3faf8; border-color: #d9ece7; color: #1f7d70; }
.dish.staple { background: #fdf8ea; border-color: #f2e6c9; color: #8a6a12; }

.meal-sum { display: flex; gap: 10px; }
.meal-sum .ms { flex: 1; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px; }
.meal-sum .ms .k { font-size: 11.5px; color: var(--ink3); display: flex; align-items: center; gap: 5px; }
.meal-sum .ms .v { font-size: 20px; font-weight: 800; letter-spacing: -.5px; margin-top: 2px; }
.meal-sum .ms .v small { font-size: 12px; color: var(--ink3); font-weight: 600; }

.meal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(214px, 1fr)); gap: 11px; }
.meal-item { background: #fff; border: 1px solid var(--line); border-radius: 13px; padding: 11px 12px; }
.meal-item .mi-top { display: flex; align-items: center; gap: 8px; }
.meal-item .mi-name { font-size: 13px; font-weight: 600; }
.meal-seg { display: flex; gap: 5px; margin-top: 9px; background: #f7f4f0; border-radius: 9px; padding: 3px; }
.meal-seg button {
  flex: 1; height: 26px; border-radius: 7px; font-size: 11.5px; font-weight: 600; color: var(--ink3);
  transition: .15s;
}
.meal-seg button.on { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }
.meal-seg button.on.full { background: var(--teal); color: #fff; }
.meal-seg button.on.half { background: var(--gold); color: #fff; }
.meal-seg button.on.none { background: var(--red); color: #fff; }

.allergy-tag { font-size: 10.5px; background: var(--red-soft); color: #b83b37; border-radius: 6px; padding: 1px 6px; font-weight: 600; }

/* ---------------- 家长反馈 ---------------- */
.fb-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 14px; align-items: start; }
.fb-list { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm); }
.fb-list-head { padding: 12px 14px; border-bottom: 1px solid var(--line2); font-size: 12.5px; color: var(--ink2); font-weight: 600; display: flex; }
.fb-list-head span { margin-left: auto; color: var(--teal); font-size: 11.5px; }
.fb-names { max-height: 560px; overflow-y: auto; padding: 6px; }
.fb-name {
  display: flex; align-items: center; gap: 9px; width: 100%;
  padding: 8px 9px; border-radius: 10px; text-align: left; transition: .15s;
}
.fb-name:hover { background: #fdf7f2; }
.fb-name.on { background: var(--orange-soft); }
.fb-name .fn { font-size: 13px; font-weight: 500; }
.fb-name .fs { margin-left: auto; font-size: 10.5px; }

.preview {
  background: #fbfaf8; border: 1px dashed #e2d8ce; border-radius: 14px;
  padding: 16px 18px; font-size: 13.5px; line-height: 1.95; white-space: pre-wrap;
  color: #2b3b40; font-family: inherit; min-height: 260px;
}
.preview .ph { color: var(--ink3); }

/* ---------------- 设置 ---------------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-row label { font-size: 12.5px; color: var(--ink2); font-weight: 600; }
.form-row .hint { font-size: 11.5px; color: var(--ink3); font-weight: 400; }
.input, .select, .textarea {
  height: 38px; padding: 0 12px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; outline: 0;
  transition: .16s; width: 100%;
}
.input:focus, .select:focus, .textarea:focus { border-color: #ffb699; box-shadow: 0 0 0 3px rgba(255, 107, 53, .12); }
.textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 74px; line-height: 1.7; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.set-block { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line2); }
.set-block:last-child { border-bottom: 0; }
.set-block .sb-body { flex: 1; min-width: 0; }
.set-block .sb-title { font-size: 13.5px; font-weight: 600; }
.set-block .sb-desc { font-size: 11.5px; color: var(--ink3); margin-top: 2px; }

/* ---------------- 本周走势柱图 ---------------- */
.week-chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 158px; padding: 18px 20px 0;
}
.wc-col {
  flex: 1; min-width: 0; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
}
.wc-val { font-size: 10.5px; color: var(--ink3); margin-bottom: 5px; font-variant-numeric: tabular-nums; }
.wc-bar {
  width: 100%; max-width: 42px;
  border-radius: 9px 9px 5px 5px;
  background: linear-gradient(180deg, #ffc9b2, #ff9d75);
  transition: height .45s ease;
}
.wc-bar.now { background: linear-gradient(180deg, #8ad8cb, var(--teal)); }
.wc-label { font-size: 10.5px; color: var(--ink3); margin-top: 7px; white-space: nowrap; }

.week-foot {
  display: flex; gap: 10px;
  padding: 14px 18px 18px; margin-top: 10px;
  border-top: 1px solid var(--line2);
}
.wf-item { flex: 1; background: #faf8f5; border-radius: 12px; padding: 9px 12px; min-width: 0; }
.wf-k { display: block; font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wf-v { font-size: 17px; font-weight: 800; letter-spacing: -.4px; }
.wf-v small { font-size: 11px; color: var(--ink3); font-weight: 600; margin-left: 2px; }

/* ---------------- 移动端 tabbar ---------------- */
.tabbar { display: none; }

/* ---------------- 弹窗 ---------------- */
.mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(23, 38, 43, .42);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
  backdrop-filter: blur(2px);
}
.mask.show { display: flex; }
.modal {
  width: 100%; max-width: 520px; max-height: 88vh; overflow-y: auto;
  background: #fff; border-radius: 18px; box-shadow: 0 24px 60px -20px rgba(15, 25, 30, .45);
  animation: pop .18s ease;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; padding: 16px 18px 12px; }
.modal-head h3 { font-size: 15.5px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 4px 18px 6px; }
.modal-foot { display: flex; gap: 9px; padding: 14px 18px 18px; }
.modal-foot .btn { flex: 1; height: 38px; }
.modal-foot .btn.b-ghost { flex: 0 0 auto; padding: 0 18px; }

/* ---------------- Toast ---------------- */
.toast-wrap { position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%); z-index: 120; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: rgba(23, 38, 43, .95); color: #fff; font-size: 13px;
  padding: 9px 16px; border-radius: 11px; box-shadow: 0 10px 30px -12px rgba(0, 0, 0, .5);
  animation: toastIn .2s ease;
  max-width: 82vw; text-align: center;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------- 空状态 ---------------- */
.empty {
  text-align: center; padding: 44px 20px; color: var(--ink3);
}
.empty .e-ico { font-size: 34px; opacity: .5; }
.empty .e-txt { margin-top: 8px; font-size: 13px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 1080px) {
  .hero { flex-direction: column; align-items: stretch; gap: 18px; }
  .hero-side { justify-content: space-between; }
  .mini-stat { flex: 1; width: auto; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-2-1 { grid-template-columns: 1fr; }
  .fb-layout { grid-template-columns: 200px minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100%;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 20px 0 50px -20px rgba(0, 0, 0, .5);
  }
  .app.side-open .sidebar { transform: none; }
  .app.side-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(23, 38, 43, .35); z-index: 35;
  }
  .menu-btn { display: inline-flex; }
  .view { padding: 16px 14px 90px; }
  .topbar { padding: 12px 14px; }
  .topbar-left h2 { font-size: 15.5px; }
  .topbar-date { display: none; }
  .foot { display: none; }
  .board { grid-template-columns: 1fr; }
  .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-layout { grid-template-columns: 1fr; }
  .fb-names { max-height: 180px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: blur(12px);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .tab-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 5px 0; color: var(--ink3); font-size: 10.5px; font-weight: 600;
    border-radius: 10px;
  }
  .tab-btn.active { color: var(--orange-d); }
  .tab-btn .tb-dot { width: 4px; height: 4px; border-radius: 50%; background: transparent; }
  .tab-btn.active .tb-dot { background: var(--orange); }
  .modal { max-width: 100%; border-radius: 16px; }
  .toast-wrap { bottom: 84px; }
}

@media (max-width: 620px) {
  .hero { padding: 18px; border-radius: 18px; }
  .hero h1 { font-size: 20px; }
  .hero p { font-size: 12.5px; }
  .g4, .g3, .g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat .st-num { font-size: 23px; }
  .form-2 { grid-template-columns: 1fr; }
  .stu-grid { grid-template-columns: 1fr; }
  .meal-grid { grid-template-columns: 1fr 1fr; }
  .section { margin-top: 16px; }
  .preview { font-size: 13px; padding: 14px; }
  .week-chart { height: 132px; gap: 5px; padding: 14px 12px 0; }
  .wc-bar { max-width: 30px; }
  .week-foot { flex-direction: column; gap: 8px; padding: 12px 14px 14px; }
}

@media (max-width: 380px) {
  .meal-grid { grid-template-columns: 1fr; }
  .g4, .g3, .g2 { grid-template-columns: 1fr; }
}

@media print {
  .sidebar, .tabbar, .topbar-right, .toast-wrap { display: none !important; }
  body { background: #fff; }
}
